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