register.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  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. .label{
  940. line-height: 76rpx;
  941. }
  942. .row-input{
  943. width: 100%;
  944. height: 88rpx;
  945. line-height: 88rpx;
  946. padding-left: 0;
  947. }
  948. .row-radio{
  949. float: left;
  950. }
  951. .row-text{
  952. width: 100rpx;
  953. text-align: center;
  954. float: left;
  955. }
  956. }
  957. &.btn{
  958. margin-top: 0;
  959. }
  960. .content-class {
  961. margin: 20rpx auto;
  962. display: flex;
  963. flex-flow: row wrap;
  964. justify-content: space-between;
  965. align-items: center;
  966. &.btn{
  967. margin: 0 auto;
  968. margin-left: 126rpx;
  969. }
  970. .row-input{
  971. display: flex;
  972. width: 220rpx;
  973. height: 40rpx;
  974. padding: 24rpx;
  975. text-align: left;
  976. border-radius: 10rpx;
  977. font-size: $font-size-28;
  978. color: $text-color;
  979. }
  980. .confirm-btn{
  981. width: 200rpx;
  982. height: 88rpx;
  983. border-radius: 10rpx;
  984. line-height: 88rpx;
  985. text-align: center;
  986. &.other{
  987. width: 213rpx;
  988. }
  989. &.none{
  990. color: #FFFFFF;
  991. background: $btn-confirm;
  992. }
  993. &.disabled{
  994. color: #999999;
  995. }
  996. }
  997. .item {
  998. width: 155rpx;
  999. height: 60rpx;
  1000. font-size:$font-size-28;
  1001. line-height: 60rpx;
  1002. border-radius:10rpx;
  1003. margin: 10rpx;
  1004. text-align: center;
  1005. box-sizing: border-box;
  1006. border: 1rpx solid #EFEFEF;
  1007. checkbox {
  1008. display: none;
  1009. }
  1010. }
  1011. .on {
  1012. border-color: $color-system;
  1013. color:$color-system;
  1014. }
  1015. }
  1016. }
  1017. .icon-xiayibu{
  1018. width: 88rpx;
  1019. height: 88rpx;
  1020. position: absolute;
  1021. right: 0;
  1022. top: 0;
  1023. line-height: 88rpx;
  1024. text-align: center;
  1025. }
  1026. &.text-textarea{
  1027. background: #FFFFFF;
  1028. .textarea{
  1029. width: 654rpx;
  1030. height: 180rpx;
  1031. background: #F7F7F7;
  1032. padding: 24rpx;
  1033. font-size: $font-size-28;
  1034. color: $text-color;
  1035. z-index: 1;
  1036. border-radius: 14rpx;
  1037. }
  1038. .textarea.hide{
  1039. opacity: 0;
  1040. }
  1041. .textarea.show{
  1042. color: #999999;
  1043. }
  1044. }
  1045. }
  1046. .register-picture{
  1047. height: 102rpx;
  1048. margin: 40rpx 0 0 0;
  1049. .label{
  1050. float: left;
  1051. font-size: $font-size-28;
  1052. color: $text-color;
  1053. line-height: 102rpx;
  1054. width: 150rpx;
  1055. text-align: right;
  1056. &.zz{
  1057. width: 230rpx;
  1058. }
  1059. }
  1060. .upload-picture{
  1061. float: left;
  1062. height: 100rpx;
  1063. .upload-none{
  1064. width: 100rpx;
  1065. height: 100rpx;
  1066. text-align: center;
  1067. line-height: 100rpx;
  1068. color: #999999;
  1069. border: 1px solid #999999;
  1070. border-radius: 10rpx;
  1071. margin: 0 20rpx;
  1072. .iconfont{
  1073. font-size: $font-size-28;
  1074. }
  1075. }
  1076. .upload-image{
  1077. width: 100rpx;
  1078. height: 100rpx;
  1079. border-radius: 10rpx;
  1080. margin: 0 20rpx;
  1081. position: relative;
  1082. image{
  1083. width: 100rpx;
  1084. height: 100rpx;
  1085. border-radius: 10rpx;
  1086. }
  1087. .upload-del{
  1088. width: 40rpx;
  1089. height: 40rpx;
  1090. position: absolute;
  1091. top: -20rpx;
  1092. right: -20rpx;
  1093. line-height: 40rpx;
  1094. text-align: center;
  1095. .iconfont{
  1096. font-size: $font-size-32;
  1097. color: #999999;
  1098. }
  1099. }
  1100. }
  1101. }
  1102. }
  1103. .register-input{
  1104. width: 654rpx;
  1105. height: 40rpx;
  1106. padding: 24rpx;
  1107. margin: 0 auto;
  1108. margin-bottom: 60rpx;
  1109. background: #F7F7F7;
  1110. border-radius: 14rpx;
  1111. .input{
  1112. width: 100%;
  1113. height: 100%;
  1114. background: #F7F7F7;
  1115. font-size: $font-size-28;
  1116. line-height: 40rpx;
  1117. color: #333333;
  1118. border-radius: 14rpx;
  1119. }
  1120. }
  1121. .register-fiexd{
  1122. width: 100%;
  1123. height: auto;
  1124. position: fixed;
  1125. bottom: 0;
  1126. left: 0;
  1127. z-index: 999;
  1128. background: #FFFFFF;
  1129. .register-agree{
  1130. display: flex;
  1131. flex-direction: column;
  1132. align-items: center;
  1133. margin: 32rpx 0;
  1134. .agree-text{
  1135. .checkbox{
  1136. float: left;
  1137. margin: 4rpx 6rpx 0 0;
  1138. color: #999999;
  1139. font-size: $font-size-32;
  1140. &.icon-gouxuan{
  1141. color: $color-system;
  1142. }
  1143. }
  1144. font-size: 20rpx;
  1145. line-height: 44rpx;
  1146. color: #999999;
  1147. text{
  1148. color:#0091FF;
  1149. }
  1150. }
  1151. }
  1152. }
  1153. .register-btn{
  1154. width: 702rpx;
  1155. height: 88rpx;
  1156. border-radius: 14rpx;
  1157. font-size: $font-size-28;
  1158. line-height: 88rpx;
  1159. color: #FFFFFF;
  1160. margin: 0 auto;
  1161. text-align: center;
  1162. background: $btn-confirm;
  1163. margin-top: 96rpx;
  1164. &.none{
  1165. background: #FFFFFF;
  1166. color: $text-color;
  1167. margin-top: 0;
  1168. }
  1169. &.sub{
  1170. margin-top: 0;
  1171. }
  1172. }
  1173. }
  1174. }
  1175. </style>