Commit c1a0aec4 by fengzhaoyu

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

parent 8408b0c8
...@@ -18,7 +18,7 @@ App({ ...@@ -18,7 +18,7 @@ App({
globalData: { globalData: {
loadingType: 0, loadingType: 0,
// globalUrl: '192.168.1.106:8400' // globalUrl: '192.168.1.106:8400'
globalUrl: '192.168.1.102:8400' // globalUrl: '192.168.1.102:8400'
// globalUrl: '139.196.213.18:8400' globalUrl: '139.196.213.18:8400'
} }
}); });
...@@ -33,7 +33,8 @@ Page({ ...@@ -33,7 +33,8 @@ Page({
let date = timeData.getDate() let date = timeData.getDate()
let hour = timeData.getHours() let hour = timeData.getHours()
let minute = timeData.getMinutes() 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) { changeType(event) {
this.setData({ this.setData({
......
...@@ -74,7 +74,8 @@ Page({ ...@@ -74,7 +74,8 @@ Page({
let date = timeData.getDate() let date = timeData.getDate()
let hour = timeData.getHours() let hour = timeData.getHours()
let minute = timeData.getMinutes() 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() { onShow() {
// 页面显示 // 页面显示
......
...@@ -23,7 +23,7 @@ Page({ ...@@ -23,7 +23,7 @@ Page({
let date = timeData.getDate() let date = timeData.getDate()
let hour = timeData.getHours() let hour = timeData.getHours()
let minute = timeData.getMinutes() 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() { queryListPaymentRecord() {
const _that = this; const _that = this;
......
...@@ -22,7 +22,8 @@ Page({ ...@@ -22,7 +22,8 @@ Page({
let month = date.getMonth()+1; 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() 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({ 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`, orderStartTime: `${year}-${month.toString().length > 1 ? month : '0' + month}-01`,
orderEndTime: `${year}-${month.toString().length > 1 ? month : '0' + month}-${ day }` orderEndTime: `${year}-${month.toString().length > 1 ? month : '0' + month}-${ day }`
}) })
...@@ -188,7 +189,7 @@ Page({ ...@@ -188,7 +189,7 @@ Page({
let date = timeData.getDate() let date = timeData.getDate()
let hour = timeData.getHours() let hour = timeData.getHours()
let minute = timeData.getMinutes() 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() { 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