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
9a8c3b03
Commit
9a8c3b03
authored
Jan 02, 2022
by
GaiaXalter
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
决斗数据库 卡组胜率
parent
aed5260b
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
651 additions
and
293 deletions
+651
-293
package-lock.json
package-lock.json
+45
-63
package.json
package.json
+5
-3
src/api.js
src/api.js
+8
-0
src/assets/darkModelCss/darkStyleMix.css
src/assets/darkModelCss/darkStyleMix.css
+43
-0
src/components/Cards.vue
src/components/Cards.vue
+10
-9
src/components/Index.vue
src/components/Index.vue
+1
-1
src/components/PageFooter.vue
src/components/PageFooter.vue
+1
-1
src/components/PageHeader.vue
src/components/PageHeader.vue
+157
-212
src/components/Rates.vue
src/components/Rates.vue
+371
-0
src/components/lang.js
src/components/lang.js
+3
-3
src/main.js
src/main.js
+1
-1
src/router/index.js
src/router/index.js
+6
-0
No files found.
package-lock.json
View file @
9a8c3b03
...
@@ -14,15 +14,17 @@
...
@@ -14,15 +14,17 @@
"datatables.net-bs"
:
"1.11.3"
,
"datatables.net-bs"
:
"1.11.3"
,
"dom-to-image"
:
"2.6.0"
,
"dom-to-image"
:
"2.6.0"
,
"echarts"
:
"3.7.2"
,
"echarts"
:
"3.7.2"
,
"element-ui"
:
"
1.4.4
"
,
"element-ui"
:
"
2.15.7
"
,
"glob-parent"
:
"^6.0.2"
,
"glob-parent"
:
"^6.0.2"
,
"is-svg"
:
"^4.3.2"
,
"is-svg"
:
"^4.3.2"
,
"js-yaml"
:
"^4.1.0"
,
"js-yaml"
:
"^4.1.0"
,
"moment"
:
"^2.29.1"
,
"moment"
:
"^2.29.1"
,
"normalize-wheel"
:
"^1.0.1"
,
"resize-observer-polyfill"
:
"^1.5.1"
,
"shelljs"
:
"0.7.7"
,
"shelljs"
:
"0.7.7"
,
"swiper"
:
"^7.3.1"
,
"swiper"
:
"^7.3.1"
,
"uuid"
:
"3.1.0"
,
"uuid"
:
"3.1.0"
,
"vue"
:
"2.
4.2
"
,
"vue"
:
"2.
5.17
"
,
"vue-clipboard2"
:
"0.3.1"
,
"vue-clipboard2"
:
"0.3.1"
,
"vue-resource"
:
"1.3.4"
,
"vue-resource"
:
"1.3.4"
,
"vue-router"
:
"2.2.0"
,
"vue-router"
:
"2.2.0"
,
...
@@ -59,7 +61,7 @@
...
@@ -59,7 +61,7 @@
"vue-html5-editor"
:
"1.1.1"
,
"vue-html5-editor"
:
"1.1.1"
,
"vue-loader"
:
"11.3.4"
,
"vue-loader"
:
"11.3.4"
,
"vue-style-loader"
:
"2.0.0"
,
"vue-style-loader"
:
"2.0.0"
,
"vue-template-compiler"
:
"
2.4.2
"
,
"vue-template-compiler"
:
"
^2.5.17
"
,
"webpack"
:
"2.2.1"
,
"webpack"
:
"2.2.1"
,
"webpack-bundle-analyzer"
:
"2.2.1"
,
"webpack-bundle-analyzer"
:
"2.2.1"
,
"webpack-dev-middleware"
:
"1.10.0"
,
"webpack-dev-middleware"
:
"1.10.0"
,
...
@@ -2321,16 +2323,17 @@
...
@@ -2321,16 +2323,17 @@
"license"
:
"ISC"
"license"
:
"ISC"
},
},
"node_modules/element-ui"
:
{
"node_modules/element-ui"
:
{
"version"
:
"
1.4.4
"
,
"version"
:
"
2.15.7
"
,
"license"
:
"MIT"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"dependencies"
:
{
"async-validator"
:
"
1.6.9
"
,
"async-validator"
:
"
~1.8.1
"
,
"babel-helper-vue-jsx-merge-props"
:
"^2.0.0"
,
"babel-helper-vue-jsx-merge-props"
:
"^2.0.0"
,
"deepmerge"
:
"^1.2.0"
,
"deepmerge"
:
"^1.2.0"
,
"resize-observer-polyfill"
:
"^1.5.0"
,
"throttle-debounce"
:
"^1.0.1"
"throttle-debounce"
:
"^1.0.1"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"vue"
:
"
^2.3.0
"
"vue"
:
"
2.5.17
"
}
}
},
},
"node_modules/elliptic"
:
{
"node_modules/elliptic"
:
{
...
@@ -4261,6 +4264,11 @@
...
@@ -4261,6 +4264,11 @@
"node"
:
">=4"
"node"
:
">=4"
}
}
},
},
"node_modules/normalize-wheel"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz"
,
"integrity"
:
"sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"node_modules/nth-check"
:
{
"node_modules/nth-check"
:
{
"version"
:
"2.0.1"
,
"version"
:
"2.0.1"
,
"dev"
:
true
,
"dev"
:
true
,
...
@@ -5634,6 +5642,11 @@
...
@@ -5634,6 +5642,11 @@
"dev"
:
true
,
"dev"
:
true
,
"license"
:
"MIT"
"license"
:
"MIT"
},
},
"node_modules/resize-observer-polyfill"
:
{
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
,
"integrity"
:
"sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"node_modules/resolve"
:
{
"node_modules/resolve"
:
{
"version"
:
"1.20.0"
,
"version"
:
"1.20.0"
,
"license"
:
"MIT"
,
"license"
:
"MIT"
,
...
@@ -6176,28 +6189,6 @@
...
@@ -6176,28 +6189,6 @@
"node"
:
">=0.10.0"
"node"
:
">=0.10.0"
}
}
},
},
"node_modules/svgo/node_modules/argparse"
:
{
"version"
:
"1.0.10"
,
"resolved"
:
"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
,
"integrity"
:
"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="
,
"dev"
:
true
,
"dependencies"
:
{
"sprintf-js"
:
"~1.0.2"
}
},
"node_modules/svgo/node_modules/esprima"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz"
,
"integrity"
:
"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
,
"dev"
:
true
,
"bin"
:
{
"esparse"
:
"bin/esparse.js"
,
"esvalidate"
:
"bin/esvalidate.js"
},
"engines"
:
{
"node"
:
">=0.10.0"
}
},
"node_modules/swiper"
:
{
"node_modules/swiper"
:
{
"version"
:
"7.3.1"
,
"version"
:
"7.3.1"
,
"funding"
:
[
"funding"
:
[
...
@@ -6672,8 +6663,9 @@
...
@@ -6672,8 +6663,9 @@
"license"
:
"MIT"
"license"
:
"MIT"
},
},
"node_modules/vue"
:
{
"node_modules/vue"
:
{
"version"
:
"2.4.2"
,
"version"
:
"2.5.17"
,
"license"
:
"MIT"
"resolved"
:
"https://registry.npmjs.org/vue/-/vue-2.5.17.tgz"
,
"integrity"
:
"sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ=="
},
},
"node_modules/vue-clipboard2"
:
{
"node_modules/vue-clipboard2"
:
{
"version"
:
"0.3.1"
,
"version"
:
"0.3.1"
,
...
@@ -6776,9 +6768,10 @@
...
@@ -6776,9 +6768,10 @@
}
}
},
},
"node_modules/vue-template-compiler"
:
{
"node_modules/vue-template-compiler"
:
{
"version"
:
"2.4.2"
,
"version"
:
"2.5.17"
,
"resolved"
:
"https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.5.17.tgz"
,
"integrity"
:
"sha512-63uI4syCwtGR5IJvZM0LN5tVsahrelomHtCxvRkZPJ/Tf3ADm1U1wG6KWycK3qCfqR+ygM5vewUvmJ0REAYksg=="
,
"dev"
:
true
,
"dev"
:
true
,
"license"
:
"MIT"
,
"dependencies"
:
{
"dependencies"
:
{
"de-indent"
:
"^1.0.2"
,
"de-indent"
:
"^1.0.2"
,
"he"
:
"^1.1.0"
"he"
:
"^1.1.0"
...
@@ -9147,11 +9140,12 @@
...
@@ -9147,11 +9140,12 @@
"dev"
:
true
"dev"
:
true
},
},
"element-ui"
:
{
"element-ui"
:
{
"version"
:
"
1.4.4
"
,
"version"
:
"
2.15.7
"
,
"requires"
:
{
"requires"
:
{
"async-validator"
:
"
1.6.9
"
,
"async-validator"
:
"
~1.8.1
"
,
"babel-helper-vue-jsx-merge-props"
:
"^2.0.0"
,
"babel-helper-vue-jsx-merge-props"
:
"^2.0.0"
,
"deepmerge"
:
"^1.2.0"
,
"deepmerge"
:
"^1.2.0"
,
"resize-observer-polyfill"
:
"^1.5.0"
,
"throttle-debounce"
:
"^1.0.1"
"throttle-debounce"
:
"^1.0.1"
}
}
},
},
...
@@ -10435,6 +10429,11 @@
...
@@ -10435,6 +10429,11 @@
"sort-keys"
:
"^1.0.0"
"sort-keys"
:
"^1.0.0"
}
}
},
},
"normalize-wheel"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz"
,
"integrity"
:
"sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"nth-check"
:
{
"nth-check"
:
{
"version"
:
"2.0.1"
,
"version"
:
"2.0.1"
,
"dev"
:
true
,
"dev"
:
true
,
...
@@ -11431,6 +11430,11 @@
...
@@ -11431,6 +11430,11 @@
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"dev"
:
true
"dev"
:
true
},
},
"resize-observer-polyfill"
:
{
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
,
"integrity"
:
"sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve"
:
{
"resolve"
:
{
"version"
:
"1.20.0"
,
"version"
:
"1.20.0"
,
"requires"
:
{
"requires"
:
{
...
@@ -11814,32 +11818,6 @@
...
@@ -11814,32 +11818,6 @@
"mkdirp"
:
"~0.5.1"
,
"mkdirp"
:
"~0.5.1"
,
"sax"
:
"~1.2.1"
,
"sax"
:
"~1.2.1"
,
"whet.extend"
:
"~0.9.9"
"whet.extend"
:
"~0.9.9"
},
"dependencies"
:
{
"argparse"
:
{
"version"
:
"1.0.10"
,
"resolved"
:
"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
,
"integrity"
:
"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg=="
,
"dev"
:
true
,
"requires"
:
{
"sprintf-js"
:
"~1.0.2"
}
},
"esprima"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz"
,
"integrity"
:
"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
,
"dev"
:
true
},
"js-yaml"
:
{
"version"
:
"https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz"
,
"integrity"
:
"sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A="
,
"dev"
:
true
,
"requires"
:
{
"argparse"
:
"^1.0.7"
,
"esprima"
:
"^2.6.0"
}
}
}
}
},
},
"swiper"
:
{
"swiper"
:
{
...
@@ -12149,7 +12127,9 @@
...
@@ -12149,7 +12127,9 @@
"dev"
:
true
"dev"
:
true
},
},
"vue"
:
{
"vue"
:
{
"version"
:
"2.4.2"
"version"
:
"2.5.17"
,
"resolved"
:
"https://registry.npmjs.org/vue/-/vue-2.5.17.tgz"
,
"integrity"
:
"sha512-mFbcWoDIJi0w0Za4emyLiW72Jae0yjANHbCVquMKijcavBGypqlF7zHRgMa5k4sesdv7hv2rB4JPdZfR+TPfhQ=="
},
},
"vue-clipboard2"
:
{
"vue-clipboard2"
:
{
"version"
:
"0.3.1"
,
"version"
:
"0.3.1"
,
...
@@ -12227,7 +12207,9 @@
...
@@ -12227,7 +12207,9 @@
}
}
},
},
"vue-template-compiler"
:
{
"vue-template-compiler"
:
{
"version"
:
"2.4.2"
,
"version"
:
"2.5.17"
,
"resolved"
:
"https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.5.17.tgz"
,
"integrity"
:
"sha512-63uI4syCwtGR5IJvZM0LN5tVsahrelomHtCxvRkZPJ/Tf3ADm1U1wG6KWycK3qCfqR+ygM5vewUvmJ0REAYksg=="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"de-indent"
:
"^1.0.2"
,
"de-indent"
:
"^1.0.2"
,
...
...
package.json
View file @
9a8c3b03
...
@@ -15,15 +15,17 @@
...
@@ -15,15 +15,17 @@
"
datatables.net-bs
"
:
"
1.11.3
"
,
"
datatables.net-bs
"
:
"
1.11.3
"
,
"
dom-to-image
"
:
"
2.6.0
"
,
"
dom-to-image
"
:
"
2.6.0
"
,
"
echarts
"
:
"
3.7.2
"
,
"
echarts
"
:
"
3.7.2
"
,
"
element-ui
"
:
"
1.4.4
"
,
"
element-ui
"
:
"
2.15.7
"
,
"
glob-parent
"
:
"
^6.0.2
"
,
"
glob-parent
"
:
"
^6.0.2
"
,
"
is-svg
"
:
"
^4.3.2
"
,
"
is-svg
"
:
"
^4.3.2
"
,
"
js-yaml
"
:
"
^4.1.0
"
,
"
js-yaml
"
:
"
^4.1.0
"
,
"
moment
"
:
"
^2.29.1
"
,
"
moment
"
:
"
^2.29.1
"
,
"
normalize-wheel
"
:
"
^1.0.1
"
,
"
resize-observer-polyfill
"
:
"
^1.5.1
"
,
"
shelljs
"
:
"
0.7.7
"
,
"
shelljs
"
:
"
0.7.7
"
,
"
swiper
"
:
"
^7.3.1
"
,
"
swiper
"
:
"
^7.3.1
"
,
"
uuid
"
:
"
3.1.0
"
,
"
uuid
"
:
"
3.1.0
"
,
"
vue
"
:
"
2.
4.2
"
,
"
vue
"
:
"
2.
5.17
"
,
"
vue-clipboard2
"
:
"
0.3.1
"
,
"
vue-clipboard2
"
:
"
0.3.1
"
,
"
vue-resource
"
:
"
1.3.4
"
,
"
vue-resource
"
:
"
1.3.4
"
,
"
vue-router
"
:
"
2.2.0
"
,
"
vue-router
"
:
"
2.2.0
"
,
...
@@ -60,7 +62,7 @@
...
@@ -60,7 +62,7 @@
"
vue-html5-editor
"
:
"
1.1.1
"
,
"
vue-html5-editor
"
:
"
1.1.1
"
,
"
vue-loader
"
:
"
11.3.4
"
,
"
vue-loader
"
:
"
11.3.4
"
,
"
vue-style-loader
"
:
"
2.0.0
"
,
"
vue-style-loader
"
:
"
2.0.0
"
,
"
vue-template-compiler
"
:
"
2.4.2
"
,
"
vue-template-compiler
"
:
"
^2.5.17
"
,
"
webpack
"
:
"
2.2.1
"
,
"
webpack
"
:
"
2.2.1
"
,
"
webpack-bundle-analyzer
"
:
"
2.2.1
"
,
"
webpack-bundle-analyzer
"
:
"
2.2.1
"
,
"
webpack-dev-middleware
"
:
"
1.10.0
"
,
"
webpack-dev-middleware
"
:
"
1.10.0
"
,
...
...
src/api.js
View file @
9a8c3b03
...
@@ -16,6 +16,14 @@ export default class Api {
...
@@ -16,6 +16,14 @@ export default class Api {
static
clkUrl
=
`
${
URL
}
/clktrack`
static
clkUrl
=
`
${
URL
}
/clktrack`
static
getMonthlyWinRate
()
{
let
monthlyWinRateUrl
=
'
https://sapi.moecube.com:444/ygopro/analytics/matchup/type?source=mycard-athletic
'
return
Vue
.
http
.
get
(
monthlyWinRateUrl
)
}
static
getDownloadUrl
(
url
)
{
static
getDownloadUrl
(
url
)
{
url
=
url
.
slice
(
7
)
url
=
url
.
slice
(
7
)
var
downloadUrl
=
`
${
URL
}
/download/
${
url
}
`
var
downloadUrl
=
`
${
URL
}
/download/
${
url
}
`
...
...
src/assets/darkModelCss/darkStyleMix.css
0 → 100644
View file @
9a8c3b03
.nav-tabs
>
li
.active
>
a
,
.nav-tabs
>
li
.active
>
a
:hover
,
.nav-tabs
>
li
.active
>
a
:focus
{
background-color
:
#1a4861
;
border
:
3px
solid
#161b22
;
}
.nav-tabs
{
border-bottom
:
1px
solid
black
;
}
.well
{
background-color
:
#1a4861
;
border
:
none
;
}
.input-group-addon
{
color
:
white
;
background-color
:
#161b22
;
border
:
1px
solid
black
;
}
.form-control
{
border
:
1px
solid
black
;
color
:
white
;
background-color
:
#283044
;
}
.tab-img
{
height
:
72px
;
width
:
120px
;
}
.table-responsive
{
border
:
1px
solid
black
;
}
\ No newline at end of file
src/components/Cards.vue
View file @
9a8c3b03
...
@@ -3,10 +3,12 @@
...
@@ -3,10 +3,12 @@
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div>
<div>
<h4
class=
"color-blue"
><i
class=
"glyphicon glyphicon-filter"
></i>
{{
lang
.
qc
}}
</h4>
<h4
class=
"color-blue"
>
<i
class=
"glyphicon glyphicon-filter"
></i>
{{
lang
.
qc
}}
</h4>
<div
class=
"well"
>
<div
class=
"well"
>
<form
action=
""
method=
"get"
role=
"form"
class=
"form-inline form-filter"
>
<form
action=
""
method=
"get"
role=
"form"
class=
"form-inline form-filter"
>
<div
class=
"form-group"
style=
"margin-right: 10px;"
>
<div
class=
"form-group"
style=
"margin-right: 10px;"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<div
class=
"input-group-addon"
>
{{
lang
.
time
}}
</div>
<div
class=
"input-group-addon"
>
{{
lang
.
time
}}
</div>
...
@@ -32,7 +34,6 @@
...
@@ -32,7 +34,6 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
style=
"margin-right: 10px;"
>
<div
class=
"form-group"
style=
"margin-right: 10px;"
>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<div
class=
"input-group-addon"
>
{{
lang
.
type
}}
</div>
<div
class=
"input-group-addon"
>
{{
lang
.
type
}}
</div>
...
...
src/components/Index.vue
View file @
9a8c3b03
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
import
image3
from
'
../assets/img/image3.jpg
'
import
image3
from
'
../assets/img/image3.jpg
'
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
import
API
from
'
../api
'
import
API
from
'
../api
'
/* import "../assets/darkModelCss/darkMix.css" */
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
...
src/components/PageFooter.vue
View file @
9a8c3b03
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<div
role=
"presentation"
class=
"footer-block-left-link"
><a
@
click.prevent=
"login"
href=
"#"
>
注册
</a></div>
<div
role=
"presentation"
class=
"footer-block-left-link"
><a
@
click.prevent=
"login"
href=
"#"
>
注册
</a></div>
<div
class=
"footer-block-left-link"
><a
href=
"#/download"
>
下载
</a></div>
<div
class=
"footer-block-left-link"
><a
href=
"#/download"
>
下载
</a></div>
<div
class=
"footer-block-left-link"
><a
href=
"https://shop387046095.taobao.com/?spm=2013.1.1000126.2.61a97e3emY0JZB"
>
MC商城
</a></div>
<div
class=
"footer-block-left-link"
><a
href=
"https://shop387046095.taobao.com/?spm=2013.1.1000126.2.61a97e3emY0JZB"
target=
"_blank"
>
MC商城
</a></div>
<div
class=
"footer-block-left-link"
><a
href=
"https://ygobbs.com/"
target=
"_blank"
>
联系我们
</a></div>
<div
class=
"footer-block-left-link"
><a
href=
"https://ygobbs.com/"
target=
"_blank"
>
联系我们
</a></div>
</div>
</div>
...
...
src/components/PageHeader.vue
View file @
9a8c3b03
...
@@ -6,33 +6,35 @@
...
@@ -6,33 +6,35 @@
<!--
<nav
class=
"navbar navbar-inverse"
>
-->
<!--
<nav
class=
"navbar navbar-inverse"
>
-->
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"navbar-header"
>
<div
class=
"navbar-header"
>
<a
class=
"navbar-brand navbar-link"
href=
"index.html"
><img
src=
"../assets/img/mycardlogo.png"
id=
"logo"
>
MyCard
<a
class=
"navbar-brand navbar-link"
href=
"index.html"
><img
src=
"../assets/img/mycardlogo.png"
id=
"logo"
>
MyCard
</a>
</a>
<button
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
"#navcol-1"
><span
<button
class=
"navbar-toggle collapsed"
data-toggle=
"collapse"
data-target=
"#navcol-1"
><span
class=
"sr-only"
>
Toggle navigation
</span><span
class=
"icon-bar"
>
</span><span
class=
"icon-bar"
></span><span
class=
"sr-only"
>
Toggle navigation
</span><span
class=
"icon-bar"
></span><span
class=
"icon-bar"
></span></button>
class=
"icon-bar"
></span><span
class=
"icon-bar"
></span></button>
</div>
</div>
<div
class=
"collapse navbar-collapse"
id=
"navcol-1"
>
<div
class=
"collapse navbar-collapse"
id=
"navcol-1"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<ul
class=
"nav navbar-nav navbar-right"
>
<li
role=
"presentation"
><a
href=
"https://ygobbs.com/"
target=
"_blank"
>
{{
lang
.
forum
}}
</a></li>
<li
role=
"presentation"
><a
href=
"https://ygobbs.com/"
target=
"_blank"
>
{{
lang
.
forum
}}
</a></li>
<li
role=
"presentation"
><a
href=
"https://shop387046095.taobao.com/?spm=2013.1.1000126.2.61a97e3emY0JZB"
<li
role=
"presentation"
><a
href=
"https://shop387046095.taobao.com/?spm=2013.1.1000126.2.61a97e3emY0JZB
"
>
{{
lang
.
shop
}}
</a>
target=
"_blank
"
>
{{
lang
.
shop
}}
</a>
</li>
</li>
<li
class=
"dropdown"
>
<li
role=
"presentation"
><a
href=
"#/ranking"
>
{{
lang
.
rank
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/cards"
>
{{
lang
.
card_rank
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/rates"
>
{{
lang
.
rates
}}
</a></li>
<!--
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
href=
"#"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
href=
"#"
>
{{
lang
.
database
}}
<span
class=
"caret"
></span></a>
{{
lang
.
card_rank
}}
<span
class=
"caret"
></span></a>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<ul
class=
"dropdown-menu"
role=
"menu"
>
<li
role=
"presentation"
><a
href=
"#/ranking"
>
{{
lang
.
rank
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/cards"
>
{{
lang
.
card_rank
}}
</a></li>
</ul>
</li>
</ul>
</li>
-->
<li
role=
"presentation"
><a
href=
" https://event.ygobbs.com"
>
{{
lang
.
race
}}
</a></li>
<li
role=
"presentation"
><a
href=
" https://event.ygobbs.com"
>
{{
lang
.
race
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/download"
>
{{
lang
.
download
}}
</a></li>
<li
class=
"dropdown"
>
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
href=
"#"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
aria-expanded=
"false"
href=
"#"
>
...
@@ -41,6 +43,7 @@
...
@@ -41,6 +43,7 @@
<li
role=
"presentation"
><a
href=
"#/deckprint"
>
{{
lang
.
deckprint
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/deckprint"
>
{{
lang
.
deckprint
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/tabulate"
>
{{
lang
.
tabulate
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/tabulate"
>
{{
lang
.
tabulate
}}
</a></li>
<li
role=
"presentation"
><a
href=
"https://rep.ygobbs.com"
>
{{
lang
.
battlelog
}}
</a></li>
<li
role=
"presentation"
><a
href=
"https://rep.ygobbs.com"
>
{{
lang
.
battlelog
}}
</a></li>
<li
role=
"presentation"
><a
href=
"#/download"
>
{{
lang
.
download
}}
</a></li>
</ul>
</ul>
</li>
</li>
...
@@ -71,7 +74,6 @@
...
@@ -71,7 +74,6 @@
</div>
</div>
<!--
<other-component></other-component>
-->
<!--
<other-component></other-component>
-->
<!-- Form -->
<!-- Form -->
<el-dialog
title=
"MCPRO服务改进调查"
v-if=
"!(voteObj.multiple)"
:visible.sync=
"dialogFormVisible"
:size=
'size'
>
<el-dialog
title=
"MCPRO服务改进调查"
v-if=
"!(voteObj.multiple)"
:visible.sync=
"dialogFormVisible"
:size=
'size'
>
...
@@ -128,22 +130,19 @@
...
@@ -128,22 +130,19 @@
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
querystring
from
'
querystring
'
;
import
querystring
from
'
querystring
'
;
import
crypto
from
'
crypto
'
;
import
crypto
from
'
crypto
'
;
import
language
from
'
./lang
'
;
import
language
from
'
./lang
'
;
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
import
API
from
'
../api
'
import
API
from
'
../api
'
import
moment
from
'
moment
'
import
moment
from
'
moment
'
export
default
{
export
default
{
data
()
{
data
()
{
const
cityOptions
=
[
'
上海
'
,
'
北京
'
,
'
广州
'
,
'
深圳
'
];
const
cityOptions
=
[
'
上海
'
,
'
北京
'
,
'
广州
'
,
'
深圳
'
];
return
{
return
{
...
@@ -175,27 +174,20 @@
...
@@ -175,27 +174,20 @@
radio
:
""
radio
:
""
}
}
},
},
created
:
function
()
{
created
:
function
()
{
this
.
init
()
this
.
init
()
var
regex_match
=
/
(
nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s
[
cg
]
h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220
)
/i
;
var
regex_match
=
/
(
nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s
[
cg
]
h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220
)
/i
;
if
(
regex_match
.
exec
(
navigator
.
userAgent
))
{
if
(
regex_match
.
exec
(
navigator
.
userAgent
))
{
this
.
isMobile
=
true
this
.
isMobile
=
true
this
.
size
=
'
large
'
;
this
.
size
=
'
large
'
;
}
}
},
},
mounted
:
function
()
{
mounted
:
function
()
{
var
_this
=
this
var
_this
=
this
if
(
location
.
hash
===
"
#/vote
"
||
location
.
hash
===
"
#/report
"
||
location
.
hash
===
"
#/ads
"
)
{
if
(
location
.
hash
===
"
#/vote
"
||
location
.
hash
===
"
#/report
"
||
location
.
hash
===
"
#/ads
"
)
{
return
;
return
;
}
}
// var voteTime = localStorage.getItem('voteTime');
// var voteTime = localStorage.getItem('voteTime');
// if (voteTime) {
// if (voteTime) {
// var today = moment().format('YYYY-MM-DD')
// var today = moment().format('YYYY-MM-DD')
...
@@ -203,7 +195,6 @@
...
@@ -203,7 +195,6 @@
// return
// return
// }
// }
// }
// }
var
ad_popup
=
localStorage
.
getItem
(
'
ad_popup
'
);
var
ad_popup
=
localStorage
.
getItem
(
'
ad_popup
'
);
if
(
ad_popup
)
{
if
(
ad_popup
)
{
var
today
=
moment
().
format
(
'
YYYY-MM-DD
'
)
var
today
=
moment
().
format
(
'
YYYY-MM-DD
'
)
...
@@ -211,11 +202,11 @@
...
@@ -211,11 +202,11 @@
return
return
}
}
}
}
var
time
=
5000
var
time
=
5000
var
_this
=
this
var
_this
=
this
API
.
getAd
({
type
:
1
}).
then
((
res
)
=>
{
API
.
getAd
({
type
:
1
}).
then
((
res
)
=>
{
if
(
res
.
data
.
auto_close_ad
&&
res
.
data
.
auto_close_ad
===
"
true
"
)
{
if
(
res
.
data
.
auto_close_ad
&&
res
.
data
.
auto_close_ad
===
"
true
"
)
{
_this
.
autoClose
=
true
_this
.
autoClose
=
true
}
}
...
@@ -226,39 +217,37 @@
...
@@ -226,39 +217,37 @@
}
else
{
}
else
{
_this
.
adObj
.
src
=
_this
.
adObj
.
imgp_url
_this
.
adObj
.
src
=
_this
.
adObj
.
imgp_url
}
}
var
area
=
[
"
800px
"
,
"
480px
"
]
var
area
=
[
"
800px
"
,
"
480px
"
]
if
(
_this
.
isMobile
)
{
if
(
_this
.
isMobile
)
{
area
=
[
"
300px
"
,
"
400px
"
]
area
=
[
"
300px
"
,
"
400px
"
]
}
}
layer
.
open
({
layer
.
open
({
type
:
1
type
:
1
,
,
title
:
false
//不显示标题栏
title
:
false
//不显示标题栏
// ,closeBtn: false
// ,closeBtn: false
,
area
:
area
,
,
shade
:
0.8
area
:
area
,
,
offset
:
_this
.
isMobile
?
'
100px
'
:
"
auto
"
shade
:
0.8
,
,
id
:
'
LAY_layuipro
'
//设定一个id,防止重复弹出
offset
:
_this
.
isMobile
?
'
100px
'
:
"
auto
"
,
id
:
'
LAY_layuipro
'
//设定一个id,防止重复弹出
// ,btn: ['火速围观', '残忍拒绝']
// ,btn: ['火速围观', '残忍拒绝']
,
btnAlign
:
'
c
'
,
,
moveType
:
1
//拖拽模式,0或者1
btnAlign
:
'
c
'
,
,
content
:
$
(
'
#ads
'
)
moveType
:
1
//拖拽模式,0或者1
,
success
:
function
(
layero
)
{
,
content
:
$
(
'
#ads
'
),
success
:
function
(
layero
)
{
var
btn
=
layero
.
find
(
'
.layui-layer-btn
'
);
var
btn
=
layero
.
find
(
'
.layui-layer-btn
'
);
btn
.
find
(
'
.layui-layer-btn0
'
).
attr
({
btn
.
find
(
'
.layui-layer-btn0
'
).
attr
({
href
:
'
http://www.layui.com/
'
href
:
'
http://www.layui.com/
'
,
,
target
:
'
_blank
'
target
:
'
_blank
'
});
});
}
}
,
,
success
:
function
()
{
success
:
function
()
{
_this
.
adImpl
()
_this
.
adImpl
()
localStorage
.
setItem
(
'
ad_popup
'
,
moment
().
format
(
'
YYYY-MM-DD
'
));
localStorage
.
setItem
(
'
ad_popup
'
,
moment
().
format
(
'
YYYY-MM-DD
'
));
if
(
_this
.
autoClose
)
{
if
(
_this
.
autoClose
)
{
var
int
=
setInterval
(
function
()
{
var
int
=
setInterval
(
function
()
{
_this
.
timer
--
;
_this
.
timer
--
;
if
(
_this
.
timer
==
0
)
{
if
(
_this
.
timer
==
0
)
{
clearInterval
(
int
)
clearInterval
(
int
)
...
@@ -267,108 +256,82 @@
...
@@ -267,108 +256,82 @@
}
}
},
1000
)
},
1000
)
}
}
},
end
:
function
()
{
}
,
end
:
function
()
{
$
(
"
#ads
"
).
hide
()
$
(
"
#ads
"
).
hide
()
}
}
});
});
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
if
(
!
this
.
user
.
isLogin
)
{
if
(
!
this
.
user
.
isLogin
)
{
return
;
return
;
}
}
API
.
getVote
({
user
:
this
.
user
.
id
,
API
.
getVote
({
user
:
this
.
user
.
id
,
username
:
this
.
user
.
username
}).
then
((
res
)
=>
{
username
:
this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
this
.
voteObj
=
res
.
data
.
data
this
.
voteObj
=
res
.
data
.
data
this
.
voteObj
.
options
=
JSON
.
parse
(
this
.
voteObj
.
options
)
this
.
voteObj
.
options
=
JSON
.
parse
(
this
.
voteObj
.
options
)
if
(
this
.
isMobile
)
{
if
(
this
.
isMobile
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
//单个使用
//单个使用
//全局使用。即所有弹出层都默认采用,但是单个配置skin的优先级更高
//全局使用。即所有弹出层都默认采用,但是单个配置skin的优先级更高
// layer.config({
// layer.config({
// skin: 'demo-class'
// skin: 'demo-class'
// })
// })
layer
.
open
({
layer
.
open
({
type
:
1
type
:
1
,
,
title
:
''
,
title
:
''
,
offset
:
'
b
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
offset
:
'
b
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,
,
area
:
[
'
100%
'
,
'
auto
'
]
area
:
[
'
100%
'
,
'
auto
'
],
,
closeBtn
:
0
,
closeBtn
:
0
,
id
:
'
layerDemo
'
id
:
'
layerDemo
'
// ,skin: 'demo-class'
// ,skin: 'demo-class'
,
,
content
:
'
<div style="padding: 20px;margin-bottom: -20px; text-align: center">
'
+
'
是否参与问卷调查? <br><p class="voteFoot">参与调查可以改善您游戏体验与获得EXP!</p>
'
+
'
</div>
'
content
:
'
<div style="padding: 20px;margin-bottom: -20px; text-align: center">
'
+
,
'
是否参与问卷调查? <br><p class="voteFoot">参与调查可以改善您游戏体验与获得EXP!</p>
'
+
'
</div>
'
,
btn
:
[
'
投票Start!
'
,
'
但是我拒绝!
'
]
btn
:
[
'
投票Start!
'
,
'
但是我拒绝!
'
],
,
btnAlign
:
'
c
'
//按钮居中
btnAlign
:
'
c
'
//按钮居中
,
,
shade
:
0
//不显示遮罩
shade
:
0
//不显示遮罩
,
,
yes
:
function
()
{
yes
:
function
()
{
layer
.
closeAll
();
layer
.
closeAll
();
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
},
,
btn2
:
function
()
{
btn2
:
function
()
{
console
.
log
(
'
拒绝!
'
)
console
.
log
(
'
拒绝!
'
)
}
}
});
});
},
1000
)
},
1000
)
}
else
{
}
else
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
//单个使用
//单个使用
//全局使用。即所有弹出层都默认采用,但是单个配置skin的优先级更高
//全局使用。即所有弹出层都默认采用,但是单个配置skin的优先级更高
// layer.config({
// layer.config({
// skin: 'demo-class'
// skin: 'demo-class'
// })
// })
layer
.
open
({
layer
.
open
({
type
:
1
type
:
1
,
,
title
:
'
Hi,
'
+
_this
.
user
.
username
,
title
:
'
Hi,
'
+
_this
.
user
.
username
,
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
// , area: ['100%', 'auto']
// , area: ['100%', 'auto']
,
,
id
:
'
layerDemo
'
id
:
'
layerDemo
'
// ,skin: 'demo-class'
// ,skin: 'demo-class'
,
,
content
:
'
<div style="padding: 20px;margin-bottom: -20px; text-align: center">
'
+
'
是否参与问卷调查? <br><p class="voteFoot">参与调查可以改善您游戏体验与获得EXP!</p>
'
+
'
</div>
'
content
:
'
<div style="padding: 20px;margin-bottom: -20px; text-align: center">
'
+
,
'
是否参与问卷调查? <br><p class="voteFoot">参与调查可以改善您游戏体验与获得EXP!</p>
'
+
'
</div>
'
,
btn
:
'
好的
'
btn
:
'
好的
'
,
,
btnAlign
:
'
c
'
//按钮居中
btnAlign
:
'
c
'
//按钮居中
,
,
shade
:
0
//不显示遮罩
shade
:
0
//不显示遮罩
,
,
yes
:
function
()
{
yes
:
function
()
{
layer
.
closeAll
();
layer
.
closeAll
();
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
}
...
@@ -376,15 +339,10 @@
...
@@ -376,15 +339,10 @@
},
1000
)
},
1000
)
}
}
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
},
},
computed
:
{
computed
:
{
...
mapGetters
({
...
mapGetters
({
lang
:
'
getLang
'
,
lang
:
'
getLang
'
,
...
@@ -392,30 +350,22 @@
...
@@ -392,30 +350,22 @@
}),
}),
},
},
methods
:
{
methods
:
{
adClick
:
function
()
{
adClick
:
function
()
{
API
.
adClick
({
id
:
this
.
adObj
.
id
API
.
adClick
({
id
:
this
.
adObj
.
id
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
window
.
open
(
this
.
adObj
.
click_ref
,
"
_blank
"
);
window
.
open
(
this
.
adObj
.
click_ref
,
"
_blank
"
);
},
},
adImpl
:
function
()
{
adImpl
:
function
()
{
API
.
adImpl
({
id
:
this
.
adObj
.
id
API
.
adImpl
({
id
:
this
.
adObj
.
id
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
},
},
submitVote
:
function
()
{
submitVote
:
function
()
{
var
param
=
{
var
param
=
{
user
:
this
.
user
.
id
,
user
:
this
.
user
.
id
,
username
:
this
.
user
.
username
,
username
:
this
.
user
.
username
,
...
@@ -424,7 +374,6 @@
...
@@ -424,7 +374,6 @@
opids
:
this
.
opids
,
opids
:
this
.
opids
,
voteid
:
this
.
voteObj
.
id
voteid
:
this
.
voteObj
.
id
}
}
if
(
this
.
voteObj
.
multiple
)
{
if
(
this
.
voteObj
.
multiple
)
{
if
(
this
.
opids
.
length
==
0
)
{
if
(
this
.
opids
.
length
==
0
)
{
this
.
$notify
({
this
.
$notify
({
...
@@ -444,146 +393,147 @@
...
@@ -444,146 +393,147 @@
return
;
return
;
}
}
}
}
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
var
_this
=
this
var
_this
=
this
API
.
submitVote
(
param
).
then
((
res
)
=>
{
API
.
submitVote
(
param
).
then
((
res
)
=>
{
// this.$notify({
// this.$notify({
// title: '操作成功',
// title: '操作成功',
// message: '感谢您的参与, 环境会因为您而变得更好。此问卷为您奖励 EXP + 1 !',
// message: '感谢您的参与, 环境会因为您而变得更好。此问卷为您奖励 EXP + 1 !',
// type: 'success'
// type: 'success'
// })
// })
if
(
this
.
isMobile
)
{
if
(
this
.
isMobile
)
{
layer
.
open
({
layer
.
open
({
type
:
1
type
:
1
,
,
title
:
''
title
:
''
,
,
offset
:
'
b
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
offset
:
'
b
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,
area
:
[
'
100%
'
,
'
auto
'
]
,
,
closeBtn
:
0
area
:
[
'
100%
'
,
'
auto
'
],
,
id
:
'
layerDemo
'
closeBtn
:
0
,
,
time
:
10000
id
:
'
layerDemo
'
,
,
content
:
'
<div style="padding: 20px ;">
'
+
'
感谢您的参与,环境会因为您而变得更好。此问卷为您奖励EXP+1!
'
+
'
</div>
'
time
:
10000
,
,
btn
:
[
'
知道了
'
,
'
参与下一个投票
'
]
content
:
'
<div style="padding: 20px ;">
'
+
'
感谢您的参与,环境会因为您而变得更好。此问卷为您奖励EXP+1!
'
+
'
</div>
'
,
btn
:
[
'
知道了
'
,
'
参与下一个投票
'
],
,
btnAlign
:
'
c
'
//按钮居中
btnAlign
:
'
c
'
//按钮居中
,
shade
:
0
//不显示遮罩
,
,
yes
:
function
()
{
shade
:
0
//不显示遮罩
,
yes
:
function
()
{
layer
.
closeAll
();
layer
.
closeAll
();
// _this.dialogFormVisible = true;
// _this.dialogFormVisible = true;
},
},
btn2
:
function
(
index
,
layero
)
{
btn2
:
function
(
index
,
layero
)
{
//按钮【按钮二】的回调
//按钮【按钮二】的回调
layer
.
closeAll
();
layer
.
closeAll
();
//return false 开启该代码可禁止点击该按钮关闭
//return false 开启该代码可禁止点击该按钮关闭
API
.
getVote
({
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
}
else
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
}
else
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
}
else
{}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
}
}
});
});
}
else
{
}
else
{
layer
.
open
({
layer
.
open
({
type
:
1
type
:
1
,
,
title
:
'
Hi,
'
+
_this
.
user
.
username
title
:
'
Hi,
'
+
_this
.
user
.
username
,
,
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,
id
:
'
layerDemo
'
,
,
time
:
10000
id
:
'
layerDemo
'
,
,
content
:
'
<div style="padding: 20px ;">
'
+
'
感谢您的参与,环境会因为您而变得更好。此问卷为您奖励EXP+1!
'
+
'
</div>
'
time
:
10000
,
,
btn
:
[
'
知道了
'
,
'
参与下一个投票
'
]
content
:
'
<div style="padding: 20px ;">
'
+
'
感谢您的参与,环境会因为您而变得更好。此问卷为您奖励EXP+1!
'
+
'
</div>
'
,
btn
:
[
'
知道了
'
,
'
参与下一个投票
'
],
,
btnAlign
:
'
c
'
//按钮居中
btnAlign
:
'
c
'
//按钮居中
,
shade
:
0
//不显示遮罩
,
,
yes
:
function
()
{
shade
:
0
//不显示遮罩
,
yes
:
function
()
{
layer
.
closeAll
();
layer
.
closeAll
();
// _this.dialogFormVisible = true;
// _this.dialogFormVisible = true;
},
},
btn2
:
function
(
index
,
layero
)
{
btn2
:
function
(
index
,
layero
)
{
//按钮【按钮二】的回调
//按钮【按钮二】的回调
layer
.
closeAll
();
layer
.
closeAll
();
//return false 开启该代码可禁止点击该按钮关闭
//return false 开启该代码可禁止点击该按钮关闭
API
.
getVote
({
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
}
else
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
}
else
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
API
.
getVote
({
user
:
_this
.
user
.
id
,
username
:
_this
.
user
.
username
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
if
(
res
.
data
.
data
&&
res
.
data
.
data
!==
"
null
"
)
{
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
=
res
.
data
.
data
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
voteObj
.
options
=
JSON
.
parse
(
_this
.
voteObj
.
options
)
_this
.
dialogFormVisible
=
true
;
_this
.
dialogFormVisible
=
true
;
}
else
{
}
else
{}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
}
}
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
}
}
});
});
}
}
// localStorage.setItem('voteTime', moment().format('YYYY-MM-DD'));
// localStorage.setItem('voteTime', moment().format('YYYY-MM-DD'));
},
(
res
)
=>
{
},
(
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
});
});
},
},
init
:
function
()
{
init
:
function
()
{
var
token
=
querystring
.
parse
(
location
.
search
.
slice
(
1
)).
sso
;
var
token
=
querystring
.
parse
(
location
.
search
.
slice
(
1
)).
sso
;
if
(
token
)
{
if
(
token
)
{
localStorage
.
setItem
(
'
token
'
,
token
);
localStorage
.
setItem
(
'
token
'
,
token
);
...
@@ -594,7 +544,6 @@
...
@@ -594,7 +544,6 @@
this
.
render
(
token
);
this
.
render
(
token
);
}
}
}
}
var
lang
=
localStorage
.
getItem
(
'
lang
'
);
var
lang
=
localStorage
.
getItem
(
'
lang
'
);
if
(
lang
===
'
en
'
)
{
if
(
lang
===
'
en
'
)
{
this
.
toEn
()
this
.
toEn
()
...
@@ -602,52 +551,48 @@
...
@@ -602,52 +551,48 @@
this
.
toCn
()
this
.
toCn
()
}
}
},
},
render
:
function
(
token
)
{
render
:
function
(
token
)
{
var
user
=
querystring
.
parse
(
new
Buffer
(
token
,
'
base64
'
).
toString
());
var
user
=
querystring
.
parse
(
new
Buffer
(
token
,
'
base64
'
).
toString
());
console
.
log
(
user
)
console
.
log
(
user
)
this
.
$store
.
dispatch
(
'
login
'
,
user
);
this
.
$store
.
dispatch
(
'
login
'
,
user
);
},
},
logout
:
function
()
{
logout
:
function
()
{
localStorage
.
removeItem
(
'
token
'
);
localStorage
.
removeItem
(
'
token
'
);
this
.
$store
.
dispatch
(
'
logout
'
,
{});
this
.
$store
.
dispatch
(
'
logout
'
,
{});
// var redirectUrl = "http://localhost:8081/index.html";
// var redirectUrl = "http://localhost:8081/index.html";
var
redirectUrl
=
"
https://mycard.moe/ygopro/arena/index.html
"
;
var
redirectUrl
=
"
https://mycard.moe/ygopro/arena/index.html
"
;
var
request
=
querystring
.
stringify
({
var
request
=
querystring
.
stringify
({
'
redirect
'
:
redirectUrl
'
redirect
'
:
redirectUrl
});
});
location
.
href
=
"
https://ygobbs.com/logout?
"
+
request
;
location
.
href
=
"
https://ygobbs.com/logout?
"
+
request
;
},
},
login
:
function
()
{
login
:
function
()
{
var
payload
=
new
Buffer
(
querystring
.
stringify
({
var
payload
=
new
Buffer
(
querystring
.
stringify
({
return_sso_url
:
location
.
href
return_sso_url
:
location
.
href
})).
toString
(
'
base64
'
);
})).
toString
(
'
base64
'
);
var
request
=
querystring
.
stringify
({
var
request
=
querystring
.
stringify
({
'
sso
'
:
payload
,
'
sso
'
:
payload
,
'
sig
'
:
crypto
.
createHmac
(
'
sha256
'
,
'
zsZv6LXHDwwtUAGa
'
).
update
(
payload
).
digest
(
'
hex
'
)
'
sig
'
:
crypto
.
createHmac
(
'
sha256
'
,
'
zsZv6LXHDwwtUAGa
'
).
update
(
payload
).
digest
(
'
hex
'
)
});
});
location
.
href
=
"
https://ygobbs.com/session/sso_provider?
"
+
request
;
location
.
href
=
"
https://ygobbs.com/session/sso_provider?
"
+
request
;
},
},
toCn
:
function
()
{
toCn
:
function
()
{
localStorage
.
setItem
(
'
lang
'
,
'
cn
'
);
localStorage
.
setItem
(
'
lang
'
,
'
cn
'
);
// this.lang = language['cn'];
// this.lang = language['cn'];
// this.$dispatch('lang-change', 'cn')
// this.$dispatch('lang-change', 'cn')
this
.
curLang
=
'
cn
'
this
.
curLang
=
'
cn
'
this
.
$store
.
dispatch
(
'
getLang
'
,
this
);
this
.
$store
.
dispatch
(
'
getLang
'
,
this
);
},
},
toEn
:
function
()
{
toEn
:
function
()
{
localStorage
.
setItem
(
'
lang
'
,
'
en
'
);
localStorage
.
setItem
(
'
lang
'
,
'
en
'
);
// this.lang = language['en'];
// this.lang = language['en'];
// this.$dispatch('lang-change', 'en')
// this.$dispatch('lang-change', 'en')
this
.
curLang
=
'
en
'
this
.
curLang
=
'
en
'
this
.
$store
.
dispatch
(
'
getLang
'
,
this
);
this
.
$store
.
dispatch
(
'
getLang
'
,
this
);
this
.
$emit
(
'
helloworld
'
)
this
.
$emit
(
'
helloworld
'
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
src/components/Rates.vue
0 → 100644
View file @
9a8c3b03
<
template
>
<div>
<div
class=
"content"
>
<div
class=
"container"
>
<div>
<div
class=
'winRateTitle'
>
<div
id=
"winRateTitle-1"
>
这个表体现了环境主流之间胜率,显示的胜率为
<div
class=
"winRateTitle-color-1"
>
左边的卡组
</div>
VS
<div
class=
"winRateTitle-color-2"
>
上边的卡组
</div>
</div>
<div
id=
"winRateTitle-2"
>
更新:在每个月
<div
class=
"winRateTitle-color-3"
>
20日
</div>
之前,胜率为
<div
class=
"winRateTitle-color-3"
>
上月胜率
</div>
。在每个月
<div
class=
"winRateTitle-color-3"
>
20日
</div>
以及之后,胜率为
<div
class=
"winRateTitle-color-3"
>
当月胜率
</div>
</div>
</div>
<div
class=
'winRateContent'
>
<div
class=
'winRateContent-Tabs'
>
<el-tabs
v-model=
'winRateButtonDefault'
@
tab-click=
"showClickWinRate"
>
<el-tab-pane
:label=
winRateButtonText[0]
name=
'0'
>
</el-tab-pane>
<el-tab-pane
:label=
winRateButtonText[1]
name=
'1'
>
</el-tab-pane>
<el-tab-pane
:label=
winRateButtonText[2]
name=
'2'
>
</el-tab-pane>
</el-tabs>
</div>
<div
class=
'winRateTable'
>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
:header-cell-style=
"hdMonitor"
:cell-style=
"csMonitor"
@
sort-change=
'sortChange'
>
<el-table-column
v-for=
"item in tableHead"
:key=
"item.key"
:label=
'item.label'
:property=
'item.prop'
:sortable=
"item.sortable"
:render-header=
"labelFunction"
>
<template
slot-scope=
"scope"
>
<div>
{{
item
.
key
==
0
?
scope
.
row
[
item
.
label
]:
scope
.
row
[
item
.
label
]
+
'
%
'
}}
</div>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<div
class=
'winRateFooter'
>
查看线上各卡组与单卡使用数据请进入
<a
class=
"winRateTitle-color-4"
href=
"#/cards"
>
【卡片排行】
</a></div>
</div>
</div>
</div>
</div>
</template>
<
script
>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
import
API
from
'
../api
'
;
const
winRateButtonText
=
[
'
先攻胜率
'
,
'
后攻胜率
'
,
'
综合胜率
'
]
export
default
{
//import引入的组件需要注入到对象中才能使用
components
:
{},
data
()
{
//这里存放数据
return
{
tableChangeCount
:
0
,
winRateColumnTitle
:
[],
winRateButtonDefault
:
'
0
'
,
winRateButtonText
,
tableFlag
:
0
,
//0 先攻 1 后攻 2 总
queryJsonStr
:
[],
tableHead
:
[],
tableData
:
[],
totalWinRateData
:
[],
tableOrder
:
null
,
};
},
//监听属性 类似于data概念
computed
:
{},
//监控data中的数据变化
watch
:
{},
//方法集合
methods
:
{
labelFunction
(
h
,
l
,
fontSize
)
{
let
index
=
l
[
'
$index
'
]
let
f
=
15
;
if
(
typeof
(
fontSize
)
!=
"
undefined
"
&&
fontSize
!=
null
)
{
f
=
fontSize
;
}
//列頭的實際寬度
let
width
=
l
.
column
.
realWidth
;
let
maxFontCount
=
Math
.
floor
((
width
-
32
)
/
f
)
-
1
;
let
chars
=
l
.
column
.
label
.
split
(
""
);
var
label
=
""
;
if
(
maxFontCount
<
chars
.
length
&&
index
!=
0
&&
index
!=
11
)
{
for
(
let
i
=
0
;
i
<
maxFontCount
;
i
++
)
{
label
+=
chars
[
i
];
}
label
+=
"
..
"
;
}
else
{
label
=
l
.
column
.
label
;
}
return
label
;
},
sortChange
(
para
)
{
this
.
tableOrder
=
para
.
order
},
toPoint
(
percent
)
{
percent
=
percent
+
''
let
str
=
percent
.
replace
(
"
%
"
,
""
);
str
=
str
*
1
;
return
str
;
},
hdMonitor
(
cell
)
{
let
tempCellCss
=
{}
tempCellCss
[
"
color
"
]
=
'
#3AB6BA
'
tempCellCss
[
"
border-color
"
]
=
'
black
'
if
(
cell
.
rowIndex
===
0
&&
cell
.
columnIndex
!=
0
)
{
{
tempCellCss
[
"
background-color
"
]
=
'
#1a4861
'
//第一行
tempCellCss
[
"
border-bottom
"
]
=
'
0px solid #111822
'
if
(
cell
.
columnIndex
==
11
)
{
tempCellCss
[
"
background-color
"
]
=
'
#123345
'
//最后一格
tempCellCss
[
"
color
"
]
=
'
#FFC850
'
}
}
}
if
(
cell
.
rowIndex
===
0
&&
cell
.
columnIndex
==
0
)
{
tempCellCss
[
"
background-color
"
]
=
'
#103346
'
//第一格
tempCellCss
[
"
border-bottom
"
]
=
'
0px solid #111822
'
tempCellCss
[
"
color
"
]
=
'
#FFC850
'
}
return
tempCellCss
},
csMonitor
(
cell
)
{
let
tempCellCss
=
{}
let
tempCellWinRate
=
this
.
toPoint
(
cell
.
row
[
cell
.
column
.
property
])
tempCellCss
[
"
color
"
]
=
'
#50ffeb
'
tempCellCss
[
"
border-color
"
]
=
'
#1a4861
'
if
(
cell
.
columnIndex
!=
0
)
{
//表格内
tempCellCss
[
"
color
"
]
=
'
#e2f2ff
'
if
(
tempCellWinRate
<=
30
)
{
tempCellCss
[
"
color
"
]
=
'
#b9ff5c
'
}
if
(
tempCellWinRate
>=
70
)
{
tempCellCss
[
"
color
"
]
=
'
#ff7945
'
}
tempCellCss
[
"
border-bottom
"
]
=
'
10px solid #111822
'
tempCellCss
[
"
border-right
"
]
=
'
1px solid #111822
'
}
if
(
cell
.
rowIndex
%
2
==
0
)
{
tempCellCss
[
"
background-color
"
]
=
'
#1b2738
'
}
else
{
tempCellCss
[
"
background-color
"
]
=
'
#283044
'
}
if
(
cell
.
columnIndex
==
0
)
{
{
tempCellCss
[
"
background-color
"
]
=
'
#1a4861
'
//第一列
tempCellCss
[
"
border-color
"
]
=
'
black
'
tempCellCss
[
"
border-bottom
"
]
=
'
10px solid #111822
'
tempCellCss
[
"
font-weight
"
]
=
'
bold
'
}
}
if
(
cell
.
columnIndex
==
11
)
{
{
if
(
cell
.
rowIndex
%
2
==
0
)
{
tempCellCss
[
"
background-color
"
]
=
'
#1a4861
'
}
else
{
tempCellCss
[
"
background-color
"
]
=
'
#1a4861
'
}
//最后一列
tempCellCss
[
"
color
"
]
=
'
#e2f2ff
'
if
(
tempCellWinRate
>=
50
)
{
tempCellCss
[
"
color
"
]
=
'
#FF0000
'
}
else
{
tempCellCss
[
"
color
"
]
=
'
#e2f2ff
'
}
tempCellCss
[
"
font-weight
"
]
=
'
bold
'
}
}
if
(
this
.
tableOrder
==
null
)
{
let
tempLabel
=
cell
.
column
.
label
let
tempContent
=
this
.
winRateColumnTitle
[
cell
.
rowIndex
]
if
(
tempLabel
==
tempContent
)
{
{
if
(
this
.
tableFlag
==
'
2
'
)
{
tempCellCss
[
"
color
"
]
=
'
#39485C
'
}
tempCellCss
[
"
background-color
"
]
=
'
#141A21
'
//胜率50的斜线
}
}
}
return
tempCellCss
},
showClickWinRate
(
tab
,
event
)
{
let
curTabNo
=
parseInt
(
tab
.
name
)
this
.
tableData
=
this
.
totalWinRateData
[
curTabNo
]
this
.
tableFlag
=
curTabNo
},
handleColumn
(
jsonTxT
)
{
let
tempColumnTitle
=
[]
let
tempObj
=
{
label
:
'
卡组种类
'
,
prop
:
'
卡组种类
'
,
key
:
0
}
tempObj
[
'
sortable
'
]
=
false
tempColumnTitle
.
push
(
tempObj
)
for
(
let
index
=
0
;
index
<
10
;
index
++
)
{
const
element
=
jsonTxT
[
index
].
deckb
;
let
tempColumn
=
{
label
:
element
,
prop
:
element
,
key
:
index
+
1
}
tempColumn
[
'
sortable
'
]
=
true
tempColumnTitle
.
push
(
tempColumn
)
this
.
winRateColumnTitle
.
push
(
element
)
}
tempObj
=
{
label
:
'
均胜率
'
,
prop
:
'
均胜率
'
,
key
:
11
}
tempObj
[
'
sortable
'
]
=
true
tempColumnTitle
.
push
(
tempObj
)
this
.
tableHead
=
tempColumnTitle
for
(
let
x
=
0
;
x
<
3
;
x
++
)
{
let
tempRowList
=
[]
for
(
let
j
=
0
;
j
<
10
;
j
++
)
{
let
tempRow
=
{}
tempRow
[
'
卡组种类
'
]
=
tempColumnTitle
[
j
+
1
].
label
let
avgRowRateList
=
[]
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
let
secondStrikeJson
=
jsonTxT
[
10
*
i
+
j
]
let
firstStrikeJson
=
jsonTxT
[
i
+
10
*
j
]
let
totalFsMatch
=
(
firstStrikeJson
.
win
+
firstStrikeJson
.
lose
+
firstStrikeJson
.
draw
)
let
totalScMatch
=
(
secondStrikeJson
.
win
+
secondStrikeJson
.
lose
+
secondStrikeJson
.
draw
)
let
tempWinRate
=
[]
let
tempFirstStrikeWinRate
=
Math
.
round
(
firstStrikeJson
.
win
/
(
totalFsMatch
)
*
1000
)
/
10
let
tempSecondStrikeWinRate
=
Math
.
round
(
secondStrikeJson
.
lose
/
(
totalScMatch
)
*
1000
)
/
10
let
totalWinrate
=
Math
.
round
((
tempFirstStrikeWinRate
+
tempSecondStrikeWinRate
)
*
100
)
/
(
2
*
100
)
tempWinRate
.
push
(
tempFirstStrikeWinRate
)
tempWinRate
.
push
(
tempSecondStrikeWinRate
)
tempWinRate
.
push
(
totalWinrate
)
tempRow
[
tempColumnTitle
[
i
+
1
].
label
]
=
tempWinRate
[
x
]
avgRowRateList
.
push
(
tempWinRate
[
x
])
}
tempRow
[
'
均胜率
'
]
=
(
Math
.
round
((
avgRowRateList
.
reduce
((
prev
,
current
,
index
,
avgRowRateList
)
=>
{
return
prev
+
current
})
/
10
*
100
))
/
100
)
tempRowList
.
push
(
tempRow
)
}
tempRowList
.
push
()
this
.
totalWinRateData
.
push
(
tempRowList
)
}
this
.
tableData
=
this
.
totalWinRateData
[
0
]
}
},
//生命周期 - 创建完成(可以访问当前this实例)
created
()
{
API
.
getMonthlyWinRate
().
then
((
res
)
=>
{
if
(
isNaN
(
res
.
data
))
{
this
.
queryJsonStr
=
res
.
data
this
.
handleColumn
(
res
.
data
)
}
else
{}
});
},
//生命周期 - 挂载完成(可以访问DOM元素)
mounted
()
{},
beforeCreate
()
{},
//生命周期 - 创建之前
beforeMount
()
{},
//生命周期 - 挂载之前
beforeUpdate
()
{},
//生命周期 - 更新之前
updated
()
{},
//生命周期 - 更新之后
beforeDestroy
()
{},
//生命周期 - 销毁之前
destroyed
()
{},
//生命周期 - 销毁完成
activated
()
{},
//如果页面有keep-alive缓存功能,这个函数会触发
}
</
script
>
<
style
>
#winRateTitle-1
{
color
:
#bbcddb
;
}
#winRateTitle-2
{
color
:
#95d144
;
}
.winRateTitle-color-1
{
display
:
inline-block
;
color
:
#50ffeb
;
}
.winRateTitle-color-2
{
display
:
inline-block
;
color
:
#3AB6BA
;
}
.winRateTitle-color-3
{
display
:
inline-block
;
color
:
#FFC850
;
}
.winRateTitle
{
float
:
right
;
display
:
block
;
}
.winRateContent
{
clear
:
both
;
}
.winRateContent-Tabs
.el-tabs__item
{
color
:
white
;
font-size
:
18px
;
}
.winRateContent-Tabs
.el-tabs__item.is-active
{
color
:
#409eff
;
}
.winRateContent-Tabs
.el-tabs__item
:hover
{
color
:
#409eff
;
}
.winRateContent-Tabs
.el-tabs__active-bar
{
background
:
#409eff
;
}
.el-table
,
.el-table__expanded-cell
{
background-color
:
black
!important
;
}
.el-table--border
,
.el-table--group
,
.el-table
::before
{
border-color
:
black
!important
;
}
.el-table--border
::after
,
.el-table--group
::after
,
.el-table
::before
{
content
:
""
;
position
:
absolute
;
background-color
:
black
!important
;
z-index
:
1
;
}
.winRateTable
{
margin-bottom
:
20px
;
margin-left
:
20px
;
margin-right
:
20px
;
}
.winRateFooter
{
text-align
:
center
;
margin-bottom
:
20px
;
}
.winRateTitle-color-4
{
color
:
#409eff
;
}
</
style
>
\ No newline at end of file
src/components/lang.js
View file @
9a8c3b03
...
@@ -42,7 +42,7 @@ module.exports = {
...
@@ -42,7 +42,7 @@ module.exports = {
athleticDueHistory
:
'
竞技场决斗记录
'
,
athleticDueHistory
:
'
竞技场决斗记录
'
,
entertainDueHistory
:
'
娱乐场决斗记录
'
,
entertainDueHistory
:
'
娱乐场决斗记录
'
,
tagInfo
:
'
绿色表示获胜方,红色则表示掉线。
'
,
tagInfo
:
'
绿色表示获胜方,红色则表示掉线。
'
,
rates
:
'
卡组胜率
'
,
exp_rank
:
'
EXP 排名
'
,
exp_rank
:
'
EXP 排名
'
,
athletic_rank
:
'
D.P 排名
'
,
athletic_rank
:
'
D.P 排名
'
,
...
@@ -52,7 +52,7 @@ module.exports = {
...
@@ -52,7 +52,7 @@ module.exports = {
all
:
'
总场
'
,
all
:
'
总场
'
,
ratio
:
'
胜率
'
,
ratio
:
'
胜率
'
,
violation
:
'
违规次数
'
,
violation
:
'
违规次数
'
,
shop
:
"
Merch
❤
"
,
shop
:
"
游戏周边
❤
"
,
userRank
:
{
userRank
:
{
expRank
:
'
EXP排名
'
,
expRank
:
'
EXP排名
'
,
pointRank
:
'
竞技场排名
'
,
pointRank
:
'
竞技场排名
'
,
...
@@ -153,7 +153,7 @@ module.exports = {
...
@@ -153,7 +153,7 @@ module.exports = {
athleticDueHistory
:
'
Athletic Due History
'
,
athleticDueHistory
:
'
Athletic Due History
'
,
entertainDueHistory
:
'
Entertain Due History
'
,
entertainDueHistory
:
'
Entertain Due History
'
,
tagInfo
:
'
Green tag represents the winner.Red tag represents player lost connection.
'
,
tagInfo
:
'
Green tag represents the winner.Red tag represents player lost connection.
'
,
rates
:
'
Win Rate Chart
'
,
exp_rank
:
'
EXP Rank
'
,
exp_rank
:
'
EXP Rank
'
,
athletic_rank
:
'
D.P Rank
'
,
athletic_rank
:
'
D.P Rank
'
,
win
:
'
Win
'
,
win
:
'
Win
'
,
...
...
src/main.js
View file @
9a8c3b03
...
@@ -6,7 +6,7 @@ import router from './router'
...
@@ -6,7 +6,7 @@ import router from './router'
import
VueX
from
'
vuex
'
import
VueX
from
'
vuex
'
import
store
from
'
./store
'
import
store
from
'
./store
'
import
Element
from
'
element-ui
'
import
Element
from
'
element-ui
'
import
'
element-ui/lib/theme-
default
/index.css
'
import
'
element-ui/lib/theme-
chalk
/index.css
'
import
VueClipboard
from
'
vue-clipboard2
'
import
VueClipboard
from
'
vue-clipboard2
'
...
...
src/router/index.js
View file @
9a8c3b03
...
@@ -3,6 +3,7 @@ import Router from 'vue-router'
...
@@ -3,6 +3,7 @@ import Router from 'vue-router'
import
Home
from
'
@/components/Home
'
import
Home
from
'
@/components/Home
'
import
Index
from
'
@/components/Index
'
import
Index
from
'
@/components/Index
'
import
Cards
from
'
@/components/Cards
'
import
Cards
from
'
@/components/Cards
'
import
Rates
from
'
@/components/Rates
'
import
Ranking
from
'
@/components/Ranking
'
import
Ranking
from
'
@/components/Ranking
'
import
Download
from
'
@/components/Download
'
import
Download
from
'
@/components/Download
'
import
Profile
from
'
@/components/Profile
'
import
Profile
from
'
@/components/Profile
'
...
@@ -43,6 +44,11 @@ export default new Router({
...
@@ -43,6 +44,11 @@ export default new Router({
name
:
'
Cards
'
,
name
:
'
Cards
'
,
component
:
Cards
component
:
Cards
},
},
{
path
:
'
/rates
'
,
name
:
'
Rates
'
,
component
:
Rates
},
{
{
path
:
'
/ranking
'
,
path
:
'
/ranking
'
,
name
:
'
Ranking
'
,
name
:
'
Ranking
'
,
...
...
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