Commit cd12dd960e5f9dac99cc7df886ded8004932d312

Authored by yvan.ni
1 parent 136e2114

判断会员有没有登录的优化

pages/user/my_service/tment_details.js
... ... @@ -73,6 +73,12 @@ Page({
73 73 th.setData({
74 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 84 query_bea: function() {
... ... @@ -125,8 +131,13 @@ Page({
125 131 * 生命周期函数--监听页面显示
126 132 */
127 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 143 close: function () {
... ...