information.vue 34 KB

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