Commit be2b48b4 by 谢中龙

修改任务时间格式转化错误

parent b061762d
...@@ -2,7 +2,7 @@ const PROJECT_ENV = 'dev' // 生产 prod, 开发 dev, 测试 test, 预生产 pre ...@@ -2,7 +2,7 @@ const PROJECT_ENV = 'dev' // 生产 prod, 开发 dev, 测试 test, 预生产 pre
const needMock = '' // const needMock = '' //
// appid_dev_wx wxc3b64b09b1d3dfc2 // appid_dev_wx wxc3b64b09b1d3dfc2
// appid_test_wx wx857ea77f4f7f4f34 wxac09792264c49b5c // appid_test_wx wx857ea77f4f7f4f34// wxac09792264c49b5c // 1002商城
// appid_pre_711 wx358b56af62edbde1 // appid_pre_711 wx358b56af62edbde1
// appid_prod_711 wx700028bf32a3be66 // appid_prod_711 wx700028bf32a3be66
// appid_prod_3001 wx313ec36b710125d4 // appid_prod_3001 wx313ec36b710125d4
......
...@@ -50,8 +50,8 @@ wxService.page({ ...@@ -50,8 +50,8 @@ wxService.page({
let curStart = new Date(data.task.startTime) let curStart = new Date(data.task.startTime)
let curEnd = new Date(data.task.endTime) let curEnd = new Date(data.task.endTime)
data.task.startTime = `${curStart.getMonth()}${curStart.getDay()}日` data.task.startTime = `${curStart.getMonth() + 1}${curStart.getDate()}日`
data.task.endTime = `${curEnd.getMonth()}${curEnd.getDay()}日` data.task.endTime = `${curEnd.getMonth() + 1}${curEnd.getDate()}日`
this.setData({ this.setData({
enlistList: data || {} enlistList: data || {}
......
...@@ -49,6 +49,7 @@ wxService.page({ ...@@ -49,6 +49,7 @@ wxService.page({
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
console.log(data)
wx.hideLoading() wx.hideLoading()
data.content.forEach(item=>{ data.content.forEach(item=>{
//兼容ios //兼容ios
...@@ -62,8 +63,8 @@ wxService.page({ ...@@ -62,8 +63,8 @@ wxService.page({
let curStart = new Date(item.task.startTime) let curStart = new Date(item.task.startTime)
let curEnd = new Date(item.task.endTime) let curEnd = new Date(item.task.endTime)
item.task.startTime = `${curStart.getMonth()}${curStart.getDay()}日` item.task.startStr = `${curStart.getMonth() + 1}${curStart.getDate()}日`
item.task.endTime = `${curEnd.getMonth()}${curEnd.getDay()}日` item.task.endStr = `${curEnd.getMonth() + 1}${curEnd.getDate()}日`
}) })
this.setData({ this.setData({
list: pageNo == 1? [...data.content]: [...this.data.list,...data.content], list: pageNo == 1? [...data.content]: [...this.data.list,...data.content],
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</view> </view>
<view class='task-time'> <view class='task-time'>
<image src='/assets/imgs/shoppingGuide/kpi_task_time.png' mode='widthFix'></image> <image src='/assets/imgs/shoppingGuide/kpi_task_time.png' mode='widthFix'></image>
<text>{{item.task.startTime}}~{{item.task.endTime}}</text> <text>{{item.task.startStr}}~{{item.task.endStr}}</text>
</view> </view>
<view class='task-info'> <view class='task-info'>
<view class='lf'> <view class='lf'>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</view> </view>
<view class='task-time'> <view class='task-time'>
<image src='/assets/imgs/shoppingGuide/kpi_task_time.png' mode='widthFix'></image> <image src='/assets/imgs/shoppingGuide/kpi_task_time.png' mode='widthFix'></image>
<text>{{item.task.startTime}}~{{item.task.endTime}}</text> <text>{{item.task.startStr}}~{{item.task.endStr}}</text>
</view> </view>
<view class='task-info'> <view class='task-info'>
<view class='lf'> <view class='lf'>
......
...@@ -44,8 +44,8 @@ wxService.page({ ...@@ -44,8 +44,8 @@ wxService.page({
let curStart = new Date(data.task.startTime) let curStart = new Date(data.task.startTime)
let curEnd = new Date(data.task.endTime) let curEnd = new Date(data.task.endTime)
data.task.startTime = `${curStart.getMonth()}${curStart.getDay()}日` data.task.startTime = `${curStart.getMonth() + 1}${curStart.getDate()}日`
data.task.endTime = `${curEnd.getMonth()}${curEnd.getDay()}日` data.task.endTime = `${curEnd.getMonth() + 1}${curEnd.getDate()}日`
this.setData({ this.setData({
saleDetail: data || {} saleDetail: data || {}
}) })
......
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