register.vue 34 KB

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