register.vue 32 KB

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