Browse Source

代卖订单列表时间日期显示优化

featrue/v4.4
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
153ee389fe
2 changed files with 19 additions and 3 deletions
  1. 2
      pages/agent/order-item/index.wxml
  2. 20
      pages/agent/order/index.js

2
pages/agent/order-item/index.wxml

@ -1,6 +1,6 @@
<!--pages/message/index.wxml--> <!--pages/message/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs> <wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<view style="padding-left:35rpx;height:40rpx;line-height:24rpx"><text>{{item.deliveryTime}}</text></view>
<view wx:if="{{item.isShowDateQd}}" style="padding-left:35rpx;height:40rpx;line-height:24rpx"><text>{{item.deliveryTime}}</text></view>
<view class="flex flex-justify item-content" style="border-bottom:2rpx solid #f3f3f3" bindtap="lookItem"> <view class="flex flex-justify item-content" style="border-bottom:2rpx solid #f3f3f3" bindtap="lookItem">
<view class="flex flex-center"> <view class="flex flex-center">
<wux-image width="{{20}}" height="{{20}}" shape="circle" src="{{item.logoImg}}" mode="aspectFill"> <wux-image width="{{20}}" height="{{20}}" shape="circle" src="{{item.logoImg}}" mode="aspectFill">

20
pages/agent/order/index.js

@ -24,7 +24,7 @@ Page({
form: { form: {
status: '', status: '',
pageNum: 1, pageNum: 1,
pageSize:15
pageSize: 15
} }
}, },
@ -36,7 +36,7 @@ Page({
height: app.globalData.fragmentHeight - 90, height: app.globalData.fragmentHeight - 90,
CustomBar: app.globalData.CustomBar, CustomBar: app.globalData.CustomBar,
// ['form.status']: options.status ? statusList[parseInt(options.status)] : '', // ['form.status']: options.status ? statusList[parseInt(options.status)] : '',
['form.status']: options.status? options.status:'',
['form.status']: options.status ? options.status : '',
// tabIndex: options.status ? parseInt(options.status) : 0 // tabIndex: options.status ? parseInt(options.status) : 0
tabIndex: options.tabIndex ? parseInt(options.tabIndex) : 0 tabIndex: options.tabIndex ? parseInt(options.tabIndex) : 0
}) })
@ -105,6 +105,20 @@ Page({
loading: false loading: false
}) })
} }
var isOnece = ''
var lsList = this.data.orderList[0]
console.log('list',lsList)
lsList.forEach(element => {
if (element.deliveryTime === isOnece) {
element.isShowDateQd = false
} else {
element.isShowDateQd = true
isOnece = element.deliveryTime
}
});
this.setData({
'orderList[0]': lsList
})
}).catch(err => { }).catch(err => {
//异常回调 //异常回调
this.setData({ this.setData({
@ -113,6 +127,8 @@ Page({
}) })
util.showToast(err) util.showToast(err)
}) })
}, },
onTabChange: function ({ onTabChange: function ({
detail detail

Loading…
Cancel
Save