register-member.vue 30 KB

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