register.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  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" @blur="registerEmailInput" 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 === true ? 'disabled' : 'none']">
  27. <button class="row-input" type="button" @click.stop="getEmailCode" :disabled="isEmialDisabled">{{codeText}}</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" @blur="checkImgCode" placeholder="请输入图形验证码" maxlength="6"/>
  69. </view>
  70. <view class="register-from img-btn">
  71. <view class="vscodeimg">
  72. <image src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2158189919,2752757953&fm=26&gp=0.jpg" mode=""></image>
  73. </view>
  74. <view class="vscod-refresh">
  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 === true ? 'disabled' : 'none']">
  86. <button class="row-input" type="button" @click.stop="getMobileCode" :disabled="isMobileDisabled">获取验证码</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="clubContact" 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="clubContact" 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="clubContact" 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" 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" 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 URLCONFIG from '@/common/config/config.js'
  289. import { organizationRegister } from "@/api/use.js"
  290. import {
  291. queryEmailCode,
  292. queryMobileCode,
  293. ueryVerificationCode,
  294. checkVerificationCode,
  295. queryVerificationCode
  296. } from "@/api/utils.js"
  297. var self;
  298. export default{
  299. components:{
  300. uniTag,
  301. mpvueCityPicker
  302. },
  303. data() {
  304. return{
  305. registerEmail:'', //注册邮箱
  306. regEmailCode:'', //邮箱验证码
  307. isEmialDisabled: true, //验证码按钮控制
  308. isMobileDisabled: true, //手机验证码按钮控制
  309. count: '', //倒计时
  310. codeText: '获取验证码',
  311. codeTime: null,
  312. password:'', //密码
  313. passwordCheck:'', //校验密码
  314. clubName:'', //机构名称
  315. clubContact:'', //联系人
  316. registerMobile:'', //联系人手机号
  317. mobileCode:'', //手机验证码
  318. imageCode:'', //图形验证码
  319. isDisabled:true,
  320. tabCurrentIndex:1,
  321. isShowInput:false,
  322. isCheck:false, //是否全选
  323. uploadBusinessImage:'',
  324. uploadMentuzImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
  325. uploadMedicalImage:'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1431188283,1203112303&fm=26&gp=0.jpg',
  326. isOrganizationType:0,
  327. organizationTypeList:[
  328. {name:'请选择机构类型',value:0},
  329. {name:'医美',value:1},
  330. {name:'生美',value:2}
  331. ],
  332. beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
  333. mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
  334. medicaCampList:[
  335. {value:'1',name:'美容'},
  336. {value:'2',name:'美体'},
  337. {value:'3',name:'美发'},
  338. {value:'4',name:'皮肤管理'},
  339. {value:'5',name:'光电'},
  340. {value:'6',name:'综合类'},
  341. {value:'7',name:'中医养生'},
  342. {value:'8',name:'spa'}
  343. ],
  344. typtIndex:0,
  345. organizationType:0,
  346. current:0,
  347. isDepartment:false, //是否显示科室
  348. isShowAustomItem:false, //是否显示其他添加
  349. customItemValue:'', //自定义项目
  350. addressData:{
  351. addressID:'',
  352. address:'请选择机构所在地区',
  353. userID: '', //用户id ,只在新增收货地址时传
  354. shouHuoRen: '', //收货人
  355. mobile:'', //收货人手机
  356. townID:'', //区ID
  357. addressDetail: '', //地址
  358. defaultFlag:0, //是否默认收货地址(0 不是默认,1 默认)
  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. if( this.registerEmail == ''){
  375. this.$util.msg('请输入邮箱地址',2000);
  376. return
  377. }
  378. if(!this.$reg.isEmail(this.registerEmail)){
  379. this.$util.msg('请输入正确的邮箱地址',2000);
  380. return
  381. }
  382. if( this.regEmailCode == ''){
  383. this.$util.msg('请输入邮箱验证码',2000);
  384. return
  385. }
  386. if(!this.$reg.isEmailCode(this.regEmailCode)){
  387. this.$util.msg('请输入正确验证码',2000);
  388. return
  389. }
  390. if( this.password == ''){
  391. this.$util.msg('请输入密码',2000);
  392. return
  393. }
  394. if(!this.$reg.checkPwd(this.password)){
  395. this.$util.msg('密码必须为8-16位字母数字的组合',2000);
  396. return
  397. }
  398. if( this.passwordCheck != this.password){
  399. this.$util.msg('两次输入的密码不一致',2000);
  400. return
  401. }
  402. this.tabCurrentIndex = 2
  403. this.getVerificationCode()
  404. },
  405. registerStepsTwo(){
  406. if( this.clubName == ''){
  407. this.$util.msg('请输入机构名称',2000);
  408. return
  409. }
  410. if( this.clubContact == ''){
  411. this.$util.msg('请输入联系人名称',2000);
  412. return
  413. }
  414. if( this.registerMobile == ''){
  415. this.$util.msg('请输入手机号',2000);
  416. return
  417. }
  418. if(!this.$reg.isMobile(this.registerMobile)){
  419. this.$util.msg('手机格式不正确',2000);
  420. return
  421. }
  422. if( this.mobileCode == ''){
  423. this.$util.msg('请输入手机验证码',2000);
  424. return
  425. }
  426. if(!this.$reg.isMobileCode(this.mobileCode)){
  427. this.$util.msg('请输入正确验证码',2000);
  428. return
  429. }
  430. this.tabCurrentIndex = 3
  431. },
  432. registerStepsSub(){
  433. },
  434. getVerificationCode(){
  435. this.$api.get(queryVerificationCode,{}, res => {
  436. console.log(res)
  437. })
  438. },
  439. getEmailCode(){
  440. if(!this.$reg.isEmail(this.registerEmail)){
  441. this.$util.msg('请输入正确的邮箱地址',3000);
  442. console.log(this.$reg.isEmail(this.registerEmail))
  443. return
  444. }
  445. this.$api.get(queryEmailCode,{email:this.registerEmail,status:2}, res => {
  446. console.log(res)
  447. })
  448. const TIME_COUNT = 120;
  449.       if (!this.codeTime) {
  450.         this.count = TIME_COUNT;
  451.         this.isEmialDisabled = false;
  452.         this.codeTime = setInterval(() => {
  453.         if (this.count > 1 && this.count <= TIME_COUNT) {
  454.           this.count--
  455.           this.codeText = this.count +'s'
  456.          } else {
  457.           this.isEmialDisabled = true;
  458.           clearInterval(this.codeTime)
  459.           this.codeTime = null
  460. this.codeText = '获取验证码'
  461.          }
  462.         },1000)
  463.        }
  464. this.isEmialDisabled = true;
  465. },
  466. getMobileCode(){
  467. if(!this.$reg.isMobile(this.registerMobile)){
  468. this.$util.msg('请输入正确的手机号',3000);
  469. return
  470. }
  471. this.$api.get(queryMobileCode,{email:this.registerEmail,status:2}, res => {
  472. console.log(res)
  473. })
  474. const TIME_COUNT = 120;
  475.       if (!this.codeTime) {
  476.         this.count = TIME_COUNT;
  477.         this.isMobileDisabled = false;
  478.         this.codeTime = setInterval(() => {
  479.         if (this.count > 1 && this.count <= TIME_COUNT) {
  480.           this.count--
  481.           this.codeText = this.count +'s'
  482.          } else {
  483.           this.isMobileDisabled = true;
  484.           clearInterval(this.codeTime)
  485.           this.codeTime = null
  486. this.codeText = '获取验证码'
  487.          }
  488.         },1000)
  489.        }
  490. this.isMobileDisabled = true;
  491. },
  492. checkImgCode(e){
  493. this.$api.get(checkVerificationCode,{imagecode:imageCode}, res => {
  494. console.log(res)
  495. this.isMobileDisabled = false
  496. })
  497. },
  498. registerEmailInput(e){
  499. console.log(this.$reg.isEmail(e.detail.value))
  500. this.registerEmail = e.detail.value;
  501. if(!this.$reg.isEmail(this.registerEmail)){
  502. this.$util.msg('请输入正确的邮箱地址',2000);
  503. this.isEmialDisabled = true
  504. return
  505. }else{
  506. this.isEmialDisabled = false
  507. }
  508. },
  509. // 三级联动选择
  510. showMulLinkageThreePicker() {
  511. this.isShowInput = true
  512. this.$refs.mpvueCityPicker.show()
  513. },
  514. onConfirm(e) {
  515. // console.log('地址',e);
  516. this.addressData.address = e.name;
  517. this.addressData.townID = e.cityCode;
  518. },
  519. bindPickerChange(e) {
  520. console.log('picker发送选择改变,携带值为:' + e.target)
  521. this.typtIndex = e.target.value
  522. this.isOrganizationType = e.target.value
  523. },
  524. radioChange(e) {
  525. let _value = e.target.value
  526. if( _value == '2' || _value == '3'){
  527. this.isDepartment = true
  528. }else{
  529. this.isDepartment = false
  530. }
  531. for (let i = 0; i < this.beautyList.length; i++) {
  532. if (this.beautyList[i].value === _value) {
  533. this.current = i;
  534. break;
  535. }
  536. }
  537. },
  538. chooseMaleLike(e){
  539. let items = this.mentuzCampList
  540. let values = e.detail.value
  541. for (var i = 0, lenI = items.length; i < lenI; ++i) {
  542. const item = items[i]
  543. if(values.indexOf(item.value) >= 0){
  544. this.$set(item,'checked',true)
  545. }else{
  546. this.$set(item,'checked',false)
  547. }
  548. }
  549. },
  550. chooseMaleLikes(e){
  551. let items = this.medicaCampList
  552. let values = e.detail.value
  553. for (var i = 0, lenI = items.length; i < lenI; ++i) {
  554. const item = items[i]
  555. if(values.indexOf(item.value) >= 0){
  556. this.$set(item,'checked',true)
  557. }else{
  558. this.$set(item,'checked',false)
  559. }
  560. }
  561. },
  562. onTextareaInput(e){
  563. this.addressData.addressDetail = e.detail.value;
  564. // console.log(this.addressData.addressDetail)
  565. },
  566. chooseBusinessImage() {
  567. let self = this;
  568. uni.chooseImage({
  569. count: 1, //默认1
  570. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  571. sourceType: ['album','camera'], //从相册选择
  572. success: (res) => {
  573. const tempFilePaths = res.tempFilePaths;
  574. const uploadTask = uni.uploadFile({
  575. url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
  576. filePath: tempFilePaths[0],
  577. name: 'file',
  578. formData: {
  579. 'user': 'test'
  580. },
  581. success: function (data) {
  582. console.log(data.data);
  583. self.uploadBusinessImage = res.tempFilePaths
  584. },
  585. error : function(e){
  586. console.log(e);
  587. }
  588. })
  589. },
  590. })
  591. },
  592. chooseMentuzImage() {
  593. let self = this;
  594. uni.chooseImage({
  595. count: 1, //默认1
  596. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  597. sourceType: ['album','camera'], //从相册选择
  598. success: (res) => {
  599. const tempFilePaths = res.tempFilePaths;
  600. const uploadTask = uni.uploadFile({
  601. url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
  602. filePath: tempFilePaths[0],
  603. name: 'file',
  604. formData: {
  605. 'user': 'test'
  606. },
  607. success: function (res) {
  608. console.log(res.data);
  609. self.uploadMentuzImage = res.data
  610. },
  611. error : function(e){
  612. console.log(e);
  613. }
  614. })
  615. }
  616. });
  617. },
  618. chooseMedicalImage() {
  619. let self = this;
  620. uni.chooseImage({
  621. count: 1, //默认1
  622. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  623. sourceType: ['album','camera'], //从相册选择
  624. success: (res) => {
  625. const tempFilePaths = res.tempFilePaths;
  626. const uploadTask = uni.uploadFile({
  627. url : 'https://mall-b.caimei365.com/formData/MultiPictareaddData',
  628. filePath: tempFilePaths[0],
  629. name: 'file',
  630. formData: {
  631. 'user': 'test'
  632. },
  633. success: function (res) {
  634. console.log(res.data);
  635. self.uploadMedicalImage = res.data
  636. },
  637. error : function(e){
  638. console.log(e);
  639. }
  640. })
  641. }
  642. });
  643. },
  644. viewMentuzImage(e) {
  645. let self = this
  646. uni.previewImage({
  647. urls: self.uploadMentuzImage,
  648. current: e.currentTarget.dataset.url
  649. });
  650. },
  651. viewBusinessImage(e) {
  652. let self = this
  653. uni.previewImage({
  654. urls: self.uploadBusinessImage,
  655. current: e.currentTarget.dataset.url
  656. });
  657. },
  658. viewMedicalImage(e) {
  659. let self = this
  660. uni.previewImage({
  661. urls: self.uploadMedicalImage,
  662. current: e.currentTarget.dataset.url
  663. });
  664. },
  665. delBusinessImage(){
  666. this.uploadBusinessImage = ''
  667. },
  668. delMentuzImage(){
  669. this.uploadMentuzImage = ''
  670. },
  671. delMedicalImage(){
  672. this.uploadMedicalImage = ''
  673. },
  674. agreeCheck() {
  675. this.isCheck = !this.isCheck
  676. },
  677. onBlurInput(e){//
  678. if(e.detail.value ===''){
  679. this.isDisabled = true
  680. }else{
  681. this.isDisabled = false
  682. }
  683. },
  684. showAustomItem() {
  685. this.isShowAustomItem = !this.isShowAustomItem
  686. },
  687. addCustomItem(){
  688. if(this.isOrganizationType == 1){
  689. let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
  690. this.mentuzCampList.push(item)
  691. }else{
  692. let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
  693. this.medicaCampList.push(item)
  694. }
  695. },
  696. steps(index) {//$attrstab切换
  697. console.log(index)
  698. this.tabCurrentIndex = index;
  699. }
  700. }
  701. }
  702. </script>
  703. <style lang="scss">
  704. .register{
  705. width: 100%;
  706. height: auto;
  707. border-top: 1px solid #F7F7F7;
  708. .model-warp.none{
  709. display: none;
  710. }
  711. .model-warp.show{
  712. display: block;
  713. }
  714. .register-tab{
  715. width: 570rpx;
  716. height: 60rpx;
  717. padding: 60rpx 90rpx;
  718. position: relative;
  719. .nav-item{
  720. width: 142rpx;
  721. background: #FFFFFF;
  722. line-height: 60rpx;
  723. border-radius: 30rpx;
  724. text-align: center;
  725. color: #999999;
  726. font-size:$font-size-26;
  727. float: left;
  728. margin-right: 72rpx;
  729. position: relative;
  730. .line{
  731. height: 3rpx;
  732. width: 50rpx;
  733. background: #999999;
  734. position: absolute;
  735. right: -58rpx;
  736. top: 32rpx;
  737. }
  738. &:last-child{
  739. margin-right: 0;
  740. }
  741. &.current{
  742. color:#FFFFFF;
  743. background: $color-system;
  744. }
  745. }
  746. }
  747. .register-main{
  748. width: 100%;
  749. height: auto;
  750. &.detailed{
  751. padding-bottom: 330rpx;
  752. }
  753. .register-tips{
  754. display: flex;
  755. flex-direction: column;
  756. align-items: center;
  757. line-height: 44rpx;
  758. font-size: $font-size-24;
  759. color: #FF0000;
  760. margin-bottom: 40rpx;
  761. .iconfont{
  762. font-size: $font-size-24;
  763. }
  764. }
  765. .register-row{
  766. width: 702rpx;
  767. height: auto;
  768. padding: 0 24rpx;
  769. margin-bottom: 20rpx;
  770. .register-from{
  771. width: 654rpx;
  772. height: 40rpx;
  773. padding: 24rpx;
  774. background: $sub-bg-color;
  775. border-radius: 14rpx;
  776. position: relative;
  777. .label{
  778. text-align: left;
  779. font-size: $font-size-28;
  780. color: $text-color;
  781. line-height: 40rpx;
  782. float: left;
  783. }
  784. .row-input{
  785. width: 440rpx;
  786. padding-left:10rpx;
  787. font-size: $font-size-28;
  788. color: $text-color;
  789. line-height: 40rpx;
  790. float: left;
  791. height: 40rpx;
  792. &.none{
  793. color: #999999;
  794. }
  795. &.keshi{
  796. width: 550rpx;
  797. }
  798. }
  799. &.img-btn{
  800. width: 220rpx;
  801. height: 88rpx;
  802. padding: 0;
  803. float: left;
  804. background: #FFFFFF;
  805. display: block;
  806. .vscodeimg{
  807. width: 150rpx;
  808. height: 88rpx;
  809. float: left;
  810. display: flex;
  811. flex-direction: column;
  812. align-items: center;
  813. border-radius: 14rpx;
  814. image{
  815. width: 150rpx;
  816. height: 88rpx;
  817. border-radius: 14rpx;
  818. }
  819. }
  820. .vscod-refresh{
  821. width: 70rpx;
  822. float: right;
  823. text-align: right;
  824. display: flex;
  825. flex-direction: column;
  826. align-items: center;
  827. line-height: 44rpx;
  828. .icon-shuaxin{
  829. font-size: 48rpx;
  830. color: #333333;
  831. }
  832. .ref-text{
  833. font-size: 24rpx;
  834. color: #333333;
  835. }
  836. }
  837. }
  838. &.imgcode{
  839. width: 410rpx;
  840. float: left;
  841. margin-right: 20rpx;
  842. .row-input{
  843. width: 230rpx;
  844. }
  845. }
  846. &.code{
  847. width: 410rpx;
  848. float: left;
  849. margin-right: 20rpx;
  850. .row-input{
  851. width: 230rpx;
  852. }
  853. }
  854. &.btn{
  855. width: 176rpx;
  856. float: left;
  857. .row-input{
  858. width: 176rpx;
  859. padding: 0;
  860. background: #F7F7F7;
  861. text-align: center;
  862. }
  863. &.none{
  864. background: $btn-confirm;
  865. .row-input{
  866. color: #FFFFFF;
  867. background: $btn-confirm;
  868. }
  869. }
  870. &.disabled{
  871. .row-input{
  872. color: #999999;
  873. }
  874. }
  875. }
  876. &.picker{
  877. padding: 0 24rpx;
  878. width: 654rpx;
  879. height: 88rpx;
  880. line-height: 88rpx;
  881. .label{
  882. line-height: 88rpx;
  883. }
  884. .row-input{
  885. width: 470rpx;
  886. height: 88rpx;
  887. line-height: 88rpx;
  888. padding-left: 30rpx;
  889. }
  890. }
  891. &.radio{
  892. padding: 0 24rpx;
  893. width: 654rpx;
  894. height: 288rpx;
  895. .row-input{
  896. width: 100%;
  897. height: 88rpx;
  898. line-height: 88rpx;
  899. padding-left: 0;
  900. }
  901. .row-radio{
  902. float: left;
  903. }
  904. .row-text{
  905. width: 100rpx;
  906. text-align: center;
  907. float: left;
  908. }
  909. }
  910. &.group{
  911. padding: 0 24rpx;
  912. width: 654rpx;
  913. height: auto;
  914. background: #FFFFFF;
  915. margin-top: 30rpx;
  916. .row-input{
  917. width: 100%;
  918. height: 88rpx;
  919. line-height: 88rpx;
  920. padding-left: 0;
  921. }
  922. .row-radio{
  923. float: left;
  924. }
  925. .row-text{
  926. width: 100rpx;
  927. text-align: center;
  928. float: left;
  929. }
  930. }
  931. &.btn{
  932. margin-top: 0;
  933. }
  934. .content-class {
  935. width: 520rpx;
  936. margin: 20rpx auto;
  937. display: flex;
  938. flex-flow: row wrap;
  939. justify-content: space-between;
  940. &.btn{
  941. margin: 0 auto;
  942. margin-left: 126rpx;
  943. }
  944. .row-input{
  945. display: flex;
  946. width: 220rpx;
  947. height: 40rpx;
  948. padding: 24rpx;
  949. text-align: left;
  950. border-radius: 10rpx;
  951. font-size: $font-size-28;
  952. color: $text-color;
  953. }
  954. .confirm-btn{
  955. width: 200rpx;
  956. height: 88rpx;
  957. border-radius: 10rpx;
  958. line-height: 88rpx;
  959. text-align: center;
  960. &.none{
  961. color: #FFFFFF;
  962. background: $btn-confirm;
  963. }
  964. &.disabled{
  965. color: #999999;
  966. }
  967. }
  968. .item {
  969. width: 156rpx;
  970. height: 60rpx;
  971. font-size:$font-size-28;
  972. line-height: 60rpx;
  973. border-radius:10rpx;
  974. margin-bottom: 20rpx;
  975. text-align: center;
  976. box-sizing: border-box;
  977. border: 1rpx solid #EFEFEF;
  978. checkbox {
  979. display: none;
  980. }
  981. }
  982. .on {
  983. border-color: $color-system;
  984. color:$color-system;
  985. }
  986. }
  987. }
  988. .icon-xiayibu{
  989. width: 88rpx;
  990. height: 88rpx;
  991. position: absolute;
  992. right: 0;
  993. top: 0;
  994. line-height: 88rpx;
  995. text-align: center;
  996. }
  997. &.text-textarea{
  998. background: #FFFFFF;
  999. .textarea{
  1000. width: 654rpx;
  1001. height: 180rpx;
  1002. background: #F7F7F7;
  1003. padding: 24rpx;
  1004. font-size: $font-size-28;
  1005. color: $text-color;
  1006. z-index: 1;
  1007. border-radius: 14rpx;
  1008. }
  1009. .textarea.hide{
  1010. opacity: 0;
  1011. }
  1012. .textarea.show{
  1013. color: #999999;
  1014. }
  1015. }
  1016. }
  1017. .register-picture{
  1018. height: 102rpx;
  1019. margin: 40rpx 0 0 0;
  1020. .label{
  1021. float: left;
  1022. font-size: $font-size-28;
  1023. color: $text-color;
  1024. line-height: 102rpx;
  1025. width: 150rpx;
  1026. text-align: right;
  1027. &.zz{
  1028. width: 230rpx;
  1029. }
  1030. }
  1031. .upload-picture{
  1032. float: left;
  1033. height: 100rpx;
  1034. .upload-none{
  1035. width: 100rpx;
  1036. height: 100rpx;
  1037. text-align: center;
  1038. line-height: 100rpx;
  1039. color: #999999;
  1040. border: 1px solid #999999;
  1041. border-radius: 10rpx;
  1042. margin: 0 20rpx;
  1043. .iconfont{
  1044. font-size: $font-size-28;
  1045. }
  1046. }
  1047. .upload-image{
  1048. width: 100rpx;
  1049. height: 100rpx;
  1050. border-radius: 10rpx;
  1051. margin: 0 20rpx;
  1052. position: relative;
  1053. image{
  1054. width: 100rpx;
  1055. height: 100rpx;
  1056. border-radius: 10rpx;
  1057. }
  1058. .upload-del{
  1059. width: 40rpx;
  1060. height: 40rpx;
  1061. position: absolute;
  1062. top: -20rpx;
  1063. right: -20rpx;
  1064. line-height: 40rpx;
  1065. text-align: center;
  1066. .iconfont{
  1067. font-size: $font-size-32;
  1068. color: #999999;
  1069. }
  1070. }
  1071. }
  1072. }
  1073. }
  1074. .register-input{
  1075. width: 654rpx;
  1076. height: 40rpx;
  1077. padding: 24rpx;
  1078. margin: 0 auto;
  1079. margin-bottom: 60rpx;
  1080. background: #F7F7F7;
  1081. border-radius: 14rpx;
  1082. .input{
  1083. width: 100%;
  1084. height: 100%;
  1085. background: #F7F7F7;
  1086. font-size: $font-size-28;
  1087. line-height: 40rpx;
  1088. color: #333333;
  1089. border-radius: 14rpx;
  1090. }
  1091. }
  1092. .register-fiexd{
  1093. width: 100%;
  1094. height: auto;
  1095. position: fixed;
  1096. bottom: 0;
  1097. left: 0;
  1098. z-index: 999;
  1099. background: #FFFFFF;
  1100. .register-agree{
  1101. display: flex;
  1102. flex-direction: column;
  1103. align-items: center;
  1104. margin: 32rpx 0;
  1105. .agree-text{
  1106. .checkbox{
  1107. float: left;
  1108. margin: 4rpx 6rpx 0 0;
  1109. color: #999999;
  1110. font-size: $font-size-32;
  1111. &.icon-gouxuan{
  1112. color: $color-system;
  1113. }
  1114. }
  1115. font-size: 20rpx;
  1116. line-height: 44rpx;
  1117. color: #999999;
  1118. text{
  1119. color:#0091FF;
  1120. }
  1121. }
  1122. }
  1123. }
  1124. .register-btn{
  1125. width: 702rpx;
  1126. height: 88rpx;
  1127. border-radius: 14rpx;
  1128. font-size: $font-size-28;
  1129. line-height: 88rpx;
  1130. color: #FFFFFF;
  1131. margin: 0 auto;
  1132. text-align: center;
  1133. background: $btn-confirm;
  1134. margin-top: 96rpx;
  1135. &.none{
  1136. background: #FFFFFF;
  1137. color: $text-color;
  1138. margin-top: 0;
  1139. }
  1140. &.sub{
  1141. margin-top: 0;
  1142. }
  1143. }
  1144. }
  1145. }
  1146. </style>