register.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  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 == 0" >
  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 == 0">
  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 == 0">
  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 == 1">
  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,
  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:3,
  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:0,
  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
  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 == 0){
  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. &.btn{
  893. margin: 0 auto;
  894. margin-left: 126rpx;
  895. }
  896. .row-input{
  897. display: flex;
  898. width: 220rpx;
  899. height: 40rpx;
  900. padding: 24rpx;
  901. text-align: left;
  902. border-radius: 10rpx;
  903. font-size: $font-size-28;
  904. color: $text-color;
  905. }
  906. .confirm-btn{
  907. width: 200rpx;
  908. height: 88rpx;
  909. border-radius: 10rpx;
  910. line-height: 88rpx;
  911. text-align: center;
  912. &.other{
  913. width: 213rpx;
  914. }
  915. &.none{
  916. color: #FFFFFF;
  917. background: $btn-confirm;
  918. }
  919. &.disabled{
  920. color: #999999;
  921. }
  922. }
  923. .item {
  924. width: 156rpx;
  925. height: 60rpx;
  926. font-size:$font-size-28;
  927. line-height: 60rpx;
  928. border-radius:10rpx;
  929. margin-bottom: 20rpx;
  930. text-align: center;
  931. box-sizing: border-box;
  932. border: 1rpx solid #EFEFEF;
  933. checkbox {
  934. display: none;
  935. }
  936. }
  937. .on {
  938. border-color: $color-system;
  939. color:$color-system;
  940. }
  941. }
  942. }
  943. .icon-xiayibu{
  944. width: 88rpx;
  945. height: 88rpx;
  946. position: absolute;
  947. right: 0;
  948. top: 0;
  949. line-height: 88rpx;
  950. text-align: center;
  951. }
  952. &.text-textarea{
  953. background: #FFFFFF;
  954. .textarea{
  955. width: 654rpx;
  956. height: 180rpx;
  957. background: #F7F7F7;
  958. padding: 24rpx;
  959. font-size: $font-size-28;
  960. color: $text-color;
  961. z-index: 1;
  962. border-radius: 14rpx;
  963. }
  964. .textarea.hide{
  965. opacity: 0;
  966. }
  967. .textarea.show{
  968. color: #999999;
  969. }
  970. }
  971. }
  972. .register-picture{
  973. height: 102rpx;
  974. margin: 40rpx 0 0 0;
  975. .label{
  976. float: left;
  977. font-size: $font-size-28;
  978. color: $text-color;
  979. line-height: 102rpx;
  980. width: 150rpx;
  981. text-align: right;
  982. &.zz{
  983. width: 230rpx;
  984. }
  985. }
  986. .upload-picture{
  987. float: left;
  988. height: 100rpx;
  989. .upload-none{
  990. width: 100rpx;
  991. height: 100rpx;
  992. text-align: center;
  993. line-height: 100rpx;
  994. color: #999999;
  995. border: 1px solid #999999;
  996. border-radius: 10rpx;
  997. margin: 0 20rpx;
  998. .iconfont{
  999. font-size: $font-size-28;
  1000. }
  1001. }
  1002. .upload-image{
  1003. width: 100rpx;
  1004. height: 100rpx;
  1005. border-radius: 10rpx;
  1006. margin: 0 20rpx;
  1007. position: relative;
  1008. image{
  1009. width: 100rpx;
  1010. height: 100rpx;
  1011. border-radius: 10rpx;
  1012. }
  1013. .upload-del{
  1014. width: 40rpx;
  1015. height: 40rpx;
  1016. position: absolute;
  1017. top: -20rpx;
  1018. right: -20rpx;
  1019. line-height: 40rpx;
  1020. text-align: center;
  1021. .iconfont{
  1022. font-size: $font-size-32;
  1023. color: #999999;
  1024. }
  1025. }
  1026. }
  1027. }
  1028. }
  1029. .register-input{
  1030. width: 654rpx;
  1031. height: 40rpx;
  1032. padding: 24rpx;
  1033. margin: 0 auto;
  1034. margin-bottom: 60rpx;
  1035. background: #F7F7F7;
  1036. border-radius: 14rpx;
  1037. .input{
  1038. width: 100%;
  1039. height: 100%;
  1040. background: #F7F7F7;
  1041. font-size: $font-size-28;
  1042. line-height: 40rpx;
  1043. color: #333333;
  1044. border-radius: 14rpx;
  1045. }
  1046. }
  1047. .register-fiexd{
  1048. width: 100%;
  1049. height: auto;
  1050. position: fixed;
  1051. bottom: 0;
  1052. left: 0;
  1053. z-index: 999;
  1054. background: #FFFFFF;
  1055. .register-agree{
  1056. display: flex;
  1057. flex-direction: column;
  1058. align-items: center;
  1059. margin: 32rpx 0;
  1060. .agree-text{
  1061. .checkbox{
  1062. float: left;
  1063. margin: 4rpx 6rpx 0 0;
  1064. color: #999999;
  1065. font-size: $font-size-32;
  1066. &.icon-gouxuan{
  1067. color: $color-system;
  1068. }
  1069. }
  1070. font-size: 20rpx;
  1071. line-height: 44rpx;
  1072. color: #999999;
  1073. text{
  1074. color:#0091FF;
  1075. }
  1076. }
  1077. }
  1078. }
  1079. .register-btn{
  1080. width: 702rpx;
  1081. height: 88rpx;
  1082. border-radius: 14rpx;
  1083. font-size: $font-size-28;
  1084. line-height: 88rpx;
  1085. color: #FFFFFF;
  1086. margin: 0 auto;
  1087. text-align: center;
  1088. background: $btn-confirm;
  1089. margin-top: 96rpx;
  1090. &.none{
  1091. background: #FFFFFF;
  1092. color: $text-color;
  1093. margin-top: 0;
  1094. }
  1095. &.sub{
  1096. margin-top: 0;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. </style>