大区运营中心功能增加

This commit is contained in:
2023-02-23 16:03:00 +08:00
parent c1ff22c01c
commit adca841407
5 changed files with 122 additions and 51 deletions

View File

@@ -62,11 +62,18 @@
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onNav('YunYing')" v-if="team_status != 0">
<view class="nav-flex" @click="yungying('team',team_id)" v-if="team_status != 0">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/yunying.png"></image> 运营中心
<image class="nav-icon-src" src="@/static/icons/yunying.png"></image> 法务运营中心
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="yungying('region',region_id)" v-if="region_status != 0">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/yunying.png"></image> 大区运营中心
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onNav('AccountBonus')">
<view class="nav-icon">
@@ -139,12 +146,12 @@
<u-popup :show="yunyingShow" mode="center" @close="yunyingShow = false" :round="22">
<view class="yunying">
<view class="yunying_title">
<view class="title"> 完善法务运营中心 </view>
<view class="title">{{team_status == '1'?'完善法务运营中心':'完善大区运营中心'}} </view>
<image class="yunying_bg" src="/static/icons/yunying_bg.png" mode="widthFix" />
</view>
<view class="rz-item">
<input type="text" maxlength="4" v-model='yunying_name' placeholder-class="inputP" placeholder="请输入名称" />
<view class="btn">法务运营中心</view>
<view class="btn">{{team_status == '1'?'法务运营中心':'大区运营中心'}}</view>
</view>
<view class="button" @click="sureYunYing">确认名称</view>
</view>
@@ -190,7 +197,10 @@
invitation: '',
yunyingShow:false, // 运营中心是否展示
yunying_name:'', // 运营名称
team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
team_id:'',
region_status:'', // 状态 0 不展示 大区中心 1可以申请但是没有完善2申请完审核中3已通过已修改
region_id:'',
};
},
onShow() {
@@ -209,37 +219,72 @@
identity,
avatar,
certification,
parent,team_status,team_name
} = res
parent,team_name,teams
} = res
this.nickname = nickname
this.identity = identity
this.avatar = avatar
this.certification = certification
this.parent = parent
this.team_status = team_status
this.team_name = team_name
if(team_status == 1){
uni.hideLoading()
// team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
this.team_status = teams.center.status // 运营中心状态
this.team_id = teams.center.identity_id // 运营中心
this.region_status = teams.region.status // 大区中心状态
this.region_id = teams.region.identity_id // 大区中心id
if(teams.center.status == 1){
this.yunyingShow = true
return
}
if(teams.region.status == 1){
this.yunyingShow = true
return
}
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
},
yungying(type,id){
if(type === 'team'){
if(this.team_status == 2){
uni.showToast({
title:'法务运营中心名称审核中',
icon:'none',
mask:true,
duration:3000,
})
return
}
if(this.team_status == 1){
this.yunyingShow = true
return
}
}
if(type == 'region'){
if(this.region_status == 2){
uni.showToast({
title:'大区运营中心名称审核中',
icon:'none',
mask:true,
duration:3000,
})
return
}
if(this.region_status == 1){
this.yunyingShow = true
return
}
}
uni.navigateTo({
url:'/pages/account/yunying?id='+id+'&teamtype='+type
})
},
// 导航
onNav(name) {
if(this.team_status == 2){
uni.showToast({
title:'运营中心名称审核中',
icon:'none',
mask:true,
duration:3000,
})
return
}
this.$Router.push({
name
})
@@ -345,21 +390,25 @@
},
// 运营中心确认按钮处理
sureYunYing(){
console.log(this.team_status,this.region_status)
if(this.yunying_name == '' || this.yunying_name.length == 0){
uni.showToast({
title:'请完善运营中心名称',
title:this.team_status == 1?'请完善法务运营中心名称':'请完善大区运营中心名称',
icon:'none',
mask:true,
duration:2000,
})
return
}
submitTeamName({name:this.yunying_name}).then(res => {
let pararms = {
name:this.yunying_name,
identity_id:this.team_status ==1 ? this.team_id:this.region_id
}
submitTeamName(pararms).then(res => {
this.showBind = false
uni.showModal({
title: '微信提示',
content: '运营中心姓名完善完成,请耐心等待审核!',
content: this.team_status ==1?'法务运营中心姓名完善完成,请耐心等待审核!':'大区运营中心姓名完善完成,请耐心等待审核!',
showCancel: false,
success: res => {
this.getUserInfo()