|
@@ -1,15 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view class="container register">
|
|
<view class="container register">
|
|
<view class="register-main first clearfix">
|
|
<view class="register-main first clearfix">
|
|
- <view class="register-row">
|
|
|
|
- <view class="register-title">账户信息</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="register-row clearfix">
|
|
|
|
- <view class="register-from">
|
|
|
|
- <view class="label">邮箱:</view>
|
|
|
|
- <view class="row-input">{{ email }}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
<view class="register-row">
|
|
<view class="register-row">
|
|
<view class="register-title">基本信息</view>
|
|
<view class="register-title">基本信息</view>
|
|
</view>
|
|
</view>
|
|
@@ -25,34 +16,6 @@
|
|
<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
|
|
<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="register-row clearfix">
|
|
|
|
- <view class="register-from">
|
|
|
|
- <view class="label">手机号:</view>
|
|
|
|
- <input class="row-input" type="number" disabled="true" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
|
|
|
|
- <view class="row-btn" @click="showCheckPhone">{{ isShowCheckPhone ? '取消修改' : '修改手机号' }}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="register-row clearfix" v-show="isShowCheckPhone">
|
|
|
|
- <view class="register-from code">
|
|
|
|
- <input class="row-input" type="number" v-model="mobileCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
|
|
|
|
- </view>
|
|
|
|
- <view class="register-from btn" :class="[isMobileDisabled ? 'disabled' : '']">
|
|
|
|
- <button class="row-input" type="button" @click.stop="getMobileCodeFn" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="register-row clearfix" v-show="isShowCheckPhone">
|
|
|
|
- <view class="register-from">
|
|
|
|
- <input class="row-input" type="number" v-model="newMobile" placeholder="请输入新手机号" maxlength="11"/>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="register-row clearfix" v-show="isShowCheckPhone">
|
|
|
|
- <view class="register-from code">
|
|
|
|
- <input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
|
|
|
|
- </view>
|
|
|
|
- <view class="register-from btn" :class="[isNewMobileDisabled ? 'disabled' : '']" >
|
|
|
|
- <button class="row-input" type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
</view>
|
|
</view>
|
|
<view class="register-main clearfix" >
|
|
<view class="register-main clearfix" >
|
|
<view class="register-row">
|
|
<view class="register-row">
|
|
@@ -127,10 +90,6 @@
|
|
<view class="label">机构类型:</view>
|
|
<view class="label">机构类型:</view>
|
|
<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
|
|
<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
|
|
<text class="iconfont icon-xiayibu"></text>
|
|
<text class="iconfont icon-xiayibu"></text>
|
|
-<!-- <picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
|
|
|
|
- <view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
|
|
|
|
- </picker>
|
|
|
|
- -->
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="register-row clearfix" v-if="isOrganizationType == 1">
|
|
<view class="register-row clearfix" v-if="isOrganizationType == 1">
|
|
@@ -273,8 +232,9 @@
|
|
<script>
|
|
<script>
|
|
import { mapMutations } from 'vuex';
|
|
import { mapMutations } from 'vuex';
|
|
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
|
|
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
|
|
- import { organizationUpdateModifyInfo , organizationUpdate } from "@/api/use.js"
|
|
|
|
- import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js"
|
|
|
|
|
|
+ import { organizationUpdateModifyInfo } from "@/api/use.js"
|
|
|
|
+ import { uploadFileImage } from "@/api/utils.js"
|
|
|
|
+ import { sellerClubUpdate } from "@/api/seller.js"
|
|
var self;
|
|
var self;
|
|
export default{
|
|
export default{
|
|
components:{
|
|
components:{
|
|
@@ -282,27 +242,13 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return{
|
|
return{
|
|
- isShowCheckPhone:false, //是否显示修改手机
|
|
|
|
- tabCurrentIndex:3,
|
|
|
|
- isPreviewImage:false, //预览图片开关
|
|
|
|
- isMobileDisabled: false, //手机验证码按钮控制
|
|
|
|
- isNewMobileDisabled: false, //手机验证码按钮控制
|
|
|
|
- userID:'', //用户ID
|
|
|
|
- clubID:'', //会所ID
|
|
|
|
- email:'', //邮箱
|
|
|
|
- count: '', //倒计时
|
|
|
|
- newCount: '', //倒计时
|
|
|
|
- codeTime: null,
|
|
|
|
- codeTimeNew: null,
|
|
|
|
- clubName:'', //机构名称
|
|
|
|
- abbreviation:'', //机构简称
|
|
|
|
- clubContact:'', //联系人
|
|
|
|
- mobile:'', //联系人手机号
|
|
|
|
- newMobile:'', //新联系人手机号
|
|
|
|
- mobileCode:'', //手机号验证码
|
|
|
|
- newMobileCode:'', //新手机号手机验证码
|
|
|
|
- mobileCodeText: '获取验证码',
|
|
|
|
- newMobileCodeText: '获取验证码',
|
|
|
|
|
|
+ isPreviewImage:false, //预览图片开关
|
|
|
|
+ userID:'', //机构的userID
|
|
|
|
+ clubID:'', //会所ID
|
|
|
|
+ email:'', //邮箱
|
|
|
|
+ clubName:'', //机构名称
|
|
|
|
+ abbreviation:'', //机构简称
|
|
|
|
+ clubContact:'', //联系人
|
|
socialCreditCode:'', //统一社会信用代码
|
|
socialCreditCode:'', //统一社会信用代码
|
|
isAgreed:0, //是否勾选协议
|
|
isAgreed:0, //是否勾选协议
|
|
isDisabled:true,
|
|
isDisabled:true,
|
|
@@ -340,85 +286,77 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
|
+ console.log(option)
|
|
|
|
+ this.userID = option.id
|
|
this.organizationInfo()
|
|
this.organizationInfo()
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
- hanldNavigateBack(){
|
|
|
|
- this.$util.modal('','确定放弃本次修改吗?','确定','取消',true,() =>{
|
|
|
|
- uni.navigateBack({
|
|
|
|
- delta: 1
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
organizationInfo(){
|
|
organizationInfo(){
|
|
- this.$api.getStorage().then((resolve) =>{
|
|
|
|
- this.userID = resolve.userID
|
|
|
|
- organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
|
|
|
|
- let organizationClub = response.data.club
|
|
|
|
- let organizationUser = response.data.user
|
|
|
|
- this.email = organizationUser.email
|
|
|
|
- this.clubID = organizationUser.clubID
|
|
|
|
- this.clubName = organizationClub.name
|
|
|
|
- this.clubContact = organizationClub.linkMan
|
|
|
|
- this.mobile = organizationUser.bindMobile
|
|
|
|
- this.abbreviation = organizationClub.sname
|
|
|
|
- if( organizationClub.provinceID == null ){
|
|
|
|
- this.addressData.provinceID = ''
|
|
|
|
- }else{
|
|
|
|
- this.addressData.provinceID = organizationClub.provinceID
|
|
|
|
- }
|
|
|
|
- if( organizationClub.cityID == null ){
|
|
|
|
- this.addressData.cityID = ''
|
|
|
|
- }else{
|
|
|
|
- this.addressData.cityID = organizationClub.cityID
|
|
|
|
- }
|
|
|
|
- if( organizationClub.townID == null ){
|
|
|
|
- this.addressData.townID = ''
|
|
|
|
|
|
+ organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
|
|
|
|
+ let organizationClub = response.data.club
|
|
|
|
+ let organizationUser = response.data.user
|
|
|
|
+ this.email = organizationUser.email
|
|
|
|
+ this.clubID = organizationUser.clubID
|
|
|
|
+ this.clubName = organizationClub.name
|
|
|
|
+ this.clubContact = organizationClub.linkMan
|
|
|
|
+ this.mobile = organizationUser.bindMobile
|
|
|
|
+ this.abbreviation = organizationClub.sname
|
|
|
|
+ if( organizationClub.provinceID == null ){
|
|
|
|
+ this.addressData.provinceID = ''
|
|
|
|
+ }else{
|
|
|
|
+ this.addressData.provinceID = organizationClub.provinceID
|
|
|
|
+ }
|
|
|
|
+ if( organizationClub.cityID == null ){
|
|
|
|
+ this.addressData.cityID = ''
|
|
|
|
+ }else{
|
|
|
|
+ this.addressData.cityID = organizationClub.cityID
|
|
|
|
+ }
|
|
|
|
+ if( organizationClub.townID == null ){
|
|
|
|
+ this.addressData.townID = ''
|
|
|
|
+ }else{
|
|
|
|
+ this.addressData.townID = organizationClub.townID
|
|
|
|
+ }
|
|
|
|
+ this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
|
|
|
|
+ this.socialCreditCode = organizationClub.socialCreditCode
|
|
|
|
+ this.firstClubType = organizationClub.firstClubType
|
|
|
|
+ this.secondClubType = organizationClub.secondClubType
|
|
|
|
+ this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
|
|
|
|
+ this.uploadBusinessImage = organizationClub.businessLicenseImage
|
|
|
|
+ this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
|
|
|
|
+ this.uploadMentuzImage = organizationClub.headpic
|
|
|
|
+ this.department = organizationClub.department
|
|
|
|
+ this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
|
|
|
|
+ this.clubFax = organizationClub.fax ? organizationClub.fax : ''
|
|
|
|
+ this.companyPprofile = organizationClub.info ? organizationClub.info : ''
|
|
|
|
+ //机构类型&&主营项目
|
|
|
|
+ switch(this.firstClubType){
|
|
|
|
+ case '1':
|
|
|
|
+ this.organizationTypeText = '医美'
|
|
|
|
+ this.isOrganizationType = 1
|
|
|
|
+ break;
|
|
|
|
+ case '2':
|
|
|
|
+ this.organizationTypeText = '生美'
|
|
|
|
+ this.isOrganizationType = 2
|
|
|
|
+ break;
|
|
|
|
+ case null:
|
|
|
|
+ this.organizationTypeText = '请选择机构类型'
|
|
|
|
+ this.isOrganizationType = 0
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ if(organizationClub.mainpro!=""){
|
|
|
|
+ if(this.firstClubType == '1'){
|
|
|
|
+ this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
|
|
|
|
+ console.log(this.mentuzCampList)
|
|
}else{
|
|
}else{
|
|
- this.addressData.townID = organizationClub.townID
|
|
|
|
|
|
+ this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
|
|
}
|
|
}
|
|
- this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
|
|
|
|
- this.socialCreditCode = organizationClub.socialCreditCode
|
|
|
|
- this.firstClubType = organizationClub.firstClubType
|
|
|
|
- this.secondClubType = organizationClub.secondClubType
|
|
|
|
- this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
|
|
|
|
- this.uploadBusinessImage = organizationClub.businessLicenseImage
|
|
|
|
- this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
|
|
|
|
- this.uploadMentuzImage = organizationClub.headpic
|
|
|
|
- this.department = organizationClub.department
|
|
|
|
- this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
|
|
|
|
- this.clubFax = organizationClub.fax ? organizationClub.fax : ''
|
|
|
|
- this.companyPprofile = organizationClub.info ? organizationClub.info : ''
|
|
|
|
- //机构类型&&主营项目
|
|
|
|
- switch(this.firstClubType){
|
|
|
|
- case '1':
|
|
|
|
- this.organizationTypeText = '医美'
|
|
|
|
- this.isOrganizationType = 1
|
|
|
|
- break;
|
|
|
|
- case '2':
|
|
|
|
- this.organizationTypeText = '生美'
|
|
|
|
- this.isOrganizationType = 2
|
|
|
|
- break;
|
|
|
|
- case null:
|
|
|
|
- this.organizationTypeText = '请选择机构类型'
|
|
|
|
- this.isOrganizationType = 0
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- if(organizationClub.mainpro!=""){
|
|
|
|
- if(this.firstClubType == '1'){
|
|
|
|
- this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
|
|
|
|
- console.log(this.mentuzCampList)
|
|
|
|
- }else{
|
|
|
|
- this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //机构类型
|
|
|
|
- switch(this.secondClubType){
|
|
|
|
- case '1':this.current = 0;break;
|
|
|
|
- case '2':this.current = 1;this.isDepartment=true;break;
|
|
|
|
- case '3':this.current = 2;this.isDepartment=true;break;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ }
|
|
|
|
+ //机构类型
|
|
|
|
+ switch(this.secondClubType){
|
|
|
|
+ case '1':this.current = 0;break;
|
|
|
|
+ case '2':this.current = 1;this.isDepartment=true;break;
|
|
|
|
+ case '3':this.current = 2;this.isDepartment=true;break;
|
|
|
|
+ }
|
|
}).catch(response =>{
|
|
}).catch(response =>{
|
|
this.$util.msg(response.msg,2000)
|
|
this.$util.msg(response.msg,2000)
|
|
})
|
|
})
|
|
@@ -446,10 +384,6 @@
|
|
clubID:this.clubID, //会所ID
|
|
clubID:this.clubID, //会所ID
|
|
name:this.clubName,
|
|
name:this.clubName,
|
|
linkMan:this.clubContact,
|
|
linkMan:this.clubContact,
|
|
- contractMobile2:this.mobile,
|
|
|
|
- contractMobile:this.newMobile,
|
|
|
|
- mobileCode:this.mobileCode,
|
|
|
|
- newMobileCode:this.newMobileCode,
|
|
|
|
sname:this.abbreviation,
|
|
sname:this.abbreviation,
|
|
provinceID:this.addressData.provinceID,
|
|
provinceID:this.addressData.provinceID,
|
|
cityID:this.addressData.cityID,
|
|
cityID:this.addressData.cityID,
|
|
@@ -469,83 +403,17 @@
|
|
info : this.companyPprofile
|
|
info : this.companyPprofile
|
|
}
|
|
}
|
|
console.log(params)
|
|
console.log(params)
|
|
- organizationUpdate(params).then(response =>{
|
|
|
|
- this.$util.msg(response.msg,2000);
|
|
|
|
|
|
+ sellerClubUpdate(params).then(response =>{
|
|
|
|
+ this.$util.msg('修改成功',2000);
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
- this.$api.switchTabTo('/pages/tabBar/user/user')
|
|
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ delta: 1
|
|
|
|
+ });
|
|
},2000)
|
|
},2000)
|
|
}).catch(response =>{
|
|
}).catch(response =>{
|
|
this.$util.msg(response.msg,2000);
|
|
this.$util.msg(response.msg,2000);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- getMobileCodeFn(){
|
|
|
|
- if( this.mobile == ''){
|
|
|
|
- this.$util.msg('请输入手机号',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.$reg.isMobile(this.mobile)){
|
|
|
|
- this.$util.msg('请输入正确的手机号',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- let params = { mobile : this.mobile }
|
|
|
|
- this.isMobileDisabled = true;
|
|
|
|
- getClubMobileCode(params).then(response =>{
|
|
|
|
- this.$util.msg('验证短信已发送',2000);
|
|
|
|
- const TIME_COUNT = 60;
|
|
|
|
- if (!this.codeTime) {
|
|
|
|
- this.count = TIME_COUNT;
|
|
|
|
- this.isMobileDisabled = true;
|
|
|
|
- this.codeTime = setInterval(() => {
|
|
|
|
- if (this.count > 1 && this.count <= TIME_COUNT) {
|
|
|
|
- this.count--
|
|
|
|
- this.mobileCodeText = this.count +'s重新发送'
|
|
|
|
- } else {
|
|
|
|
- this.isMobileDisabled = false;
|
|
|
|
- clearInterval(this.codeTime)
|
|
|
|
- this.codeTime = null
|
|
|
|
- this.mobileCodeText = '获取验证码'
|
|
|
|
- }
|
|
|
|
- },1000)
|
|
|
|
- }
|
|
|
|
- }).catch( response =>{
|
|
|
|
- this.$util.msg(response.msg,2000);
|
|
|
|
- this.isMobileDisabled = false;
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- getNewMobileCodeFn(){
|
|
|
|
- if( this.newMobile == ''){
|
|
|
|
- this.$util.msg('请输入手机号',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.$reg.isMobile(this.newMobile)){
|
|
|
|
- this.$util.msg('请输入正确的手机号',2000);
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- let params = { newMobile : this.newMobile }
|
|
|
|
- this.isNewMobileDisabled = true;
|
|
|
|
- getClubNewMobileCode(params).then(response =>{
|
|
|
|
- this.$util.msg('验证短信已发送',2000);
|
|
|
|
- const TIME_COUNT = 60;
|
|
|
|
- if (!this.codeTimeNew) {
|
|
|
|
- this.newCount = TIME_COUNT;
|
|
|
|
- this.isNewMobileDisabled = true;
|
|
|
|
- this.codeTimeNew = setInterval(() => {
|
|
|
|
- if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
|
|
|
|
- this.newCount
|
|
|
|
- this.newMobileCodeText = this.newCount +'s重新发送'
|
|
|
|
- } else {
|
|
|
|
- this.isNewMobileDisabled = false;
|
|
|
|
- clearInterval(this.codeTimeNew)
|
|
|
|
- this.codeTimeNew = null
|
|
|
|
- this.newMobileCodeText = '获取验证码'
|
|
|
|
- }
|
|
|
|
- },1000)
|
|
|
|
- }
|
|
|
|
- }).catch( res =>{
|
|
|
|
- this.$util.msg(response.msg,2000);
|
|
|
|
- this.isNewMobileDisabled = false;
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 三级联动选择
|
|
// 三级联动选择
|
|
showMulLinkageThreePicker() {
|
|
showMulLinkageThreePicker() {
|
|
this.isShowInput = true
|
|
this.isShowInput = true
|
|
@@ -708,13 +576,6 @@
|
|
let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
|
|
let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
|
|
this.medicaCampList.push(item)
|
|
this.medicaCampList.push(item)
|
|
}
|
|
}
|
|
- },
|
|
|
|
- showCheckPhone(){//控制修改手机显隐
|
|
|
|
- this.isShowCheckPhone = !this.isShowCheckPhone
|
|
|
|
- },
|
|
|
|
- steps(index) {//$attrstab切换
|
|
|
|
- console.log(index)
|
|
|
|
- this.tabCurrentIndex = index;
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|