Commit 536fdf8ce374f48c28bac10269148716cb3819c0
Merge branch 'test' into 'qa'
Test See merge request !150
Showing
34 changed files
with
548 additions
and
344 deletions
components/diy_nav/diy_nav.wxml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <view style='width:{{100/nav_list.length}}%' |
6 | 6 | class="{{object.seticon==1?'big_view_one':object.seticon==2?'big_view_two':'bicder_picture'}}"> |
7 | 7 | <block wx:if="{{item.navicon==null}}"> |
8 | - <image style='width:{{object.sliderExample+100}}rpx;height:{{object.sliderExample+100}}rpx;' | |
8 | + <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | |
9 | 9 | class="{{object.seticon==1?'print_one':object.seticon==2?'print_two':'image_none'}}" |
10 | 10 | src="{{imghost}}/miniapp/images/nav-icon.png"></image> |
11 | 11 | <view class="{{object.seticon==1?'font_one':object.seticon==2?'font_bicder_two':'font_three'}}"> |
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | </view> |
14 | 14 | </block> |
15 | 15 | <block wx:if="{{item.navicon!=null}}"> |
16 | - <image style='width:{{object.sliderExample+100}}rpx;height:{{object.sliderExample+100}}rpx;' | |
16 | + <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | |
17 | 17 | class="{{object.seticon==1?'print_one':object.seticon==2?'print_two':'image_none'}}" |
18 | 18 | src="{{item.navicon}}"></image> |
19 | 19 | <view class="{{object.seticon==1?'font_one':object.seticon==2?'font_bicder_two':'font_three'}}"> |
... | ... | @@ -34,13 +34,13 @@ |
34 | 34 | <view class="one_div"> |
35 | 35 | <view class="picture_one"> |
36 | 36 | <block wx:if="{{item.navicon!=null}}"> |
37 | - <image style='width:{{object.sliderExample+100}}rpx;height:{{object.sliderExample+100}}rpx;' | |
37 | + <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | |
38 | 38 | src="{{item.navicon}}"> |
39 | 39 | </image> |
40 | 40 | </block> |
41 | 41 | |
42 | 42 | <block wx:if="{{item.navicon==null}}"> |
43 | - <image style='width:{{object.sliderExample+100}}rpx;height:{{object.sliderExample+100}}rpx;' | |
43 | + <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | |
44 | 44 | src="{{imghost}}/miniapp/images/nav-icon.png"> |
45 | 45 | </image> |
46 | 46 | </block> | ... | ... |
components/goods_list/g_filter.wxs
... | ... | @@ -8,44 +8,54 @@ var g_filters = { |
8 | 8 | |
9 | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
10 | 10 | get_card_price:function(goods,all_card,type){ |
11 | - var price1=parseInt(goods['cardprice1']); | |
12 | - var price2=parseInt(goods['cardprice2']); | |
13 | - var price3=parseInt(goods['cardprice3']); | |
11 | + var price1=parseFloat(goods['cardprice1']); | |
12 | + var price2 = parseFloat(goods['cardprice2']); | |
13 | + var price3 = parseFloat(goods['cardprice3']); | |
14 | 14 | if(!all_card){ |
15 | 15 | if(type==0) return 0; |
16 | 16 | return ""; |
17 | - } | |
18 | - | |
19 | - var arr=[]; | |
20 | - var min_price= 0; | |
21 | - var min_name=""; | |
17 | + } | |
18 | + | |
19 | + var min_price=null; | |
20 | + var min_name=null; | |
22 | 21 | //---设置对应的价格名字---- |
23 | 22 | for(var i=0;i<3;i++) { |
24 | - var vl=all_card[i]; | |
23 | + var vl=all_card[i]; | |
25 | 24 | if(vl['CorrPrice']=="Price1" && price1>0) |
26 | - arr.push({'price':price1, 'name':vl['CardName']}); | |
25 | + { | |
26 | + if(min_price==null) { | |
27 | + min_price=price1;min_name=vl['CardName']; | |
28 | + } | |
29 | + else if(price1<min_price) { | |
30 | + min_price=price1;min_name=vl['CardName']; | |
31 | + } | |
32 | + } | |
27 | 33 | if(vl['CorrPrice']=="Price2" && price2>0) |
28 | - arr.push({'price':price2, 'name':vl['CardName']}); | |
34 | + { | |
35 | + if(min_price==null) { | |
36 | + min_price=price2;min_name=vl['CardName']; | |
37 | + } | |
38 | + else if(price2<min_price) { | |
39 | + min_price=price2;min_name=vl['CardName']; | |
40 | + } | |
41 | + } | |
42 | + | |
29 | 43 | if(vl['CorrPrice']=="Price3" && price3>0) |
30 | - arr.push({'price':price3, 'name':vl['CardName']}); | |
44 | + { | |
45 | + if(min_price==null) { | |
46 | + min_price=price3;min_name=vl['CardName']; | |
47 | + } | |
48 | + else if(price3<min_price) { | |
49 | + min_price=price3;min_name=vl['CardName']; | |
50 | + } | |
51 | + } | |
52 | + | |
31 | 53 | } |
32 | - if(arr.length==0){ | |
54 | + if(min_price==null){ | |
33 | 55 | if(type==0) return 0; |
34 | 56 | return ""; |
35 | 57 | } |
36 | - //--进行排序,升序--- | |
37 | - arr.sort(function(a,b){ | |
38 | - if (a.price < b.price) { | |
39 | - return -1; | |
40 | - } else if (a.fee == b.fee) { | |
41 | - return 0; | |
42 | - } else { | |
43 | - return 1; | |
44 | - } | |
45 | - }) | |
46 | - //-- 获取最下价钱,和相应的卡的名称 -- | |
47 | - min_price=arr[0].price; | |
48 | - min_name=arr[0].name; | |
58 | + | |
49 | 59 | if(type==0) return min_price; |
50 | 60 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); |
51 | 61 | return min_name; | ... | ... |
components/goods_list/goods_list.js
... | ... | @@ -18,77 +18,89 @@ Component({ |
18 | 18 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
19 | 19 | }, |
20 | 20 | ready: function () { |
21 | - var th=this; | |
22 | - getApp().getConfig2(function(e){ | |
23 | - var swithc_list=e.switch_list; | |
24 | - var sw_arr=JSON.parse(swithc_list); | |
25 | - //---如果后台又开等级卡的开关--- | |
26 | - if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | |
27 | - th.setData({rank_switch:true}); | |
28 | - var user=getApp().globalData.userInfo; | |
29 | - var ti=setInterval(function(){ | |
30 | - if(!user) return false; | |
31 | - clearInterval(ti); | |
32 | - //---回调卡的列表--- | |
33 | - th.getPlusCardType(function(ob){ | |
34 | - th.setData({card_list:ob.card_list}); | |
35 | - if(user.card_field ){ | |
36 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
37 | - var end = new Date(str); | |
38 | - end = Date.parse(end) / 1000; | |
39 | - var now = ut.gettimestamp(); | |
40 | - | |
41 | - //--- 判断是等级会员,且在有效期范围内 --- | |
42 | - if(user.card_field && now<end){ | |
43 | - var card_name=ob.name_map.get(user.card_field); | |
44 | - if(card_name.length>4) card_name=card_name.substring(0,4); | |
45 | - th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); | |
46 | - } | |
47 | - } | |
48 | - }) | |
49 | - },500) | |
50 | - } | |
51 | - }) | |
52 | - | |
21 | + | |
53 | 22 | }, |
54 | 23 | |
24 | + methods: { | |
25 | + init:function(){ | |
26 | + var th = this; | |
27 | + getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, { | |
28 | + success: function (e) { | |
29 | + getApp().globalData.userInfo = e.data.data; | |
30 | + getApp().getConfig2(function (e) { | |
31 | + var swithc_list = e.switch_list; | |
32 | + var sw_arr = JSON.parse(swithc_list); | |
33 | + //---如果后台又开等级卡的开关--- | |
34 | + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { | |
35 | + th.setData({ rank_switch: true }); | |
36 | + //---回调卡的列表--- | |
37 | + th.getPlusCardType(function (ob) { | |
38 | + th.setData({ card_list: ob.card_list }); | |
39 | + var ti = setInterval(function () { | |
40 | + var user = getApp().globalData.userInfo; | |
41 | + if (!user) return false; | |
42 | + clearInterval(ti); | |
55 | 43 | |
56 | - methods: { | |
57 | - | |
58 | - get_list:function(){ | |
44 | + if (user.card_field) { | |
45 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
46 | + var end = new Date(str); | |
47 | + end = Date.parse(end) / 1000; | |
48 | + var now = ut.gettimestamp(); | |
49 | + | |
50 | + //--- 判断是等级会员,且在有效期范围内 --- | |
51 | + if (user.card_field && now < end) { | |
52 | + var card_name = ob.name_map.get(user.card_field); | |
53 | + if (card_name.length > 4) card_name = card_name.substring(0, 4); | |
54 | + th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list }); | |
55 | + } | |
56 | + } | |
57 | + }, 500) | |
58 | + }) | |
59 | + | |
60 | + } | |
61 | + }) | |
62 | + } | |
63 | + }) | |
64 | + | |
65 | + }, | |
66 | + | |
67 | + | |
68 | + get_list:function(){ | |
59 | 69 | var that = this; |
60 | - if(that.data.is_no_more==0) return false; | |
70 | + if (that.data.is_no_more == 0) return false; | |
61 | 71 | var curPage = that.data.curPage; |
62 | - getApp().request.get('/api/weshop/goods/page?page',{ | |
63 | - data: { is_mainshow: 1, isonsale: 1, | |
64 | - is_recommend: 1, is_on_sale: 1, | |
72 | + getApp().request.get('/api/weshop/goods/page?page', { | |
73 | + data: { | |
74 | + is_mainshow: 1, isonsale: 1, | |
75 | + is_recommend: 1, is_on_sale: 1, | |
65 | 76 | store_id: o.stoid, |
66 | 77 | page: curPage, |
67 | - pageSize:6, | |
68 | - }, | |
69 | - success: function (res){ | |
70 | - var data=res.data; | |
71 | - var total=data.data.total; | |
72 | - if (total <= curPage*6){ | |
73 | - that.setData({ is_no_more: 0 }); | |
74 | - }else{ | |
75 | - that.data.curPage++; | |
78 | + pageSize: 6, | |
79 | + }, | |
80 | + success: function (res) { | |
81 | + var data = res.data; | |
82 | + var total = data.data.total; | |
83 | + if (total <= curPage * 6) { | |
84 | + that.setData({ is_no_more: 0 }); | |
85 | + } else { | |
86 | + that.data.curPage++; | |
76 | 87 | } |
77 | - | |
88 | + | |
78 | 89 | //加载完成 |
79 | 90 | if (data.data.pageData) { |
80 | - that.setData({load_complete:1}); | |
91 | + that.setData({ load_complete: 1 }); | |
81 | 92 | } |
82 | - if(that.data.recommend!=null){ | |
83 | - var ra=that.data.recommend.concat(data.data.pageData); | |
93 | + if (that.data.recommend != null) { | |
94 | + var ra = that.data.recommend.concat(data.data.pageData); | |
84 | 95 | that.setData({ recommend: ra }); |
85 | - }else{ | |
86 | - that.setData({recommend:data.data.pageData}); | |
96 | + } else { | |
97 | + that.setData({ recommend: data.data.pageData }); | |
87 | 98 | } |
88 | - } | |
89 | - }) | |
99 | + } | |
100 | + }) | |
90 | 101 | }, |
91 | - | |
102 | + | |
103 | + | |
92 | 104 | bind_bnerr_xc: function (e) { |
93 | 105 | var _errImg = e.target.dataset.errorimg; |
94 | 106 | var _errurl = e.target.dataset.url; |
... | ... | @@ -114,7 +126,7 @@ Component({ |
114 | 126 | var name="card"+plusCard[i].CorrPrice.toLowerCase(); |
115 | 127 | card_name_map.set(name,plusCard[i].CardName); |
116 | 128 | } |
117 | - | |
129 | + | |
118 | 130 | var ob={"card_list":plusCard,"name_map":card_name_map}; |
119 | 131 | func(ob); |
120 | 132 | }) | ... | ... |
components/goods_list/goods_list.wxss
... | ... | @@ -151,6 +151,6 @@ color: #b9b9b9; |
151 | 151 | } |
152 | 152 | |
153 | 153 | .line_th{ text-decoration: line-through} |
154 | -.card_bg {display: flex; width: 106rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | |
154 | +.card_bg {display: flex; width: 108rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | |
155 | 155 | background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} |
156 | 156 | .card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} |
157 | 157 | \ No newline at end of file | ... | ... |
components/nav_box_card/nav_box.wxss
... | ... | @@ -26,14 +26,16 @@ height: 50rpx; |
26 | 26 | color: #ffff; |
27 | 27 | font-size: 50rpx; |
28 | 28 | background: none; |
29 | +line-height: 78rpx; | |
30 | + | |
29 | 31 | |
30 | 32 | } |
31 | 33 | |
32 | 34 | .box_main .dian image{ |
33 | 35 | width: 60rpx; |
34 | 36 | height: 20rpx; |
35 | -margin: 0rpx 0 0 10rpx; | |
36 | -margin-bottom: 7rpx; | |
37 | + | |
38 | + | |
37 | 39 | |
38 | 40 | } |
39 | 41 | ... | ... |
pages/cart/cart/cart.js
... | ... | @@ -705,10 +705,14 @@ Page({ |
705 | 705 | if (g_arr[i].goods_id == val.goods_id) { |
706 | 706 | |
707 | 707 | //如果会员是等级会员,商品有等级价,且不是活动商品 |
708 | - if(card_field && val[card_field]>0 && val.prom_type==0 ){ | |
709 | - | |
708 | + if(card_field && val[card_field]>0 && (val.prom_type==0 || val.prom_type==3 || val.prom_type==4 || val.prom_type==5) ){ | |
709 | + if (g_arr[i].goods_price != val[card_field]){ | |
710 | + isok = 0; | |
711 | + gname = val.goods_name; | |
712 | + throw "商品价格已经变化"; | |
713 | + } | |
710 | 714 | }else{ |
711 | - if (g_arr[i].goods_price != val.shop_price && g_arr[i].goods_price != val.prom_price) { | |
715 | + if (g_arr[i].goods_price != val.shop_price && g_arr[i].goods_price != val.prom_price) { | |
712 | 716 | isok = 0; |
713 | 717 | gname = val.goods_name; |
714 | 718 | throw "商品价格已经变化"; | ... | ... |
pages/cart/cart2/cart2.js
pages/getphone/getphone.js
... | ... | @@ -15,9 +15,13 @@ Page({ |
15 | 15 | var th=this,app = getApp(); |
16 | 16 | var sessionKey = getApp().globalData.sessionKey; |
17 | 17 | var openid = getApp().globalData.openid; |
18 | + | |
19 | + if (openid == "" || openid == null) { | |
20 | + openid = getApp().globalData.userInfo.weapp_openid; | |
21 | + } | |
18 | 22 | |
19 | 23 | if(openid=="" || openid==null ){ |
20 | - getApp().globalData.user_id=null; | |
24 | + getApp().globalData.user_id=null; | |
21 | 25 | getApp().globalData.userInfo=null; |
22 | 26 | console.log("openid"); |
23 | 27 | wx.navigateTo({ url: '/pages/togoin/togoin', }) | ... | ... |
pages/goods/goodsInfo/g_filter.wxs
... | ... | @@ -8,9 +8,9 @@ var g_filters = { |
8 | 8 | |
9 | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
10 | 10 | get_card_price:function(goods,all_card,type){ |
11 | - var price1=parseInt(goods['cardprice1']); | |
12 | - var price2=parseInt(goods['cardprice2']); | |
13 | - var price3=parseInt(goods['cardprice3']); | |
11 | + var price1=parseFloat(goods['cardprice1']); | |
12 | + var price2=parseFloat(goods['cardprice2']); | |
13 | + var price3=parseFloat(goods['cardprice3']); | |
14 | 14 | if(!all_card){ |
15 | 15 | if(type==0) return 0; |
16 | 16 | return ""; |
... | ... | @@ -18,22 +18,51 @@ var g_filters = { |
18 | 18 | |
19 | 19 | var arr=[]; |
20 | 20 | var min_price= 0; |
21 | - var min_name=""; | |
21 | + var min_name=""; | |
22 | + | |
23 | + var min_price=null; | |
24 | + var min_name=null; | |
22 | 25 | //---设置对应的价格名字---- |
23 | 26 | for(var i=0;i<3;i++) { |
24 | - var vl=all_card[i]; | |
27 | + var vl=all_card[i]; | |
25 | 28 | if(vl['CorrPrice']=="Price1" && price1>0) |
26 | - arr.push({'price':price1, 'name':vl['CardName']}); | |
29 | + { | |
30 | + if(min_price==null) { | |
31 | + min_price=price1;min_name=vl['CardName']; | |
32 | + } | |
33 | + else if(price1<min_price) { | |
34 | + min_price=price1;min_name=vl['CardName']; | |
35 | + } | |
36 | + } | |
27 | 37 | if(vl['CorrPrice']=="Price2" && price2>0) |
28 | - arr.push({'price':price2, 'name':vl['CardName']}); | |
38 | + { | |
39 | + if(min_price==null) { | |
40 | + min_price=price2;min_name=vl['CardName']; | |
41 | + } | |
42 | + else if(price2<min_price) { | |
43 | + min_price=price2;min_name=vl['CardName']; | |
44 | + } | |
45 | + } | |
46 | + | |
29 | 47 | if(vl['CorrPrice']=="Price3" && price3>0) |
30 | - arr.push({'price':price3, 'name':vl['CardName']}); | |
48 | + { | |
49 | + if(min_price==null) { | |
50 | + min_price=price3;min_name=vl['CardName']; | |
51 | + } | |
52 | + else if(price3<min_price) { | |
53 | + min_price=price3;min_name=vl['CardName']; | |
54 | + } | |
55 | + } | |
56 | + | |
31 | 57 | } |
32 | - if(arr.length==0){ | |
58 | + if(min_price==null){ | |
33 | 59 | if(type==0) return 0; |
34 | 60 | return ""; |
35 | 61 | } |
62 | + | |
63 | + //if(type==0) return arr.length; | |
36 | 64 | //--进行排序,升序--- |
65 | + /*--- | |
37 | 66 | arr.sort(function(a,b){ |
38 | 67 | if (a.price < b.price) { |
39 | 68 | return -1; |
... | ... | @@ -42,12 +71,12 @@ var g_filters = { |
42 | 71 | } else { |
43 | 72 | return 1; |
44 | 73 | } |
45 | - }) | |
74 | + })--*/ | |
46 | 75 | //-- 获取最下价钱,和相应的卡的名称 -- |
47 | - min_price=arr[0].price; | |
48 | - min_name=arr[0].name; | |
49 | - if(type==0) return min_price; | |
50 | - if(min_name.length>5 ) min_name=min_name.substring(0, 5); | |
76 | + //min_price=min.price; | |
77 | + //min_name=min.name; | |
78 | + if(type==0) return min_price.toFixed(2); | |
79 | + if(min_name.length>4 ) min_name=min_name.substring(0, 4); | |
51 | 80 | return min_name; |
52 | 81 | }, |
53 | 82 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
... | ... | @@ -202,7 +202,6 @@ Page({ |
202 | 202 | canvasHidden: 1, |
203 | 203 | |
204 | 204 | //--推荐-- |
205 | - recommend_list: [], | |
206 | 205 | store_config: null, |
207 | 206 | is_show_pl: 0, //是否品类 |
208 | 207 | is_show_pp: 0, //是否品牌 |
... | ... | @@ -236,6 +235,9 @@ Page({ |
236 | 235 | |
237 | 236 | //------初始化加载---------- |
238 | 237 | onLoad: function(t) { |
238 | + | |
239 | + | |
240 | + | |
239 | 241 | wx.setNavigationBarTitle({ |
240 | 242 | title: "商品详情", |
241 | 243 | }) |
... | ... | @@ -294,34 +296,36 @@ Page({ |
294 | 296 | //---如果后台又开等级卡的开关--- |
295 | 297 | if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ |
296 | 298 | th.setData({rank_switch:true}); |
297 | - var user=getApp().globalData.userInfo; | |
298 | - var ti=setInterval(function(){ | |
299 | - if(!user) return false; | |
300 | - clearInterval(ti); | |
299 | + | |
301 | 300 | //---回调卡的列表--- |
302 | 301 | th.getPlusCardType(function(ob){ |
303 | - th.setData({card_list:ob.card_list}); | |
304 | - if(user.card_field ){ | |
305 | - var str = user['card_expiredate'].replace(/-/g, '/'); | |
306 | - var end = new Date(str); | |
307 | - end = Date.parse(end) / 1000; | |
308 | - var now = ut.gettimestamp(); | |
309 | - //--- 判断是等级会员,且在有效期范围内 --- | |
310 | - if(user.card_field && now<end){ | |
311 | - var card_name=ob.name_map.get(user.card_field); | |
312 | - if(card_name.length>5) card_name=card_name.substring(0,5); | |
313 | - | |
314 | - var is_near_date=0; | |
315 | - if(end-now<60*60*30*24) is_near_date=1; //如果小于30天 | |
316 | - th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list,is_near_date:is_near_date}); | |
317 | - } | |
318 | - } | |
302 | + th.setData({card_list:ob.card_list}); | |
303 | + var ti = setInterval(function () { | |
304 | + var user = getApp().globalData.userInfo; | |
305 | + if (!user) return false; | |
306 | + clearInterval(ti); | |
307 | + | |
308 | + | |
309 | + if(user.card_field ){ | |
310 | + var str = user['card_expiredate'].replace(/-/g, '/'); | |
311 | + var end = new Date(str); | |
312 | + end = Date.parse(end) / 1000; | |
313 | + var now = ut.gettimestamp(); | |
314 | + //--- 判断是等级会员,且在有效期范围内 --- | |
315 | + if(user.card_field && now<end){ | |
316 | + var card_name=ob.name_map.get(user.card_field); | |
317 | + if(card_name.length>5) card_name=card_name.substring(0,5); | |
318 | + | |
319 | + var is_near_date=0; | |
320 | + if(end-now<60*60*30*24) is_near_date=1; //如果小于30天 | |
321 | + th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list,is_near_date:is_near_date}); | |
322 | + } | |
323 | + } | |
324 | + }, 500) | |
319 | 325 | }) |
320 | - },500) | |
326 | + | |
321 | 327 | } |
322 | - | |
323 | - | |
324 | - | |
328 | + | |
325 | 329 | }); |
326 | 330 | |
327 | 331 | //获取用户设备信息,屏幕宽度 |
... | ... | @@ -496,12 +500,21 @@ Page({ |
496 | 500 | mapurl: mapurl, |
497 | 501 | }); |
498 | 502 | |
499 | - ee.requestRecommend(); | |
500 | 503 | |
501 | 504 | }, |
502 | 505 | |
503 | 506 | //---展示--- |
504 | 507 | onShow: function() { |
508 | + var goods_list = null,th = this; | |
509 | + var ui = setInterval(function () { | |
510 | + goods_list = th.selectComponent("#goods_list"); | |
511 | + if (goods_list) { | |
512 | + clearInterval(ui); | |
513 | + goods_list.init(); | |
514 | + return false | |
515 | + } | |
516 | + }, 300) | |
517 | + | |
505 | 518 | |
506 | 519 | this.data.is_timer = 1; |
507 | 520 | var ee = this, |
... | ... | @@ -569,7 +582,7 @@ Page({ |
569 | 582 | //获取门店 |
570 | 583 | ee.get_sto(); |
571 | 584 | //获取统一条形码,普通商品和优惠促销的商品 |
572 | - if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 3) | |
585 | + if (ee.data.data.prom_type == 0 || ee.data.data.prom_type == 3 || ee.data.data.prom_type == 5) | |
573 | 586 | ee.get_sku(o.stoid, t.data.data.sku, gid); |
574 | 587 | else { |
575 | 588 | var gg = "", |
... | ... | @@ -638,6 +651,9 @@ Page({ |
638 | 651 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); |
639 | 652 | |
640 | 653 | |
654 | + | |
655 | + | |
656 | + | |
641 | 657 | |
642 | 658 | }, |
643 | 659 | enterAddress: function() { |
... | ... | @@ -1555,13 +1571,16 @@ Page({ |
1555 | 1571 | if (this.data.activeCategoryId == 2){ |
1556 | 1572 | if(!this.data.comments_no_more) this.requestComments_new(); |
1557 | 1573 | } |
1574 | + | |
1575 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | |
1576 | + goods_list.get_list(); | |
1558 | 1577 | }, |
1559 | 1578 | |
1560 | 1579 | //--------检查是否活动,活动是否开始,或者是否结束------- |
1561 | 1580 | async check_prom(gid, prom_type, prom_id) { |
1562 | 1581 | var ee = this, |
1563 | 1582 | th = ee; |
1564 | - if (prom_type == 3 || prom_type == 0 || prom_type == 2 || prom_type == 4) { | |
1583 | + if (prom_type == 3 || prom_type == 0 || prom_type == 2 || prom_type == 4 || prom_type == 5) { | |
1565 | 1584 | this.setData({ |
1566 | 1585 | prom_type: 0, |
1567 | 1586 | isshow: 1, |
... | ... | @@ -2496,7 +2515,18 @@ Page({ |
2496 | 2515 | var cid = e.currentTarget.dataset.cid; |
2497 | 2516 | var index = e.currentTarget.dataset.ind; |
2498 | 2517 | var item = this.data.quan_list[index]; |
2499 | - | |
2518 | + | |
2519 | + | |
2520 | + //--先判断会员状态-- | |
2521 | + var user_info = getApp().globalData.userInfo; | |
2522 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
2523 | + wx.navigateTo({ | |
2524 | + url: '/pages/getphone/getphone', | |
2525 | + }) | |
2526 | + return false; | |
2527 | + } | |
2528 | + | |
2529 | + | |
2500 | 2530 | //如果券还在领取中,不能再点 |
2501 | 2531 | if (item.linging == 1) { |
2502 | 2532 | getApp().my_warnning('领取中..', 0, this); |
... | ... | @@ -2878,37 +2908,6 @@ Page({ |
2878 | 2908 | }, |
2879 | 2909 | |
2880 | 2910 | |
2881 | - //--加载更多商品-- | |
2882 | - requestRecommend: function() { | |
2883 | - var e = this, | |
2884 | - t = '/api/weshop/goods/page?page=1'; | |
2885 | - var th_recommend_list = e.data.recommend_list; | |
2886 | - getApp().request.get(t, { | |
2887 | - data: { | |
2888 | - is_mainshow: 1, | |
2889 | - isonsale: 1, | |
2890 | - is_recommend: 1, | |
2891 | - is_on_sale: 1, | |
2892 | - store_id: os.stoid, | |
2893 | - pageSize: 6 | |
2894 | - }, | |
2895 | - success: function(ee) { | |
2896 | - var recommend_list = ee.data.data.pageData; | |
2897 | - if (recommend_list && recommend_list.length > 0) { | |
2898 | - var dd = [...th_recommend_list, ...recommend_list]; | |
2899 | - e.setData({ | |
2900 | - recommend_list, | |
2901 | - dd | |
2902 | - }); | |
2903 | - e.data.currentPage++; | |
2904 | - } else { | |
2905 | - e.setData({ | |
2906 | - nomore: 1 | |
2907 | - }); | |
2908 | - } | |
2909 | - } | |
2910 | - }) | |
2911 | - }, | |
2912 | 2911 | |
2913 | 2912 | //--获取头像的本地缓存,回调写法-- |
2914 | 2913 | get_head_temp: function(tt, func) { | ... | ... |
pages/goods/goodsInfo/goodsInfo.json
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | "enablePullDownRefresh": false, |
4 | 4 | "usingComponents": { |
5 | 5 | "nav_box": "/components/nav_box/nav_box", |
6 | - "warn": "/components/long_warn/long_warn" | |
6 | + "warn": "/components/long_warn/long_warn", | |
7 | + "goods_recommend": "/components/goods_list/goods_list" | |
7 | 8 | } |
8 | 9 | } |
9 | 10 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -229,12 +229,15 @@ |
229 | 229 | <view class="goods-price rel"> |
230 | 230 | <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> |
231 | 231 | <view class="market-price" style="overflow: hidden"> |
232 | - <block wx:if="{{card_field}}"> | |
232 | + <block wx:if="{{card_field && data[card_field]>0}}"> | |
233 | 233 | <view class="flex ai-center grade-card-frame" style="margin-left:12rpx;"> |
234 | 234 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
235 | 235 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
236 | 236 | </view> |
237 | 237 | <text class="rel yuan">¥</text>{{filters.toFix(data[card_field],2)}} |
238 | + <view class='yj' style="top:35rpx"> | |
239 | + <text>原价:¥{{data.market_price}}</text> | |
240 | + </view> | |
238 | 241 | </block> |
239 | 242 | <block wx:else> |
240 | 243 | <text class="rel yuan">¥</text>{{ filters.toFix(data.shop_price,2)}} |
... | ... | @@ -255,7 +258,10 @@ |
255 | 258 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
256 | 259 | <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> |
257 | 260 | </view> |
258 | - <view class="fs32 xc-black3 ai_and"><text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}}</view> | |
261 | + <view class="fs32 xc-black3 ai_and carde_frame"> | |
262 | + <text class="fs26"> | |
263 | + ¥</text>{{g_filters.get_card_price(data,card_list,0)}} | |
264 | + </view> | |
259 | 265 | </view> |
260 | 266 | |
261 | 267 | |
... | ... | @@ -269,7 +275,7 @@ |
269 | 275 | <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> |
270 | 276 | </view> |
271 | 277 | <view class="card-effect"> |
272 | - <view class="fs24 xc-black3">成为黄钻卡会员立<text class="co-red">省{{data.market_price-g_filters.get_card_price(data,card_list,0)}}</text>元</view> | |
278 | + <view class="fs24 xc-black3">成为{{g_filters.get_card_price(data,card_list,1)}}立<text class="co-red">省{{data.market_price-g_filters.get_card_price(data,card_list,0)}}</text>元</view> | |
273 | 279 | <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> |
274 | 280 | </view> |
275 | 281 | </view> |
... | ... | @@ -281,7 +287,7 @@ |
281 | 287 | </view> |
282 | 288 | </view> |
283 | 289 | <!-- 立即续费的显示 --> |
284 | - <view wx:elif="{{is_near_date}}"> | |
290 | + <view wx:elif="{{is_near_date && data[card_field]>0}}"> | |
285 | 291 | <view class="beauty-makeup-frame flex ai-center"> |
286 | 292 | <view class="left flex ai-center"> |
287 | 293 | <view class="flex ai-center grade-card-frame card-frame advert-card"style="max-width:32%;width:auto" > |
... | ... | @@ -526,23 +532,7 @@ |
526 | 532 | </view> |
527 | 533 | |
528 | 534 | <!-- 显示商品 --> |
529 | - <view class="xc-goods "> | |
530 | - <view> | |
531 | - <view bindtap="go_goods" data-gid="{{item.goods_id}}" class="rel xc-goods-recommend {{index%2==0?'':'ml'}}" wx:for="{{recommend_list}}"> | |
532 | - <image class="xc-goods-imgs" src="{{iurl+item.original_img}}"></image> | |
533 | - <view class='xc-goods-bottom abs'> | |
534 | - <view class="flex monry-frame"> | |
535 | - <view class="flex"> | |
536 | - <view class="three-level-word money-color-val rmb-symbol">¥</view> | |
537 | - <view class="two-level-word money-color-val" style='margin-top:8rpx;'>{{item.shop_price}}</view> | |
538 | - </view> | |
539 | - <view class="word-lines xc-original-price"> 原价¥{{item.market_price}}</view> | |
540 | - </view> | |
541 | - <view class="xc-good-explain ellipsis-2">{{item.goods_name}}</view> | |
542 | - </view> | |
543 | - </view> | |
544 | - </view> | |
545 | - </view> | |
535 | + <goods_recommend id="goods_list"></goods_recommend> | |
546 | 536 | |
547 | 537 | </view> |
548 | 538 | |
... | ... | @@ -807,7 +797,7 @@ |
807 | 797 | <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> |
808 | 798 | <view class="spec-goods-price" wx:if="{{prom_price==null}}"> |
809 | 799 | <!-- 如果是等级会员,且有等级价 --> |
810 | - <block wx:if="card_field && sele_g[card_field]>0"> | |
800 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | |
811 | 801 | ¥ {{sele_g[card_field]}} |
812 | 802 | </block> |
813 | 803 | <block wx:else> |
... | ... | @@ -902,7 +892,7 @@ |
902 | 892 | <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> |
903 | 893 | <view class="spec-goods-price" wx:if="{{is_normal==1}}"> |
904 | 894 | <!-- 如果是等级会员,且有等级价 --> |
905 | - <block wx:if="card_field && sele_g[card_field]>0"> | |
895 | + <block wx:if="{{card_field && sele_g[card_field]>0}}"> | |
906 | 896 | ¥ {{sele_g[card_field]}} |
907 | 897 | </block> |
908 | 898 | <block wx:else> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
pages/goods/goodsList/g_filter.wxs
... | ... | @@ -8,44 +8,55 @@ var g_filters = { |
8 | 8 | |
9 | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
10 | 10 | get_card_price:function(goods,all_card,type){ |
11 | - var price1=parseInt(goods['cardprice1']); | |
12 | - var price2=parseInt(goods['cardprice2']); | |
13 | - var price3=parseInt(goods['cardprice3']); | |
14 | - if(!all_card){ | |
11 | + var price1=parseFloat(goods['cardprice1']); | |
12 | + var price2=parseFloat(goods['cardprice2']); | |
13 | + var price3=parseFloat(goods['cardprice3']); | |
14 | + | |
15 | + if(!all_card){ | |
15 | 16 | if(type==0) return 0; |
16 | 17 | return ""; |
17 | - } | |
18 | - | |
19 | - var arr=[]; | |
20 | - var min_price= 0; | |
21 | - var min_name=""; | |
18 | + } | |
19 | + | |
20 | + var min_price=null; | |
21 | + var min_name=null; | |
22 | 22 | //---设置对应的价格名字---- |
23 | 23 | for(var i=0;i<3;i++) { |
24 | - var vl=all_card[i]; | |
24 | + var vl=all_card[i]; | |
25 | 25 | if(vl['CorrPrice']=="Price1" && price1>0) |
26 | - arr.push({'price':price1, 'name':vl['CardName']}); | |
26 | + { | |
27 | + if(min_price==null) { | |
28 | + min_price=price1;min_name=vl['CardName']; | |
29 | + } | |
30 | + else if(price1<min_price) { | |
31 | + min_price=price1;min_name=vl['CardName']; | |
32 | + } | |
33 | + } | |
27 | 34 | if(vl['CorrPrice']=="Price2" && price2>0) |
28 | - arr.push({'price':price2, 'name':vl['CardName']}); | |
35 | + { | |
36 | + if(min_price==null) { | |
37 | + min_price=price2;min_name=vl['CardName']; | |
38 | + } | |
39 | + else if(price2<min_price) { | |
40 | + min_price=price2;min_name=vl['CardName']; | |
41 | + } | |
42 | + } | |
43 | + | |
29 | 44 | if(vl['CorrPrice']=="Price3" && price3>0) |
30 | - arr.push({'price':price3, 'name':vl['CardName']}); | |
45 | + { | |
46 | + if(min_price==null) { | |
47 | + min_price=price3;min_name=vl['CardName']; | |
48 | + } | |
49 | + else if(price3<min_price) { | |
50 | + min_price=price3;min_name=vl['CardName']; | |
51 | + } | |
52 | + } | |
53 | + | |
31 | 54 | } |
32 | - if(arr.length==0){ | |
55 | + if(min_price==null){ | |
33 | 56 | if(type==0) return 0; |
34 | 57 | return ""; |
35 | 58 | } |
36 | - //--进行排序,升序--- | |
37 | - arr.sort(function(a,b){ | |
38 | - if (a.price < b.price) { | |
39 | - return -1; | |
40 | - } else if (a.fee == b.fee) { | |
41 | - return 0; | |
42 | - } else { | |
43 | - return 1; | |
44 | - } | |
45 | - }) | |
46 | - //-- 获取最下价钱,和相应的卡的名称 -- | |
47 | - min_price=arr[0].price; | |
48 | - min_name=arr[0].name; | |
59 | + | |
49 | 60 | if(type==0) return min_price; |
50 | 61 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); |
51 | 62 | return min_name; | ... | ... |
pages/goods/goodsList/goodsList.wxml
... | ... | @@ -66,11 +66,11 @@ |
66 | 66 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
67 | 67 | <view class="flex ai-center"> |
68 | 68 | <view class="price">¥{{item.shop_price}}</view> |
69 | - <view class="word-line">¥{{item.market_price}}</view> | |
69 | + <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
70 | 70 | </view> |
71 | 71 | <view class="comment flex jc_sb"> |
72 | 72 | <view class="flex"> |
73 | - <view class="word-line xc-ash">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
73 | + <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
74 | 74 | <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
75 | 75 | {{g_filter.get_card_price(item,card_list,1)}} |
76 | 76 | </view> | ... | ... |
pages/goods/goodsList/goodsList.wxss
... | ... | @@ -92,6 +92,7 @@ |
92 | 92 | .price { |
93 | 93 | display: inline-block; |
94 | 94 | color: #f23030; |
95 | + line-height: 24rpx; | |
95 | 96 | /* padding-bottom: 20rpx; */ |
96 | 97 | } |
97 | 98 | |
... | ... | @@ -155,6 +156,8 @@ |
155 | 156 | width: 300rpx; |
156 | 157 | } |
157 | 158 | |
158 | -.card_bg {display: flex; width: 106rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | |
159 | -background: #333; color: #fff; justify-content: center; margin-left: 4rpx;} | |
160 | -.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} | |
159 | +.card_bg {display: flex; width: 110rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | |
160 | +background: #333; color: #fff; justify-content: center; margin-left: 3rpx; margin-top:7rpx; line-height: 28rpx;} | |
161 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx; vertical-align: middle} | |
162 | +.mk_price{margin-left: 10rpx; font-size: 25rpx;} | |
163 | +.item-cont{ line-height: 38rpx} | |
161 | 164 | \ No newline at end of file | ... | ... |
pages/goods/search/g_filter.wxs
... | ... | @@ -8,49 +8,61 @@ var g_filters = { |
8 | 8 | |
9 | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
10 | 10 | get_card_price:function(goods,all_card,type){ |
11 | - var price1=parseInt(goods['cardprice1']); | |
12 | - var price2=parseInt(goods['cardprice2']); | |
13 | - var price3=parseInt(goods['cardprice3']); | |
14 | - if(!all_card){ | |
11 | + var price1 = parseFloat(goods['cardprice1']); | |
12 | + var price2 = parseFloat(goods['cardprice2']); | |
13 | + var price3 = parseFloat(goods['cardprice3']); | |
14 | + | |
15 | + if(!all_card){ | |
15 | 16 | if(type==0) return 0; |
16 | 17 | return ""; |
17 | - } | |
18 | - | |
19 | - var arr=[]; | |
20 | - var min_price= 0; | |
21 | - var min_name=""; | |
18 | + } | |
19 | + | |
20 | + var min_price=null; | |
21 | + var min_name=null; | |
22 | 22 | //---设置对应的价格名字---- |
23 | 23 | for(var i=0;i<3;i++) { |
24 | - var vl=all_card[i]; | |
24 | + var vl=all_card[i]; | |
25 | 25 | if(vl['CorrPrice']=="Price1" && price1>0) |
26 | - arr.push({'price':price1, 'name':vl['CardName']}); | |
26 | + { | |
27 | + if(min_price==null) { | |
28 | + min_price=price1;min_name=vl['CardName']; | |
29 | + } | |
30 | + else if(price1<min_price) { | |
31 | + min_price=price1;min_name=vl['CardName']; | |
32 | + } | |
33 | + } | |
27 | 34 | if(vl['CorrPrice']=="Price2" && price2>0) |
28 | - arr.push({'price':price2, 'name':vl['CardName']}); | |
35 | + { | |
36 | + if(min_price==null) { | |
37 | + min_price=price2;min_name=vl['CardName']; | |
38 | + } | |
39 | + else if(price2<min_price) { | |
40 | + min_price=price2;min_name=vl['CardName']; | |
41 | + } | |
42 | + } | |
43 | + | |
29 | 44 | if(vl['CorrPrice']=="Price3" && price3>0) |
30 | - arr.push({'price':price3, 'name':vl['CardName']}); | |
45 | + { | |
46 | + if(min_price==null) { | |
47 | + min_price=price3;min_name=vl['CardName']; | |
48 | + } | |
49 | + else if(price3<min_price) { | |
50 | + min_price=price3;min_name=vl['CardName']; | |
51 | + } | |
52 | + } | |
53 | + | |
31 | 54 | } |
32 | - if(arr.length==0){ | |
55 | + if(min_price==null){ | |
33 | 56 | if(type==0) return 0; |
34 | 57 | return ""; |
35 | 58 | } |
36 | - //--进行排序,升序--- | |
37 | - arr.sort(function(a,b){ | |
38 | - if (a.price < b.price) { | |
39 | - return -1; | |
40 | - } else if (a.fee == b.fee) { | |
41 | - return 0; | |
42 | - } else { | |
43 | - return 1; | |
44 | - } | |
45 | - }) | |
46 | - //-- 获取最下价钱,和相应的卡的名称 -- | |
47 | - min_price=arr[0].price; | |
48 | - min_name=arr[0].name; | |
59 | + | |
49 | 60 | if(type==0) return min_price; |
50 | 61 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); |
51 | 62 | return min_name; |
52 | 63 | }, |
53 | 64 | } |
65 | + | |
54 | 66 | module.exports = { |
55 | 67 | is_has_rank:g_filters.is_has_rank, |
56 | 68 | get_card_price:g_filters.get_card_price, | ... | ... |
pages/goods/search/search.wxml
... | ... | @@ -62,11 +62,11 @@ |
62 | 62 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
63 | 63 | <view class="flex ai-center"> |
64 | 64 | <view class="price">¥{{item.shop_price}}</view> |
65 | - <view class="word-line">¥{{item.market_price}}</view> | |
65 | + <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view> | |
66 | 66 | </view> |
67 | 67 | <view class="comment flex jc_sb"> |
68 | 68 | <view class="flex"> |
69 | - <view class="word-line xc-ash">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
69 | + <view class="">¥{{g_filter.get_card_price(item,card_list,0)}}</view> | |
70 | 70 | <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
71 | 71 | {{g_filter.get_card_price(item,card_list,1)}} |
72 | 72 | </view> | ... | ... |
pages/goods/search/search.wxss
... | ... | @@ -92,6 +92,7 @@ |
92 | 92 | .price { |
93 | 93 | display: inline-block; |
94 | 94 | color: #f23030; |
95 | + line-height: 24rpx; | |
95 | 96 | /* padding-bottom: 20rpx; */ |
96 | 97 | } |
97 | 98 | |
... | ... | @@ -226,6 +227,8 @@ |
226 | 227 | margin-left: 15rpx; |
227 | 228 | } |
228 | 229 | |
229 | -.card_bg {display: flex; width: 106rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | |
230 | -background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} | |
231 | -.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} | |
230 | +.card_bg {display: flex; width: 110rpx;height: 28rpx; align-items: center; border-radius: 26rpx; font-size: 19rpx; | |
231 | +background: #333; color: #fff; justify-content: center; margin-left: 3rpx; margin-top:7rpx; line-height: 28rpx;} | |
232 | +.card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx; vertical-align: middle} | |
233 | +.mk_price{margin-left: 10rpx; font-size: 25rpx;} | |
234 | +.item-cont{ line-height: 38rpx} | ... | ... |
pages/index/index/index.js
pages/user/Change_phone/Change_phone.js
... | ... | @@ -12,23 +12,37 @@ Page({ |
12 | 12 | data: { |
13 | 13 | iurl: r.imghost, |
14 | 14 | inputxphone: 0, |
15 | - mobile: 17359580658, //旧手机号码 | |
15 | + mobile: null, //旧手机号码 | |
16 | 16 | currentTime: "", //验证码发送倒计时 |
17 | - getvcode: "获取验证码", | |
18 | - wxopenid: "2", | |
17 | + getvcode: "获取验证码", //显示文字 | |
18 | + time_len: 0, //重新获取时长 | |
19 | + wxopenid: null, | |
19 | 20 | isver: 0, //是否有发送验证码 |
20 | 21 | code: "", //验证码 |
21 | - url: "", //确认更换手机号码跳转路径 | |
22 | 22 | change_phone: "", //新手机号码 |
23 | + send: 1, //发送类型 | |
23 | 24 | }, |
24 | 25 | /** |
25 | 26 | * 生命周期函数--监听页面加载 |
26 | 27 | */ |
27 | 28 | onLoad: function(options) { |
28 | - this.setData({ | |
29 | - // mobile: options.mobile, | |
30 | - //wxOpneId: options.openid | |
29 | + var th = this; | |
30 | + var pages = getCurrentPages(); | |
31 | + var prevPage = pages[pages.length - 2]; //上一个页面 | |
32 | + //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 | |
33 | + prevPage.setData({ | |
34 | + is_zy: 1 | |
35 | + }) | |
36 | + getApp().getConfig2(function(ee) { | |
37 | + var sms_conf = ee.sms_send_type; | |
38 | + sms_conf = JSON.parse(sms_conf); | |
39 | + th.setData({ | |
40 | + mobile: getApp().globalData.userInfo.mobile, | |
41 | + wxopenid: getApp().globalData.userInfo.weapp_openid, | |
42 | + time_len: sms_conf.time_out | |
43 | + }) | |
31 | 44 | }) |
45 | + | |
32 | 46 | }, |
33 | 47 | //获取手机验证码 |
34 | 48 | Ver_phone: function() { |
... | ... | @@ -37,7 +51,7 @@ Page({ |
37 | 51 | var wxopenid = th.data.wxopenid; |
38 | 52 | var change_phone = th.data.change_phone; |
39 | 53 | var isver = th.data.isver; |
40 | - console.log("iiiiiiiiiiiiii" + change_phone + mobile); | |
54 | + var send = th.data.send; | |
41 | 55 | var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; |
42 | 56 | if (mobile.length < 11) { |
43 | 57 | getApp().my_warnning("请输入11位的手机号码", 0, th); |
... | ... | @@ -62,7 +76,7 @@ Page({ |
62 | 76 | getApp().request.post("/api/weshop/smslog/sendsms", { |
63 | 77 | data: { |
64 | 78 | store_id: r.stoid, |
65 | - scene: 1, //发送类型(1短信 2语音) | |
79 | + scene: send, //发送类型(1短信 2语音) | |
66 | 80 | mobile: mobile, |
67 | 81 | wxopenid: wxopenid |
68 | 82 | }, |
... | ... | @@ -70,14 +84,15 @@ Page({ |
70 | 84 | if (res.data.code == 0) { |
71 | 85 | th.setData({ |
72 | 86 | isver: 0, |
73 | - getvcode: 60, | |
87 | + getvcode: th.data.time_len, | |
74 | 88 | currentTime: setInterval(th.gettime, 1000), |
89 | + send: 2 | |
75 | 90 | }) |
76 | 91 | } else { |
77 | 92 | getApp().my_warnning(res.data.msg, 0, th); |
78 | 93 | th.setData({ |
79 | 94 | isver: 0, |
80 | - getvcode: "重新获取" | |
95 | + getvcode: "重新获取", | |
81 | 96 | }) |
82 | 97 | return false; |
83 | 98 | } |
... | ... | @@ -103,18 +118,23 @@ Page({ |
103 | 118 | var th = this; |
104 | 119 | var code = th.data.code; |
105 | 120 | var mobile = th.data.mobile; |
106 | - if (th.ver_code() == false) return false; | |
121 | + var change_phone = th.data.change_phone; | |
122 | + if (change_phone.length > 1) { | |
123 | + mobile = change_phone | |
124 | + } | |
107 | 125 | getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { |
108 | 126 | success: function(res) { |
109 | 127 | if (res.data.code == 0) { |
128 | + var url = "/pages/user/userinfo/userinfo?change_phone" + change_phone | |
129 | + getApp().globalData.userInfo.mobile = mobile; | |
110 | 130 | getApp().my_warnning("更换成功", 0, th); |
111 | - // th.setData({ | |
112 | - // url: "/pages/user/userinfo/userinfo?change_phone" + change_phone | |
113 | - // }) | |
131 | + getApp().goto(url); | |
132 | + | |
114 | 133 | } else { |
115 | - getApp().my_warnning("更换失败", 0, th); | |
134 | + getApp().my_warnning(res.data.msg, 0, th); | |
116 | 135 | return false; |
117 | 136 | } |
137 | + | |
118 | 138 | } |
119 | 139 | }) |
120 | 140 | |
... | ... | @@ -130,10 +150,10 @@ Page({ |
130 | 150 | if (code.length < 3 && code == "") { |
131 | 151 | getApp().my_warnning("请输入正确的验证码", 0, th); |
132 | 152 | return false; |
133 | - } else if (getvcode.length<3){ | |
153 | + } else if (getvcode.length < 3) { | |
134 | 154 | getApp().my_warnning("验证超时", 0, th); |
135 | 155 | return false; |
136 | - }else { | |
156 | + } else { | |
137 | 157 | getApp().request.put("/api/weshop/users/updateMobileFirst/" + r.stoid + '/' + o.user_id + '/' + code, { |
138 | 158 | success: function(res) { |
139 | 159 | if (res.data.code == 0) { | ... | ... |
pages/user/Change_phone/Change_phone.wxml
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <view class="inphone">{{mobile}}</view> |
13 | 13 | </block> |
14 | 14 | <block wx:else> |
15 | - <input bindblur="getphoneValue" class="inphone" placeholder="输入新手机号" type="number" maxlength="11" value="{{change_phone}}"/> | |
15 | + <input bindblur="getphoneValue" class="inphone" placeholder="输入新手机号" type="number" maxlength="11" value="{{change_phone}}" /> | |
16 | 16 | </block> |
17 | 17 | </view> |
18 | 18 | |
... | ... | @@ -51,10 +51,9 @@ |
51 | 51 | <block wx:else> |
52 | 52 | <navigator url="{{url}}" class="flex-center lower" bindtap="change_phone"> |
53 | 53 | <view>确定更换</view> |
54 | - </navigator> | |
54 | + </navigator> | |
55 | 55 | </block> |
56 | 56 | </view> |
57 | 57 | |
58 | - | |
59 | 58 | </view> |
60 | 59 | <warn id="warn"></warn> |
61 | 60 | \ No newline at end of file | ... | ... |
pages/user/address_list/address_list.js
... | ... | @@ -15,7 +15,12 @@ Page({ |
15 | 15 | is_address_read:0 |
16 | 16 | }, |
17 | 17 | onLoad: function (e) { |
18 | - | |
18 | + var pages = getCurrentPages(); | |
19 | + var prevPage = pages[pages.length - 2]; //上一个页面 | |
20 | + //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 | |
21 | + prevPage.setData({ | |
22 | + is_zy: 1 | |
23 | + }) | |
19 | 24 | //清空is_pick_up |
20 | 25 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { |
21 | 26 | data: {user_id: getApp().globalData.user_id, is_pickup: 0}, | ... | ... |
pages/user/address_list/address_list.wxml
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | <view class="topbcolor"></view> |
22 | 22 | <view class="nothing" wx:if="{{is_address_read && addresses.length<=0}}"> |
23 | 23 | <view class="image flex-level"> |
24 | - <image src="../../../images/nothingaddress.png"></image> | |
24 | + <image src="{{iurl}}/miniapp/images/nothingaddress.png"></image> | |
25 | 25 | </view> |
26 | 26 | |
27 | 27 | <view class="nothingaddress flex-level"> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | |
64 | 64 | <!-- 编辑地址图片 --> |
65 | 65 | <view class="edit" bindtap="editAddress" data-id="{{item.address_id}}"> |
66 | - <image src="../../../images/dpr.png"></image> | |
66 | + <image src="{{iurl}}/miniapp/images/dpr.png"></image> | |
67 | 67 | </view> |
68 | 68 | </view> |
69 | 69 | ... | ... |
pages/user/cardinfo/cardinfo.js
... | ... | @@ -53,7 +53,7 @@ Page({ |
53 | 53 | */ |
54 | 54 | onLoad: function (options) { |
55 | 55 | var that = this,ee=this; |
56 | - | |
56 | + var th=this; | |
57 | 57 | //-----------等级卡说明------------------- |
58 | 58 | getApp().request.promiseGet("/api/weshop/storeconfig/get/" + os.stoid, { |
59 | 59 | }).then(res => { |
... | ... | @@ -106,8 +106,7 @@ Page({ |
106 | 106 | }) |
107 | 107 | } |
108 | 108 | }) |
109 | - var goods_list = this.selectComponent("#goods_list"); //组件的id | |
110 | - goods_list.get_list(); | |
109 | + | |
111 | 110 | |
112 | 111 | |
113 | 112 | }, |
... | ... | @@ -307,7 +306,7 @@ Page({ |
307 | 306 | ///二微码 |
308 | 307 | |
309 | 308 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
310 | - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/user/index/index"; | |
309 | + os.stoid + "?sceneValue=" + scene + "&pageValue=pages/user/plus/plus"; | |
311 | 310 | wx.getImageInfo({ |
312 | 311 | src: path3, |
313 | 312 | success: function (res) { |
... | ... | @@ -635,6 +634,9 @@ Page({ |
635 | 634 | //同步初始化 |
636 | 635 | this.init(); |
637 | 636 | |
637 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | |
638 | + goods_list.init(); | |
639 | + goods_list.get_list(); | |
638 | 640 | |
639 | 641 | }, |
640 | 642 | ... | ... |
pages/user/cardinfo/cardinfo.wxss
pages/user/collect_list/collect_list.js
pages/user/index/index.js
... | ... | @@ -38,8 +38,7 @@ Page({ |
38 | 38 | * 生命周期函数--监听页面加载 |
39 | 39 | */ |
40 | 40 | onLoad: function (options) { |
41 | - var goods_list = this.selectComponent("#goods_recommend"); //组件的id | |
42 | - goods_list.get_list(); | |
41 | + | |
43 | 42 | }, |
44 | 43 | /** |
45 | 44 | * 生命周期函数--监听页面显示 |
... | ... | @@ -217,6 +216,10 @@ Page({ |
217 | 216 | } |
218 | 217 | }); |
219 | 218 | |
219 | + var goods_list = this.selectComponent("#goods_recommend"); //组件的id | |
220 | + goods_list.init(); | |
221 | + goods_list.get_list(); | |
222 | + | |
220 | 223 | }, |
221 | 224 | |
222 | 225 | //判断会员是后有改服务项目 |
... | ... | @@ -252,8 +255,9 @@ Page({ |
252 | 255 | */ |
253 | 256 | onReachBottom: function () { |
254 | 257 | //!this.nomore && this.requestRecommend(); |
255 | - var goods_list = this.selectComponent("#goods_recommend"); //组件的id | |
256 | - goods_list.get_list(); | |
258 | + var goods_list = this.selectComponent("#goods_recommend"); //组件的id | |
259 | + goods_list.init(); | |
260 | + setTimeOut(function () { goods_list.get_list(); }, 300) | |
257 | 261 | }, |
258 | 262 | |
259 | 263 | /** | ... | ... |
pages/user/index/index.json
pages/user/plus/plus.js
... | ... | @@ -36,7 +36,7 @@ Page({ |
36 | 36 | is_fengxiang: 0, //是不是分享过来的 |
37 | 37 | def_recommon: null, //分享人的手机号 |
38 | 38 | def_serviceman: null, //分享人的营业员 |
39 | - fir_leader:0, | |
39 | + fir_leader:0, //分享人的ID | |
40 | 40 | |
41 | 41 | }, |
42 | 42 | swiperChange: function (e) { |
... | ... | @@ -49,8 +49,8 @@ Page({ |
49 | 49 | * 生命周期函数--监听页面加载 |
50 | 50 | */ |
51 | 51 | onLoad: function (options) { |
52 | - var that = this; | |
53 | - var store_id=getApp().globalData.setting.stoid; | |
52 | + var that = this,th=that; | |
53 | + var store_id=getApp().globalData.setting.stoid; | |
54 | 54 | //获取用户设备信息,屏幕宽度 |
55 | 55 | wx.getSystemInfo({ |
56 | 56 | success: res => { |
... | ... | @@ -58,9 +58,43 @@ Page({ |
58 | 58 | } |
59 | 59 | }) |
60 | 60 | var fir_leader = options.scene; |
61 | - that.setData({fir_leader:fir_leader}) | |
61 | + that.setData({fir_leader:fir_leader}) | |
62 | + //--先判断会员状态-- | |
63 | + var user_info = getApp().globalData.userInfo; | |
64 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
65 | + wx.navigateTo({ url: '/pages/getphone/getphone?first_leader=' + fir_leader, }) | |
66 | + return false; | |
67 | + } | |
68 | + //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------ | |
69 | + getApp().request.get("/api/weshop/storeconfig/get/" + store_id, { | |
70 | + success: function (res) { | |
71 | + var is_cardrule = res.data.data.cardrules; | |
72 | + var switch_list= res.data.data.switch_list; | |
73 | + var swi_arr=JSON.parse(switch_list); | |
74 | + | |
75 | + w.wxParse("content", "html", is_cardrule, that, 6); | |
76 | + that.setData({ | |
77 | + is_card_rule: is_cardrule, | |
78 | + isyaoqingma:parseInt(swi_arr.isyaoqingma), | |
79 | + is_salesman:parseInt(swi_arr.is_staffno) | |
80 | + }); | |
81 | + } | |
82 | + }); | |
83 | + }, | |
84 | + | |
85 | + /** | |
86 | + * 生命周期函数--监听页面显示 | |
87 | + */ | |
88 | + onShow: function () { | |
89 | + var user_info = getApp().globalData.userInfo; | |
90 | + if(!user_info) return false; | |
91 | + | |
92 | + var th=this,that=th,app_d=getApp().globalData; | |
93 | + var store_id=os.stoid; | |
94 | + var fir_leader=this.data.fir_leader; | |
95 | + | |
62 | 96 | if (fir_leader != null && fir_leader != undefined && fir_leader != "") { |
63 | - var r_url="/api/weshop/plus/vip/mem/list?storeId=" + store_id + "&userId=" + fir_leader | |
97 | + var r_url = "/api/weshop/plus/vip/mem/list?storeId=" + store_id + "&userId=" + fir_leader | |
64 | 98 | getApp().request.get(r_url, { |
65 | 99 | success: function (res) { |
66 | 100 | var is_ok = 1; |
... | ... | @@ -92,40 +126,16 @@ Page({ |
92 | 126 | that.back_user(); |
93 | 127 | } |
94 | 128 | if (is_ok == 1) { |
95 | - that.setData({def_recommon: user_information.MobileTel, def_serviceman: user_information.StaffNo,is_fengxiang:1}) | |
96 | - //--先判断会员状态-- | |
97 | - var user_info=getApp().globalData.userInfo; | |
98 | - if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){ | |
99 | - wx.navigateTo({ url: '/pages/getphone/getphone?first_leader='+fir_leader, }) | |
100 | - return false; | |
101 | - } | |
129 | + //--保存或者更新会员信息-- | |
130 | + that.setData({ def_recommon: user_information.MobileTel, def_serviceman: user_information.StaffNo, is_fengxiang: 1 }) | |
131 | + th.save_th_plus_user(); | |
102 | 132 | } |
103 | 133 | } |
104 | 134 | }); |
135 | + } else { | |
136 | + th.get_user_plus(); | |
105 | 137 | } |
106 | 138 | |
107 | - //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------ | |
108 | - getApp().request.get("/api/weshop/storeconfig/get/" + store_id, { | |
109 | - success: function (res) { | |
110 | - var is_cardrule = res.data.data.cardrules; | |
111 | - var switch_list= res.data.data.switch_list; | |
112 | - var swi_arr=JSON.parse(switch_list); | |
113 | - | |
114 | - w.wxParse("content", "html", is_cardrule, that, 6); | |
115 | - that.setData({ | |
116 | - is_card_rule: is_cardrule, | |
117 | - isyaoqingma:parseInt(swi_arr.isyaoqingma), | |
118 | - is_salesman:parseInt(swi_arr.is_staffno) | |
119 | - }); | |
120 | - } | |
121 | - }); | |
122 | - }, | |
123 | - | |
124 | - /** | |
125 | - * 生命周期函数--监听页面显示 | |
126 | - */ | |
127 | - onShow: function () { | |
128 | - var th=this,app_d=getApp().globalData; | |
129 | 139 | getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + app_d.user_id, { |
130 | 140 | success: function (e) { |
131 | 141 | var userInfo = e.data.data; |
... | ... | @@ -136,7 +146,7 @@ Page({ |
136 | 146 | }, |
137 | 147 | }); |
138 | 148 | |
139 | - this.getPlusCardType(); | |
149 | + this.getPlusCardType(); | |
140 | 150 | }, |
141 | 151 | |
142 | 152 | /** |
... | ... | @@ -190,6 +200,7 @@ Page({ |
190 | 200 | is_plusCard: plusCard, is_show: 1 |
191 | 201 | }) |
192 | 202 | var goods_list = th.selectComponent("#goods_list"); //组件的id |
203 | + goods_list.init(); | |
193 | 204 | goods_list.get_list(); |
194 | 205 | |
195 | 206 | }) |
... | ... | @@ -301,6 +312,78 @@ Page({ |
301 | 312 | var ob={}; |
302 | 313 | ob[name]=value |
303 | 314 | this.setData(ob); |
304 | - } | |
315 | + }, | |
316 | + | |
317 | + get_user_plus:async function(){ | |
318 | + var user_id=getApp().globalData.user_id; | |
319 | + var fuser=null; | |
320 | + var user_information =null; | |
321 | + var store_id = os.stoid; | |
322 | + var that=this; | |
323 | + //--获取登记卡邀请信息-- | |
324 | + await getApp().request.promiseGet("/api/weshop/usersPlus/get/" + os.stoid + "/" + user_id,{1:1}).then(res=>{ | |
325 | + if (res.data.code==0){ | |
326 | + fuser=res.data.data; | |
327 | + } | |
328 | + }) | |
329 | + if (!fuser) return false; | |
330 | + var r_url = "/api/weshop/plus/vip/mem/list?storeId=" + store_id + "&userId=" + fuser.plus_user_id; | |
331 | + //--获取等级卡信息-- | |
332 | + await getApp().request.promiseGet(r_url,{1:1}).then(res=>{ | |
333 | + if (res.data.code == 0) { | |
334 | + user_information = res.data.data[0]; | |
335 | + } | |
336 | + }) | |
337 | + if (user_information){ | |
338 | + var now = ut.gettimestamp(); | |
339 | + var is_ok = 1; | |
340 | + if (user_information['ExpiryDate']) { | |
341 | + var str = user_information['ExpiryDate'].replace(/-/g, '/'); | |
342 | + var end = new Date(str); | |
343 | + end = Date.parse(end) / 1000; | |
344 | + if (end < now) { is_ok = 0;} | |
345 | + } else { | |
346 | + is_ok = 0; | |
347 | + } | |
305 | 348 | |
349 | + if (is_ok == 1) { | |
350 | + var fir_leader=fuser.plus_user_id | |
351 | + that.setData({ def_recommon: user_information.MobileTel, def_serviceman: user_information.StaffNo, is_fengxiang: 1,fir_leader:fir_leader }) | |
352 | + //--先判断会员状态-- | |
353 | + var user_info = getApp().globalData.userInfo; | |
354 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
355 | + wx.navigateTo({ url: '/pages/getphone/getphone?first_leader=' + fir_leader, }) | |
356 | + return false; | |
357 | + } | |
358 | + } | |
359 | + } | |
360 | + }, | |
361 | + | |
362 | + save_th_plus_user:async function(){ | |
363 | + var f_user_id=this.data.fir_leader; | |
364 | + if (f_user_id){ | |
365 | + var user_id = getApp().globalData.user_id; | |
366 | + var user_plus = null; | |
367 | + var now=ut.gettimestamp(); | |
368 | + //--获取登记卡邀请信息-- | |
369 | + await getApp().request.promiseGet("/api/weshop/usersPlus/get/" + os.stoid + "/" + user_id, { 1: 1 }).then(res => { | |
370 | + if (res.data.code == 0) { | |
371 | + user_plus = res.data.data; | |
372 | + } | |
373 | + }) | |
374 | + | |
375 | + //--如果有值,要更新-- | |
376 | + if (!user_plus){ | |
377 | + getApp().request.post("/api/weshop/usersPlus/save", { | |
378 | + data: { store_id: os.stoid, user_id: user_id, plus_user_id: f_user_id, addtime: now }, | |
379 | + success: function (res) { } | |
380 | + }) | |
381 | + }else{ | |
382 | + getApp().request.put("/api/weshop/usersPlus/update",{ | |
383 | + data: { store_id: os.stoid, user_id: user_id, plus_user_id: f_user_id, edittime: now}, | |
384 | + success:function(res){ } | |
385 | + }) | |
386 | + } | |
387 | + } | |
388 | + } | |
306 | 389 | }) |
307 | 390 | \ No newline at end of file | ... | ... |
pages/user/plus/plus.wxml
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | <view class="flex-space-between Membership_go"> |
19 | 19 | <view> |
20 | 20 | <view class="fs36">{{item.CardName}}</view> |
21 | - <view class="fs24 Membership_remarks">开通会员年卡仅{{item.CardFee}}元</view> | |
21 | + <view class="fs24 Membership_remarks">开通会员卡仅{{item.CardFee}}元</view> | |
22 | 22 | </view> |
23 | 23 | <view class="Opening fs28 xc-black" data-ind="{{index}}" style="background:{{item.CardColor}}" bindtap="Opening">立即购买 |
24 | 24 | </view> | ... | ... |
pages/user/userinfo/userinfo.js
... | ... | @@ -2,7 +2,7 @@ function e(e, a, r) { |
2 | 2 | return a in e ? Object.defineProperty(e, a, { |
3 | 3 | value: r, |
4 | 4 | enumerable: !0, |
5 | - configurable: !0, | |
5 | + configurable: !0, | |
6 | 6 | writable: !0 |
7 | 7 | }) : e[a] = r, e; |
8 | 8 | } |
... | ... | @@ -58,7 +58,8 @@ Page({ |
58 | 58 | gradename:"",//会员权益的卡 |
59 | 59 | isBool:"", |
60 | 60 | sto_sele_id:"",//所属门店id |
61 | - is_zy:0, | |
61 | + is_zy:0, | |
62 | + | |
62 | 63 | }, |
63 | 64 | //是否启动密码消费 |
64 | 65 | isstcsp:function(){ |
... | ... | @@ -504,7 +505,7 @@ Page({ |
504 | 505 | }, |
505 | 506 | //------初始化加载---------- |
506 | 507 | onLoad: function(t) { |
507 | - | |
508 | + console.log("oNLOAD", "你好"); | |
508 | 509 | var user=getApp().globalData.userInfo; |
509 | 510 | if(user.card_field!=''&& user.card_field!=null && user.card_field!=undefined){ |
510 | 511 | var now=ut.gettimestamp(); |
... | ... | @@ -568,14 +569,15 @@ Page({ |
568 | 569 | }, |
569 | 570 | |
570 | 571 | onShow: function() { |
572 | + console.log(this.data.is_zy ,"是什么东西"); | |
571 | 573 | if(this.data.is_zy) return false; |
572 | 574 | this.wait_for_store_config(); |
575 | + console.log(this.data.is_zy, "sssss是什么东西"); | |
573 | 576 | var e = this; |
574 | 577 | var req = t; |
575 | 578 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { |
576 | 579 | success: function (src) { |
577 | 580 | var a=src.data.data; |
578 | - console.log(a,"剩什么llllll",a.data); | |
579 | 581 | var time = util.formatTime(a.reg_time,"'Y/M/D"); |
580 | 582 | var birthday = util.formatTime(a.birthday, "'Y/M/D"); |
581 | 583 | a.reg_time = time; |
... | ... | @@ -785,7 +787,11 @@ Page({ |
785 | 787 | } |
786 | 788 | }) |
787 | 789 | } , |
788 | - | |
790 | + //选择地址 | |
791 | + goto_address:function(){ | |
792 | + // this.setData({ is_zy: 1 }); | |
793 | + }, | |
794 | + //更换手机 | |
789 | 795 | go_phone:function(e){ |
790 | 796 | var url=e.currentTarget.dataset.url; |
791 | 797 | this.setData({is_zy:1}); | ... | ... |
pages/user/userinfo/userinfo.wxml
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | |
18 | 18 | <view class="flex-center fs22 vip"> |
19 | 19 | <block wx:if="{{isBool&&gradename}}"> |
20 | - <navigator url=""> | |
20 | + <navigator url="/pages/user/userqy/userqy"> | |
21 | 21 | <view class="flex-center AncrownMax"> |
22 | 22 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> |
23 | 23 | <view>{{gradename}}</view> |
... | ... | @@ -159,7 +159,7 @@ |
159 | 159 | <input class="user-txt-right" bindblur="IdentityIDCard" value="" type="idcard" maxlength="18" placeholder="*身份证" /> |
160 | 160 | </block> --> |
161 | 161 | </view> |
162 | - <view data-url="/pages/user/Change_phone/Change_phone?mobile={{user.mobile}}" bindtap="go_phone" class="user-name flex-vertical-between" data-type="mobile"> | |
162 | + <view data-url="/pages/user/Change_phone/Change_phone" bindtap="go_phone" class="user-name flex-vertical-between" data-type="mobile"> | |
163 | 163 | <view class="user-name-txt">更换手机</view> |
164 | 164 | <view class="flex-center user-txt-right"> |
165 | 165 | <view class="flex">{{phone}}</view> |
... | ... | @@ -187,7 +187,7 @@ |
187 | 187 | </view> |
188 | 188 | </view> |
189 | 189 | </view> |
190 | - <navigator class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> | |
190 | + <navigator bindtap="goto-address" class="user-name mt flex-vertical-between" url="/pages/user/address_list/address_list"> | |
191 | 191 | <view class="user-name-txt">收货地址</view> |
192 | 192 | <view class="flex-center user-txt-right"> |
193 | 193 | <!-- <view class="flex">{{user.address_id}}</view> --> |
... | ... | @@ -201,11 +201,11 @@ |
201 | 201 | </view> |
202 | 202 | </view> |
203 | 203 | <!-- 确认修改按钮 --> |
204 | -<cover-view class="flex-center confirm"> | |
204 | +<view class="flex-center confirm"> | |
205 | 205 | <view class="flex-center fs30 confirmtext"bindtap="confirm_revision"> |
206 | 206 | <view>确认修改</view> |
207 | 207 | </view> |
208 | -</cover-view> | |
208 | +</view> | |
209 | 209 | |
210 | 210 | <!--弹出层内容,其中的“我知道”中绑定让弹出层消失的函数:bindtap="hide"--> |
211 | 211 | <view class="tc_view" hidden='{{tc_hide}}' bindtap='hide_tc'> | ... | ... |