Explorar o código

修改了研学订单支付时间的判断

vaecebyZ hai 9 meses
pai
achega
e082fe9cb0
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      study/pay/orderPay.vue

+ 3 - 2
study/pay/orderPay.vue

@@ -578,7 +578,7 @@ export default {
     },
     payTime() {
       const goodsList = this.info.goodsList;
-      if (goodsList && goodsList[0] && goodsList[0].extend) {
+      if (goodsList && goodsList[0] && goodsList[0].extend && typeof goodsList[0].extend === 'string') {
         let extend;
         try {
           extend = JSON.parse(goodsList[0].extend);
@@ -596,7 +596,8 @@ export default {
       }
       const payment = this.info.payment;
       if (payment && payment.paymentTime) {
-        return uni.$u.timeFormat(payment.paymentTime, 'yyyy-mm-dd hh:MM:ss');
+		const time = +new Date(payment.paymentTime)
+        return uni.$u.timeFormat(time, 'yyyy-mm-dd hh:MM:ss');
       } else {
         return '-';
       }