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
96c31a64
Commit
96c31a64
authored
Feb 12, 2024
by
Tang Xinwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dealer info to Userinfo and profile
parent
b3d56c7a
Pipeline
#25403
passed with stage
in 2 minutes and 26 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
src/components/Profile.vue
src/components/Profile.vue
+5
-3
src/components/Userinfo.vue
src/components/Userinfo.vue
+29
-1
No files found.
src/components/Profile.vue
View file @
96c31a64
...
...
@@ -8,9 +8,9 @@
<div
class=
"caption"
>
<h3><i
class=
"glyphicon glyphicon-user"
></i>
<strong>
{{
user
.
username
}}
</strong></h3>
<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"
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>
</div>
</div>
</div>
...
...
@@ -236,6 +236,8 @@ export default {
let
opt
=
{
'
username
'
:
this
.
user
.
username
}
// 获取VS发牌姬战绩
this
.
fetchVsDealerStats
().
then
(
vsDealerStats
=>
{
this
.
vsDealerStats
=
vsDealerStats
;
});
...
...
src/components/Userinfo.vue
View file @
96c31a64
...
...
@@ -26,7 +26,8 @@
<h3>
<i
class=
"glyphicon glyphicon-user"
></i>
<strong>
{{
username
}}
</strong></h3>
<!--
<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"
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>
</div>
</div>
</div>
...
...
@@ -199,6 +200,11 @@
athletic_all
:
0
,
athletic_wl_ratio
:
0
,
arena_rank
:
0
},
vsDealerStats
:
{
//发牌姬战绩
win
:
0
,
lose
:
0
,
total
:
0
}
}
},
...
...
@@ -216,6 +222,11 @@
this
.
isMobile
=
true
;
}
// 获取VS发牌姬战绩
this
.
fetchVsDealerStats
().
then
(
vsDealerStats
=>
{
this
.
vsDealerStats
=
vsDealerStats
;
});
},
watch
:
{
...
...
@@ -233,6 +244,7 @@
window
.
onhashchange
=
this
.
init
;
},
computed
:
{
...
mapGetters
({
lang
:
'
getLang
'
,
...
...
@@ -279,6 +291,22 @@
this
.
searchByUsername
(
username
)
},
// 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
;
}
},
renderPage
:
function
()
{
if
(
rankTable
)
{
rankTable
.
destroy
();
...
...
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