register.vue 32 KB

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