tanyanfei 4 éve
szülő
commit
772511812b
1 módosított fájl, 6 hozzáadás és 3 törlés
  1. 6 3
      pages/upload/upload.js

+ 6 - 3
pages/upload/upload.js

@@ -15,16 +15,16 @@ Page({
     value:[-1],
     is_markt:0,
     today_fund:'',
-    change:0
+    change:0,
+    freshen:true
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onShow(){
-    
     setTimeout(()=>{
-      if (!this.data.userInfo.token) {
+      if (!this.data.userInfo.token || !this.data.freshen) {
         return;
       }
       wx.request({
@@ -165,6 +165,9 @@ Page({
       })
   },
   upload(){
+    this.setData({
+      freshen:false
+    })
     var today_stock_img = this.data.today_stock_img;
     wx.chooseImage({
       success: res=> {