register.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  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="18"/>
  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. haveBack:true,
  278. textLeft:this.$store.state.isIphoneX
  279. },
  280. CustomBar:this.CustomBar,// 顶部导航栏高度
  281. tabCurrentIndex:1, //显示step
  282. isPreviewImage:false, //预览图片开关
  283. isMobileDisabled: false, //手机验证码按钮控制
  284. mobilCount: '', //倒计时
  285. mobileCodeText: '获取验证码',
  286. mobilTime: null,
  287. registerEmail:'', //注册邮箱
  288. password:'', //密码
  289. passwordCheck:'', //校验密码
  290. clubName:'', //机构名称
  291. abbreviation:'', //机构简称
  292. userName:'', //联系人
  293. bindMobile:'', //联系人手机号
  294. mobileCode:'', //手机验证码
  295. imageCode:'', //图形验证码
  296. imageCodeUrl:'', //图形验证码图片
  297. imageCodetoken:'', //图形验证校验
  298. socialCreditCode:'', //统一社会信用代码
  299. isAgreed:0, //是否勾选协议
  300. isDisabled:true,
  301. isShowInput:false,
  302. isCheck:false, //是否勾选协议
  303. uploadBusinessImage:'', //营业执照图片
  304. uploadMentuzImage:'', //门头照图片
  305. uploadMedicalImage:'', //资质照图片
  306. department:'', //科室
  307. isDepartment:false, //是否显示科室
  308. secondClubType:'', //机构类型二级分类
  309. mainpro:'', //主营内容
  310. isOrganizationType:0,
  311. organizationTypeText:'请选择机构类型',
  312. beautyList:beautyList,
  313. mentuzCampList:mentuzCampNullList,
  314. medicaCampList:medicaCampNullList,
  315. typtIndex:0,
  316. organizationType:3,
  317. current:0,
  318. isShowAustomItem:false, //是否显示其他添加
  319. customItemValue:'', //自定义项目
  320. addressData:{
  321. address:'请选择机构所在地区',
  322. townID:'', //区ID
  323. cityID:'', //区ID
  324. provinceID:'', //区ID
  325. addressDetail: '', //地址
  326. },
  327. userID:'', //机构userID
  328. clubID:'', //机构ID
  329. getOption:'' //页面传递参数
  330. }
  331. },
  332. onLoad(option) {
  333. this.getOption = JSON.stringify(option)
  334. },
  335. methods:{
  336. ...mapMutations(['login']),
  337. hanldNavigateBack(){
  338. this.$util.modal('','注册尚未完成,确定放弃注册吗?','确定','取消',true,() =>{
  339. uni.navigateBack({
  340. delta: 1
  341. });
  342. })
  343. },
  344. registerStepsfirst(){
  345. let params ={
  346. userName:this.userName,
  347. bindMobile:this.bindMobile,
  348. activationCode:this.mobileCode,
  349. password:this.password,
  350. passWordConfirm:this.passwordCheck,
  351. isAgreed:this.isAgreed, //是否勾选协议
  352. }
  353. organizationVerifyRegisterFirst(params).then(response =>{
  354. this.$util.msg('注册成功',2000);
  355. this.userID = response.data.userID
  356. this.clubID = response.data.clubID
  357. setTimeout(()=>{
  358. this.tabCurrentIndex = 2
  359. this.nvabarData.title = '升级会所机构'
  360. },2000)
  361. }).catch(error =>{
  362. this.$util.msg(error.msg,2000);
  363. })
  364. },
  365. registerGoLogin(){
  366. organizationLogin({mobileOrEmail:this.bindMobile,password:this.password,source:'www'}).then(response =>{
  367. this.storeUpdataeStatus(response.data)
  368. this.$api.navigateTo('/pages/login/bindwechat')
  369. }).catch(error =>{
  370. this.$util.msg(error.msg,2000);
  371. })
  372. },
  373. storeUpdataeStatus(data){
  374. uni.setStorageSync('token',data.token)
  375. this.$store.commit('updateStatus',data)
  376. this.login(data);
  377. },
  378. registerStepsSub(){
  379. if( this.registerEmail == ''){
  380. this.$util.msg('请输入邮箱地址',2000);
  381. return
  382. }
  383. if( !this.$reg.isEmail(this.registerEmail)){
  384. this.$util.msg('请输入正确的邮箱地址',2000);
  385. return
  386. }
  387. if( this.clubName == ''){
  388. this.$util.msg('请输入机构名称',2000);
  389. return
  390. }
  391. if( this.addressData.townID == ''){
  392. this.$util.msg('请选择机构地址',2000);
  393. return
  394. }
  395. if( this.addressData.addressDetail == ''){
  396. this.$util.msg('请填写机构详细地址',2000);
  397. return
  398. }
  399. if( this.socialCreditCode == ''){
  400. this.$util.msg('请填写社会统一社会信用代码',2000);
  401. return
  402. }
  403. if( this.uploadBusinessImage == ''){
  404. this.$util.msg('请上传您的营业执照',2000);
  405. return
  406. }
  407. if(this.isOrganizationType!=0){
  408. if(this.mainpro == ''){
  409. this.$util.msg('请选择住机构主营内容',2000);
  410. return
  411. }
  412. }
  413. let params ={
  414. userID:this.userID,
  415. clubID:this.clubID,
  416. contractEmail1:this.registerEmail,
  417. name:this.clubName,
  418. sname:this.abbreviation,
  419. provinceID:this.addressData.provinceID,
  420. cityID:this.addressData.cityID,
  421. townID:this.addressData.townID,
  422. address:this.addressData.addressDetail,
  423. socialCreditCode:this.socialCreditCode,
  424. businessLicenseImage:this.uploadBusinessImage,
  425. headpic:this.uploadMentuzImage,
  426. firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
  427. secondClubType:this.secondClubType, //机构类型二级分类 诊所:1,门诊:2,医院:3
  428. department:this.department, //科室
  429. medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
  430. mainpro:this.mainpro
  431. }
  432. organizationRegister(params).then(res =>{
  433. this.$util.msg('您的升级申请已提交审核',2000);
  434. setTimeout(()=>{
  435. this.registerGoLogin()
  436. },2000)
  437. }).catch(error =>{
  438. this.$util.msg(error.msg,2000);
  439. })
  440. },
  441. getMobileCodeFn(){
  442. if( this.bindMobile == ''){
  443. this.$util.msg('请输入手机号',2000);
  444. return
  445. }
  446. if(!this.$reg.isMobile(this.bindMobile)){
  447. this.$util.msg('请输入正确的手机号',2000);
  448. return
  449. }
  450. let params = {
  451. mobile:this.bindMobile,
  452. activateCodeType:2,
  453. platformType:2
  454. }
  455. this.isMobileDisabled = true;
  456. getRegisterMobileCode(params).then(response =>{
  457. this.$util.msg('验证短信已发送',2000);
  458. const TIME_COUNT = 60;
  459. if (!this.mobilTime) {
  460. this.mobilCount = TIME_COUNT;
  461. this.isMobileDisabled = true;
  462. this.mobilTime = setInterval(() => {
  463. if (this.mobilCount > 1 && this.mobilCount <= TIME_COUNT) {
  464. this.mobilCount--
  465. this.mobileCodeText = this.mobilCount +'s重新发送'
  466. } else {
  467. this.isMobileDisabled = false;
  468. clearInterval(this.mobilTime)
  469. this.mobilTime = null
  470. this.mobileCodeText = '获取验证码'
  471. }
  472. },1000)
  473. }
  474. }).catch( error =>{
  475. this.$util.msg(error.msg,2000);
  476. this.isMobileDisabled = false;
  477. })
  478. },
  479. showMulLinkageThreePicker() {//三级地址联动
  480. this.isShowInput = true
  481. this.$refs.mpvueCityPicker.show()
  482. },
  483. onConfirm(e) {//获取选择的地址信息
  484. this.addressData.address = e.name;
  485. this.addressData.townID = e.townCode;
  486. this.addressData.cityID = e.cityCode;
  487. this.addressData.provinceID = e.provinceCode;
  488. },
  489. onTextareaInput(e){//地址详细信息
  490. this.addressData.addressDetail = e.detail.value;
  491. },
  492. chooseBusinessImage() {//营业执照图片上传
  493. uploadFileImage().then(res =>{
  494. this.uploadBusinessImage = JSON.parse(res.data).data
  495. })
  496. },
  497. chooseMentuzImage() {//门头照图片上传
  498. uploadFileImage().then(res =>{
  499. this.uploadMentuzImage = JSON.parse(res.data).data
  500. })
  501. },
  502. chooseMedicalImage() {//资质照图片上传
  503. uploadFileImage().then(res =>{
  504. this.uploadMedicalImage = JSON.parse(res.data).data
  505. })
  506. },
  507. viewBusinessImage(e) {//预览营业执照图片
  508. this.myPreviewImageFn(this.uploadBusinessImage)
  509. },
  510. viewMentuzImage(e) {//预览门头照图片
  511. this.myPreviewImageFn(this.uploadMentuzImage)
  512. },
  513. viewMedicalImage(e) {//预览资质照图片
  514. this.myPreviewImageFn(this.uploadMedicalImage)
  515. },
  516. myPreviewImageFn(url){//预览图片公共方法
  517. this.isPreviewImage = true
  518. let mentuzArray = []
  519. mentuzArray.push(url)
  520. uni.previewImage({
  521. urls: mentuzArray,
  522. current: 0
  523. });
  524. },
  525. delBusinessImage(){//删除营业执照图片
  526. this.$util.modal('','确定删除营业执照图片吗?','确定','取消',true,() =>{
  527. this.uploadBusinessImage = ''
  528. })
  529. },
  530. delMentuzImage(){//删除门头照图片
  531. this.$util.modal('','确定删除门头照图片吗?','确定','取消',true,() =>{
  532. this.uploadMentuzImage = ''
  533. })
  534. },
  535. delMedicalImage(){//删除资质图片
  536. this.$util.modal('','确定删除资质图片吗?','确定','取消',true,() =>{
  537. this.uploadMedicalImage = ''
  538. })
  539. },
  540. bindPickerChange() {//机构类型选择
  541. let self = this
  542. uni.showActionSheet({
  543. title:'标题',
  544. itemList: ['医美', '生美'],
  545. success: (e) => {
  546. self.isOrganizationType = e.tapIndex+1
  547. switch(e.tapIndex){
  548. case 0:
  549. this.organizationTypeText = '医美'
  550. break;
  551. case 1:
  552. this.organizationTypeText = '生美'
  553. break;
  554. }
  555. }
  556. })
  557. },
  558. bindPickerChange2(e) {
  559. this.typtIndex = e.target.value
  560. this.isOrganizationType = e.target.value
  561. },
  562. radioChange(e) {
  563. this.secondClubType = e.target.value;
  564. if( this.secondClubType == '2' || this.secondClubType == '3'){
  565. this.isDepartment = true
  566. }else{
  567. this.isDepartment = false
  568. }
  569. for (let i = 0; i < this.beautyList.length; i++) {
  570. if (this.beautyList[i].value === this.secondClubType) {
  571. this.current = i;
  572. break;
  573. }
  574. }
  575. },
  576. chooseMaleLike(e){
  577. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  578. },
  579. chooseMaleLikes(e){
  580. this.mainpro = this.checkLikes(e,this.medicaCampList)
  581. },
  582. checkLikes(e,list){
  583. let values = e.detail.value
  584. let arr = []
  585. list.forEach(item => {
  586. if(values.indexOf(item.value) >= 0){
  587. this.$set(item,'checked',true)
  588. arr.push(item.name)
  589. }else{
  590. this.$set(item,'checked',false)
  591. }
  592. })
  593. return arr.join('/')
  594. },
  595. agreeCheck() {
  596. this.isCheck = !this.isCheck
  597. if(this.isCheck){
  598. this.isAgreed = 1
  599. }else{
  600. this.isAgreed = 0
  601. }
  602. },
  603. onBlurInput(e){//
  604. if(e.detail.value ===''){
  605. this.isDisabled = true
  606. }else{
  607. this.isDisabled = false
  608. }
  609. },
  610. showAustomItem() {
  611. this.isShowAustomItem = !this.isShowAustomItem
  612. },
  613. addCustomItem(){
  614. if(this.isOrganizationType == 1){
  615. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
  616. this.mentuzCampList.push(item)
  617. }else{
  618. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
  619. this.medicaCampList.push(item)
  620. }
  621. },
  622. goFastConsult(){
  623. this.$api.navigateTo('/pages/login/consult')
  624. }
  625. },
  626. onShow() {
  627. if(this.isPreviewImage){
  628. this.isPreviewImage = false
  629. return
  630. }
  631. }
  632. }
  633. </script>
  634. <style lang="scss">
  635. .register{
  636. width: 100%;
  637. height: auto;
  638. .register-main{
  639. width: 100%;
  640. height: auto;
  641. position: relative;
  642. .register-consult{
  643. width: 110rpx;
  644. height: 68rpx;
  645. background:linear-gradient(223deg,rgba(225,86,21,0.6) 0%,rgba(225,86,10,0.3) 100%);
  646. border-radius: 34rpx 0 0 34rpx;
  647. position: absolute;
  648. right: 0;
  649. top: -100rpx;
  650. text-align: left;
  651. line-height: 68rpx;
  652. padding-left: 20rpx;
  653. .icon-kefunv{
  654. font-size: 48rpx;
  655. color: #31313B;
  656. float: left;
  657. }
  658. .text{
  659. font-size: $font-size-24;
  660. display: block;
  661. float: left;
  662. width: 60rpx;
  663. line-height: 30rpx;
  664. color: #FFFFFF;
  665. margin-top: 6rpx;
  666. }
  667. }
  668. .register-agree{
  669. display: flex;
  670. flex-direction: column;
  671. align-items: center;
  672. margin: 150rpx 0 20rpx 0;
  673. .agree-text{
  674. .checkbox{
  675. float: left;
  676. margin: 4rpx 6rpx 0 0;
  677. color: #999999;
  678. font-size: $font-size-32;
  679. &.icon-gouxuan{
  680. color: $color-system;
  681. }
  682. }
  683. font-size: 20rpx;
  684. line-height: 44rpx;
  685. color: #999999;
  686. text{
  687. color:#0091FF;
  688. }
  689. }
  690. }
  691. .register-logo{
  692. width: 100%;
  693. display: flex;
  694. flex-direction: column;
  695. align-items: center;
  696. height: 198rpx;
  697. padding:60rpx 0 40rpx 0;
  698. .logo{
  699. width: 138rpx;
  700. height: 118rpx;
  701. display: block;
  702. }
  703. .logo-text{
  704. font-size: 30rpx;
  705. line-height: 44rpx;
  706. color: $color-system;
  707. font-weight: 600;
  708. margin-top: 20rpx;
  709. }
  710. }
  711. &.detailed{
  712. padding-bottom: 330rpx;
  713. }
  714. .register-row{
  715. width: 702rpx;
  716. height: auto;
  717. padding: 0 24rpx;
  718. margin-bottom: 20rpx;
  719. &.none{
  720. margin-bottom: 0;
  721. }
  722. .register-text{
  723. line-height: 44rpx;
  724. margin-top: 100rpx;
  725. font-size: $font-size-24;
  726. color: #999999;
  727. text-align: justify;
  728. .txt{
  729. margin-right: 15rpx;
  730. }
  731. }
  732. .register-title{
  733. line-height: 44rpx;
  734. font-size: $font-size-24;
  735. color: $text-color;
  736. text-align: left;
  737. &.first{
  738. margin-top: 20rpx;
  739. }
  740. }
  741. .register-tip{
  742. line-height: 64rpx;
  743. font-size: $font-size-24;
  744. color: #CECECE;
  745. text-align: left;
  746. }
  747. .register-from{
  748. width: 654rpx;
  749. height: 40rpx;
  750. padding: 24rpx;
  751. background: $sub-bg-color;
  752. border-radius: 14rpx;
  753. position: relative;
  754. .label{
  755. text-align: left;
  756. font-size: $font-size-28;
  757. color: $text-color;
  758. line-height: 40rpx;
  759. float: left;
  760. }
  761. .row-input{
  762. width: 440rpx;
  763. padding-left:10rpx;
  764. font-size: $font-size-28;
  765. color: $text-color;
  766. line-height: 40rpx;
  767. float: left;
  768. height: 40rpx;
  769. &.none{
  770. color: #999999;
  771. }
  772. &.picker{
  773. text-align: left;
  774. color: #999999;
  775. }
  776. &.keshi{
  777. width: 550rpx;
  778. }
  779. }
  780. &.img-btn{
  781. width: 220rpx;
  782. height: 88rpx;
  783. padding: 0;
  784. float: left;
  785. background: #FFFFFF;
  786. display: block;
  787. .vscodeimg{
  788. width: 150rpx;
  789. height: 88rpx;
  790. float: left;
  791. display: flex;
  792. flex-direction: column;
  793. align-items: center;
  794. border-radius: 14rpx;
  795. image{
  796. width: 150rpx;
  797. height: 88rpx;
  798. border-radius: 14rpx;
  799. }
  800. }
  801. .vscod-refresh{
  802. width: 70rpx;
  803. float: right;
  804. text-align: right;
  805. display: flex;
  806. flex-direction: column;
  807. align-items: center;
  808. line-height: 44rpx;
  809. .icon-shuaxin{
  810. font-size: 48rpx;
  811. color: #333333;
  812. }
  813. .ref-text{
  814. font-size: 24rpx;
  815. color: #333333;
  816. }
  817. }
  818. }
  819. &.imgcode{
  820. width: 410rpx;
  821. float: left;
  822. margin-right: 20rpx;
  823. .row-input{
  824. width: 230rpx;
  825. }
  826. }
  827. &.code{
  828. width: 410rpx;
  829. float: left;
  830. margin-right: 20rpx;
  831. .row-input{
  832. width: 230rpx;
  833. }
  834. }
  835. &.btn{
  836. width: 224rpx;
  837. height: 88rpx;
  838. float: left;
  839. background: $btn-confirm;
  840. padding: 0;
  841. .row-input{
  842. width: 224rpx;
  843. height: 88rpx;
  844. line-height: 88rpx;
  845. padding: 0;
  846. color: #FFFFFF;
  847. background: $btn-confirm;
  848. text-align: center;
  849. border-radius: 14rpx;
  850. &.other{
  851. width: 224rpx;
  852. background: #F7F7F7;
  853. margin-right: 20rpx;
  854. }
  855. &.none{
  856. background: #F7F7F7;
  857. }
  858. }
  859. &.disabled{
  860. background: #F7F7F7;
  861. .row-input{
  862. background: #F7F7F7;
  863. color: #999999;
  864. }
  865. }
  866. }
  867. &.picker{
  868. padding: 0 24rpx;
  869. width: 654rpx;
  870. height: 88rpx;
  871. line-height: 88rpx;
  872. .label{
  873. line-height: 88rpx;
  874. }
  875. .row-input{
  876. width: 470rpx;
  877. height: 88rpx;
  878. line-height: 88rpx;
  879. padding-left: 30rpx;
  880. }
  881. }
  882. &.radio{
  883. padding: 0 24rpx;
  884. width: 654rpx;
  885. height: 288rpx;
  886. .row-input{
  887. width: 100%;
  888. height: 88rpx;
  889. line-height: 88rpx;
  890. padding-left: 0;
  891. }
  892. .row-radio{
  893. float: left;
  894. transform: scale(0.8);
  895. }
  896. .row-text{
  897. width: 100rpx;
  898. text-align: center;
  899. float: left;
  900. }
  901. }
  902. &.group{
  903. padding: 0 24rpx;
  904. width: 654rpx;
  905. height: auto;
  906. background: #FFFFFF;
  907. margin-top: 30rpx;
  908. .label{
  909. line-height: 76rpx;
  910. }
  911. .row-input{
  912. width: 100%;
  913. height: 88rpx;
  914. line-height: 88rpx;
  915. padding-left: 0;
  916. }
  917. .row-radio{
  918. float: left;
  919. }
  920. .row-text{
  921. width: 100rpx;
  922. text-align: center;
  923. float: left;
  924. }
  925. }
  926. &.btn{
  927. margin-top: 0;
  928. }
  929. .content-class {
  930. margin: 20rpx auto;
  931. display: flex;
  932. flex-flow: row wrap;
  933. justify-content: space-between;
  934. align-items: center;
  935. &.btn{
  936. margin: 0 auto;
  937. margin-left: 116rpx;
  938. }
  939. .row-input{
  940. display: flex;
  941. width: 220rpx;
  942. height: 40rpx;
  943. padding: 24rpx;
  944. text-align: left;
  945. border-radius: 10rpx;
  946. font-size: $font-size-28;
  947. color: $text-color;
  948. }
  949. .confirm-btn{
  950. width: 200rpx;
  951. height: 88rpx;
  952. border-radius: 10rpx;
  953. line-height: 88rpx;
  954. text-align: center;
  955. &.other{
  956. width: 213rpx;
  957. }
  958. &.none{
  959. color: #FFFFFF;
  960. background: $btn-confirm;
  961. }
  962. &.disabled{
  963. color: #999999;
  964. }
  965. }
  966. .item {
  967. width: 155rpx;
  968. height: 60rpx;
  969. font-size:$font-size-28;
  970. line-height: 60rpx;
  971. border-radius:10rpx;
  972. margin: 10rpx;
  973. text-align: center;
  974. box-sizing: border-box;
  975. border: 1rpx solid #EFEFEF;
  976. float: left;
  977. checkbox {
  978. display: none;
  979. }
  980. }
  981. .on {
  982. border-color: $color-system;
  983. color:$color-system;
  984. }
  985. }
  986. }
  987. .icon-xiayibu{
  988. width: 88rpx;
  989. height: 88rpx;
  990. position: absolute;
  991. right: 0;
  992. top: 0;
  993. line-height: 88rpx;
  994. text-align: center;
  995. }
  996. &.text-textarea{
  997. background: #FFFFFF;
  998. .textarea{
  999. width: 654rpx;
  1000. height: 180rpx;
  1001. background: #F7F7F7;
  1002. padding: 24rpx;
  1003. font-size: $font-size-28;
  1004. color: $text-color;
  1005. z-index: 1;
  1006. border-radius: 14rpx;
  1007. }
  1008. .textarea.hide{
  1009. opacity: 0;
  1010. }
  1011. .textarea.show{
  1012. color: #999999;
  1013. }
  1014. }
  1015. }
  1016. .register-picture{
  1017. height: 102rpx;
  1018. margin: 30rpx 0;
  1019. width: 42%;
  1020. float: left;
  1021. &.zz{
  1022. width: 100%;
  1023. }
  1024. .label{
  1025. float: left;
  1026. font-size: $font-size-28;
  1027. color: $text-color;
  1028. line-height: 102rpx;
  1029. width: 150rpx;
  1030. text-align: right;
  1031. &.zz{
  1032. width: 230rpx;
  1033. }
  1034. }
  1035. .upload-picture{
  1036. float: left;
  1037. height: 100rpx;
  1038. .upload-none{
  1039. width: 100rpx;
  1040. height: 100rpx;
  1041. text-align: center;
  1042. line-height: 100rpx;
  1043. color: #999999;
  1044. border: 1px solid #999999;
  1045. border-radius: 10rpx;
  1046. margin: 0 20rpx;
  1047. .iconfont{
  1048. font-size: $font-size-28;
  1049. }
  1050. }
  1051. .upload-image{
  1052. width: 100rpx;
  1053. height: 100rpx;
  1054. border-radius: 10rpx;
  1055. margin: 0 20rpx;
  1056. position: relative;
  1057. image{
  1058. width: 100rpx;
  1059. height: 100rpx;
  1060. border-radius: 10rpx;
  1061. }
  1062. .upload-del{
  1063. width: 40rpx;
  1064. height: 40rpx;
  1065. position: absolute;
  1066. top: -20rpx;
  1067. right: -20rpx;
  1068. line-height: 40rpx;
  1069. text-align: center;
  1070. .iconfont{
  1071. font-size: $font-size-32;
  1072. color: #999999;
  1073. }
  1074. }
  1075. }
  1076. }
  1077. }
  1078. .register-input{
  1079. width: 654rpx;
  1080. height: 40rpx;
  1081. padding: 24rpx;
  1082. margin: 0 auto;
  1083. margin-bottom: 60rpx;
  1084. background: #F7F7F7;
  1085. border-radius: 14rpx;
  1086. .input{
  1087. width: 100%;
  1088. height: 100%;
  1089. background: #F7F7F7;
  1090. font-size: $font-size-28;
  1091. line-height: 40rpx;
  1092. color: #333333;
  1093. border-radius: 14rpx;
  1094. }
  1095. }
  1096. .register-fiexd{
  1097. width: 100%;
  1098. height: auto;
  1099. position: fixed;
  1100. bottom: 0;
  1101. left: 0;
  1102. z-index: 999;
  1103. background: #FFFFFF;
  1104. }
  1105. .register-btn{
  1106. width: 702rpx;
  1107. height: 88rpx;
  1108. border-radius: 14rpx;
  1109. font-size: $font-size-28;
  1110. line-height: 88rpx;
  1111. color: #FFFFFF;
  1112. margin: 0 auto;
  1113. text-align: center;
  1114. background: $btn-confirm;
  1115. margin-top: 96rpx;
  1116. &.none{
  1117. border: 1px solid $color-system;
  1118. background: #FFFFFF;
  1119. color:$color-system;
  1120. margin-top: 0;
  1121. }
  1122. &.sub{
  1123. margin-top: 0;
  1124. }
  1125. }
  1126. }
  1127. }
  1128. </style>