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
725dd9b4
Commit
725dd9b4
authored
Jun 25, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
卡组攻略和卡组资料
parent
b7768e2e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
447 additions
and
190 deletions
+447
-190
src/components/Deck.vue
src/components/Deck.vue
+270
-190
src/components/Profile.vue
src/components/Profile.vue
+177
-0
No files found.
src/components/Deck.vue
View file @
725dd9b4
This diff is collapsed.
Click to expand it.
src/components/Profile.vue
View file @
725dd9b4
...
@@ -86,6 +86,50 @@
...
@@ -86,6 +86,50 @@
</table>
</table>
</div>
</div>
</div>
</div>
<div
class=
"alert alert-info alert-dismissible"
role=
"alert"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
{{
lang
.
tagInfo
}}
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
{{
lang
.
athleticDueHistory
}}
</h3>
</div>
<!--
<div
class=
"panel-body"
>
-->
<!--
<div
style=
"width:100%;overflow-x:auto;overflow-y:hidden;"
>
<table
id=
"rank"
class=
"table table-striped table-bordered table-hover example"
></table>
</div>
-->
<div
class=
"table-responsive"
style=
"width:100%;overflow-x:auto;overflow-y:hidden;"
>
<table
id=
"athletic_rank"
class=
"table table-striped table-bordered table-hover example"
:class=
"
{ scroll: isMobile }">
</table>
</div>
<!--
</div>
-->
<!--
<div
class=
"table-responsive"
style=
"width:100%;overflow-x:auto;overflow-y:hidden;"
>
<table
id=
"rank"
class=
"table table-striped table-bordered table-hover example"
:class=
"
{ scroll: isMobile }" >
</table>
</div>
-->
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
{{
lang
.
entertainDueHistory
}}
</h3>
</div>
<!--
<div
class=
"panel-body"
>
-->
<!--
<div
style=
"width:100%;overflow-x:auto;overflow-y:hidden;"
>
<table
id=
"rank"
class=
"table table-striped table-bordered table-hover example"
></table>
</div>
-->
<div
class=
"table-responsive"
style=
"width:100%;overflow-x:auto;overflow-y:hidden;"
>
<table
id=
"entertain_rank"
class=
"table table-striped table-bordered table-hover example"
:class=
"
{ scroll: isMobile }">
</table>
</div>
<!--
</div>
-->
<!--
<div
class=
"table-responsive"
style=
"width:100%;overflow-x:auto;overflow-y:hidden;"
>
<table
id=
"rank"
class=
"table table-striped table-bordered table-hover example"
:class=
"
{ scroll: isMobile }" >
</table>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -97,9 +141,15 @@
...
@@ -97,9 +141,15 @@
import
API
from
'
../api
'
import
API
from
'
../api
'
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
var
rankTable
;
var
rankTable2
;
import
moment
from
'
moment
'
import
tb_language
from
'
./tb_lang.js
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
isMobile
:
false
,
user_info
:
{
user_info
:
{
exp
:
0
,
exp
:
0
,
pt
:
500
,
pt
:
500
,
...
@@ -125,7 +175,34 @@
...
@@ -125,7 +175,34 @@
}),
}),
},
},
mounted
:
function
()
{
var
_this
=
this
$
(
"
#search
"
).
click
(
function
()
{
_this
.
renderPage
();
})
// this.init()
// window.onhashchange = this.init;
this
.
renderPage
();
},
created
:
function
()
{
created
:
function
()
{
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
u
=
navigator
.
userAgent
;
if
(
null
==
u
)
{
return
true
;
}
var
result
=
regex_match
.
exec
(
u
);
if
(
null
==
result
)
{
this
.
isMobile
=
false
;
}
else
{
this
.
isMobile
=
true
;
}
let
opt
=
{
let
opt
=
{
'
username
'
:
this
.
user
.
username
'
username
'
:
this
.
user
.
username
}
}
...
@@ -138,6 +215,106 @@
...
@@ -138,6 +215,106 @@
methods
:
{
methods
:
{
init
:
function
()
{
init
:
function
()
{
},
},
renderPage
:
function
()
{
if
(
rankTable
)
{
rankTable
.
destroy
();
}
if
(
rankTable2
)
{
rankTable2
.
destroy
();
}
var
username
=
this
.
user
.
username
var
type
=
1
;
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
);
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
);
if
(
!
username
)
return
;
API
.
getUserDueHistory
({
username
:
username
,
type
:
"
1
"
,
page_num
:
100
}).
then
((
res
)
=>
{
if
(
rankTable
)
{
rankTable
.
destroy
();
}
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
API
.
getUserDueHistory
({
username
:
username
,
type
:
"
2
"
,
page_num
:
100
}).
then
((
res
)
=>
{
if
(
rankTable2
)
{
rankTable2
.
destroy
();
}
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
res
.
data
.
data
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
},
renderRankTable
:
function
(
id
,
tableData
)
{
tableData
=
tableData
||
[];
var
lang
=
localStorage
.
getItem
(
'
lang
'
)
||
'
cn
'
;
var
rank
=
1
;
var
processData
=
tableData
.
map
(
function
(
d
)
{
return
[
d
.
usernamea
,
d
.
usernameb
,
moment
(
d
.
start_time
).
format
(
'
YYYY-MM-DD HH:mm
'
),
moment
(
d
.
end_time
).
format
(
'
YYYY-MM-DD HH:mm
'
),
d
.
userscorea
,
d
.
userscoreb
];
});
var
table
=
$
(
id
).
DataTable
({
paging
:
true
,
searching
:
false
,
ordering
:
false
,
lengthChange
:
false
,
info
:
false
,
data
:
processData
,
columns
:
[
{
title
:
tb_language
[
lang
].
playerA
},
{
title
:
tb_language
[
lang
].
playerB
},
{
title
:
tb_language
[
lang
].
startTime
},
{
title
:
tb_language
[
lang
].
endTime
},
],
"
columnDefs
"
:
[
{
"
render
"
:
function
(
data
,
type
,
row
)
{
var
userscorea
=
row
[
4
];
var
userscoreb
=
row
[
5
];
if
(
userscorea
<
0
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
;
}
if
(
userscorea
>
userscoreb
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-success'>
"
+
data
+
"
</span></a>
"
;
}
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
;
},
"
targets
"
:
0
},
{
"
render
"
:
function
(
data
,
type
,
row
)
{
var
userscorea
=
row
[
4
];
var
userscoreb
=
row
[
5
];
if
(
userscoreb
<
0
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
;
}
if
(
userscorea
<
userscoreb
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-success'>
"
+
data
+
"
</span></a>
"
;
}
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
;
},
"
targets
"
:
1
},
],
"
language
"
:
lang
===
'
en
'
?
tb_language
.
en
:
tb_language
.
cn
});
return
table
;
},
},
},
}
}
...
...
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