Commit e9af3406 by cen

Merge branch 'SAAS+V5.3.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.3.0

2 parents 32294fa2 ce49b76e
...@@ -441,5 +441,21 @@ module.exports = { ...@@ -441,5 +441,21 @@ module.exports = {
projectName: 'pad', projectName: 'pad',
...data ...data
}) })
} },
// 活动消息列表
getActivityMessageList(data) {
return http.post({
method: 'dj.pad.api.page.activity.message.list',
projectName: 'pad',
...data
})
},
// 更新活动消息状态
updateActivityMessageStatus(data) {
return http.post({
method: 'dj.pad.api.activity.message.update',
projectName: 'pad',
...data
})
},
} }

2.84 MB | W: | H:

2.87 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -144,8 +144,8 @@ export default { ...@@ -144,8 +144,8 @@ export default {
detailsList: [{ name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }], detailsList: [{ name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }, { name: '1' }],
firstIndex: 0, firstIndex: 0,
activeIndex: 0, activeIndex: 0,
firstLeft: ['first', 'second'], firstLeft: ['first', 'second', 'three'],
firstClass: ['short-first-nav', 'short-second-nav'], firstClass: ['short-first-nav', 'short-second-nav', 'short-second-nav'],
isBeisen: false, // 是否是有北森权限,true 有,false无 isBeisen: false, // 是否是有北森权限,true 有,false无
isFlag: true, // 当前驻店人员所关联的门店非鸿蒙智行或非延保业务 isFlag: true, // 当前驻店人员所关联的门店非鸿蒙智行或非延保业务
isHmzx: false, // 当前驻店人员所关联的门店是否是鸿蒙智行 isHmzx: false, // 当前驻店人员所关联的门店是否是鸿蒙智行
...@@ -401,17 +401,26 @@ export default { ...@@ -401,17 +401,26 @@ export default {
} }
.second { .second {
left: toRpx(352); left: toRpx(367);
} }
.three { .three {
left: toRpx(756); left: toRpx(770);
} }
.four { .four {
left: toRpx(1162); left: toRpx(1162);
} }
.sprite-icon {
&.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 500;
font-size: toRpx(32);
color: #3B73FF;
}
}
.text { .text {
position: relative; position: relative;
text-align: center; text-align: center;
...@@ -426,28 +435,27 @@ export default { ...@@ -426,28 +435,27 @@ export default {
border-radius: 50%; border-radius: 50%;
right: toRpx(86); right: toRpx(86);
} }
} &.active {
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 500;
font-size: toRpx(32);
color: #3b73ff;
&::after {
content: '';
position: absolute; position: absolute;
bottom: 0; top: 0;
left: 50%; z-index: -1;
transform: translateX(-50%); font-weight: 500;
width: toRpx(48); font-size: toRpx(32);
height: toRpx(8); color: #3b73ff;
background-color: #3b73ff;
border-radius: toRpx(16); &::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #3b73ff;
border-radius: toRpx(16);
}
} }
} }
} }
} }
.activity-box { .activity-box {
......
...@@ -178,11 +178,17 @@ export default { ...@@ -178,11 +178,17 @@ export default {
console.log('pageBack') console.log('pageBack')
this.getMessageInfo(); this.getMessageInfo();
}); });
uni.$on('studyCenter', () => { uni.$on('ActivityCenter', () => {
console.log('ActivityCenter')
let { tabs } = this, let { tabs } = this,
index = tabs.findIndex(e => e.name == 'StudyCenter') index = tabs.findIndex(e => e.name == 'ActivityCenter')
this.changeIndex(index, this.tabs[index]) this.changeIndex(index, this.tabs[index])
}); })
// uni.$on('studyCenter', () => {
// let { tabs } = this,
// index = tabs.findIndex(e => e.name == 'StudyCenter')
// this.changeIndex(index, this.tabs[index])
// });
this.getUnreadCount() this.getUnreadCount()
this.getStudyCenterPermission() this.getStudyCenterPermission()
this.getMessageInfo() this.getMessageInfo()
......
<template> <template>
<view> <view>
<ServiceList :messageList="messageList" :topListProp="topList" @handleClick="handleClick" /> <ServiceList type="out" :messageList="messageList" :topListProp="topList" @handleClick="handleClick" />
</view> </view>
</template> </template>
<script> <script>
......
...@@ -249,7 +249,16 @@ export default { ...@@ -249,7 +249,16 @@ export default {
font-weight: 500; font-weight: 500;
font-size: toRpx(34); font-size: toRpx(34);
color: #292D33; color: #292D33;
.sprite-icon {
&.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 500;
font-size: toRpx(32);
color: #3B73FF;
}
}
.first { .first {
left: 0; left: 0;
} }
...@@ -280,26 +289,25 @@ export default { ...@@ -280,26 +289,25 @@ export default {
border-radius: 50%; border-radius: 50%;
right: toRpx(86); right: toRpx(86);
} }
} &.active {
.active {
position: absolute;
top: 0;
z-index: -1;
font-weight: 500;
font-size: toRpx(32);
color: #3B73FF;
&::after {
content: '';
position: absolute; position: absolute;
bottom: 0; top: 0;
left: 50%; z-index: -1;
transform: translateX(-50%); font-weight: 500;
width: toRpx(48); font-size: toRpx(32);
height: toRpx(8); color: #3B73FF;
background-color: #3B73FF;
border-radius: toRpx(16); &::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: toRpx(48);
height: toRpx(8);
background-color: #3B73FF;
border-radius: toRpx(16);
}
} }
} }
} }
......
<template> <template>
<scroll-view scroll-y class="service-list"> <scroll-view scroll-y class="service-list">
<view class="message-index-box"> <view :class="['message-index-box', type == 'out' ? 'message-out' : '']">
<view class="message-list" v-if="getTopList.length > 0"> <view class="message-list" v-if="getTopList.length > 0">
<view :class="['message-item', moduleType == i.moduleType ? 'active' : '']" v-for="(i, ind) in getTopList" <view :class="['message-item', moduleType == i.moduleType ? 'active' : '']" v-for="(i, ind) in getTopList"
:key="ind" @click.stop="handleClick(i)"> :key="ind" @click.stop="handleClick(i)">
...@@ -67,7 +67,11 @@ export default { ...@@ -67,7 +67,11 @@ export default {
messageList: { messageList: {
type: Array, type: Array,
default: () => [] default: () => []
} },
type: {
type: String,
default: ''
},
}, },
data() { data() {
return { return {
...@@ -193,6 +197,10 @@ export default { ...@@ -193,6 +197,10 @@ export default {
.message-index-box { .message-index-box {
margin: 0 toRpx(32); margin: 0 toRpx(32);
height: 100%; height: 100%;
&.message-out {
padding-bottom: toRpx(40);
box-sizing: content-box;
}
.message-group { .message-group {
.message-date { .message-date {
......
...@@ -3,7 +3,8 @@ const moduleTypeEnum = { ...@@ -3,7 +3,8 @@ const moduleTypeEnum = {
1: '优秀话术', 1: '优秀话术',
2: '违规话术', 2: '违规话术',
3: '短课程学习', 3: '短课程学习',
4: '长课程学习' 4: '长课程学习',
5: '活动中心'
} }
const moduleIconEnum = { const moduleIconEnum = {
...@@ -11,7 +12,8 @@ const moduleIconEnum = { ...@@ -11,7 +12,8 @@ const moduleIconEnum = {
1: 'notice-script', 1: 'notice-script',
2: 'notice-violate', 2: 'notice-violate',
3: 'notice-study', 3: 'notice-study',
4: 'notice-study' 4: 'notice-study',
5: 'active-msg'
} }
const moduleContentEnum = { const moduleContentEnum = {
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
(moduleType == 1 && item.status == 0) || (moduleType == 1 && item.status == 0) ||
(moduleType == 2 && item.status == 0) || (moduleType == 2 && item.status == 0) ||
(moduleType == 3 && item.status == 0) || (moduleType == 3 && item.status == 0) ||
(moduleType == 4 && item.status == 0) (moduleType == 4 && item.status == 0) ||
(moduleType == 5 && item.status == 0)
)" )"
></view> ></view>
<template v-if="moduleType == 3 || moduleType == 4"> <template v-if="moduleType == 3 || moduleType == 4">
...@@ -62,6 +63,9 @@ ...@@ -62,6 +63,9 @@
<template v-else-if="moduleType == 0"> <template v-else-if="moduleType == 0">
<view class="service-item-text">提醒内容:{{ item.title }}</view> <view class="service-item-text">提醒内容:{{ item.title }}</view>
</template> </template>
<template v-else-if="moduleType == 5">
<view class="service-item-text">提醒内容:{{ item.content }}</view>
</template>
</view> </view>
<template v-if="nothing"> <template v-if="nothing">
<view class="end-text">-已经到底了-</view> <view class="end-text">-已经到底了-</view>
...@@ -101,6 +105,7 @@ export default { ...@@ -101,6 +105,7 @@ export default {
systemList: [], systemList: [],
shortCourseList: [], shortCourseList: [],
longCourseList: [], longCourseList: [],
activityList: [],
total: 0, total: 0,
nothing: false, nothing: false,
pageNum: 1, pageNum: 1,
...@@ -126,6 +131,8 @@ export default { ...@@ -126,6 +131,8 @@ export default {
return this.shortCourseList return this.shortCourseList
case 4: case 4:
return this.longCourseList return this.longCourseList
case 5:
return this.activityList
default: default:
return [] return []
} }
...@@ -177,6 +184,8 @@ export default { ...@@ -177,6 +184,8 @@ export default {
break break
case 4: case 4:
this.getCourseList(4) this.getCourseList(4)
case 5:
this.getActivityList()
default: default:
break break
} }
...@@ -350,14 +359,21 @@ export default { ...@@ -350,14 +359,21 @@ export default {
try { try {
this.getCourseList(3); this.getCourseList(3);
} catch (error) { } catch (error) {
console.error('调用 getWarningPage 方法时出错:', error); console.error('调用 getCourseList 方法时出错:', error);
} }
break; break;
case 4: case 4:
try { try {
this.getCourseList(4); this.getCourseList(4);
} catch (error) { } catch (error) {
console.error('调用 getWarningPage 方法时出错:', error); console.error('调用 getCourseList 方法时出错:', error);
}
break;
case 5:
try {
this.getActivityList();
} catch (error) {
console.error('调用 getActivityList 方法时出错:', error);
} }
break; break;
default: default:
...@@ -439,10 +455,23 @@ export default { ...@@ -439,10 +455,23 @@ export default {
} }
}); });
break break
case 5:
console.log('活动消息跳转')
if (item.status == 0) {
await uni.$api.commonApi.updateActivityMessageStatus({
msgId: item.msgId
})
}
uni.navigateBack({
delta: 1
})
uni.$emit("ActivityCenter")
break
default: default:
break break
} }
}, },
// 长短课程列表
async getCourseList(moduleType) { async getCourseList(moduleType) {
try { try {
uni.showLoading({ uni.showLoading({
...@@ -470,6 +499,35 @@ export default { ...@@ -470,6 +499,35 @@ export default {
}); });
} }
}, },
// 活动消息列表
async getActivityList() {
try {
uni.showLoading({
mask: true
})
const { sceneType } = uni.$storage.get("userInfo")
const { pageNum, pageSize } = this
const res = await uni.$api.commonApi.getActivityMessageList({
pageNum, pageSize, businessType: sceneType
})
res.list?.length && res.list.map(e => {
e.time = e.createTime
})
if (pageNum == 1) {
this.activityList = res.list || []
} else {
this.activityList = this.activityList.concat(res.list || [])
}
uni.hideLoading()
this.total = res.total
this.nothing = res.length ? true : false
} catch (error) {
uni.showToast({
title: error,
icon: "none",
});
}
},
// 置顶,取消置顶 // 置顶,取消置顶
handleStickTop() { handleStickTop() {
clearTimeout(timer) clearTimeout(timer)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!