Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
weiqingting
9 years ago
Commit
fd7e816b71f5b3acdb42d9c96c6578dff5d0c1c2
2 parents
f9ea91c8
d7d98e79
Merge branch 'release/release' of
http://git.dev.yoho.cn/platform/yohobuy-portal…
…-fe into release/release
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
client/js/common/util.js
client/js/guang/infoManager.js
client/js/common/util.js
View file @
fd7e816
...
...
@@ -268,6 +268,15 @@ var util = {
}
},
/**
* 比较两个时间戳
*
*/
__compareDate
:
function
(
ts1
,
ts2
)
{
return
(
ts1
<
ts2
);
},
__filterNull
:
function
(
obj
,
prop
)
{
// 判断item里面 instr属性是不是为空
if
(
obj
[
prop
])
{
...
...
client/js/guang/infoManager.js
View file @
fd7e816
...
...
@@ -112,7 +112,14 @@ var g = new common.grid({
},
{
display
:
'状态'
,
render
:
function
(
item
)
{
return
"<p>"
+
ENUM
.
StatusEnum
[
item
.
status
]
+
"</p>"
;
var
sta
=
ENUM
.
StatusEnum
[
item
.
status
];
if
(
item
.
status
==
1
&&
common
.
util
.
__compareDate
(
Date
.
now
(),
item
.
publishTime
*
1000
))
{
//检查是否为定时发布,当未到达所设定时间时,即使status为1,也显示‘未发布’
sta
=
"未发布"
;
}
else
{
}
return
"<p>"
+
sta
+
"</p>"
;
}
},
{
display
:
"创建时间"
,
...
...
@@ -149,7 +156,11 @@ var g = new common.grid({
var
HtmArr
=
[];
if
(
items
.
status
==
1
)
{
HtmArr
.
push
(
'<a data-index="'
+
items
.
__index
+
'" href="JavaScript:;" class="btn btn-warning btn-xs info-close">关闭</a>'
);
if
(
common
.
util
.
__compareDate
(
Date
.
now
(),
items
.
publishTime
*
1000
))
{
HtmArr
.
push
(
'<a data-index="'
+
items
.
__index
+
'" href="JavaScript:;" class="btn btn-success btn-xs info-open">发布</a>'
);
}
else
{
HtmArr
.
push
(
'<a data-index="'
+
items
.
__index
+
'" href="JavaScript:;" class="btn btn-warning btn-xs info-close">关闭</a>'
);
}
}
else
{
HtmArr
.
push
(
'<a data-index="'
+
items
.
__index
+
'" href="JavaScript:;" class="btn btn-success btn-xs info-open">发布</a>'
);
}
...
...
Please
register
or
login
to post a comment