Commit b88c4b24 authored by Tang Xinwei's avatar Tang Xinwei

发牌姬活动三阶段前端更新

parent 7e87aa29
Pipeline #32629 passed with stage
in 2 minutes and 11 seconds
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
赌圣争霸大赛战绩:<br> 赌圣争霸大赛战绩:<br>
击败了{{ vsDuelMonsterStats.win }}位对手 <br> 被干翻了{{ vsDuelMonsterStats.lose }} 击败了{{ vsDuelMonsterStats.win }}位对手 <br> 被干翻了{{ vsDuelMonsterStats.lose }}
</p> </p>
<p class="text-muted" style="font-size:20px;">
VS 码丽丝 素体:<br>
胜:{{ vsMalissStats.win }} <br> 负:{{ vsMalissStats.lose }}
</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -206,7 +210,12 @@ export default { ...@@ -206,7 +210,12 @@ export default {
// lose: 0, // lose: 0,
// total: 0 // total: 0
// }, // },
vsDuelMonsterStats: { //二期 卡片精灵战绩战绩 vsDuelMonsterStats: { //二期 卡片精灵战绩
win: 0,
lose: 0,
total: 0
},
vsMalissStats: { //二期 素体战绩
win: 0, win: 0,
lose: 0, lose: 0,
total: 0 total: 0
...@@ -263,6 +272,10 @@ export default { ...@@ -263,6 +272,10 @@ export default {
this.vsDuelMonsterStats = vsDuelMonsterStats; this.vsDuelMonsterStats = vsDuelMonsterStats;
}); });
this.fetchVsMalissStats().then(vsMalissStats => {
this.vsMalissStats = vsMalissStats;
});
API.getUserInfo(opt).then((res) => { API.getUserInfo(opt).then((res) => {
this.user_info = res.data this.user_info = res.data
// console.log('%c ---------------------src' + '\\' + 'components' + '\\' + 'Profile.vue---------------------%c:219', 'background:#ed162b', 'background:#7d382d', // console.log('%c ---------------------src' + '\\' + 'components' + '\\' + 'Profile.vue---------------------%c:219', 'background:#ed162b', 'background:#7d382d',
...@@ -321,6 +334,22 @@ export default { ...@@ -321,6 +334,22 @@ export default {
} }
}, },
// VS素体成绩
async fetchVsMalissStats() {
try {
const apiUrl = 'https://sapi.moecube.com:444/dealer4/api/user';
const url = `${apiUrl}/${this.user.username}`;
console.log('世界BOSS素体API: ', url);
const response = await Vue.http.get(url);
const jsonData = await response.json();
console.log('世界BOSS素体response: ', jsonData.data);
return jsonData.data;
} catch (error) {
console.error('Error fetching user stats:', error);
throw error;
}
},
exchangeUserInfo(info) { exchangeUserInfo(info) {
let userName = this.user.username let userName = this.user.username
......
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
赌圣争霸大赛战绩:<br> 赌圣争霸大赛战绩:<br>
击败了{{ vsDuelMonsterStats.win }}位对手 <br> 被干翻了{{ vsDuelMonsterStats.lose }} 击败了{{ vsDuelMonsterStats.win }}位对手 <br> 被干翻了{{ vsDuelMonsterStats.lose }}
</p> </p>
<p class="text-muted" style="font-size:20px;">
VS 码丽丝 素体:<br>
胜:{{ vsMalissStats.win }} <br> 负:{{ vsMalissStats.lose }}
</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -215,7 +219,12 @@ ...@@ -215,7 +219,12 @@
// lose: 0, // lose: 0,
// total: 0 // total: 0
// }, // },
vsDuelMonsterStats: { //二期 卡片精灵战绩战绩 vsDuelMonsterStats: { //二期 卡片精灵战绩
win: 0,
lose: 0,
total: 0
},
vsMalissStats: { //二期 素体战绩
win: 0, win: 0,
lose: 0, lose: 0,
total: 0 total: 0
...@@ -248,6 +257,10 @@ ...@@ -248,6 +257,10 @@
this.vsDuelMonsterStats = vsDuelMonsterStats; this.vsDuelMonsterStats = vsDuelMonsterStats;
}); });
this.fetchVsMalissStats().then(vsMalissStats => {
this.vsMalissStats = vsMalissStats;
});
}, },
watch: { watch: {
...@@ -363,6 +376,22 @@ ...@@ -363,6 +376,22 @@
} }
}, },
// VS素体成绩
async fetchVsMalissStats() {
try {
const apiUrl = 'https://sapi.moecube.com:444/dealer4/api/user';
const url = `${apiUrl}/${this.user.username}`;
console.log('世界BOSS素体API: ', url);
const response = await Vue.http.get(url);
const jsonData = await response.json();
console.log('世界BOSS素体response: ', jsonData.data);
return jsonData.data;
} catch (error) {
console.error('Error fetching user stats:', error);
throw error;
}
},
renderPage: function () { renderPage: function () {
if (rankTable) { if (rankTable) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment