修改转盘

This commit is contained in:
2024-12-06 11:28:25 +08:00
parent fb9733d9eb
commit 8a340fabdd
14 changed files with 827 additions and 82 deletions

View File

@@ -311,50 +311,8 @@
export default {
data() {
return {
noBuyVideoIndex:null,
// 奖品列表,
prizeList: [{
id: 'coupon88',
name: '8.8折',
img: 'https://img11.360buyimg.com/pop/jfs/t1/175718/35/12595/5477/60b660c6Eb850717b/a1cfe750dcdb5b78.png',
},
{
id: 'coupon900',
Color: 'rgb(251, 219, 216)',
name: '900',
img: 'https://img11.360buyimg.com/pop/jfs/t1/190845/9/6092/4489/60b65fe8Ebb8f8284/955da889f6d1c13e.png',
},
{
id: 'coupon1',
name: '1元',
img: 'https://img11.360buyimg.com/pop/jfs/t1/189927/14/6092/4174/60b66173E23c472ea/44af15a151defca1.png',
},
{
id: 'apple',
Color: 'rgba(246, 142, 46, 0.5)',
name: '苹果手机',
img: 'https://img11.360buyimg.com/pop/jfs/t1/177670/26/4591/2514/60a25874Ee0e5332a/99c7bdfede732ae4.png'
},
{
id: 'coupon210',
name: '210元',
img: 'https://img11.360buyimg.com/pop/jfs/t1/124578/12/20170/4429/60b635d8E7089ebb0/7a47d76a2a260cc0.png'
},
{
id: 'jd100',
name: '100京豆',
img: 'https://img11.360buyimg.com/pop/jfs/t1/162790/37/15087/28046/6062a49aE8f2c10f2/5591ff0ff38a45e2.png',
},
{
id: 'coupon400',
name: '400元',
img: 'https://img11.360buyimg.com/pop/jfs/t1/177090/2/7001/4535/60b6607aEe9c1db2a/76c67675f547db3f.png'
},
{
id: 'thanks',
name: '谢谢参与',
img: 'https://storage.jd.com/cdn-upload/dialTemplateHeart.png',
}
],
showMoney: true,
nowBs: 1, //当前倍速
subList: [{
@@ -422,6 +380,7 @@
'width': '750rpx',
},
isShowVideo: '',
noBuyVideoIndex:null
};
},
onUnload() {
@@ -890,7 +849,7 @@
qdCode = uni.getStorageSync('qdCode')
}
let url = config.APIHOST2 + '/pages/login/registerApp?invitation=' + invitationCode + '&qdCode=' + qdCode
this.setShareNum()
// this.setShareNum()
uni.setClipboardData({
data: url,
success(res) {
@@ -985,6 +944,8 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.$refs.popupPya.open('bottom')
this.noBuyVideoIndex=this.current
console.log(this.noBuyVideoIndex)
},
//关闭购买弹窗
closePay() {
@@ -1148,6 +1109,7 @@
//菜单数组
this.meunList = arr;
if (type == true) { //购买视频后返回的
console.log('购买视频后返回的')
let courseDetailsIds = this.videoList[this.current].courseDetailsId;
this.meunList.some((item) => {
if (item.courseDetailsId == courseDetailsIds) {
@@ -1163,6 +1125,12 @@
}
})
})
if(this.noBuyVideoIndex!==null&&this.noBuyVideoIndex==indexss){
this.noBuyVideoIndex=null
return uni.navigateTo({
url:'/me/choujiang/choujiang?orderId'+2144
})
}
} else { //直接跳转进来的
this.videoList = this.meunList
//滚动到记录视频的位置(如果有记录)
@@ -1173,6 +1141,12 @@
this.$nextTick(() => {
let indexss = indexs > 0 ? indexs : 0
if (this.videoList[indexss].videoUrl) { //有播放权限
if(this.noBuyVideoIndex!==null&&this.noBuyVideoIndex==indexss){
this.noBuyVideoIndex=null
return uni.navigateTo({
url:'/me/choujiang/choujiang'
})
}
let numIdCurr = this.videoList[indexss].courseDetailsId;
this.videoContextId = 'myVideo' + numIdCurr;
this.videoContext = uni.createVideoContext(this

View File

@@ -314,6 +314,8 @@
},
data() {
return {
//记录未购买视频索引
noBuyVideoIndex:null,
//奖品列表
prizeList: [{
id: 'coupon88',
@@ -755,6 +757,7 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex=this.current
},
// 获取收藏状态
getMyLoveStatus() {
@@ -1419,6 +1422,12 @@
}
})
})
if(this.noBuyVideoIndex!==null&&this.noBuyVideoIndex==indexss){
this.noBuyVideoIndex=null
return uni.navigateTo({
url:'/me/choujiang/choujiang?orderId'+2144
})
}
} else { //直接跳转进来的
let indexs = -1
@@ -1502,6 +1511,13 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex=this.current
}else{
if(this.noBuyVideoIndex!==null&& this.current==this.noBuyVideoIndex){
uni.navigateTo({
url:'/me/choujaing/choujiang'
})
}
}
})
@@ -1654,6 +1670,7 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex=this.current
}
this.$nextTick(() => {
//插入历史记录
@@ -1694,6 +1711,7 @@
this.zongPrice = this.info.price
this.countPrice = this.videoList[this.current].price
this.showPay = true
this.noBuyVideoIndex=this.current
}
},
//播放时的回掉