diff --git a/apis/interfaces/user.js b/apis/interfaces/user.js index 685207f..d44b187 100644 --- a/apis/interfaces/user.js +++ b/apis/interfaces/user.js @@ -142,9 +142,10 @@ const submitTeamName = (data) => { }) } // 获取运营中心记录 -const getTeam = () => { +const getTeam = (data) => { return request({ url : 'user/team', + data:data, }) } diff --git a/manifest.json b/manifest.json index e6d773a..6ee09da 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "抖火", "appid" : "__UNI__C305C03", "description" : "纵有疾风起,人生不言弃", - "versionName" : "1.3.1", + "versionName" : "1.3.2", "versionCode" : 103, "transformPx" : false, /* 5+App特有相关 */ diff --git a/pages.json b/pages.json index 66e0330..64b3794 100644 --- a/pages.json +++ b/pages.json @@ -225,7 +225,7 @@ "auth": true, "name": "YunYing", "style": { - "navigationBarTitleText": "法务运营中心", + "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#446EFE", "navigationBarTextStyle": "white" diff --git a/pages/account/yunying.vue b/pages/account/yunying.vue index 3eaad25..f4f4f20 100644 --- a/pages/account/yunying.vue +++ b/pages/account/yunying.vue @@ -10,10 +10,10 @@ - 法务运营中心 + {{defaultTitle}} - + 团队人数 :{{users_count}} 总业绩 :¥{{all_perf}} @@ -69,13 +69,13 @@ - 修改法务运营中心 + 修改{{defaultTitle}} - 法务运营中心 + {{defaultTitle}} 确认修改名称 @@ -97,18 +97,7 @@ data() { return { type: 'edit', - tabs: [{ - name: '名称修改', - value: 'edit' - }, { - name: '团队人数', - value: 'balance' - }, - { - name: '总业绩', - value: 'withdraws' - }, - ], + tabs:[], total: '0.00', sended: '0.00', frozen: '0.00', @@ -124,21 +113,54 @@ team_name: '', team_status: '', // 状态 1可以申请但是没有完善,2申请完,审核中,3已通过,已修改 users_count: '-', - all_perf: '-', + all_perf: '-', + teamtype:'', // team + id:'', + defaultTitle:'', // 全局名称法务运营中心,大区运营中心 }; + }, + onLoad(e) { + this.teamtype = e.teamtype + this.id = e.id + let title ='' + if(e.teamtype == 'team'){ + title='法务运营中心' + this.tabs = [{ + name: '名称修改', + value: 'edit' + }, { + name: '团队人数', + value: 'balance' + }, + { + name: '总业绩', + value: 'withdraws' + } + ] + } else { + title='大区运营中心' + this.tabs = [{ + name: '名称修改', + value: 'edit' + }] + } + this.defaultTitle =title + uni.setNavigationBarTitle({ + title:title + }) }, onShow() { this.page = { current: 1, has_more: false, } - this.getList() - this.getTeam(); + this.getList() + this.getTeam() }, methods: { // 获取运营中心基本信息 getTeam() { - getTeam().then(res => { + getTeam({identity_id:this.id}).then(res => { this.team_name = res.name this.users_count = res.users_count this.all_perf = res.all_perf @@ -150,7 +172,7 @@ sureYunYing() { if (this.yunying_name == '' || this.yunying_name.length == 0) { uni.showToast({ - title: '请输入运营中心名称', + title: '请输入'+this.defaultTitle+'名称', icon: 'none', mask: true, duration: 2000 @@ -159,12 +181,12 @@ } submitTeamName({ - name: this.yunying_name + name: this.yunying_name,identity_id:this.id }).then(res => { this.showBind = false uni.showModal({ title: '微信提示', - content: '运营中心姓名修改完成,请耐心等待审核!', + content: this.defaultTitle+'姓名修改完成,请耐心等待审核!', showCancel: false, success: res => { this.yunyingShow = false @@ -197,7 +219,6 @@ }, // 获取账户余额 getList() { - // if (this.type === 'balance') this.getBalance() // if (this.type === 'withdraws') this.getWithdraws() if (this.type == 'edit'){ @@ -233,7 +254,7 @@ }, // 获取提现记录 getTeams() { - getTeamLogs({}).then(res => { + getTeamLogs({identity_id:this.id}).then(res => { console.log(res) this.list = res this.pagesShow = false diff --git a/pages/user/index.vue b/pages/user/index.vue index 695527a..6e57c1e 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -62,11 +62,18 @@ - + - 运营中心 + 法务运营中心 + + + + + 大区运营中心 + + @@ -139,12 +146,12 @@ - 完善法务运营中心 + {{team_status == '1'?'完善法务运营中心':'完善大区运营中心'}} - 法务运营中心 + {{team_status == '1'?'法务运营中心':'大区运营中心'}} 确认名称 @@ -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()