|
|
@@ -240,14 +240,15 @@
|
|
|
}
|
|
|
.time_box {
|
|
|
display: flex;
|
|
|
- /* align-items: center; */
|
|
|
+ align-items: center;
|
|
|
font-size: 12px;
|
|
|
color: #FFFFFF;
|
|
|
- line-height: 17px;
|
|
|
background: #136DFB;
|
|
|
border-radius: 5px;
|
|
|
- padding: 1px 4px 2px;
|
|
|
+ padding: 2px 4px 2px;
|
|
|
margin-left: 10px;
|
|
|
+ height: 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
.time_box img {
|
|
|
width: 16px;
|
|
|
@@ -727,7 +728,7 @@
|
|
|
</div>
|
|
|
<div class="home_box">
|
|
|
<div class="wel_tip">
|
|
|
- <div>下午好~</div>
|
|
|
+ <div>{{nowTime}}</div>
|
|
|
<div>{{memberName}}</div>
|
|
|
</div>
|
|
|
<div class="task_content">
|
|
|
@@ -762,15 +763,15 @@
|
|
|
<div>我的客户</div>
|
|
|
<van-popover v-model="timePopover" trigger="click" placement="bottom-start">
|
|
|
<div class="date_box">
|
|
|
- <div :class="dateIndex === 'today' ? 'date_active' : 'date_item'" @click="handleDate('today')">今日</div>
|
|
|
- <div :class="dateIndex === 'week' ? 'date_active' : 'date_item'" @click="handleDate('week')">近7天</div>
|
|
|
- <div :class="dateIndex === 'month' ? 'date_active' : 'date_item'" @click="handleDate('month')">近30天</div>
|
|
|
- <div :class="dateIndex === 'custom' ? 'date_active' : 'date_item'" @click="handleDate('custom')">自定义</div>
|
|
|
+ <div :class="dateIndex === '今日' ? 'date_active' : 'date_item'" @click="handleDate('今日')">今日</div>
|
|
|
+ <div :class="dateIndex === '近7天' ? 'date_active' : 'date_item'" @click="handleDate('近7天')">近7天</div>
|
|
|
+ <div :class="dateIndex === '近30天' ? 'date_active' : 'date_item'" @click="handleDate('近30天')">近30天</div>
|
|
|
+ <div :class="dateIndex === '自定义' ? 'date_active' : 'date_item'" @click="handleDate('自定义')">自定义</div>
|
|
|
</div>
|
|
|
<template #reference>
|
|
|
<div class="time_box">
|
|
|
<img src="./img/qw/time_icon.png" alt="">
|
|
|
- <span>今日</span>
|
|
|
+ <span>{{dateIndex}}</span>
|
|
|
<img src="./img/qw/time_select.png" alt="">
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -944,12 +945,13 @@
|
|
|
bId: null,
|
|
|
env: '',
|
|
|
memberId: null,
|
|
|
- memberName: '', // 首页
|
|
|
+ nowTime: '',
|
|
|
+ memberName: '',
|
|
|
bind: false, // 首页
|
|
|
taskList: [],
|
|
|
clientAdd: null,
|
|
|
clientTotal: null,
|
|
|
- dateIndex: 'today',
|
|
|
+ dateIndex: '今日',
|
|
|
timePopover: false,
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
@@ -986,6 +988,7 @@
|
|
|
this.maxDate = new Date(dateY, dateM, dateD - 1)
|
|
|
this.bId = this.getQueryParam('bId')
|
|
|
this.env = this.getQueryParam('env')
|
|
|
+ this.getGreeting()
|
|
|
|
|
|
if (!this.env || this.env === 'prod') {
|
|
|
this.httpUrl = 'https://wlapi.wefanbot.com'
|
|
|
@@ -1017,6 +1020,17 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getGreeting() {
|
|
|
+ const now = new Date();
|
|
|
+ const hour = now.getHours(); // 获取当前小时 (0-23)
|
|
|
+ if (hour >= 5 && hour < 12) {
|
|
|
+ this.nowTime = '早上好~'
|
|
|
+ } else if (hour >= 12 && hour < 18) {
|
|
|
+ this.nowTime = '下午好~'
|
|
|
+ } else {
|
|
|
+ this.nowTime = '晚上好~'
|
|
|
+ }
|
|
|
+ },
|
|
|
getCpH5Login() {
|
|
|
fetch(this.httpUrl + '/scrm/v1/wxcp-workbench/p/cpH5Login', {
|
|
|
method: 'post',
|
|
|
@@ -1037,7 +1051,7 @@
|
|
|
localStorage.setItem('tokenValue', data.token)
|
|
|
localStorage.setItem('tenancyIdValue', data.tenancyId)
|
|
|
localStorage.setItem('userId', data.userId)
|
|
|
- localStorage.setItem('tenancyNameValue', data.memberName)
|
|
|
+ localStorage.setItem('qwTenancyNameValue', this.nowTime + data.memberName)
|
|
|
} else {
|
|
|
this.clientData()
|
|
|
this.getTaskList()
|
|
|
@@ -1075,16 +1089,16 @@
|
|
|
// 切换日期
|
|
|
handleDate(text) {
|
|
|
this.dateIndex = text
|
|
|
- if (text === 'today') {
|
|
|
+ if (text === '今日') {
|
|
|
this.startTime = this.getDateTime(0)
|
|
|
this.endTime = this.getDateTime(0)
|
|
|
- } else if (text === 'week') {
|
|
|
+ } else if (text === '近7天') {
|
|
|
this.startTime = this.getDateTime(-7)
|
|
|
this.endTime = this.getDateTime(-1)
|
|
|
- } else if (text === 'month') {
|
|
|
+ } else if (text === '近30天') {
|
|
|
this.startTime = this.getDateTime(-30)
|
|
|
this.endTime = this.getDateTime(-1)
|
|
|
- } else if (text === 'custom') {
|
|
|
+ } else if (text === '自定义') {
|
|
|
this.showSelfDate = true
|
|
|
}
|
|
|
this.clientData()
|
|
|
@@ -1117,6 +1131,7 @@
|
|
|
this.clientStartTime = null
|
|
|
this.clientEndTime = null
|
|
|
this.clientDate = ''
|
|
|
+ this.activeTab = '客户'
|
|
|
this.pageClient()
|
|
|
} else if (tab === 'marketing') {
|
|
|
}
|
|
|
@@ -1148,6 +1163,8 @@
|
|
|
this.keyword = ''
|
|
|
this.clientList = []
|
|
|
this.groupList = []
|
|
|
+ this.clientStartTime = null
|
|
|
+ this.clientEndTime = null
|
|
|
if (tab === '客户') {
|
|
|
this.pageClient()
|
|
|
} else if (tab === '客户群') {
|
|
|
@@ -1210,6 +1227,8 @@
|
|
|
bid: this.bId,
|
|
|
memberId: this.memberId,
|
|
|
keyword: this.keyword,
|
|
|
+ startTime: this.clientStartTime,
|
|
|
+ endTime: this.clientEndTime,
|
|
|
page: 1,
|
|
|
pageCount: 1000,
|
|
|
}),
|
|
|
@@ -1244,7 +1263,11 @@
|
|
|
} else if (text === 'custom') {
|
|
|
this.showSelfDate = true
|
|
|
}
|
|
|
- this.pageClient()
|
|
|
+ if (this.activeTab === '客户') {
|
|
|
+ this.pageClient()
|
|
|
+ } else {
|
|
|
+ this.pageGroup()
|
|
|
+ }
|
|
|
},
|
|
|
handleTagClick(tag) {
|
|
|
this.activeTag = tag
|