添加抽奖到首页

This commit is contained in:
duan 2024-12-31 15:41:09 +08:00
parent adee64f460
commit 75a0fa06bd
2 changed files with 41 additions and 11 deletions

View File

@ -29,25 +29,27 @@
</template>
</view>
<view style="display: flex;align-items: center;justify-content: space-between;padding:0 20rpx;">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('')">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" :style="active==1?'color:#ff6b7f':''" @tap="getrecomVideo('',1)">
最新
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('1')">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" :style="active==2?'color:#ff6b7f':''" @tap="getrecomVideo('1',2)">
排行
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('2')">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" :style="active==3?'color:#ff6b7f':''" @tap="getrecomVideo('2',3)">
最热
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('1')">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" :style="active==4?'color:#ff6b7f':''" @tap="getrecomVideo('1',4)">
剧情
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('2')">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" :style="active==5?'color:#ff6b7f':''" @tap="getrecomVideo('2',5)">
飙升
</view>
</view>
<view class="">
<contentlist :list='list'></contentlist>
</view>
<u-image v-if="isShowMoneyPay" @click="goMsg('/me/VjgyqAzklr/VjgyqAzklr')" :src="`../../static/red-pack-new.gif`"
style="width: 200rpx;height: 200rpx;position: fixed;right: 10rpx;bottom: 180rpx;"></u-image>
</view>
</template>
@ -61,18 +63,46 @@
return {
noticeList: [], //
list: [],
page: 1
page: 1,
active:1,
isShowMoneyPay: true,
}
},
onShow() {
this.getMsg()
this.getrecomVideo()
httpsRequest.getT("/app/common/type/919", {}).then(res => {
if (res.code == 0) {
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
this.isIosApp = isIos
this.isShowMoneyPay = !(res.data.value == '1' && isIos)
}
});
},
onReachBottom() {
++this.page
this.getrecomVideo()
},
methods: {
//
goMsg(url) {
if (url.indexOf('/pages/') !== -1 || url.indexOf('/me/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
},
moreVideo() {
uni.navigateTo({
url: '/pages/index/course/courseList?title=最新热播'
@ -80,7 +110,8 @@
},
//
//
getrecomVideo(sort) {
getrecomVideo(sort,active=1) {
this.active=active
if (sort) {
this.page = 1
}

View File

@ -429,10 +429,9 @@
let isIos = sysInfo.platform === 'ios'
this.isShowMoneyPay = !(res.data.value === '1' && isIos)
if (res.data.value == 1) {
// debug
this.isiosExamine = true
}else{
this.isiosExamine = false
} else {
this.isiosExamine = true
}
}
});
@ -500,7 +499,7 @@
//
seVideo(item) {
const time = 100;
console.log(item,'调试1')
console.log(item, '调试1')
if (returnIsSafari()) {
this.pageScrollTo(time)
setTimeout(() => {