Browse Source

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

dev
zhaoruhui 3 weeks ago
parent
commit
2d6297118a
  1. 24
      src/views/wealth/goldenWheel.vue

24
src/views/wealth/goldenWheel.vue

@ -463,7 +463,23 @@ async loadHistoryRecord() {
// API // API
await this.fetchWheelInfo(); 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; return true;
}else { }else {
console.error('抽奖API返回错误:', res.msg); console.error('抽奖API返回错误:', res.msg);
@ -474,7 +490,7 @@ async loadHistoryRecord() {
// 使 // 使
await this.fetchWheelInfo(); await this.fetchWheelInfo();
return false;
return true;
} }
} catch (error) { } catch (error) {
console.error('抽奖API调用失败:', error); console.error('抽奖API调用失败:', error);
@ -485,7 +501,7 @@ async loadHistoryRecord() {
// 使 // 使
await this.fetchWheelInfo(); await this.fetchWheelInfo();
return false;
return true;
} }
}, },
@ -503,7 +519,7 @@ async loadHistoryRecord() {
// //
// 3-5 // 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; const extraDegrees = extraRotations * 360;
// //

Loading…
Cancel
Save