修改转盘

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()
},