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,7 +20,6 @@ Page({ | ||
| 20 | txmon:0, | 20 | txmon:0, |
| 21 | byquan: 0, | 21 | byquan: 0, |
| 22 | yuer: 0, | 22 | yuer: 0, |
| 23 | - | ||
| 24 | currentPage:1, | 23 | currentPage:1, |
| 25 | recommend_list:[], | 24 | recommend_list:[], |
| 26 | tc_hide: true, | 25 | tc_hide: true, |
| @@ -28,12 +27,23 @@ Page({ | @@ -28,12 +27,23 @@ Page({ | ||
| 28 | qy_list:null, | 27 | qy_list:null, |
| 29 | gradeId:null, | 28 | gradeId:null, |
| 30 | is_init:0, | 29 | is_init:0, |
| 31 | - | ||
| 32 | cz_val:0, | 30 | cz_val:0, |
| 33 | full_cz_val:0, | 31 | full_cz_val:0, |
| 34 | is_dengji:0, //是不是等级 | 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,8 +70,6 @@ Page({ | ||
| 60 | rq.get("/api/weshop/order/waitlist",{ | 70 | rq.get("/api/weshop/order/waitlist",{ |
| 61 | data: { user_id: app_d.user_id}, | 71 | data: { user_id: app_d.user_id}, |
| 62 | success: function (su) { | 72 | success: function (su) { |
| 63 | - console.log('waitlist'); | ||
| 64 | - console.log(su.data.data); | ||
| 65 | s.setData({ | 73 | s.setData({ |
| 66 | toji: su.data.data, | 74 | toji: su.data.data, |
| 67 | }); | 75 | }); |
| @@ -71,7 +79,6 @@ Page({ | @@ -71,7 +79,6 @@ Page({ | ||
| 71 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { | 79 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { |
| 72 | success: function (su) { | 80 | success: function (su) { |
| 73 | var data=su.data.data; | 81 | var data=su.data.data; |
| 74 | - console.log(data); | ||
| 75 | data.cashcount = parseInt(data.cashcount); | 82 | data.cashcount = parseInt(data.cashcount); |
| 76 | s.setData({ udata: data, }); | 83 | s.setData({ udata: data, }); |
| 77 | } | 84 | } |
| @@ -80,8 +87,6 @@ Page({ | @@ -80,8 +87,6 @@ Page({ | ||
| 80 | rq.get("/api/weshop/withdrawals/summoney", { | 87 | rq.get("/api/weshop/withdrawals/summoney", { |
| 81 | data: { user_id: e.user_id, store_id: os.stoid, status: 0 }, | 88 | data: { user_id: e.user_id, store_id: os.stoid, status: 0 }, |
| 82 | success: function (su) { | 89 | success: function (su) { |
| 83 | - console.log("withdrawals"); | ||
| 84 | - console.log(su); | ||
| 85 | if (su.data.code == 0) { | 90 | if (su.data.code == 0) { |
| 86 | var yuer = parseFloat(th.data.userInfo.user_money - | 91 | var yuer = parseFloat(th.data.userInfo.user_money - |
| 87 | th.data.userInfo.frozen_money - su.data.data.summoney).toFixed(2); | 92 | th.data.userInfo.frozen_money - su.data.data.summoney).toFixed(2); |
| @@ -94,8 +99,6 @@ Page({ | @@ -94,8 +99,6 @@ Page({ | ||
| 94 | rq.get("/api/weshop/userfeemail/page", { | 99 | rq.get("/api/weshop/userfeemail/page", { |
| 95 | data: { user_id: e.user_id, store_id: os.stoid, pageSize:1}, | 100 | data: { user_id: e.user_id, store_id: os.stoid, pageSize:1}, |
| 96 | success: function (su) { | 101 | success: function (su) { |
| 97 | - console.log("userfeemail"); | ||
| 98 | - console.log(su); | ||
| 99 | if (su.data.code == 0) { | 102 | if (su.data.code == 0) { |
| 100 | th.setData({ byquan: parseInt(su.data.data.total)}); | 103 | th.setData({ byquan: parseInt(su.data.data.total)}); |
| 101 | } | 104 | } |
| @@ -159,9 +162,6 @@ Page({ | @@ -159,9 +162,6 @@ Page({ | ||
| 159 | g_qy_list=res.data.data.pageData; | 162 | g_qy_list=res.data.data.pageData; |
| 160 | }); | 163 | }); |
| 161 | 164 | ||
| 162 | - console.log("aa-aa"); | ||
| 163 | - console.log(obj); | ||
| 164 | - | ||
| 165 | for(var i in arr_data){ | 165 | for(var i in arr_data){ |
| 166 | var item=arr_data[i]; | 166 | var item=arr_data[i]; |
| 167 | var FromId=th.check_is_has_qy(item,g_qy_list); | 167 | var FromId=th.check_is_has_qy(item,g_qy_list); |
| @@ -182,9 +182,6 @@ Page({ | @@ -182,9 +182,6 @@ Page({ | ||
| 182 | } | 182 | } |
| 183 | //th.setData({ qy_list: arr, need_money: need_money}); | 183 | //th.setData({ qy_list: arr, need_money: need_money}); |
| 184 | obj.qy_list=arr; | 184 | obj.qy_list=arr; |
| 185 | - | ||
| 186 | - console.log("111-111"); | ||
| 187 | - console.log(obj); | ||
| 188 | th.setData(obj); | 185 | th.setData(obj); |
| 189 | } | 186 | } |
| 190 | }) | 187 | }) |
| @@ -239,8 +236,6 @@ Page({ | @@ -239,8 +236,6 @@ Page({ | ||
| 239 | */ | 236 | */ |
| 240 | onHide: function () {}, | 237 | onHide: function () {}, |
| 241 | setappdata: function (t) { | 238 | setappdata: function (t) { |
| 242 | - console.log('setappdata'); | ||
| 243 | - console.log(t); | ||
| 244 | if (t.isout == 1) | 239 | if (t.isout == 1) |
| 245 | wx.navigateTo({ | 240 | wx.navigateTo({ |
| 246 | url: "/pages/error/error?msg=小程序已经过期", | 241 | url: "/pages/error/error?msg=小程序已经过期", |
pages/user/index/index.wxml
| @@ -212,7 +212,7 @@ | @@ -212,7 +212,7 @@ | ||
| 212 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> | 212 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> |
| 213 | <view class="four-level-word">我的地址</view> | 213 | <view class="four-level-word">我的地址</view> |
| 214 | </view> | 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 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> | 216 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> |
| 217 | <view class="four-level-word">我的服务</view> | 217 | <view class="four-level-word">我的服务</view> |
| 218 | </view> | 218 | </view> |