修改转盘

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

@@ -3,7 +3,7 @@
<!-- head -->
<view class="almost-lottery__head">
<view class="btn-group u-flex u-row-between">
<view :class="['action', isApple && 'action-shadow']">
<view :class="['action', isApple && 'action-shadow']" @click="toRed">
<text class="pack"></text>
<text class="content">红包<text class="num">{{ totalMoney }}</text></text>
</view>
@@ -46,14 +46,14 @@
<view class="number">1</view>
<view class="text">
<text>抽奖细则</text>
<text>每人每天拥有{{ freeNumDay }}次抽奖机会每次消耗{{ goldNum }}金币</text>
<text>每人每天最多拥有{{ freeNumDay }}次抽奖机会</text>
</view>
</view>
<view class="item item-rule">
<view class="number">2</view>
<view class="text">
<text>奖励说明</text>
<text>a.现金奖系统会即时转入账户余额可提现</text>
<text>a.现金奖系统会即时转入红包余额可提现</text>
<!-- <text>b.金币奖系统会即时转入金币账户可在平台内使用</text> -->
<text>b.实物奖中奖后需联系客服领取</text>
</view>
@@ -134,11 +134,11 @@
// 金币余额
goldCoin: 20,
// 当日免费抽奖次数余额
freeNum: 1,
freeNum: 0,
// 每次消耗的金币数
goldNum: 20,
// 每天免费抽奖次数
freeNumDay: 1
freeNumDay: 10
}
},
computed: {
@@ -147,6 +147,12 @@
}
},
methods: {
toRed(){
uni.navigateTo({
url: '/me/balance/index'
})
},
toGift() {
console.log('1');
uni.navigateTo({
@@ -309,7 +315,7 @@
flag = true
} else {
flag = false
uni.showModal({
uni.showToast({
title: '抽奖次数不足',
icon: 'none'
})
@@ -413,8 +419,9 @@
this.result=''
console.warn('###当前处于模拟的请求接口,并返回了中奖信息###')
const res = await this.$Request.getT('app/discSpinning/draw', {
orderId: this.option.orderId
orderId: this.option.orderId||2145
})
this.getCount()
console.log(res);
if (res.code != 0) {
return uni.showToast({
@@ -510,11 +517,18 @@
if(res.code==0){
this.totalMoney=res.data.amount
}
},
async getCount(){
const res=await this.$Request.getT('app/discSpinning/drawCount')
if(res.code==0){
this.freeNum=res.count||0
}
}
},
onLoad(opt) {
this.option = opt
this.prizeList = []
this.getCount()
this.getRedPack()
this.getPrizeList()
},

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
}
},
//播放时的回掉

View File

@@ -20,8 +20,8 @@
</view>
</view>
</view>
<view class="u-p-t-30 u-p-b-30" v-if="hasAjax&&!list.length">
<u-empty text="暂无奖品"></u-empty>
<view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!list.length">
<u-empty text="暂无奖品" src="/static/icon-empty.svg"></u-empty>
</view>
</view>
<!-- <view class="u-p-30">
@@ -90,6 +90,9 @@
}
}
.empty{
// min-height: 50vh;
}
.min-page {
min-height: 100vh;