tianyi 13 hours ago
parent
commit
043f9c8239
  1. 28
      package1/group/shopEvaluate.vue

28
package1/group/shopEvaluate.vue

@ -45,7 +45,7 @@
{{item.createByName}}
</view>
<view class="eval-time">
{{item.createTime}}
{{item.createTime | formatTime}}
</view>
</view>
</view>
@ -125,6 +125,32 @@
},
components: {
},
filters:{
formatTime(value) {
const date = new Date(value);
//
const year = date.getFullYear();
// (getMonth 0-11 +1)0
const month = String(date.getMonth() + 1).padStart(2, '0');
// (getDate)0
const day = String(date.getDate()).padStart(2, '0');
// (getHours)0
const hour = String(date.getHours()).padStart(2, '0');
// (getMinutes)0
const minute = String(date.getMinutes()).padStart(2, '0');
// (getSeconds)0
const second = String(date.getSeconds()).padStart(2, '0');
// -- ::
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}
},
onLoad(option) {
this.shopItem = JSON.parse(option.item)

Loading…
Cancel
Save