Merge branch 'test' of https://e.coding.net/g-cphe0354/duanju/new_app into test
This commit is contained in:
@@ -45,15 +45,6 @@
|
||||
<image v-if="datas.isExamine == 0" @click="goMsg('/me/VjgyqAzklr/VjgyqAzklr')" src="@/static/index/red-pack-new.gif"
|
||||
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;" mode=""></image>
|
||||
|
||||
<u-modal :show="datas.ruleShow" v-if="datas.isExamine == 0" confirm-text="知道了" @confirm='datas.ruleShow = false'
|
||||
:title="datas.rule_title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)">
|
||||
<view class="" style="padding-top: 30rpx;text-align: left;">
|
||||
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
||||
<rich-text style="color:#666" :nodes="datas.rule_content"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<u-modal :show="datas.version.show" :confirm-text="datas.version.confirmText" :showCancelButton="datas.version.cancelText" @confirm='confirmUpdateVersion'
|
||||
:title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)" @cancel="datas.version.show = false">
|
||||
<view class="" style="padding-top: 30rpx;text-align: left;">
|
||||
@@ -62,6 +53,13 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-modal>
|
||||
<up-modal :show="datas.ruleShow" v-if="datas.isExamine == 0" confirm-text="知道了" title="规则说明" :title="datas.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
||||
<view class="u-p-30 u-text-left">
|
||||
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="datas.rule_content"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</up-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -71,6 +69,7 @@ import {
|
||||
import { announcement, messageselectMessage, courseselectCourse } from '@/api/index/index.js'
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import contentlist from './components/contentlist.vue'
|
||||
@@ -88,7 +87,9 @@ let datas = reactive({
|
||||
ruleShow: false,
|
||||
rule_title: '', // 首页弹窗标题
|
||||
rule_content: '', // 首页弹窗内容
|
||||
|
||||
ruleIndex: 0,
|
||||
ruleList: [],
|
||||
|
||||
//ios是否在审核 1是审核
|
||||
isExamine: uni.getStorageSync('isExamine'),
|
||||
|
||||
@@ -104,9 +105,14 @@ onLoad(() => {
|
||||
versionUpdate()
|
||||
getMsg()
|
||||
getrecomVideo()
|
||||
getPop()
|
||||
})
|
||||
|
||||
onReady(() => {
|
||||
announcement({type: 0}).then(res=>{
|
||||
datas.ruleList = res
|
||||
ruleInit()
|
||||
datas.ruleShow = true
|
||||
})
|
||||
})
|
||||
onReachBottom(() => {
|
||||
++datas.page
|
||||
getrecomVideo()
|
||||
@@ -184,6 +190,27 @@ function confirmUpdateVersion(){
|
||||
plus.runtime.openURL(iosLink, function(res) {});
|
||||
}
|
||||
}
|
||||
function ruleInit(){
|
||||
datas.rule_title = datas.ruleList[datas.ruleIndex].title
|
||||
datas.rule_content = datas.ruleList[datas.ruleIndex].content
|
||||
}
|
||||
/**
|
||||
* 规则确认
|
||||
*/
|
||||
function ruleConfirm() {
|
||||
datas.ruleShow = false
|
||||
datas.ruleIndex++
|
||||
console.log(datas.ruleIndex >= datas.ruleList.length)
|
||||
if( datas.ruleIndex >= datas.ruleList.length) {
|
||||
datas.ruleIndex = 0
|
||||
return
|
||||
}
|
||||
setTimeout(res=>{
|
||||
ruleInit()
|
||||
datas.ruleShow = true
|
||||
},300)
|
||||
}
|
||||
|
||||
// 跳转公告链接
|
||||
function goMsg(url) {
|
||||
// if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
|
||||
@@ -201,15 +228,7 @@ function goMsg(url) {
|
||||
//#endif
|
||||
// }
|
||||
}
|
||||
// 获取弹窗信息
|
||||
async function getPop() {
|
||||
let res = await announcement()
|
||||
if (res.state == 1) {
|
||||
datas.ruleShow = true
|
||||
datas.rule_title = res.title
|
||||
datas.rule_content = res.content
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索跳转
|
||||
function moreVideo() {
|
||||
uni.navigateTo({
|
||||
|
||||
Reference in New Issue
Block a user