-
Status changed to merged
-
mentioned in commit 55e3fd303c05f4f0b06a6cfc7c8d3a45b55184a3
Showing
31 changed files
components/goods_list/g_filter.wxs
| @@ -8,44 +8,54 @@ var g_filters = { | @@ -8,44 +8,54 @@ var g_filters = { | ||
| 8 | 8 | ||
| 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
| 10 | get_card_price:function(goods,all_card,type){ | 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 | if(!all_card){ | 14 | if(!all_card){ |
| 15 | if(type==0) return 0; | 15 | if(type==0) return 0; |
| 16 | return ""; | 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 | for(var i=0;i<3;i++) { | 22 | for(var i=0;i<3;i++) { |
| 24 | - var vl=all_card[i]; | 23 | + var vl=all_card[i]; |
| 25 | if(vl['CorrPrice']=="Price1" && price1>0) | 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 | if(vl['CorrPrice']=="Price2" && price2>0) | 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 | if(vl['CorrPrice']=="Price3" && price3>0) | 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 | if(type==0) return 0; | 55 | if(type==0) return 0; |
| 34 | return ""; | 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 | if(type==0) return min_price; | 59 | if(type==0) return min_price; |
| 50 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); | 60 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); |
| 51 | return min_name; | 61 | return min_name; |
components/goods_list/goods_list.js
| @@ -18,77 +18,89 @@ Component({ | @@ -18,77 +18,89 @@ Component({ | ||
| 18 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | 18 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
| 19 | }, | 19 | }, |
| 20 | ready: function () { | 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 | var that = this; | 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 | var curPage = that.data.curPage; | 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 | store_id: o.stoid, | 76 | store_id: o.stoid, |
| 66 | page: curPage, | 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 | if (data.data.pageData) { | 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 | that.setData({ recommend: ra }); | 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 | bind_bnerr_xc: function (e) { | 104 | bind_bnerr_xc: function (e) { |
| 93 | var _errImg = e.target.dataset.errorimg; | 105 | var _errImg = e.target.dataset.errorimg; |
| 94 | var _errurl = e.target.dataset.url; | 106 | var _errurl = e.target.dataset.url; |
| @@ -114,7 +126,7 @@ Component({ | @@ -114,7 +126,7 @@ Component({ | ||
| 114 | var name="card"+plusCard[i].CorrPrice.toLowerCase(); | 126 | var name="card"+plusCard[i].CorrPrice.toLowerCase(); |
| 115 | card_name_map.set(name,plusCard[i].CardName); | 127 | card_name_map.set(name,plusCard[i].CardName); |
| 116 | } | 128 | } |
| 117 | - | 129 | + |
| 118 | var ob={"card_list":plusCard,"name_map":card_name_map}; | 130 | var ob={"card_list":plusCard,"name_map":card_name_map}; |
| 119 | func(ob); | 131 | func(ob); |
| 120 | }) | 132 | }) |
components/goods_list/goods_list.wxss
| @@ -151,6 +151,6 @@ color: #b9b9b9; | @@ -151,6 +151,6 @@ color: #b9b9b9; | ||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | .line_th{ text-decoration: line-through} | 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 | background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} | 155 | background: #333; color: #fff; justify-content: center; margin-left: 2rpx;} |
| 156 | .card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} | 156 | .card_bg image{ width: 19rpx; height: 19rpx; margin-right: 1rpx;} |
| 157 | \ No newline at end of file | 157 | \ No newline at end of file |
pages/cart/cart/cart.js
| @@ -705,10 +705,14 @@ Page({ | @@ -705,10 +705,14 @@ Page({ | ||
| 705 | if (g_arr[i].goods_id == val.goods_id) { | 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 | }else{ | 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 | isok = 0; | 716 | isok = 0; |
| 713 | gname = val.goods_name; | 717 | gname = val.goods_name; |
| 714 | throw "商品价格已经变化"; | 718 | throw "商品价格已经变化"; |
pages/cart/cart2/cart2.js
| @@ -414,6 +414,7 @@ Page({ | @@ -414,6 +414,7 @@ Page({ | ||
| 414 | case 2: | 414 | case 2: |
| 415 | case 3: | 415 | case 3: |
| 416 | case 4: | 416 | case 4: |
| 417 | + case 5: | ||
| 417 | case 6: | 418 | case 6: |
| 418 | //--此时开始计算商品的使用券相关,如果有等级价还要计算和等级价相关的, | 419 | //--此时开始计算商品的使用券相关,如果有等级价还要计算和等级价相关的, |
| 419 | // 如果有优惠促销,还要把促销的部分计算在内,因为促销还有不能使用优惠券-- | 420 | // 如果有优惠促销,还要把促销的部分计算在内,因为促销还有不能使用优惠券-- |
pages/getphone/getphone.js
| @@ -15,9 +15,13 @@ Page({ | @@ -15,9 +15,13 @@ Page({ | ||
| 15 | var th=this,app = getApp(); | 15 | var th=this,app = getApp(); |
| 16 | var sessionKey = getApp().globalData.sessionKey; | 16 | var sessionKey = getApp().globalData.sessionKey; |
| 17 | var openid = getApp().globalData.openid; | 17 | var openid = getApp().globalData.openid; |
| 18 | + | ||
| 19 | + if (openid == "" || openid == null) { | ||
| 20 | + openid = getApp().globalData.userInfo.weapp_openid; | ||
| 21 | + } | ||
| 18 | 22 | ||
| 19 | if(openid=="" || openid==null ){ | 23 | if(openid=="" || openid==null ){ |
| 20 | - getApp().globalData.user_id=null; | 24 | + getApp().globalData.user_id=null; |
| 21 | getApp().globalData.userInfo=null; | 25 | getApp().globalData.userInfo=null; |
| 22 | console.log("openid"); | 26 | console.log("openid"); |
| 23 | wx.navigateTo({ url: '/pages/togoin/togoin', }) | 27 | wx.navigateTo({ url: '/pages/togoin/togoin', }) |
pages/goods/goodsInfo/g_filter.wxs
| @@ -8,9 +8,9 @@ var g_filters = { | @@ -8,9 +8,9 @@ var g_filters = { | ||
| 8 | 8 | ||
| 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
| 10 | get_card_price:function(goods,all_card,type){ | 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 | if(!all_card){ | 14 | if(!all_card){ |
| 15 | if(type==0) return 0; | 15 | if(type==0) return 0; |
| 16 | return ""; | 16 | return ""; |
| @@ -18,22 +18,51 @@ var g_filters = { | @@ -18,22 +18,51 @@ var g_filters = { | ||
| 18 | 18 | ||
| 19 | var arr=[]; | 19 | var arr=[]; |
| 20 | var min_price= 0; | 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 | for(var i=0;i<3;i++) { | 26 | for(var i=0;i<3;i++) { |
| 24 | - var vl=all_card[i]; | 27 | + var vl=all_card[i]; |
| 25 | if(vl['CorrPrice']=="Price1" && price1>0) | 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 | if(vl['CorrPrice']=="Price2" && price2>0) | 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 | if(vl['CorrPrice']=="Price3" && price3>0) | 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 | if(type==0) return 0; | 59 | if(type==0) return 0; |
| 34 | return ""; | 60 | return ""; |
| 35 | } | 61 | } |
| 62 | + | ||
| 63 | + //if(type==0) return arr.length; | ||
| 36 | //--进行排序,升序--- | 64 | //--进行排序,升序--- |
| 65 | + /*--- | ||
| 37 | arr.sort(function(a,b){ | 66 | arr.sort(function(a,b){ |
| 38 | if (a.price < b.price) { | 67 | if (a.price < b.price) { |
| 39 | return -1; | 68 | return -1; |
| @@ -42,12 +71,12 @@ var g_filters = { | @@ -42,12 +71,12 @@ var g_filters = { | ||
| 42 | } else { | 71 | } else { |
| 43 | return 1; | 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 | return min_name; | 80 | return min_name; |
| 52 | }, | 81 | }, |
| 53 | } | 82 | } |
pages/goods/goodsInfo/goodsInfo.js
| @@ -202,7 +202,6 @@ Page({ | @@ -202,7 +202,6 @@ Page({ | ||
| 202 | canvasHidden: 1, | 202 | canvasHidden: 1, |
| 203 | 203 | ||
| 204 | //--推荐-- | 204 | //--推荐-- |
| 205 | - recommend_list: [], | ||
| 206 | store_config: null, | 205 | store_config: null, |
| 207 | is_show_pl: 0, //是否品类 | 206 | is_show_pl: 0, //是否品类 |
| 208 | is_show_pp: 0, //是否品牌 | 207 | is_show_pp: 0, //是否品牌 |
| @@ -236,6 +235,9 @@ Page({ | @@ -236,6 +235,9 @@ Page({ | ||
| 236 | 235 | ||
| 237 | //------初始化加载---------- | 236 | //------初始化加载---------- |
| 238 | onLoad: function(t) { | 237 | onLoad: function(t) { |
| 238 | + | ||
| 239 | + | ||
| 240 | + | ||
| 239 | wx.setNavigationBarTitle({ | 241 | wx.setNavigationBarTitle({ |
| 240 | title: "商品详情", | 242 | title: "商品详情", |
| 241 | }) | 243 | }) |
| @@ -294,34 +296,36 @@ Page({ | @@ -294,34 +296,36 @@ Page({ | ||
| 294 | //---如果后台又开等级卡的开关--- | 296 | //---如果后台又开等级卡的开关--- |
| 295 | if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ | 297 | if(sw_arr.rank_switch && sw_arr.rank_switch=="2"){ |
| 296 | th.setData({rank_switch:true}); | 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 | th.getPlusCardType(function(ob){ | 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,12 +500,21 @@ Page({ | ||
| 496 | mapurl: mapurl, | 500 | mapurl: mapurl, |
| 497 | }); | 501 | }); |
| 498 | 502 | ||
| 499 | - ee.requestRecommend(); | ||
| 500 | 503 | ||
| 501 | }, | 504 | }, |
| 502 | 505 | ||
| 503 | //---展示--- | 506 | //---展示--- |
| 504 | onShow: function() { | 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 | this.data.is_timer = 1; | 519 | this.data.is_timer = 1; |
| 507 | var ee = this, | 520 | var ee = this, |
| @@ -569,7 +582,7 @@ Page({ | @@ -569,7 +582,7 @@ Page({ | ||
| 569 | //获取门店 | 582 | //获取门店 |
| 570 | ee.get_sto(); | 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 | ee.get_sku(o.stoid, t.data.data.sku, gid); | 586 | ee.get_sku(o.stoid, t.data.data.sku, gid); |
| 574 | else { | 587 | else { |
| 575 | var gg = "", | 588 | var gg = "", |
| @@ -638,6 +651,9 @@ Page({ | @@ -638,6 +651,9 @@ Page({ | ||
| 638 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); | 651 | this.data.enterAddressPage && (this.data.enterAddressPage = !1); |
| 639 | 652 | ||
| 640 | 653 | ||
| 654 | + | ||
| 655 | + | ||
| 656 | + | ||
| 641 | 657 | ||
| 642 | }, | 658 | }, |
| 643 | enterAddress: function() { | 659 | enterAddress: function() { |
| @@ -1555,13 +1571,16 @@ Page({ | @@ -1555,13 +1571,16 @@ Page({ | ||
| 1555 | if (this.data.activeCategoryId == 2){ | 1571 | if (this.data.activeCategoryId == 2){ |
| 1556 | if(!this.data.comments_no_more) this.requestComments_new(); | 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 | async check_prom(gid, prom_type, prom_id) { | 1580 | async check_prom(gid, prom_type, prom_id) { |
| 1562 | var ee = this, | 1581 | var ee = this, |
| 1563 | th = ee; | 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 | this.setData({ | 1584 | this.setData({ |
| 1566 | prom_type: 0, | 1585 | prom_type: 0, |
| 1567 | isshow: 1, | 1586 | isshow: 1, |
| @@ -2889,37 +2908,6 @@ Page({ | @@ -2889,37 +2908,6 @@ Page({ | ||
| 2889 | }, | 2908 | }, |
| 2890 | 2909 | ||
| 2891 | 2910 | ||
| 2892 | - //--加载更多商品-- | ||
| 2893 | - requestRecommend: function() { | ||
| 2894 | - var e = this, | ||
| 2895 | - t = '/api/weshop/goods/page?page=1'; | ||
| 2896 | - var th_recommend_list = e.data.recommend_list; | ||
| 2897 | - getApp().request.get(t, { | ||
| 2898 | - data: { | ||
| 2899 | - is_mainshow: 1, | ||
| 2900 | - isonsale: 1, | ||
| 2901 | - is_recommend: 1, | ||
| 2902 | - is_on_sale: 1, | ||
| 2903 | - store_id: os.stoid, | ||
| 2904 | - pageSize: 6 | ||
| 2905 | - }, | ||
| 2906 | - success: function(ee) { | ||
| 2907 | - var recommend_list = ee.data.data.pageData; | ||
| 2908 | - if (recommend_list && recommend_list.length > 0) { | ||
| 2909 | - var dd = [...th_recommend_list, ...recommend_list]; | ||
| 2910 | - e.setData({ | ||
| 2911 | - recommend_list, | ||
| 2912 | - dd | ||
| 2913 | - }); | ||
| 2914 | - e.data.currentPage++; | ||
| 2915 | - } else { | ||
| 2916 | - e.setData({ | ||
| 2917 | - nomore: 1 | ||
| 2918 | - }); | ||
| 2919 | - } | ||
| 2920 | - } | ||
| 2921 | - }) | ||
| 2922 | - }, | ||
| 2923 | 2911 | ||
| 2924 | //--获取头像的本地缓存,回调写法-- | 2912 | //--获取头像的本地缓存,回调写法-- |
| 2925 | get_head_temp: function(tt, func) { | 2913 | get_head_temp: function(tt, func) { |
pages/goods/goodsInfo/goodsInfo.json
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | "enablePullDownRefresh": false, | 3 | "enablePullDownRefresh": false, |
| 4 | "usingComponents": { | 4 | "usingComponents": { |
| 5 | "nav_box": "/components/nav_box/nav_box", | 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 | \ No newline at end of file | 10 | \ No newline at end of file |
pages/goods/goodsInfo/goodsInfo.wxml
| @@ -229,12 +229,15 @@ | @@ -229,12 +229,15 @@ | ||
| 229 | <view class="goods-price rel"> | 229 | <view class="goods-price rel"> |
| 230 | <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> | 230 | <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}"> |
| 231 | <view class="market-price" style="overflow: hidden"> | 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 | <view class="flex ai-center grade-card-frame" style="margin-left:12rpx;"> | 233 | <view class="flex ai-center grade-card-frame" style="margin-left:12rpx;"> |
| 234 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 234 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| 235 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> | 235 | <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view> |
| 236 | </view> | 236 | </view> |
| 237 | <text class="rel yuan">¥</text>{{filters.toFix(data[card_field],2)}} | 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 | </block> | 241 | </block> |
| 239 | <block wx:else> | 242 | <block wx:else> |
| 240 | <text class="rel yuan">¥</text>{{ filters.toFix(data.shop_price,2)}} | 243 | <text class="rel yuan">¥</text>{{ filters.toFix(data.shop_price,2)}} |
| @@ -255,7 +258,10 @@ | @@ -255,7 +258,10 @@ | ||
| 255 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | 258 | <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> |
| 256 | <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> | 259 | <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> |
| 257 | </view> | 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 | </view> | 265 | </view> |
| 260 | 266 | ||
| 261 | 267 | ||
| @@ -269,7 +275,7 @@ | @@ -269,7 +275,7 @@ | ||
| 269 | <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> | 275 | <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view> |
| 270 | </view> | 276 | </view> |
| 271 | <view class="card-effect"> | 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 | <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> | 279 | <view class="fs22 xc-ash"> 开通会员 尽享更多优惠 </view> |
| 274 | </view> | 280 | </view> |
| 275 | </view> | 281 | </view> |
| @@ -281,7 +287,7 @@ | @@ -281,7 +287,7 @@ | ||
| 281 | </view> | 287 | </view> |
| 282 | </view> | 288 | </view> |
| 283 | <!-- 立即续费的显示 --> | 289 | <!-- 立即续费的显示 --> |
| 284 | - <view wx:elif="{{is_near_date}}"> | 290 | + <view wx:elif="{{is_near_date && data[card_field]>0}}"> |
| 285 | <view class="beauty-makeup-frame flex ai-center"> | 291 | <view class="beauty-makeup-frame flex ai-center"> |
| 286 | <view class="left flex ai-center"> | 292 | <view class="left flex ai-center"> |
| 287 | <view class="flex ai-center grade-card-frame card-frame advert-card"style="max-width:32%;width:auto" > | 293 | <view class="flex ai-center grade-card-frame card-frame advert-card"style="max-width:32%;width:auto" > |
| @@ -526,23 +532,7 @@ | @@ -526,23 +532,7 @@ | ||
| 526 | </view> | 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 | </view> | 537 | </view> |
| 548 | 538 | ||
| @@ -807,7 +797,7 @@ | @@ -807,7 +797,7 @@ | ||
| 807 | <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> | 797 | <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> |
| 808 | <view class="spec-goods-price" wx:if="{{prom_price==null}}"> | 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 | ¥ {{sele_g[card_field]}} | 801 | ¥ {{sele_g[card_field]}} |
| 812 | </block> | 802 | </block> |
| 813 | <block wx:else> | 803 | <block wx:else> |
| @@ -902,7 +892,7 @@ | @@ -902,7 +892,7 @@ | ||
| 902 | <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> | 892 | <!--<view class="spec-goods-name">{{data.goods_name}}</view>--> |
| 903 | <view class="spec-goods-price" wx:if="{{is_normal==1}}"> | 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 | ¥ {{sele_g[card_field]}} | 896 | ¥ {{sele_g[card_field]}} |
| 907 | </block> | 897 | </block> |
| 908 | <block wx:else> | 898 | <block wx:else> |
pages/goods/goodsInfo/goodsInfo.wxss
| @@ -2298,4 +2298,8 @@ right:17rpx; top:55rpx; | @@ -2298,4 +2298,8 @@ right:17rpx; top:55rpx; | ||
| 2298 | transform: rotate(45deg);display:inline-block; | 2298 | transform: rotate(45deg);display:inline-block; |
| 2299 | margin-bottom:3rpx; | 2299 | margin-bottom:3rpx; |
| 2300 | 2300 | ||
| 2301 | +} | ||
| 2302 | +.carde_frame{ | ||
| 2303 | + height: 50rpx; | ||
| 2304 | + line-height: 18rpx | ||
| 2301 | } | 2305 | } |
| 2302 | \ No newline at end of file | 2306 | \ No newline at end of file |
pages/goods/goodsList/g_filter.wxs
| @@ -8,44 +8,55 @@ var g_filters = { | @@ -8,44 +8,55 @@ var g_filters = { | ||
| 8 | 8 | ||
| 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
| 10 | get_card_price:function(goods,all_card,type){ | 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 | if(type==0) return 0; | 16 | if(type==0) return 0; |
| 16 | return ""; | 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 | for(var i=0;i<3;i++) { | 23 | for(var i=0;i<3;i++) { |
| 24 | - var vl=all_card[i]; | 24 | + var vl=all_card[i]; |
| 25 | if(vl['CorrPrice']=="Price1" && price1>0) | 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 | if(vl['CorrPrice']=="Price2" && price2>0) | 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 | if(vl['CorrPrice']=="Price3" && price3>0) | 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 | if(type==0) return 0; | 56 | if(type==0) return 0; |
| 34 | return ""; | 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 | if(type==0) return min_price; | 60 | if(type==0) return min_price; |
| 50 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); | 61 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); |
| 51 | return min_name; | 62 | return min_name; |
pages/goods/goodsList/goodsList.wxml
| @@ -66,11 +66,11 @@ | @@ -66,11 +66,11 @@ | ||
| 66 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | 66 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
| 67 | <view class="flex ai-center"> | 67 | <view class="flex ai-center"> |
| 68 | <view class="price">¥{{item.shop_price}}</view> | 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 | </view> | 70 | </view> |
| 71 | <view class="comment flex jc_sb"> | 71 | <view class="comment flex jc_sb"> |
| 72 | <view class="flex"> | 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 | <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | 74 | <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 75 | {{g_filter.get_card_price(item,card_list,1)}} | 75 | {{g_filter.get_card_price(item,card_list,1)}} |
| 76 | </view> | 76 | </view> |
pages/goods/goodsList/goodsList.wxss
| @@ -92,6 +92,7 @@ | @@ -92,6 +92,7 @@ | ||
| 92 | .price { | 92 | .price { |
| 93 | display: inline-block; | 93 | display: inline-block; |
| 94 | color: #f23030; | 94 | color: #f23030; |
| 95 | + line-height: 24rpx; | ||
| 95 | /* padding-bottom: 20rpx; */ | 96 | /* padding-bottom: 20rpx; */ |
| 96 | } | 97 | } |
| 97 | 98 | ||
| @@ -155,6 +156,8 @@ | @@ -155,6 +156,8 @@ | ||
| 155 | width: 300rpx; | 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 | \ No newline at end of file | 164 | \ No newline at end of file |
pages/goods/search/g_filter.wxs
| @@ -8,49 +8,61 @@ var g_filters = { | @@ -8,49 +8,61 @@ var g_filters = { | ||
| 8 | 8 | ||
| 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
| 10 | get_card_price:function(goods,all_card,type){ | 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 | if(type==0) return 0; | 16 | if(type==0) return 0; |
| 16 | return ""; | 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 | for(var i=0;i<3;i++) { | 23 | for(var i=0;i<3;i++) { |
| 24 | - var vl=all_card[i]; | 24 | + var vl=all_card[i]; |
| 25 | if(vl['CorrPrice']=="Price1" && price1>0) | 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 | if(vl['CorrPrice']=="Price2" && price2>0) | 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 | if(vl['CorrPrice']=="Price3" && price3>0) | 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 | if(type==0) return 0; | 56 | if(type==0) return 0; |
| 34 | return ""; | 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 | if(type==0) return min_price; | 60 | if(type==0) return min_price; |
| 50 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); | 61 | if(min_name.length>4 ) min_name=min_name.substring(0, 4); |
| 51 | return min_name; | 62 | return min_name; |
| 52 | }, | 63 | }, |
| 53 | } | 64 | } |
| 65 | + | ||
| 54 | module.exports = { | 66 | module.exports = { |
| 55 | is_has_rank:g_filters.is_has_rank, | 67 | is_has_rank:g_filters.is_has_rank, |
| 56 | get_card_price:g_filters.get_card_price, | 68 | get_card_price:g_filters.get_card_price, |
pages/goods/search/search.wxml
| @@ -62,11 +62,11 @@ | @@ -62,11 +62,11 @@ | ||
| 62 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> | 62 | <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> |
| 63 | <view class="flex ai-center"> | 63 | <view class="flex ai-center"> |
| 64 | <view class="price">¥{{item.shop_price}}</view> | 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 | </view> | 66 | </view> |
| 67 | <view class="comment flex jc_sb"> | 67 | <view class="comment flex jc_sb"> |
| 68 | <view class="flex"> | 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 | <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> | 70 | <view class="card_bg"><image src="{{url}}/miniapp/images/plus/dj_icon.png"></image> |
| 71 | {{g_filter.get_card_price(item,card_list,1)}} | 71 | {{g_filter.get_card_price(item,card_list,1)}} |
| 72 | </view> | 72 | </view> |
pages/goods/search/search.wxss
| @@ -92,6 +92,7 @@ | @@ -92,6 +92,7 @@ | ||
| 92 | .price { | 92 | .price { |
| 93 | display: inline-block; | 93 | display: inline-block; |
| 94 | color: #f23030; | 94 | color: #f23030; |
| 95 | + line-height: 24rpx; | ||
| 95 | /* padding-bottom: 20rpx; */ | 96 | /* padding-bottom: 20rpx; */ |
| 96 | } | 97 | } |
| 97 | 98 | ||
| @@ -226,6 +227,8 @@ | @@ -226,6 +227,8 @@ | ||
| 226 | margin-left: 15rpx; | 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
| @@ -314,7 +314,8 @@ Page({ | @@ -314,7 +314,8 @@ Page({ | ||
| 314 | 314 | ||
| 315 | }); | 315 | }); |
| 316 | var goods_list = this.selectComponent("#goods_list"); //组件的id | 316 | var goods_list = this.selectComponent("#goods_list"); //组件的id |
| 317 | - goods_list.get_list(); | 317 | + goods_list.init(); |
| 318 | + setTimeout(function () { goods_list.get_list();},300) | ||
| 318 | }, | 319 | }, |
| 319 | 320 | ||
| 320 | //--判断小程序是否过期-- | 321 | //--判断小程序是否过期-- |
pages/user/Change_phone/Change_phone.js
| @@ -14,21 +14,35 @@ Page({ | @@ -14,21 +14,35 @@ Page({ | ||
| 14 | inputxphone: 0, | 14 | inputxphone: 0, |
| 15 | mobile: null, //旧手机号码 | 15 | mobile: null, //旧手机号码 |
| 16 | currentTime: "", //验证码发送倒计时 | 16 | currentTime: "", //验证码发送倒计时 |
| 17 | - getvcode: "获取验证码", | 17 | + getvcode: "获取验证码", //显示文字 |
| 18 | + time_len: 0, //重新获取时长 | ||
| 18 | wxopenid: null, | 19 | wxopenid: null, |
| 19 | isver: 0, //是否有发送验证码 | 20 | isver: 0, //是否有发送验证码 |
| 20 | code: "", //验证码 | 21 | code: "", //验证码 |
| 21 | - url: "", //确认更换手机号码跳转路径 | ||
| 22 | change_phone: "", //新手机号码 | 22 | change_phone: "", //新手机号码 |
| 23 | + send: 1, //发送类型 | ||
| 23 | }, | 24 | }, |
| 24 | /** | 25 | /** |
| 25 | * 生命周期函数--监听页面加载 | 26 | * 生命周期函数--监听页面加载 |
| 26 | */ | 27 | */ |
| 27 | onLoad: function(options) { | 28 | onLoad: function(options) { |
| 28 | - this.setData({ | ||
| 29 | - mobile: options.mobile, | ||
| 30 | - wxopenid: 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 | Ver_phone: function() { | 48 | Ver_phone: function() { |
| @@ -37,6 +51,7 @@ Page({ | @@ -37,6 +51,7 @@ Page({ | ||
| 37 | var wxopenid = th.data.wxopenid; | 51 | var wxopenid = th.data.wxopenid; |
| 38 | var change_phone = th.data.change_phone; | 52 | var change_phone = th.data.change_phone; |
| 39 | var isver = th.data.isver; | 53 | var isver = th.data.isver; |
| 54 | + var send = th.data.send; | ||
| 40 | var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; | 55 | var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; |
| 41 | if (mobile.length < 11) { | 56 | if (mobile.length < 11) { |
| 42 | getApp().my_warnning("请输入11位的手机号码", 0, th); | 57 | getApp().my_warnning("请输入11位的手机号码", 0, th); |
| @@ -61,7 +76,7 @@ Page({ | @@ -61,7 +76,7 @@ Page({ | ||
| 61 | getApp().request.post("/api/weshop/smslog/sendsms", { | 76 | getApp().request.post("/api/weshop/smslog/sendsms", { |
| 62 | data: { | 77 | data: { |
| 63 | store_id: r.stoid, | 78 | store_id: r.stoid, |
| 64 | - scene: 1, //发送类型(1短信 2语音) | 79 | + scene: send, //发送类型(1短信 2语音) |
| 65 | mobile: mobile, | 80 | mobile: mobile, |
| 66 | wxopenid: wxopenid | 81 | wxopenid: wxopenid |
| 67 | }, | 82 | }, |
| @@ -69,14 +84,15 @@ Page({ | @@ -69,14 +84,15 @@ Page({ | ||
| 69 | if (res.data.code == 0) { | 84 | if (res.data.code == 0) { |
| 70 | th.setData({ | 85 | th.setData({ |
| 71 | isver: 0, | 86 | isver: 0, |
| 72 | - getvcode: 60, | 87 | + getvcode: th.data.time_len, |
| 73 | currentTime: setInterval(th.gettime, 1000), | 88 | currentTime: setInterval(th.gettime, 1000), |
| 89 | + send: 2 | ||
| 74 | }) | 90 | }) |
| 75 | } else { | 91 | } else { |
| 76 | getApp().my_warnning(res.data.msg, 0, th); | 92 | getApp().my_warnning(res.data.msg, 0, th); |
| 77 | th.setData({ | 93 | th.setData({ |
| 78 | isver: 0, | 94 | isver: 0, |
| 79 | - getvcode: "重新获取" | 95 | + getvcode: "重新获取", |
| 80 | }) | 96 | }) |
| 81 | return false; | 97 | return false; |
| 82 | } | 98 | } |
| @@ -106,21 +122,22 @@ Page({ | @@ -106,21 +122,22 @@ Page({ | ||
| 106 | if (change_phone.length > 1) { | 122 | if (change_phone.length > 1) { |
| 107 | mobile = change_phone | 123 | mobile = change_phone |
| 108 | } | 124 | } |
| 109 | - getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { | ||
| 110 | - success: function(res) { | ||
| 111 | - if (res.data.code == 0) { | ||
| 112 | - getApp().my_warnning("更换成功", 0, th); | ||
| 113 | - th.setData({ | ||
| 114 | - url: "/pages/user/userinfo/userinfo?change_phone" + change_phone | ||
| 115 | - }) | ||
| 116 | - } else { | ||
| 117 | - getApp().my_warnning(res.data.msg, 0, th); | ||
| 118 | - return false; | ||
| 119 | - } | 125 | + getApp().request.put("/api/weshop/users/updateMobile/" + r.stoid + '/' + o.user_id + '/' + code + '/' + mobile, { |
| 126 | + success: function(res) { | ||
| 127 | + if (res.data.code == 0) { | ||
| 128 | + var url = "/pages/user/userinfo/userinfo?change_phone" + change_phone | ||
| 129 | + getApp().globalData.userInfo.mobile = mobile; | ||
| 130 | + getApp().my_warnning("更换成功", 0, th); | ||
| 131 | + getApp().goto(url); | ||
| 120 | 132 | ||
| 133 | + } else { | ||
| 134 | + getApp().my_warnning(res.data.msg, 0, th); | ||
| 135 | + return false; | ||
| 121 | } | 136 | } |
| 122 | - }) | ||
| 123 | - | 137 | + |
| 138 | + } | ||
| 139 | + }) | ||
| 140 | + | ||
| 124 | }, | 141 | }, |
| 125 | //判断验证码是否正确 | 142 | //判断验证码是否正确 |
| 126 | ver_code: function(e) { | 143 | ver_code: function(e) { |
pages/user/Change_phone/Change_phone.wxml
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | <view class="inphone">{{mobile}}</view> | 12 | <view class="inphone">{{mobile}}</view> |
| 13 | </block> | 13 | </block> |
| 14 | <block wx:else> | 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 | </block> | 16 | </block> |
| 17 | </view> | 17 | </view> |
| 18 | 18 | ||
| @@ -51,10 +51,9 @@ | @@ -51,10 +51,9 @@ | ||
| 51 | <block wx:else> | 51 | <block wx:else> |
| 52 | <navigator url="{{url}}" class="flex-center lower" bindtap="change_phone"> | 52 | <navigator url="{{url}}" class="flex-center lower" bindtap="change_phone"> |
| 53 | <view>确定更换</view> | 53 | <view>确定更换</view> |
| 54 | - </navigator> | 54 | + </navigator> |
| 55 | </block> | 55 | </block> |
| 56 | </view> | 56 | </view> |
| 57 | 57 | ||
| 58 | - | ||
| 59 | </view> | 58 | </view> |
| 60 | <warn id="warn"></warn> | 59 | <warn id="warn"></warn> |
| 61 | \ No newline at end of file | 60 | \ No newline at end of file |
pages/user/address_list/address_list.js
| @@ -15,7 +15,12 @@ Page({ | @@ -15,7 +15,12 @@ Page({ | ||
| 15 | is_address_read:0 | 15 | is_address_read:0 |
| 16 | }, | 16 | }, |
| 17 | onLoad: function (e) { | 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 | //清空is_pick_up | 24 | //清空is_pick_up |
| 20 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { | 25 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { |
| 21 | data: {user_id: getApp().globalData.user_id, is_pickup: 0}, | 26 | data: {user_id: getApp().globalData.user_id, is_pickup: 0}, |
pages/user/address_list/address_list.wxml
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | <view class="topbcolor"></view> | 21 | <view class="topbcolor"></view> |
| 22 | <view class="nothing" wx:if="{{is_address_read && addresses.length<=0}}"> | 22 | <view class="nothing" wx:if="{{is_address_read && addresses.length<=0}}"> |
| 23 | <view class="image flex-level"> | 23 | <view class="image flex-level"> |
| 24 | - <image src="../../../images/nothingaddress.png"></image> | 24 | + <image src="{{iurl}}/miniapp/images/nothingaddress.png"></image> |
| 25 | </view> | 25 | </view> |
| 26 | 26 | ||
| 27 | <view class="nothingaddress flex-level"> | 27 | <view class="nothingaddress flex-level"> |
pages/user/cardinfo/cardinfo.js
| @@ -53,7 +53,7 @@ Page({ | @@ -53,7 +53,7 @@ Page({ | ||
| 53 | */ | 53 | */ |
| 54 | onLoad: function (options) { | 54 | onLoad: function (options) { |
| 55 | var that = this,ee=this; | 55 | var that = this,ee=this; |
| 56 | - | 56 | + var th=this; |
| 57 | //-----------等级卡说明------------------- | 57 | //-----------等级卡说明------------------- |
| 58 | getApp().request.promiseGet("/api/weshop/storeconfig/get/" + os.stoid, { | 58 | getApp().request.promiseGet("/api/weshop/storeconfig/get/" + os.stoid, { |
| 59 | }).then(res => { | 59 | }).then(res => { |
| @@ -106,8 +106,7 @@ Page({ | @@ -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,7 +306,7 @@ Page({ | ||
| 307 | ///二微码 | 306 | ///二微码 |
| 308 | 307 | ||
| 309 | var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | 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 | wx.getImageInfo({ | 310 | wx.getImageInfo({ |
| 312 | src: path3, | 311 | src: path3, |
| 313 | success: function (res) { | 312 | success: function (res) { |
| @@ -635,6 +634,9 @@ Page({ | @@ -635,6 +634,9 @@ Page({ | ||
| 635 | //同步初始化 | 634 | //同步初始化 |
| 636 | this.init(); | 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/collect_list/collect_list.js
| @@ -49,9 +49,8 @@ Page({ | @@ -49,9 +49,8 @@ Page({ | ||
| 49 | is_goods: 1 | 49 | is_goods: 1 |
| 50 | }) | 50 | }) |
| 51 | var goods_list = th.selectComponent("#goods_recommend"); //组件的id | 51 | var goods_list = th.selectComponent("#goods_recommend"); //组件的id |
| 52 | - goods_list.get_list(); | ||
| 53 | - | ||
| 54 | - | 52 | + goods_list.init(); |
| 53 | + setTimeOut(function () { goods_list.get_list(); }, 300) | ||
| 55 | } | 54 | } |
| 56 | }); | 55 | }); |
| 57 | }, | 56 | }, |
pages/user/index/index.js
| @@ -38,8 +38,7 @@ Page({ | @@ -38,8 +38,7 @@ Page({ | ||
| 38 | * 生命周期函数--监听页面加载 | 38 | * 生命周期函数--监听页面加载 |
| 39 | */ | 39 | */ |
| 40 | onLoad: function (options) { | 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,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,8 +255,9 @@ Page({ | ||
| 252 | */ | 255 | */ |
| 253 | onReachBottom: function () { | 256 | onReachBottom: function () { |
| 254 | //!this.nomore && this.requestRecommend(); | 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
| 1 | { | 1 | { |
| 2 | "usingComponents": { | 2 | "usingComponents": { |
| 3 | "pop_txt": "/components/userqy_pop_up/userqy_pop_up", | 3 | "pop_txt": "/components/userqy_pop_up/userqy_pop_up", |
| 4 | - "goods_recommend": "/components/goods_list/goods_list" | 4 | + "goods_recommend": "/components/goods_list/goods_list" |
| 5 | }, | 5 | }, |
| 6 | "navigationBarTitleText": "会员中心" | 6 | "navigationBarTitleText": "会员中心" |
| 7 | } | 7 | } |
| 8 | \ No newline at end of file | 8 | \ No newline at end of file |
pages/user/plus/plus.js
| @@ -36,7 +36,7 @@ Page({ | @@ -36,7 +36,7 @@ Page({ | ||
| 36 | is_fengxiang: 0, //是不是分享过来的 | 36 | is_fengxiang: 0, //是不是分享过来的 |
| 37 | def_recommon: null, //分享人的手机号 | 37 | def_recommon: null, //分享人的手机号 |
| 38 | def_serviceman: null, //分享人的营业员 | 38 | def_serviceman: null, //分享人的营业员 |
| 39 | - fir_leader:0, | 39 | + fir_leader:0, //分享人的ID |
| 40 | 40 | ||
| 41 | }, | 41 | }, |
| 42 | swiperChange: function (e) { | 42 | swiperChange: function (e) { |
| @@ -49,8 +49,8 @@ Page({ | @@ -49,8 +49,8 @@ Page({ | ||
| 49 | * 生命周期函数--监听页面加载 | 49 | * 生命周期函数--监听页面加载 |
| 50 | */ | 50 | */ |
| 51 | onLoad: function (options) { | 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 | wx.getSystemInfo({ | 55 | wx.getSystemInfo({ |
| 56 | success: res => { | 56 | success: res => { |
| @@ -58,9 +58,43 @@ Page({ | @@ -58,9 +58,43 @@ Page({ | ||
| 58 | } | 58 | } |
| 59 | }) | 59 | }) |
| 60 | var fir_leader = options.scene; | 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 | if (fir_leader != null && fir_leader != undefined && fir_leader != "") { | 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 | getApp().request.get(r_url, { | 98 | getApp().request.get(r_url, { |
| 65 | success: function (res) { | 99 | success: function (res) { |
| 66 | var is_ok = 1; | 100 | var is_ok = 1; |
| @@ -92,40 +126,16 @@ Page({ | @@ -92,40 +126,16 @@ Page({ | ||
| 92 | that.back_user(); | 126 | that.back_user(); |
| 93 | } | 127 | } |
| 94 | if (is_ok == 1) { | 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 | getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + app_d.user_id, { | 139 | getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + app_d.user_id, { |
| 130 | success: function (e) { | 140 | success: function (e) { |
| 131 | var userInfo = e.data.data; | 141 | var userInfo = e.data.data; |
| @@ -136,7 +146,7 @@ Page({ | @@ -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,6 +200,7 @@ Page({ | ||
| 190 | is_plusCard: plusCard, is_show: 1 | 200 | is_plusCard: plusCard, is_show: 1 |
| 191 | }) | 201 | }) |
| 192 | var goods_list = th.selectComponent("#goods_list"); //组件的id | 202 | var goods_list = th.selectComponent("#goods_list"); //组件的id |
| 203 | + goods_list.init(); | ||
| 193 | goods_list.get_list(); | 204 | goods_list.get_list(); |
| 194 | 205 | ||
| 195 | }) | 206 | }) |
| @@ -301,6 +312,78 @@ Page({ | @@ -301,6 +312,78 @@ Page({ | ||
| 301 | var ob={}; | 312 | var ob={}; |
| 302 | ob[name]=value | 313 | ob[name]=value |
| 303 | this.setData(ob); | 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 | \ No newline at end of file | 390 | \ No newline at end of file |
pages/user/plus/plus.wxml
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | <view class="flex-space-between Membership_go"> | 18 | <view class="flex-space-between Membership_go"> |
| 19 | <view> | 19 | <view> |
| 20 | <view class="fs36">{{item.CardName}}</view> | 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 | </view> | 22 | </view> |
| 23 | <view class="Opening fs28 xc-black" data-ind="{{index}}" style="background:{{item.CardColor}}" bindtap="Opening">立即购买 | 23 | <view class="Opening fs28 xc-black" data-ind="{{index}}" style="background:{{item.CardColor}}" bindtap="Opening">立即购买 |
| 24 | </view> | 24 | </view> |
pages/user/userinfo/userinfo.js
| @@ -2,7 +2,7 @@ function e(e, a, r) { | @@ -2,7 +2,7 @@ function e(e, a, r) { | ||
| 2 | return a in e ? Object.defineProperty(e, a, { | 2 | return a in e ? Object.defineProperty(e, a, { |
| 3 | value: r, | 3 | value: r, |
| 4 | enumerable: !0, | 4 | enumerable: !0, |
| 5 | - configurable: !0, | 5 | + configurable: !0, |
| 6 | writable: !0 | 6 | writable: !0 |
| 7 | }) : e[a] = r, e; | 7 | }) : e[a] = r, e; |
| 8 | } | 8 | } |
| @@ -58,7 +58,8 @@ Page({ | @@ -58,7 +58,8 @@ Page({ | ||
| 58 | gradename:"",//会员权益的卡 | 58 | gradename:"",//会员权益的卡 |
| 59 | isBool:"", | 59 | isBool:"", |
| 60 | sto_sele_id:"",//所属门店id | 60 | sto_sele_id:"",//所属门店id |
| 61 | - is_zy:0, | 61 | + is_zy:0, |
| 62 | + | ||
| 62 | }, | 63 | }, |
| 63 | //是否启动密码消费 | 64 | //是否启动密码消费 |
| 64 | isstcsp:function(){ | 65 | isstcsp:function(){ |
| @@ -504,7 +505,7 @@ Page({ | @@ -504,7 +505,7 @@ Page({ | ||
| 504 | }, | 505 | }, |
| 505 | //------初始化加载---------- | 506 | //------初始化加载---------- |
| 506 | onLoad: function(t) { | 507 | onLoad: function(t) { |
| 507 | - | 508 | + console.log("oNLOAD", "你好"); |
| 508 | var user=getApp().globalData.userInfo; | 509 | var user=getApp().globalData.userInfo; |
| 509 | if(user.card_field!=''&& user.card_field!=null && user.card_field!=undefined){ | 510 | if(user.card_field!=''&& user.card_field!=null && user.card_field!=undefined){ |
| 510 | var now=ut.gettimestamp(); | 511 | var now=ut.gettimestamp(); |
| @@ -568,14 +569,15 @@ Page({ | @@ -568,14 +569,15 @@ Page({ | ||
| 568 | }, | 569 | }, |
| 569 | 570 | ||
| 570 | onShow: function() { | 571 | onShow: function() { |
| 572 | + console.log(this.data.is_zy ,"是什么东西"); | ||
| 571 | if(this.data.is_zy) return false; | 573 | if(this.data.is_zy) return false; |
| 572 | this.wait_for_store_config(); | 574 | this.wait_for_store_config(); |
| 575 | + console.log(this.data.is_zy, "sssss是什么东西"); | ||
| 573 | var e = this; | 576 | var e = this; |
| 574 | var req = t; | 577 | var req = t; |
| 575 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { | 578 | req.get("/api/weshop/users/getAndUpdateUser/" + r.stoid + "/" + getApp().globalData.user_id, { |
| 576 | success: function (src) { | 579 | success: function (src) { |
| 577 | var a=src.data.data; | 580 | var a=src.data.data; |
| 578 | - console.log(a,"剩什么llllll",a.data); | ||
| 579 | var time = util.formatTime(a.reg_time,"'Y/M/D"); | 581 | var time = util.formatTime(a.reg_time,"'Y/M/D"); |
| 580 | var birthday = util.formatTime(a.birthday, "'Y/M/D"); | 582 | var birthday = util.formatTime(a.birthday, "'Y/M/D"); |
| 581 | a.reg_time = time; | 583 | a.reg_time = time; |
| @@ -785,7 +787,11 @@ Page({ | @@ -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 | go_phone:function(e){ | 795 | go_phone:function(e){ |
| 790 | var url=e.currentTarget.dataset.url; | 796 | var url=e.currentTarget.dataset.url; |
| 791 | this.setData({is_zy:1}); | 797 | this.setData({is_zy:1}); |
pages/user/userinfo/userinfo.wxml
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | 17 | ||
| 18 | <view class="flex-center fs22 vip"> | 18 | <view class="flex-center fs22 vip"> |
| 19 | <block wx:if="{{isBool&&gradename}}"> | 19 | <block wx:if="{{isBool&&gradename}}"> |
| 20 | - <navigator url=""> | 20 | + <navigator url="/pages/user/userqy/userqy"> |
| 21 | <view class="flex-center AncrownMax"> | 21 | <view class="flex-center AncrownMax"> |
| 22 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> | 22 | <image class="Ancrown" src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"></image> |
| 23 | <view>{{gradename}}</view> | 23 | <view>{{gradename}}</view> |
| @@ -159,7 +159,7 @@ | @@ -159,7 +159,7 @@ | ||
| 159 | <input class="user-txt-right" bindblur="IdentityIDCard" value="" type="idcard" maxlength="18" placeholder="*身份证" /> | 159 | <input class="user-txt-right" bindblur="IdentityIDCard" value="" type="idcard" maxlength="18" placeholder="*身份证" /> |
| 160 | </block> --> | 160 | </block> --> |
| 161 | </view> | 161 | </view> |
| 162 | - <view data-url="/pages/user/Change_phone/Change_phone?mobile={{user.mobile}}&openid={{user.weapp_openid}}" 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 | <view class="user-name-txt">更换手机</view> | 163 | <view class="user-name-txt">更换手机</view> |
| 164 | <view class="flex-center user-txt-right"> | 164 | <view class="flex-center user-txt-right"> |
| 165 | <view class="flex">{{phone}}</view> | 165 | <view class="flex">{{phone}}</view> |
| @@ -187,7 +187,7 @@ | @@ -187,7 +187,7 @@ | ||
| 187 | </view> | 187 | </view> |
| 188 | </view> | 188 | </view> |
| 189 | </view> | 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 | <view class="user-name-txt">收货地址</view> | 191 | <view class="user-name-txt">收货地址</view> |
| 192 | <view class="flex-center user-txt-right"> | 192 | <view class="flex-center user-txt-right"> |
| 193 | <!-- <view class="flex">{{user.address_id}}</view> --> | 193 | <!-- <view class="flex">{{user.address_id}}</view> --> |
| @@ -201,11 +201,11 @@ | @@ -201,11 +201,11 @@ | ||
| 201 | </view> | 201 | </view> |
| 202 | </view> | 202 | </view> |
| 203 | <!-- 确认修改按钮 --> | 203 | <!-- 确认修改按钮 --> |
| 204 | -<cover-view class="flex-center confirm"> | 204 | +<view class="flex-center confirm"> |
| 205 | <view class="flex-center fs30 confirmtext"bindtap="confirm_revision"> | 205 | <view class="flex-center fs30 confirmtext"bindtap="confirm_revision"> |
| 206 | <view>确认修改</view> | 206 | <view>确认修改</view> |
| 207 | </view> | 207 | </view> |
| 208 | -</cover-view> | 208 | +</view> |
| 209 | 209 | ||
| 210 | <!--弹出层内容,其中的“我知道”中绑定让弹出层消失的函数:bindtap="hide"--> | 210 | <!--弹出层内容,其中的“我知道”中绑定让弹出层消失的函数:bindtap="hide"--> |
| 211 | <view class="tc_view" hidden='{{tc_hide}}' bindtap='hide_tc'> | 211 | <view class="tc_view" hidden='{{tc_hide}}' bindtap='hide_tc'> |
pages/user/userinfo/userinfo.wxss
| @@ -109,7 +109,7 @@ padding-right: 14rpx; | @@ -109,7 +109,7 @@ padding-right: 14rpx; | ||
| 109 | bottom: 0rpx; | 109 | bottom: 0rpx; |
| 110 | height: 130rpx; | 110 | height: 130rpx; |
| 111 | background-color: rgb(255,255,255); | 111 | background-color: rgb(255,255,255); |
| 112 | - z-index: 999; | 112 | + z-index: 9; |
| 113 | border-top:1rpx solid #ddd | 113 | border-top:1rpx solid #ddd |
| 114 | } | 114 | } |
| 115 | 115 |