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
4c3ba8ed
Commit
4c3ba8ed
authored
May 02, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时区修正
parent
5fb0c7f6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
117 deletions
+99
-117
src/components/Deck.vue
src/components/Deck.vue
+2
-0
src/components/History.vue
src/components/History.vue
+2
-2
src/components/Userinfo.vue
src/components/Userinfo.vue
+93
-113
static/history.html
static/history.html
+2
-2
No files found.
src/components/Deck.vue
View file @
4c3ba8ed
...
...
@@ -105,7 +105,9 @@
}
else
{
this
.
isNew
=
false
;
this
.
avatar_url
=
res
.
data
.
data
.
url
this
.
avatar_url_new
=
res
.
data
.
data
.
url
this
.
form
.
desc
=
res
.
data
.
data
.
content
this
.
form
.
desc_new
=
res
.
data
.
data
.
content
}
},
(
res
)
=>
{
this
.
hasError
=
true
...
...
src/components/History.vue
View file @
4c3ba8ed
...
...
@@ -165,10 +165,10 @@
}
},
formatter1
(
row
,
column
)
{
return
moment
(
row
.
start_time
).
subtract
(
8
,
'
h
'
).
format
(
'
YYYY-MM-DD HH:mm
'
)
return
moment
(
row
.
start_time
).
format
(
'
YYYY-MM-DD HH:mm
'
)
},
formatter2
(
row
,
column
)
{
return
moment
(
row
.
end_time
).
subtract
(
8
,
'
h
'
).
format
(
'
YYYY-MM-DD HH:mm
'
)
return
moment
(
row
.
end_time
).
format
(
'
YYYY-MM-DD HH:mm
'
)
},
renderTable
:
function
()
{
var
params
=
{
...
...
src/components/Userinfo.vue
View file @
4c3ba8ed
...
...
@@ -154,7 +154,6 @@
<
script
>
import
querystring
from
'
querystring
'
;
import
language
from
'
./lang
'
;
import
img1
from
'
../assets/img/images1.jpeg
'
import
img2
from
'
../assets/img/images2.jpeg
'
...
...
@@ -196,9 +195,6 @@
}
},
created
:
function
()
{
this
.
init
()
var
lang
=
localStorage
.
getItem
(
'
lang
'
);
this
.
initLang
(
lang
);
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
;
...
...
@@ -213,21 +209,19 @@
}
},
events
:
{
'
lang-change
'
:
function
(
lang
)
{
this
.
initLang
(
lang
)
}
},
watch
:
{
lang
:
function
(
val
)
{
console
.
log
(
'
lang change1
'
,
val
)
this
.
init2
()
this
.
init
()
},
},
mounted
:
function
()
{
this
.
init2
();
var
_this
=
this
$
(
"
#search
"
).
click
(
function
()
{
_this
.
renderPage
();
})
this
.
init
()
window
.
onhashchange
=
this
.
init
;
},
...
...
@@ -238,17 +232,18 @@
},
methods
:
{
onSubmit
:
function
()
{
this
.
searchByUsername
(
this
.
searchText
)
},
init
:
function
()
{
var
username
=
querystring
.
parse
(
location
.
hash
.
slice
(
11
)).
username
this
.
searchText
=
username
;
this
.
searchByUsername
(
username
)
},
init2
:
function
()
{
function
renderPage
()
{
renderPage
:
function
()
{
if
(
rankTable
)
{
rankTable
.
destroy
();
}
...
...
@@ -257,12 +252,11 @@
rankTable2
.
destroy
();
}
var
username
=
$
(
"
#searchText
"
).
val
()
var
username
=
this
.
searchText
var
type
=
1
;
rankTable
=
renderRankTable
(
"
#athletic_rank
"
);
rankTable2
=
renderRankTable
(
"
#entertain_rank
"
);
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
);
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
);
if
(
!
username
)
return
;
...
...
@@ -270,7 +264,7 @@
if
(
rankTable
)
{
rankTable
.
destroy
();
}
rankTable
=
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
)
rankTable
=
this
.
renderRankTable
(
"
#athletic_rank
"
,
res
.
data
.
data
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
...
...
@@ -279,20 +273,19 @@
if
(
rankTable2
)
{
rankTable2
.
destroy
();
}
rankTable2
=
renderRankTable
(
"
#entertain_rank
"
,
res
.
data
.
data
)
rankTable2
=
this
.
renderRankTable
(
"
#entertain_rank
"
,
res
.
data
.
data
)
},
(
res
)
=>
{
console
.
log
(
res
)
});
},
}
function
renderRankTable
(
id
,
tableData
)
{
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
).
subtract
(
8
,
'
h
'
).
format
(
'
YYYY-MM-DD HH:mm
'
),
moment
(
d
.
end_time
).
subtract
(
8
,
'
h
'
).
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
];
});
var
table
=
$
(
id
).
DataTable
({
paging
:
true
,
...
...
@@ -347,21 +340,8 @@
});
return
table
;
}
renderPage
();
$
(
"
#search
"
).
click
(
function
()
{
renderPage
();
})
},
initLang
:
function
(
lang
)
{
this
.
lang
=
language
[
lang
]
$
(
"
#search
"
).
trigger
(
'
click
'
);
},
searchByUsername
:
function
(
username
)
{
// 0 1 2
var
rand
=
Math
.
floor
(
Math
.
random
()
*
3
);
...
...
static/history.html
View file @
4c3ba8ed
...
...
@@ -172,10 +172,10 @@
}
},
formatter1
(
row
,
column
)
{
return
moment
(
row
.
start_time
).
subtract
(
8
,
'
h
'
).
format
(
'
YYYY-MM-DD HH:mm
'
)
return
moment
(
row
.
start_time
).
format
(
'
YYYY-MM-DD HH:mm
'
)
},
formatter2
(
row
,
column
)
{
return
moment
(
row
.
end_time
).
subtract
(
8
,
'
h
'
).
format
(
'
YYYY-MM-DD HH:mm
'
)
return
moment
(
row
.
end_time
).
format
(
'
YYYY-MM-DD HH:mm
'
)
},
renderTable
:
function
(){
// var URL = "http://localhost:3000"
...
...
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