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. emailCodeText: '获取验证码',
  326. mobileCodeText: '获取验证码',
  327. codeTime: null,
  328. registerEmail:'', //注册邮箱
  329. regEmailCode:'', //邮箱验证码
  330. password:'', //密码
  331. passwordCheck:'', //校验密码
  332. clubName:'', //机构名称
  333. abbreviation:'', //机构简称
  334. clubContact:'', //联系人
  335. registerMobile:'', //联系人手机号
  336. mobileCode:'', //手机验证码
  337. imageCode:'', //图形验证码
  338. imageCodeUrl:'', //图形验证码图片
  339. imageCodetoken:'', //图形验证校验
  340. socialCreditCode:'', //统一社会信用代码
  341. isAgreed:0, //是否勾选协议
  342. isDisabled:true,
  343. isShowInput:false,
  344. isCheck:false, //是否勾选协议
  345. uploadBusinessImage:'', //营业执照图片
  346. uploadMentuzImage:'', //门头照图片
  347. uploadMedicalImage:'', //资质照图片
  348. department:'', //科室
  349. isDepartment:false, //是否显示科室
  350. secondClubType:'', //机构类型二级分类
  351. mainpro:'', //主营内容
  352. isOrganizationType:0,
  353. organizationTypeText:'请选择机构类型',
  354. beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
  355. mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
  356. medicaCampList:[
  357. {value:'1',name:'美容'},
  358. {value:'2',name:'美体'},
  359. {value:'3',name:'美发'},
  360. {value:'4',name:'皮肤管理'},
  361. {value:'5',name:'光电'},
  362. {value:'6',name:'综合类'},
  363. {value:'7',name:'中医养生'},
  364. {value:'8',name:'spa'}
  365. ],
  366. typtIndex:0,
  367. organizationType:3,
  368. current:0,
  369. isShowAustomItem:false, //是否显示其他添加
  370. customItemValue:'', //自定义项目
  371. addressData:{
  372. address:'请选择机构所在地区',
  373. townID:'', //区ID
  374. cityID:'', //区ID
  375. provinceID:'', //区ID
  376. addressDetail: '', //地址
  377. },
  378. }
  379. },
  380. onLoad(option) {
  381. console.log(option)
  382. },
  383. methods:{
  384. hanldNavigateBack(){
  385. this.$util.modal('','注册尚未完成,确定放弃注册吗?','确定','取消',true,() =>{
  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. })
  421. },
  422. registerStepsSub(){
  423. if(!this.isCheck){
  424. this.$util.msg('请勾选同意协议',2000);
  425. return
  426. }
  427. let params ={
  428. email:this.registerEmail,
  429. mailboxCode:this.regEmailCode,
  430. password:this.password,
  431. passWordConfirm:this.passwordCheck,
  432. name:this.clubName,
  433. linkMan:this.clubContact,
  434. bindMobile:this.registerMobile,
  435. activationCode:this.mobileCode,
  436. sname:this.abbreviation,
  437. provinceID:this.addressData.provinceID,
  438. cityID:this.addressData.cityID,
  439. townID:this.addressData.townID,
  440. address:this.addressData.addressDetail,
  441. socialCreditCode:this.socialCreditCode,
  442. businessLicenseImage:this.uploadBusinessImage,
  443. headpic:this.uploadMentuzImage,
  444. firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
  445. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  446. department:this.department, //科室
  447. medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
  448. isAgreed:this.isAgreed, //是否勾选协议
  449. mainpro:this.mainpro,
  450. whichStep:3
  451. }
  452. organizationRegister(params).then(res =>{
  453. this.$util.msg('您的机构账号已提交审核',2000);
  454. this.$api.switchTabTo('/pages/tabBar/home/home')
  455. }).catch(res =>{
  456. this.$util.msg(res.msg,2000);
  457. })
  458. },
  459. getEmailCodeFn(){
  460. if( this.registerEmail == ''){
  461. this.$util.msg('请输入邮箱地址',2000);
  462. return
  463. }
  464. if(!this.$reg.isEmail(this.registerEmail)){
  465. this.$util.msg('请输入正确的邮箱地址',2000);
  466. return
  467. }
  468. this.isEmialDisabled = true;
  469. getEmailCode({email:this.registerEmail,status:2}).then(res =>{
  470. this.$util.msg('邮箱验证码已发送',2000);
  471. const TIME_COUNT = 60;
  472. if (!this.codeTime) {
  473. this.count = TIME_COUNT;
  474. this.isEmialDisabled = true;
  475. this.codeTime = setInterval(() => {
  476. if (this.count > 1 && this.count <= TIME_COUNT) {
  477. this.count--
  478. this.emailCodeText = this.count +'s重新发送'
  479. } else {
  480. clearInterval(this.codeTime)
  481. this.codeTime = null
  482. this.emailCodeText = '获取验证码'
  483. this.isEmialDisabled = false;
  484. }
  485. },1000)
  486. }
  487. }).catch( res =>{
  488. this.$util.msg(res.msg,2000);
  489. this.isEmialDisabled = false;
  490. })
  491. },
  492. getMobileCodeFn(){
  493. if( this.registerMobile == ''){
  494. this.$util.msg('请输入手机号',2000);
  495. return
  496. }
  497. if(!this.$reg.isMobile(this.registerMobile)){
  498. this.$util.msg('请输入正确的手机号',2000);
  499. return
  500. }
  501. if( this.imageCode == ''){
  502. this.$util.msg('请输入图形验证码',2000);
  503. return
  504. }
  505. let params = {
  506. mobile:this.registerMobile,
  507. activateCodeType:2,
  508. platformType:2,
  509. imgCode:this.imageCode,
  510. token:this.imageCodetoken,
  511. }
  512. this.isMobileDisabled = true;
  513. getMobileCode(params).then(res =>{
  514. this.$util.msg('验证短信已发送',2000);
  515. const TIME_COUNT = 60;
  516. if (!this.codeTime) {
  517. this.count = TIME_COUNT;
  518. this.isMobileDisabled = true;
  519. this.codeTime = setInterval(() => {
  520. if (this.count > 1 && this.count <= TIME_COUNT) {
  521. this.count--
  522. this.mobileCodeText = this.count +'s重新发送'
  523. } else {
  524. this.isMobileDisabled = false;
  525. clearInterval(this.codeTime)
  526. this.codeTime = null
  527. this.mobileCodeText = '获取验证码'
  528. }
  529. },1000)
  530. }
  531. }).catch( res =>{
  532. this.$util.msg(res.msg,2000);
  533. this.isEmialDisabled = false;
  534. })
  535. },
  536. getVerificationCode(){//获取图形验证
  537. getImageCode().then(res => {
  538. this.imageCodeUrl = res.data.baseImage
  539. this.imageCodetoken = res.data.token
  540. })
  541. },
  542. showMulLinkageThreePicker() {//三级地址联动
  543. this.isShowInput = true
  544. this.$refs.mpvueCityPicker.show()
  545. },
  546. onConfirm(e) {//获取选择的地址信息
  547. console.log('地址',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. console.log('picker携带值为:' + e.target.value)
  624. this.typtIndex = e.target.value
  625. this.isOrganizationType = e.target.value
  626. },
  627. radioChange(e) {
  628. this.secondClubType = e.target.value;
  629. if( this.secondClubType == '2' || this.secondClubType == '3'){
  630. this.isDepartment = true
  631. }else{
  632. this.isDepartment = false
  633. }
  634. for (let i = 0; i < this.beautyList.length; i++) {
  635. if (this.beautyList[i].value === this.secondClubType) {
  636. this.current = i;
  637. break;
  638. }
  639. }
  640. },
  641. chooseMaleLike(e){
  642. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  643. console.log(this.mainpro)
  644. },
  645. chooseMaleLikes(e){
  646. this.mainpro = this.checkLikes(e,this.medicaCampList)
  647. console.log(this.mainpro)
  648. },
  649. checkLikes(e,list){
  650. let items = list
  651. let values = e.detail.value
  652. let arr = []
  653. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  654. const item = items[i]
  655. if(values.indexOf(item.value) >= 0){
  656. this.$set(item,'checked',true)
  657. arr.push(item.name)
  658. }else{
  659. this.$set(item,'checked',false)
  660. }
  661. }
  662. return arr.toString()
  663. },
  664. agreeCheck() {
  665. this.isCheck = !this.isCheck
  666. if(this.isCheck){
  667. this.isAgreed = 1
  668. }
  669. },
  670. onBlurInput(e){//
  671. if(e.detail.value ===''){
  672. this.isDisabled = true
  673. }else{
  674. this.isDisabled = false
  675. }
  676. },
  677. showAustomItem() {
  678. this.isShowAustomItem = !this.isShowAustomItem
  679. },
  680. addCustomItem(){
  681. if(this.isOrganizationType == 1){
  682. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
  683. this.mentuzCampList.push(item)
  684. }else{
  685. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
  686. this.medicaCampList.push(item)
  687. }
  688. },
  689. steps(index) {//$attrstab切换
  690. console.log(index)
  691. this.tabCurrentIndex = index;
  692. }
  693. },
  694. onShow() {
  695. if(this.isPreviewImage){
  696. this.isPreviewImage = false
  697. return
  698. }
  699. }
  700. }
  701. </script>
  702. <style lang="scss">
  703. .register{
  704. width: 100%;
  705. height: auto;
  706. .model-warp.none{
  707. display: none;
  708. }
  709. .model-warp.show{
  710. display: block;
  711. }
  712. .register-tab{
  713. width: 570rpx;
  714. height: 60rpx;
  715. padding: 60rpx 90rpx;
  716. position: relative;
  717. .nav-item{
  718. width: 142rpx;
  719. background: #FFFFFF;
  720. line-height: 60rpx;
  721. border-radius: 30rpx;
  722. text-align: center;
  723. color: #999999;
  724. font-size:$font-size-26;
  725. float: left;
  726. margin-right: 72rpx;
  727. position: relative;
  728. .line{
  729. height: 3rpx;
  730. width: 50rpx;
  731. background: #999999;
  732. position: absolute;
  733. right: -58rpx;
  734. top: 32rpx;
  735. }
  736. &:last-child{
  737. margin-right: 0;
  738. }
  739. &.current{
  740. color:#FFFFFF;
  741. background: $btn-confirm;
  742. }
  743. }
  744. }
  745. .register-main{
  746. width: 100%;
  747. height: auto;
  748. &.detailed{
  749. padding-bottom: 330rpx;
  750. }
  751. .register-tips{
  752. display: flex;
  753. flex-direction: column;
  754. align-items: center;
  755. line-height: 44rpx;
  756. font-size: $font-size-24;
  757. color: #FF0000;
  758. margin-bottom: 40rpx;
  759. .iconfont{
  760. font-size: $font-size-24;
  761. }
  762. }
  763. .register-row{
  764. width: 702rpx;
  765. height: auto;
  766. padding: 0 24rpx;
  767. margin-bottom: 20rpx;
  768. .register-text{
  769. line-height: 44rpx;
  770. margin-top: 100rpx;
  771. font-size: $font-size-24;
  772. color: #999999;
  773. text-align: justify;
  774. .txt{
  775. margin-right: 15rpx;
  776. }
  777. }
  778. .register-from{
  779. width: 654rpx;
  780. height: 40rpx;
  781. padding: 24rpx;
  782. background: $sub-bg-color;
  783. border-radius: 14rpx;
  784. position: relative;
  785. .label{
  786. text-align: left;
  787. font-size: $font-size-28;
  788. color: $text-color;
  789. line-height: 40rpx;
  790. float: left;
  791. }
  792. .row-input{
  793. width: 440rpx;
  794. padding-left:10rpx;
  795. font-size: $font-size-28;
  796. color: $text-color;
  797. line-height: 40rpx;
  798. float: left;
  799. height: 40rpx;
  800. &.none{
  801. color: #999999;
  802. }
  803. &.picker{
  804. text-align: left;
  805. color: #999999;
  806. }
  807. &.keshi{
  808. width: 550rpx;
  809. }
  810. }
  811. &.img-btn{
  812. width: 220rpx;
  813. height: 88rpx;
  814. padding: 0;
  815. float: left;
  816. background: #FFFFFF;
  817. display: block;
  818. .vscodeimg{
  819. width: 150rpx;
  820. height: 88rpx;
  821. float: left;
  822. display: flex;
  823. flex-direction: column;
  824. align-items: center;
  825. border-radius: 14rpx;
  826. image{
  827. width: 150rpx;
  828. height: 88rpx;
  829. border-radius: 14rpx;
  830. }
  831. }
  832. .vscod-refresh{
  833. width: 70rpx;
  834. float: right;
  835. text-align: right;
  836. display: flex;
  837. flex-direction: column;
  838. align-items: center;
  839. line-height: 44rpx;
  840. .icon-shuaxin{
  841. font-size: 48rpx;
  842. color: #333333;
  843. }
  844. .ref-text{
  845. font-size: 24rpx;
  846. color: #333333;
  847. }
  848. }
  849. }
  850. &.imgcode{
  851. width: 410rpx;
  852. float: left;
  853. margin-right: 20rpx;
  854. .row-input{
  855. width: 230rpx;
  856. }
  857. }
  858. &.code{
  859. width: 410rpx;
  860. float: left;
  861. margin-right: 20rpx;
  862. .row-input{
  863. width: 230rpx;
  864. }
  865. }
  866. &.btn{
  867. width: 224rpx;
  868. height: 88rpx;
  869. float: left;
  870. background: $btn-confirm;
  871. padding: 0;
  872. .row-input{
  873. width: 224rpx;
  874. height: 88rpx;
  875. line-height: 88rpx;
  876. padding: 0;
  877. color: #FFFFFF;
  878. background: $btn-confirm;
  879. text-align: center;
  880. border-radius: 14rpx;
  881. &.other{
  882. width: 224rpx;
  883. background: #F7F7F7;
  884. margin-right: 20rpx;
  885. }
  886. &.none{
  887. background: #F7F7F7;
  888. }
  889. }
  890. &.disabled{
  891. background: #F7F7F7;
  892. .row-input{
  893. background: #F7F7F7;
  894. color: #999999;
  895. }
  896. }
  897. }
  898. &.picker{
  899. padding: 0 24rpx;
  900. width: 654rpx;
  901. height: 88rpx;
  902. line-height: 88rpx;
  903. .label{
  904. line-height: 88rpx;
  905. }
  906. .row-input{
  907. width: 470rpx;
  908. height: 88rpx;
  909. line-height: 88rpx;
  910. padding-left: 30rpx;
  911. }
  912. }
  913. &.radio{
  914. padding: 0 24rpx;
  915. width: 654rpx;
  916. height: 288rpx;
  917. .row-input{
  918. width: 100%;
  919. height: 88rpx;
  920. line-height: 88rpx;
  921. padding-left: 0;
  922. }
  923. .row-radio{
  924. float: left;
  925. transform: scale(0.8);
  926. }
  927. .row-text{
  928. width: 100rpx;
  929. text-align: center;
  930. float: left;
  931. }
  932. }
  933. &.group{
  934. padding: 0 24rpx;
  935. width: 654rpx;
  936. height: auto;
  937. background: #FFFFFF;
  938. margin-top: 30rpx;
  939. .row-input{
  940. width: 100%;
  941. height: 88rpx;
  942. line-height: 88rpx;
  943. padding-left: 0;
  944. }
  945. .row-radio{
  946. float: left;
  947. }
  948. .row-text{
  949. width: 100rpx;
  950. text-align: center;
  951. float: left;
  952. }
  953. }
  954. &.btn{
  955. margin-top: 0;
  956. }
  957. .content-class {
  958. width: 520rpx;
  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>