register.vue 34 KB

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