register.vue 33 KB

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