register.vue 30 KB

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