register.vue 31 KB

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