bzkf3 2 yıl önce
ebeveyn
işleme
2c8e3b1976
2 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 2 0
      src/components/rtc-dialog/index.vue
  2. 4 0
      src/utils/time.ts

+ 2 - 0
src/components/rtc-dialog/index.vue

@@ -240,6 +240,7 @@ async function getRtcOption() {
   try {
     await request({
       url: '/dyaw/xlfw_zxhd/get_rtc_token',
+      timeout: 10000,
       data: {
         dxz_id: dyaw_xlfw_zxhd?.dxz_id
       }
@@ -256,6 +257,7 @@ async function getRtcOption() {
       }
     })
   } catch (error) {
+    showFailToast('服务器繁忙,请稍后再试')
     console.error(error);
   }
 }

+ 4 - 0
src/utils/time.ts

@@ -29,6 +29,10 @@ export function formatOffsetSec(s: number): string {
 
 // 将LocaleTimeString 改为当天只显示 hh:mm:ss,之前的日期改为yyyy-mm-dd hh:mm:ss
 export function formatTimeToShow(t: string | number) {
+  if (typeof t === 'string') {
+    // 苹果手机不支持
+    t = t.replace(/-/g, '/')
+  }
   const d = new Date(t)
   const now = new Date()
   if (d.getFullYear() === now.getFullYear() && d.getMonth() === now.getMonth() && d.getDate() === now.getDate()) {