information.vue 34 KB

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