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
f4b659ad
Commit
f4b659ad
authored
Feb 21, 2024
by
Tang Xinwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add_genesis' into 'master'
Add world boss genesis battle info See merge request
!5
parents
1901ebc7
5d9214e4
Pipeline
#25495
passed with stages
in 1 minute and 4 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
1 deletion
+54
-1
src/components/Profile.vue
src/components/Profile.vue
+26
-0
src/components/Userinfo.vue
src/components/Userinfo.vue
+28
-1
No files found.
src/components/Profile.vue
View file @
f4b659ad
...
...
@@ -11,6 +11,7 @@
<!--
<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>
</div>
</div>
</div>
...
...
@@ -197,6 +198,11 @@ export default {
win
:
0
,
lose
:
0
,
total
:
0
},
vsGenesisStats
:
{
//VS深渊代码战绩
win
:
0
,
lose
:
0
,
total
:
0
}
}
},
...
...
@@ -242,6 +248,10 @@ export default {
this
.
vsDealerStats
=
vsDealerStats
;
});
this
.
fetchVsGenesisStats
().
then
(
vsGenesisStats
=>
{
this
.
vsGenesisStats
=
vsGenesisStats
;
});
API
.
getUserInfo
(
opt
).
then
((
res
)
=>
{
this
.
user_info
=
res
.
data
// console.log('%c ---------------------src' + '\\' + 'components' + '\\' + 'Profile.vue---------------------%c:219', 'background:#ed162b', 'background:#7d382d',
...
...
@@ -268,6 +278,22 @@ export default {
}
},
// 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
;
}
},
exchangeUserInfo
(
info
)
{
let
userName
=
this
.
user
.
username
...
...
src/components/Userinfo.vue
View file @
f4b659ad
...
...
@@ -28,6 +28,7 @@
<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>
</div>
</div>
</div>
...
...
@@ -206,6 +207,11 @@
win
:
0
,
lose
:
0
,
total
:
0
},
vsGenesisStats
:
{
//VS深渊代码战绩
win
:
0
,
lose
:
0
,
total
:
0
}
}
},
...
...
@@ -228,6 +234,10 @@
this
.
vsDealerStats
=
vsDealerStats
;
});
this
.
fetchVsGenesisStats
().
then
(
vsGenesisStats
=>
{
this
.
vsGenesisStats
=
vsGenesisStats
;
});
},
watch
:
{
...
...
@@ -309,6 +319,23 @@
}
},
// 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
)
{
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