register.vue 34 KB

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