浏览代码

显示绑定手机4

junyuanz 4 年之前
父节点
当前提交
b149a90626
共有 2 个文件被更改,包括 36 次插入5 次删除
  1. 35 4
      pages/user/all/all.js
  2. 1 1
      pages/user/all/all.wxml

+ 35 - 4
pages/user/all/all.js

@@ -257,7 +257,7 @@ Page({
 	  console.log('untel',res.data.user.tel)
 	  
 	  
-	  if(res.data.user.tel == '' && that.data.bindTelfirst == 0){
+	  if(that.data.userInfo != 'nologin' && res.data.user.tel == '' && that.data.bindTelfirst == 0){
 		  that.setData({
 		    bindTelfirst:1
 		  })
@@ -370,9 +370,40 @@ Page({
     _request.$get(url, params, success)
   },
   toInviteList () {
-    wx.navigateTo({
-      url: '/packageUser/pages/user/invite/invite'
-    })
+	  var that = this;
+	  if(that.data.info.user.tel == ''){
+	  		wx.navigateTo({
+	  		 	url: '/packageUser/pages/user/bind/bind'
+	  		})
+	  		   		
+	  		wx.showToast({
+	  		   title: '请先绑定手机号~',
+	  		   icon: 'none',
+	  		   duration: 2000
+	  		}) 
+	  }else{
+		  wx.navigateTo({
+		    url: '/packageUser/pages/user/invite/invite'
+		  })
+	  }
+    
+  },
+  checkbindtel(){
+	  var that = this;
+	  if(that.data.info.user.tel == ''){
+		  setTimeout(function(){
+			  wx.navigateTo({
+			   	url: '/packageUser/pages/user/bind/bind'
+			  })
+			     		
+			  wx.showToast({
+			     title: '请先绑定手机号~',
+			     icon: 'none',
+			     duration: 2000
+			  }) 
+		  },500)
+	  		
+	  }
   },
   toCashList () {
   	if(this.data.info.user.tel == ''){//未绑定手机号

+ 1 - 1
pages/user/all/all.wxml

@@ -66,7 +66,7 @@
         </view>
       </navigator>
       -->
-      <view class="user-state">
+      <view class="user-state" bindtap="checkbindtel">
         <navigator url="/packageUser/pages/user/orders/orders" >
           <view class="user-dingdan">
             <image class="user-paid__icon" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/icon/dingdan.png"></image>