register.vue 34 KB

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