wangxy 1 週間 前
コミット
67d46fb1f0
2 ファイル変更8 行追加2 行削除
  1. 4 1
      pages/admin/Hetong/Hetong.vue
  2. 4 1
      pages/admin/Hetong/HetongInfo.vue

+ 4 - 1
pages/admin/Hetong/Hetong.vue

@@ -55,9 +55,12 @@
 	const popupRef = ref(null)
 	const imgList = ref([])
 	const isLoading = ref(true)
+  const timer1 = ref(null)
 
 	function goUpPage() {
 		uni.navigateBack()
+    clearTimeout(timer1.value);
+    timer1.value = null;
 	}
 	onLoad(({id}) => {
 		tId.value = id;
@@ -127,7 +130,7 @@
           duration: 2000,
           mask: true,
           success() {
-            setTimeout(() => uni.navigateBack(),2000)
+            timer1.value = setTimeout(() => uni.navigateBack(),2000)
           }
         })
       }

+ 4 - 1
pages/admin/Hetong/HetongInfo.vue

@@ -56,6 +56,7 @@ const show = ref(false)
 const popupRef = ref(null)
 const imgList = ref([])
 const isLoading = ref(true)
+const timer1 = ref(null)
 
 onLoad((options) => {
   tId.value = options.id;
@@ -97,6 +98,8 @@ async function previewBase64Image(base64Data) {
 
 function goUpPage() {
   uni.navigateBack()
+  clearTimeout(timer1.value);
+  timer1.value = null;
 }
 
 const  handleQM = throttleAdvanced((img) => {
@@ -115,7 +118,7 @@ const  handleQM = throttleAdvanced((img) => {
         duration: 2000,
         mask: true,
         success() {
-          setTimeout(() => goUpPage(),2000)
+          timer1.value =  setTimeout(() => goUpPage(),2000)
         }
       })
     }