修改公告拦保存到本地
This commit is contained in:
parent
e8944b3ad1
commit
716ef3657a
|
|
@ -2,7 +2,7 @@
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<!-- 公告弹窗 -->
|
<!-- 公告弹窗 -->
|
||||||
<up-modal :show="datas.stopShows" :showConfirmButton="true" title="公告" @confirm="confirmEvent ">
|
<up-modal :show="datas.stopShows&&datas.isExamine" :showConfirmButton="true" title="公告" @confirm="confirmEvent ">
|
||||||
<view class="color-red u-text-left">
|
<view class="color-red u-text-left">
|
||||||
<view style="text-align: justify;font-size: 18px;color: #666;"
|
<view style="text-align: justify;font-size: 18px;color: #666;"
|
||||||
v-html="datas.noticeList[datas.cloneNum].title"></view>
|
v-html="datas.noticeList[datas.cloneNum].title"></view>
|
||||||
|
|
@ -169,11 +169,36 @@
|
||||||
++datas.page
|
++datas.page
|
||||||
getrecomVideo()
|
getrecomVideo()
|
||||||
})
|
})
|
||||||
|
// 公告
|
||||||
|
async function getMsg() {
|
||||||
|
let res = await messageselectMessage()
|
||||||
|
let arr = []
|
||||||
|
let ids = uni.getStorageSync('ids')
|
||||||
|
res.list.forEach(ele => {
|
||||||
|
if (ids.length) {
|
||||||
|
if (ids.indexOf(ele.id) == -1) {
|
||||||
|
arr.push(ele)
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync('ids', [res.list[0].id]);
|
||||||
|
arr.push(ele)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
datas.noticeList = arr
|
||||||
|
if (arr.length) {
|
||||||
|
if (ids.length) {
|
||||||
|
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
|
||||||
|
}
|
||||||
|
datas.stopShows = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function confirmEvent() {
|
function confirmEvent() {
|
||||||
datas.stopShows = false
|
datas.stopShows = false
|
||||||
if (datas.cloneNum < datas.noticeList.length - 1) {
|
if (datas.cloneNum < datas.noticeList.length - 1) {
|
||||||
++datas.cloneNum
|
++datas.cloneNum
|
||||||
|
uni.setStorageSync('ids', [...uni.getStorageSync('ids'), datas.noticeList[datas.cloneNum].id]);
|
||||||
datas.stopShows = true
|
datas.stopShows = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -304,14 +329,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 公告
|
|
||||||
async function getMsg() {
|
|
||||||
let res = await messageselectMessage()
|
|
||||||
datas.noticeList = res.list
|
|
||||||
if (res.list.length) {
|
|
||||||
datas.stopShows = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//获取推荐视频
|
//获取推荐视频
|
||||||
async function getrecomVideo(sort, active = 1) {
|
async function getrecomVideo(sort, active = 1) {
|
||||||
datas.active = active
|
datas.active = active
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue