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
d8579224
Commit
d8579224
authored
Nov 21, 2024
by
Tang Xinwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dealer_season2_changes' into 'master'
前端用户信息页面增加发牌姬第二季活动战绩 See merge request
!9
parents
251ef746
7cadda7e
Pipeline
#31263
passed with stages
in 2 minutes and 6 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
125 additions
and
71 deletions
+125
-71
src/components/Profile.vue
src/components/Profile.vue
+61
-34
src/components/Userinfo.vue
src/components/Userinfo.vue
+64
-37
No files found.
src/components/Profile.vue
View file @
d8579224
...
...
@@ -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
);
...
...
src/components/Userinfo.vue
View file @
d8579224
...
...
@@ -27,8 +27,10 @@
<!--
<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"
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>
...
...
@@ -203,12 +205,17 @@
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
...
...
@@ -229,13 +236,16 @@
this
.
isMobile
=
true
;
}
// 获取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
;
});
},
...
...
@@ -303,15 +313,48 @@
},
// VS发牌姬成绩
async
fetchVsDealerStats
()
{
const
username
=
querystring
.
parse
(
location
.
hash
.
slice
(
11
)).
username
// async fetchVsDealerStats() {
// const username = querystring.parse(location.hash.slice(11)).username
// try {
// const apiUrl = 'https://sapi.moecube.com:444/dealer/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;
// }
// },
// // 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;
// }
// },
// VS卡片精灵成绩
async
fetchVsDuelMonsterStats
()
{
try
{
const
apiUrl
=
'
https://sapi.moecube.com:444/dealer/api/user
'
;
const
url
=
`
${
apiUrl
}
/
${
username
}
`
;
console
.
log
(
'
发牌姬API
'
,
url
);
const
apiUrl
=
'
https://sapi.moecube.com:444/dealer
3
/api/user
'
;
const
url
=
`
${
apiUrl
}
/
${
this
.
user
.
username
}
`
;
console
.
log
(
'
世界BOSS卡片精灵API:
'
,
url
);
const
response
=
await
Vue
.
http
.
get
(
url
);
const
jsonData
=
await
response
.
json
();
console
.
log
(
'
发牌姬response
'
,
jsonData
.
data
);
const
jsonData
=
await
response
.
json
();
console
.
log
(
'
世界BOSS卡片精灵response:
'
,
jsonData
.
data
);
return
jsonData
.
data
;
}
catch
(
error
)
{
console
.
error
(
'
Error fetching user stats:
'
,
error
);
...
...
@@ -319,22 +362,6 @@
}
},
// 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
)
{
...
...
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