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
GaiaXalter
Ygopro Arena Web
Commits
acf55d6b
Commit
acf55d6b
authored
Dec 14, 2023
by
GaiaXalter
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:同步生产版本且修复单卡链接
parent
cab5ce83
Pipeline
#24358
failed with stages
in 6 seconds
Changes
7
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1078 additions
and
859 deletions
+1078
-859
src/api.js
src/api.js
+154
-149
src/components/Cards.vue
src/components/Cards.vue
+359
-306
src/components/Profile.vue
src/components/Profile.vue
+399
-290
src/components/Ranking.vue
src/components/Ranking.vue
+88
-44
src/components/Rates.vue
src/components/Rates.vue
+0
-2
src/components/lang.js
src/components/lang.js
+2
-0
src/components/tb_lang.js
src/components/tb_lang.js
+76
-68
No files found.
src/api.js
View file @
acf55d6b
...
...
@@ -49,7 +49,7 @@ export default class Api {
}
static
getUserDueHistory
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/history`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/history`
,
{
'
params
'
:
opt
});
}
static
getDownloadUrls
()
{
...
...
@@ -67,72 +67,72 @@ export default class Api {
}
static
getDeckInfo
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/deckinfo`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/deckinfo`
,
{
'
params
'
:
opt
});
}
static
saveDeck
(
opt
)
{
const
url
=
`
${
URL
}
/deckinfo`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
saveDeckDemo
(
opt
)
{
const
url
=
`
${
URL
}
/deckdemo`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getReport
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/report`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/report`
,
{
'
params
'
:
opt
});
}
static
getVoteList
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/votes`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/votes`
,
{
'
params
'
:
opt
});
}
static
saveVote
(
opt
)
{
const
url
=
`
${
URL
}
/votes`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
voteStatus
(
opt
)
{
const
url
=
`
${
URL
}
/voteStatus`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getVote
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/vote`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/vote`
,
{
'
params
'
:
opt
});
}
static
submitVote
(
opt
)
{
const
url
=
`
${
URL
}
/submitVote`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
saveAds
(
opt
)
{
const
url
=
`
${
URL
}
/ads`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getAdsList
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/ads`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/ads`
,
{
'
params
'
:
opt
});
}
static
adsStatus
(
opt
)
{
const
url
=
`
${
URL
}
/adsStatus`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getAd
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/getAd`
,
{
'
params
'
:
opt
});
return
Vue
.
http
.
get
(
`
${
URL
}
/getAd`
,
{
'
params
'
:
opt
});
}
static
adClick
(
opt
)
{
const
url
=
`
${
URL
}
/adClick`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
adImpl
(
opt
)
{
const
url
=
`
${
URL
}
/adImpl`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getFirstWin
(
opt
)
{
...
...
@@ -143,21 +143,26 @@ export default class Api {
static
adSwitchChange
(
opt
)
{
const
url
=
`
${
URL
}
/adSwitchChange`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
saveActivity
(
opt
)
{
const
url
=
`
${
URL
}
/activity`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
saveLabel
(
opt
)
{
const
url
=
`
${
URL
}
/label`
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
return
Vue
.
http
.
post
(
url
,
opt
,
{
'
emulateJSON
'
:
true
});
}
static
getLabel
(
opt
)
{
return
Vue
.
http
.
get
(
`
${
URL
}
/label`
,
{
'
params
'
:
{}
});
return
Vue
.
http
.
get
(
`
${
URL
}
/label`
,
{
'
params
'
:
{}
});
}
static
getMonthlyHistory
(
opt
)
{
const
url
=
`https://sapi.moecube.com:444/ygopro/arena/historyScore`
;
return
Vue
.
http
.
get
(
url
,
{
params
:
opt
});
}
// https://sapi.moecube.com:444/ygopro/arena/historyScore?username=id&season=yyyy-mm
}
src/components/Cards.vue
View file @
acf55d6b
This diff is collapsed.
Click to expand it.
src/components/Profile.vue
View file @
acf55d6b
This diff is collapsed.
Click to expand it.
src/components/Ranking.vue
View file @
acf55d6b
...
...
@@ -150,74 +150,108 @@
}
}
function
render
Exp
Table
(
tableData
)
{
function
render
Arena
Table
(
tableData
)
{
tableData
=
tableData
||
[];
var
lang
=
localStorage
.
getItem
(
'
lang
'
)
||
'
cn
'
;
var
rank
=
1
;
var
processData
=
tableData
.
map
(
function
(
d
)
{
return
[
rank
++
,
d
.
username
,
parseInt
(
d
.
exp
),
d
.
entertain_win
,
d
.
entertain_lose
];
var
processData
=
tableData
.
map
(
function
(
d
)
{
let
ratio
=
0
if
(
d
.
athletic_all
>
0
)
{
ratio
=
(
d
.
athletic_win
/
d
.
athletic_all
*
100
).
toFixed
(
2
)
}
var
iconSrc
=
'
https://sapi.moecube.com:444/avatar/avatar/
'
+
d
.
username
+
'
/100/pic.png
'
;
return
[
rank
++
,
iconSrc
,
String
(
d
.
username
),
parseInt
(
d
.
pt
),
d
.
athletic_win
,
d
.
athletic_lose
,
ratio
+
"
%
"
];
});
var
table
=
$
(
'
#exp_table
'
).
DataTable
({
var
table
=
$
(
'
#pt_table
'
).
DataTable
({
"
autoWidth
"
:
false
,
data
:
processData
,
pageLength
:
25
,
order
:
[
[
0
,
"
asc
"
]
],
"
ordering
"
:
true
,
columns
:
[{
title
:
tb_language
[
lang
].
rank
columns
:
[
{
title
:
tb_language
[
lang
].
rank
,
},
{
title
:
tb_language
[
lang
].
name
title
:
tb_language
[
lang
].
name
,
// Display icon + username in this column
render
:
function
(
data
,
type
,
row
)
{
var
iconSrcWithUsername
=
row
[
1
];
// 获取图像链接
var
username
=
row
[
2
];
// 获取用户名
return
'
<div style="display: flex; align-items: center;">
'
+
'
<img src="
'
+
iconSrcWithUsername
+
'
" style="width: 35px; height: 35px; margin-right: 3px;">
'
+
'
<a href="#/userinfo?username=
'
+
encodeURIComponent
(
username
)
+
'
">
'
+
username
+
'
</a>
'
+
'
</div>
'
;
},
},
{
title
:
tb_language
[
lang
].
exp
visible
:
false
,
// Hide the username column,
},
{
title
:
tb_language
[
lang
].
win
title
:
tb_language
[
lang
].
pt
,
},
{
title
:
tb_language
[
lang
].
lose
title
:
tb_language
[
lang
].
win
,
},
{
title
:
tb_language
[
lang
].
lose
,
},
{
title
:
tb_language
[
lang
].
wl
,
},
],
"
columnDefs
"
:
[{
"
render
"
:
function
(
data
,
type
,
row
)
{
"
render
"
:
function
(
data
,
type
,
row
)
{
return
"
<a href='#/userinfo?username=
"
+
encodeURIComponent
(
data
)
+
"
'>
"
+
data
+
"
</a>
"
;
},
"
targets
"
:
1
},
],
"
language
"
:
lang
===
'
en
'
?
tb_language
.
en
:
tb_language
.
cn
"
targets
"
:
2
},],
"
language
"
:
tb_language
[
lang
],
});
$
(
"
.input-sm
"
).
attr
(
"
placeholder
"
,
placeholder
)
$
(
"
.input-sm
"
).
attr
(
"
placeholder
"
,
placeholder
)
return
table
;
}
function
render
Arena
Table
(
tableData
)
{
function
render
Exp
Table
(
tableData
)
{
tableData
=
tableData
||
[];
var
lang
=
localStorage
.
getItem
(
'
lang
'
)
||
'
cn
'
;
var
rank
=
1
;
var
processData
=
tableData
.
map
(
function
(
d
)
{
let
ratio
=
0
if
(
d
.
athletic_all
>
0
)
{
ratio
=
(
d
.
athletic_win
/
d
.
athletic_all
*
100
).
toFixed
(
2
)
}
return
[
rank
++
,
d
.
username
,
parseInt
(
d
.
pt
),
d
.
athletic_win
,
d
.
athletic_lose
,
ratio
+
"
%
"
];
var
processData
=
tableData
.
map
(
function
(
d
)
{
var
iconSrc
=
'
https://sapi.moecube.com:444/avatar/avatar/
'
+
d
.
username
+
'
/100/pic.png
'
;
return
[
rank
++
,
iconSrc
,
String
(
d
.
username
),
parseInt
(
d
.
exp
),
d
.
entertain_win
,
d
.
entertain_lose
];
});
var
table
=
$
(
'
#pt_table
'
).
DataTable
({
var
table
=
$
(
'
#exp_table
'
).
DataTable
({
data
:
processData
,
pageLength
:
25
,
order
:
[
[
0
,
"
asc
"
]
],
order
:
[[
0
,
"
asc
"
]],
"
ordering
"
:
true
,
columns
:
[{
columns
:
[
{
title
:
tb_language
[
lang
].
rank
},
{
title
:
tb_language
[
lang
].
name
title
:
tb_language
[
lang
].
name
,
// Display icon + username in this column
render
:
function
(
data
,
type
,
row
)
{
var
iconSrcWithUsername
=
row
[
1
];
// 获取图像链接
var
username
=
row
[
2
];
// 获取用户名
return
'
<div style="display: flex; align-items: center;"><img src="
'
+
iconSrcWithUsername
+
'
" style="width: 35px; height: 35px; margin-right: 3px;"> <a href="#/userinfo?username=
'
+
encodeURIComponent
(
username
)
+
'
">
'
+
username
+
'
</a></div>
'
;
},
},
{
visible
:
false
,
// Hide the username column
},
{
title
:
tb_language
[
lang
].
pt
title
:
tb_language
[
lang
].
exp
},
{
title
:
tb_language
[
lang
].
win
...
...
@@ -225,19 +259,16 @@
{
title
:
tb_language
[
lang
].
lose
},
],
"
columnDefs
"
:
[
{
title
:
tb_language
[
lang
].
wl
"
targets
"
:
[
0
,
3
,
4
,
5
],
// Target other columns (exp, win, lose) to make them non-orderable
"
orderable
"
:
false
},
],
"
columnDefs
"
:
[{
"
render
"
:
function
(
data
,
type
,
row
)
{
return
"
<a href='#/userinfo?username=
"
+
encodeURIComponent
(
data
)
+
"
'>
"
+
data
+
"
</a>
"
;
},
"
targets
"
:
1
},
],
"
language
"
:
tb_language
[
lang
]
"
language
"
:
lang
===
'
en
'
?
tb_language
.
en
:
tb_language
.
cn
,
});
$
(
"
.input-sm
"
).
attr
(
"
placeholder
"
,
placeholder
)
$
(
"
.input-sm
"
).
attr
(
"
placeholder
"
,
placeholder
);
return
table
;
}
renderPage
();
...
...
@@ -271,3 +302,16 @@
width
:
250%
;
}
</
style
>
<
style
>
#pt_table
tr
td
:first-child
,
#pt_table
tr
th
:first-child
,
#exp_table
tr
td
:first-child
,
#exp_table
tr
th
:first-child
{
width
:
1%
;
white-space
:
nowrap
;
}
#pt_table
td
,
#pt_table
th
{
text-align
:
left
;
vertical-align
:
middle
}
#epx_table
td
,
#exp_table
th
{
text-align
:
left
;
vertical-align
:
middle
}
</
style
>
src/components/Rates.vue
View file @
acf55d6b
...
...
@@ -11,8 +11,6 @@
class=
"winRateTitle-color-3"
>
上月胜率
</div>
。在每个月
<div
class=
"winRateTitle-color-3"
>
20日
</div>
以及之后,胜率为
<div
class=
"winRateTitle-color-3"
>
当月胜率
</div>
</div>
-->
<div
id=
"winRateTitle-2"
>
更新:
<div
class=
"winRateTitle-color-3"
>
每天更新,当月胜率
</div></div>
</div>
<div
class=
'winRateContent'
>
<div
class=
'winRateContent-Tabs'
>
...
...
src/components/lang.js
View file @
acf55d6b
...
...
@@ -41,6 +41,7 @@ module.exports = {
dueHistory
:
'
最近决斗记录
'
,
athleticDueHistory
:
'
竞技场决斗记录
'
,
entertainDueHistory
:
'
娱乐场决斗记录
'
,
monthlyHistory
:
'
每月决斗记录
'
,
tagInfo
:
'
绿色表示获胜方,红色则表示掉线。
'
,
rates
:
'
卡组胜率
'
,
...
...
@@ -155,6 +156,7 @@ module.exports = {
side
:
'
Side
'
,
extra
:
'
Extra
'
,
dueHistory
:
'
Recent Due History
'
,
monthlyHistory
:
'
Monthly Rank Record
'
,
athleticDueHistory
:
'
Athletic Due History
'
,
entertainDueHistory
:
'
Entertain Due History
'
,
tagInfo
:
'
Green tag represents the winner.Red tag represents player lost connection.
'
,
...
...
src/components/tb_lang.js
View file @
acf55d6b
...
...
@@ -29,7 +29,10 @@ module.exports = {
win
:
"
胜局
"
,
lose
:
"
负局
"
,
wl
:
"
胜率
"
,
athleticWin
:
'
竞技场胜利
'
,
athleticLose
:
'
竞技场失败
'
,
season
:
'
时间
'
,
total
:
'
合计
'
,
cardName
:
"
卡名
"
,
used
:
"
使用量
"
,
put1
:
"
投入1
"
,
...
...
@@ -38,6 +41,7 @@ module.exports = {
deck
:
"
卡组
"
,
count
:
"
使用数
"
,
PickRate
:
"
使用率
"
,
topTags
:
"
热门标签
"
,
playerA
:
'
玩家A
'
,
...
...
@@ -59,10 +63,14 @@ module.exports = {
cardName
:
"
Card Name
"
,
used
:
"
Used
"
,
PickRate
:
"
Pick Rate
"
,
put1
:
"
Put one
"
,
put2
:
"
Put two
"
,
put3
:
"
Put three
"
,
athleticWin
:
'
Win
'
,
athleticLose
:
'
Lose
'
,
season
:
'
Time
'
,
total
:
'
Total
'
,
deck
:
"
Deck
"
,
count
:
"
Count
"
,
topTags
:
"
Top Tags
"
,
...
...
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