register.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  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" @input="onInput1" 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" @input="onInput2" 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" 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" 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" 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" 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" 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" 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="16"/>
  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="50"
  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. })
  401. },
  402. registerStepsSub(){
  403. let params ={
  404. email:this.registerEmail,
  405. mailboxCode:this.regEmailCode,
  406. password:this.password,
  407. passWordConfirm:this.passwordCheck,
  408. name:this.clubName,
  409. linkMan:this.clubContact,
  410. bindMobile:this.registerMobile,
  411. activationCode:this.mobileCode,
  412. sname:this.abbreviation,
  413. provinceID:this.addressData.provinceID,
  414. cityID:this.addressData.cityID,
  415. townID:this.addressData.townID,
  416. address:this.addressData.addressDetail,
  417. socialCreditCode:this.socialCreditCode,
  418. businessLicenseImage:this.uploadBusinessImage,
  419. headpic:this.uploadMentuzImage,
  420. firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
  421. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  422. department:this.department, //科室
  423. medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
  424. isAgreed:this.isAgreed, //是否勾选协议
  425. mainpro:this.mainpro,
  426. whichStep:3
  427. }
  428. organizationRegister(params).then(res =>{
  429. this.$util.msg('您的机构账号已提交审核',2000);
  430. this.$api.switchTabTo('/pages/tabBar/home/home')
  431. }).catch(res =>{
  432. this.$util.msg(res.msg,2000);
  433. })
  434. },
  435. getEmailCodeFn(){
  436. this.isEmialDisabled = true;
  437. getEmailCode({email:this.registerEmail,status:2}).then(res =>{
  438. this.$util.msg('验证邮件已发送至邮箱,请登录邮箱查收',2000);
  439. const TIME_COUNT = 60;
  440.       if (!this.codeTime) {
  441.         this.count = TIME_COUNT;
  442. this.isEmialDisabled = true;
  443.         this.codeTime = setInterval(() => {
  444.         if (this.count > 1 && this.count <= TIME_COUNT) {
  445.           this.count--
  446.           this.emailCodeText = this.count +'s重新发送'
  447.          } else {
  448.           clearInterval(this.codeTime)
  449.           this.codeTime = null
  450. this.emailCodeText = '获取验证码'
  451. this.isEmialDisabled = false;
  452.          }
  453.         },1000)
  454.        }
  455. }).catch( res =>{
  456. this.$util.msg(res.msg,2000);
  457. this.isEmialDisabled = false;
  458. })
  459. },
  460. getMobileCodeFn(){
  461. if( this.registerMobile == ''){
  462. this.$util.msg('请输入手机号',2000);
  463. return
  464. }
  465. if(!this.$reg.isMobile(this.registerMobile)){
  466. this.$util.msg('请输入正确的手机号',2000);
  467. return
  468. }
  469. if( this.imageCode == ''){
  470. this.$util.msg('请输入图形验证码',2000);
  471. return
  472. }
  473. let params = {
  474. mobile:this.registerMobile,
  475. activateCodeType:2,
  476. platformType:2,
  477. imgCode:this.imageCode,
  478. token:this.imageCodetoken,
  479. }
  480. this.isMobileDisabled = true;
  481. getMobileCode(params).then(res =>{
  482. this.$util.msg('验证短信已发送',2000);
  483. const TIME_COUNT = 60;
  484.       if (!this.codeTime) {
  485.         this.count = TIME_COUNT;
  486.         this.isMobileDisabled = true;
  487.         this.codeTime = setInterval(() => {
  488.         if (this.count > 1 && this.count <= TIME_COUNT) {
  489.           this.count--
  490.           this.mobileCodeText = this.count +'s重新发送'
  491.          } else {
  492.           this.isMobileDisabled = false;
  493.           clearInterval(this.codeTime)
  494.           this.codeTime = null
  495. this.mobileCodeText = '获取验证码'
  496.          }
  497.         },1000)
  498.        }
  499. }).catch( res =>{
  500. this.$util.msg(res.msg,2000);
  501. this.isEmialDisabled = false;
  502. })
  503. },
  504. getVerificationCode(){//图形验证
  505. getImageCode().then(res => {
  506. this.imageCodeUrl = res.data.baseImage
  507. this.imageCodetoken = res.data.token
  508. })
  509. },
  510. // 三级联动选择
  511. showMulLinkageThreePicker() {
  512. this.isShowInput = true
  513. this.$refs.mpvueCityPicker.show()
  514. },
  515. onConfirm(e) {
  516. console.log('地址',e);
  517. this.addressData.address = e.name;
  518. this.addressData.townID = e.townCode;
  519. this.addressData.cityID = e.cityCode;
  520. this.addressData.provinceID = e.provinceCode;
  521. },
  522. onTextareaInput(e){
  523. this.addressData.addressDetail = e.detail.value;
  524. },
  525. chooseBusinessImage() {//营业执照图片上传
  526. uploadFileImage().then(res =>{
  527. this.uploadBusinessImage = JSON.parse(res.data).data
  528. })
  529. },
  530. chooseMentuzImage() {//门头照图片上传
  531. uploadFileImage().then(res =>{
  532. this.uploadMentuzImage = JSON.parse(res.data).data
  533. })
  534. },
  535. chooseMedicalImage() {//资质照图片上传
  536. uploadFileImage().then(res =>{
  537. this.uploadMedicalImage = JSON.parse(res.data).data
  538. })
  539. },
  540. viewBusinessImage(e) {
  541. this.myPreviewImageFn(this.uploadBusinessImage)
  542. },
  543. viewMentuzImage(e) {
  544. this.myPreviewImageFn(this.uploadMentuzImage)
  545. },
  546. viewMedicalImage(e) {
  547. this.myPreviewImageFn(this.uploadMedicalImage)
  548. },
  549. myPreviewImageFn(url){
  550. this.isPreviewImage = true
  551. let mentuzArray = []
  552. mentuzArray.push(url)
  553. uni.previewImage({
  554. urls: mentuzArray,
  555. current: 0
  556. });
  557. },
  558. delBusinessImage(){
  559. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  560. this.uploadBusinessImage = ''
  561. })
  562. },
  563. delMentuzImage(){
  564. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  565. this.uploadMentuzImage = ''
  566. })
  567. },
  568. delMedicalImage(){
  569. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  570. this.uploadMedicalImage = ''
  571. })
  572. },
  573. bindPickerChange() {
  574. let self = this
  575. uni.showActionSheet({
  576. title:'标题',
  577. itemList: ['医美', '生美'],
  578. success: (e) => {
  579. self.isOrganizationType = e.tapIndex+1
  580. switch(e.tapIndex){
  581. case 0:
  582. this.organizationTypeText = '医美'
  583. break;
  584. case 1:
  585. this.organizationTypeText = '生美'
  586. break;
  587. }
  588. }
  589. })
  590. },
  591. bindPickerChange2(e) {
  592. console.log('picker携带值为:' + e.target.value)
  593. this.typtIndex = e.target.value
  594. this.isOrganizationType = e.target.value
  595. },
  596. radioChange(e) {
  597. this.secondClubType = e.target.value;
  598. if( this.secondClubType == '2' || this.secondClubType == '3'){
  599. this.isDepartment = true
  600. }else{
  601. this.isDepartment = false
  602. }
  603. for (let i = 0; i < this.beautyList.length; i++) {
  604. if (this.beautyList[i].value === this.secondClubType) {
  605. this.current = i;
  606. break;
  607. }
  608. }
  609. },
  610. chooseMaleLike(e){
  611. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  612. console.log(this.mainpro)
  613. },
  614. chooseMaleLikes(e){
  615. this.mainpro = this.checkLikes(e,this.medicaCampList)
  616. console.log(this.mainpro)
  617. },
  618. checkLikes(e,list){
  619. let items = list
  620. let values = e.detail.value
  621. let arr = []
  622. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  623. const item = items[i]
  624. if(values.indexOf(item.value) >= 0){
  625. this.$set(item,'checked',true)
  626. arr.push(item.name)
  627. }else{
  628. this.$set(item,'checked',false)
  629. }
  630. }
  631. return arr.toString()
  632. },
  633. agreeCheck() {
  634. this.isCheck = !this.isCheck
  635. if(this.isCheck){
  636. this.isAgreed = 1
  637. }
  638. },
  639. onBlurInput(e){//
  640. if(e.detail.value ===''){
  641. this.isDisabled = true
  642. }else{
  643. this.isDisabled = false
  644. }
  645. },
  646. showAustomItem() {
  647. this.isShowAustomItem = !this.isShowAustomItem
  648. },
  649. addCustomItem(){
  650. if(this.isOrganizationType == 1){
  651. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
  652. this.mentuzCampList.push(item)
  653. }else{
  654. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
  655. this.medicaCampList.push(item)
  656. }
  657. },
  658. steps(index) {//$attrstab切换
  659. console.log(index)
  660. this.tabCurrentIndex = index;
  661. }
  662. },
  663. onShow() {
  664. if(this.isPreviewImage){
  665. this.isPreviewImage = false
  666. return
  667. }
  668. }
  669. }
  670. </script>
  671. <style lang="scss">
  672. .register{
  673. width: 100%;
  674. height: auto;
  675. border-top: 1px solid #F7F7F7;
  676. .model-warp.none{
  677. display: none;
  678. }
  679. .model-warp.show{
  680. display: block;
  681. }
  682. .register-tab{
  683. width: 570rpx;
  684. height: 60rpx;
  685. padding: 60rpx 90rpx;
  686. position: relative;
  687. .nav-item{
  688. width: 142rpx;
  689. background: #FFFFFF;
  690. line-height: 60rpx;
  691. border-radius: 30rpx;
  692. text-align: center;
  693. color: #999999;
  694. font-size:$font-size-26;
  695. float: left;
  696. margin-right: 72rpx;
  697. position: relative;
  698. .line{
  699. height: 3rpx;
  700. width: 50rpx;
  701. background: #999999;
  702. position: absolute;
  703. right: -58rpx;
  704. top: 32rpx;
  705. }
  706. &:last-child{
  707. margin-right: 0;
  708. }
  709. &.current{
  710. color:#FFFFFF;
  711. background: $color-system;
  712. }
  713. }
  714. }
  715. .register-main{
  716. width: 100%;
  717. height: auto;
  718. &.detailed{
  719. padding-bottom: 330rpx;
  720. }
  721. .register-tips{
  722. display: flex;
  723. flex-direction: column;
  724. align-items: center;
  725. line-height: 44rpx;
  726. font-size: $font-size-24;
  727. color: #FF0000;
  728. margin-bottom: 40rpx;
  729. .iconfont{
  730. font-size: $font-size-24;
  731. }
  732. }
  733. .register-row{
  734. width: 702rpx;
  735. height: auto;
  736. padding: 0 24rpx;
  737. margin-bottom: 20rpx;
  738. .register-from{
  739. width: 654rpx;
  740. height: 40rpx;
  741. padding: 24rpx;
  742. background: $sub-bg-color;
  743. border-radius: 14rpx;
  744. position: relative;
  745. .label{
  746. text-align: left;
  747. font-size: $font-size-28;
  748. color: $text-color;
  749. line-height: 40rpx;
  750. float: left;
  751. }
  752. .row-input{
  753. width: 440rpx;
  754. padding-left:10rpx;
  755. font-size: $font-size-28;
  756. color: $text-color;
  757. line-height: 40rpx;
  758. float: left;
  759. height: 40rpx;
  760. &.none{
  761. color: #999999;
  762. }
  763. &.picker{
  764. text-align: left;
  765. color: #999999;
  766. }
  767. &.keshi{
  768. width: 550rpx;
  769. }
  770. }
  771. &.img-btn{
  772. width: 220rpx;
  773. height: 88rpx;
  774. padding: 0;
  775. float: left;
  776. background: #FFFFFF;
  777. display: block;
  778. .vscodeimg{
  779. width: 150rpx;
  780. height: 88rpx;
  781. float: left;
  782. display: flex;
  783. flex-direction: column;
  784. align-items: center;
  785. border-radius: 14rpx;
  786. image{
  787. width: 150rpx;
  788. height: 88rpx;
  789. border-radius: 14rpx;
  790. }
  791. }
  792. .vscod-refresh{
  793. width: 70rpx;
  794. float: right;
  795. text-align: right;
  796. display: flex;
  797. flex-direction: column;
  798. align-items: center;
  799. line-height: 44rpx;
  800. .icon-shuaxin{
  801. font-size: 48rpx;
  802. color: #333333;
  803. }
  804. .ref-text{
  805. font-size: 24rpx;
  806. color: #333333;
  807. }
  808. }
  809. }
  810. &.imgcode{
  811. width: 410rpx;
  812. float: left;
  813. margin-right: 20rpx;
  814. .row-input{
  815. width: 230rpx;
  816. }
  817. }
  818. &.code{
  819. width: 410rpx;
  820. float: left;
  821. margin-right: 20rpx;
  822. .row-input{
  823. width: 230rpx;
  824. }
  825. }
  826. &.btn{
  827. width: 224rpx;
  828. height: 88rpx;
  829. float: left;
  830. background: $btn-confirm;
  831. padding: 0;
  832. .row-input{
  833. width: 224rpx;
  834. height: 88rpx;
  835. line-height: 88rpx;
  836. padding: 0;
  837. color: #FFFFFF;
  838. background: $btn-confirm;
  839. text-align: center;
  840. border-radius: 14rpx;
  841. &.other{
  842. width: 224rpx;
  843. background: #F7F7F7;
  844. margin-right: 20rpx;
  845. }
  846. &.none{
  847. background: #F7F7F7;
  848. }
  849. }
  850. &.disabled{
  851. background: #F7F7F7;
  852. .row-input{
  853. background: #F7F7F7;
  854. color: #999999;
  855. }
  856. }
  857. }
  858. &.picker{
  859. padding: 0 24rpx;
  860. width: 654rpx;
  861. height: 88rpx;
  862. line-height: 88rpx;
  863. .label{
  864. line-height: 88rpx;
  865. }
  866. .row-input{
  867. width: 470rpx;
  868. height: 88rpx;
  869. line-height: 88rpx;
  870. padding-left: 30rpx;
  871. }
  872. }
  873. &.radio{
  874. padding: 0 24rpx;
  875. width: 654rpx;
  876. height: 288rpx;
  877. .row-input{
  878. width: 100%;
  879. height: 88rpx;
  880. line-height: 88rpx;
  881. padding-left: 0;
  882. }
  883. .row-radio{
  884. float: left;
  885. transform: scale(0.8);
  886. }
  887. .row-text{
  888. width: 100rpx;
  889. text-align: center;
  890. float: left;
  891. }
  892. }
  893. &.group{
  894. padding: 0 24rpx;
  895. width: 654rpx;
  896. height: auto;
  897. background: #FFFFFF;
  898. margin-top: 30rpx;
  899. .row-input{
  900. width: 100%;
  901. height: 88rpx;
  902. line-height: 88rpx;
  903. padding-left: 0;
  904. }
  905. .row-radio{
  906. float: left;
  907. }
  908. .row-text{
  909. width: 100rpx;
  910. text-align: center;
  911. float: left;
  912. }
  913. }
  914. &.btn{
  915. margin-top: 0;
  916. }
  917. .content-class {
  918. width: 520rpx;
  919. margin: 20rpx auto;
  920. display: flex;
  921. flex-flow: row wrap;
  922. justify-content: space-between;
  923. align-items: center;
  924. &.btn{
  925. margin: 0 auto;
  926. margin-left: 126rpx;
  927. }
  928. .row-input{
  929. display: flex;
  930. width: 220rpx;
  931. height: 40rpx;
  932. padding: 24rpx;
  933. text-align: left;
  934. border-radius: 10rpx;
  935. font-size: $font-size-28;
  936. color: $text-color;
  937. }
  938. .confirm-btn{
  939. width: 200rpx;
  940. height: 88rpx;
  941. border-radius: 10rpx;
  942. line-height: 88rpx;
  943. text-align: center;
  944. &.other{
  945. width: 213rpx;
  946. }
  947. &.none{
  948. color: #FFFFFF;
  949. background: $btn-confirm;
  950. }
  951. &.disabled{
  952. color: #999999;
  953. }
  954. }
  955. .item {
  956. width: 155rpx;
  957. height: 60rpx;
  958. font-size:$font-size-28;
  959. line-height: 60rpx;
  960. border-radius:10rpx;
  961. margin: 10rpx;
  962. text-align: center;
  963. box-sizing: border-box;
  964. border: 1rpx solid #EFEFEF;
  965. checkbox {
  966. display: none;
  967. }
  968. }
  969. .on {
  970. border-color: $color-system;
  971. color:$color-system;
  972. }
  973. }
  974. }
  975. .icon-xiayibu{
  976. width: 88rpx;
  977. height: 88rpx;
  978. position: absolute;
  979. right: 0;
  980. top: 0;
  981. line-height: 88rpx;
  982. text-align: center;
  983. }
  984. &.text-textarea{
  985. background: #FFFFFF;
  986. .textarea{
  987. width: 654rpx;
  988. height: 180rpx;
  989. background: #F7F7F7;
  990. padding: 24rpx;
  991. font-size: $font-size-28;
  992. color: $text-color;
  993. z-index: 1;
  994. border-radius: 14rpx;
  995. }
  996. .textarea.hide{
  997. opacity: 0;
  998. }
  999. .textarea.show{
  1000. color: #999999;
  1001. }
  1002. }
  1003. }
  1004. .register-picture{
  1005. height: 102rpx;
  1006. margin: 40rpx 0 0 0;
  1007. .label{
  1008. float: left;
  1009. font-size: $font-size-28;
  1010. color: $text-color;
  1011. line-height: 102rpx;
  1012. width: 150rpx;
  1013. text-align: right;
  1014. &.zz{
  1015. width: 230rpx;
  1016. }
  1017. }
  1018. .upload-picture{
  1019. float: left;
  1020. height: 100rpx;
  1021. .upload-none{
  1022. width: 100rpx;
  1023. height: 100rpx;
  1024. text-align: center;
  1025. line-height: 100rpx;
  1026. color: #999999;
  1027. border: 1px solid #999999;
  1028. border-radius: 10rpx;
  1029. margin: 0 20rpx;
  1030. .iconfont{
  1031. font-size: $font-size-28;
  1032. }
  1033. }
  1034. .upload-image{
  1035. width: 100rpx;
  1036. height: 100rpx;
  1037. border-radius: 10rpx;
  1038. margin: 0 20rpx;
  1039. position: relative;
  1040. image{
  1041. width: 100rpx;
  1042. height: 100rpx;
  1043. border-radius: 10rpx;
  1044. }
  1045. .upload-del{
  1046. width: 40rpx;
  1047. height: 40rpx;
  1048. position: absolute;
  1049. top: -20rpx;
  1050. right: -20rpx;
  1051. line-height: 40rpx;
  1052. text-align: center;
  1053. .iconfont{
  1054. font-size: $font-size-32;
  1055. color: #999999;
  1056. }
  1057. }
  1058. }
  1059. }
  1060. }
  1061. .register-input{
  1062. width: 654rpx;
  1063. height: 40rpx;
  1064. padding: 24rpx;
  1065. margin: 0 auto;
  1066. margin-bottom: 60rpx;
  1067. background: #F7F7F7;
  1068. border-radius: 14rpx;
  1069. .input{
  1070. width: 100%;
  1071. height: 100%;
  1072. background: #F7F7F7;
  1073. font-size: $font-size-28;
  1074. line-height: 40rpx;
  1075. color: #333333;
  1076. border-radius: 14rpx;
  1077. }
  1078. }
  1079. .register-fiexd{
  1080. width: 100%;
  1081. height: auto;
  1082. position: fixed;
  1083. bottom: 0;
  1084. left: 0;
  1085. z-index: 999;
  1086. background: #FFFFFF;
  1087. .register-agree{
  1088. display: flex;
  1089. flex-direction: column;
  1090. align-items: center;
  1091. margin: 32rpx 0;
  1092. .agree-text{
  1093. .checkbox{
  1094. float: left;
  1095. margin: 4rpx 6rpx 0 0;
  1096. color: #999999;
  1097. font-size: $font-size-32;
  1098. &.icon-gouxuan{
  1099. color: $color-system;
  1100. }
  1101. }
  1102. font-size: 20rpx;
  1103. line-height: 44rpx;
  1104. color: #999999;
  1105. text{
  1106. color:#0091FF;
  1107. }
  1108. }
  1109. }
  1110. }
  1111. .register-btn{
  1112. width: 702rpx;
  1113. height: 88rpx;
  1114. border-radius: 14rpx;
  1115. font-size: $font-size-28;
  1116. line-height: 88rpx;
  1117. color: #FFFFFF;
  1118. margin: 0 auto;
  1119. text-align: center;
  1120. background: $btn-confirm;
  1121. margin-top: 96rpx;
  1122. &.none{
  1123. background: #FFFFFF;
  1124. color: $text-color;
  1125. margin-top: 0;
  1126. }
  1127. &.sub{
  1128. margin-top: 0;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. </style>