register-member.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160
  1. <template>
  2. <view class="register">
  3. <view class="register-main" v-if="isRegisterStep">
  4. <view class="main-form-item">
  5. <view class="form-label">联系人</view>
  6. <input
  7. class="form-input"
  8. type="text"
  9. name="input"
  10. v-model.trim="params.linkMan"
  11. placeholder="请输入联系姓名"
  12. maxlength="6"
  13. />
  14. </view>
  15. <view class="main-form-item">
  16. <view class="form-label">手机号</view>
  17. <input
  18. class="form-input phone"
  19. type="text"
  20. v-model.trim="params.bindMobile"
  21. placeholder="请输入联系人手机号"
  22. maxlength="11"
  23. />
  24. <view class="form-btn" @click.stop="CheckMobile()">检测</view>
  25. </view>
  26. <view class="main-form-item">
  27. <view class="form-label">邮箱</view>
  28. <input
  29. class="form-input"
  30. type="text"
  31. name="input"
  32. v-model.trim="params.contractEmail"
  33. placeholder="请输入机构邮箱地址"
  34. maxlength="30"
  35. />
  36. </view>
  37. <view class="main-form-item">
  38. <view class="form-label">机构名称</view>
  39. <input
  40. class="form-input"
  41. type="text"
  42. name="input"
  43. v-model.trim="params.name"
  44. placeholder="请输入机构名称"
  45. maxlength="30"
  46. />
  47. </view>
  48. <view class="main-form-item">
  49. <view class="form-label">机构简称</view>
  50. <input
  51. class="form-input"
  52. type="text"
  53. name="input"
  54. v-model.trim="params.shortName"
  55. placeholder="请输入机构简称"
  56. maxlength="10"
  57. />
  58. </view>
  59. <view class="main-form-item" @click="showMulLinkageThreePicker">
  60. <view class="form-label">机构地址</view>
  61. <view class="form-input" :class="addressText === '请选择机构所在地区' ? 'none' : ''">
  62. {{ addressText }}
  63. </view>
  64. <view class="iconfont icon-xiayibu"></view>
  65. </view>
  66. <view class="main-form-item textarea">
  67. <view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{
  68. params.address ? params.address : '详细地址:如道路、门牌号、小区等'
  69. }}</view>
  70. <textarea
  71. v-else
  72. class="textarea"
  73. type="text"
  74. v-model="params.address"
  75. placeholder="详细地址:如道路、门牌号、小区等"
  76. placeholder-class="placeholder"
  77. maxlength="35"
  78. @input="onTextareaInput"
  79. @blur="hideTextareaFocus"
  80. :class="isShowInput ? '' : ''"
  81. />
  82. </view>
  83. <view class="main-form-item">
  84. <view class="form-label lang">营业执照编号</view>
  85. <input
  86. class="form-input lang"
  87. type="text"
  88. name="input"
  89. v-model="params.socialCreditCode"
  90. placeholder="请输入社会信用统一代码"
  91. maxlength="18"
  92. />
  93. </view>
  94. <view class="main-form-item file">
  95. <view class="main-form-upload">
  96. <view class="label">营业执照</view>
  97. <view class="upload-picture">
  98. <view class="upload-none" v-if="params.businessLicense === ''" @click="UploadPicture(1)">
  99. <text class="iconfont icon-jiahao"></text><text class="upload-text">营业执照</text>
  100. </view>
  101. <view class="upload-image" v-else>
  102. <image :src="params.businessLicense" mode="" @click="ShowPreviewImage(1)"></image>
  103. <view class="upload-del" @click="DeletePicture(1)">
  104. <text class="iconfont icon-shanchu1"></text>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="main-form-upload">
  110. <view class="label">门头照</view>
  111. <view class="upload-picture">
  112. <view class="upload-none" v-if="params.shopPhoto === ''" @click="UploadPicture(2)">
  113. <text class="iconfont icon-jiahao"></text><text class="upload-text">门头照</text>
  114. </view>
  115. <view class="upload-image" v-else>
  116. <image :src="params.shopPhoto" mode="" @click="ShowPreviewImage(2)"></image>
  117. <view class="upload-del" @click="DeletePicture(2)">
  118. <text class="iconfont icon-shanchu1"></text>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="main-form-item picker">
  125. <view class="form-label">机构类型</view>
  126. <radio-group @change="bindPickerChange">
  127. <label class="label-radio" v-for="(item, index) in radioGroup1" :key="item.value">
  128. <radio class="row-radio" :value="item.value" :checked="index === current" color="#E15616" />
  129. <view class="row-text">{{ item.name }}</view>
  130. </label>
  131. </radio-group>
  132. </view>
  133. <view class="main-form-item picker" v-if="params.firstClubType == 1">
  134. <view class="picker-radio">
  135. <view
  136. class="secondTyperadio"
  137. v-for="(item, index) in beautyList"
  138. :key="item.value"
  139. @click="radioChange(item)"
  140. :class="item.value == params.secondClubType ? 'active' : ''"
  141. >
  142. <view class="secondRadio">{{ item.name }}</view>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="main-form-item picker" v-if="params.firstClubType == 2">
  147. <view class="picker-radio">
  148. <view
  149. class="secondTyperadio"
  150. v-for="(item, index) in beautyLists"
  151. :key="item.value"
  152. @click="radioChange(item)"
  153. :class="item.value == params.secondClubType ? 'active' : ''"
  154. >
  155. <view class="secondRadio">{{ item.name }}</view>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="main-form-item file" v-if="params.firstClubType == 1">
  160. <view class="main-form-upload">
  161. <view class="label">资质</view>
  162. <view class="upload-picture">
  163. <view class="upload-none" v-if="params.medicalPracticeLicense === ''" @click="UploadPicture(3)">
  164. <text class="iconfont icon-jiahao"></text><text class="upload-text">医疗执业许可证</text>
  165. </view>
  166. <view class="upload-image" v-else>
  167. <image :src="params.medicalPracticeLicense" mode="" @click="ShowPreviewImage(3)"></image>
  168. <view class="upload-del" @click="DeletePicture(3)">
  169. <text class="iconfont icon-shanchu1"></text>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. <view
  176. class="main-form-item none"
  177. v-if="
  178. (params.firstClubType == 1 && params.secondClubType == 2) ||
  179. (params.firstClubType == 1 && params.secondClubType == 3)
  180. "
  181. >
  182. <view class="form-label none">科室</view>
  183. <textarea
  184. class="textarea-ke"
  185. placeholder="请填写经营的科室,至少三个,用逗号隔开"
  186. placeholder-style="placeholder"
  187. v-model="params.department"
  188. maxlength="16"
  189. ></textarea>
  190. </view>
  191. <view class="main-form-item none" v-if="params.firstClubType == 1">
  192. <view class="form-label none">主营内容</view>
  193. <view class="form-checkbox-group">
  194. <checkbox-group @change="ChooseMaleLike">
  195. <label
  196. class="item"
  197. v-for="(item, index) in mentuzCampList"
  198. :key="index"
  199. :class="{ on: item.checked }"
  200. >
  201. <checkbox
  202. class="item-checkbox"
  203. :value="item.value"
  204. color="#E15616"
  205. style="transform:scale(0.7)"
  206. :checked="item.checked"
  207. ></checkbox>
  208. <text class="item-text">{{ item.name }}</text>
  209. </label>
  210. </checkbox-group>
  211. </view>
  212. <view class="form-checkbox-input">
  213. <input
  214. class="checkbox-input"
  215. type="text"
  216. v-model="customItemValue"
  217. placeholder="请输入其他自定义品项目"
  218. maxlength="5"
  219. />
  220. <view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
  221. </view>
  222. </view>
  223. <view class="main-form-item none" v-if="params.firstClubType == 2">
  224. <view class="form-label none">主营内容</view>
  225. <view class="form-checkbox-group">
  226. <checkbox-group @change="ChooseMaleLike">
  227. <label
  228. class="item"
  229. v-for="(item, index) in medicaCampList"
  230. :key="index"
  231. :class="{ on: item.checked }"
  232. >
  233. <checkbox
  234. class="item-checkbox"
  235. :value="item.value"
  236. color="#E15616"
  237. style="transform:scale(0.7)"
  238. :checked="item.checked"
  239. ></checkbox>
  240. <text class="item-text">{{ item.name }}</text>
  241. </label>
  242. </checkbox-group>
  243. </view>
  244. <view class="form-checkbox-input">
  245. <input
  246. class="checkbox-input"
  247. type="text"
  248. v-model="customItemValue"
  249. placeholder="请输入其他自定义品项目"
  250. maxlength="5"
  251. />
  252. <view class="checkbox-btn" @click.stop="addCustomItem">确认添加</view>
  253. </view>
  254. </view>
  255. <view class="register-fiexd clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '' }">
  256. <view class="register-agree">
  257. <view class="agree-text" @tap.stop="agreeCheck()">
  258. <button
  259. class="checkbox iconfont"
  260. :class="[isCheck ? 'icon-gouxuan' : 'icon-weigouxuan']"
  261. ></button>
  262. 我已阅读并同意
  263. <text @click.stop="this.$api.navigateTo('/pages/service/service?id=1036&title=机构协议')"
  264. >《机构协议》</text
  265. >
  266. <text @click.stop="this.$api.navigateTo('/pages/service/service?id=1023&title=用户协议')"
  267. >《用户协议》</text
  268. >及
  269. <text @click.stop="this.$api.navigateTo('/pages/service/service?id=1013&title=隐私权政策')"
  270. >《隐私权政策》</text
  271. >
  272. </view>
  273. </view>
  274. <view class="register-row">
  275. <view class="register-btn sub" :class="isSubLoading ? 'disabled' : ''" @click.stop="SubmitRegister"
  276. >确定</view
  277. >
  278. </view>
  279. </view>
  280. </view>
  281. <view class="register-main" v-else>
  282. <view class="main-form-item">
  283. <view class="form-label">联系人</view> <view class="form-text"> {{ clubInfo.linkMan }} </view>
  284. </view>
  285. <view class="main-form-item">
  286. <view class="form-label">手机号</view> <view class="form-text">{{ clubInfo.bindMobile }}</view>
  287. </view>
  288. <view class="main-form-item">
  289. <view class="form-label">邮箱</view> <view class="form-text">{{ clubInfo.contractEmail }}</view>
  290. </view>
  291. <view class="main-form-item">
  292. <view class="form-label">机构名称</view> <view class="form-text">{{ clubInfo.name }}</view>
  293. </view>
  294. <view class="main-form-item">
  295. <view class="form-label">机构简称</view> <view class="form-text">{{ clubInfo.shortName }}</view>
  296. </view>
  297. <view class="main-form-item">
  298. <view class="form-label">机构地址</view>
  299. <view class="form-input">{{ clubInfo.provincialAddress }}</view>
  300. </view>
  301. <view class="main-form-item">
  302. <view class="form-textarea">{{ clubInfo.address }}</view>
  303. </view>
  304. <view class="main-form-item">
  305. <view class="form-label lang">营业执照编号</view>
  306. <view class="form-input lang">{{ clubInfo.socialCreditCode }}</view>
  307. </view>
  308. <view class="main-form-item file">
  309. <view class="main-form-upload">
  310. <view class="label">营业执照</view>
  311. <view class="upload-picture">
  312. <view class="upload-image"
  313. ><image :src="clubInfo.businessLicense" mode="" @click="ShowPreviewImage(1)"></image
  314. ></view>
  315. </view>
  316. </view>
  317. <view class="main-form-upload">
  318. <view class="label">门头照</view>
  319. <view class="upload-picture">
  320. <view class="upload-image"
  321. ><image :src="clubInfo.shopPhoto" mode="" @click="ShowPreviewImage(2)"></image
  322. ></view>
  323. </view>
  324. </view>
  325. </view>
  326. <view class="main-form-item">
  327. <view class="form-label">机构类型</view>
  328. <view class="form-text">
  329. {{ clubInfo.firstClubType | FirstFormat }} - {{ clubInfo.secondClubType | TwoFormat }}
  330. </view>
  331. </view>
  332. <view class="main-form-item file" v-if="clubInfo.firstClubType == 1">
  333. <view class="main-form-upload">
  334. <view class="label">资质</view>
  335. <view class="upload-picture">
  336. <view class="upload-image"
  337. ><image :src="clubInfo.medicalPracticeLicense" mode="" @click="ShowPreviewImage(2)"></image
  338. ></view>
  339. </view>
  340. </view>
  341. </view>
  342. <view class="main-form-item" v-if="clubInfo.secondClubType == 2 || clubInfo.secondClubType == 3">
  343. <view class="form-label">科室</view> <view class="form-text">{{ clubInfo.department }}</view>
  344. </view>
  345. <view class="main-form-item none">
  346. <view class="form-label none">主营内容</view>
  347. <view class="form-checkbox-group">
  348. <view class="form-table-item" v-for="(item, index) in showMainProductList" :key="index">
  349. {{ item.name }}
  350. </view>
  351. </view>
  352. </view>
  353. <view class="register-fiexd clearfix" :style="{ paddingBottom: isIphoneX ? '68rpx' : '' }">
  354. <view class="register-row"> <button class="register-btn sub" @tap="ShareRegister">分享</button> </view>
  355. </view>
  356. </view>
  357. <!-- 地址Pciker -->
  358. <city-Picker
  359. :themeColor="themeColor"
  360. ref="CityPicker"
  361. :pickerValueDefault="cityPickerValueDefault"
  362. @onCancel="onCancel"
  363. @onConfirm="onConfirm"
  364. >
  365. </city-Picker>
  366. <!-- 分享弹窗 -->
  367. <shareModel v-if="isShareModal" :bindId="bindId" @shareConfirm="onShareAppMessage"></shareModel>
  368. </view>
  369. </template>
  370. <script>
  371. import { beautyList, beautyLists, mentuzCampNullList, medicaCampNullList } from '@/common/json/data.json.js' //本地数据
  372. import shareModel from '@/components/cm-module/modelAlert/shareModel.vue' //分享弹窗
  373. import { uploadFileImage } from '@/services/public.js'
  374. export default {
  375. components: {
  376. shareModel
  377. },
  378. data() {
  379. return {
  380. isRegisterStep: true,
  381. isSubLoading: false,
  382. isIphoneX: this.$store.state.isIphone,
  383. isCheck: false,
  384. clubUserId: 0,
  385. isShowInput: true,
  386. isShareModal: false,
  387. isDepartment: false,
  388. textareaFocus: false,
  389. beautyList: beautyList,
  390. beautyLists: beautyLists,
  391. mentuzCampList: mentuzCampNullList,
  392. medicaCampList: medicaCampNullList,
  393. addressText: '请选择机构所在地区',
  394. params: {
  395. userId: 0,
  396. name: '',
  397. shortName: '',
  398. linkMan: '',
  399. bindMobile: '',
  400. contractEmail: '',
  401. socialCreditCode: '',
  402. isAgreed: 0,
  403. townId: '', //区ID
  404. cityId: '', //区ID
  405. provinceId: '', //区ID
  406. addressDetail: '', //地址
  407. businessLicense: '', //营业执照
  408. shopPhoto: '', //门头照
  409. medicalPracticeLicense: '', //资质
  410. firstClubType: 1, //1医美;2生美
  411. secondClubType: 1, //1诊所;2门诊;3医院
  412. department: '', //科室
  413. mainProduct: ''
  414. },
  415. clubInfo: {
  416. linkMan: '',
  417. bindMobile: '',
  418. userId: 0
  419. },
  420. radioGroup1: [{ name: '医美', value: 1 }, { name: '生美', value: 2 }],
  421. current: 0,
  422. bindId: 0,
  423. customItemValue: '', //自定义项目
  424. showMainProductList: []
  425. }
  426. },
  427. filters: {
  428. FirstFormat: function(type) {
  429. //处理金额
  430. let name = ''
  431. switch (type) {
  432. case 1:
  433. name = '医美'
  434. break
  435. case 2:
  436. name = '生美'
  437. break
  438. }
  439. return name
  440. },
  441. TwoFormat: function(type) {
  442. //处理金额
  443. let text = ''
  444. switch (type) {
  445. case 1:
  446. text = '诊所'
  447. break
  448. case 2:
  449. text = '门诊'
  450. break
  451. case 3:
  452. text = '医院'
  453. break
  454. }
  455. return text
  456. }
  457. },
  458. onLoad(option) {
  459. this.$api.getStorage().then(resolve => {
  460. this.params.userId = resolve.userId ? resolve.userId : 0
  461. })
  462. },
  463. computed: {},
  464. methods: {
  465. CheckMobile() {
  466. //检测手机是否能注册
  467. if (this.params.bindMobile == '') {
  468. this.$util.msg('请输入手机号', 2000)
  469. return
  470. }
  471. if (!this.$reg.isMobile(this.params.bindMobile)) {
  472. this.$util.msg('请输入正确的手机号', 2000)
  473. return
  474. }
  475. this.SellerService.SellerClubCheck({ bindMobile: this.params.bindMobile })
  476. .then(response => {
  477. this.$util.msg(response.data, 2000)
  478. })
  479. .catch(error => {
  480. this.$util.msg(error.msg, 2000)
  481. })
  482. },
  483. SubmitRegister() {
  484. //提交注册
  485. if (this.isSubLoading) {
  486. return
  487. }
  488. if (this.params.linkMan == '') {
  489. this.$util.msg('请输入联系人姓名', 2000)
  490. return
  491. }
  492. if (this.params.bindMobile == '') {
  493. this.$util.msg('请输入联系人手机号', 2000)
  494. return
  495. }
  496. if (!this.$reg.isMobile(this.params.bindMobile)) {
  497. this.$util.msg('手机格式不正确', 2000)
  498. return
  499. }
  500. if (this.params.contractEmail == '') {
  501. this.$util.msg('请输入邮箱地址', 2000)
  502. return
  503. }
  504. if (!this.$reg.isEmail(this.params.contractEmail)) {
  505. this.$util.msg('请输入正确的邮箱地址', 2000)
  506. return
  507. }
  508. if (this.params.name == '') {
  509. this.$util.msg('请输入机构名称', 2000)
  510. return
  511. }
  512. if (this.params.townId == '') {
  513. this.$util.msg('请选择机构地址', 2000)
  514. return
  515. }
  516. if (this.params.address == '') {
  517. this.$util.msg('请填写机构详细地址', 2000)
  518. return
  519. }
  520. if (this.params.businessLicense == '') {
  521. this.$util.msg('请上传您的营业执照', 2000)
  522. return
  523. }
  524. if (this.params.firstClubType == 1) {
  525. if (this.params.medicalPracticeLicense == '') {
  526. this.$util.msg('请上传您的医疗资质', 2000)
  527. return
  528. }
  529. }
  530. if (this.params.firstClubType != 0) {
  531. console.log(this.params.mainProduct)
  532. if (this.params.mainProduct == '') {
  533. this.$util.msg('请选择住机构主营内容', 2000)
  534. return
  535. }
  536. }
  537. const mainproList = []
  538. if (this.params.firstClubType == 1) {
  539. this.mentuzCampList.forEach(item => {
  540. mainproList.push(item.name)
  541. })
  542. } else {
  543. this.medicaCampList.forEach(item => {
  544. mainproList.push(item.name)
  545. })
  546. }
  547. this.params.mainProduct = mainproList.join('/')
  548. if (this.params.isAgreed == 0) {
  549. this.$util.msg('请勾选同意协议', 2000)
  550. return
  551. }
  552. this.isSubLoading = true
  553. this.SellerService.SellerClubTemporary(this.params)
  554. .then(response => {
  555. this.bindId = response.data
  556. setTimeout(() => {
  557. this.isRegisterStep = false
  558. this.GetClubUserInfo(this.bindId)
  559. }, 2000)
  560. })
  561. .catch(error => {
  562. this.$util.msg(error.msg, 2000)
  563. })
  564. },
  565. GetClubUserInfo(id) {
  566. this.UserService.UseRregisterTemporaryInfo({ id: id })
  567. .then(response => {
  568. this.clubInfo = response.data
  569. this.isSubLoading = false
  570. this.showMainProductList = this.setNewMainpro(this.clubInfo.mainProduct)
  571. })
  572. .catch(error => {
  573. this.isSubLoading = false
  574. this.$util.msg(error.msg, 2000)
  575. })
  576. },
  577. ShareRegister() {
  578. //点击分享
  579. this.isShareModal = true
  580. },
  581. agreeCheck() {
  582. //勾选协议
  583. this.isCheck = !this.isCheck
  584. if (this.isCheck) {
  585. this.params.isAgreed = 1
  586. } else {
  587. this.params.isAgreed = 0
  588. }
  589. },
  590. showMulLinkageThreePicker() {
  591. //三级地址联动
  592. this.isShowInput = true
  593. this.$refs.CityPicker.show()
  594. },
  595. showTextareaFocus() {
  596. //文本框获取焦点
  597. this.isShowInput = false
  598. this.textareaFocus = true
  599. },
  600. hideTextareaFocus() {
  601. //文本框失去焦点
  602. this.isShowInput = true
  603. this.textareaFocus = false
  604. },
  605. onTextareaInput(e) {
  606. //地址详细信息
  607. this.params.address = e.detail.value
  608. },
  609. onConfirm(e) {
  610. //获取选择的地址信息
  611. console.log('地址', e)
  612. this.addressText = e.name
  613. this.params.townId = e.townCode
  614. this.params.cityId = e.cityCode
  615. this.params.provinceId = e.provinceCode
  616. },
  617. UploadPicture(NUM) {
  618. //图片上传
  619. uploadFileImage().then(res => {
  620. switch (NUM) {
  621. case 1:
  622. this.params.businessLicense = JSON.parse(res.data).data
  623. break
  624. case 2:
  625. this.params.shopPhoto = JSON.parse(res.data).data
  626. break
  627. case 3:
  628. this.params.medicalPracticeLicense = JSON.parse(res.data).data
  629. break
  630. }
  631. })
  632. },
  633. DeletePicture(NUM) {
  634. //删除照片
  635. switch (NUM) {
  636. case 1:
  637. this.$util.modal('', '确定删除营业执照图片吗?', '确定', '取消', true, () => {
  638. this.params.businessLicense = ''
  639. })
  640. break
  641. case 2:
  642. this.$util.modal('', '确定删除门头照图片吗?', '确定', '取消', true, () => {
  643. this.params.shopPhoto = ''
  644. })
  645. break
  646. case 3:
  647. this.$util.modal('', '确定删除资质图片吗?', '确定', '取消', true, () => {
  648. this.params.medicalPracticeLicense = ''
  649. })
  650. break
  651. }
  652. },
  653. ShowPreviewImage(NUM) {
  654. //预览照片
  655. switch (NUM) {
  656. case 1:
  657. this.myPreviewImageFn(this.businessLicense)
  658. break
  659. case 2:
  660. this.myPreviewImageFn(this.shopPhoto)
  661. break
  662. case 3:
  663. this.myPreviewImageFn(this.medicalPracticeLicense)
  664. break
  665. }
  666. },
  667. myPreviewImageFn(url) {
  668. //预览证件照
  669. this.isPreviewImage = true
  670. let mentuzArray = []
  671. mentuzArray.push(url)
  672. uni.previewImage({
  673. urls: mentuzArray,
  674. current: 0
  675. })
  676. },
  677. setNewMainpro(arr) {
  678. //回显处理主营内容
  679. let _ARRAY = []
  680. arr.split('/').forEach((item, index) => {
  681. let _OBJ = { value: (index + 1).toString(), name: item, checked: true }
  682. _ARRAY.push(_OBJ)
  683. })
  684. return _ARRAY
  685. },
  686. bindPickerChange(e) {
  687. //选择机构类型
  688. this.params.firstClubType = Number(e.target.value)
  689. },
  690. radioChange(item) {
  691. //选择
  692. this.params.secondClubType = item.value
  693. if (this.params.secondClubType == 2 || this.params.secondClubType == 3) {
  694. this.isDepartment = true
  695. } else {
  696. this.isDepartment = false
  697. }
  698. for (let i = 0; i < this.beautyList.length; i++) {
  699. if (this.beautyList[i].value === this.params.secondClubType) {
  700. break
  701. }
  702. }
  703. },
  704. ChooseMaleLike(e) {
  705. switch (this.params.firstClubType) {
  706. case 1:
  707. this.params.mainProduct = this.CheckLikes(e, this.mentuzCampList)
  708. break
  709. case 2:
  710. this.params.mainProduct = this.CheckLikes(e, this.medicaCampList)
  711. break
  712. }
  713. },
  714. CheckLikes(e, list) {
  715. let values = e.detail.value
  716. let arr = []
  717. list.forEach(item => {
  718. if (values.indexOf(item.value) >= 0) {
  719. this.$set(item, 'checked', true)
  720. arr.push(item.name)
  721. } else {
  722. this.$set(item, 'checked', false)
  723. }
  724. })
  725. return arr.join('/')
  726. },
  727. addCustomItem() {
  728. if (this.customItemValue == '') {
  729. this.$util.msg('请输入自定义主营内容', 2000)
  730. } else {
  731. if (this.params.firstClubType == 1) {
  732. let item = { value: `${this.mentuzCampList.length + 1}`, name: this.customItemValue, checked: true }
  733. if (this.CheckedArray(this.customItemValue, this.mentuzCampList)) {
  734. this.$util.msg('主营内容已存在!', 2000)
  735. } else {
  736. this.mentuzCampList.push(item)
  737. }
  738. } else {
  739. let item = { value: `${this.medicaCampList.length + 1}`, name: this.customItemValue, checked: true }
  740. if (this.CheckedArray(this.customItemValue, this.medicaCampList)) {
  741. this.$util.msg('主营内容已存在!', 2000)
  742. } else {
  743. this.medicaCampList.push(item)
  744. }
  745. }
  746. }
  747. },
  748. CheckedArray(content, arr) {
  749. //判断主营内容是否已存在
  750. console.log(content, arr)
  751. for (var i in arr) {
  752. if (arr[i].name == content) {
  753. return true
  754. }
  755. }
  756. return false
  757. }
  758. },
  759. onShareAppMessage(res) {
  760. //分享转发
  761. this.isShareModal = false
  762. if (res.from === 'button') {
  763. // 来自页面内转发按钮
  764. }
  765. return {
  766. title: '请确认资料完成注册~',
  767. path: `/pages/login/binding?bindId=${this.bindId}&Identity=2`,
  768. imageUrl: 'https://static.caimei365.com/app/img/icon/icon-addShare@3x.png'
  769. }
  770. },
  771. onShow() {}
  772. }
  773. </script>
  774. <style lang="scss">
  775. page {
  776. height: auto;
  777. }
  778. .register {
  779. width: 100%;
  780. position: relative;
  781. box-sizing: border-box;
  782. padding-bottom: 332rpx;
  783. .register-main {
  784. width: 100%;
  785. height: auto;
  786. box-sizing: border-box;
  787. padding: 0 24rpx;
  788. margin-top: 24rpx;
  789. .main-form-item {
  790. width: 100%;
  791. height: 88rpx;
  792. box-sizing: border-box;
  793. padding: 13rpx 0;
  794. border-bottom: 1px solid #e1e1e1;
  795. margin-top: 10rpx;
  796. position: relative;
  797. &.none {
  798. border-bottom: none;
  799. height: auto;
  800. }
  801. &.file {
  802. height: 273rpx;
  803. border-bottom: none;
  804. .main-form-upload {
  805. width: 50%;
  806. height: 100%;
  807. float: left;
  808. .label {
  809. width: 100%;
  810. float: left;
  811. height: 56rpx;
  812. line-height: 56rpx;
  813. font-size: $font-size-28;
  814. text-align: left;
  815. color: #999999;
  816. }
  817. .upload-picture {
  818. width: 100%;
  819. height: 180rpx;
  820. float: left;
  821. margin-top: 17rpx;
  822. .upload-none {
  823. width: 200rpx;
  824. height: 180rpx;
  825. border-radius: 6rpx;
  826. border: 1px solid #e1e1e1;
  827. box-sizing: border-box;
  828. padding-top: 64rpx;
  829. .icon-jiahao {
  830. display: inline-block;
  831. width: 100%;
  832. text-align: center;
  833. line-height: 48rpx;
  834. font-size: 40rpx;
  835. color: #b2b2b2;
  836. }
  837. .upload-text {
  838. display: inline-block;
  839. width: 100%;
  840. text-align: center;
  841. line-height: 40rpx;
  842. font-size: $font-size-24;
  843. color: #b2b2b2;
  844. }
  845. }
  846. .upload-image {
  847. width: 200rpx;
  848. height: 180rpx;
  849. border-radius: 6rpx;
  850. border: 1px solid #e1e1e1;
  851. box-sizing: border-box;
  852. position: relative;
  853. image {
  854. width: 200rpx;
  855. height: 180rpx;
  856. display: block;
  857. }
  858. .upload-del {
  859. width: 40rpx;
  860. height: 40rpx;
  861. position: absolute;
  862. top: -20rpx;
  863. right: -20rpx;
  864. line-height: 40rpx;
  865. text-align: center;
  866. .iconfont {
  867. font-size: $font-size-32;
  868. color: #999999;
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. &.picker {
  876. border-bottom: none;
  877. .label-radio {
  878. margin-left: 30rpx;
  879. font-size: $font-size-28;
  880. float: left;
  881. }
  882. .row-radio {
  883. float: left;
  884. transform: scale(0.7);
  885. }
  886. .row-text {
  887. text-align: center;
  888. float: left;
  889. font-size: $font-size-28;
  890. }
  891. .picker-radio {
  892. box-sizing: border-box;
  893. padding-left: 170rpx;
  894. .secondTyperadio {
  895. border: 2rpx solid #e1e1e1;
  896. display: inline-block;
  897. font-size: 26rpx;
  898. color: #999999;
  899. padding: 0 24rpx;
  900. border-radius: 22rpx;
  901. line-height: 42rpx;
  902. margin-right: 28rpx;
  903. float: left;
  904. &.active {
  905. border: 2rpx solid #ffe6dc;
  906. color: $color-system;
  907. }
  908. }
  909. }
  910. }
  911. &.textarea {
  912. height: 142rpx;
  913. .textarea {
  914. width: 100%;
  915. height: 142rpx;
  916. box-sizing: border-box;
  917. font-size: $font-size-28;
  918. color: $text-color;
  919. z-index: 1;
  920. }
  921. .textarea.hide {
  922. opacity: 0;
  923. }
  924. .textarea.show {
  925. color: #999999;
  926. }
  927. }
  928. .textarea-ke {
  929. width: 100%;
  930. height: 160rpx;
  931. border-radius: 6rpx;
  932. border: 1px solid #e1e1e1;
  933. font-size: $font-size-28;
  934. box-sizing: border-box;
  935. padding: 15rpx 20rpx;
  936. }
  937. .form-textarea {
  938. font-size: $font-size-28;
  939. color: #333333;
  940. }
  941. .form-label {
  942. width: 148rpx;
  943. float: left;
  944. height: 100%;
  945. line-height: 56rpx;
  946. font-size: $font-size-28;
  947. text-align: left;
  948. color: #999999;
  949. &.lang {
  950. width: 188rpx;
  951. }
  952. &.none {
  953. width: 100%;
  954. }
  955. }
  956. .form-input {
  957. width: 554rpx;
  958. height: 56rpx;
  959. line-height: 56rpx;
  960. font-size: $font-size-28;
  961. text-align: left;
  962. color: #333333;
  963. float: left;
  964. &.lang {
  965. width: 514rpx;
  966. }
  967. &.phone {
  968. width: 418rpx;
  969. }
  970. &.none {
  971. color: #999999;
  972. }
  973. }
  974. .form-text {
  975. width: 554rpx;
  976. height: 56rpx;
  977. line-height: 56rpx;
  978. font-size: $font-size-28;
  979. text-align: left;
  980. color: #333333;
  981. float: left;
  982. }
  983. .form-btn {
  984. width: 136rpx;
  985. height: 56rpx;
  986. background: $btn-confirm;
  987. color: #ffffff;
  988. font-size: $font-size-28;
  989. text-align: center;
  990. border-radius: 28rpx;
  991. line-height: 56rpx;
  992. float: left;
  993. }
  994. .icon-xiayibu {
  995. width: 80rpx;
  996. height: 80rpx;
  997. position: absolute;
  998. right: 0;
  999. top: 0;
  1000. line-height: 80rpx;
  1001. text-align: center;
  1002. color: #b2b2b2;
  1003. }
  1004. .form-checkbox-group {
  1005. width: 100%;
  1006. display: flex;
  1007. flex-flow: row wrap;
  1008. justify-content: space-between;
  1009. align-items: center;
  1010. &.btn {
  1011. margin: 0 auto;
  1012. margin-left: 116rpx;
  1013. }
  1014. .row-input {
  1015. display: flex;
  1016. width: 220rpx;
  1017. height: 40rpx;
  1018. padding: 24rpx;
  1019. text-align: left;
  1020. border-radius: 10rpx;
  1021. font-size: $font-size-28;
  1022. color: $text-color;
  1023. }
  1024. .confirm-btn {
  1025. width: 160rpx;
  1026. height: 64rpx;
  1027. border-radius: 45rpx;
  1028. line-height: 64rpx;
  1029. text-align: center;
  1030. background: #ffe6dc;
  1031. color: $color-system;
  1032. &.other {
  1033. width: 213rpx;
  1034. }
  1035. }
  1036. .item {
  1037. height: 60rpx;
  1038. font-size: $font-size-28;
  1039. line-height: 60rpx;
  1040. border-radius: 10rpx;
  1041. margin-right: 20rpx;
  1042. margin-bottom: 10rpx;
  1043. box-sizing: border-box;
  1044. float: left;
  1045. }
  1046. .item-text {
  1047. display: inline-block;
  1048. font-size: 26rpx;
  1049. color: #999999;
  1050. border-radius: 28rpx;
  1051. line-height: 50rpx;
  1052. }
  1053. .on {
  1054. .item-text {
  1055. border-color: $color-system;
  1056. color: $color-system;
  1057. }
  1058. }
  1059. .form-table-item {
  1060. height: 48rpx;
  1061. padding: 0 32rpx;
  1062. border: 1px solid #b2b2b2;
  1063. text-align: center;
  1064. font-size: $font-size-28;
  1065. color: #333333;
  1066. float: left;
  1067. line-height: 48rpx;
  1068. border-radius: 26rpx;
  1069. margin-right: 12rpx;
  1070. margin-top: 20rpx;
  1071. }
  1072. }
  1073. .form-checkbox-input {
  1074. width: 100%;
  1075. height: 64rpx;
  1076. margin-top: 20rpx;
  1077. .checkbox-input {
  1078. width: 518rpx;
  1079. height: 64rpx;
  1080. box-sizing: border-box;
  1081. text-align: left;
  1082. font-size: $font-size-26;
  1083. color: #333333;
  1084. line-height: 64rpx;
  1085. float: left;
  1086. border: 1px solid #e1e1e1;
  1087. border-radius: 32rpx;
  1088. padding: 0 20rpx;
  1089. }
  1090. .checkbox-btn {
  1091. width: 160rpx;
  1092. height: 64rpx;
  1093. border-radius: 32rpx;
  1094. background-color: #ffe6dc;
  1095. line-height: 64rpx;
  1096. text-align: center;
  1097. color: #e15616;
  1098. font-size: $font-size-28;
  1099. float: right;
  1100. }
  1101. }
  1102. }
  1103. .register-fiexd {
  1104. width: 100%;
  1105. height: auto;
  1106. padding: 20rpx 0;
  1107. position: fixed;
  1108. bottom: 0;
  1109. left: 0;
  1110. z-index: 888;
  1111. background: #ffffff;
  1112. .register-agree {
  1113. display: flex;
  1114. flex-direction: column;
  1115. align-items: center;
  1116. margin: 0 0 32rpx 0;
  1117. .agree-text {
  1118. .checkbox {
  1119. float: left;
  1120. margin: 4rpx 6rpx 0 0;
  1121. color: #999999;
  1122. font-size: $font-size-32;
  1123. &.icon-gouxuan {
  1124. color: $color-system;
  1125. }
  1126. }
  1127. font-size: 20rpx;
  1128. line-height: 44rpx;
  1129. color: #999999;
  1130. text {
  1131. color: #0091ff;
  1132. }
  1133. }
  1134. }
  1135. }
  1136. .register-btn {
  1137. width: 702rpx;
  1138. height: 88rpx;
  1139. border-radius: 44rpx;
  1140. font-size: $font-size-28;
  1141. line-height: 88rpx;
  1142. color: #ffffff;
  1143. margin: 0 auto;
  1144. text-align: center;
  1145. background: $btn-confirm;
  1146. margin-top: 96rpx;
  1147. &.none {
  1148. background: #ffffff;
  1149. color: $text-color;
  1150. margin-top: 0;
  1151. }
  1152. &.sub {
  1153. margin-top: 0;
  1154. }
  1155. }
  1156. }
  1157. }
  1158. </style>