Browse Source

Merge branch 'milestone-20250826-财富金轮' into dev

dev
zhaoruhui 3 weeks ago
parent
commit
110d1b9c7d
  1. 26
      src/views/wealth/goldenWheel.vue

26
src/views/wealth/goldenWheel.vue

@ -469,10 +469,26 @@ async loadHistoryRecord() {
}
// API
await this.fetchWheelInfo();
return true;
}else if(res.code === 400){
const prize = res.msg;
// API
const SpaceIndex = prize.indexOf(',');
if (SpaceIndex !== -1) {
// prizeMessage
this.prizeMessage = prize.substring(0, SpaceIndex);
// prizeAmount
this.prizeAmount = prize.substring(SpaceIndex + 1);
} else {
// prizeMessageprizeAmount
this.prizeMessage = prize;
this.prizeAmount = '';
}
// API
await this.fetchWheelInfo();
return true;
} else {
}else {
console.error('抽奖API返回错误:', res.msg);
//
this.prizeMessage = '抽奖失败';
@ -481,7 +497,7 @@ async loadHistoryRecord() {
// 使
await this.fetchWheelInfo();
return false;
return true;
}
} catch (error) {
console.error('抽奖API调用失败:', error);
@ -492,7 +508,7 @@ async loadHistoryRecord() {
// 使
await this.fetchWheelInfo();
return false;
return true;
}
},
@ -510,7 +526,7 @@ async loadHistoryRecord() {
//
// 3-5
const extraRotations = 3 + Math.floor(Math.random() * 3); // 4-5
const extraRotations = 5 + Math.floor(Math.random() * 3); // 4-5
const extraDegrees = extraRotations * 360;
//

Loading…
Cancel
Save