bayi 2 gadi atpakaļ
vecāks
revīzija
af53bad4ca
2 mainītis faili ar 6 papildinājumiem un 34 dzēšanām
  1. 3 17
      components/uploadFile/index.js
  2. 3 17
      pages/reading/index.js

+ 3 - 17
components/uploadFile/index.js

@@ -125,23 +125,9 @@ Component({
       })
     },
     beforeleave() {
-      if (this.data.uploadFlag) {
-        this.setData({
-          uploadFlag: false
-        })
-        wx.showModal({
-          title: '上传作品中',
-          content: '小朋友请耐心等待哦~',
-          showCancel: false,
-          success: (res) => {
-            if (res.confirm) {
-              this.setData({
-                uploadFlag: true
-              })
-            }
-          }
-        })
-      }
+      this.setData({
+        uploadState: true
+      })
     },
     jumpWork() {
       wx.redirectTo({

+ 3 - 17
pages/reading/index.js

@@ -615,23 +615,9 @@ Page({
   },
   // 阻止作品上传时返回
   beforeleave() {
-    if (this.data.uploadState) {
-      this.setData({
-        uploadState: false
-      })
-      wx.showModal({
-        title: '上传作品中',
-        content: '小朋友请耐心等待哦~',
-        showCancel: false,
-        success: (res) => {
-          if (res.confirm) {
-            this.setData({
-              uploadState: true
-            })
-          }
-        }
-      })
-    }
+    this.setData({
+      uploadState: true
+    })
   },
   // 获取设备高度与行高度
   getHeight() {