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
b3d56c7a
Commit
b3d56c7a
authored
Feb 12, 2024
by
Tang Xinwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dealer api read error
parent
42c749da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
src/components/Profile.vue
src/components/Profile.vue
+19
-20
No files found.
src/components/Profile.vue
View file @
b3d56c7a
...
...
@@ -10,7 +10,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发牌姬
战绩: 胜
{{
userStats
.
win
}}
/ 负
{{
userStats
.
lose
}}
/ 总
{{
us
erStats
.
total
}}
</p>
<p
class=
"text-muted"
style=
"font-size:20px;"
>
VS发牌姬
: 胜
{{
vsDealerStats
.
win
}}
/ 负
{{
vsDealerStats
.
lose
}}
/ 总
{{
vsDeal
erStats
.
total
}}
</p>
</div>
</div>
</div>
...
...
@@ -159,6 +159,7 @@ import API from '../api'
import
{
mapGetters
}
from
'
vuex
'
import
moment
from
'
moment
'
import
tb_language
from
'
./tb_lang.js
'
import
Vue
from
'
vue
'
;
var
rankTable
;
...
...
@@ -192,7 +193,7 @@ export default {
athletic_wl_ratio
:
0
,
arena_rank
:
0
},
userStats
:
{
vsDealerStats
:
{
//发牌姬战绩
win
:
0
,
lose
:
0
,
total
:
0
...
...
@@ -235,9 +236,8 @@ export default {
let
opt
=
{
'
username
'
:
this
.
user
.
username
}
this
.
fetchUserStats
().
then
(
userStats
=>
{
this
.
userStats
=
userStats
;
this
.
fetchVsDealerStats
().
then
(
vsDealerStats
=>
{
this
.
vsDealerStats
=
vsDealerStats
;
});
API
.
getUserInfo
(
opt
).
then
((
res
)
=>
{
...
...
@@ -251,23 +251,22 @@ export default {
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
);
});
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
;
}
},
exchangeUserInfo
(
info
)
{
let
userName
=
this
.
user
.
username
let
exchangeInfo
=
info
...
...
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