...
|
...
|
@@ -23,6 +23,11 @@ module.exports=function(app) { |
|
|
|
|
|
/* 编辑页面 */
|
|
|
app.get("/operations/gate/:id","operations.gate.Edit","gate_findGateByID", function (response) {
|
|
|
|
|
|
// 日期处理
|
|
|
response.data.createTimeStr = toDate(response.data.createTime);
|
|
|
response.data.updateTimeStr = toDate(response.data.updateTime);
|
|
|
|
|
|
// 转化成 json 页面直接获取
|
|
|
this.$extend = {
|
|
|
moduleName: "运营管理",
|
...
|
...
|
@@ -41,3 +46,13 @@ module.exports=function(app) { |
|
|
app.post("/operations/gate/delete", "gate_gateDelete");
|
|
|
|
|
|
}
|
|
|
|
|
|
function toDate(seconds) {
|
|
|
if (!seconds || seconds <= 0) { return ''; }
|
|
|
var date = new Date(seconds * 1000);
|
|
|
return fixTwo(date.getFullYear()) + '-' + fixTwo((date.getMonth() + 1)) + '-' + fixTwo(date.getDate()) + ' ' + fixTwo(date.getHours()) + ':' + fixTwo(date.getMinutes()) + ':' + fixTwo(date.getSeconds());
|
|
|
}
|
|
|
|
|
|
function fixTwo(number) {
|
|
|
return number < 10? "0" + number: number;
|
|
|
} |
...
|
...
|
|