自由服务包调整,团队调整,新增业务联系人

This commit is contained in:
唐明明
2024-03-29 15:03:54 +08:00
parent 17cc2aaeab
commit 994ba4eb72
6 changed files with 89 additions and 31 deletions

View File

@@ -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,

View File

@@ -197,7 +197,7 @@
"auth": true,
"name": "UserTeam",
"style": {
"navigationBarTitleText": "我的客户",
"navigationBarTitleText": "我的团队",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}

View File

@@ -34,8 +34,8 @@
</view>
</view>
<!-- 自由服务包 -->
<view class="free" @click="onView('FreeService')">
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" />
<view class="free" v-if="free.has_free" @click="onView('FreeService')">
<image class="free-img" :src="free.cover" mode="widthFix" />
</view>
<view class="block">
@@ -102,7 +102,10 @@
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;}

View File

@@ -58,7 +58,7 @@
<view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('UserTeam')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_02.png"></image>我的客户
<image class="nav-icon-src" src="@/static/icons/user_nav_02.png"></image>我的团队
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
@@ -87,12 +87,18 @@
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onParent">
<view class="nav-flex" @click="onParent('parent')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onParent('salesman')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_10.png"></image>业务联系人
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="nav-flex" @click="onNav('WeChat')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号
@@ -234,7 +240,8 @@
reckonerURL : '',
reckonerQrcode : '',
reckonerInvite : '',
reckonerPoster : {}
reckonerPoster : {},
salesman : '', // 业务联系人
};
},
onShow() {
@@ -403,12 +410,14 @@
title: '加载中...'
})
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,
title : type == 'parent' ? '我的推荐人': '我的业务联系人',
content : name + '['+ phone +']',
confirmText : '关闭',
cancelText : '联系TA',
success: modalRes => {
if (modalRes.cancel) {
uni.makePhoneCall({
phoneNumber: this.parent.username
phoneNumber: phone
})
}
}

View File

@@ -1,13 +1,23 @@
<template>
<view class="content">
<view class="total">
<!-- <view class="total">
<uni-icons type="staff" size="50" color="white"></uni-icons>
<view class="total-user">
<view class="total-number">{{count.one}}</view>
<view class="total-title">客户总人数</view>
<view class="total-title">总人数</view>
</view>
</view>
</view> -->
<u-sticky>
<u-tabs
:list="tabs"
:scrollable="false"
:current="tabVal"
style="margin-bottom: 30rpx;"
keyName="title"
lineColor="#446EFE"
@click="onClick"
></u-tabs>
</u-sticky>
<block v-if="users.length > 0">
<view class="team-item" v-for="(item, index) in users" :key="index" @click="onCallPhone(item.real_username)">
<u-avatar :src="item.avatar" size="48"></u-avatar>
@@ -44,10 +54,12 @@
</template>
<script>
import { relations } from '@/apis/interfaces/user.js'
import { relations, relationsTab } from '@/apis/interfaces/user.js'
export default {
data() {
return {
tabs : [],
tabVal : 0,
users : [],
count : {
all: 0
@@ -62,9 +74,29 @@
};
},
created() {
uni.showLoading({
title: '加载中...',
mask : true
})
relationsTab().then(res => {
uni.hideLoading()
this.tabs = res
this.getList()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
// 切换tabs
onClick(e){
this.tabVal = e.index
this.page = { current : 1, has_more: false },
this.getList()
},
// 获取列表
getList(){
uni.showLoading({
title: '加载中...',
@@ -72,7 +104,8 @@
})
relations({
larer : 1,
page : this.page.current
page : this.page.current,
key : this.tabs[this.tabVal].key
}).then(res => {
let { users, count } = res;
let atList = users.page.current == 1 ? [] : this.users
@@ -111,10 +144,11 @@
.content{
box-sizing: border-box;
background: white;
padding-top: 1rpx;
}
// 统计数据
.total{
margin: 30rpx;
margin: 30rpx 30rpx 0;
background: linear-gradient(to top left, #446EFE, #0f36bb);
box-shadow: 10rpx 0 15rpx 15rpx rgba(0, 0, 0, .03);
border-radius: 20rpx;
@@ -214,4 +248,6 @@
}
}
}
// 空页面
.list-null{ height: 60vh; display: flex; align-items: center; justify-content: center; }
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB