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
c3301dc6
Commit
c3301dc6
authored
Oct 13, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加减dp
parent
b273efbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
81 deletions
+119
-81
src/components/Download.vue
src/components/Download.vue
+1
-1
src/components/PageHeader.vue
src/components/PageHeader.vue
+2
-1
src/components/Profile.vue
src/components/Profile.vue
+84
-66
src/components/Userinfo.vue
src/components/Userinfo.vue
+32
-13
No files found.
src/components/Download.vue
View file @
c3301dc6
...
...
@@ -61,7 +61,7 @@
var
self
=
this
self
.
downloadUrls
[
'
windows
'
]
=
"
https://mycard.moe
"
self
.
downloadUrls
[
'
mac
'
]
=
"
https://mycard.moe
"
self
.
downloadUrls
[
'
android
'
]
=
"
https://pan.baidu.com/s/1
o7RMcMA#list/path=%2F
"
self
.
downloadUrls
[
'
android
'
]
=
"
https://pan.baidu.com/s/1
eRWiWRC
"
// API.getDownloadUrls().then((res) => {
// let assets = res.data.assets
// for (let i of assets) {
...
...
src/components/PageHeader.vue
View file @
c3301dc6
...
...
@@ -154,7 +154,7 @@
,
title
:
'
Hi,
'
+
_this
.
user
.
username
,
offset
:
'
rb
'
//具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
,
id
:
'
layerDemo
'
,
content
:
'
<div style="padding: 20px;
">
'
+
'
是否参与问卷调查? <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
:
'
好的
'
,
btnAlign
:
'
c
'
//按钮居中
,
shade
:
0
//不显示遮罩
...
...
@@ -313,6 +313,7 @@
.voteFoot
{
/*margin-left: 20px;*/
}
.wrap
{
...
...
src/components/Profile.vue
View file @
c3301dc6
...
...
@@ -228,8 +228,8 @@
var
username
=
this
.
user
.
username
var
type
=
1
;
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
);
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
);
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
[],
"
DP
"
);
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
[],
""
);
if
(
!
username
)
return
;
...
...
@@ -237,7 +237,7 @@
if
(
rankTable
)
{
rankTable
.
destroy
();
}
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
)
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
,
"
DP
"
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
...
...
@@ -246,74 +246,92 @@
if
(
rankTable2
)
{
rankTable2
.
destroy
();
}
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
res
.
data
.
data
)
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
;
},
renderRankTable
:
function
(
id
,
tableData
,
ttype
)
{
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
,
d
.
pta
,
d
.
pta_ex
,
d
.
ptb
,
d
.
ptb_ex
];
});
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
];
var
diff
=
(
parseFloat
(
row
[
6
])
-
parseFloat
(
row
[
7
])).
toFixed
(
2
)
if
(
diff
>
0
)
{
diff
=
"
+
"
+
diff
}
var
append
=
diff
+
ttype
if
(
ttype
===
""
)
{
append
=
""
}
if
(
userscorea
<
0
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
+
append
;
}
if
(
userscorea
>
userscoreb
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-success'>
"
+
data
+
"
</span></a>
"
+
append
;
}
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
+
append
;
},
"
targets
"
:
0
},
{
"
render
"
:
function
(
data
,
type
,
row
)
{
var
userscorea
=
row
[
4
];
var
userscoreb
=
row
[
5
];
var
diff
=
(
parseFloat
(
row
[
8
])
-
parseFloat
(
row
[
9
])).
toFixed
(
2
)
if
(
diff
>
0
)
{
diff
=
"
+
"
+
diff
}
var
append
=
diff
+
ttype
if
(
ttype
===
""
)
{
append
=
""
}
if
(
userscoreb
<
0
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
+
append
;
}
if
(
userscorea
<
userscoreb
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-success'>
"
+
data
+
"
</span></a>
"
+
append
;
}
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
+
append
;
},
"
targets
"
:
1
},
],
"
language
"
:
lang
===
'
en
'
?
tb_language
.
en
:
tb_language
.
cn
});
return
table
;
},
},
}
...
...
src/components/Userinfo.vue
View file @
c3301dc6
...
...
@@ -217,7 +217,7 @@
},
mounted
:
function
()
{
var
_this
=
this
var
_this
=
this
$
(
"
#search
"
).
click
(
function
()
{
_this
.
renderPage
();
})
...
...
@@ -255,8 +255,9 @@
var
username
=
this
.
searchText
var
type
=
1
;
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
);
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
);
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
[],
"
DP
"
);
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
[],
""
);
if
(
!
username
)
return
;
...
...
@@ -264,7 +265,7 @@
if
(
rankTable
)
{
rankTable
.
destroy
();
}
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
)
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
,
"
DP
"
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
...
...
@@ -273,19 +274,21 @@
if
(
rankTable2
)
{
rankTable2
.
destroy
();
}
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
res
.
data
.
data
)
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
res
.
data
.
data
,
""
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
},
renderRankTable
:
function
(
id
,
tableData
)
{
renderRankTable
:
function
(
id
,
tableData
,
ttype
)
{
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
];
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
,
d
.
pta
,
d
.
pta_ex
,
d
.
ptb
,
d
.
ptb_ex
];
});
var
table
=
$
(
id
).
DataTable
({
paging
:
true
,
...
...
@@ -307,15 +310,23 @@
"
render
"
:
function
(
data
,
type
,
row
)
{
var
userscorea
=
row
[
4
];
var
userscoreb
=
row
[
5
];
var
diff
=
(
parseFloat
(
row
[
6
])
-
parseFloat
(
row
[
7
])).
toFixed
(
2
)
if
(
diff
>
0
)
{
diff
=
"
+
"
+
diff
}
var
append
=
diff
+
ttype
if
(
ttype
===
""
){
append
=
""
}
if
(
userscorea
<
0
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
;
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
+
append
;
}
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-success'>
"
+
data
+
"
</span></a>
"
+
append
;
}
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
;
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
+
append
;
},
"
targets
"
:
0
},
...
...
@@ -323,15 +334,23 @@
"
render
"
:
function
(
data
,
type
,
row
)
{
var
userscorea
=
row
[
4
];
var
userscoreb
=
row
[
5
];
var
diff
=
(
parseFloat
(
row
[
8
])
-
parseFloat
(
row
[
9
])).
toFixed
(
2
)
if
(
diff
>
0
)
{
diff
=
"
+
"
+
diff
}
var
append
=
diff
+
ttype
if
(
ttype
===
""
){
append
=
""
}
if
(
userscoreb
<
0
)
{
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
;
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-danger'>
"
+
data
+
"
</span></a>
"
+
append
;
}
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-success'>
"
+
data
+
"
</span></a>
"
+
append
;
}
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
;
return
"
<a href='#/userinfo?username=
"
+
data
+
"
'><span class='label label-info'>
"
+
data
+
"
</span></a>
"
+
append
;
},
"
targets
"
:
1
},
...
...
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