Przeglądaj źródła

fix: 修复IOS时间格式化错误

zhangyuhan 3 lat temu
rodzic
commit
3618716e7d

+ 3 - 0
src/web/staticres/common-module/order-list/js/order-detail.js

@@ -454,6 +454,9 @@ var vm = new Vue({
 
 
       function formatTimeText (type) {
       function formatTimeText (type) {
         var result = ''
         var result = ''
+        if (typeof type === "string") {
+          type = type.replace(/-/g, '/')
+        }
         var tempDate = new Date(type)
         var tempDate = new Date(type)
         if (typeof tempDate.getTime() === 'number') {
         if (typeof tempDate.getTime() === 'number') {
           result = tempDate.pattern('yyyy/MM/dd')
           result = tempDate.pattern('yyyy/MM/dd')

+ 3 - 0
src/web/staticres/common-module/order-list/js/order-list.js

@@ -2078,6 +2078,9 @@ var vm = new Vue({
 
 
       function formatTimeText (type) {
       function formatTimeText (type) {
         var result = ''
         var result = ''
+        if (typeof type === "string") {
+          type = type.replace(/-/g, '/')
+        }
         var tempDate = new Date(type)
         var tempDate = new Date(type)
         if (typeof tempDate.getTime() === 'number') {
         if (typeof tempDate.getTime() === 'number') {
           result = tempDate.pattern('yyyy/MM/dd')
           result = tempDate.pattern('yyyy/MM/dd')

+ 3 - 0
src/web/templates/areaPack/pc/page_order.html

@@ -235,6 +235,9 @@
                     }
                     }
                     function formatTimeText (type) {
                     function formatTimeText (type) {
                         var result = ''
                         var result = ''
+                        if (typeof type === "string") {
+                            type = type.replace(/-/g, '/')
+                        }
                         var tempDate = new Date(type)
                         var tempDate = new Date(type)
                         if (typeof tempDate.getTime() === 'number') {
                         if (typeof tempDate.getTime() === 'number') {
                             result = tempDate.Format('yyyy/MM/dd')
                             result = tempDate.Format('yyyy/MM/dd')

+ 3 - 0
src/web/templates/pc/myOrder.html

@@ -684,6 +684,9 @@
         },
         },
         formatTimeText (type) {
         formatTimeText (type) {
           var result = ''
           var result = ''
+          if (typeof type === "string") {
+            type = type.replace(/-/g, '/')
+          }
           var tempDate = new Date(type)
           var tempDate = new Date(type)
           if (typeof tempDate.getTime() === 'number') {
           if (typeof tempDate.getTime() === 'number') {
               result = tempDate.Format('yyyy/MM/dd')
               result = tempDate.Format('yyyy/MM/dd')