information.vue 34 KB

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