Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Ygopro Arena Web
Commits
0e18c100
Commit
0e18c100
authored
Nov 20, 2024
by
Tang Xinwei
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加发牌姬活动二期战绩到UI上
parent
d8d2bb9c
Pipeline
#31250
passed with stage
in 3 minutes and 44 seconds
Changes
2
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
358 additions
and
157 deletions
+358
-157
package-lock.json
package-lock.json
+297
-123
src/components/Profile.vue
src/components/Profile.vue
+61
-34
No files found.
package-lock.json
View file @
0e18c100
This diff is collapsed.
Click to expand it.
src/components/Profile.vue
View file @
0e18c100
...
...
@@ -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/dealer
2
/api/user
'
;
const
apiUrl
=
'
https://sapi.moecube.com:444/dealer
3
/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
);
...
...
Tang Xinwei
@pokeboyexn
mentioned in commit
51d78df5
·
Nov 21, 2024
mentioned in commit
51d78df5
mentioned in commit 51d78df5c7f47fc90b1a96e0b2ca796683910ef7
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment