register.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  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="getVerificationCode">
  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. // 三级联动选择
  497. showMulLinkageThreePicker() {
  498. this.isShowInput = true
  499. this.$refs.mpvueCityPicker.show()
  500. },
  501. onConfirm(e) {
  502. console.log('地址',e);
  503. this.addressData.address = e.name;
  504. this.addressData.townID = e.townCode;
  505. this.addressData.cityID = e.cityCode;
  506. this.addressData.provinceID = e.provinceCode;
  507. },
  508. onTextareaInput(e){
  509. this.addressData.addressDetail = e.detail.value;
  510. },
  511. chooseBusinessImage() {//营业执照图片上传
  512. uploadFileImage().then(res =>{
  513. this.uploadBusinessImage = JSON.parse(res.data).data
  514. })
  515. },
  516. chooseMentuzImage() {//门头照图片上传
  517. uploadFileImage().then(res =>{
  518. this.uploadMentuzImage = JSON.parse(res.data).data
  519. })
  520. },
  521. chooseMedicalImage() {//资质照图片上传
  522. uploadFileImage().then(res =>{
  523. this.uploadMedicalImage = JSON.parse(res.data).data
  524. })
  525. },
  526. viewBusinessImage(e) {
  527. this.myPreviewImageFn(this.uploadBusinessImage)
  528. },
  529. viewMentuzImage(e) {
  530. this.myPreviewImageFn(this.uploadMentuzImage)
  531. },
  532. viewMedicalImage(e) {
  533. this.myPreviewImageFn(this.uploadMedicalImage)
  534. },
  535. myPreviewImageFn(url){
  536. this.isPreviewImage = true
  537. let mentuzArray = []
  538. mentuzArray.push(url)
  539. uni.previewImage({
  540. urls: mentuzArray,
  541. current: 0
  542. });
  543. },
  544. delBusinessImage(){
  545. this.uploadBusinessImage = ''
  546. },
  547. delMentuzImage(){
  548. this.uploadMentuzImage = ''
  549. },
  550. delMedicalImage(){
  551. this.uploadMedicalImage = ''
  552. },
  553. bindPickerChange(e) {
  554. console.log('picker携带值为:' + e.target.value)
  555. this.typtIndex = e.target.value
  556. this.isOrganizationType = e.target.value
  557. },
  558. radioChange(e) {
  559. this.secondClubType = e.target.value;
  560. if( this.secondClubType == '2' || this.secondClubType == '3'){
  561. this.isDepartment = true
  562. }else{
  563. this.isDepartment = false
  564. }
  565. for (let i = 0; i < this.beautyList.length; i++) {
  566. if (this.beautyList[i].value === this.secondClubType) {
  567. this.current = i;
  568. break;
  569. }
  570. }
  571. },
  572. chooseMaleLike(e){
  573. this.mainpro = this.checkLikes(e,this.mentuzCampList)
  574. console.log(this.mainpro)
  575. },
  576. chooseMaleLikes(e){
  577. this.mainpro = this.checkLikes(e,this.medicaCampList)
  578. console.log(this.mainpro)
  579. },
  580. checkLikes(e,list){
  581. let items = list
  582. let values = e.detail.value
  583. let arr = []
  584. for (let i = 0, lenI = items.length; i < lenI; ++i) {
  585. const item = items[i]
  586. if(values.indexOf(item.value) >= 0){
  587. this.$set(item,'checked',true)
  588. arr.push(item.name)
  589. }else{
  590. this.$set(item,'checked',false)
  591. }
  592. }
  593. return arr.toString()
  594. },
  595. agreeCheck() {
  596. this.isCheck = !this.isCheck
  597. if(this.isCheck){
  598. this.isAgreed = 1
  599. }
  600. },
  601. onBlurInput(e){//
  602. if(e.detail.value ===''){
  603. this.isDisabled = true
  604. }else{
  605. this.isDisabled = false
  606. }
  607. },
  608. showAustomItem() {
  609. this.isShowAustomItem = !this.isShowAustomItem
  610. },
  611. addCustomItem(){
  612. if(this.isOrganizationType == 1){
  613. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
  614. this.mentuzCampList.push(item)
  615. }else{
  616. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
  617. this.medicaCampList.push(item)
  618. }
  619. },
  620. steps(index) {//$attrstab切换
  621. console.log(index)
  622. this.tabCurrentIndex = index;
  623. }
  624. },
  625. onShow() {
  626. if(this.isPreviewImage){
  627. this.isPreviewImage = false
  628. return
  629. }
  630. }
  631. }
  632. </script>
  633. <style lang="scss">
  634. .register{
  635. width: 100%;
  636. height: auto;
  637. border-top: 1px solid #F7F7F7;
  638. .model-warp.none{
  639. display: none;
  640. }
  641. .model-warp.show{
  642. display: block;
  643. }
  644. .register-tab{
  645. width: 570rpx;
  646. height: 60rpx;
  647. padding: 60rpx 90rpx;
  648. position: relative;
  649. .nav-item{
  650. width: 142rpx;
  651. background: #FFFFFF;
  652. line-height: 60rpx;
  653. border-radius: 30rpx;
  654. text-align: center;
  655. color: #999999;
  656. font-size:$font-size-26;
  657. float: left;
  658. margin-right: 72rpx;
  659. position: relative;
  660. .line{
  661. height: 3rpx;
  662. width: 50rpx;
  663. background: #999999;
  664. position: absolute;
  665. right: -58rpx;
  666. top: 32rpx;
  667. }
  668. &:last-child{
  669. margin-right: 0;
  670. }
  671. &.current{
  672. color:#FFFFFF;
  673. background: $color-system;
  674. }
  675. }
  676. }
  677. .register-main{
  678. width: 100%;
  679. height: auto;
  680. &.detailed{
  681. padding-bottom: 330rpx;
  682. }
  683. .register-tips{
  684. display: flex;
  685. flex-direction: column;
  686. align-items: center;
  687. line-height: 44rpx;
  688. font-size: $font-size-24;
  689. color: #FF0000;
  690. margin-bottom: 40rpx;
  691. .iconfont{
  692. font-size: $font-size-24;
  693. }
  694. }
  695. .register-row{
  696. width: 702rpx;
  697. height: auto;
  698. padding: 0 24rpx;
  699. margin-bottom: 20rpx;
  700. .register-from{
  701. width: 654rpx;
  702. height: 40rpx;
  703. padding: 24rpx;
  704. background: $sub-bg-color;
  705. border-radius: 14rpx;
  706. position: relative;
  707. .label{
  708. text-align: left;
  709. font-size: $font-size-28;
  710. color: $text-color;
  711. line-height: 40rpx;
  712. float: left;
  713. }
  714. .row-input{
  715. width: 440rpx;
  716. padding-left:10rpx;
  717. font-size: $font-size-28;
  718. color: $text-color;
  719. line-height: 40rpx;
  720. float: left;
  721. height: 40rpx;
  722. &.none{
  723. color: #999999;
  724. }
  725. &.keshi{
  726. width: 550rpx;
  727. }
  728. }
  729. &.img-btn{
  730. width: 220rpx;
  731. height: 88rpx;
  732. padding: 0;
  733. float: left;
  734. background: #FFFFFF;
  735. display: block;
  736. .vscodeimg{
  737. width: 150rpx;
  738. height: 88rpx;
  739. float: left;
  740. display: flex;
  741. flex-direction: column;
  742. align-items: center;
  743. border-radius: 14rpx;
  744. image{
  745. width: 150rpx;
  746. height: 88rpx;
  747. border-radius: 14rpx;
  748. }
  749. }
  750. .vscod-refresh{
  751. width: 70rpx;
  752. float: right;
  753. text-align: right;
  754. display: flex;
  755. flex-direction: column;
  756. align-items: center;
  757. line-height: 44rpx;
  758. .icon-shuaxin{
  759. font-size: 48rpx;
  760. color: #333333;
  761. }
  762. .ref-text{
  763. font-size: 24rpx;
  764. color: #333333;
  765. }
  766. }
  767. }
  768. &.imgcode{
  769. width: 410rpx;
  770. float: left;
  771. margin-right: 20rpx;
  772. .row-input{
  773. width: 230rpx;
  774. }
  775. }
  776. &.code{
  777. width: 410rpx;
  778. float: left;
  779. margin-right: 20rpx;
  780. .row-input{
  781. width: 230rpx;
  782. }
  783. }
  784. &.btn{
  785. width: 176rpx;
  786. float: left;
  787. background: $btn-confirm;
  788. .row-input{
  789. width: 176rpx;
  790. padding: 0;
  791. color: #FFFFFF;
  792. background: $btn-confirm;
  793. text-align: center;
  794. &.none{
  795. background: #F7F7F7;
  796. }
  797. }
  798. &.disabled{
  799. background: #F7F7F7;
  800. .row-input{
  801. background: #F7F7F7;
  802. color: #999999;
  803. }
  804. }
  805. }
  806. &.picker{
  807. padding: 0 24rpx;
  808. width: 654rpx;
  809. height: 88rpx;
  810. line-height: 88rpx;
  811. .label{
  812. line-height: 88rpx;
  813. }
  814. .row-input{
  815. width: 470rpx;
  816. height: 88rpx;
  817. line-height: 88rpx;
  818. padding-left: 30rpx;
  819. }
  820. }
  821. &.radio{
  822. padding: 0 24rpx;
  823. width: 654rpx;
  824. height: 288rpx;
  825. .row-input{
  826. width: 100%;
  827. height: 88rpx;
  828. line-height: 88rpx;
  829. padding-left: 0;
  830. }
  831. .row-radio{
  832. float: left;
  833. transform: scale(0.8);
  834. }
  835. .row-text{
  836. width: 100rpx;
  837. text-align: center;
  838. float: left;
  839. }
  840. }
  841. &.group{
  842. padding: 0 24rpx;
  843. width: 654rpx;
  844. height: auto;
  845. background: #FFFFFF;
  846. margin-top: 30rpx;
  847. .row-input{
  848. width: 100%;
  849. height: 88rpx;
  850. line-height: 88rpx;
  851. padding-left: 0;
  852. }
  853. .row-radio{
  854. float: left;
  855. }
  856. .row-text{
  857. width: 100rpx;
  858. text-align: center;
  859. float: left;
  860. }
  861. }
  862. &.btn{
  863. margin-top: 0;
  864. }
  865. .content-class {
  866. width: 520rpx;
  867. margin: 20rpx auto;
  868. display: flex;
  869. flex-flow: row wrap;
  870. justify-content: space-between;
  871. &.btn{
  872. margin: 0 auto;
  873. margin-left: 126rpx;
  874. }
  875. .row-input{
  876. display: flex;
  877. width: 220rpx;
  878. height: 40rpx;
  879. padding: 24rpx;
  880. text-align: left;
  881. border-radius: 10rpx;
  882. font-size: $font-size-28;
  883. color: $text-color;
  884. }
  885. .confirm-btn{
  886. width: 200rpx;
  887. height: 88rpx;
  888. border-radius: 10rpx;
  889. line-height: 88rpx;
  890. text-align: center;
  891. &.none{
  892. color: #FFFFFF;
  893. background: $btn-confirm;
  894. }
  895. &.disabled{
  896. color: #999999;
  897. }
  898. }
  899. .item {
  900. width: 156rpx;
  901. height: 60rpx;
  902. font-size:$font-size-28;
  903. line-height: 60rpx;
  904. border-radius:10rpx;
  905. margin-bottom: 20rpx;
  906. text-align: center;
  907. box-sizing: border-box;
  908. border: 1rpx solid #EFEFEF;
  909. checkbox {
  910. display: none;
  911. }
  912. }
  913. .on {
  914. border-color: $color-system;
  915. color:$color-system;
  916. }
  917. }
  918. }
  919. .icon-xiayibu{
  920. width: 88rpx;
  921. height: 88rpx;
  922. position: absolute;
  923. right: 0;
  924. top: 0;
  925. line-height: 88rpx;
  926. text-align: center;
  927. }
  928. &.text-textarea{
  929. background: #FFFFFF;
  930. .textarea{
  931. width: 654rpx;
  932. height: 180rpx;
  933. background: #F7F7F7;
  934. padding: 24rpx;
  935. font-size: $font-size-28;
  936. color: $text-color;
  937. z-index: 1;
  938. border-radius: 14rpx;
  939. }
  940. .textarea.hide{
  941. opacity: 0;
  942. }
  943. .textarea.show{
  944. color: #999999;
  945. }
  946. }
  947. }
  948. .register-picture{
  949. height: 102rpx;
  950. margin: 40rpx 0 0 0;
  951. .label{
  952. float: left;
  953. font-size: $font-size-28;
  954. color: $text-color;
  955. line-height: 102rpx;
  956. width: 150rpx;
  957. text-align: right;
  958. &.zz{
  959. width: 230rpx;
  960. }
  961. }
  962. .upload-picture{
  963. float: left;
  964. height: 100rpx;
  965. .upload-none{
  966. width: 100rpx;
  967. height: 100rpx;
  968. text-align: center;
  969. line-height: 100rpx;
  970. color: #999999;
  971. border: 1px solid #999999;
  972. border-radius: 10rpx;
  973. margin: 0 20rpx;
  974. .iconfont{
  975. font-size: $font-size-28;
  976. }
  977. }
  978. .upload-image{
  979. width: 100rpx;
  980. height: 100rpx;
  981. border-radius: 10rpx;
  982. margin: 0 20rpx;
  983. position: relative;
  984. image{
  985. width: 100rpx;
  986. height: 100rpx;
  987. border-radius: 10rpx;
  988. }
  989. .upload-del{
  990. width: 40rpx;
  991. height: 40rpx;
  992. position: absolute;
  993. top: -20rpx;
  994. right: -20rpx;
  995. line-height: 40rpx;
  996. text-align: center;
  997. .iconfont{
  998. font-size: $font-size-32;
  999. color: #999999;
  1000. }
  1001. }
  1002. }
  1003. }
  1004. }
  1005. .register-input{
  1006. width: 654rpx;
  1007. height: 40rpx;
  1008. padding: 24rpx;
  1009. margin: 0 auto;
  1010. margin-bottom: 60rpx;
  1011. background: #F7F7F7;
  1012. border-radius: 14rpx;
  1013. .input{
  1014. width: 100%;
  1015. height: 100%;
  1016. background: #F7F7F7;
  1017. font-size: $font-size-28;
  1018. line-height: 40rpx;
  1019. color: #333333;
  1020. border-radius: 14rpx;
  1021. }
  1022. }
  1023. .register-fiexd{
  1024. width: 100%;
  1025. height: auto;
  1026. position: fixed;
  1027. bottom: 0;
  1028. left: 0;
  1029. z-index: 999;
  1030. background: #FFFFFF;
  1031. .register-agree{
  1032. display: flex;
  1033. flex-direction: column;
  1034. align-items: center;
  1035. margin: 32rpx 0;
  1036. .agree-text{
  1037. .checkbox{
  1038. float: left;
  1039. margin: 4rpx 6rpx 0 0;
  1040. color: #999999;
  1041. font-size: $font-size-32;
  1042. &.icon-gouxuan{
  1043. color: $color-system;
  1044. }
  1045. }
  1046. font-size: 20rpx;
  1047. line-height: 44rpx;
  1048. color: #999999;
  1049. text{
  1050. color:#0091FF;
  1051. }
  1052. }
  1053. }
  1054. }
  1055. .register-btn{
  1056. width: 702rpx;
  1057. height: 88rpx;
  1058. border-radius: 14rpx;
  1059. font-size: $font-size-28;
  1060. line-height: 88rpx;
  1061. color: #FFFFFF;
  1062. margin: 0 auto;
  1063. text-align: center;
  1064. background: $btn-confirm;
  1065. margin-top: 96rpx;
  1066. &.none{
  1067. background: #FFFFFF;
  1068. color: $text-color;
  1069. margin-top: 0;
  1070. }
  1071. &.sub{
  1072. margin-top: 0;
  1073. }
  1074. }
  1075. }
  1076. }
  1077. </style>