Commit 966e154f by 胡悦

修改ai集市和消息中心

1 parent d03fee46
No preview for this file type
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
<view class="list-title">{{ item.preEntryName }}</view> <view class="list-title">{{ item.preEntryName }}</view>
<view class="item-box"> <view class="item-box">
<view class="item" @click="jump(i)" v-for="i in item.agentList"> <view class="item" @click="jump(i)" v-for="i in item.agentList">
<view class="text">{{ i.entryName }}</view>
<image class="item-img" :src="i.entryLogoUrl" mode="scaleToFill" /> <image class="item-img" :src="i.entryLogoUrl" mode="scaleToFill" />
<view class="text">{{ i.entryName }}</view>
<view class="red-dot"></view>
</view> </view>
</view> </view>
</view> </view>
...@@ -80,7 +81,7 @@ export default { ...@@ -80,7 +81,7 @@ export default {
} }
} }
.ai-content { .ai-content {
margin: toRpx(64) toRpx(64); margin: toRpx(64);
} }
.list-box { .list-box {
border-radius: toRpx(16); border-radius: toRpx(16);
...@@ -110,27 +111,38 @@ export default { ...@@ -110,27 +111,38 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: toRpx(40); margin-top: toRpx(40);
gap: toRpx(48);
.item { .item {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
width: toRpx(412);
box-sizing: border-box;
font-size: toRpx(30); font-size: toRpx(30);
color: #333; color: #333;
border-radius: toRpx(16); border-radius: toRpx(16);
box-shadow: 0 toRpx(8) toRpx(24) 0 #2c66f71a; box-shadow: 0 toRpx(8) toRpx(24) 0 #2c66f71a;
padding: toRpx(16) toRpx(32); padding: toRpx(16) toRpx(32);
margin-right: toRpx(50); // margin-right: toRpx(50);
margin-bottom: toRpx(30); margin-bottom: toRpx(30);
&:nth-child(5n) { &:nth-child(5n) {
margin-right: 0; margin-right: 0;
} }
.text { .text {
width: toRpx(160); margin-left: toRpx(15);
// width: toRpx(160);
} }
&-img { &-img {
width: toRpx(96); width: toRpx(96);
height: toRpx(96); height: toRpx(96);
// margin-left: toRpx(20); // margin-left: toRpx(20);
} }
.red-dot {
background-color: #F24724;
width: toRpx(16);
height: toRpx(16);
border-radius: 50%;
margin-left: toRpx(8);
}
} }
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</view> </view>
<!-- 客服弹框 --> <!-- 客服弹框 -->
<!-- <kf-box ref="kfRef" /> --> <!-- <kf-box ref="kfRef" /> -->
<message-pop ref="kfRef" :messageData="messageData"></message-pop> <message-pop ref="kfRef" :type="messageType" :messageData="messageData"></message-pop>
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" /> <setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
</view> </view>
...@@ -85,7 +85,8 @@ export default { ...@@ -85,7 +85,8 @@ export default {
trackId:0, trackId:0,
trackInterval:null, trackInterval:null,
collectTrack:false, collectTrack:false,
hasPerson: false hasPerson: false,
messageType: 'study'
} }
}, },
watch: { watch: {
...@@ -208,6 +209,7 @@ export default { ...@@ -208,6 +209,7 @@ export default {
} }
}) })
}, },
// 获取话术未读列表
async getMessage() { async getMessage() {
console.log('获取话术', uni.$storage.get("userInfo")) console.log('获取话术', uni.$storage.get("userInfo"))
const {sceneType, uuid} = uni.$storage.get("userInfo") const {sceneType, uuid} = uni.$storage.get("userInfo")
...@@ -217,9 +219,11 @@ export default { ...@@ -217,9 +219,11 @@ export default {
}) })
if (res.total) { if (res.total) {
this.messageData = res this.messageData = res
this.messageType = 'attendance'
this.$refs.kfRef.open() this.$refs.kfRef.open()
} }
}, },
// 消息中心未读总数
async getMessageCount() { async getMessageCount() {
const {sceneType} = uni.$storage.get("userInfo") const {sceneType} = uni.$storage.get("userInfo")
const res = await uni.$api.commonApi.getMessageCount({ const res = await uni.$api.commonApi.getMessageCount({
...@@ -230,6 +234,8 @@ export default { ...@@ -230,6 +234,8 @@ export default {
this.messageTotal = res this.messageTotal = res
}, },
openPop() { openPop() {
// this.messageType = 'attendance'
// this.$refs.kfRef.open()
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/messageList` url: `/pages/common/messageList`
}) })
......
<template> <template>
<uni-popup ref="popup" type="bottom" border-radius="16px" :mask-click="false"> <uni-popup ref="popup" type="bottom" border-radius="16px" :mask-click="false">
<view class="kf-box"> <view class="kf-box">
<image class="message-bg" :src="require('@//assets/images/common/message-bg.webp')"></image> <template v-if="type=='attendance'">
<view class="text text-first">本周优秀话术推送</view> <image class="message-bg" :src="require('@//assets/images/common/message-bg.webp')"></image>
<view class="text">你有{{messageData.total}}条消息待查看</view> <view class="text text-first">本周优秀话术推送</view>
<view class="btn" @click="toMessage">去查看</view> <view class="text">你有{{messageData.total}}条消息待查看</view>
<view class="btn" @click="toMessage">去查看</view>
</template>
<!-- 当前有 3 个学习任务待完成,请及时处理。
坚持学习助您能力提升! -->
<template v-else-if="type=='study'">
<image class="message-bg" :src="require('@//assets/images/common/study-center-bg.webp')"></image>
<view class="text text-first study-title">学习提醒</view>
<view class="text study-text">当前有{{messageData.total}}个学习任务待完成,请及时处理。</view>
<view class="text study-text">坚持学习助您能力提升!</view>
<view class="btn study-btn" @click="jumpStudyCenter">去查看</view>
</template>
</view> </view>
</uni-popup> </uni-popup>
...@@ -14,7 +25,8 @@ ...@@ -14,7 +25,8 @@
export default { export default {
name: 'MessagePop', name: 'MessagePop',
props: { props: {
messageData: Object messageData: Object,
type: String,
}, },
data() { data() {
return { return {
...@@ -36,6 +48,9 @@ export default { ...@@ -36,6 +48,9 @@ export default {
const {messageData} = this const {messageData} = this
this.showPage('MessageDetail', {...messageData, type: 'read'}) this.showPage('MessageDetail', {...messageData, type: 'read'})
this.close() this.close()
},
jumpStudyCenter() {
this.close()
} }
} }
} }
...@@ -56,6 +71,7 @@ export default { ...@@ -56,6 +71,7 @@ export default {
height: toRpx(346); height: toRpx(346);
border-radius: toRpx(48); border-radius: toRpx(48);
} }
.text { .text {
text-align: center; text-align: center;
color: #333333; color: #333333;
...@@ -64,6 +80,14 @@ export default { ...@@ -64,6 +80,14 @@ export default {
&.text-first { &.text-first {
margin-top: toRpx(40); margin-top: toRpx(40);
} }
&.study-text {
line-height: toRpx(48);
}
&.study-title {
font-weight: 500;
font-size: toRpx(40);
margin-top: toRpx(30);
}
} }
.btn { .btn {
margin: toRpx(70) auto; margin: toRpx(70) auto;
...@@ -78,6 +102,9 @@ export default { ...@@ -78,6 +102,9 @@ export default {
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
line-height: toRpx(80); line-height: toRpx(80);
&.study-btn {
margin: toRpx(48) auto;
}
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -61,6 +61,15 @@ ...@@ -61,6 +61,15 @@
<view class="message-content warning-content"><view>你有以下接待记录判定为话术违规</view>{{ item.warningContent }} <view class="message-content warning-content"><view>你有以下接待记录判定为话术违规</view>{{ item.warningContent }}
</view> </view>
</template> </template>
<template v-else-if="firstIndex == 3">
<view class="message-header">
<view :class="['dot', item.status == 1 ? '' : 'red']"></view>
<view class="message-type">AI导师消息</view>
<view class="message-time">{{ item.pushTime }}</view>
</view>
<view class="message-content warning-content"><view>您有新的消息【{{ item.sopTaskDetailInfoDTO ? item.sopTaskDetailInfoDTO.checkDate : '' }}+战败复盘报告】AI导师来帮你进行战败复盘了,请点击查看</view>
</view>
</template>
</view> </view>
</template> </template>
<template v-else> <template v-else>
...@@ -92,15 +101,17 @@ export default { ...@@ -92,15 +101,17 @@ export default {
typeList: [ typeList: [
{ tabName: '系统通知', num: () => '' }, { tabName: '系统通知', num: () => '' },
{ tabName: '优秀话术', num: () => '' }, { tabName: '优秀话术', num: () => '' },
{ tabName: '预警通知', num: () => '' } { tabName: '预警通知', num: () => '' },
{ tabName: 'AI导师', num: () => '' }
], ],
CONTRNT_TYPE: CONTRNT_TYPE, CONTRNT_TYPE: CONTRNT_TYPE,
firstIndex: 0, firstIndex: 0,
firstLeft: ['first', 'second', 'three'], firstLeft: ['first', 'second', 'three', 'four'],
firstClass: ['first-nav', 'second-nav', 'second-nav'], firstClass: ['first-nav', 'second-nav', 'second-nav', 'second-nav'],
systemList: [], systemList: [],
messageList: [], messageList: [],
earlyWarnList: [], earlyWarnList: [],
aiTutor: [],
nothing: false, nothing: false,
total: 0, total: 0,
pageNum: PAGE_NUM, pageNum: PAGE_NUM,
...@@ -115,7 +126,8 @@ export default { ...@@ -115,7 +126,8 @@ export default {
const listMap = { const listMap = {
0: this.systemList, 0: this.systemList,
1: this.messageList, 1: this.messageList,
2: this.earlyWarnList 2: this.earlyWarnList,
3: this.aiTutor
}; };
if (this.firstIndex in listMap) { if (this.firstIndex in listMap) {
return listMap[this.firstIndex]; return listMap[this.firstIndex];
...@@ -138,7 +150,7 @@ export default { ...@@ -138,7 +150,7 @@ export default {
case 2: case 2:
return 'scroll-list'; return 'scroll-list';
default: default:
return ''; return 'scroll-list';
} }
} }
}, },
...@@ -489,7 +501,9 @@ export default { ...@@ -489,7 +501,9 @@ export default {
.three { .three {
left: toRpx(756); left: toRpx(756);
} }
.four {
left: toRpx(1162);
}
.text { .text {
position: relative; position: relative;
text-align: center; text-align: center;
...@@ -629,7 +643,7 @@ export default { ...@@ -629,7 +643,7 @@ export default {
.nothing { .nothing {
width: 100%; width: 100%;
flex-direction: column; flex-direction: column;
margin-top: toRpx(112); margin-top: toRpx(230);
font-size: toRpx(28); font-size: toRpx(28);
color: #999999; color: #999999;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!