Commit 60d5c48c1aabcb89b12fd3514907e5dc4c3422c1
1 parent
67d59631
我的服务跳转判断是否注册
Showing
2 changed files
with
14 additions
and
19 deletions
pages/user/index/index.js
| ... | ... | @@ -20,7 +20,6 @@ Page({ |
| 20 | 20 | txmon:0, |
| 21 | 21 | byquan: 0, |
| 22 | 22 | yuer: 0, |
| 23 | - | |
| 24 | 23 | currentPage:1, |
| 25 | 24 | recommend_list:[], |
| 26 | 25 | tc_hide: true, |
| ... | ... | @@ -28,12 +27,23 @@ Page({ |
| 28 | 27 | qy_list:null, |
| 29 | 28 | gradeId:null, |
| 30 | 29 | is_init:0, |
| 31 | - | |
| 32 | 30 | cz_val:0, |
| 33 | 31 | full_cz_val:0, |
| 34 | 32 | is_dengji:0, //是不是等级 |
| 35 | 33 | }, |
| 36 | - | |
| 34 | + goto_service: function () { | |
| 35 | + var th = this; | |
| 36 | + if (th.data.userInfo != null) { | |
| 37 | + var url = "/pages/user/my_service/i_service"; | |
| 38 | + getApp().goto(url); | |
| 39 | + } else { | |
| 40 | + if(th.data.is_nav){ | |
| 41 | + wx.navigateTo({ | |
| 42 | + url: '/pages/getphone/getphone', | |
| 43 | + }) | |
| 44 | + } | |
| 45 | + } | |
| 46 | + }, | |
| 37 | 47 | /** |
| 38 | 48 | * 生命周期函数--监听页面加载 |
| 39 | 49 | */ |
| ... | ... | @@ -60,8 +70,6 @@ Page({ |
| 60 | 70 | rq.get("/api/weshop/order/waitlist",{ |
| 61 | 71 | data: { user_id: app_d.user_id}, |
| 62 | 72 | success: function (su) { |
| 63 | - console.log('waitlist'); | |
| 64 | - console.log(su.data.data); | |
| 65 | 73 | s.setData({ |
| 66 | 74 | toji: su.data.data, |
| 67 | 75 | }); |
| ... | ... | @@ -71,7 +79,6 @@ Page({ |
| 71 | 79 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { |
| 72 | 80 | success: function (su) { |
| 73 | 81 | var data=su.data.data; |
| 74 | - console.log(data); | |
| 75 | 82 | data.cashcount = parseInt(data.cashcount); |
| 76 | 83 | s.setData({ udata: data, }); |
| 77 | 84 | } |
| ... | ... | @@ -80,8 +87,6 @@ Page({ |
| 80 | 87 | rq.get("/api/weshop/withdrawals/summoney", { |
| 81 | 88 | data: { user_id: e.user_id, store_id: os.stoid, status: 0 }, |
| 82 | 89 | success: function (su) { |
| 83 | - console.log("withdrawals"); | |
| 84 | - console.log(su); | |
| 85 | 90 | if (su.data.code == 0) { |
| 86 | 91 | var yuer = parseFloat(th.data.userInfo.user_money - |
| 87 | 92 | th.data.userInfo.frozen_money - su.data.data.summoney).toFixed(2); |
| ... | ... | @@ -94,8 +99,6 @@ Page({ |
| 94 | 99 | rq.get("/api/weshop/userfeemail/page", { |
| 95 | 100 | data: { user_id: e.user_id, store_id: os.stoid, pageSize:1}, |
| 96 | 101 | success: function (su) { |
| 97 | - console.log("userfeemail"); | |
| 98 | - console.log(su); | |
| 99 | 102 | if (su.data.code == 0) { |
| 100 | 103 | th.setData({ byquan: parseInt(su.data.data.total)}); |
| 101 | 104 | } |
| ... | ... | @@ -159,9 +162,6 @@ Page({ |
| 159 | 162 | g_qy_list=res.data.data.pageData; |
| 160 | 163 | }); |
| 161 | 164 | |
| 162 | - console.log("aa-aa"); | |
| 163 | - console.log(obj); | |
| 164 | - | |
| 165 | 165 | for(var i in arr_data){ |
| 166 | 166 | var item=arr_data[i]; |
| 167 | 167 | var FromId=th.check_is_has_qy(item,g_qy_list); |
| ... | ... | @@ -182,9 +182,6 @@ Page({ |
| 182 | 182 | } |
| 183 | 183 | //th.setData({ qy_list: arr, need_money: need_money}); |
| 184 | 184 | obj.qy_list=arr; |
| 185 | - | |
| 186 | - console.log("111-111"); | |
| 187 | - console.log(obj); | |
| 188 | 185 | th.setData(obj); |
| 189 | 186 | } |
| 190 | 187 | }) |
| ... | ... | @@ -239,8 +236,6 @@ Page({ |
| 239 | 236 | */ |
| 240 | 237 | onHide: function () {}, |
| 241 | 238 | setappdata: function (t) { |
| 242 | - console.log('setappdata'); | |
| 243 | - console.log(t); | |
| 244 | 239 | if (t.isout == 1) |
| 245 | 240 | wx.navigateTo({ |
| 246 | 241 | url: "/pages/error/error?msg=小程序已经过期", | ... | ... |
pages/user/index/index.wxml
| ... | ... | @@ -212,7 +212,7 @@ |
| 212 | 212 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> |
| 213 | 213 | <view class="four-level-word">我的地址</view> |
| 214 | 214 | </view> |
| 215 | - <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto" > | |
| 215 | + <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_service" > | |
| 216 | 216 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> |
| 217 | 217 | <view class="four-level-word">我的服务</view> |
| 218 | 218 | </view> | ... | ... |