From 994ba4eb72acec2a46fa2511ce8d3d5258b83ca5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com>
Date: Fri, 29 Mar 2024 15:03:54 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E7=94=B1=E6=9C=8D=E5=8A=A1=E5=8C=85?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=8C=E5=9B=A2=E9=98=9F=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=B8=9A=E5=8A=A1=E8=81=94=E7=B3=BB?=
=?UTF-8?q?=E4=BA=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apis/interfaces/user.js | 8 ++++++
pages.json | 2 +-
pages/index/index.vue | 18 ++++++------
pages/user/index.vue | 40 +++++++++++++++++----------
pages/user/team.vue | 52 +++++++++++++++++++++++++++++------
static/icons/user_nav_10.png | Bin 0 -> 3384 bytes
6 files changed, 89 insertions(+), 31 deletions(-)
create mode 100644 static/icons/user_nav_10.png
diff --git a/apis/interfaces/user.js b/apis/interfaces/user.js
index e3d0827..581a5ad 100644
--- a/apis/interfaces/user.js
+++ b/apis/interfaces/user.js
@@ -8,6 +8,13 @@
import { request } from '../index'
+// 团队分类
+const relationsTab = () => {
+ return request({
+ url : 'user/team/init',
+ })
+}
+
// 我的下级用户
const relations = data => {
return request({
@@ -205,6 +212,7 @@ const offUser = data => {
}
export {
+ relationsTab,
relations,
code,
info,
diff --git a/pages.json b/pages.json
index f7634b1..f6a2c97 100644
--- a/pages.json
+++ b/pages.json
@@ -197,7 +197,7 @@
"auth": true,
"name": "UserTeam",
"style": {
- "navigationBarTitleText": "我的客户",
+ "navigationBarTitleText": "我的团队",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 1a8502e..aad0e83 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -34,8 +34,8 @@
-
-
+
+
@@ -101,8 +101,11 @@
appMenus : {
cases : [],
service : []
+ },
+ free : {
+ has_free: false,
+ cover : ""
},
-
bigfiveArr : [], //五大板块
moduleShow : false //展开默认
}
@@ -118,6 +121,7 @@
index().then(res=>{
this.bannerArr = res.bannners
this.appMenus = res.app_menus
+ this.free = res.free
let list = []
res.notices.map(item=>{
let params = item.user.name + ' ' + item.user.text
@@ -277,14 +281,12 @@
}
// 自由服务包
.free{
- padding: $padding $padding $padding - 10 $padding ;
- .free-img{
- width: 100%;
- }
+ padding: $padding $padding 0 $padding;
+ .free-img{ width: 100%; vertical-align: top; }
}
// 模块
- .block {padding: 0 $padding $padding;box-sizing: border-box;width: 100%;}
+ .block {padding: $padding;box-sizing: border-box;width: 100%;}
.module {border-radius: $radius;padding: $padding - 10 $padding $padding $padding + 10;box-sizing: border-box; margin-bottom: $margin;}
.module.moduleRed {background-color: #fff1f2;color: #c92453;}
.module.moduleYellow {background-color: #fff7f2;color: #ff7b29;}
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 2367fc0..402c0dd 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -58,7 +58,7 @@
- 我的客户
+ 我的团队
@@ -87,12 +87,18 @@
-
+
推荐人
-
+
+
+
+ 业务联系人
+
+
+
关注公众号
@@ -234,7 +240,8 @@
reckonerURL : '',
reckonerQrcode : '',
reckonerInvite : '',
- reckonerPoster : {}
+ reckonerPoster : {},
+ salesman : '', // 业务联系人
};
},
onShow() {
@@ -402,13 +409,15 @@
uni.showLoading({
title: '加载中...'
})
- info().then(res => {
+ info().then(res => {
+ console.log(res)
let {
nickname,
identity,
avatar,
certification,
- parent,team_name,teams
+ parent,team_name,teams,
+ salesman
} = res
this.nickname = nickname
this.identity = identity
@@ -416,6 +425,7 @@
this.certification = certification
this.parent = parent
this.team_name = team_name
+ this.salesman = salesman
uni.hideLoading()
// team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善,2申请完,审核中,3已通过,已修改
this.team_status = teams.center.status // 运营中心状态
@@ -477,26 +487,28 @@
this.$Router.push({name})
},
// 推荐关系
- onParent() {
+ onParent(type) {
if(!this.isAuth){
this.$Router.push({
name: 'Auth'
})
return
- }
- if (this.parent == '') {
+ }
+ let phone = type == 'parent' ? this.parent.username : this.salesman.username
+ let name = type == 'parent' ? this.parent.nickname : this.salesman.nickname
+ if (type == 'parent' && this.parent == '') {
this.showBind = true
return
}
uni.showModal({
- title: '我的推荐人',
- content: this.parent.nickname,
- confirmText: '关闭',
- cancelText: '联系TA',
+ title : type == 'parent' ? '我的推荐人': '我的业务联系人',
+ content : name + '['+ phone +']',
+ confirmText : '关闭',
+ cancelText : '联系TA',
success: modalRes => {
if (modalRes.cancel) {
uni.makePhoneCall({
- phoneNumber: this.parent.username
+ phoneNumber: phone
})
}
}
diff --git a/pages/user/team.vue b/pages/user/team.vue
index 05a0444..79f6998 100644
--- a/pages/user/team.vue
+++ b/pages/user/team.vue
@@ -1,13 +1,23 @@
-
+
+
+
+
@@ -44,10 +54,12 @@