首页公告弹窗功能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
//打包时修改env的值即可
|
||||
const env='production' //test , production,local
|
||||
const env='test' //test , production,local
|
||||
|
||||
export const encryptKey='1234567890123456' // http数据加解密的key
|
||||
|
||||
|
||||
@@ -54,25 +54,29 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</up-modal>
|
||||
|
||||
|
||||
<!-- h5关闭通知 -->
|
||||
<!-- #ifdef H5 -->
|
||||
<up-modal :show="datas.stopShow"
|
||||
cancel-text="知道了"
|
||||
show-cancel-button
|
||||
confirm-text="去下载" title="重要通知"
|
||||
@cancel="stopCancel"
|
||||
:title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm"
|
||||
<up-modal :show="datas.stopShow" cancel-text="知道了" show-cancel-button confirm-text="去下载" title="重要通知"
|
||||
@cancel="stopCancel" :title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="stopConfirm"
|
||||
confirm-color="rgb(255, 117, 129)">
|
||||
<view class="color-red u-text-left">
|
||||
<text>2025年2月8日将关闭网页访问,请及时下载最新APP</text>
|
||||
</view>
|
||||
</up-modal>
|
||||
<!-- #endif -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 公告弹窗 -->
|
||||
<up-modal :show="datas.stopShows" :showConfirmButton="true" title="公告" @confirm="confirmEvent ">
|
||||
<view class="color-red u-text-left">
|
||||
<view style="text-align: justify;font-size: 18px;color: #666;"
|
||||
v-html="datas.noticeList[datas.cloneNum].title"></view>
|
||||
</view>
|
||||
</up-modal>
|
||||
<!-- #ifdef APP -->
|
||||
<!-- #endif -->
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -124,13 +128,13 @@
|
||||
|
||||
list: [], // 底部短剧内容
|
||||
page: 1, // 首页推荐分页
|
||||
stopShow:true,//h5关闭弹窗
|
||||
stopShow: true, //h5关闭弹窗
|
||||
ruleShow: false,
|
||||
rule_title: '', // 首页弹窗标题
|
||||
rule_content: '', // 首页弹窗内容
|
||||
ruleIndex: 0,
|
||||
ruleList: [],
|
||||
|
||||
stopShows: false,
|
||||
version: {
|
||||
show: false,
|
||||
title: "",
|
||||
@@ -139,7 +143,8 @@
|
||||
cancelText: "",
|
||||
downloadLink: ""
|
||||
},
|
||||
setindexdata: false
|
||||
setindexdata: false,
|
||||
cloneNum: 0
|
||||
})
|
||||
onLoad(() => {
|
||||
versionUpdate()
|
||||
@@ -164,16 +169,26 @@
|
||||
++datas.page
|
||||
getrecomVideo()
|
||||
})
|
||||
|
||||
function stopConfirm(){
|
||||
datas.stopShow=false
|
||||
|
||||
function confirmEvent() {
|
||||
datas.stopShows = false
|
||||
if (datas.cloneNum < datas.noticeList.length - 1) {
|
||||
++datas.cloneNum
|
||||
datas.stopShows = true
|
||||
}
|
||||
}
|
||||
|
||||
function stopConfirm() {
|
||||
datas.stopShow = false
|
||||
uni.navigateTo({
|
||||
url:'/pages/login/download'
|
||||
url: '/pages/login/download'
|
||||
})
|
||||
}
|
||||
function stopCancel(){
|
||||
datas.stopShow=false
|
||||
|
||||
function stopCancel() {
|
||||
datas.stopShow = false
|
||||
}
|
||||
|
||||
function versionUpdate() {
|
||||
//#ifdef APP-PLUS
|
||||
plus.screen.lockOrientation('portrait-primary'); //竖屏正方向锁定
|
||||
@@ -288,10 +303,14 @@
|
||||
url: '/pages/index/search/index'
|
||||
});
|
||||
}
|
||||
|
||||
// 公告
|
||||
async function getMsg() {
|
||||
let res = await messageselectMessage()
|
||||
datas.noticeList = res.list
|
||||
if (res.list.length) {
|
||||
datas.stopShows = true
|
||||
}
|
||||
}
|
||||
//获取推荐视频
|
||||
async function getrecomVideo(sort, active = 1) {
|
||||
|
||||
Reference in New Issue
Block a user