register.vue 34 KB

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