register.vue 32 KB

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