添加抽奖到首页
This commit is contained in:
@@ -29,25 +29,27 @@
|
|||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center;justify-content: space-between;padding:0 20rpx;">
|
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<contentlist :list='list'></contentlist>
|
<contentlist :list='list'></contentlist>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -61,18 +63,46 @@
|
|||||||
return {
|
return {
|
||||||
noticeList: [], //公告列表
|
noticeList: [], //公告列表
|
||||||
list: [],
|
list: [],
|
||||||
page: 1
|
page: 1,
|
||||||
|
active:1,
|
||||||
|
isShowMoneyPay: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getMsg()
|
this.getMsg()
|
||||||
this.getrecomVideo()
|
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() {
|
onReachBottom() {
|
||||||
++this.page
|
++this.page
|
||||||
this.getrecomVideo()
|
this.getrecomVideo()
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
moreVideo() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/course/courseList?title=最新热播'
|
url: '/pages/index/course/courseList?title=最新热播'
|
||||||
@@ -80,7 +110,8 @@
|
|||||||
},
|
},
|
||||||
// 列表
|
// 列表
|
||||||
//获取推荐视频
|
//获取推荐视频
|
||||||
getrecomVideo(sort) {
|
getrecomVideo(sort,active=1) {
|
||||||
|
this.active=active
|
||||||
if (sort) {
|
if (sort) {
|
||||||
this.page = 1
|
this.page = 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,10 +429,9 @@
|
|||||||
let isIos = sysInfo.platform === 'ios'
|
let isIos = sysInfo.platform === 'ios'
|
||||||
this.isShowMoneyPay = !(res.data.value === '1' && isIos)
|
this.isShowMoneyPay = !(res.data.value === '1' && isIos)
|
||||||
if (res.data.value == 1) {
|
if (res.data.value == 1) {
|
||||||
// debug
|
|
||||||
this.isiosExamine = true
|
|
||||||
}else{
|
|
||||||
this.isiosExamine = false
|
this.isiosExamine = false
|
||||||
|
} else {
|
||||||
|
this.isiosExamine = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -500,7 +499,7 @@
|
|||||||
//查看视频
|
//查看视频
|
||||||
seVideo(item) {
|
seVideo(item) {
|
||||||
const time = 100;
|
const time = 100;
|
||||||
console.log(item,'调试1')
|
console.log(item, '调试1')
|
||||||
if (returnIsSafari()) {
|
if (returnIsSafari()) {
|
||||||
this.pageScrollTo(time)
|
this.pageScrollTo(time)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user