Commit d8579224 authored by Tang Xinwei's avatar Tang Xinwei

Merge branch 'dealer_season2_changes' into 'master'

前端用户信息页面增加发牌姬第二季活动战绩

See merge request !9
parents 251ef746 7cadda7e
Pipeline #31263 passed with stages
in 2 minutes and 6 seconds
......@@ -10,8 +10,10 @@
<p class="text-muted" style="font-size:20px;">今日首胜: {{ activity.today }}/1 </p>
<!-- <p class="text-muted" v-if="showActivity" style="font-size:20px;">{{ activity.name }}首胜:
{{ activity.total }}/{{ activity.max }} </p> -->
<p class="text-muted" style="font-size:20px;">VS发牌姬:胜{{ vsDealerStats.win }}/负{{ vsDealerStats.lose }}/总{{ vsDealerStats.total }}</p>
<p class="text-muted" style="font-size:20px;">VS深渊代码:胜{{ vsGenesisStats.win }}/负{{ vsGenesisStats.lose }}/总{{ vsGenesisStats.total }}</p>
<p class="text-muted" style="font-size:20px;">
赌圣争霸大赛战绩:<br>
击败了{{ vsDuelMonsterStats.win }}位对手 <br> 被干翻了{{ vsDuelMonsterStats.lose }}
</p>
</div>
</div>
</div>
......@@ -194,12 +196,17 @@ export default {
athletic_wl_ratio: 0,
arena_rank: 0
},
vsDealerStats: { //发牌姬战绩
win: 0,
lose: 0,
total: 0
},
vsGenesisStats: { //VS深渊代码战绩
// vsDealerStats: { //发牌姬战绩
// win: 0,
// lose: 0,
// total: 0
// },
// vsGenesisStats: { //VS深渊代码战绩
// win: 0,
// lose: 0,
// total: 0
// },
vsDuelMonsterStats: { //二期 卡片精灵战绩战绩
win: 0,
lose: 0,
total: 0
......@@ -243,13 +250,17 @@ export default {
'username': this.user.username
}
// 获取VS发牌姬战绩
this.fetchVsDealerStats().then(vsDealerStats => {
this.vsDealerStats = vsDealerStats;
});
// 获取VS发牌姬活动战绩
// this.fetchVsDealerStats().then(vsDealerStats => {
// this.vsDealerStats = vsDealerStats;
// });
this.fetchVsGenesisStats().then(vsGenesisStats => {
this.vsGenesisStats = vsGenesisStats;
// this.fetchVsGenesisStats().then(vsGenesisStats => {
// this.vsGenesisStats = vsGenesisStats;
// });
this.fetchVsDuelMonsterStats().then(vsDuelMonsterStats => {
this.vsDuelMonsterStats = vsDuelMonsterStats;
});
API.getUserInfo(opt).then((res) => {
......@@ -263,30 +274,46 @@ export default {
methods: {
// VS发牌姬成绩
async fetchVsDealerStats() {
try {
const apiUrl = 'https://sapi.moecube.com:444/dealer/api/user';
const url = `${apiUrl}/${this.user.username}`;
console.log('发牌姬API', url);
const response = await Vue.http.get(url);
const jsonData = await response.json();
console.log('发牌姬response', jsonData.data);
return jsonData.data;
} catch (error) {
console.error('Error fetching user stats:', error);
throw error;
}
},
// VS深渊代码成绩
async fetchVsGenesisStats() {
// async fetchVsDealerStats() {
// try {
// const apiUrl = 'https://sapi.moecube.com:444/dealer/api/user';
// const url = `${apiUrl}/${this.user.username}`;
// console.log('发牌姬API', url);
// const response = await Vue.http.get(url);
// const jsonData = await response.json();
// console.log('发牌姬response', jsonData.data);
// return jsonData.data;
// } catch (error) {
// console.error('Error fetching user stats:', error);
// throw error;
// }
// },
// // VS深渊代码成绩
// async fetchVsGenesisStats() {
// try {
// const apiUrl = 'https://sapi.moecube.com:444/dealer2/api/user';
// const url = `${apiUrl}/${this.user.username}`;
// console.log('深渊代码API', url);
// const response = await Vue.http.get(url);
// const jsonData = await response.json();
// console.log('深渊代码response', jsonData.data);
// return jsonData.data;
// } catch (error) {
// console.error('Error fetching user stats:', error);
// throw error;
// }
// },
// VS卡片精灵成绩
async fetchVsDuelMonsterStats() {
try {
const apiUrl = 'https://sapi.moecube.com:444/dealer2/api/user';
const apiUrl = 'https://sapi.moecube.com:444/dealer3/api/user';
const url = `${apiUrl}/${this.user.username}`;
console.log('深渊代码API', url);
console.log('世界BOSS卡片精灵API: ', url);
const response = await Vue.http.get(url);
const jsonData = await response.json();
console.log('深渊代码response', jsonData.data);
console.log('世界BOSS卡片精灵response: ', jsonData.data);
return jsonData.data;
} catch (error) {
console.error('Error fetching user stats:', error);
......
......@@ -27,8 +27,10 @@
<!--<p class="text-nowrap text-muted" style="font-size:20px;">有妞不泡,大逆不道;遇妞则泡,替天行道。 </p>-->
<p class="text-muted" style="font-size:20px;">今日首胜: {{activity.today}}/1 </p>
<!-- <p class="text-muted" v-if="showActivity" style="font-size:20px;">{{activity.name}}首胜: {{activity.total}}/{{activity.max}} </p> -->
<p class="text-muted" style="font-size:20px;">VS发牌姬: 胜{{ vsDealerStats.win }}/负{{ vsDealerStats.lose }}/总{{ vsDealerStats.total }}</p>
<p class="text-muted" style="font-size:20px;">VS深渊代码:胜{{ vsGenesisStats.win }}/负{{ vsGenesisStats.lose }}/总{{ vsGenesisStats.total }}</p>
<p class="text-muted" style="font-size:20px;">
赌圣争霸大赛战绩:<br>
击败了{{ vsDuelMonsterStats.win }}位对手 <br> 被干翻了{{ vsDuelMonsterStats.lose }}
</p>
</div>
</div>
</div>
......@@ -203,12 +205,17 @@
athletic_wl_ratio: 0,
arena_rank: 0
},
vsDealerStats: { //发牌姬战绩
win: 0,
lose: 0,
total: 0
},
vsGenesisStats: { //VS深渊代码战绩
// vsDealerStats: { //发牌姬战绩
// win: 0,
// lose: 0,
// total: 0
// },
// vsGenesisStats: { //VS深渊代码战绩
// win: 0,
// lose: 0,
// total: 0
// },
vsDuelMonsterStats: { //二期 卡片精灵战绩战绩
win: 0,
lose: 0,
total: 0
......@@ -229,13 +236,16 @@
this.isMobile = true;
}
// 获取VS发牌姬战绩
this.fetchVsDealerStats().then(vsDealerStats => {
this.vsDealerStats = vsDealerStats;
});
// // 获取VS发牌姬战绩
// this.fetchVsDealerStats().then(vsDealerStats => {
// this.vsDealerStats = vsDealerStats;
// });
this.fetchVsGenesisStats().then(vsGenesisStats => {
this.vsGenesisStats = vsGenesisStats;
// this.fetchVsGenesisStats().then(vsGenesisStats => {
// this.vsGenesisStats = vsGenesisStats;
// });
this.fetchVsDuelMonsterStats().then(vsDuelMonsterStats => {
this.vsDuelMonsterStats = vsDuelMonsterStats;
});
},
......@@ -303,15 +313,48 @@
},
// VS发牌姬成绩
async fetchVsDealerStats() {
const username = querystring.parse(location.hash.slice(11)).username
// async fetchVsDealerStats() {
// const username = querystring.parse(location.hash.slice(11)).username
// try {
// const apiUrl = 'https://sapi.moecube.com:444/dealer/api/user';
// const url = `${apiUrl}/${username}`;
// console.log('发牌姬API', url);
// const response = await Vue.http.get(url);
// const jsonData = await response.json();
// console.log('发牌姬response', jsonData.data);
// return jsonData.data;
// } catch (error) {
// console.error('Error fetching user stats:', error);
// throw error;
// }
// },
// // VS深渊代码成绩
// async fetchVsGenesisStats() {
// const username = querystring.parse(location.hash.slice(11)).username
// try {
// const apiUrl = 'https://sapi.moecube.com:444/dealer2/api/user';
// const url = `${apiUrl}/${username}`;
// console.log('深渊代码API', url);
// const response = await Vue.http.get(url);
// const jsonData = await response.json();
// console.log('深渊代码response', jsonData.data);
// return jsonData.data;
// } catch (error) {
// console.error('Error fetching user stats:', error);
// throw error;
// }
// },
// VS卡片精灵成绩
async fetchVsDuelMonsterStats() {
try {
const apiUrl = 'https://sapi.moecube.com:444/dealer/api/user';
const url = `${apiUrl}/${username}`;
console.log('发牌姬API', url);
const apiUrl = 'https://sapi.moecube.com:444/dealer3/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('发牌姬response', jsonData.data);
console.log('世界BOSS卡片精灵response: ', jsonData.data);
return jsonData.data;
} catch (error) {
console.error('Error fetching user stats:', error);
......@@ -319,22 +362,6 @@
}
},
// VS深渊代码成绩
async fetchVsGenesisStats() {
const username = querystring.parse(location.hash.slice(11)).username
try {
const apiUrl = 'https://sapi.moecube.com:444/dealer2/api/user';
const url = `${apiUrl}/${username}`;
console.log('深渊代码API', url);
const response = await Vue.http.get(url);
const jsonData = await response.json();
console.log('深渊代码response', jsonData.data);
return jsonData.data;
} catch (error) {
console.error('Error fetching user stats:', error);
throw error;
}
},
renderPage: function () {
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