Commit c1a0aec4 by fengzhaoyu

修改:津贴,津贴详情,账单,账单详情,时间不足两位的补0

parent 8408b0c8
......@@ -18,7 +18,7 @@ App({
globalData: {
loadingType: 0,
// globalUrl: '192.168.1.106:8400'
globalUrl: '192.168.1.102:8400'
// globalUrl: '139.196.213.18:8400'
// globalUrl: '192.168.1.102:8400'
globalUrl: '139.196.213.18:8400'
}
});
......@@ -33,7 +33,8 @@ Page({
let date = timeData.getDate()
let hour = timeData.getHours()
let minute = timeData.getMinutes()
return `${year}${month}${date}日`
return `${year}${month.toString().length > 1 ? month : '0' + month}${date.toString().length > 1 ? date : '0' + date}${hour.toString().length > 1 ? hour : '0' + hour}:${minute.toString().length > 1 ? minute : '0' + minute}`
},
changeType(event) {
this.setData({
......
......@@ -74,7 +74,8 @@ Page({
let date = timeData.getDate()
let hour = timeData.getHours()
let minute = timeData.getMinutes()
return `${year}${month}${date}${hour}:${minute}`
return `${year}${month.toString().length > 1 ? month : '0' + month}${date.toString().length > 1 ? date : '0' + date}${hour.toString().length > 1 ? hour : '0' + hour}:${minute.toString().length > 1 ? minute : '0' + minute}`
},
onShow() {
// 页面显示
......
......@@ -23,7 +23,7 @@ Page({
let date = timeData.getDate()
let hour = timeData.getHours()
let minute = timeData.getMinutes()
return `${year}${month}${date}${hour}:${minute}`
return `${year}${month.toString().length > 1 ? month : '0' + month}${date.toString().length > 1 ? date : '0' + date}${hour.toString().length > 1 ? hour : '0' + hour}:${minute.toString().length > 1 ? minute : '0' + minute}`
},
queryListPaymentRecord() {
const _that = this;
......
......@@ -22,7 +22,8 @@ Page({
let month = date.getMonth()+1;
let day = (new Date(year,month,0).getDate().toString()).length > 1 ? new Date(year,month,0).getDate() : '0' + new Date(year,month,0).getDate()
this.setData({
time: `${year}-${month}`,
// 刚进入账单记录页面,时间不够两位补0
time: `${year}-${month.toString().length > 1 ? month : '0' + month}`,
orderStartTime: `${year}-${month.toString().length > 1 ? month : '0' + month}-01`,
orderEndTime: `${year}-${month.toString().length > 1 ? month : '0' + month}-${ day }`
})
......@@ -188,7 +189,7 @@ Page({
let date = timeData.getDate()
let hour = timeData.getHours()
let minute = timeData.getMinutes()
return `${year}${month}${date}${hour}:${minute}`
return `${year}${month.toString().length > 1 ? month : '0' + month}${date.toString().length > 1 ? date : '0' + date}${hour.toString().length > 1 ? hour : '0' + hour}:${minute.toString().length > 1 ? minute : '0' + minute}`
},
onShow() {
// 页面显示
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment