Преглед изворни кода

登录disabled放开方法修改

ZhangWenQiang пре 6 година
родитељ
комит
eb5f8e2635
2 измењених фајлова са 6 додато и 5 уклоњено
  1. 1 1
      pages/detail/index.wxml
  2. 5 4
      pages/login/login.js

+ 1 - 1
pages/detail/index.wxml

@@ -689,7 +689,7 @@
     <button class="distance selfBtn" form-type="submit">申请开团</button>
   </form>
   <button class="distance selfBtn" wx:if="{{positionCategory!=4 && isApply}}">已申请</button>
-  <button class="distance selfBtn" wx:if="{{positionCategory==4 && isApply}}" bindtap='myApply'>我的拼</button>
+  <button class="distance selfBtn" wx:if="{{positionCategory==4 && isApply}}" bindtap='myApply'>我的拼</button>
 </view>
 <!-- 加入拼工 -->
 <view class="pt-container" hidden='{{!showJoinPt}}'>

+ 5 - 4
pages/login/login.js

@@ -29,8 +29,9 @@ Page({
 
   //用户授权
   bindGetUserInfo: function(e) {
-    if (!this.data.disabled) {
-      this.setData({
+    var self = this;
+    if (!self.data.disabled) {
+      self.setData({
         disabled: true
       })
       //检查登录态
@@ -138,8 +139,8 @@ Page({
         }
       })
     }
-    setTimeout(function() {
-      this.setData({
+    setTimeout(function () {
+      self.setData({
         disabled: false
       })
     }, 1000)