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

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' import { request } from '../index'
// 团队分类
const relationsTab = () => {
return request({
url : 'user/team/init',
})
}
// 我的下级用户 // 我的下级用户
const relations = data => { const relations = data => {
return request({ return request({
@@ -205,6 +212,7 @@ const offUser = data => {
} }
export { export {
relationsTab,
relations, relations,
code, code,
info, info,

View File

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

View File

@@ -34,8 +34,8 @@
</view> </view>
</view> </view>
<!-- 自由服务包 --> <!-- 自由服务包 -->
<view class="free" @click="onView('FreeService')"> <view class="free" v-if="free.has_free" @click="onView('FreeService')">
<image class="free-img" src="@/static/index/index_banner_free.png" mode="widthFix" /> <image class="free-img" :src="free.cover" mode="widthFix" />
</view> </view>
<view class="block"> <view class="block">
@@ -101,8 +101,11 @@
appMenus : { appMenus : {
cases : [], cases : [],
service : [] service : []
},
free : {
has_free: false,
cover : ""
}, },
bigfiveArr : [], //五大板块 bigfiveArr : [], //五大板块
moduleShow : false //展开默认 moduleShow : false //展开默认
} }
@@ -118,6 +121,7 @@
index().then(res=>{ index().then(res=>{
this.bannerArr = res.bannners this.bannerArr = res.bannners
this.appMenus = res.app_menus this.appMenus = res.app_menus
this.free = res.free
let list = [] let list = []
res.notices.map(item=>{ res.notices.map(item=>{
let params = item.user.name + ' ' + item.user.text let params = item.user.name + ' ' + item.user.text
@@ -277,14 +281,12 @@
} }
// 自由服务包 // 自由服务包
.free{ .free{
padding: $padding $padding $padding - 10 $padding ; padding: $padding $padding 0 $padding;
.free-img{ .free-img{ width: 100%; vertical-align: top; }
width: 100%;
}
} }
// 模块 // 模块
.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 {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.moduleRed {background-color: #fff1f2;color: #c92453;}
.module.moduleYellow {background-color: #fff7f2;color: #ff7b29;} .module.moduleYellow {background-color: #fff7f2;color: #ff7b29;}

View File

@@ -58,7 +58,7 @@
<view class="border-solid-empty"></view> <view class="border-solid-empty"></view>
<view class="nav-flex" @click="onNav('UserTeam')"> <view class="nav-flex" @click="onNav('UserTeam')">
<view class="nav-icon"> <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> </view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
@@ -87,12 +87,18 @@
</view> </view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </view>
<view class="nav-flex" @click="onParent"> <view class="nav-flex" @click="onParent('parent')">
<view class="nav-icon"> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人 <image class="nav-icon-src" src="@/static/icons/user_nav_07.png"></image>推荐人
</view> </view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon> <u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view> </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-flex" @click="onNav('WeChat')">
<view class="nav-icon"> <view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号 <image class="nav-icon-src" src="@/static/icons/user_nav_06.png"></image>关注公众号
@@ -234,7 +240,8 @@
reckonerURL : '', reckonerURL : '',
reckonerQrcode : '', reckonerQrcode : '',
reckonerInvite : '', reckonerInvite : '',
reckonerPoster : {} reckonerPoster : {},
salesman : '', // 业务联系人
}; };
}, },
onShow() { onShow() {
@@ -402,13 +409,15 @@
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
info().then(res => { info().then(res => {
console.log(res)
let { let {
nickname, nickname,
identity, identity,
avatar, avatar,
certification, certification,
parent,team_name,teams parent,team_name,teams,
salesman
} = res } = res
this.nickname = nickname this.nickname = nickname
this.identity = identity this.identity = identity
@@ -416,6 +425,7 @@
this.certification = certification this.certification = certification
this.parent = parent this.parent = parent
this.team_name = team_name this.team_name = team_name
this.salesman = salesman
uni.hideLoading() uni.hideLoading()
// team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改 // team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
this.team_status = teams.center.status // 运营中心状态 this.team_status = teams.center.status // 运营中心状态
@@ -477,26 +487,28 @@
this.$Router.push({name}) this.$Router.push({name})
}, },
// 推荐关系 // 推荐关系
onParent() { onParent(type) {
if(!this.isAuth){ if(!this.isAuth){
this.$Router.push({ this.$Router.push({
name: 'Auth' name: 'Auth'
}) })
return 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 this.showBind = true
return return
} }
uni.showModal({ uni.showModal({
title: '我的推荐人', title : type == 'parent' ? '我的推荐人': '我的业务联系人',
content: this.parent.nickname, content : name + '['+ phone +']',
confirmText: '关闭', confirmText : '关闭',
cancelText: '联系TA', cancelText : '联系TA',
success: modalRes => { success: modalRes => {
if (modalRes.cancel) { if (modalRes.cancel) {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.parent.username phoneNumber: phone
}) })
} }
} }

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB