Commit 42c749da authored by Tang Xinwei's avatar Tang Xinwei

Add dealer debug

parent 1dce3e65
Pipeline #25401 passed with stage
in 1 minute and 43 seconds
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<p class="text-muted" style="font-size:20px;">今日首胜: {{ activity.today }}/1 </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 }}首胜: <p class="text-muted" v-if="showActivity" style="font-size:20px;">{{ activity.name }}首胜:
{{ activity.total }}/{{ activity.max }} </p> {{ activity.total }}/{{ activity.max }} </p>
<p class="text-muted" style="font-size:20px;">VS发牌姬战绩: 胜 {{ userStats.win }} / 负 {{ userStats.lose }} / 总 {{ userStats.total }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -191,6 +192,11 @@ export default { ...@@ -191,6 +192,11 @@ export default {
athletic_wl_ratio: 0, athletic_wl_ratio: 0,
arena_rank: 0 arena_rank: 0
}, },
userStats: {
win: 0,
lose: 0,
total: 0
}
} }
}, },
computed: { computed: {
...@@ -230,15 +236,38 @@ export default { ...@@ -230,15 +236,38 @@ export default {
'username': this.user.username 'username': this.user.username
} }
this.fetchUserStats().then(userStats => {
this.userStats = userStats;
});
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',
// res) // res)
}); });
}, },
methods: { methods: {
// VS发牌姬成绩
fetchUserStats() {
const request = query.stringify({ 'username': this.user.username });
const apiUrl = 'https://sapi.moecube.com:444/dealer/api/user';
const url = `${apiUrl}?${request}`;
console.log('发牌姬API',url)
return Vue.http.get(url)
.then(response => {
return response.json();
})
.then(data => {
console.log('发牌姬信息',data);
})
.catch(error => {
console.error('Error fetching user stats:', error);
});
},
exchangeUserInfo(info) { exchangeUserInfo(info) {
let userName = this.user.username let userName = this.user.username
let exchangeInfo = info let exchangeInfo = info
......
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