Browse Source

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

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

24
src/views/wealth/goldenWheel.vue

@ -470,9 +470,25 @@ async loadHistoryRecord() {
// API // API
await this.fetchWheelInfo(); await this.fetchWheelInfo();
return true; 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 { } else {
// prizeMessageprizeAmount
this.prizeMessage = prize;
this.prizeAmount = '';
}
// API
await this.fetchWheelInfo();
return true;
}else {
console.error('抽奖API返回错误:', res.msg); console.error('抽奖API返回错误:', res.msg);
// //
this.prizeMessage = '抽奖失败'; this.prizeMessage = '抽奖失败';
@ -481,7 +497,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);
@ -492,7 +508,7 @@ async loadHistoryRecord() {
// 使 // 使
await this.fetchWheelInfo(); await this.fetchWheelInfo();
return false;
return true;
} }
}, },
@ -510,7 +526,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