Browse Source

Merge branch 'master' of http://118.190.145.217:3000/xiaojincai/wanzb_xcx

xjc 4 years ago
parent
commit
b8cd2217b0
3 changed files with 18 additions and 5 deletions
  1. 8 3
      pages/upload/upload.js
  2. 2 2
      pages/upload/upload.wxml
  3. 8 0
      pages/user/user.js

+ 8 - 3
pages/upload/upload.js

@@ -16,7 +16,8 @@ Page({
     is_markt:0,
     today_fund:'',
     change:0,
-    freshen:true
+    freshen:true,
+    disable:false
   },
 
   /**
@@ -243,6 +244,9 @@ Page({
     wx.showLoading({
       title: '正在提交',
     })
+    this.setData({
+      disable:true
+    })
     wx.request({
       url: host + '/api/wx/player/record',
       data:parm,
@@ -263,7 +267,7 @@ Page({
           title: '提交成功',
         })
         this.setData({
-          freshen: true
+          freshen: true,
         })
         setTimeout(()=>{
           this.setData({
@@ -272,7 +276,8 @@ Page({
             today_stock_img: [],
             value: [-1],
             is_markt: 0,
-            today_fund: ''
+            today_fund: '',
+            disable:false
           })
           wx.switchTab({
             url: '../index/index',

+ 2 - 2
pages/upload/upload.wxml

@@ -44,6 +44,6 @@
         <text>6、重新归赛请跟副主编申请,并提供请假期间的银证记录。</text>
     </view>
 
-    <button wx:if='{{!change}}' bindtap="post">提交</button>
-    <button wx:else  bindtap="post">修改</button>
+    <button wx:if='{{!change}}' disable='{{disable}}' bindtap="post">提交</button>
+    <button wx:else  bindtap="post" disable='{{disable}}'>修改</button>
 </form>

+ 8 - 0
pages/user/user.js

@@ -96,6 +96,14 @@ Page({
               },
               success(res) {
                 //获取openid
+                if(res.data.code != 0){
+                  wx.showToast({
+                    icon: 'none',
+                    title: res.data.message,
+                  })
+                  wx.hideLoading();
+                  return;
+                }
                 data.openid=res.data.data.openid
                 wx.request({
                   url: host + '/api/wx/login',