Commit cb36fbf08da49ea51ffb6077b4c1cd9283982f4e
1 parent
0f19752e
会员中心的 门店选择的bug优化
Showing
3 changed files
with
11 additions
and
6 deletions
pages/user/index/index.js
@@ -107,6 +107,7 @@ Page({ | @@ -107,6 +107,7 @@ Page({ | ||
107 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { | 107 | rq.get("/api/weshop/users/getinfo/" + os.stoid + "/" + e.user_id, { |
108 | success: function(su) { | 108 | success: function(su) { |
109 | var data = su.data.data; | 109 | var data = su.data.data; |
110 | + if(!data) data={}; | ||
110 | data.cashcount = parseInt(data.cashcount); | 111 | data.cashcount = parseInt(data.cashcount); |
111 | s.setData({ | 112 | s.setData({ |
112 | udata: data, | 113 | udata: data, |
pages/user/userinfo/userinfo.js
@@ -38,7 +38,7 @@ Page({ | @@ -38,7 +38,7 @@ Page({ | ||
38 | sort_store: 0, //门店分类 | 38 | sort_store: 0, //门店分类 |
39 | sec_sto: "", | 39 | sec_sto: "", |
40 | more_store: 0, //选择门店 | 40 | more_store: 0, //选择门店 |
41 | - choice_sort_store: 1, //选择分类门店 | 41 | + choice_sort_store: 0, //选择分类门店 |
42 | more_store: 0, //选择门店 | 42 | more_store: 0, //选择门店 |
43 | lat: null, //维度 | 43 | lat: null, //维度 |
44 | lon: null, //经度 | 44 | lon: null, //经度 |
@@ -280,7 +280,7 @@ Page({ | @@ -280,7 +280,7 @@ Page({ | ||
280 | pageSize: 300 | 280 | pageSize: 300 |
281 | } | 281 | } |
282 | th.setData({ | 282 | th.setData({ |
283 | - sort_store: 1 | 283 | + sort_store: 0 |
284 | }); | 284 | }); |
285 | var i = getApp().request; | 285 | var i = getApp().request; |
286 | //如果有距离的话 | 286 | //如果有距离的话 |
@@ -625,8 +625,12 @@ Page({ | @@ -625,8 +625,12 @@ Page({ | ||
625 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { | 625 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { |
626 | success: function(src) { | 626 | success: function(src) { |
627 | var a = src.data.data; | 627 | var a = src.data.data; |
628 | - var time = util.formatTime(a.reg_time, "'Y/M/D"); | ||
629 | - var birthday = util.formatTime(a.birthday, "'Y/M/D"); | 628 | + |
629 | + if(!a) a={}; | ||
630 | + var time ="",birthday =""; | ||
631 | + if(a && a.reg_time) util.formatTime(a.reg_time, "'Y/M/D"); | ||
632 | + if(a && a.birthday) util.formatTime(a.birthday, "'Y/M/D"); | ||
633 | + | ||
630 | a.reg_time = time; | 634 | a.reg_time = time; |
631 | a.birthday = birthday | 635 | a.birthday = birthday |
632 | e.setData({ | 636 | e.setData({ |
pages/user/userinfo/userinfo.wxml
@@ -274,9 +274,9 @@ | @@ -274,9 +274,9 @@ | ||
274 | <!-- 门店列表,最外层的门店列表,一开始 --> | 274 | <!-- 门店列表,最外层的门店列表,一开始 --> |
275 | <view class="store-list"> | 275 | <view class="store-list"> |
276 | <!--如果还没有点击更多门店的时候 --> | 276 | <!--如果还没有点击更多门店的时候 --> |
277 | - <block wx:if="{{choice_sort_store==0}}"> | 277 | + <block wx:if="{{choice_sort_store==0}}"> |
278 | <!-- 需要for循环 --> | 278 | <!-- 需要for循环 --> |
279 | - <block wx:if="is_show_sto_cat==1"> | 279 | + <block wx:if="{{is_show_sto_cat==1}}"> |
280 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | 280 | <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> |
281 | <view class="store flex-vertical"> | 281 | <view class="store flex-vertical"> |
282 | <!-- 需要点击事件 --> | 282 | <!-- 需要点击事件 --> |