Commit cd12dd960e5f9dac99cc7df886ded8004932d312
1 parent
136e2114
判断会员有没有登录的优化
Showing
1 changed file
with
13 additions
and
2 deletions
pages/user/my_service/tment_details.js
@@ -73,6 +73,12 @@ Page({ | @@ -73,6 +73,12 @@ Page({ | ||
73 | th.setData({ | 73 | th.setData({ |
74 | number: options.number | 74 | number: options.number |
75 | }) | 75 | }) |
76 | + | ||
77 | + var user=getApp().globalData.userInfo; | ||
78 | + if(!user){ | ||
79 | + getApp().goto("/pages/togoin/togoin"); | ||
80 | + } | ||
81 | + | ||
76 | }, | 82 | }, |
77 | //查询美容师详情 | 83 | //查询美容师详情 |
78 | query_bea: function() { | 84 | query_bea: function() { |
@@ -125,8 +131,13 @@ Page({ | @@ -125,8 +131,13 @@ Page({ | ||
125 | * 生命周期函数--监听页面显示 | 131 | * 生命周期函数--监听页面显示 |
126 | */ | 132 | */ |
127 | onShow: function() { | 133 | onShow: function() { |
128 | - var th = this; | ||
129 | - th.query_bea(); | 134 | + |
135 | + var user=getApp().globalData.userInfo; | ||
136 | + if(user){ | ||
137 | + var th = this; | ||
138 | + th.query_bea(); | ||
139 | + } | ||
140 | + | ||
130 | }, | 141 | }, |
131 | //关闭导航 | 142 | //关闭导航 |
132 | close: function () { | 143 | close: function () { |