register.vue 33 KB

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