Commit 87e0a41035e05533d198d5c2a691cf40b574fd63
1 parent
37ccd96757
Exists in
master
修改订单详情时间戳
Showing
1 changed file
with
10 additions
and
2 deletions
Show diff stats
src/pages/myOrderPaying/myOrderPaying.vue
| ... | ... | @@ -86,7 +86,7 @@ |
| 86 | 86 | <text>订单号:{{payId}}</text> |
| 87 | 87 | </text> |
| 88 | 88 | <text class="order-info-time"> |
| 89 | - <text>下单时间:{{orderInfo.order_info[0].pay_time}}</text> | |
| 89 | + <text>下单时间:{{orderInfo.order_info[0].pay_time | timerChange}}</text> | |
| 90 | 90 | </text> |
| 91 | 91 | <view class="order-info-hr"></view> |
| 92 | 92 | <view class="order-info-contact"> |
| ... | ... | @@ -133,6 +133,7 @@ export default { |
| 133 | 133 | return { |
| 134 | 134 | // orderInfo:{}, |
| 135 | 135 | payId: '', |
| 136 | + payTime: '', | |
| 136 | 137 | status: '', |
| 137 | 138 | uid: '', |
| 138 | 139 | openid: '', |
| ... | ... | @@ -164,7 +165,6 @@ export default { |
| 164 | 165 | }, |
| 165 | 166 | orderInfoList () { |
| 166 | 167 | const orderInfoList = this.orderInfo.order_info[0].list |
| 167 | - // console.log(this.orderInfo.order_info[0].list.p_name + 'sssss') | |
| 168 | 168 | return orderInfoList |
| 169 | 169 | }, |
| 170 | 170 | // 获取订单地址信息 |
| ... | ... | @@ -230,6 +230,14 @@ export default { |
| 230 | 230 | }, 1500) |
| 231 | 231 | ) |
| 232 | 232 | } |
| 233 | + }, | |
| 234 | + filters: { | |
| 235 | + timerChange: function(value) { | |
| 236 | + var newDate = new Date() | |
| 237 | + newDate.setTime(value * 1000) | |
| 238 | + console.log(newDate.toLocaleString()) | |
| 239 | + return newDate.toLocaleString() | |
| 240 | + } | |
| 233 | 241 | } |
| 234 | 242 | } |
| 235 | 243 | </script> | ... | ... |