Commit ed9dfddfd73c5a7eec3786e38ba541a5c2164e9a
Merge branch 'dev' into 'test'
Dev See merge request !515
Showing
68 changed files
with
3094 additions
and
1351 deletions
app.wxss
| ... | ... | @@ -293,7 +293,6 @@ justify-content:space-around; |
| 293 | 293 | |
| 294 | 294 | |
| 295 | 295 | |
| 296 | - | |
| 297 | 296 | /* 7.26 */ |
| 298 | 297 | .white{ |
| 299 | 298 | color: #fff; |
| ... | ... | @@ -413,4 +412,5 @@ background: #ffe3e2; |
| 413 | 412 | |
| 414 | 413 | .lh1 { |
| 415 | 414 | line-height: 1; |
| 416 | -} | |
| 417 | 415 | \ No newline at end of file |
| 416 | +} | |
| 417 | + | ... | ... |
components/diy_searchbox/diy_searchbox.js
| ... | ... | @@ -5,7 +5,6 @@ var t = getApp(), |
| 5 | 5 | Component({ |
| 6 | 6 | properties: { |
| 7 | 7 | // 这里定义了innerText属性,属性值可以在组件使用时指定 |
| 8 | - | |
| 9 | 8 | object: { |
| 10 | 9 | type: Object, |
| 11 | 10 | value: null, |
| ... | ... | @@ -15,19 +14,49 @@ Component({ |
| 15 | 14 | // 这里是一些组件内部数据 |
| 16 | 15 | yc:false, |
| 17 | 16 | imghost: o.imghost, |
| 18 | - someData: {} | |
| 17 | + someData: {}, | |
| 18 | + first:1, | |
| 19 | + inputShowed:1, | |
| 20 | + inputval:'在店铺内搜索', | |
| 21 | + keyword:'', | |
| 19 | 22 | }, |
| 20 | 23 | ready: function() { |
| 21 | - console.log("ready"); | |
| 24 | + var th=this; | |
| 25 | + getApp().getConfig2(function(e) { | |
| 26 | + //看有没有热搜 | |
| 27 | + if(e.hot_keywords) | |
| 28 | + th.setData({keyword:e.hot_keywords}); | |
| 29 | + }) | |
| 22 | 30 | }, |
| 23 | 31 | methods: { |
| 24 | 32 | //智能跳转 |
| 25 | 33 | go_url:function (e) { |
| 26 | 34 | var url=e.currentTarget.dataset.url; |
| 27 | 35 | getApp().goto(url); |
| 28 | - } | |
| 29 | - | |
| 30 | - | |
| 31 | - | |
| 36 | + }, | |
| 37 | + click_sear:function(){ | |
| 38 | + //如果搜索的单词为空的时候,就要跳到搜索页 | |
| 39 | + if(this.data.keyword!=''){ | |
| 40 | + getApp().goto("/pages/goods/search/search"); | |
| 41 | + return false; | |
| 42 | + } | |
| 43 | + this.setData({first:0,inputShowed:1,inputval:''}); | |
| 44 | + }, | |
| 45 | + | |
| 46 | + onblur:function(){ | |
| 47 | + var val=this.data.inputval; | |
| 48 | + if(val==''){ | |
| 49 | + this.setData({first:1,}); | |
| 50 | + } | |
| 51 | + }, | |
| 52 | + set_input:function(e){ | |
| 53 | + var val=e.detail.value; | |
| 54 | + this.setData({inputval:val}); | |
| 55 | + }, | |
| 56 | + sear:function(){ | |
| 57 | + var url="/pages/goods/search/search?s_key="+this.data.inputval; | |
| 58 | + getApp().goto(url); | |
| 59 | + } | |
| 60 | + | |
| 32 | 61 | } |
| 33 | 62 | }) |
| 34 | 63 | \ No newline at end of file | ... | ... |
components/diy_searchbox/diy_searchbox.wxml
| ... | ... | @@ -2,12 +2,22 @@ |
| 2 | 2 | <block wx:if="{{object.style==1}}"> |
| 3 | 3 | <view class="{{object.is_top==1?'abs_top':''}}"> |
| 4 | 4 | <view class='ss' > |
| 5 | - <view bindtap='go_url' data-url="/pages/goods/search/search" class="s1_gk_a1"> | |
| 6 | - <view class='s_ge'> | |
| 7 | - <image src='{{imghost}}/miniapp/images/search.png'></image> | |
| 8 | - <text>在店铺内搜索</text> | |
| 5 | + <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{first}}"> | |
| 6 | + <view class='s_ge'> | |
| 7 | + <image src='{{imghost}}/miniapp/images/search.png'></image> | |
| 8 | + <text>在店铺内搜索</text> | |
| 9 | + </view> | |
| 9 | 10 | </view> |
| 11 | + <!-- 响应搜索事件 --> | |
| 12 | + <view class="s1_gk_a1" wx:else> | |
| 13 | + <view class='s_ge flex'> | |
| 14 | + <image class="find_img" src='{{imghost}}/miniapp/images/search.png' bindtap='sear'></image> | |
| 15 | + <input id="find_inp" class="find_inp" value="" | |
| 16 | + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> | |
| 17 | + </view> | |
| 10 | 18 | </view> |
| 19 | + | |
| 20 | + | |
| 11 | 21 | </view> |
| 12 | 22 | </view> |
| 13 | 23 | <view wx:if="{{object.is_top==1}}" style="height: 120rpx;"></view> |
| ... | ... | @@ -24,10 +34,15 @@ |
| 24 | 34 | </view> |
| 25 | 35 | |
| 26 | 36 | <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> |
| 27 | - <navigator url="/pages/goods/search/search" class="s1_gk_a2"> | |
| 28 | - <image src='/public/static/images/model/select.png'></image> | |
| 29 | - <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text> | |
| 37 | + <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style="height: 100%;"> | |
| 38 | + <image src='/public/static/images/model/select.png'></image> | |
| 39 | + <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text> | |
| 30 | 40 | </navigator> |
| 41 | + <navigator wx:else class="s1_gk_a2 flex" style="height: 100%;"> | |
| 42 | + <image src='/public/static/images/model/select.png' bindtap='sear'></image> | |
| 43 | + <input id="find_inp" class="find_inp2" value="" | |
| 44 | + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> | |
| 45 | + </navigator> | |
| 31 | 46 | </view> |
| 32 | 47 | |
| 33 | 48 | <view class='s2_right'> | ... | ... |
components/diy_searchbox/diy_searchbox.wxss
| ... | ... | @@ -60,9 +60,6 @@ |
| 60 | 60 | height: 30rpx; |
| 61 | 61 | margin-left: 10rpx; |
| 62 | 62 | margin-right: 4rpx; |
| 63 | - margin-bottom:-6rpx; | |
| 64 | -margin-top:20rpx; | |
| 65 | - | |
| 66 | 63 | } |
| 67 | 64 | |
| 68 | 65 | .s1_gk_a1{ |
| ... | ... | @@ -83,4 +80,9 @@ margin-top:20rpx; |
| 83 | 80 | |
| 84 | 81 | .abs_top2{ |
| 85 | 82 | position: fixed; z-index: 10; |
| 86 | -} | |
| 87 | 83 | \ No newline at end of file |
| 84 | +} | |
| 85 | + | |
| 86 | +.flex{ display: flex; align-items: center;} | |
| 87 | +.find_img{margin: 0 20rpx; } | |
| 88 | +.find_inp{text-align: left; width: 620rpx;} | |
| 89 | +.find_inp2{text-align: left; width: 520rpx;} | |
| 88 | 90 | \ No newline at end of file | ... | ... |
components/goods_list/g_filter.wxs
components/goods_list/goods_list.js
| ... | ... | @@ -62,7 +62,7 @@ Component({ |
| 62 | 62 | //--- 判断是等级会员,且在有效期范围内 --- |
| 63 | 63 | if (user.card_field && now < end) { |
| 64 | 64 | var card_name = ob.name_map.get(user.card_field); |
| 65 | - if (card_name.length > 4) card_name = card_name.substring(0, 4); | |
| 65 | + if (card_name.length > 6) card_name = card_name.substring(0, 6); | |
| 66 | 66 | th.setData({ |
| 67 | 67 | card_field: user.card_field, |
| 68 | 68 | card_name: card_name, |
| ... | ... | @@ -166,7 +166,6 @@ Component({ |
| 166 | 166 | card_name_map.set(name, plusCard[i].CardName); |
| 167 | 167 | new_arr.push(plusCard[i]); |
| 168 | 168 | |
| 169 | - | |
| 170 | 169 | } |
| 171 | 170 | } |
| 172 | 171 | var ob = { | ... | ... |
custom-tab-bar/index.wxss
| ... | ... | @@ -2,11 +2,11 @@ |
| 2 | 2 | width:100%; border-top: 1rpx solid #ebebeb; position: fixed; bottom: 0; left: 0; z-index: 10000; |
| 3 | 3 | } |
| 4 | 4 | .tabbar_item{ |
| 5 | - position:relative;height:100%;float:left;text-align:center;padding:5px 0; | |
| 5 | + position:relative;height:100%;float:left;text-align:center;padding:0px 0; | |
| 6 | 6 | } |
| 7 | 7 | .tab_img{display: flex; justify-content: center;align-items: center} |
| 8 | 8 | .nav_imgage{ |
| 9 | - height: 56rpx; width: 56rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%; | |
| 9 | + height: 54rpx; width: 54rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%; | |
| 10 | 10 | } |
| 11 | 11 | .cart_num{ |
| 12 | 12 | top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx; | ... | ... |
images/share/hui_hear_pic.png
images/share/mackground.png
images/share/s_gou.png
packageA/images/gt.png
0 → 100644
1.72 KB
packageA/pages/prom_list/prom_list.js
| ... | ... | @@ -770,7 +770,9 @@ Page({ |
| 770 | 770 | data: { |
| 771 | 771 | store_id: o.stoid, |
| 772 | 772 | is_show: 1, |
| 773 | - pageSize: 1000 | |
| 773 | + pageSize: 1000, | |
| 774 | + orderField:"sort", | |
| 775 | + orderType:'asc', | |
| 774 | 776 | }, |
| 775 | 777 | success: function(ee) { |
| 776 | 778 | if (ee.data.code == 0) { |
| ... | ... | @@ -795,12 +797,12 @@ Page({ |
| 795 | 797 | //----要进行门店分组-------- |
| 796 | 798 | for (var i = 0; i < sto_arr.length; i++) { |
| 797 | 799 | //找一下这个门店有没有在分类数组内 |
| 798 | - var find2 = 0, | |
| 799 | - find2name = ""; | |
| 800 | + var find2 = 0, find2name = "",sort=0; | |
| 800 | 801 | for (var m = 0; m < sto_cate.length; m++) { |
| 801 | 802 | if (sto_arr[i].category_id == sto_cate[m].cat_id) { |
| 802 | 803 | find2 = sto_cate[m].cat_id; |
| 803 | 804 | find2name = sto_cate[m].cat_name; |
| 805 | + sort=sto_cate[m].sort; | |
| 804 | 806 | break; |
| 805 | 807 | } |
| 806 | 808 | } |
| ... | ... | @@ -822,6 +824,7 @@ Page({ |
| 822 | 824 | var item = { |
| 823 | 825 | cat_id: find2, |
| 824 | 826 | name: find2name, |
| 827 | + sort:sort, | |
| 825 | 828 | s_arr: arr0 |
| 826 | 829 | }; |
| 827 | 830 | newarr.push(item); |
| ... | ... | @@ -837,6 +840,7 @@ Page({ |
| 837 | 840 | var item = { |
| 838 | 841 | cat_id: find2, |
| 839 | 842 | name: find2name, |
| 843 | + sort:sort, | |
| 840 | 844 | s_arr: arr0 |
| 841 | 845 | }; |
| 842 | 846 | newarr.push(item); |
| ... | ... | @@ -845,6 +849,18 @@ Page({ |
| 845 | 849 | } |
| 846 | 850 | } |
| 847 | 851 | } |
| 852 | + | |
| 853 | + //门店分类要排序下 | |
| 854 | + function compare(property){ | |
| 855 | + return function(a,b){ | |
| 856 | + var value1 = a[property]; | |
| 857 | + var value2 = b[property]; | |
| 858 | + return value1 - value2; | |
| 859 | + } | |
| 860 | + } | |
| 861 | + if(newarr.length>0) | |
| 862 | + newarr.sort(compare("sort")); | |
| 863 | + | |
| 848 | 864 | |
| 849 | 865 | //----安排其他的分类----- |
| 850 | 866 | if (qita.length > 0) { |
| ... | ... | @@ -1135,7 +1151,7 @@ Page({ |
| 1135 | 1151 | |
| 1136 | 1152 | if (bconfig.is_sort_storage) { |
| 1137 | 1153 | wx.getLocation({ |
| 1138 | - type: 'wgs84', | |
| 1154 | + type: 'gcj02', | |
| 1139 | 1155 | success: function(res) { |
| 1140 | 1156 | |
| 1141 | 1157 | th.data.lat = res.latitude; |
| ... | ... | @@ -1464,7 +1480,7 @@ Page({ |
| 1464 | 1480 | var e = th.data.bconfig; |
| 1465 | 1481 | if (e.is_sort_storage) { |
| 1466 | 1482 | wx.getLocation({ |
| 1467 | - type: 'wgs84', | |
| 1483 | + type: 'gcj02', | |
| 1468 | 1484 | success: function(res) { |
| 1469 | 1485 | th.data.lat = res.latitude; |
| 1470 | 1486 | th.data.lon = res.longitude; | ... | ... |
pages/cart/cart/cart.js
| ... | ... | @@ -159,6 +159,15 @@ Page({ |
| 159 | 159 | await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + item.goods_id, {}).then(res => { |
| 160 | 160 | good = res.data.data; |
| 161 | 161 | }) |
| 162 | + if(!good){ | |
| 163 | + var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | |
| 164 | + getApp().request.delete(url, { | |
| 165 | + success: function (t) { | |
| 166 | + } | |
| 167 | + }); | |
| 168 | + continue; | |
| 169 | + } | |
| 170 | + | |
| 162 | 171 | var tt = ut.gettimestamp(); |
| 163 | 172 | //如果商品下架了,或者商品是赠品,一开始都要清除 |
| 164 | 173 | if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0 || item.is_gift) { | ... | ... |
pages/cart/cart/cart.wxml
| ... | ... | @@ -107,7 +107,7 @@ |
| 107 | 107 | </view> |
| 108 | 108 | </block> |
| 109 | 109 | </view> |
| 110 | - <view class="pay-for flex-vertical-between" style="bottom:{{tabBar.isIpx ? '172rpx' : '100rpx'}}"> | |
| 110 | + <view class="pay-for flex-vertical-between"> | |
| 111 | 111 | <view class="allradio flex-vertical-between"> |
| 112 | 112 | <view class="flex-vertical mlr" bindtap="checkAll"> |
| 113 | 113 | <!--<radio class="order-raido" color="red" checked="{{checkAllToggle}}"></radio>--> | ... | ... |
pages/cart/cart/cart.wxss
| ... | ... | @@ -138,12 +138,11 @@ radio { |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | .pay-for { |
| 141 | - | |
| 142 | 141 | width: 100%; |
| 143 | - height: 100rpx; | |
| 142 | + height: 110rpx; | |
| 144 | 143 | position: fixed; |
| 145 | 144 | left: 0; |
| 146 | - bottom: 90rpx; | |
| 145 | + bottom: 130rpx; | |
| 147 | 146 | font-size: 28rpx; |
| 148 | 147 | color: #666; |
| 149 | 148 | background-color: rgb(255, 255, 255); | ... | ... |
pages/cart/cart2/cart2.js
| ... | ... | @@ -46,7 +46,9 @@ Page({ |
| 46 | 46 | bn_exp_type:1, //0是物流 1自提 |
| 47 | 47 | bn_pick:0, //选择的门店 |
| 48 | 48 | bn_pickname: "", //选择的门店名称 |
| 49 | - bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流 | |
| 49 | + bn_t_exp_t:0, //判断商品和门店一起决定的物流自提的方式0 都可以 1自提 2物流 | |
| 50 | + | |
| 51 | + bn_plus_cut_price:0, //显示等级卡会优惠多少钱 | |
| 50 | 52 | /*------------------------*/ |
| 51 | 53 | user_addr:null,//物流 |
| 52 | 54 | userinfo:null, //获取会员 |
| ... | ... | @@ -105,7 +107,11 @@ Page({ |
| 105 | 107 | //-- order_prom_list -- |
| 106 | 108 | order_prom_list_cart:null, |
| 107 | 109 | |
| 108 | - ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊 | |
| 110 | + ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊 | |
| 111 | + rank_switch:0, //是不是开同等级卡 | |
| 112 | + show_card:null, //显示的等级卡 | |
| 113 | + card_name:'', //显示的卡的名称 | |
| 114 | + card_cut_price:null,//减价多少钱 | |
| 109 | 115 | |
| 110 | 116 | }, |
| 111 | 117 | onLoad: function(t) { |
| ... | ... | @@ -113,7 +119,7 @@ Page({ |
| 113 | 119 | wx.setNavigationBarTitle({ title: "填写订单",}) |
| 114 | 120 | var th = this; this.setData({ is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow,}); |
| 115 | 121 | th.data.param=t; |
| 116 | - | |
| 122 | + | |
| 117 | 123 | //清空is_pick_up |
| 118 | 124 | getApp().request.put("/api/weshop/useraddress/updatePickUp", { |
| 119 | 125 | data: {user_id: getApp().globalData.user_id, is_pickup: 0}, |
| ... | ... | @@ -121,15 +127,7 @@ Page({ |
| 121 | 127 | } |
| 122 | 128 | }); |
| 123 | 129 | |
| 124 | - //先获取是否有关闭使用优惠券 | |
| 125 | - getApp().getConfig2(function (ee) { | |
| 126 | - var json_d = JSON.parse(ee.switch_list); | |
| 127 | - th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 | |
| 128 | - th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules}); | |
| 129 | - //-----先获取物流,再获取用户信息,再展示页面----- | |
| 130 | - th.get_wuliu(th.get_info(th.show_page)); | |
| 131 | - }) | |
| 132 | - | |
| 130 | + | |
| 133 | 131 | }, |
| 134 | 132 | onUnload: function () { this.setData({ isclose: 1 })}, |
| 135 | 133 | onHide: function () { |
| ... | ... | @@ -155,7 +153,6 @@ Page({ |
| 155 | 153 | console.log("getuser_addr") |
| 156 | 154 | console.log(ie) |
| 157 | 155 | |
| 158 | - | |
| 159 | 156 | //地址切换要把包邮券清空 |
| 160 | 157 | if( !th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){ |
| 161 | 158 | var using_quan=th.data.using_quan; |
| ... | ... | @@ -209,6 +206,57 @@ Page({ |
| 209 | 206 | getApp().globalData.is_cart2_old=0; |
| 210 | 207 | } |
| 211 | 208 | } |
| 209 | + | |
| 210 | + //先获取是否有关闭使用优惠券 | |
| 211 | + getApp().getConfig2(function (ee) { | |
| 212 | + var json_d = JSON.parse(ee.switch_list); | |
| 213 | + th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 | |
| 214 | + th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); | |
| 215 | + | |
| 216 | + var rank_switch=json_d.rank_switch; | |
| 217 | + var max_price=-1; | |
| 218 | + var show_card=null; | |
| 219 | + var name=""; | |
| 220 | + //如果有开等级卡的时候, | |
| 221 | + //因为都是调接口,要返回在计算 | |
| 222 | + if(rank_switch==2){ | |
| 223 | + //-- 获取所有的等级卡, -- | |
| 224 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid, | |
| 225 | + {}).then(res => { | |
| 226 | + if(res.data.code==0){ | |
| 227 | + var plusCard = res.data.data; | |
| 228 | + //-- 循环判断,拿到最贵的那张卡 -- | |
| 229 | + for(var ih in plusCard){ | |
| 230 | + if(plusCard[ih].IsStopBuy == true){ continue; } | |
| 231 | + if(max_price<0){ | |
| 232 | + max_price=plusCard[ih].CardFee; | |
| 233 | + name='card'+plusCard[ih]['CorrPrice']; | |
| 234 | + show_card=plusCard[ih]; | |
| 235 | + }else{ | |
| 236 | + if(max_price<plusCard[ih].CardFee){ | |
| 237 | + max_price=plusCard[ih].CardFee; | |
| 238 | + name='card'+plusCard[ih]['CorrPrice']; | |
| 239 | + show_card=plusCard[ih]; | |
| 240 | + } | |
| 241 | + } | |
| 242 | + } | |
| 243 | + | |
| 244 | + if(show_card){ | |
| 245 | + name=name.toLowerCase(); | |
| 246 | + th.setData({card_name:name,show_card:show_card}) | |
| 247 | + } | |
| 248 | + } | |
| 249 | + //-----先获取物流,再获取用户信息,再展示页面----- | |
| 250 | + th.get_wuliu(th.get_info(th.show_page)); | |
| 251 | + }) | |
| 252 | + }else{ | |
| 253 | + //-----先获取物流,再获取用户信息,再展示页面----- | |
| 254 | + th.get_wuliu(th.get_info(th.show_page)); | |
| 255 | + } | |
| 256 | + | |
| 257 | + }) | |
| 258 | + | |
| 259 | + | |
| 212 | 260 | }, |
| 213 | 261 | |
| 214 | 262 | //-------------------获取物流--------------- |
| ... | ... | @@ -304,6 +352,9 @@ Page({ |
| 304 | 352 | var arr = new Array(); |
| 305 | 353 | var carr = su.data.data.pageData; |
| 306 | 354 | th.data.cartlist_y = carr; //存储原始购物车列表 |
| 355 | + | |
| 356 | + //---是不是购买等级卡成功的返回---等级卡显示的判断--- | |
| 357 | + var is_card_back=getApp().globalData.is_card_back; | |
| 307 | 358 | |
| 308 | 359 | for (var i = 0; i < carr.length; i++) { |
| 309 | 360 | var item = carr[i]; |
| ... | ... | @@ -311,6 +362,26 @@ Page({ |
| 311 | 362 | if(item.prom_type==3 && item.is_gift!=1){ |
| 312 | 363 | await th.add_prom_goods_map(item); |
| 313 | 364 | } |
| 365 | + | |
| 366 | + //-- 如果是等级会员注册返回 -- | |
| 367 | + if(is_card_back){ | |
| 368 | + | |
| 369 | + // 拼团,搭配购不计算,赠品也不计算 | |
| 370 | + if( item['prom_type']!=5 && item['prom_type']!=6 && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){ | |
| 371 | + item.goods_price=item[th.data.card_name]; | |
| 372 | + carr[i].goods_price=item[th.data.card_name]; | |
| 373 | + } | |
| 374 | + }else{ | |
| 375 | + // 拼团,搭配购不计算,赠品也不计算,同时会员还未购买等级会员 | |
| 376 | + if(item[th.data.card_name]>0 && item['prom_type']!=5 && item['prom_type']!=6 && !th.data.userinfo.card_field | |
| 377 | + && !item.is_gift && !item['is_collocation'] && item.goods_price>item[th.data.card_name] ){ | |
| 378 | + item.cut_price= item.goods_price-item[th.data.card_name]; | |
| 379 | + carr[i].cut_price=item.goods_price-item[th.data.card_name]; | |
| 380 | + } | |
| 381 | + | |
| 382 | + } | |
| 383 | + | |
| 384 | + | |
| 314 | 385 | item.original_img = oo.imghost + item.original_img; |
| 315 | 386 | /*----接口要弄出来的,先顶着-----*/ |
| 316 | 387 | var pcid = item.pick_id; |
| ... | ... | @@ -320,7 +391,9 @@ Page({ |
| 320 | 391 | if (arr.length > 0) { |
| 321 | 392 | for (var j = 0; j < arr.length; j++) { |
| 322 | 393 | if (arr[j].pickup_id == pcid) { |
| 323 | - arr[j].goods.push(item); | |
| 394 | + arr[j].goods.push(item); | |
| 395 | + //-- 把等级卡会优惠多少钱装进去 -- | |
| 396 | + if(item.cut_price) arr[j].card_cut_price+=arr[j].cut_price; | |
| 324 | 397 | find = 1;break; |
| 325 | 398 | } |
| 326 | 399 | } |
| ... | ... | @@ -348,6 +421,7 @@ Page({ |
| 348 | 421 | |
| 349 | 422 | //如果是物流的话,全部自提的控制要弄成0 |
| 350 | 423 | if (e_t == 0) th.setData({ is_all_zt:0}); |
| 424 | + | |
| 351 | 425 | var narr = new Array(); narr.push(item); |
| 352 | 426 | |
| 353 | 427 | //-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号----------------- |
| ... | ... | @@ -359,9 +433,13 @@ Page({ |
| 359 | 433 | } |
| 360 | 434 | |
| 361 | 435 | var ie = { |
| 362 | - pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t, | |
| 436 | + pickup_id: pcid, pname: pikname, goods: narr, exp_type: e_t, wind: m_wind, distr_t: dis_t,card_cut_price:0, | |
| 363 | 437 | goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0}; |
| 438 | + | |
| 439 | + //-- 把等级卡会优惠多少钱装进去 -- | |
| 440 | + if(item.cut_price) ie.card_cut_price+=item.cut_price; | |
| 364 | 441 | arr.push(ie); |
| 442 | + | |
| 365 | 443 | } |
| 366 | 444 | } |
| 367 | 445 | //深拷贝 |
| ... | ... | @@ -414,6 +492,21 @@ Page({ |
| 414 | 492 | var item=th.data.wu_arr[k]; if(def_exp_code==item.code){ m_wind=k; } |
| 415 | 493 | } |
| 416 | 494 | } |
| 495 | + | |
| 496 | + //---是不是购买等级卡成功的返回---等级卡显示的判断--- | |
| 497 | + var is_card_back=getApp().globalData.is_card_back; | |
| 498 | + if(is_card_back){ | |
| 499 | + gg.goods_price=gd[th.data.card_name]; | |
| 500 | + getApp().globalData.is_card_back=0; | |
| 501 | + th.setData({card_cut_price:0}); | |
| 502 | + }else{ | |
| 503 | + //--- 商品不能是搭配购,商家等级卡开通的情况下, 会员不是等级会员的情况, 商品有设置等级卡价格,同时等级卡价格小于商品的价格 | |
| 504 | + if(gd['prom_type']!=5 && gd['prom_type']!=6 && th.data.card_name && gd[th.data.card_name]>0 && gg.goods_price>gd[th.data.card_name] && !th.data.userinfo.card_field){ | |
| 505 | + var cut_p= gg.goods_price-gd[th.data.card_name]; | |
| 506 | + th.setData({card_cut_price:cut_p}); | |
| 507 | + } | |
| 508 | + } | |
| 509 | + | |
| 417 | 510 | switch (gd.prom_type){ |
| 418 | 511 | case 0: |
| 419 | 512 | case 2: |
| ... | ... | @@ -480,7 +573,6 @@ Page({ |
| 480 | 573 | th.get_buy_now_quan(); |
| 481 | 574 | |
| 482 | 575 | }) |
| 483 | - | |
| 484 | 576 | }else{ |
| 485 | 577 | //--看是不是搭配促销-- |
| 486 | 578 | if(gg.prom_type==5){ |
| ... | ... | @@ -2942,7 +3034,13 @@ Page({ |
| 2942 | 3034 | } |
| 2943 | 3035 | } |
| 2944 | 3036 | return is_use; |
| 2945 | - } | |
| 3037 | + }, | |
| 3038 | + | |
| 3039 | + //跳转到购买卡 | |
| 3040 | + buycard:function(){ | |
| 3041 | + getApp().goto("/pages/user/plus/plus"); | |
| 3042 | + getApp().globalData.plus_buy_back=1; | |
| 3043 | + } | |
| 2946 | 3044 | |
| 2947 | 3045 | |
| 2948 | 3046 | ... | ... |
pages/cart/cart2/cart2.wxml
| ... | ... | @@ -3,518 +3,588 @@ |
| 3 | 3 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> |
| 4 | 4 | |
| 5 | 5 | <form bindsubmit="submitForm"> |
| 6 | - <view class="container"> | |
| 7 | - <!--要进行判断地址是否显示----> | |
| 8 | - <view bindtap="enterAddressPage" class="user-mes" | |
| 9 | - hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'> | |
| 10 | - <!---默认地址显示------> | |
| 11 | - <block wx:if="{{user_addr!=null}}"> | |
| 12 | - | |
| 13 | - <view class="user-contact"> | |
| 14 | - <text>收货人:</text>{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> | |
| 15 | - <view class="location"> | |
| 16 | - <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> | |
| 17 | - <view class="pos-icon"> | |
| 18 | - <image class="wh100" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
| 19 | - </view> | |
| 20 | - </view> | |
| 21 | - <view class="update-logistics"> | |
| 22 | - <!-- <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/new_position.png"></image> --> | |
| 23 | - <view class="xc-right"></view> | |
| 24 | - </view> | |
| 25 | - </block> | |
| 26 | - <!---先增地址------> | |
| 27 | - <block wx:else> | |
| 28 | - <view class="add_new"> | |
| 29 | - <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 | |
| 30 | - </view> | |
| 31 | - </block> | |
| 32 | - <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/order/new_dividing_line.png"></image></view> | |
| 33 | - </view> | |
| 34 | - | |
| 35 | - <!---------------------购物车进来,有可能多单----------------------> | |
| 36 | - <block wx:if="{{is_b_now==0}}"> | |
| 37 | - <view class="xc-border main-top"></view> | |
| 38 | - <view wx:for="{{cartlist}}" wx:for-index="pidx"> | |
| 39 | - <view class="use-item bfff"> | |
| 40 | - | |
| 41 | - <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>门店:{{item.pname}}</view></view> | |
| 42 | - <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> | |
| 43 | - <!----商品图片-----> | |
| 44 | - <view class="goods-img" style="position: relative"> | |
| 45 | - <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> | |
| 46 | - <image class="wh100" src="{{items.original_img}}" binderror='cart_set_err' | |
| 47 | - data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img' ></image> | |
| 48 | - </view> | |
| 49 | - <!----商品名称规格----> | |
| 50 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}"> | |
| 51 | - <view class="goods-name">{{items.goods_name}}</view> | |
| 52 | - <!-- 商品属性 --> | |
| 53 | - <view class="flex-vertical fs28 color-gray n_guige"> | |
| 54 | - <view class="goods-color"> | |
| 55 | - <block><text>{{filters.show_gui_ge(items.goods_spec,items.goods_color)}}</text></block> | |
| 56 | - <!--<block wx:if="{{!items.goods_spec && !items.goods_color}}"><text>规格1</text></block>--> | |
| 57 | - <!--<block wx:else>--> | |
| 58 | - <!--<text wx:if="{{items.goods_spec!=''}}">{{items.goods_spec}}<text wx:if="{{items.goods_color}}">/</text></text>--> | |
| 59 | - <!--<text wx:if="{{items.goods_color}}">{{items.goods_color}}</text>--> | |
| 60 | - <!--</block>--> | |
| 61 | - </view> | |
| 62 | - </view> | |
| 63 | - | |
| 64 | - | |
| 65 | - <!-----商品名称规格------> | |
| 66 | - <view class="order-num flex-space-between"> | |
| 67 | - <view class="co-red">¥<text class="fs36">{{filters.toFix(items.goods_price,2)}}</text></view> | |
| 68 | - <view class="goods-num">x{{items.goods_num}}</view> | |
| 69 | - </view> | |
| 70 | - </navigator> | |
| 71 | - | |
| 72 | - </view> | |
| 73 | - | |
| 74 | - <!-----使用优惠券------> | |
| 75 | - <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" | |
| 76 | - wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}" data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}"> | |
| 77 | - <view class="work-frame flex-space-between"> | |
| 78 | - <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view> | |
| 79 | - <view class="xc-right-frame"> | |
| 80 | - <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text> | |
| 81 | - <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text> | |
| 82 | - <text wx:if="{{using_quan[item.pickup_id].isby}}">包邮券</text> | |
| 6 | + <view class="container"> | |
| 7 | + <!--要进行判断地址是否显示----> | |
| 8 | + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'> | |
| 9 | + <!---默认地址显示------> | |
| 10 | + <block wx:if="{{user_addr!=null}}"> | |
| 11 | + | |
| 12 | + <view class="user-contact"> | |
| 13 | + <text>收货人:</text>{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> | |
| 14 | + <view class="location"> | |
| 15 | + <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> | |
| 16 | + <view class="pos-icon"> | |
| 17 | + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
| 18 | + </view> | |
| 19 | + </view> | |
| 20 | + <view class="update-logistics"> | |
| 21 | + <!-- <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/new_position.png"></image> --> | |
| 22 | + <view class="xc-right"></view> | |
| 23 | + </view> | |
| 24 | + </block> | |
| 25 | + <!---先增地址------> | |
| 26 | + <block wx:else> | |
| 27 | + <view class="add_new"> | |
| 28 | + <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 | |
| 29 | + </view> | |
| 30 | + </block> | |
| 31 | + <!-- <view class="border-img"> | |
| 32 | + <image class="wh100" src="{{imgUrl}}/miniapp/images/order/new_dividing_line.png"></image> | |
| 33 | + </view> --> | |
| 34 | + </view> | |
| 35 | + | |
| 36 | + <!---------------------购物车进来,有可能多单----------------------> | |
| 37 | + <block wx:if="{{is_b_now==0}}"> | |
| 38 | + <!-- <view class="xc-border main-top"></view> --> | |
| 39 | + <view wx:for="{{cartlist}}" wx:for-index="pidx"> | |
| 40 | + <view class="use-item bfff bdr_t-14 mgt20"> | |
| 41 | + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image> | |
| 42 | + <!-- <view>门店:{{item.pname}}</view> --> | |
| 43 | + <view>{{item.pname}}</view> | |
| 44 | + </view> | |
| 45 | + <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> | |
| 46 | + <!----商品图片-----> | |
| 47 | + <view class="goods-img" style="position: relative"> | |
| 48 | + <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> | |
| 49 | + <image class="wh100 bdr14" src="{{items.original_img}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img'></image> | |
| 50 | + </view> | |
| 51 | + <!----商品名称规格----> | |
| 52 | + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}"> | |
| 53 | + <view class="goods-name ellipsis-2">{{items.goods_name}}</view> | |
| 54 | + <!-- 商品属性 --> | |
| 55 | + <view class="flex-vertical fs28 color-gray n_guige"> | |
| 56 | + <view class="goods-color"> | |
| 57 | + <block><text>{{filters.show_gui_ge(items.goods_spec,items.goods_color)}}</text></block> | |
| 58 | + <!--<block wx:if="{{!items.goods_spec && !items.goods_color}}"><text>规格1</text></block>--> | |
| 59 | + <!--<block wx:else>--> | |
| 60 | + <!--<text wx:if="{{items.goods_spec!=''}}">{{items.goods_spec}}<text wx:if="{{items.goods_color}}">/</text></text>--> | |
| 61 | + <!--<text wx:if="{{items.goods_color}}">{{items.goods_color}}</text>--> | |
| 62 | + <!--</block>--> | |
| 63 | + </view> | |
| 64 | + </view> | |
| 65 | + | |
| 66 | + | |
| 67 | + <!-----商品名称规格------> | |
| 68 | + <view class="order-num flex-space-between"> | |
| 69 | + <view class="co-red">¥<text class="fs36">{{filters.toFix(items.goods_price,2)}}</text></view> | |
| 70 | + <view class="goods-num">x{{items.goods_num}}</view> | |
| 71 | + </view> | |
| 72 | + </navigator> | |
| 73 | + </view> | |
| 74 | + | |
| 75 | + | |
| 76 | + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> | |
| 77 | + <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}"> | |
| 78 | + <view class="flex"> | |
| 79 | + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> | |
| 80 | + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 81 | + <text class="card_name">{{show_card.CardName}}</text> | |
| 82 | + </view> | |
| 83 | + <view>立减 <text style="color:#f23030;">{{filters.toFix(item.card_cut_price,2) }}</text> 元</view> | |
| 84 | + </view> | |
| 85 | + <view> | |
| 86 | + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text> | |
| 87 | + </view> | |
| 88 | + <!-- 三角形 --> | |
| 89 | + <view class="car_tri_up"></view> | |
| 90 | + <!-- 立即开通跳转 --> | |
| 91 | + <view bindtap="buycard" class="card_op">立即开通</view> | |
| 92 | + </view> | |
| 93 | + | |
| 94 | + | |
| 95 | + <!-----使用优惠券------> | |
| 96 | + <view class="xc-coupon-frame flex-center" data-bn="0" bindtap="open_coupon_list" wx:if="{{(item.quan_list && item.quan_list.length>0) || get_by_quan_list_cart[item.pickup_id]!=null}}" | |
| 97 | + data-cind="{{pidx}}" data-pickid="{{item.pickup_id}}"> | |
| 98 | + <view class="work-frame flex-space-between"> | |
| 99 | + <view class="work">优惠券<text class="quan_num_show fs20">{{item.can_num}}张可用</text></view> | |
| 100 | + <view class="xc-right-frame"> | |
| 101 | + <text wx:if="{{using_quan[item.pickup_id].is_nouse}}">不使用</text> | |
| 102 | + <text wx:if="{{using_quan[item.pickup_id].money}}">¥{{using_quan[item.pickup_id].money}}元优惠券</text> | |
| 103 | + <text wx:if="{{using_quan[item.pickup_id].isby}}">包邮券</text> | |
| 83 | 104 | <view class="xc-right"></view> |
| 84 | - </view> | |
| 85 | - </view> | |
| 86 | - </view> | |
| 87 | - | |
| 88 | - | |
| 89 | - <view class="set-mes"> | |
| 90 | - <view wx:if="{{order.store_prom}}"> | |
| 91 | - <icon color="#f23030" size="16" type="info"></icon> | |
| 92 | - {{order.store_prom}} | |
| 93 | - </view> | |
| 94 | - <view class="use-item flex-space-between"> | |
| 95 | - <view class="flex-vertical"> | |
| 96 | - <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type'style="display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> | |
| 97 | - <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> | |
| 98 | - | |
| 99 | - | |
| 100 | - | |
| 101 | - <block wx:if="{{item.exp_type==1}}"> | |
| 102 | - <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> --> | |
| 103 | - <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon> | |
| 104 | - </block> | |
| 105 | - <block wx:else> | |
| 106 | - <view class="circle xc-hookts on"></view> | |
| 107 | - </block> | |
| 108 | - <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">门店自提</view> | |
| 109 | - </view> | |
| 110 | - | |
| 111 | - <view data-t='0' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w" style="display:{{item.distr_t==1?'none':'flex;align-items: center'}};"> | |
| 112 | - <!-- <icon bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==0?'red':'gray'}}" size="16" type="success"></icon> --> | |
| 113 | - <block wx:if="{{item.exp_type==0}}"> | |
| 114 | - <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> --> | |
| 115 | - <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon> | |
| 116 | - </block> | |
| 117 | - <block wx:else> | |
| 118 | - <view class="circle xc-hookts on"></view> | |
| 119 | - </block> | |
| 120 | - | |
| 121 | - <view bindtap='setexptype_w' data-t='0' data-ind="{{pidx}}" | |
| 122 | - data-txt='cartlist[{{pidx}}].exp_type' | |
| 123 | - data-wl_txt='cartlist[{{pidx}}].wind' | |
| 124 | - class="yu_er">快递邮寄</view> | |
| 125 | - </view> | |
| 126 | - </view> | |
| 127 | - <block wx:if="{{item.exp_type==0}}"> | |
| 128 | - <!-- 点击显示物流选择 --> | |
| 129 | - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}"> | |
| 130 | - <view >{{wu_arr[item.wind].name}}</view><view class="xc-right"></view> | |
| 131 | - </view> | |
| 132 | - </block> | |
| 133 | - </view> | |
| 134 | - | |
| 135 | - <!-- <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'> | |
| 105 | + </view> | |
| 106 | + </view> | |
| 107 | + </view> | |
| 108 | + | |
| 109 | + | |
| 110 | + <view class="set-mes bdr_b-14"> | |
| 111 | + <view wx:if="{{order.store_prom}}"> | |
| 112 | + <icon color="#f23030" size="16" type="info"></icon> | |
| 113 | + {{order.store_prom}} | |
| 114 | + </view> | |
| 115 | + <view class="use-item flex-space-between"> | |
| 116 | + <view class="flex-vertical"> | |
| 117 | + <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};"> | |
| 118 | + <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + <block wx:if="{{item.exp_type==1}}"> | |
| 123 | + <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> --> | |
| 124 | + <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon> | |
| 125 | + </block> | |
| 126 | + <block wx:else> | |
| 127 | + <view class="circle xc-hookts on"></view> | |
| 128 | + </block> | |
| 129 | + <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">门店自提</view> | |
| 130 | + </view> | |
| 131 | + | |
| 132 | + <view data-t='0' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w" style="display:{{item.distr_t==1?'none':'flex;align-items: center'}};"> | |
| 133 | + <!-- <icon bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==0?'red':'gray'}}" size="16" type="success"></icon> --> | |
| 134 | + <block wx:if="{{item.exp_type==0}}"> | |
| 135 | + <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> --> | |
| 136 | + <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon> | |
| 137 | + </block> | |
| 138 | + <block wx:else> | |
| 139 | + <view class="circle xc-hookts on"></view> | |
| 140 | + </block> | |
| 141 | + | |
| 142 | + <view bindtap='setexptype_w' data-t='0' data-ind="{{pidx}}" data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind' | |
| 143 | + class="yu_er">快递邮寄</view> | |
| 144 | + </view> | |
| 145 | + </view> | |
| 146 | + <block wx:if="{{item.exp_type==0}}"> | |
| 147 | + <!-- 点击显示物流选择 --> | |
| 148 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;"> | |
| 149 | + <view>{{wu_arr[item.wind].name}}</view> | |
| 150 | + <view class="xc-right"></view> | |
| 151 | + </view> | |
| 152 | + </block> | |
| 153 | + </view> | |
| 154 | + | |
| 155 | + <!-- <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'> | |
| 136 | 156 | <view>选择物流:</view> --> |
| 137 | - <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind' value="{{item.wind}}" range="{{wu_arr}}" range-key="name"> | |
| 157 | + <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind' value="{{item.wind}}" range="{{wu_arr}}" range-key="name"> | |
| 138 | 158 | <view >{{wu_arr[item.wind].name}}</view> |
| 139 | 159 | </picker> --> |
| 140 | - <!-- </view> --> | |
| 141 | - </view> | |
| 142 | - | |
| 143 | - <!-- 留言 --> | |
| 144 | - <view class="coupon-mes flex-vertical"> | |
| 145 | - <view>留言</view> | |
| 146 | - <view class="leave-word"> | |
| 147 | - <input placeholder-class="fs28" placeholder='给商家留言,最多100字'bindinput="keyUpChangeNum" | |
| 148 | - disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></input> | |
| 149 | - | |
| 150 | - </view> | |
| 151 | - </view> | |
| 152 | - | |
| 153 | - </view> | |
| 154 | - | |
| 155 | - <!-----使用余额------> | |
| 156 | - <view class="set-mes" wx:if="{{yuer>0}}"> | |
| 157 | - <view class="use-item" bindtap='set_js_useyuer'> | |
| 158 | - <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 159 | - <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 160 | - </view> | |
| 161 | - </view> | |
| 162 | - | |
| 163 | - </block> | |
| 164 | - | |
| 165 | - <!------立即购买--------> | |
| 166 | - <view class="xc-border xc-border"></view> | |
| 167 | - <block wx:if="{{is_b_now==1}}"> | |
| 168 | - <view class="use-item bfff"> | |
| 169 | - <image class="dp" src='{{imgUrl}}/miniapp/images/dianpu.png'> </image> <view>门店:{{bn_pickname}}</view></view> | |
| 170 | - <view class="order-detail"> | |
| 171 | - <view class="goods-img"> | |
| 172 | - <image class="wh100" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> | |
| 173 | - </view> | |
| 174 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | |
| 175 | - <view class="goods-name">{{bn_goods.goods_name}}</view> | |
| 176 | - <!-- 商品属性 --> | |
| 177 | - <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
| 178 | - <view class="goods-color"> | |
| 179 | - <block><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text></block> | |
| 180 | - <!--<block wx:if="{{!bn_goods.goods_spec && !bn_goods.goods_color}}"><text>规格1</text></block>--> | |
| 181 | - <!--<block wx:else>--> | |
| 182 | - <!--<text wx:if="{{bn_goods.goods_spec!=''}}">{{bn_goods.goods_spec}}<text wx:if="{{bn_goods.goods_color}}">/</text></text>--> | |
| 183 | - <!--<text wx:if="{{bn_goods.goods_color}}">{{bn_goods.goods_color}}</text>--> | |
| 184 | - <!--</block>--> | |
| 185 | - </view> | |
| 186 | - </view> | |
| 187 | - | |
| 188 | - <!-----商品名称规格------> | |
| 189 | - <view class="order-num flex-space-between"> | |
| 190 | - <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view> | |
| 191 | - <view class="goods-num">x{{bn_goods.buynum}}</view> | |
| 192 | - </view> | |
| 193 | - </navigator> | |
| 194 | - | |
| 195 | - </view> | |
| 196 | - <!-- 赠品的显示 --> | |
| 197 | - <view class="order-detail" wx:if="{{buy_now_gift_goods}}"> | |
| 198 | - <view class="goods-img" style="position: relative"> | |
| 199 | - <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> | |
| 200 | - | |
| 201 | - <image class="wh100" src="{{buy_now_gift_goods.original_img}}" binderror='cart_set_err' data-err="buy_now_gift_goods.original_img"></image> | |
| 202 | - </view> | |
| 203 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{buy_now_gift_goods.goods_id}}"> | |
| 204 | - <view class="goods-name">{{buy_now_gift_goods.goods_name}}</view> | |
| 205 | - <!-- 商品属性 --> | |
| 206 | - <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
| 207 | - <view class="goods-color"> | |
| 208 | - <block><text>{{filters.show_gui_ge(buy_now_gift_goods.goods_spec,buy_now_gift_goods.goods_color)}}</text></block> | |
| 209 | - </view> | |
| 210 | - </view> | |
| 211 | - <!-----商品名称规格------> | |
| 212 | - <view class="order-num flex-space-between"> | |
| 213 | - <view class="co-red">¥<text class="fs36">0</text></view> | |
| 214 | - <view class="goods-num">x{{buy_now_gift_goods.buynum}}</view> | |
| 215 | - </view> | |
| 216 | - </navigator> | |
| 217 | - </view> | |
| 218 | - | |
| 219 | - | |
| 220 | - <block wx:if="{{collocation_goods}}"> | |
| 221 | - <!-- 搭配购买的功能实现 --> | |
| 222 | - <view class="order-detail" wx:for="{{collocation_goods}}"> | |
| 223 | - <view class="goods-img"> | |
| 224 | - <image class="wh100" src="{{imgUrl+item.original_img}}" binderror='err_img_collocation' data-err="item.original_img"></image> | |
| 225 | - </view> | |
| 226 | - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
| 227 | - <view class="goods-name">{{item.goods_name}}</view> | |
| 228 | - <!-- 商品属性 --> | |
| 229 | - <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
| 230 | - <view class="goods-color"> | |
| 231 | - <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block> | |
| 232 | - </view> | |
| 233 | - </view> | |
| 234 | - <!-----商品名称规格------> | |
| 235 | - <view class="order-num flex-space-between"> | |
| 236 | - <view class="co-red">¥<text class="fs36">{{item.price}}</text></view> | |
| 237 | - <view class="goods-num">x{{item.goods_num}}</view> | |
| 238 | - </view> | |
| 239 | - </navigator> | |
| 240 | - </view> | |
| 241 | - </block> | |
| 242 | - | |
| 243 | - | |
| 244 | - <view class="set-mes"> | |
| 245 | - <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} | |
| 246 | - </view> | |
| 247 | - | |
| 248 | - <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" | |
| 249 | - wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | |
| 250 | - <view class="work-frame flex-space-between"> | |
| 251 | - <view class="work"> | |
| 252 | - 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text> | |
| 253 | - </view> | |
| 254 | - <view class="xc-right-frame"> | |
| 255 | - <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text> | |
| 256 | - <block wx:else> | |
| 257 | - <text wx:if="{{using_quan[bn_pick].money}}">¥{{using_quan[bn_pick].money}}元优惠券</text> | |
| 258 | - <text wx:if="{{using_quan[bn_pick].isby}}">包邮券</text> | |
| 259 | - </block> | |
| 260 | - <view class="xc-right"></view> | |
| 261 | - </view> | |
| 262 | - </view> | |
| 263 | - </view> | |
| 264 | - | |
| 265 | - <view class="use-item flex-space-between"> | |
| 266 | - <view class="flex"> | |
| 267 | - <view bindtap='setexptype' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};"> | |
| 268 | - <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> | |
| 269 | - <view class="yu_er">自提</view> | |
| 270 | - </view> | |
| 271 | - <view bindtap='setexptype' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};"> | |
| 272 | - <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon> | |
| 273 | - <view class="yu_er">物流</view> | |
| 274 | - </view> | |
| 275 | -</view> | |
| 276 | - <block wx:if="{{bn_exp_type==0}}"> | |
| 277 | - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'><view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view></view> | |
| 278 | - </block> | |
| 279 | - </view> | |
| 280 | - </view> | |
| 281 | - | |
| 282 | - <!-----使用余额------> | |
| 283 | - <view class="set-mes" wx:if="{{yuer>0}}"> | |
| 284 | - <view class="use-item" bindtap='set_bn_useyuer'> | |
| 285 | - <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 286 | - <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 287 | - </view> | |
| 288 | - </view> | |
| 289 | - <view class="coupon-mes flex-vertical"> | |
| 290 | - <view>留言</view> | |
| 291 | - <view class="leave-word"> | |
| 292 | - <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}" class="word-box" maxlength="100" name="user_note"></input> | |
| 293 | - | |
| 294 | - </view> | |
| 295 | - </view> | |
| 296 | - </block> | |
| 297 | - | |
| 298 | - <view class="information"> | |
| 299 | - <view class="item" wx:if="{{formData.all_price>0}}"> | |
| 300 | - <view>商品金额</view> | |
| 301 | - <view class="co-red">¥ {{formData.all_price}}元</view> | |
| 302 | - </view> | |
| 303 | - <view class="item" wx:if="{{formData.shipping_price>0}}"> | |
| 304 | - <view>配送费用</view> | |
| 305 | - <view class="co-red">¥ {{formData.shipping_price}}元</view> | |
| 306 | - </view> | |
| 307 | - <view class="item" wx:if="{{formData.coupon_price>0}}"> | |
| 308 | - <view>使用优惠券</view> | |
| 309 | - <view class="co-red">- ¥ {{formData.coupon_price}}元</view> | |
| 310 | - </view> | |
| 311 | - <!-- 优惠活动优惠金额 --> | |
| 312 | - <view class="item" wx:if="{{formData.cut_price>0}}"> | |
| 313 | - <view>优惠活动</view> | |
| 314 | - <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view> | |
| 315 | - </view> | |
| 316 | - <!-- 订单优惠优惠金额 --> | |
| 317 | - <view class="item" wx:if="{{formData.order_prom_amount>0}}"> | |
| 318 | - <view>订单优惠</view> | |
| 319 | - <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount,2)}}元</view> | |
| 320 | - </view> | |
| 321 | - <view class="item" wx:if="{{formData.user_money>0}}"> | |
| 322 | - <view>使用余额</view> | |
| 323 | - <view class="co-red">- ¥ {{formData.user_money}}元</view> | |
| 324 | - </view> | |
| 325 | - </view> | |
| 326 | - </view> | |
| 327 | - | |
| 328 | - <view class="btn-wrap"> | |
| 329 | - <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 330 | - <view class="pay-amount"> | |
| 331 | - <view class="payable">应付金额 : </view> | |
| 332 | - <view class="co-red big">¥ {{formData.order_amount}}元</view> | |
| 333 | - </view> | |
| 334 | - </view> | |
| 160 | + <!-- </view> --> | |
| 161 | + </view> | |
| 162 | + | |
| 163 | + <!-- 留言 --> | |
| 164 | + <view class="coupon-mes flex-vertical"> | |
| 165 | + <view>留言</view> | |
| 166 | + <view class="leave-word"> | |
| 167 | + <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}" | |
| 168 | + class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></input> | |
| 169 | + | |
| 170 | + </view> | |
| 171 | + </view> | |
| 172 | + | |
| 173 | + </view> | |
| 174 | + | |
| 175 | + <!-----使用余额------> | |
| 176 | + <view class="set-mes bdr_t-14" wx:if="{{yuer>0}}"> | |
| 177 | + <view class="use-item" bindtap='set_js_useyuer'> | |
| 178 | + <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 179 | + <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 180 | + </view> | |
| 181 | + </view> | |
| 182 | + | |
| 183 | + </block> | |
| 184 | + | |
| 185 | + <!------立即购买--------> | |
| 186 | + <!-- <view class="xc-border xc-border"></view> --> | |
| 187 | + <block wx:if="{{is_b_now==1}}"> | |
| 188 | + <view class="use-item bfff bdr_t-14 mgt20"> | |
| 189 | + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> | |
| 190 | + <view>{{bn_pickname}}</view> | |
| 191 | + <!-- <view>门店:{{bn_pickname}}</view> --> | |
| 192 | + </view> | |
| 193 | + <view class="order-detail"> | |
| 194 | + <view class="goods-img"> | |
| 195 | + <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image> | |
| 196 | + </view> | |
| 197 | + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> | |
| 198 | + <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | |
| 199 | + <!-- 商品属性 --> | |
| 200 | + <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
| 201 | + <view class="goods-color"> | |
| 202 | + <block><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text></block> | |
| 203 | + <!--<block wx:if="{{!bn_goods.goods_spec && !bn_goods.goods_color}}"><text>规格1</text></block>--> | |
| 204 | + <!--<block wx:else>--> | |
| 205 | + <!--<text wx:if="{{bn_goods.goods_spec!=''}}">{{bn_goods.goods_spec}}<text wx:if="{{bn_goods.goods_color}}">/</text></text>--> | |
| 206 | + <!--<text wx:if="{{bn_goods.goods_color}}">{{bn_goods.goods_color}}</text>--> | |
| 207 | + <!--</block>--> | |
| 208 | + </view> | |
| 209 | + </view> | |
| 210 | + | |
| 211 | + <!-----商品名称规格------> | |
| 212 | + <view class="order-num flex-space-between"> | |
| 213 | + <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view> | |
| 214 | + <view class="goods-num">x{{bn_goods.buynum}}</view> | |
| 215 | + </view> | |
| 216 | + </navigator> | |
| 217 | + | |
| 218 | + </view> | |
| 219 | + <!-- 赠品的显示 --> | |
| 220 | + <view class="order-detail" wx:if="{{buy_now_gift_goods}}"> | |
| 221 | + <view class="goods-img" style="position: relative"> | |
| 222 | + <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> | |
| 223 | + | |
| 224 | + <image class="wh100 bdr14" src="{{buy_now_gift_goods.original_img}}" binderror='cart_set_err' data-err="buy_now_gift_goods.original_img"></image> | |
| 225 | + </view> | |
| 226 | + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{buy_now_gift_goods.goods_id}}"> | |
| 227 | + <view class="goods-name ellipsis-2">{{buy_now_gift_goods.goods_name}}</view> | |
| 228 | + <!-- 商品属性 --> | |
| 229 | + <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
| 230 | + <view class="goods-color"> | |
| 231 | + <block><text>{{filters.show_gui_ge(buy_now_gift_goods.goods_spec,buy_now_gift_goods.goods_color)}}</text></block> | |
| 232 | + </view> | |
| 233 | + </view> | |
| 234 | + <!-----商品名称规格------> | |
| 235 | + <view class="order-num flex-space-between"> | |
| 236 | + <view class="co-red">¥<text class="fs36">0</text></view> | |
| 237 | + <view class="goods-num">x{{buy_now_gift_goods.buynum}}</view> | |
| 238 | + </view> | |
| 239 | + </navigator> | |
| 240 | + </view> | |
| 241 | + | |
| 242 | + | |
| 243 | + <block wx:if="{{collocation_goods}}"> | |
| 244 | + <!-- 搭配购买的功能实现 --> | |
| 245 | + <view class="order-detail" wx:for="{{collocation_goods}}"> | |
| 246 | + <view class="goods-img"> | |
| 247 | + <image class="wh100 bdr14" src="{{imgUrl+item.original_img}}" binderror='err_img_collocation' data-err="item.original_img"></image> | |
| 248 | + </view> | |
| 249 | + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> | |
| 250 | + <view class="goods-name ellipsis-2">{{item.goods_name}}</view> | |
| 251 | + <!-- 商品属性 --> | |
| 252 | + <view class="flex-vertical fs28 xc-ash color-gray n_guige"> | |
| 253 | + <view class="goods-color"> | |
| 254 | + <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block> | |
| 255 | + </view> | |
| 256 | + </view> | |
| 257 | + <!-----商品名称规格------> | |
| 258 | + <view class="order-num flex-space-between"> | |
| 259 | + <view class="co-red">¥<text class="fs36">{{item.price}}</text></view> | |
| 260 | + <view class="goods-num">x{{item.goods_num}}</view> | |
| 261 | + </view> | |
| 262 | + </navigator> | |
| 263 | + </view> | |
| 264 | + </block> | |
| 265 | + | |
| 266 | + <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> | |
| 267 | + <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> | |
| 268 | + <view class="flex"> | |
| 269 | + <view class="card_bg ellipsis-1" style="margin-right: 10rpx;"> | |
| 270 | + <image src="{{imgUrl}}/miniapp/images/plus/dj_icon.png"></ image> | |
| 271 | + <text class="card_name">{{show_card.CardName}}</text> | |
| 272 | + </view> | |
| 273 | + <view>立减 <text style="color:#f23030;">{{filters.toFix(card_cut_price,2) }}</text> 元</view> | |
| 274 | + </view> | |
| 275 | + <view> | |
| 276 | + <text style="color: #999;margin-left: 4rpx;">vip超级会员仅需{{show_card.CardFee}}元</text> | |
| 277 | + </view> | |
| 278 | + <!-- 三角形 --> | |
| 279 | + <view class="car_tri_up"></view> | |
| 280 | + <!-- 立即开通跳转 --> | |
| 281 | + <view bindtap="buycard" class="card_op">立即开通</view> | |
| 282 | + </view> | |
| 283 | + | |
| 284 | + | |
| 285 | + <view class="set-mes bdr_b-14"> | |
| 286 | + <view wx:if="{{order.store_prom}}"> | |
| 287 | + <icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} | |
| 288 | + </view> | |
| 289 | + | |
| 290 | + <view class="xc-coupon-frame flex-center" data-bn="1" bindtap="open_coupon_list" data-pickid="{{bn_pick}}" wx:if="{{(selected_quan_list && selected_quan_list.length>0) || get_by_quan_list!=null}}"> | |
| 291 | + <view class="work-frame flex-space-between"> | |
| 292 | + <view class="work"> | |
| 293 | + 优惠券 <text class="quan_num_show">{{(selected_quan_list?selected_quan_list.length:0)+ (get_by_quan_list?get_by_quan_list.length:0)}}张可用</text> | |
| 294 | + </view> | |
| 295 | + <view class="xc-right-frame"> | |
| 296 | + <text wx:if="{{using_quan[bn_pick].is_nouse}}">不使用</text> | |
| 297 | + <block wx:else> | |
| 298 | + <text wx:if="{{using_quan[bn_pick].money}}">¥{{using_quan[bn_pick].money}}元优惠券</text> | |
| 299 | + <text wx:if="{{using_quan[bn_pick].isby}}">包邮券</text> | |
| 300 | + </block> | |
| 301 | + <view class="xc-right"></view> | |
| 302 | + </view> | |
| 303 | + </view> | |
| 304 | + </view> | |
| 305 | + | |
| 306 | + <view class="use-item flex-space-between"> | |
| 307 | + <view class="flex"> | |
| 308 | + <view bindtap='setexptype' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};"> | |
| 309 | + <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> | |
| 310 | + <view class="yu_er">门店自提</view> | |
| 311 | + </view> | |
| 312 | + <view bindtap='setexptype' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};"> | |
| 313 | + <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon> | |
| 314 | + <view class="yu_er">快递邮寄</view> | |
| 315 | + </view> | |
| 316 | + </view> | |
| 317 | + <block wx:if="{{bn_exp_type==0}}"> | |
| 318 | + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'> | |
| 319 | + <view class="logistics-name">{{wu_arr[index].name}}</view> | |
| 320 | + <view class="xc-right"></view> | |
| 321 | + </view> | |
| 322 | + </block> | |
| 323 | + </view> | |
| 324 | + </view> | |
| 325 | + | |
| 326 | + <view class="coupon-mes flex-vertical"> | |
| 327 | + <view>留言</view> | |
| 328 | + <view class="leave-word"> | |
| 329 | + <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}" | |
| 330 | + class="word-box" maxlength="100" name="user_note"></input> | |
| 331 | + </view> | |
| 332 | + </view> | |
| 333 | + | |
| 334 | + <!-----使用余额------> | |
| 335 | + <view class="set-mes bdr_t-14" wx:if="{{yuer>0}}"> | |
| 336 | + <view class="use-item" bindtap='set_bn_useyuer'> | |
| 337 | + <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 338 | + <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 339 | + </view> | |
| 340 | + </view> | |
| 341 | + | |
| 342 | + </block> | |
| 343 | + | |
| 344 | + <view class="information bdr_b-14"> | |
| 345 | + <view class="item" wx:if="{{formData.all_price>0}}"> | |
| 346 | + <view>商品金额</view> | |
| 347 | + <view class="co-red">¥ {{formData.all_price}}元</view> | |
| 348 | + </view> | |
| 349 | + <view class="item" wx:if="{{formData.shipping_price>0}}"> | |
| 350 | + <view>配送费用</view> | |
| 351 | + <view class="co-red">¥ {{formData.shipping_price}}元</view> | |
| 352 | + </view> | |
| 353 | + <view class="item" wx:if="{{formData.coupon_price>0}}"> | |
| 354 | + <view>使用优惠券</view> | |
| 355 | + <view class="co-red">- ¥ {{formData.coupon_price}}元</view> | |
| 356 | + </view> | |
| 357 | + <!-- 优惠活动优惠金额 --> | |
| 358 | + <view class="item" wx:if="{{formData.cut_price>0}}"> | |
| 359 | + <view>优惠活动</view> | |
| 360 | + <view class="co-red">- ¥ {{filters.toFix(formData.cut_price,2)}}元</view> | |
| 361 | + </view> | |
| 362 | + <!-- 订单优惠优惠金额 --> | |
| 363 | + <view class="item" wx:if="{{formData.order_prom_amount>0}}"> | |
| 364 | + <view>订单优惠</view> | |
| 365 | + <view class="co-red">- ¥ {{filters.toFix(formData.order_prom_amount,2)}}元</view> | |
| 366 | + </view> | |
| 367 | + <view class="item" wx:if="{{formData.user_money>0}}"> | |
| 368 | + <view>使用余额</view> | |
| 369 | + <view class="co-red">- ¥ {{formData.user_money}}元</view> | |
| 370 | + </view> | |
| 371 | + </view> | |
| 372 | + </view> | |
| 373 | + | |
| 374 | + <view class="btn-wrap shadow-1"> | |
| 375 | + <view class="pay-amount"> | |
| 376 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 377 | + <!-- <view class="co-red big"></view> --> | |
| 378 | + </view> | |
| 379 | + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 380 | + </view> | |
| 335 | 381 | </form> |
| 336 | 382 | |
| 337 | 383 | <!-- 使用券列表的弹窗 --> |
| 338 | -<view wx:if='{{open_quan==1}}' > | |
| 339 | - <view class="cover-layer flex-center " bindtap='close_coupon'> </view> | |
| 340 | - <view class="cx-popup {{open_quan==true?'up' : 'down'}}" > | |
| 384 | +<view wx:if='{{open_quan==1}}'> | |
| 385 | + <view class="cover-layer flex-center " bindtap='close_coupon'> </view> | |
| 386 | + <view class="cx-popup {{open_quan==true?'up' : 'down'}}"> | |
| 341 | 387 | <!-- 最上面 --> |
| 342 | - <view class="top flex"> | |
| 343 | - <view class="xc-top-content t-c"><view class="xc-title">优惠券使用</view></view> | |
| 344 | - <view class="xc-close-frame" bindtap='close_coupon' ><view class="xc-close">×</view></view> | |
| 345 | - </view> | |
| 346 | - <!-- 使用优惠券和不使用优惠券层--> | |
| 347 | - <view class="may_use_coupon fs28 flex"> 可使用的优惠券 | |
| 348 | - <view class=" is_use_coupon flex-vertical" bindtap="sele_quan_item" data-no="1">不使用优惠券 | |
| 349 | - <block wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"><view class="circle white xc-hooka fs20 red-b sn"><text>Γ</text></view> </block> | |
| 350 | - <block wx:else><view class="circle xc-hookst ons"></view></block> | |
| 351 | - </view> | |
| 352 | - </view> | |
| 353 | - | |
| 354 | - <!-- 中间券内容显示 --> | |
| 355 | - <view class="xc-frame flex-level"> | |
| 356 | - <view class="list-frame"> | |
| 357 | - <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}" wx:for-item="item" wx:for-index="q_index"> | |
| 358 | - <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}"> | |
| 388 | + <view class="top flex"> | |
| 389 | + <view class="xc-top-content t-c"> | |
| 390 | + <view class="xc-title">优惠券使用</view> | |
| 391 | + </view> | |
| 392 | + <view class="xc-close-frame" bindtap='close_coupon'> | |
| 393 | + <view class="xc-close">×</view> | |
| 394 | + </view> | |
| 395 | + </view> | |
| 396 | + <!-- 使用优惠券和不使用优惠券层--> | |
| 397 | + <view class="may_use_coupon fs28 flex"> 可使用的优惠券 | |
| 398 | + <view class=" is_use_coupon flex-vertical" bindtap="sele_quan_item" data-no="1">不使用优惠券 | |
| 399 | + <block wx:if="{{using_quan[selected_quan_pick].is_nouse_red}}"> | |
| 400 | + <view class="circle white xc-hooka fs20 red-b sn"><text>Γ</text></view> | |
| 401 | + </block> | |
| 402 | + <block wx:else> | |
| 403 | + <view class="circle xc-hookst ons"></view> | |
| 404 | + </block> | |
| 405 | + </view> | |
| 406 | + </view> | |
| 407 | + | |
| 408 | + <!-- 中间券内容显示 --> | |
| 409 | + <view class="xc-frame flex-level"> | |
| 410 | + <view class="list-frame"> | |
| 411 | + <view wx:for="{{selected_quan_list}}" bindtap="sele_quan_item" wx:if="{{!item.is_using}}" data-ind="{{q_index}}" | |
| 412 | + wx:for-item="item" wx:for-index="q_index"> | |
| 413 | + <view class="xc-coupon-frame flex-center" data-ind="{{q_index}}"> | |
| 414 | + <view class="coupon-frame flex rel"> | |
| 415 | + <!-- 锯齿 --> | |
| 416 | + <include src="juchi_part.wxml" /> | |
| 417 | + <!-- 左边 --> | |
| 418 | + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
| 419 | + <view class="white xc-money-frames"> | |
| 420 | + <view class="f_text"><text class="xc-rmb-symbol">¥</text><text class="xc-rmb-val">{{item.Sum}}</text></view> | |
| 421 | + <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}">满{{item.BuySum}}元可用</view> | |
| 422 | + <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
| 423 | + </view> | |
| 424 | + </view> | |
| 425 | + <!-- 右边 --> | |
| 426 | + <view class="coupon-right flex-center rel"> | |
| 427 | + <view class="coupon-annotation flex"> | |
| 428 | + <view class="flex top-frame"> | |
| 429 | + <view class="frame"> | |
| 430 | + <view class="coupon-wode ib flex ellipsis-2 "> | |
| 431 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}}</text> | |
| 432 | + <block>{{item.Sum}}元优惠券</block> | |
| 433 | + </view> | |
| 434 | + <view class="coupon-time">{{filters.replace_time2(item.BeginDate)}}至{{item.ValidDate?filters.replace_time2(item.ValidDate):'不限'}}</view> | |
| 435 | + </view> | |
| 436 | + </view> | |
| 437 | + <block wx:if="{{item.show_red}}"> | |
| 438 | + <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view> | |
| 439 | + </block> | |
| 440 | + <block wx:else> | |
| 441 | + <view class="circle xc-hooks on"></view> | |
| 442 | + </block> | |
| 443 | + </view> | |
| 444 | + <include src="remark_click_part.wxml" /> | |
| 445 | + </view> | |
| 446 | + </view> | |
| 447 | + </view> | |
| 448 | + <!-- 打开是说明 --> | |
| 449 | + <include src="remark_part.wxml" /> | |
| 450 | + </view> | |
| 451 | + <!-- 包邮券的显示,立即购买 --> | |
| 452 | + <block wx:if="{{ is_b_now && bn_exp_type==0}}"> | |
| 453 | + <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" | |
| 454 | + wx:for-item="item" wx:for-index="byq_index"> | |
| 455 | + <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
| 456 | + <view class="coupon-frame flex rel"> | |
| 457 | + <!-- 锯齿 --> | |
| 458 | + <include src="juchi_part.wxml" /> | |
| 459 | + <!-- 左边 --> | |
| 460 | + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
| 461 | + <view class="white xc-money-frames"> | |
| 462 | + <view class="f_text"><text class="xc-rmb-val">包邮券</text></view> | |
| 463 | + <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view> | |
| 464 | + <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
| 465 | + </view> | |
| 466 | + </view> | |
| 467 | + <!-- 右边 --> | |
| 468 | + <view class="coupon-right flex-center rel"> | |
| 469 | + <view class="coupon-annotation flex"> | |
| 470 | + <view class="flex top-frame"> | |
| 471 | + <view class="frame"> | |
| 472 | + <view class="coupon-wode ib flex ellipsis-2 "> | |
| 473 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text> | |
| 474 | + <block>包邮券</block> | |
| 475 | + </view> | |
| 476 | + <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view> | |
| 477 | + </view> | |
| 478 | + </view> | |
| 479 | + <block wx:if="{{item.show_red}}"> | |
| 480 | + <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view> | |
| 481 | + </block> | |
| 482 | + <block wx:else> | |
| 483 | + <view class="circle xc-hooks on"></view> | |
| 484 | + </block> | |
| 485 | + </view> | |
| 486 | + <include src="remark_click_part2.wxml" /> | |
| 487 | + </view> | |
| 488 | + </view> | |
| 489 | + </view> | |
| 490 | + <!-- 打开是说明 --> | |
| 491 | + <include src="remark_part.wxml" /> | |
| 492 | + </view> | |
| 493 | + </block> | |
| 494 | + | |
| 495 | + <!-- 包邮券的显示,购物车购买 --> | |
| 496 | + <block wx:if="{{!is_b_now && sele_exp_type==0}}"> | |
| 497 | + <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" | |
| 498 | + wx:for-item="item" wx:for-index="byq_index"> | |
| 499 | + <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
| 359 | 500 | <view class="coupon-frame flex rel"> |
| 360 | - <!-- 锯齿 --> | |
| 361 | - <include src="juchi_part.wxml" /> | |
| 362 | - <!-- 左边 --> | |
| 363 | - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
| 364 | - <view class="white xc-money-frames"> | |
| 365 | - <view class="f_text"><text class="xc-rmb-symbol">¥</text><text class="xc-rmb-val">{{item.Sum}}</text></view> | |
| 366 | - <view class="coupon-explain t-c" wx:if="{{item.BuySum>0}}">满{{item.BuySum}}元可用</view> | |
| 367 | - <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
| 368 | - </view> | |
| 369 | - </view> | |
| 370 | - <!-- 右边 --> | |
| 371 | - <view class="coupon-right flex-center rel"> | |
| 372 | - <view class="coupon-annotation flex"> | |
| 373 | - <view class="flex top-frame"> | |
| 374 | - <view class="frame"> | |
| 375 | - <view class="coupon-wode ib flex ellipsis-2 "> | |
| 376 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(item.UseObjectType)}}</text> | |
| 377 | - <block>{{item.Sum}}元优惠券</block> | |
| 378 | - </view> | |
| 379 | - <view class="coupon-time">{{filters.replace_time2(item.BeginDate)}}至{{item.ValidDate?filters.replace_time2(item.ValidDate):'不限'}}</view> | |
| 380 | - </view> | |
| 381 | - </view> | |
| 382 | - <block wx:if="{{item.show_red}}"><view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view></block> | |
| 383 | - <block wx:else><view class="circle xc-hooks on"></view></block> | |
| 384 | - </view> | |
| 385 | - <include src="remark_click_part.wxml" /> | |
| 386 | - </view> | |
| 387 | - </view> | |
| 388 | - </view> | |
| 389 | - <!-- 打开是说明 --> | |
| 501 | + <!-- 锯齿 --> | |
| 502 | + <include src="juchi_part.wxml" /> | |
| 503 | + <!-- 左边 --> | |
| 504 | + <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
| 505 | + <view class="white xc-money-frames"> | |
| 506 | + <view class="f_text"><text class="xc-rmb-val">包邮券</text></view> | |
| 507 | + <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view> | |
| 508 | + <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
| 509 | + </view> | |
| 510 | + </view> | |
| 511 | + <!-- 右边 --> | |
| 512 | + <view class="coupon-right flex-center rel"> | |
| 513 | + <view class="coupon-annotation flex"> | |
| 514 | + <view class="flex top-frame"> | |
| 515 | + <view class="frame"> | |
| 516 | + <view class="coupon-wode ib flex ellipsis-2 "> | |
| 517 | + <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text> | |
| 518 | + <block>包邮券</block> | |
| 519 | + </view> | |
| 520 | + <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view> | |
| 521 | + </view> | |
| 522 | + </view> | |
| 523 | + <block wx:if="{{item.show_red}}"> | |
| 524 | + <view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view> | |
| 525 | + </block> | |
| 526 | + <block wx:else> | |
| 527 | + <view class="circle xc-hooks on"></view> | |
| 528 | + </block> | |
| 529 | + </view> | |
| 530 | + <include src="remark_click_part2.wxml" /> | |
| 531 | + </view> | |
| 532 | + </view> | |
| 533 | + </view> | |
| 534 | + <!-- 打开是说明 --> | |
| 390 | 535 | <include src="remark_part.wxml" /> |
| 391 | - </view> | |
| 392 | - <!-- 包邮券的显示,立即购买 --> | |
| 393 | - <block wx:if="{{ is_b_now && bn_exp_type==0}}"> | |
| 394 | - <view wx:for="{{get_by_quan_list}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" wx:for-item="item" wx:for-index="byq_index"> | |
| 395 | - <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
| 396 | - <view class="coupon-frame flex rel"> | |
| 397 | - <!-- 锯齿 --> | |
| 398 | - <include src="juchi_part.wxml" /> | |
| 399 | - <!-- 左边 --> | |
| 400 | - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
| 401 | - <view class="white xc-money-frames"> | |
| 402 | - <view class="f_text"><text class="xc-rmb-val">包邮券</text></view> | |
| 403 | - <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view> | |
| 404 | - <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
| 405 | - </view> | |
| 406 | - </view> | |
| 407 | - <!-- 右边 --> | |
| 408 | - <view class="coupon-right flex-center rel"> | |
| 409 | - <view class="coupon-annotation flex"> | |
| 410 | - <view class="flex top-frame"> | |
| 411 | - <view class="frame"> | |
| 412 | - <view class="coupon-wode ib flex ellipsis-2 "> | |
| 413 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text> | |
| 414 | - <block>包邮券</block> | |
| 415 | - </view> | |
| 416 | - <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view> | |
| 417 | - </view> | |
| 418 | - </view> | |
| 419 | - <block wx:if="{{item.show_red}}"><view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view></block> | |
| 420 | - <block wx:else><view class="circle xc-hooks on"></view></block> | |
| 421 | - </view> | |
| 422 | - <include src="remark_click_part2.wxml" /> | |
| 423 | - </view> | |
| 424 | - </view> | |
| 425 | - </view> | |
| 426 | - <!-- 打开是说明 --> | |
| 427 | - <include src="remark_part.wxml" /> | |
| 428 | - </view> | |
| 429 | - </block> | |
| 430 | - | |
| 431 | - <!-- 包邮券的显示,购物车购买 --> | |
| 432 | - <block wx:if="{{!is_b_now && sele_exp_type==0}}"> | |
| 433 | - <view wx:for="{{by_quan_list_cart}}" bindtap="sele_quan_item_by" wx:if="{{!item.is_using}}" data-ind="{{byq_index}}" wx:for-item="item" wx:for-index="byq_index"> | |
| 434 | - <view class="xc-coupon-frame flex-center" data-ind="{{byq_index}}"> | |
| 435 | - <view class="coupon-frame flex rel"> | |
| 436 | - <!-- 锯齿 --> | |
| 437 | - <include src="juchi_part.wxml" /> | |
| 438 | - <!-- 左边 --> | |
| 439 | - <view class="coupon-left rel {{filter.setcolor(item.UseObjectType)}} flex-center"> | |
| 440 | - <view class="white xc-money-frames"> | |
| 441 | - <view class="f_text"><text class="xc-rmb-val">包邮券</text></view> | |
| 442 | - <view class="coupon-explain t-c" wx:if="{{item.condition>0}}">满{{item.condition}}元可用</view> | |
| 443 | - <view class="coupon-explain t-c" wx:else>满0元可用</view> | |
| 444 | - </view> | |
| 445 | - </view> | |
| 446 | - <!-- 右边 --> | |
| 447 | - <view class="coupon-right flex-center rel"> | |
| 448 | - <view class="coupon-annotation flex"> | |
| 449 | - <view class="flex top-frame"> | |
| 450 | - <view class="frame"> | |
| 451 | - <view class="coupon-wode ib flex ellipsis-2 "> | |
| 452 | - <text class="xc-brand t-c ib white {{filter.setcolor(item.UseObjectType)}}">{{filter.get_type_card(0)}}</text> | |
| 453 | - <block>包邮券</block> | |
| 454 | - </view> | |
| 455 | - <view class="coupon-time">{{filters.format_time(item.use_start_time)}}至{{item.use_end_time?filters.format_time(item.use_end_time):'不限'}}</view> | |
| 456 | - </view> | |
| 457 | - </view> | |
| 458 | - <block wx:if="{{item.show_red}}"><view class="circle white xc-hook fs20 red-b sn"><text>Γ</text></view></block> | |
| 459 | - <block wx:else><view class="circle xc-hooks on"></view></block> | |
| 460 | - </view> | |
| 461 | - <include src="remark_click_part2.wxml" /> | |
| 462 | - </view> | |
| 463 | - </view> | |
| 464 | - </view> | |
| 465 | - <!-- 打开是说明 --> | |
| 466 | - <include src="remark_part.wxml" /> | |
| 467 | - </view> | |
| 468 | - </block> | |
| 469 | - | |
| 470 | - | |
| 471 | - </view> | |
| 472 | - </view> | |
| 473 | - <!-- 最底下确定层--> | |
| 474 | - <view class="determine-frame"><view class="xc-confirm flex-center" bindtap="confirm_quan"> 确定 </view></view> | |
| 475 | - </view> | |
| 536 | + </view> | |
| 537 | + </block> | |
| 538 | + | |
| 539 | + | |
| 540 | + </view> | |
| 541 | + </view> | |
| 542 | + <!-- 最底下确定层--> | |
| 543 | + <view class="determine-frame"> | |
| 544 | + <view class="xc-confirm flex-center" bindtap="confirm_quan"> 确定 </view> | |
| 545 | + </view> | |
| 546 | + </view> | |
| 476 | 547 | </view> |
| 477 | 548 | <!----弹起选择物流名的列表----> |
| 478 | -<view wx:if='{{open_express==1}}' > | |
| 479 | - <view class="cover-layer flex-center " bindtap='close_express'> | |
| 480 | - </view> | |
| 481 | - | |
| 482 | - <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" > | |
| 483 | - <view class="tops flex"> | |
| 484 | - <view class="top-content fs32"> | |
| 485 | - <view>选择物流名字</view> | |
| 486 | - </view> | |
| 487 | - <view class="close-frame" bindtap='close_express' > | |
| 488 | - <view class="xc-close-express">×</view> | |
| 489 | - </view> | |
| 490 | - </view> | |
| 491 | - <view class="express_list"> | |
| 492 | - <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | |
| 493 | - <view class="express_list_frame" bindtap="click_express_name" | |
| 494 | - data-shippingcode="{{express_list.shipping_code}}" | |
| 495 | - data-name="{{express_list.name}}" data-idxe="{{idx}}"> | |
| 496 | - | |
| 497 | - <block wx:if="{{is_express==idx}}"> | |
| 498 | - <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> | |
| 499 | - </block> | |
| 500 | - <block wx:else> | |
| 501 | - <view class="circle xc-hooks"></view> | |
| 502 | - </block> | |
| 503 | - <view class="fs30">{{express_list.name}}</view> | |
| 504 | - | |
| 505 | - </view> | |
| 549 | +<view wx:if='{{open_express==1}}'> | |
| 550 | + <view class="cover-layer flex-center " bindtap='close_express'> | |
| 551 | + </view> | |
| 552 | + | |
| 553 | + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}"> | |
| 554 | + <view class="tops flex"> | |
| 555 | + <view class="top-content fs32"> | |
| 556 | + <view>选择物流名字</view> | |
| 557 | + </view> | |
| 558 | + <view class="close-frame" bindtap='close_express'> | |
| 559 | + <view class="xc-close-express">×</view> | |
| 560 | + </view> | |
| 561 | + </view> | |
| 562 | + <view class="express_list"> | |
| 563 | + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx"> | |
| 564 | + <view class="express_list_frame" bindtap="click_express_name" data-shippingcode="{{express_list.shipping_code}}" | |
| 565 | + data-name="{{express_list.name}}" data-idxe="{{idx}}"> | |
| 566 | + | |
| 567 | + <block wx:if="{{is_express==idx}}"> | |
| 568 | + <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view> | |
| 569 | + </block> | |
| 570 | + <block wx:else> | |
| 571 | + <view class="circle xc-hooks"></view> | |
| 572 | + </block> | |
| 573 | + <view class="fs30">{{express_list.name}}</view> | |
| 574 | + | |
| 506 | 575 | </view> |
| 507 | 576 | </view> |
| 508 | - <view class="flex click-buttem" > | |
| 509 | - <view class="xc-determine flex-center" bindtap="determine_expres"> | |
| 510 | - <view class="flex-vertical t-c">确定</view> | |
| 511 | - </view> | |
| 512 | - <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | |
| 513 | - <view class="flex-vertical t-c">设为默认</view> | |
| 514 | - </view> | |
| 515 | - </view> | |
| 516 | - | |
| 517 | - </view > | |
| 577 | + </view> | |
| 578 | + <view class="flex click-buttem"> | |
| 579 | + <view class="xc-determine flex-center" bindtap="determine_expres"> | |
| 580 | + <view class="flex-vertical t-c">确定</view> | |
| 581 | + </view> | |
| 582 | + <view class="xc-confirms flex-center" bindtap="select_default_logistics"> | |
| 583 | + <view class="flex-vertical t-c">设为默认</view> | |
| 584 | + </view> | |
| 585 | + </view> | |
| 586 | + | |
| 587 | + </view> | |
| 518 | 588 | </view> |
| 519 | 589 | |
| 520 | -<warn id="warn"></warn> | |
| 521 | 590 | \ No newline at end of file |
| 591 | +<warn id="warn"></warn> | ... | ... |
pages/cart/cart2/cart2.wxss
| 1 | +.bdr_t-14 { | |
| 2 | + border-top-left-radius: 14rpx; | |
| 3 | + border-top-right-radius: 14rpx; | |
| 4 | +} | |
| 5 | +.bdr_b-14 { | |
| 6 | + border-bottom-left-radius: 14rpx; | |
| 7 | + border-bottom-right-radius: 14rpx; | |
| 8 | +} | |
| 9 | +.bdr14 { | |
| 10 | + border-radius: 14rpx; | |
| 11 | +} | |
| 12 | +.mgt20 { | |
| 13 | + margin-top: 20rpx; | |
| 14 | +} | |
| 15 | +.shadow { | |
| 16 | + box-shadow: 0 4rpx 12px #e7e9eb; | |
| 17 | +} | |
| 18 | +.shadow-1 { | |
| 19 | + box-shadow: 16rpx 0px 12px #e7e9eb; | |
| 20 | +} | |
| 21 | + | |
| 22 | + | |
| 23 | +page { | |
| 24 | + /* background-color: #FAFAFA; */ | |
| 25 | + background-color: #F0F0F0; | |
| 26 | + padding: 0 22rpx; | |
| 27 | + box-sizing: border-box; | |
| 28 | +} | |
| 29 | +.container { | |
| 30 | + background-color: #F0F0F0; | |
| 31 | + /* padding-top: 28rpx; */ | |
| 32 | + padding-bottom: 120rpx; | |
| 33 | +} | |
| 1 | 34 | .user-mes { |
| 2 | 35 | position: relative; |
| 3 | 36 | background-color: #fff; |
| 4 | 37 | font-size: 32rpx; |
| 5 | 38 | color: #444; |
| 39 | + /* margin-top: 28rpx; */ | |
| 40 | + border-radius: 14rpx; | |
| 6 | 41 | } |
| 7 | 42 | .user-contact { |
| 8 | - padding: 24rpx 70rpx; | |
| 43 | + padding: 24rpx 26rpx; | |
| 9 | 44 | font-weight: 600; |
| 10 | 45 | } |
| 11 | 46 | |
| ... | ... | @@ -16,10 +51,10 @@ |
| 16 | 51 | |
| 17 | 52 | .pos-icon { |
| 18 | 53 | position: absolute; |
| 19 | - left: 22rpx; | |
| 20 | - top: 9rpx; | |
| 21 | - width: 32rpx; | |
| 22 | - height: 37.5rpx; | |
| 54 | + left: 28rpx; | |
| 55 | + top: 6rpx; | |
| 56 | + width: 30rpx; | |
| 57 | + height: 36rpx; | |
| 23 | 58 | } |
| 24 | 59 | |
| 25 | 60 | .border-img { |
| ... | ... | @@ -32,7 +67,7 @@ |
| 32 | 67 | right: 0; |
| 33 | 68 | top: 0; |
| 34 | 69 | width: 80rpx; |
| 35 | - height: 148rpx; | |
| 70 | + height: 100%; | |
| 36 | 71 | display: flex; |
| 37 | 72 | align-items: center; |
| 38 | 73 | justify-content: center; |
| ... | ... | @@ -51,7 +86,7 @@ |
| 51 | 86 | |
| 52 | 87 | .order-detail { |
| 53 | 88 | padding: 30rpx 0; |
| 54 | - border-bottom: 6rpx solid #eee; | |
| 89 | + border-bottom: 2rpx solid #eee; | |
| 55 | 90 | color: #777; |
| 56 | 91 | min-height: 190rpx; |
| 57 | 92 | background-color: #fff; |
| ... | ... | @@ -60,8 +95,8 @@ |
| 60 | 95 | |
| 61 | 96 | .goods-img { |
| 62 | 97 | float: left; |
| 63 | - width: 191rpx; | |
| 64 | - height: 191rpx; | |
| 98 | + width: 200rpx; | |
| 99 | + height: 200rpx; | |
| 65 | 100 | margin: 0 20rpx; |
| 66 | 101 | } |
| 67 | 102 | |
| ... | ... | @@ -90,22 +125,33 @@ |
| 90 | 125 | line-height: 42rpx; |
| 91 | 126 | } |
| 92 | 127 | |
| 93 | -.set-mes{background-color: #fff; } | |
| 128 | +.set-mes{ | |
| 129 | + background-color: #fff; | |
| 130 | + /* margin-top: 20rpx; */ | |
| 131 | +} | |
| 94 | 132 | .use-item{ |
| 95 | 133 | display: flex; |
| 96 | 134 | align-items: center; |
| 97 | 135 | height: 80rpx; |
| 98 | - border-bottom: 1px solid #ddd; | |
| 136 | + /* border-bottom: 1px solid #ddd; */ | |
| 99 | 137 | font-size: 30rpx; |
| 100 | - width:95%; | |
| 101 | -margin:auto; | |
| 102 | - | |
| 138 | + /* width:95%; | |
| 139 | +margin:auto; */ | |
| 140 | + padding: 0 26rpx; | |
| 103 | 141 | } |
| 104 | 142 | .use-item>view{ |
| 105 | - display: flex;margin-right: 12rpx; | |
| 143 | + display: flex; | |
| 144 | + /* margin-right: 12rpx; */ | |
| 145 | +} | |
| 146 | +.use-item.bfff{ | |
| 147 | + background-color: #fff; | |
| 148 | +} | |
| 149 | +.use-item .dp{ | |
| 150 | + display: block; | |
| 151 | + width: 50rpx; | |
| 152 | + height: 50rpx; | |
| 153 | + margin-left: -6rpx; | |
| 106 | 154 | } |
| 107 | -.use-item.bfff{ background-color: #fff;} | |
| 108 | -.use-item .dp{width: 56rpx; height: 56rpx; margin-left: -5rpx} | |
| 109 | 155 | |
| 110 | 156 | .set-item { |
| 111 | 157 | justify-content: space-between; |
| ... | ... | @@ -135,14 +181,16 @@ margin:auto; |
| 135 | 181 | } |
| 136 | 182 | |
| 137 | 183 | .coupon-mes { |
| 184 | + /* box-sizing: border-box; */ | |
| 138 | 185 | height:95rpx; |
| 139 | - padding: 0 20rpx; | |
| 186 | + padding: 0 26rpx; | |
| 140 | 187 | background-color: #fff; |
| 141 | 188 | font-size: 30rpx; |
| 142 | 189 | color: #444; |
| 143 | - width: 100%; | |
| 144 | - | |
| 145 | - | |
| 190 | + /* width: 100%; */ | |
| 191 | + border-radius: 14rpx; | |
| 192 | + margin-top: 20rpx; | |
| 193 | + margin-bottom: 20rpx; | |
| 146 | 194 | } |
| 147 | 195 | |
| 148 | 196 | .coupon-title { |
| ... | ... | @@ -169,15 +217,14 @@ margin:auto; |
| 169 | 217 | |
| 170 | 218 | .leave-word { |
| 171 | 219 | position: relative; |
| 172 | - | |
| 173 | 220 | font-size: 24rpx; |
| 174 | 221 | margin-left: 20rpx; |
| 175 | - | |
| 222 | + flex-grow: 1; | |
| 176 | 223 | } |
| 177 | 224 | |
| 178 | 225 | .word-box { |
| 179 | - | |
| 180 | - width: 600rpx; | |
| 226 | + font-size: 26rpx; | |
| 227 | + /* width: 600rpx; */ | |
| 181 | 228 | padding: 10rpx; |
| 182 | 229 | height: 28rpx; |
| 183 | 230 | line-height: 40rpx; |
| ... | ... | @@ -190,9 +237,9 @@ margin:auto; |
| 190 | 237 | } |
| 191 | 238 | |
| 192 | 239 | .information { |
| 193 | - padding: 0 20rpx; | |
| 240 | + padding: 0 26rpx; | |
| 194 | 241 | background-color: #fff; |
| 195 | - margin-bottom: 120rpx; | |
| 242 | + /* margin-bottom: 120rpx; */ | |
| 196 | 243 | } |
| 197 | 244 | |
| 198 | 245 | .information .item { |
| ... | ... | @@ -205,36 +252,50 @@ margin:auto; |
| 205 | 252 | } |
| 206 | 253 | |
| 207 | 254 | .btn-wrap { |
| 208 | - height: 100rpx; width: 100%; | |
| 209 | - background-color: #fff; | |
| 210 | - position: fixed; bottom: 0;left: 0; | |
| 211 | - border-top:1rpx solid #dee; | |
| 212 | - z-index:9999 | |
| 255 | + height: 94rpx; | |
| 256 | + box-sizing: border-box; | |
| 257 | + display: flex; | |
| 258 | + justify-content: space-between; | |
| 259 | + background-color: white; | |
| 260 | + align-items: center; | |
| 261 | + position: fixed; | |
| 262 | + bottom: 0; | |
| 263 | + left: 0; | |
| 264 | + width: 100%; | |
| 265 | + padding: 0 30rpx; | |
| 213 | 266 | } |
| 214 | 267 | |
| 215 | 268 | .tips-btn { |
| 216 | - float: right; | |
| 269 | + /* float: right; | |
| 217 | 270 | width: 200rpx; |
| 218 | 271 | height: 100rpx; |
| 219 | 272 | line-height: 100rpx; |
| 220 | 273 | text-align: center; |
| 221 | 274 | font-size: 30rpx; |
| 222 | 275 | color: #fff; |
| 223 | - background-color: #f23030; | |
| 276 | + background-color: #f23030; */ | |
| 277 | + color: white; | |
| 278 | + background-color: #FE4445; | |
| 279 | + height: 72rpx; | |
| 280 | + line-height: 72rpx; | |
| 281 | + padding: 0 42rpx; | |
| 282 | + border-radius: 36rpx; | |
| 283 | + margin-left: 0; | |
| 284 | + margin-right: 0; | |
| 224 | 285 | } |
| 225 | 286 | |
| 226 | 287 | .pay-amount { |
| 227 | - float: right; | |
| 288 | + /* float: right; | |
| 228 | 289 | display: flex; |
| 229 | 290 | align-items: center; |
| 230 | 291 | height: 100rpx; |
| 231 | 292 | font-size: 26rpx; |
| 232 | - margin-right: 40rpx; | |
| 293 | + margin-right: 40rpx; */ | |
| 233 | 294 | } |
| 234 | 295 | |
| 235 | 296 | .payable { |
| 236 | 297 | color: #444; |
| 237 | - margin-right: 20rpx; | |
| 298 | + /* margin-right: 20rpx; */ | |
| 238 | 299 | } |
| 239 | 300 | |
| 240 | 301 | .shipping-modal { |
| ... | ... | @@ -274,10 +335,19 @@ margin:auto; |
| 274 | 335 | } |
| 275 | 336 | |
| 276 | 337 | /*----------nyf新增,地址---------*/ |
| 277 | -.add_new{height: 60rpx; line-height: 60rpx;} | |
| 338 | +.add_new{ | |
| 339 | + height: 90rpx; | |
| 340 | + display: flex; | |
| 341 | + align-items: center; | |
| 342 | + padding: 0 26rpx; | |
| 343 | +} | |
| 278 | 344 | .addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; |
| 279 | - margin-right: 15rpx; margin-left: 20rpx; vertical-align: middle;} | |
| 280 | -.yu_er{margin-left: 10rpx;margin-right: 60rpx;} .wuliu{margin-left: 20rpx;} | |
| 345 | + margin-right: 15rpx;vertical-align: middle;} | |
| 346 | +.yu_er{ | |
| 347 | + margin-left: 10rpx; | |
| 348 | + /* margin-right: 60rpx; */ | |
| 349 | +} | |
| 350 | +.wuliu{margin-left: 20rpx;} | |
| 281 | 351 | |
| 282 | 352 | |
| 283 | 353 | /*---- 优惠券列表 -----*/ |
| ... | ... | @@ -290,8 +360,8 @@ margin:auto; |
| 290 | 360 | width: 100%; |
| 291 | 361 | height: 100%; |
| 292 | 362 | border-bottom:3rpx solid #eee; |
| 293 | - | |
| 294 | - | |
| 363 | + padding: 0 26rpx; | |
| 364 | + background-color: white; | |
| 295 | 365 | } |
| 296 | 366 | .xc-right{ |
| 297 | 367 | width:20rpx; |
| ... | ... | @@ -300,7 +370,6 @@ margin:auto; |
| 300 | 370 | border-right:2rpx solid #000; |
| 301 | 371 | transform:rotate(45deg); |
| 302 | 372 | display:inline-block; |
| 303 | - | |
| 304 | 373 | } |
| 305 | 374 | |
| 306 | 375 | .xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; } |
| ... | ... | @@ -309,15 +378,15 @@ margin:auto; |
| 309 | 378 | /* 自定义弹出窗口 */ |
| 310 | 379 | .cx-popup{ |
| 311 | 380 | width:100%; |
| 312 | - height:920rpx; | |
| 381 | + height:880rpx; | |
| 313 | 382 | background: #fff; |
| 314 | 383 | z-index: 35; |
| 315 | 384 | border-top-left-radius: 20rpx; |
| 316 | 385 | border-top-right-radius: 20rpx; |
| 317 | 386 | position:fixed; |
| 318 | 387 | bottom:0; |
| 319 | - padding-bottom: 25rpx; | |
| 320 | - | |
| 388 | + left: 0; | |
| 389 | + /* padding-bottom: 25rpx; */ | |
| 321 | 390 | } |
| 322 | 391 | |
| 323 | 392 | .cx-popup .top{ |
| ... | ... | @@ -431,9 +500,9 @@ color: #333; |
| 431 | 500 | } |
| 432 | 501 | |
| 433 | 502 | .xc-confirm { |
| 434 | - width: 48%; | |
| 503 | + width: 50%; | |
| 435 | 504 | border-radius: 50rpx; |
| 436 | - height: 50rpx; | |
| 505 | + height: 80rpx; | |
| 437 | 506 | margin:0 auto; |
| 438 | 507 | background:#d60021; |
| 439 | 508 | color:#fff; |
| ... | ... | @@ -509,31 +578,32 @@ border-bottom: 1rpx solid #eee; |
| 509 | 578 | width: 100%; |
| 510 | 579 | height: 65%; |
| 511 | 580 | overflow-y: auto; |
| 512 | - margin-bottom: 10rpx; | |
| 581 | + margin-bottom: 40rpx; | |
| 513 | 582 | |
| 514 | 583 | } |
| 515 | 584 | .xc-confirms { |
| 516 | - width: 40%; | |
| 517 | - border-radius: 50rpx; | |
| 518 | - height: 55rpx; | |
| 519 | - margin:0 auto; | |
| 520 | - font-size:28rpx; | |
| 521 | - background: #fff; | |
| 522 | - color: #333; | |
| 523 | - border: 2rpx solid #333; | |
| 524 | - | |
| 585 | + box-sizing: border-box; | |
| 586 | + width: 40%; | |
| 587 | + border-radius: 50rpx; | |
| 588 | + height: 80rpx; | |
| 589 | + margin:0 auto; | |
| 590 | + font-size:28rpx; | |
| 591 | + background: #fff; | |
| 592 | + color: #333; | |
| 593 | + border: 2rpx solid #333; | |
| 525 | 594 | } |
| 526 | 595 | |
| 527 | 596 | |
| 528 | 597 | /* 优惠券的改版样式 */ |
| 529 | 598 | .xc-coupon-frame{ |
| 530 | - width: 710rpx; | |
| 599 | + /* width: 710rpx; */ | |
| 600 | + width: 100%; | |
| 531 | 601 | height:auto; |
| 532 | 602 | margin: 0 auto; |
| 533 | 603 | |
| 534 | 604 | } |
| 535 | 605 | .xc-coupon-frame .coupon-frame{ |
| 536 | - width: 99%; | |
| 606 | + width: 100%; | |
| 537 | 607 | height: 200rpx; |
| 538 | 608 | margin-top:10rpx; |
| 539 | 609 | border-bottom: 1rpx solid #eee; |
| ... | ... | @@ -577,12 +647,12 @@ width:100%; |
| 577 | 647 | top:-37rpx; |
| 578 | 648 | } |
| 579 | 649 | .coupon-right{ |
| 580 | - width:490rpx; | |
| 650 | + /* width:490rpx; */ | |
| 581 | 651 | height: 99%; |
| 582 | 652 | border-top: 1rpx solid #eaeaea; |
| 583 | 653 | /* //border-bottom: 1rpx solid #eaeaea; */ |
| 584 | 654 | border-right: 1rpx solid #eaeaea; |
| 585 | - | |
| 655 | + flex-grow: 1; | |
| 586 | 656 | } |
| 587 | 657 | .coupon-annotation{ |
| 588 | 658 | width: 95%; |
| ... | ... | @@ -672,15 +742,15 @@ align-items: center; |
| 672 | 742 | width: 24rpx; |
| 673 | 743 | } |
| 674 | 744 | .xc-buttom{ |
| 675 | - width:99%; | |
| 676 | -min-height:76rpx; | |
| 677 | -height:auto; | |
| 678 | -line-height:40rpx; | |
| 679 | -border-left:1rpx solid #eee; | |
| 680 | -border-right:1rpx solid #eee; | |
| 681 | -border-bottom:1rpx solid #eee; | |
| 682 | -margin-left: 6rpx; | |
| 683 | - | |
| 745 | + box-sizing: border-box; | |
| 746 | + width:100%; | |
| 747 | + min-height:76rpx; | |
| 748 | + height:auto; | |
| 749 | + line-height:40rpx; | |
| 750 | + border-left:1rpx solid #eee; | |
| 751 | + border-right:1rpx solid #eee; | |
| 752 | + border-bottom:1rpx solid #eee; | |
| 753 | +/* margin-left: 6rpx; */ | |
| 684 | 754 | } |
| 685 | 755 | |
| 686 | 756 | .goods-num{ |
| ... | ... | @@ -726,10 +796,12 @@ width:42rpx; |
| 726 | 796 | height:42rpx; |
| 727 | 797 | } |
| 728 | 798 | .may_use_coupon{ |
| 729 | - width: 95%; | |
| 730 | - height: 68rpx; | |
| 799 | + /* width: 95%; */ | |
| 800 | + /* height: 68rpx; */ | |
| 731 | 801 | line-height:78rpx; |
| 732 | - margin: auto; | |
| 802 | + padding: 0 26rpx; | |
| 803 | + justify-content: space-between; | |
| 804 | + align-items: center; | |
| 733 | 805 | } |
| 734 | 806 | .determine-frame{ |
| 735 | 807 | width: 100%; |
| ... | ... | @@ -737,7 +809,7 @@ height:42rpx; |
| 737 | 809 | |
| 738 | 810 | } |
| 739 | 811 | .xc-determine{ |
| 740 | - height: 55rpx; | |
| 812 | + height: 80rpx; | |
| 741 | 813 | width: 40%; |
| 742 | 814 | border-radius: 50rpx; |
| 743 | 815 | background: #d60021; |
| ... | ... | @@ -821,4 +893,68 @@ margin-left: 20rpx; |
| 821 | 893 | .n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } |
| 822 | 894 | .gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} |
| 823 | 895 | |
| 824 | -.quan_num_show{ padding: 6rpx 10rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx } | |
| 825 | 896 | \ No newline at end of file |
| 897 | +.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;} | |
| 898 | + | |
| 899 | +.navigator-hover { | |
| 900 | + background: none; | |
| 901 | + opacity: 1; | |
| 902 | +} | |
| 903 | + | |
| 904 | + | |
| 905 | +.plus_buy{ | |
| 906 | + background-color: #fff; | |
| 907 | + margin:15rpx 0; | |
| 908 | + padding: 20rpx 10rpx; | |
| 909 | + position: relative; | |
| 910 | +} | |
| 911 | + | |
| 912 | + | |
| 913 | +.card_bg { | |
| 914 | + box-sizing: border-box; | |
| 915 | + padding: 2rpx 10rpx; | |
| 916 | + height: 28rpx; | |
| 917 | + border-radius: 26rpx; | |
| 918 | + font-size: 18rpx; | |
| 919 | + line-height: 28rpx; | |
| 920 | + max-width: 210rpx; | |
| 921 | + background: #333; | |
| 922 | + color: #fff; | |
| 923 | + margin-left: 8rpx; | |
| 924 | + position:relative; | |
| 925 | + top:7rpx; | |
| 926 | +} | |
| 927 | + | |
| 928 | +.card_bg image { | |
| 929 | + width: 19rpx; | |
| 930 | + height: 19rpx; | |
| 931 | + margin-right: 8rpx; | |
| 932 | +} | |
| 933 | + | |
| 934 | +/* .card_bg .card_name { | |
| 935 | + max-width: 76rpx; | |
| 936 | + width: auto; | |
| 937 | + overflow: hidden; | |
| 938 | + white-space: nowrap; | |
| 939 | +} */ | |
| 940 | + | |
| 941 | +.card_name { | |
| 942 | + position: relative; | |
| 943 | + top: -4rpx; | |
| 944 | + margin-left: 6px; | |
| 945 | +} | |
| 946 | + | |
| 947 | +.car_tri_up { | |
| 948 | + width: 0;height: 0; | |
| 949 | + border-left: 20rpx solid transparent; | |
| 950 | + border-right: 20rpx solid transparent; | |
| 951 | + border-bottom: 20rpx solid #fff; | |
| 952 | + position: absolute; | |
| 953 | + right: 20rpx; | |
| 954 | + top:-10rpx | |
| 955 | +} | |
| 956 | +.card_op{ | |
| 957 | + position: absolute; | |
| 958 | + right: 20rpx; | |
| 959 | + top:36rpx | |
| 960 | +} | |
| 961 | + | ... | ... |
pages/cart/cart2_pt/cart2_pt.js
| ... | ... | @@ -294,8 +294,8 @@ Page({ |
| 294 | 294 | console.log('calculatePrice2222'); |
| 295 | 295 | console.log(rs); |
| 296 | 296 | var o_shipping_price = 0, goods_weight = -1, goods_piece = -1; |
| 297 | - //-----------当地址不为空,且是物流时,计算物流费用---------- | |
| 298 | - if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 ){ | |
| 297 | + //-----------当地址不为空,且是物流时,计算物流费用,同时阶梯团不计算拼团价格---------- | |
| 298 | + if (th.data.user_addr != null && th.data.bn_exp_type == 0 && good.is_free_shipping == 0 && th.data.kt_type!=3 ){ | |
| 299 | 299 | switch (good['exp_sum_type']) { |
| 300 | 300 | case 1: |
| 301 | 301 | //统一运费 | ... | ... |
pages/cart/cart2_pt/cart2_pt.wxml
| ... | ... | @@ -2,14 +2,14 @@ |
| 2 | 2 | <form bindsubmit="submitForm"> |
| 3 | 3 | <view class="container"> |
| 4 | 4 | <!--要进行判断地址是否显示----> |
| 5 | - <view bindtap="enterAddressPage" class="user-mes" hidden='{{bn_exp_type==1 || kt_type==3}}'> | |
| 5 | + <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'> | |
| 6 | 6 | <!---默认地址显示------> |
| 7 | 7 | <block wx:if="{{user_addr!=null}}"> |
| 8 | 8 | <view class="user-contact">收货人:{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> |
| 9 | 9 | <view class="location"> |
| 10 | 10 | <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> |
| 11 | 11 | <view class="pos-icon"> |
| 12 | - <image class="wh100" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
| 12 | + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
| 13 | 13 | </view> |
| 14 | 14 | </view> |
| 15 | 15 | <view class="update-logistics"> |
| ... | ... | @@ -22,22 +22,22 @@ |
| 22 | 22 | <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 |
| 23 | 23 | </view> |
| 24 | 24 | </block> |
| 25 | - <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> | |
| 25 | + <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> --> | |
| 26 | 26 | </view> |
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | <!------立即购买--------> |
| 30 | 30 | <block> |
| 31 | - <view class="xc-border main-top"></view> | |
| 32 | - <view class="use-item bfff"> | |
| 33 | - <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>门店:{{bn_pickname}}</view></view> | |
| 31 | + <!-- <view class="xc-border main-top"></view> --> | |
| 32 | + <view class="use-item bfff bdr_t-14 mgt20"> | |
| 33 | + <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>{{bn_pickname}}</view></view> | |
| 34 | 34 | <view class="order-detail"> |
| 35 | 35 | <view class="goods-img"> |
| 36 | - <image class="wh100" src="{{bn_goods.original_img}}" | |
| 36 | + <image class="wh100 bdr14" src="{{bn_goods.original_img}}" | |
| 37 | 37 | binderror='cart_set_err' data-err="bn_goods.original_img"></image> |
| 38 | 38 | </view> |
| 39 | 39 | <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}"> |
| 40 | - <view class="goods-name">{{bn_goods.goods_name}}</view> | |
| 40 | + <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view> | |
| 41 | 41 | <!-- 商品属性 --> |
| 42 | 42 | <view class="flex-vertical fs28 color-gray n_guige"> |
| 43 | 43 | <view class="goods-color"><text>{{filters.show_gui_ge(bn_goods.goods_spec,bn_goods.goods_color)}}</text> |
| ... | ... | @@ -54,14 +54,14 @@ |
| 54 | 54 | <view class="goods-num">x{{bn_goods.buynum}}</view> |
| 55 | 55 | </view> --> |
| 56 | 56 | </view> |
| 57 | - <view class="set-mes"> | |
| 57 | + <view class="set-mes bdr_b-14"> | |
| 58 | 58 | <view wx:if="{{order.store_prom}}"><icon color="#f23030" size="16" type="info"></icon>{{order.store_prom}} |
| 59 | 59 | </view> |
| 60 | 60 | |
| 61 | 61 | <!--阶梯团是不显示的--> |
| 62 | 62 | <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}"> |
| 63 | 63 | <view class="flex-vertical"> |
| 64 | - <view bindtap='setexptype' data-t='1' style="display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};"> | |
| 64 | + <view bindtap='setexptype' data-t='1' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}}"> | |
| 65 | 65 | <!-- <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> --> |
| 66 | 66 | <block wx:if="{{bn_exp_type==1}}"> |
| 67 | 67 | |
| ... | ... | @@ -70,9 +70,9 @@ |
| 70 | 70 | <block wx:else> |
| 71 | 71 | <view class="circle xc-hookts on"></view> |
| 72 | 72 | </block> |
| 73 | - <view class="yu_er">自提</view> | |
| 73 | + <view class="yu_er">门店自提</view> | |
| 74 | 74 | </view> |
| 75 | - <view class="{{bn_t_exp_t==2?'':'xc-left'}}" bindtap='setexptype' data-t='0' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};"> | |
| 75 | + <view class="{{bn_t_exp_t==2?'':'xc-left'}}" bindtap='setexptype' data-t='0' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}}"> | |
| 76 | 76 | <!-- <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon> --> |
| 77 | 77 | <block wx:if="{{bn_exp_type==0}}"> |
| 78 | 78 | |
| ... | ... | @@ -81,7 +81,7 @@ |
| 81 | 81 | <block wx:else> |
| 82 | 82 | <view class="circle xc-hookts on"></view> |
| 83 | 83 | </block> |
| 84 | - <view class="yu_er">物流</view> | |
| 84 | + <view class="yu_er">快递邮寄</view> | |
| 85 | 85 | </view> |
| 86 | 86 | </view> |
| 87 | 87 | <block wx:if="{{bn_exp_type==0}}"> |
| ... | ... | @@ -101,14 +101,7 @@ |
| 101 | 101 | |
| 102 | 102 | </view> |
| 103 | 103 | |
| 104 | - <!-----使用余额------> | |
| 105 | - <view class="set-mes" wx:if="{{userinfo.user_money>0}}"> | |
| 106 | - <view class="use-item" bindtap='set_bn_useyuer'> | |
| 107 | - <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 108 | - <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 109 | - | |
| 110 | - </view> | |
| 111 | - </view> | |
| 104 | + | |
| 112 | 105 | <view class="coupon-mes flex-vertical"> |
| 113 | 106 | <view>留言</view> |
| 114 | 107 | <view class="leave-word"> |
| ... | ... | @@ -118,7 +111,14 @@ |
| 118 | 111 | </view> |
| 119 | 112 | </block> |
| 120 | 113 | |
| 121 | - <view class="information"> | |
| 114 | + <view class="information bdr14"> | |
| 115 | + <!-----使用余额------> | |
| 116 | + <view class="set-mes" wx:if="{{userinfo.user_money>0}}"> | |
| 117 | + <view class="use-item" bindtap='set_bn_useyuer' style="padding-left:0;padding-right:0;"> | |
| 118 | + <icon color="{{bn_use_money?'red':'gray'}}" size="16" type="success"></icon> | |
| 119 | + <view class="yu_er">使用余额 :¥{{yuer}} </view> | |
| 120 | + </view> | |
| 121 | + </view> | |
| 122 | 122 | <view class="item" wx:if="{{kt_type<3 || is_normal==1}}"> |
| 123 | 123 | <view>商品金额</view> |
| 124 | 124 | <view class="co-red">¥ {{formData.all_price}}元</view> |
| ... | ... | @@ -142,11 +142,11 @@ |
| 142 | 142 | </view> |
| 143 | 143 | |
| 144 | 144 | <view class="btn-wrap"> |
| 145 | - <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 146 | - <view class="pay-amount"> | |
| 147 | - <view class="payable">应付金额 : </view> | |
| 148 | - <view class="co-red big">¥ {{formData.order_amount}}元</view> | |
| 149 | - </view> | |
| 145 | + <view class="pay-amount"> | |
| 146 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 147 | + <!-- <view class="co-red big"></view> --> | |
| 148 | + </view> | |
| 149 | + <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 150 | 150 | </view> |
| 151 | 151 | </form> |
| 152 | 152 | ... | ... |
pages/cart/cart2_pt/cart2_pt.wxss
| 1 | +.bdr_t-14 { | |
| 2 | + border-top-left-radius: 14rpx; | |
| 3 | + border-top-right-radius: 14rpx; | |
| 4 | +} | |
| 5 | +.bdr_b-14 { | |
| 6 | + border-bottom-left-radius: 14rpx; | |
| 7 | + border-bottom-right-radius: 14rpx; | |
| 8 | +} | |
| 9 | +.bdr14 { | |
| 10 | + border-radius: 14rpx; | |
| 11 | +} | |
| 12 | +.mgt20 { | |
| 13 | + margin-top: 20rpx; | |
| 14 | +} | |
| 15 | +.shadow { | |
| 16 | + box-shadow: 0 4rpx 12px #e7e9eb; | |
| 17 | +} | |
| 18 | +.shadow-1 { | |
| 19 | + box-shadow: 16rpx 0px 12px #e7e9eb; | |
| 20 | +} | |
| 21 | + | |
| 22 | + | |
| 23 | +page { | |
| 24 | + /* background-color: #FAFAFA; */ | |
| 25 | + background-color: #F0F0F0; | |
| 26 | + padding: 0 22rpx; | |
| 27 | + box-sizing: border-box; | |
| 28 | +} | |
| 29 | +.container { | |
| 30 | + background-color: #F0F0F0; | |
| 31 | + /* padding-top: 28rpx; */ | |
| 32 | + padding-bottom: 120rpx; | |
| 33 | +} | |
| 1 | 34 | .user-mes { |
| 2 | 35 | position: relative; |
| 3 | 36 | background-color: #fff; |
| 4 | 37 | font-size: 32rpx; |
| 5 | 38 | color: #444; |
| 39 | + /* margin-top: 28rpx; */ | |
| 40 | + border-radius: 14rpx; | |
| 6 | 41 | } |
| 7 | 42 | .user-contact { |
| 8 | - padding: 24rpx 70rpx; | |
| 9 | - font-weight: 600; | |
| 10 | - | |
| 43 | + padding: 24rpx 26rpx; | |
| 44 | + font-weight: 600; | |
| 11 | 45 | } |
| 12 | - | |
| 46 | + | |
| 13 | 47 | .location { |
| 14 | 48 | position: relative; |
| 15 | 49 | padding: 0 70rpx 24rpx; |
| ... | ... | @@ -17,15 +51,15 @@ |
| 17 | 51 | |
| 18 | 52 | .pos-icon { |
| 19 | 53 | position: absolute; |
| 20 | - left: 22rpx; | |
| 21 | - top: 20rpx; | |
| 22 | - width: 32rpx; | |
| 23 | - height: 40rpx; | |
| 54 | + left: 28rpx; | |
| 55 | + top: 6rpx; | |
| 56 | + width: 30rpx; | |
| 57 | + height: 36rpx; | |
| 24 | 58 | } |
| 25 | 59 | |
| 26 | 60 | .border-img { |
| 27 | 61 | width: 100%; |
| 28 | - height: 16rpx; | |
| 62 | + height: 12rpx; | |
| 29 | 63 | } |
| 30 | 64 | |
| 31 | 65 | .update-logistics { |
| ... | ... | @@ -33,7 +67,7 @@ |
| 33 | 67 | right: 0; |
| 34 | 68 | top: 0; |
| 35 | 69 | width: 80rpx; |
| 36 | - height: 148rpx; | |
| 70 | + height: 100%; | |
| 37 | 71 | display: flex; |
| 38 | 72 | align-items: center; |
| 39 | 73 | justify-content: center; |
| ... | ... | @@ -52,7 +86,7 @@ |
| 52 | 86 | |
| 53 | 87 | .order-detail { |
| 54 | 88 | padding: 30rpx 0; |
| 55 | - border-bottom: 7rpx solid #eee; | |
| 89 | + border-bottom: 2rpx solid #eee; | |
| 56 | 90 | color: #777; |
| 57 | 91 | min-height: 190rpx; |
| 58 | 92 | background-color: #fff; |
| ... | ... | @@ -61,14 +95,14 @@ |
| 61 | 95 | |
| 62 | 96 | .goods-img { |
| 63 | 97 | float: left; |
| 64 | - width: 190rpx; | |
| 65 | - height: 190rpx; | |
| 98 | + width: 200rpx; | |
| 99 | + height: 200rpx; | |
| 66 | 100 | margin: 0 20rpx; |
| 67 | 101 | } |
| 68 | 102 | |
| 69 | 103 | .order-cont { |
| 70 | 104 | float: left; |
| 71 | - width: 400rpx; | |
| 105 | + width: 438rpx; | |
| 72 | 106 | } |
| 73 | 107 | |
| 74 | 108 | .goods-name { |
| ... | ... | @@ -78,7 +112,7 @@ |
| 78 | 112 | margin-bottom: 16rpx; |
| 79 | 113 | font-size: 28rpx; |
| 80 | 114 | color: #333; |
| 81 | - | |
| 115 | + | |
| 82 | 116 | } |
| 83 | 117 | |
| 84 | 118 | .goods-color { |
| ... | ... | @@ -86,29 +120,38 @@ |
| 86 | 120 | } |
| 87 | 121 | |
| 88 | 122 | .order-num { |
| 89 | - float: right; | |
| 123 | + margin-top: 25rpx; | |
| 90 | 124 | font-size: 24rpx; |
| 91 | - margin-top: 10rpx; | |
| 92 | - margin-right: 20rpx; | |
| 93 | - text-align: right; | |
| 94 | 125 | line-height: 42rpx; |
| 95 | 126 | } |
| 96 | 127 | |
| 97 | -.set-mes{background-color: #fff; } | |
| 128 | +.set-mes{ | |
| 129 | + background-color: #fff; | |
| 130 | + /* margin-top: 20rpx; */ | |
| 131 | +} | |
| 98 | 132 | .use-item{ |
| 99 | 133 | display: flex; |
| 100 | 134 | align-items: center; |
| 101 | - height: 92rpx; | |
| 102 | - border-bottom: 1px solid #ddd; | |
| 135 | + height: 80rpx; | |
| 136 | + /* border-bottom: 1px solid #ddd; */ | |
| 103 | 137 | font-size: 30rpx; |
| 104 | - width: 95%; | |
| 105 | - margin: auto; | |
| 138 | + /* width:95%; | |
| 139 | +margin:auto; */ | |
| 140 | + padding: 0 26rpx; | |
| 106 | 141 | } |
| 107 | 142 | .use-item>view{ |
| 108 | - display: flex;margin-right: 10rpx; | |
| 143 | + display: flex; | |
| 144 | + /* margin-right: 12rpx; */ | |
| 145 | +} | |
| 146 | +.use-item.bfff{ | |
| 147 | + background-color: #fff; | |
| 148 | +} | |
| 149 | +.use-item .dp{ | |
| 150 | + display: block; | |
| 151 | + width: 50rpx; | |
| 152 | + height: 50rpx; | |
| 153 | + margin-left: -6rpx; | |
| 109 | 154 | } |
| 110 | -.use-item.bfff{ background-color: #fff;} | |
| 111 | -.use-item .dp{width: 56rpx; height: 56rpx; margin-left: -5rpx} | |
| 112 | 155 | |
| 113 | 156 | .set-item { |
| 114 | 157 | justify-content: space-between; |
| ... | ... | @@ -138,15 +181,16 @@ |
| 138 | 181 | } |
| 139 | 182 | |
| 140 | 183 | .coupon-mes { |
| 141 | - height:95rpx; | |
| 142 | - padding: 0 20rpx; | |
| 184 | + /* box-sizing: border-box; */ | |
| 185 | + height:95rpx; | |
| 186 | + padding: 0 26rpx; | |
| 143 | 187 | background-color: #fff; |
| 144 | 188 | font-size: 30rpx; |
| 145 | 189 | color: #444; |
| 146 | - width: 100%; | |
| 147 | - border-bottom: 6rpx solid #eee; | |
| 148 | - margin-bottom: 20rpx; | |
| 149 | - | |
| 190 | + /* width: 100%; */ | |
| 191 | + border-radius: 14rpx; | |
| 192 | + margin-top: 20rpx; | |
| 193 | + margin-bottom: 20rpx; | |
| 150 | 194 | } |
| 151 | 195 | |
| 152 | 196 | .coupon-title { |
| ... | ... | @@ -175,12 +219,12 @@ |
| 175 | 219 | position: relative; |
| 176 | 220 | font-size: 24rpx; |
| 177 | 221 | margin-left: 20rpx; |
| 178 | - | |
| 222 | + flex-grow: 1; | |
| 179 | 223 | } |
| 180 | 224 | |
| 181 | 225 | .word-box { |
| 182 | - | |
| 183 | - width: 600rpx; | |
| 226 | + font-size: 26rpx; | |
| 227 | + /* width: 600rpx; */ | |
| 184 | 228 | padding: 10rpx; |
| 185 | 229 | height: 28rpx; |
| 186 | 230 | line-height: 40rpx; |
| ... | ... | @@ -193,9 +237,9 @@ |
| 193 | 237 | } |
| 194 | 238 | |
| 195 | 239 | .information { |
| 196 | - padding: 0 20rpx; | |
| 240 | + padding: 0 26rpx; | |
| 197 | 241 | background-color: #fff; |
| 198 | - margin-bottom: 120rpx; | |
| 242 | + /* margin-bottom: 120rpx; */ | |
| 199 | 243 | } |
| 200 | 244 | |
| 201 | 245 | .information .item { |
| ... | ... | @@ -208,34 +252,50 @@ |
| 208 | 252 | } |
| 209 | 253 | |
| 210 | 254 | .btn-wrap { |
| 211 | - height: 100rpx; width: 100%; | |
| 212 | - background-color: #fff; | |
| 213 | - position: fixed; bottom: 0;left: 0 | |
| 255 | + height: 94rpx; | |
| 256 | + box-sizing: border-box; | |
| 257 | + display: flex; | |
| 258 | + justify-content: space-between; | |
| 259 | + background-color: white; | |
| 260 | + align-items: center; | |
| 261 | + position: fixed; | |
| 262 | + bottom: 0; | |
| 263 | + left: 0; | |
| 264 | + width: 100%; | |
| 265 | + padding: 0 30rpx; | |
| 214 | 266 | } |
| 215 | 267 | |
| 216 | 268 | .tips-btn { |
| 217 | - float: right; | |
| 269 | + /* float: right; | |
| 218 | 270 | width: 200rpx; |
| 219 | 271 | height: 100rpx; |
| 220 | 272 | line-height: 100rpx; |
| 221 | 273 | text-align: center; |
| 222 | 274 | font-size: 30rpx; |
| 223 | 275 | color: #fff; |
| 224 | - background-color: #f23030; | |
| 276 | + background-color: #f23030; */ | |
| 277 | + color: white; | |
| 278 | + background-color: #FE4445; | |
| 279 | + height: 72rpx; | |
| 280 | + line-height: 72rpx; | |
| 281 | + padding: 0 42rpx; | |
| 282 | + border-radius: 36rpx; | |
| 283 | + margin-left: 0; | |
| 284 | + margin-right: 0; | |
| 225 | 285 | } |
| 226 | 286 | |
| 227 | 287 | .pay-amount { |
| 228 | - float: right; | |
| 288 | + /* float: right; | |
| 229 | 289 | display: flex; |
| 230 | 290 | align-items: center; |
| 231 | 291 | height: 100rpx; |
| 232 | 292 | font-size: 26rpx; |
| 233 | - margin-right: 40rpx; | |
| 293 | + margin-right: 40rpx; */ | |
| 234 | 294 | } |
| 235 | 295 | |
| 236 | 296 | .payable { |
| 237 | 297 | color: #444; |
| 238 | - margin-right: 20rpx; | |
| 298 | + /* margin-right: 20rpx; */ | |
| 239 | 299 | } |
| 240 | 300 | |
| 241 | 301 | .shipping-modal { |
| ... | ... | @@ -275,24 +335,58 @@ |
| 275 | 335 | } |
| 276 | 336 | |
| 277 | 337 | /*----------nyf新增,地址---------*/ |
| 278 | -.add_new{height: 60rpx; line-height: 60rpx;} | |
| 338 | +.add_new{ | |
| 339 | + height: 90rpx; | |
| 340 | + display: flex; | |
| 341 | + align-items: center; | |
| 342 | + padding: 0 26rpx; | |
| 343 | +} | |
| 279 | 344 | .addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; |
| 280 | - margin-right: 15rpx; margin-left: 20rpx; vertical-align: middle;} | |
| 281 | -.yu_er{margin-left: 15rpx;} .wuliu{margin-left: 20rpx;} | |
| 345 | + margin-right: 15rpx;vertical-align: middle;} | |
| 346 | +.yu_er{ | |
| 347 | + margin-left: 10rpx; | |
| 348 | + /* margin-right: 60rpx; */ | |
| 349 | +} | |
| 350 | +.wuliu{margin-left: 20rpx;} | |
| 282 | 351 | |
| 283 | 352 | |
| 353 | +/*---- 优惠券列表 -----*/ | |
| 354 | +.xc-coupon-frame{ | |
| 355 | + width: 100%; | |
| 356 | + height: 92rpx; | |
| 357 | + | |
| 358 | +} | |
| 359 | +.xc-coupon-frame .work-frame{ | |
| 360 | + width: 100%; | |
| 361 | + height: 100%; | |
| 362 | + border-bottom:3rpx solid #eee; | |
| 363 | + padding: 0 26rpx; | |
| 364 | + background-color: white; | |
| 365 | +} | |
| 366 | +.xc-right{ | |
| 367 | + width:20rpx; | |
| 368 | + height:20rpx; | |
| 369 | + border-top:2rpx solid #000; | |
| 370 | + border-right:2rpx solid #000; | |
| 371 | + transform:rotate(45deg); | |
| 372 | + display:inline-block; | |
| 373 | +} | |
| 374 | + | |
| 375 | +.xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; } | |
| 376 | +.xc-right-frame{font-size: 30rpx;line-height: 92rpx; margin-right: 10rpx } | |
| 377 | + | |
| 284 | 378 | /* 自定义弹出窗口 */ |
| 285 | 379 | .cx-popup{ |
| 286 | 380 | width:100%; |
| 287 | - height:920rpx; | |
| 381 | + height:880rpx; | |
| 288 | 382 | background: #fff; |
| 289 | 383 | z-index: 35; |
| 290 | 384 | border-top-left-radius: 20rpx; |
| 291 | 385 | border-top-right-radius: 20rpx; |
| 292 | 386 | position:fixed; |
| 293 | 387 | bottom:0; |
| 294 | - padding-bottom: 25rpx; | |
| 295 | - | |
| 388 | + left: 0; | |
| 389 | + /* padding-bottom: 25rpx; */ | |
| 296 | 390 | } |
| 297 | 391 | |
| 298 | 392 | .cx-popup .top{ |
| ... | ... | @@ -300,7 +394,7 @@ |
| 300 | 394 | height:100rpx; |
| 301 | 395 | border-bottom:3rpx solid #ddd; |
| 302 | 396 | margin: auto; |
| 303 | - margin-top: 30rpx; | |
| 397 | + margin-top: 30rpx; | |
| 304 | 398 | |
| 305 | 399 | } |
| 306 | 400 | .xc-top-content{ |
| ... | ... | @@ -321,7 +415,7 @@ |
| 321 | 415 | } |
| 322 | 416 | .xc-frame{ |
| 323 | 417 | width: 100%; |
| 324 | - height:68.9%; | |
| 418 | + height:60%; | |
| 325 | 419 | } |
| 326 | 420 | |
| 327 | 421 | .xc-frame .list-frame{ |
| ... | ... | @@ -332,18 +426,18 @@ |
| 332 | 426 | } |
| 333 | 427 | .xc-close-frame{ |
| 334 | 428 | margin-top:-10rpx; |
| 335 | - | |
| 429 | + | |
| 336 | 430 | } |
| 337 | 431 | |
| 338 | 432 | .xc-close{ |
| 339 | - width: 37rpx; | |
| 340 | - height: 37rpx; | |
| 341 | - border-radius: 50%; | |
| 342 | - border: 3rpx solid #333; | |
| 343 | - text-align: center; | |
| 344 | - line-height: 34rpx; | |
| 345 | - font-size: 29rpx; | |
| 346 | - color: #333; | |
| 433 | + width: 37rpx; | |
| 434 | +height: 37rpx; | |
| 435 | +border-radius: 50%; | |
| 436 | +border: 3rpx solid #333; | |
| 437 | +text-align: center; | |
| 438 | +line-height: 34rpx; | |
| 439 | +font-size: 29rpx; | |
| 440 | +color: #333; | |
| 347 | 441 | |
| 348 | 442 | } |
| 349 | 443 | .xc-money{ |
| ... | ... | @@ -388,7 +482,7 @@ |
| 388 | 482 | .xc-coupon-money1{ |
| 389 | 483 | color: #444; |
| 390 | 484 | font-size: 28rpx; |
| 391 | - line-height: 60rpx; | |
| 485 | + line-height: 60rpx; | |
| 392 | 486 | |
| 393 | 487 | |
| 394 | 488 | } |
| ... | ... | @@ -406,9 +500,9 @@ |
| 406 | 500 | } |
| 407 | 501 | |
| 408 | 502 | .xc-confirm { |
| 409 | - width: 48%; | |
| 410 | - border-radius: 50rpx; | |
| 411 | - height: 50rpx; | |
| 503 | + width: 50%; | |
| 504 | + border-radius: 50rpx; | |
| 505 | + height: 80rpx; | |
| 412 | 506 | margin:0 auto; |
| 413 | 507 | background:#d60021; |
| 414 | 508 | color:#fff; |
| ... | ... | @@ -422,128 +516,300 @@ |
| 422 | 516 | @keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } |
| 423 | 517 | |
| 424 | 518 | .xc-not-Selection{ |
| 425 | - width: 40rpx; | |
| 426 | - height: 40rpx; | |
| 519 | + width: 40rpx; | |
| 520 | +height: 40rpx; | |
| 427 | 521 | background: #eeeeee; |
| 428 | 522 | } |
| 429 | 523 | |
| 430 | 524 | |
| 431 | 525 | .xc-close-express{ |
| 432 | - width: 40rpx; | |
| 433 | - height: 40rpx; | |
| 434 | - border-radius: 50%; | |
| 435 | - border: 3rpx solid #333; | |
| 436 | - text-align: center; | |
| 437 | - font-size:32rpx; | |
| 438 | - line-height: 38rpx; | |
| 439 | - color: #333; | |
| 440 | - margin-top: 5rpx; | |
| 526 | + width: 40rpx; | |
| 527 | +height: 40rpx; | |
| 528 | +border-radius: 50%; | |
| 529 | +border: 3rpx solid #333; | |
| 530 | +text-align: center; | |
| 531 | +font-size:32rpx; | |
| 532 | +line-height: 38rpx; | |
| 533 | +color: #333; | |
| 534 | +margin-top: 5rpx; | |
| 441 | 535 | } |
| 442 | 536 | .cx-popup .tops{ |
| 443 | - width: 100%; | |
| 444 | - height: 145rpx; | |
| 445 | - border-bottom: 3rpx solid #eee; | |
| 537 | + width: 100%; | |
| 538 | +height: 145rpx; | |
| 539 | +border-bottom: 3rpx solid #eee; | |
| 446 | 540 | |
| 447 | 541 | } |
| 448 | 542 | .top-content { |
| 449 | - width: 82%; | |
| 450 | - padding-top: 33px; | |
| 451 | - height: 100%; | |
| 452 | - padding-left: 40rpx; | |
| 543 | + width: 82%; | |
| 544 | +padding-top: 33px; | |
| 545 | +height: 100%; | |
| 546 | +padding-left: 40rpx; | |
| 453 | 547 | } |
| 454 | 548 | .close-frame{ |
| 455 | - margin-top: 30rpx; | |
| 549 | + margin-top: 30rpx; | |
| 456 | 550 | |
| 457 | 551 | } |
| 458 | -.cx-popup.radius{ | |
| 459 | - | |
| 460 | - height: 650rpx; | |
| 461 | 552 | |
| 462 | -} | |
| 463 | 553 | .xc-hook { |
| 464 | - width: 33rpx; | |
| 465 | - height: 33rpx; | |
| 466 | - transform: rotate(-135deg); | |
| 467 | - line-height: 35rpx; | |
| 468 | - text-align: center; | |
| 469 | - margin-right: 20rpx | |
| 554 | +width: 33rpx; | |
| 555 | +height: 33rpx; | |
| 556 | +transform: rotate(-135deg); | |
| 557 | +line-height: 35rpx; | |
| 558 | +text-align: center; | |
| 559 | +margin-right: 20rpx | |
| 470 | 560 | |
| 471 | 561 | |
| 472 | 562 | } |
| 473 | 563 | .xc-hooks { |
| 474 | - width: 30rpx; | |
| 475 | - height: 30rpx; | |
| 476 | - border: 1rpx solid #999; | |
| 477 | - margin-right: 20rpx; | |
| 564 | +width: 30rpx; | |
| 565 | +height: 30rpx; | |
| 566 | +border: 1rpx solid #999; | |
| 567 | +margin-right: 20rpx; | |
| 478 | 568 | } |
| 479 | 569 | .express_list_frame{ |
| 480 | - display: flex; | |
| 481 | - height: 80rpx; | |
| 482 | - align-items: center; | |
| 483 | - padding-left: 40rpx; | |
| 484 | - border-bottom: 1rpx solid #eee; | |
| 570 | + display: flex; | |
| 571 | +height: 80rpx; | |
| 572 | +align-items: center; | |
| 573 | +padding-left: 40rpx; | |
| 574 | +border-bottom: 1rpx solid #eee; | |
| 485 | 575 | |
| 486 | 576 | } |
| 487 | 577 | .express_list{ |
| 488 | - width: 100%; | |
| 489 | - height: 65%; | |
| 490 | - overflow-y: scroll; | |
| 491 | - overflow: hidden; | |
| 578 | + width: 100%; | |
| 579 | + height: 65%; | |
| 580 | + overflow-y: auto; | |
| 581 | + margin-bottom: 40rpx; | |
| 582 | + | |
| 492 | 583 | } |
| 493 | 584 | .xc-confirms { |
| 494 | - width: 40%; | |
| 495 | - border-radius: 50rpx; | |
| 496 | - height: 55rpx; | |
| 497 | - margin:0 auto; | |
| 498 | - font-size:28rpx; | |
| 499 | - background: #fff; | |
| 500 | - color: #333; | |
| 501 | - border: 2rpx solid #333; | |
| 502 | - | |
| 585 | + box-sizing: border-box; | |
| 586 | + width: 40%; | |
| 587 | + border-radius: 50rpx; | |
| 588 | + height: 80rpx; | |
| 589 | + margin:0 auto; | |
| 590 | + font-size:28rpx; | |
| 591 | + background: #fff; | |
| 592 | + color: #333; | |
| 593 | + border: 2rpx solid #333; | |
| 503 | 594 | } |
| 504 | 595 | |
| 505 | -.xc-right{ | |
| 506 | - width:20rpx; | |
| 507 | - height:20rpx; | |
| 508 | - border-top:2rpx solid #000; | |
| 509 | - border-right:2rpx solid #000; | |
| 510 | - transform:rotate(45deg); | |
| 511 | - display:inline-block; | |
| 512 | - margin-right: 5rpx; | |
| 513 | - margin-left: 10rpx; | |
| 514 | 596 | |
| 515 | -} | |
| 597 | +/* 优惠券的改版样式 */ | |
| 598 | +.xc-coupon-frame{ | |
| 599 | + /* width: 710rpx; */ | |
| 600 | + width: 100%; | |
| 601 | + height:auto; | |
| 602 | + margin: 0 auto; | |
| 516 | 603 | |
| 604 | +} | |
| 605 | +.xc-coupon-frame .coupon-frame{ | |
| 606 | + width: 100%; | |
| 607 | + height: 200rpx; | |
| 608 | + margin-top:10rpx; | |
| 609 | + border-bottom: 1rpx solid #eee; | |
| 517 | 610 | |
| 518 | -.xc-left{ | |
| 519 | - margin-left: 45rpx; | |
| 520 | 611 | } |
| 521 | -.xc-border{ | |
| 522 | - border-top:8rpx solid #eee; | |
| 523 | -width: 100% | |
| 612 | +.xc-coupon-frame .coupon-frame .coupon-left{ | |
| 613 | + width: 215rpx; | |
| 614 | + height:100%; | |
| 615 | + overflow: hidden; | |
| 524 | 616 | } |
| 525 | -.main-top{ | |
| 526 | -margin-top: 20rpx; | |
| 617 | +.xc-money-frames{ | |
| 618 | + width:96%; | |
| 619 | + margin-top: -10px; | |
| 620 | +} | |
| 621 | + | |
| 622 | +.xc-rmb-symbol{ | |
| 623 | + font-size:40rpx; | |
| 527 | 624 | |
| 528 | 625 | } |
| 529 | -.order-num { | |
| 530 | - margin-top: 25rpx; | |
| 531 | - font-size: 24rpx; | |
| 532 | - line-height: 42rpx; | |
| 533 | - width: 95%; | |
| 534 | 626 | |
| 627 | +.xc-rmb-val{ | |
| 628 | + font-size:60rpx; | |
| 629 | + | |
| 630 | +} | |
| 631 | +.coupon-explain{ | |
| 632 | + font-size:25rpx; | |
| 633 | +width:100%; | |
| 634 | + | |
| 635 | + | |
| 636 | +} | |
| 637 | +.xc-valuer{ | |
| 638 | + margin-top:39rpx; | |
| 639 | + margin-left:28rpx; | |
| 640 | + font-size:25rpx; | |
| 641 | +} | |
| 642 | +.coupon-frame .oval{ | |
| 643 | + width:155rpx; | |
| 644 | + height:83rpx; | |
| 645 | + border-radius: 50%; | |
| 646 | + right:-78rpx; | |
| 647 | + top:-37rpx; | |
| 648 | +} | |
| 649 | +.coupon-right{ | |
| 650 | + /* width:490rpx; */ | |
| 651 | + height: 99%; | |
| 652 | + border-top: 1rpx solid #eaeaea; | |
| 653 | + /* //border-bottom: 1rpx solid #eaeaea; */ | |
| 654 | + border-right: 1rpx solid #eaeaea; | |
| 655 | + flex-grow: 1; | |
| 656 | +} | |
| 657 | +.coupon-annotation{ | |
| 658 | + width: 95%; | |
| 659 | + height: 100%; | |
| 660 | + | |
| 535 | 661 | } |
| 662 | +.xc-brand{ | |
| 663 | + width:100rpx; | |
| 664 | + height:35rpx; | |
| 665 | + line-height: 35rpx; | |
| 666 | + font-size:21rpx; | |
| 667 | + border-radius:10rpx; position: relative; top:-1px; | |
| 668 | + margin-right: 8rpx | |
| 669 | +} | |
| 670 | +.top-frame{ | |
| 671 | + width:82%; | |
| 672 | + height: 75rpx; | |
| 673 | + margin-top:10rpx; | |
| 674 | +} | |
| 675 | +.top-frame .coupon-wode{ | |
| 676 | + font-size: 25rpx; | |
| 677 | + margin-left:10rpx; | |
| 678 | + width:340rpx; | |
| 679 | + height:88rpx; | |
| 680 | +} | |
| 681 | +.coupon-code{ | |
| 682 | + width:60rpx; | |
| 683 | + height:60rpx; | |
| 684 | + margin-top:5rpx; | |
| 685 | + | |
| 686 | +} | |
| 687 | +.frame{ | |
| 688 | + width: 100% | |
| 689 | +} | |
| 690 | +.coupon-time{ | |
| 691 | + font-size: 23rpx; | |
| 692 | + line-height:33rpx; | |
| 693 | + color: #333; | |
| 694 | +} | |
| 695 | + | |
| 696 | +.clik-get{ | |
| 697 | + width:125rpx; | |
| 698 | + height:45rpx; | |
| 699 | + border-radius: 25rpx; | |
| 700 | + line-height: 45rpx; | |
| 701 | + font-size:25rpx; | |
| 702 | + bottom:67rpx; | |
| 703 | + right:6px; | |
| 704 | +} | |
| 705 | + | |
| 706 | +.code-img{ | |
| 707 | + margin-left:20rpx; | |
| 708 | +} | |
| 709 | +.bottmo-explain{ | |
| 710 | +top:145rpx; | |
| 711 | +width:94%; | |
| 712 | +border-top:1rpx dashed #eee; | |
| 713 | +padding-top:8rpx; | |
| 714 | +height:38rpx; | |
| 715 | +line-height: 51rpx; | |
| 716 | + | |
| 717 | +} | |
| 718 | +.font-word{ | |
| 719 | + font-size: 22rpx; | |
| 720 | +} | |
| 721 | +.circle-size{ | |
| 722 | + background: #a0a0a0; | |
| 723 | + width: 27rpx; | |
| 724 | + height: 27rpx; | |
| 725 | + margin-top:13rpx; | |
| 726 | +margin-left:8rpx; | |
| 727 | +display: flex; | |
| 728 | + | |
| 729 | +align-items: center; | |
| 730 | +} | |
| 731 | +.xc-jiantou{ | |
| 732 | + /* width: 9rpx; | |
| 733 | + height: 9rpx; */ | |
| 734 | + /* border-top: 2rpx solid #fff; | |
| 735 | + border-right: 2rpx solid #fff; */ | |
| 736 | + transform: rotate(-90deg); | |
| 737 | + color: #fff; | |
| 738 | + font-size: 15rpx; | |
| 739 | + /* display:inline-block; | |
| 740 | + margin-top: 6.5rpx; */ | |
| 741 | + text-align: center; | |
| 742 | +width: 24rpx; | |
| 743 | +} | |
| 744 | +.xc-buttom{ | |
| 745 | + box-sizing: border-box; | |
| 746 | + width:100%; | |
| 747 | + min-height:76rpx; | |
| 748 | + height:auto; | |
| 749 | + line-height:40rpx; | |
| 750 | + border-left:1rpx solid #eee; | |
| 751 | + border-right:1rpx solid #eee; | |
| 752 | + border-bottom:1rpx solid #eee; | |
| 753 | +/* margin-left: 6rpx; */ | |
| 754 | +} | |
| 755 | + | |
| 536 | 756 | .goods-num{ |
| 537 | 757 | font-size: 28rpx; |
| 538 | -color: #333; | |
| 758 | + color: #333; | |
| 759 | +} | |
| 539 | 760 | |
| 761 | +.explain-coupon{ | |
| 762 | + font-size:25rpx; | |
| 763 | + padding: 10rpx 10rpx | |
| 540 | 764 | } |
| 541 | -.click-buttem{ | |
| 542 | -width: 90%; | |
| 543 | -margin: auto; | |
| 765 | +.circle-frame{ | |
| 766 | + width: 20rpx; | |
| 767 | + height: auto; | |
| 768 | + z-index:1; | |
| 769 | + left:210rpx; | |
| 770 | + | |
| 771 | +} | |
| 772 | +.circle-sawtooth{ | |
| 773 | + width: 11rpx; | |
| 774 | + height: 11rpx; | |
| 775 | + background: #fff; | |
| 776 | +} | |
| 777 | + | |
| 778 | +.red{background-color: #fe7496;} | |
| 779 | +.green{ background-color: #22c7c1;} | |
| 780 | +.blue{background-color:#5e82e3;} | |
| 781 | +.g_gray{background-color: #aaaaaa} | |
| 782 | + | |
| 783 | +.f_text{text-align: center; height:96rpx; } | |
| 784 | +.xc-hook.sn { | |
| 785 | + margin-top:12%; | |
| 786 | +width:45rpx; | |
| 787 | +height:45rpx; | |
| 788 | +font-size:28rpx; | |
| 789 | +line-height:44rpx; | |
| 790 | + | |
| 791 | + | |
| 792 | +} | |
| 793 | +.xc-hooks.on{ | |
| 794 | + margin-top:12%; | |
| 795 | +width:42rpx; | |
| 796 | +height:42rpx; | |
| 797 | +} | |
| 798 | +.may_use_coupon{ | |
| 799 | + /* width: 95%; */ | |
| 800 | + /* height: 68rpx; */ | |
| 801 | + line-height:78rpx; | |
| 802 | + padding: 0 26rpx; | |
| 803 | + justify-content: space-between; | |
| 804 | + align-items: center; | |
| 805 | +} | |
| 806 | +.determine-frame{ | |
| 807 | + width: 100%; | |
| 808 | + height: 130rpx; | |
| 809 | + | |
| 544 | 810 | } |
| 545 | 811 | .xc-determine{ |
| 546 | - height: 55rpx; | |
| 812 | + height: 80rpx; | |
| 547 | 813 | width: 40%; |
| 548 | 814 | border-radius: 50rpx; |
| 549 | 815 | background: #d60021; |
| ... | ... | @@ -552,6 +818,21 @@ font-size: 28rpx; |
| 552 | 818 | margin: 0 auto; |
| 553 | 819 | |
| 554 | 820 | } |
| 821 | +.click-buttem{ | |
| 822 | +width: 90%; | |
| 823 | +margin: auto; | |
| 824 | +} | |
| 825 | +.logistics-name{ | |
| 826 | + margin-right:20rpx; | |
| 827 | +} | |
| 828 | +.xc-border{ | |
| 829 | + border-top:8rpx solid #eee; | |
| 830 | +width: 100% | |
| 831 | +} | |
| 832 | +.main-top{ | |
| 833 | +margin-top: 20rpx; | |
| 834 | + | |
| 835 | +} | |
| 555 | 836 | .xc-hookts{ |
| 556 | 837 | border: 1rpx solid #999; |
| 557 | 838 | |
| ... | ... | @@ -561,8 +842,60 @@ border: 1rpx solid #999; |
| 561 | 842 | height:30rpx; |
| 562 | 843 | |
| 563 | 844 | } |
| 845 | +.xc-hookt.sn{ | |
| 846 | + width: 32rpx; | |
| 847 | +height: 32rpx; | |
| 848 | +font-size: 28rpx; | |
| 849 | +line-height: 34rpx; | |
| 850 | +} | |
| 851 | +.xc-hookt{ | |
| 852 | + transform: rotate(-135deg); | |
| 853 | +text-align: center; | |
| 854 | + | |
| 855 | +} | |
| 856 | +.main-bottom{ | |
| 857 | + margin-bottom: 20rpx; | |
| 858 | + | |
| 859 | +} | |
| 860 | +.xc-hookst{ | |
| 861 | + border: 1rpx solid #999; | |
| 862 | + | |
| 863 | +} | |
| 864 | +.xc-hookst.ons{ | |
| 865 | + width: 42rpx; | |
| 866 | +height: 42rpx; | |
| 867 | +margin-left: 20rpx; | |
| 868 | + | |
| 869 | +} | |
| 870 | +.is_use_coupon{ | |
| 871 | + width: 65%; | |
| 872 | +justify-content: flex-end; | |
| 873 | +padding-top: 10rpx; | |
| 874 | + | |
| 875 | + | |
| 876 | +} | |
| 877 | +.xc-hooka{ | |
| 878 | + transform: rotate(-135deg); | |
| 879 | +text-align: center; | |
| 880 | + | |
| 881 | +} | |
| 882 | +.xc-hooka.sn{ | |
| 883 | + width: 45rpx; | |
| 884 | +height: 45rpx; | |
| 885 | +font-size: 28rpx; | |
| 886 | +line-height: 44rpx; | |
| 887 | +margin-left: 20rpx; | |
| 888 | + | |
| 889 | +} | |
| 564 | 890 | .color-gray{ |
| 565 | 891 | color: #808080; |
| 566 | 892 | } |
| 893 | +.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | |
| 894 | +.gift_image{ width: 60rpx; height: 60rpx; position: absolute; top: 0; left: 0} | |
| 567 | 895 | |
| 568 | -.n_guige{ display: inline-block; background:rgb(236, 236, 236); color: rgb(63,63,63); padding: 3rpx 10rpx; border-radius: 3rpx } | |
| 569 | 896 | \ No newline at end of file |
| 897 | +.quan_num_show{ padding: 4rpx 6rpx; background-color:#ea5551; color:#fff; border-radius: 6rpx;margin-left:10rpx;font-size:24rpx;} | |
| 898 | + | |
| 899 | +.navigator-hover { | |
| 900 | + background: none; | |
| 901 | + opacity: 1; | |
| 902 | +} | ... | ... |
pages/cart/cart_wk/cart_wk.wxml
| 1 | 1 | <wxs module="filters" src="../../../utils/filter.wxs"></wxs> |
| 2 | 2 | <!----要进行判断地址是否显示----> |
| 3 | -<view bindtap="enterAddressPage" class="user-mes" | |
| 3 | +<view bindtap="enterAddressPage" class="user-mes mgt20" | |
| 4 | 4 | hidden='{{exp_type==1 }}'> |
| 5 | 5 | <!-----默认地址显示----> |
| 6 | 6 | <block wx:if="{{user_addr!=null}}"> |
| 7 | - <view class="user-contact">{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> | |
| 7 | + <view class="user-contact">收货人:{{user_addr.consignee}}{{' '}}{{user_addr.mobile}}</view> | |
| 8 | 8 | <view class="location"> |
| 9 | 9 | <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view> |
| 10 | 10 | <view class="pos-icon"> |
| 11 | - <image class="wh100" src="{{imgUrl}}/miniapp/images/iconfont-address.png"></image> | |
| 11 | + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image> | |
| 12 | 12 | </view> |
| 13 | 13 | </view> |
| 14 | 14 | <view class="update-logistics"> |
| ... | ... | @@ -21,15 +21,13 @@ |
| 21 | 21 | <image class="addr_jia" src="{{imgUrl}}/miniapp/images/jia.png"></image>添加地址 |
| 22 | 22 | </view> |
| 23 | 23 | </block> |
| 24 | - <view class="border-img"><image class="wh100" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> | |
| 24 | + <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> --> | |
| 25 | 25 | </view> |
| 26 | 26 | |
| 27 | 27 | <!--头部--> |
| 28 | -<view class='top'> | |
| 29 | - <view class='t_img'> | |
| 30 | - <image src='{{imgUrl}}/miniapp/images/11.png'></image> | |
| 31 | - </view> | |
| 32 | - <view class='t_wz'>{{pickup.pickup_name}}</view> | |
| 28 | +<view class='top bdr_t-14 flex'> | |
| 29 | + <image class="t_img" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image> | |
| 30 | + <view class='t_wz'>美得得超市{{pickup.pickup_name}}</view> | |
| 33 | 31 | </view> |
| 34 | 32 | |
| 35 | 33 | <!--商品图片显示--> |
| ... | ... | @@ -39,17 +37,19 @@ |
| 39 | 37 | <image src="{{order.show_img}}" binderror="bind_bnerr" data-errorimg="order.show_img"></image> |
| 40 | 38 | </view> |
| 41 | 39 | |
| 42 | - <view class='cen_name'>{{order.order_goods.goods_name}}</view> | |
| 43 | - | |
| 44 | - <view class='cen_jg'>¥{{order.order_goods.goods_price}} | |
| 45 | - <view class='cen_sl'>x{{order.order_goods.goods_num}}</view> | |
| 46 | - </view> | |
| 47 | - | |
| 40 | + <view class="details-container"> | |
| 41 | + <view class='cen_name ellipsis-3'>{{order.order_goods.goods_name}}</view> | |
| 42 | + <view class="flex jc_sb"> | |
| 43 | + <view class='cen_jg'>¥{{order.order_goods.goods_price}}</view> | |
| 44 | + <view class='cen_sl'>x{{order.order_goods.goods_num}}</view> | |
| 45 | + </view> | |
| 46 | + </view> | |
| 47 | + | |
| 48 | 48 | </view> |
| 49 | 49 | |
| 50 | 50 | <!--取货方式--> |
| 51 | 51 | |
| 52 | -<view class='quhou'> | |
| 52 | +<view class='quhou bdr_b-14'> | |
| 53 | 53 | |
| 54 | 54 | <view bindtap="set_wuliu" data-type="1" class='qu_fs' wx:if="{{distr_type==0 || distr_type==1}}"> |
| 55 | 55 | <image wx:if="{{exp_type==0}}" src='{{imgUrl}}/miniapp/images/kon.png'></image> |
| ... | ... | @@ -64,7 +64,7 @@ |
| 64 | 64 | </view> |
| 65 | 65 | |
| 66 | 66 | </view> |
| 67 | -<view class="use-item" wx:if='{{exp_type==0}}'> | |
| 67 | +<view class="use-item bdr_b-14" wx:if='{{exp_type==0}}'> | |
| 68 | 68 | <view>使用物流:</view> |
| 69 | 69 | <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name"> |
| 70 | 70 | <view >{{wu_arr[index].name}}</view> |
| ... | ... | @@ -72,46 +72,45 @@ |
| 72 | 72 | </view> |
| 73 | 73 | |
| 74 | 74 | <!--成团人数--> |
| 75 | -<view class='chentuan'> | |
| 75 | +<view class='chentuan bdr14'> | |
| 76 | 76 | <view class='ct_one jc_sb'> |
| 77 | 77 | <view class='ct_one_left'>成团人数</view> |
| 78 | 78 | <view class='ct_one_right'><text class='redwz'>{{teamgroup.jt_ct_num}}</text>人</view> |
| 79 | 79 | </view> |
| 80 | 80 | <view class='ct_one jc_sb'> |
| 81 | 81 | <view class='ct_one_left'>成团金额</view> |
| 82 | - <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money+order.tail_money,2)}}</text></view> | |
| 82 | + <view class='ct_one_right'><text class='redwz'>¥{{filters.toFix(order.order_amount+order.user_money+order.tail_money,2)}}</text></view> | |
| 83 | 83 | </view> |
| 84 | 84 | <view class='ct_one jc_sb'> |
| 85 | 85 | <view class='ct_one_left'>支付定金</view> |
| 86 | - <view class='ct_one_right'>¥<text class='redwz'>{{filters.toFix(order.order_amount+order.user_money,2)}}</text> | |
| 86 | + <view class='ct_one_right'><text class='redwz'>¥{{filters.toFix(order.order_amount+order.user_money,2)}}</text> | |
| 87 | 87 | </view> |
| 88 | 88 | </view> |
| 89 | 89 | </view> |
| 90 | 90 | |
| 91 | 91 | <!--尾款--> |
| 92 | -<view class='chentuan'> | |
| 92 | +<view class='chentuan bdr14'> | |
| 93 | 93 | <view class='ct_one jc_sb'> |
| 94 | 94 | <view class='ct_one_left'>尾款金额</view> |
| 95 | - <view class='ct_one_right'>¥<text class='redwz'>{{order.tail_money}}</text> | |
| 95 | + <view class='ct_one_right'><text class='redwz'>¥{{order.tail_money}}</text> | |
| 96 | 96 | </view> |
| 97 | 97 | </view> |
| 98 | 98 | |
| 99 | 99 | <view class='ct_one jc_sb' wx:if="{{exp_price>0}}"> |
| 100 | 100 | <view class='ct_one_left'>配送费用</view> |
| 101 | - <view class='ct_one_right'>¥<text class='redwz'>{{exp_price}}</text> | |
| 101 | + <view class='ct_one_right'><text class='redwz'>¥{{exp_price}}</text> | |
| 102 | 102 | </view> |
| 103 | 103 | </view> |
| 104 | 104 | </view> |
| 105 | 105 | |
| 106 | 106 | <!--支付--> |
| 107 | -<view class='zf'> | |
| 108 | - <view class='zf_left'> | |
| 107 | +<view class='zf shadow'> | |
| 108 | + <!-- <view class='zf_left'> | |
| 109 | 109 | <text class='zf_left_wz'>支付合计:</text> |
| 110 | 110 | <text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text> |
| 111 | - </view> | |
| 112 | - <view class='zf_btn' bindtap="to_pay"> | |
| 113 | - <text>支付尾款</text> | |
| 114 | - </view> | |
| 111 | + </view> --> | |
| 112 | + <view class='zf_left'>支付合计:<text class='zf_left_red'>¥{{filters.toFix(order.tail_money+exp_price,2)}}</text></view> | |
| 113 | + <view class='zf_btn' bindtap="to_pay">支付尾款</view> | |
| 115 | 114 | </view> |
| 116 | 115 | |
| 117 | 116 | <!--支付的方式选择,0微信支付 1余额支付--> | ... | ... |
pages/cart/cart_wk/cart_wk.wxss
| 1 | -/* pages/cart/cart_wk/cart_wk.wxss */ | |
| 1 | +.bdr_t-14 { | |
| 2 | + border-top-left-radius: 14rpx; | |
| 3 | + border-top-right-radius: 14rpx; | |
| 4 | +} | |
| 5 | +.bdr_b-14 { | |
| 6 | + border-bottom-left-radius: 14rpx; | |
| 7 | + border-bottom-right-radius: 14rpx; | |
| 8 | +} | |
| 9 | +.bdr14 { | |
| 10 | + border-radius: 14rpx; | |
| 11 | +} | |
| 12 | +.mgt20 { | |
| 13 | + margin-top: 20rpx; | |
| 14 | +} | |
| 15 | +.shadow { | |
| 16 | + box-shadow: 0 4rpx 12px #e7e9eb; | |
| 17 | +} | |
| 18 | +.shadow-1 { | |
| 19 | + box-shadow: 16rpx 0px 12px #e7e9eb; | |
| 20 | +} | |
| 21 | + | |
| 22 | +page { | |
| 23 | + background-color: #F0F0F0; | |
| 24 | + padding: 0 22rpx; | |
| 25 | + box-sizing: border-box; | |
| 26 | +} | |
| 2 | 27 | |
| 3 | 28 | .user-mes { |
| 4 | - position: relative; | |
| 5 | - background-color: #fff; | |
| 6 | - font-size: 30rpx; | |
| 7 | - color: #444; | |
| 29 | + position: relative; | |
| 30 | + background-color: #fff; | |
| 31 | + font-size: 32rpx; | |
| 32 | + color: #444; | |
| 33 | + /* margin-top: 28rpx; */ | |
| 34 | + border-radius: 14rpx; | |
| 8 | 35 | } |
| 9 | 36 | .user-contact { |
| 10 | - padding: 24rpx 80rpx; | |
| 37 | + padding: 24rpx 26rpx; | |
| 38 | + font-weight: 600; | |
| 11 | 39 | } |
| 12 | - | |
| 40 | + | |
| 13 | 41 | .location { |
| 14 | - position: relative; | |
| 15 | - padding: 0 80rpx 24rpx; | |
| 42 | + position: relative; | |
| 43 | + padding: 0 70rpx 24rpx; | |
| 16 | 44 | } |
| 17 | 45 | |
| 18 | 46 | .pos-icon { |
| 19 | - position: absolute; | |
| 20 | - left: 30rpx; | |
| 21 | - top: 0; | |
| 22 | - width: 32rpx; | |
| 23 | - height: 32.5rpx; | |
| 47 | + position: absolute; | |
| 48 | + left: 28rpx; | |
| 49 | + top: 6rpx; | |
| 50 | + width: 30rpx; | |
| 51 | + height: 36rpx; | |
| 24 | 52 | } |
| 25 | 53 | |
| 26 | 54 | .border-img { |
| ... | ... | @@ -29,14 +57,14 @@ |
| 29 | 57 | } |
| 30 | 58 | |
| 31 | 59 | .update-logistics { |
| 32 | - position: absolute; | |
| 33 | - right: 0; | |
| 34 | - top: 0; | |
| 35 | - width: 80rpx; | |
| 36 | - height: 148rpx; | |
| 37 | - display: flex; | |
| 38 | - align-items: center; | |
| 39 | - justify-content: center; | |
| 60 | + position: absolute; | |
| 61 | + right: 0; | |
| 62 | + top: 0; | |
| 63 | + width: 80rpx; | |
| 64 | + height: 100%; | |
| 65 | + display: flex; | |
| 66 | + align-items: center; | |
| 67 | + justify-content: center; | |
| 40 | 68 | } |
| 41 | 69 | |
| 42 | 70 | .arrow-rigth { |
| ... | ... | @@ -60,56 +88,65 @@ |
| 60 | 88 | } |
| 61 | 89 | |
| 62 | 90 | .top { |
| 63 | - | |
| 64 | - background-color: white; | |
| 65 | -height: 40px; | |
| 66 | -display: flex; | |
| 67 | -padding: 10rpx 0 0 0; | |
| 68 | -border-bottom: 2rpx solid rgb(238, 238, 238); | |
| 69 | -margin-top: 10rpx; | |
| 70 | - | |
| 91 | + background-color: white; | |
| 92 | + height: 40px; | |
| 93 | + display: flex; | |
| 94 | + padding: 0 26rpx; | |
| 95 | + /* border-bottom: 2rpx solid rgb(238, 238, 238); */ | |
| 96 | + margin-top: 20rpx; | |
| 97 | + align-items: center; | |
| 71 | 98 | } |
| 72 | 99 | |
| 73 | -.t_img image { | |
| 74 | - width: 70rpx; | |
| 75 | - height: 70rpx; | |
| 100 | +.t_img { | |
| 101 | + display: block; | |
| 102 | + width: 50rpx; | |
| 103 | + height: 50rpx; | |
| 104 | + margin-left:-6rpx; | |
| 76 | 105 | } |
| 77 | 106 | |
| 78 | 107 | .t_wz { |
| 79 | 108 | font-size: 30rpx; |
| 80 | - font-weight: bold; | |
| 109 | + /* font-weight: bold; */ | |
| 81 | 110 | color: rgb(0, 0, 0); |
| 82 | 111 | line-height: 65rpx; |
| 83 | - margin-left: 18rpx; | |
| 112 | + /* margin-left: 18rpx; */ | |
| 84 | 113 | } |
| 85 | 114 | |
| 86 | 115 | .center { |
| 116 | + box-sizing: border-box; | |
| 87 | 117 | background-color: white; |
| 88 | 118 | width: 100%; |
| 89 | 119 | min-height: 80rpx; |
| 90 | 120 | display: flex; |
| 91 | - padding: 24rpx 140rpx 24rpx 20rpx; | |
| 121 | + padding: 24rpx 26rpx; | |
| 92 | 122 | border-bottom: 2rpx solid #eee; |
| 93 | 123 | } |
| 94 | 124 | |
| 95 | 125 | .center .cen_img { |
| 96 | - width: 120rpx; | |
| 97 | - height: 120rpx; | |
| 126 | + width: 200rpx; | |
| 127 | + height: 200rpx; | |
| 128 | + border-radius: 14rpx; | |
| 129 | + overflow: hidden; | |
| 130 | + flex-shrink: 0; | |
| 98 | 131 | } |
| 99 | 132 | |
| 100 | 133 | .center .cen_img image { |
| 101 | - width: 120rpx; | |
| 102 | - height: 120rpx; | |
| 134 | + display: block; | |
| 135 | + width: 100%; | |
| 136 | + height: 100%; | |
| 137 | +} | |
| 138 | + | |
| 139 | +.details-container { | |
| 140 | + display: flex; | |
| 141 | + padding-left:20rpx; | |
| 142 | + flex:1; | |
| 143 | + flex-direction: column; | |
| 144 | + justify-content: space-between; | |
| 103 | 145 | } |
| 104 | 146 | |
| 105 | 147 | .center .cen_name { |
| 106 | 148 | height: 120rpx; |
| 107 | - width: 370rpx; | |
| 108 | 149 | font-size: 30rpx; |
| 109 | - padding-left: 10rpx; | |
| 110 | - overflow:hidden; | |
| 111 | - text-overflow:ellipsis; | |
| 112 | - white-space:nowraps | |
| 113 | 150 | } |
| 114 | 151 | |
| 115 | 152 | .center .cen_jg { |
| ... | ... | @@ -117,7 +154,6 @@ margin-top: 10rpx; |
| 117 | 154 | font-size: 32rpx; |
| 118 | 155 | width: 200rpx; |
| 119 | 156 | height: 40rpx; |
| 120 | - text-align: right; | |
| 121 | 157 | } |
| 122 | 158 | |
| 123 | 159 | .center .cen_jg .cen_sl { |
| ... | ... | @@ -128,20 +164,23 @@ margin-top: 10rpx; |
| 128 | 164 | } |
| 129 | 165 | |
| 130 | 166 | .quhou { |
| 167 | + box-sizing: border-box; | |
| 131 | 168 | background-color: white; |
| 132 | 169 | border-bottom: 2rpx solid #eee; |
| 133 | 170 | font-size: 28rpx; |
| 134 | - min-height: 70rpx; | |
| 171 | + height: 92rpx; | |
| 135 | 172 | display: flex; |
| 136 | - padding-top: 20rpx; | |
| 173 | + align-items: center; | |
| 174 | + padding: 0 26rpx; | |
| 137 | 175 | } |
| 138 | 176 | |
| 139 | 177 | .quhou .qu_fs { |
| 140 | 178 | font-size: 30rpx; |
| 141 | 179 | display: flex; |
| 142 | 180 | height: 60rpx; |
| 143 | - margin-left: 25rpx; | |
| 181 | + /* margin-left: 25rpx; */ | |
| 144 | 182 | line-height: 62rpx; |
| 183 | + margin-right: 20rpx; | |
| 145 | 184 | } |
| 146 | 185 | |
| 147 | 186 | .quhou .qu_fs image { |
| ... | ... | @@ -156,23 +195,26 @@ margin-top: 10rpx; |
| 156 | 195 | .quhou .qu_fs .qu_wz {} |
| 157 | 196 | |
| 158 | 197 | .chentuan { |
| 198 | + box-sizing: border-box; | |
| 159 | 199 | width: 100%; |
| 160 | 200 | min-height: 90rpx; |
| 161 | 201 | background-color: white; |
| 162 | - padding: 20rpx 10rpx; | |
| 202 | + padding: 20rpx 26rpx; | |
| 163 | 203 | margin-top: 20rpx; |
| 164 | 204 | font-size: 28rpx; |
| 165 | 205 | } |
| 166 | 206 | |
| 167 | 207 | .chentuan .ct_one { |
| 168 | - height: 40rpx; | |
| 169 | - margin-bottom: 10rpx; | |
| 208 | + /* height: 40rpx; */ | |
| 209 | + /* margin-bottom: 10rpx; */ | |
| 170 | 210 | display: flex; |
| 171 | - width: 708rpx; | |
| 211 | + line-height: 60rpx; | |
| 212 | + font-size: 30rpx; | |
| 213 | + /* width: 708rpx; */ | |
| 172 | 214 | } |
| 173 | 215 | |
| 174 | 216 | .chentuan .ct_one .ct_one_left { |
| 175 | - margin-left: 10rpx; | |
| 217 | + /* margin-left: 10rpx; */ | |
| 176 | 218 | } |
| 177 | 219 | |
| 178 | 220 | .chentuan .ct_one .ct_one_right { |
| ... | ... | @@ -185,14 +227,26 @@ margin-top: 10rpx; |
| 185 | 227 | } |
| 186 | 228 | |
| 187 | 229 | .zf { |
| 188 | - background-color: white; | |
| 230 | + /* background-color: white; | |
| 189 | 231 | width: 100%; |
| 190 | 232 | min-height: 80rpx; |
| 191 | 233 | line-height: 80rpx; |
| 192 | 234 | font-size: 30rpx; |
| 193 | 235 | position: fixed; |
| 194 | 236 | bottom: 0; |
| 195 | - text-align: right; | |
| 237 | + text-align: right; */ | |
| 238 | + | |
| 239 | + height: 94rpx; | |
| 240 | + box-sizing: border-box; | |
| 241 | + display: flex; | |
| 242 | + justify-content: space-between; | |
| 243 | + background-color: white; | |
| 244 | + align-items: center; | |
| 245 | + position: fixed; | |
| 246 | + bottom: 0; | |
| 247 | + left: 0; | |
| 248 | + width: 100%; | |
| 249 | + padding: 0 30rpx; | |
| 196 | 250 | } |
| 197 | 251 | |
| 198 | 252 | .zf view{ |
| ... | ... | @@ -204,13 +258,29 @@ margin-top: 10rpx; |
| 204 | 258 | margin-right: 20rpx; |
| 205 | 259 | } |
| 206 | 260 | |
| 207 | -.zf .zf_btn { | |
| 208 | - color: white; | |
| 261 | +.zf_btn { | |
| 262 | + /* color: white; | |
| 209 | 263 | background-color: #c4182e; |
| 210 | 264 | font-size: 28rpx; |
| 211 | 265 | width: 170rpx; |
| 212 | 266 | text-align: center; |
| 213 | - line-height: 80rpx; | |
| 267 | + line-height: 80rpx; */ | |
| 268 | + /* float: right; | |
| 269 | + width: 200rpx; | |
| 270 | + height: 100rpx; | |
| 271 | + line-height: 100rpx; | |
| 272 | + text-align: center; | |
| 273 | + font-size: 30rpx; | |
| 274 | + color: #fff; | |
| 275 | + background-color: #f23030; */ | |
| 276 | + color: white; | |
| 277 | + background-color: #FE4445; | |
| 278 | + height: 72rpx; | |
| 279 | + line-height: 72rpx; | |
| 280 | + padding: 0 42rpx; | |
| 281 | + border-radius: 36rpx; | |
| 282 | + margin-left: 0; | |
| 283 | + margin-right: 0; | |
| 214 | 284 | } |
| 215 | 285 | |
| 216 | 286 | .zf .zf_left .zf_left_red { |
| ... | ... | @@ -218,9 +288,22 @@ margin-top: 10rpx; |
| 218 | 288 | } |
| 219 | 289 | |
| 220 | 290 | /*----------nyf新增,地址---------*/ |
| 221 | -.add_new{height: 60rpx; line-height: 60rpx;} | |
| 222 | -.addr_jia{width: 45rpx; height: 45rpx; border: 1rpx solid #ddd; | |
| 223 | - margin-right: 15rpx; margin-left: 20rpx; vertical-align: middle;} | |
| 291 | +.add_new{ | |
| 292 | + box-sizing: border-box; | |
| 293 | + height: 92rpx; | |
| 294 | + padding: 0 26rpx; | |
| 295 | + display: flex; | |
| 296 | + align-items: center; | |
| 297 | + /* line-height: 60rpx; */ | |
| 298 | +} | |
| 299 | +.addr_jia{ | |
| 300 | + width: 45rpx; | |
| 301 | + height: 45rpx; | |
| 302 | + border: 1rpx solid #ddd; | |
| 303 | + margin-right: 15rpx; | |
| 304 | + /* margin-left: 20rpx; */ | |
| 305 | + vertical-align: middle; | |
| 306 | +} | |
| 224 | 307 | .yu_er{margin-left: 15rpx;} .wuliu{margin-left: 20rpx;} |
| 225 | 308 | |
| 226 | 309 | |
| ... | ... | @@ -228,9 +311,9 @@ margin-top: 10rpx; |
| 228 | 311 | display: flex; |
| 229 | 312 | align-items: center; |
| 230 | 313 | height: 92rpx; |
| 231 | - border-bottom: 1px solid #ddd; | |
| 314 | + /* border-bottom: 1px solid #ddd; */ | |
| 232 | 315 | font-size: 30rpx; |
| 233 | - padding-left: 20rpx; | |
| 316 | + padding:0 26rpx; | |
| 234 | 317 | background: #fff; |
| 235 | 318 | } |
| 236 | 319 | .use-item>view{ | ... | ... |
pages/giftpack/birthdaygift/birthdaygift.js
| ... | ... | @@ -127,7 +127,7 @@ Page({ |
| 127 | 127 | //--先判断会员状态-- |
| 128 | 128 | var user_info = getApp().globalData.userInfo; |
| 129 | 129 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 130 | - getApp().goto('/pages/getphone/getphone'); | |
| 130 | + getApp().goto('/pages/togoin/togoin'); | |
| 131 | 131 | return false; |
| 132 | 132 | } |
| 133 | 133 | this.GetList(); | ... | ... |
pages/giftpack/buygiftpack/giftpackbuy.js
| ... | ... | @@ -41,7 +41,7 @@ Page({ |
| 41 | 41 | //--先判断会员状态-- |
| 42 | 42 | var user_info = getApp().globalData.userInfo; |
| 43 | 43 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 44 | - getApp().goto('/pages/getphone/getphone'); | |
| 44 | + getApp().goto('/pages/togoin/togoin'); | |
| 45 | 45 | return false; |
| 46 | 46 | } |
| 47 | 47 | this.getList(); | ... | ... |
pages/giftpack/evaluategift/evaluategift.js
| ... | ... | @@ -31,6 +31,10 @@ Page({ |
| 31 | 31 | orderNumber: "", //订单号 |
| 32 | 32 | orderGoodsId: "", //商品id |
| 33 | 33 | orderType:1, |
| 34 | + | |
| 35 | + weappurltitle:"进入商城购物", | |
| 36 | + weappurl:"/pages/index/index/index", | |
| 37 | + | |
| 34 | 38 | }, |
| 35 | 39 | GetList: function() { |
| 36 | 40 | var th = this; |
| ... | ... | @@ -113,6 +117,14 @@ Page({ |
| 113 | 117 | textTitle: res.data.data.actIntro.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block"') |
| 114 | 118 | }) |
| 115 | 119 | } |
| 120 | + if (res.data.data.weappurl != '' && res.data.data.weappurltitle != '') { | |
| 121 | + th.setData({ | |
| 122 | + weappurl: res.data.data.weappurl, | |
| 123 | + weappurltitle: res.data.data.weappurltitle | |
| 124 | + }) | |
| 125 | + } | |
| 126 | + | |
| 127 | + | |
| 116 | 128 | } else { |
| 117 | 129 | getApp().my_warnning(res.data.msg, 0, th); |
| 118 | 130 | return false; |
| ... | ... | @@ -140,7 +152,7 @@ Page({ |
| 140 | 152 | //--先判断会员状态-- |
| 141 | 153 | var user_info = getApp().globalData.userInfo; |
| 142 | 154 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 143 | - getApp().goto('/pages/getphone/getphone'); | |
| 155 | + getApp().goto('/pages/togoin/togoin'); | |
| 144 | 156 | return false; |
| 145 | 157 | } |
| 146 | 158 | ... | ... |
pages/giftpack/evaluategift/evaluategift.wxml
| ... | ... | @@ -158,7 +158,7 @@ |
| 158 | 158 | </block> |
| 159 | 159 | <view class="button_box"> |
| 160 | 160 | <view> |
| 161 | - <button class="button" bindtap="goto" data-url="/pages/index/index/index">进入商城购物</button> | |
| 161 | + <button class="button" bindtap="goto" data-url="{{weappurl}}">{{weappurltitle}}</button> | |
| 162 | 162 | </view> |
| 163 | 163 | <view class="button_text "> |
| 164 | 164 | <text>本活动最终解释权归公司所有,如果有问题请联系客服</text> | ... | ... |
pages/giftpack/festival/festival.js
| ... | ... | @@ -133,7 +133,7 @@ Page({ |
| 133 | 133 | //--先判断会员状态-- |
| 134 | 134 | var user_info = getApp().globalData.userInfo; |
| 135 | 135 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 136 | - getApp().goto('/pages/getphone/getphone'); | |
| 136 | + getApp().goto('/pages/togoin/togoin'); | |
| 137 | 137 | return false; |
| 138 | 138 | } |
| 139 | 139 | this.is_festival(); | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -45,7 +45,7 @@ Page({ |
| 45 | 45 | //--先判断会员状态-- |
| 46 | 46 | var user_info = getApp().globalData.userInfo; |
| 47 | 47 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 48 | - getApp().goto('/pages/getphone/getphone'); | |
| 48 | + getApp().goto('/pages/togoin/togoin'); | |
| 49 | 49 | return false; |
| 50 | 50 | } |
| 51 | 51 | ... | ... |
pages/giftpack/mygiftpack/mygiftpack.js
| ... | ... | @@ -42,7 +42,7 @@ Page({ |
| 42 | 42 | //--先判断会员状态-- |
| 43 | 43 | var user_info = getApp().globalData.userInfo; |
| 44 | 44 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 45 | - getApp().goto('/pages/getphone/getphone'); | |
| 45 | + getApp().goto('/pages/togoin/togoin'); | |
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | this.getList(); | ... | ... |
pages/giftpack/newvipgift/newvipgift.js
| ... | ... | @@ -126,7 +126,7 @@ Page({ |
| 126 | 126 | //--先判断会员状态-- |
| 127 | 127 | var user_info = getApp().globalData.userInfo; |
| 128 | 128 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 129 | - getApp().goto('/pages/getphone/getphone'); | |
| 129 | + getApp().goto('/pages/togoin/togoin'); | |
| 130 | 130 | return false; |
| 131 | 131 | } |
| 132 | 132 | this.GetList(); | ... | ... |
pages/goods/goodsInfo/g_filter.wxs
| ... | ... | @@ -77,7 +77,7 @@ var g_filters = { |
| 77 | 77 | //min_price=min.price; |
| 78 | 78 | //min_name=min.name; |
| 79 | 79 | if(type==0) return min_price.toFixed(2); |
| 80 | - if(min_name.length>4 ) min_name=min_name.substring(0, 4); | |
| 80 | + if(min_name.length>7) min_name=min_name.substring(0, 8); | |
| 81 | 81 | return min_name; |
| 82 | 82 | }, |
| 83 | 83 | } | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -347,7 +347,7 @@ Page({ |
| 347 | 347 | //--- 判断是等级会员,且在有效期范围内 --- |
| 348 | 348 | if(user.card_field && now<end){ |
| 349 | 349 | var card_name=ob.name_map.get(user.card_field); |
| 350 | - if(card_name.length>5) card_name=card_name.substring(0,5); | |
| 350 | + if(card_name.length>6) card_name=card_name.substring(0,6); | |
| 351 | 351 | |
| 352 | 352 | var is_near_date=0; |
| 353 | 353 | if(end-now<60*60*30*24) is_near_date=1; //如果小于30天 |
| ... | ... | @@ -1345,7 +1345,7 @@ Page({ |
| 1345 | 1345 | var user_info = getApp().globalData.userInfo; |
| 1346 | 1346 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 1347 | 1347 | wx.navigateTo({ |
| 1348 | - url: '/pages/getphone/getphone', | |
| 1348 | + url: '/pages/togoin/togoin', | |
| 1349 | 1349 | }) |
| 1350 | 1350 | return false; |
| 1351 | 1351 | } |
| ... | ... | @@ -1520,12 +1520,18 @@ Page({ |
| 1520 | 1520 | if(getApp().globalData.user_id){ |
| 1521 | 1521 | url+="&first_leader="+getApp().globalData.user_id; |
| 1522 | 1522 | } |
| 1523 | - | |
| 1524 | - return { | |
| 1523 | + | |
| 1524 | + var ob={ | |
| 1525 | 1525 | title: price + "元 " +title, |
| 1526 | 1526 | path:url, |
| 1527 | 1527 | imageUrl: img, |
| 1528 | - } | |
| 1528 | + }; | |
| 1529 | + if(th.data.prom_type==6){ | |
| 1530 | + title+='\n'+th.data.prom_act.share_remark; | |
| 1531 | + ob.title=title; | |
| 1532 | + ob.desc=th.data.prom_act.share_remark; | |
| 1533 | + } | |
| 1534 | + return ob; | |
| 1529 | 1535 | |
| 1530 | 1536 | }, |
| 1531 | 1537 | |
| ... | ... | @@ -1767,7 +1773,6 @@ Page({ |
| 1767 | 1773 | th.setData({def_pick_store:null}); |
| 1768 | 1774 | } |
| 1769 | 1775 | |
| 1770 | - | |
| 1771 | 1776 | //----------获取门店---------------- |
| 1772 | 1777 | getApp().request.promiseGet("/api/weshop/pickup/list", { |
| 1773 | 1778 | data: dd, |
| ... | ... | @@ -1828,7 +1833,9 @@ Page({ |
| 1828 | 1833 | data: { |
| 1829 | 1834 | store_id: o.stoid, |
| 1830 | 1835 | is_show: 1, |
| 1831 | - pageSize: 1000 | |
| 1836 | + pageSize: 1000, | |
| 1837 | + orderField:"sort", | |
| 1838 | + orderType:'asc', | |
| 1832 | 1839 | }, |
| 1833 | 1840 | success: function(ee) { |
| 1834 | 1841 | if (ee.data.code == 0) { |
| ... | ... | @@ -1853,12 +1860,12 @@ Page({ |
| 1853 | 1860 | //----要进行门店分组-------- |
| 1854 | 1861 | for (var i = 0; i < sto_arr.length; i++) { |
| 1855 | 1862 | //找一下这个门店有没有在分类数组内 |
| 1856 | - var find2 = 0, | |
| 1857 | - find2name = ""; | |
| 1863 | + var find2 = 0, find2name = "",sort=0; | |
| 1858 | 1864 | for (var m = 0; m < sto_cate.length; m++) { |
| 1859 | 1865 | if (sto_arr[i].category_id == sto_cate[m].cat_id) { |
| 1860 | 1866 | find2 = sto_cate[m].cat_id; |
| 1861 | 1867 | find2name = sto_cate[m].cat_name; |
| 1868 | + sort = sto_cate[m].sort; | |
| 1862 | 1869 | break; |
| 1863 | 1870 | } |
| 1864 | 1871 | } |
| ... | ... | @@ -1880,6 +1887,7 @@ Page({ |
| 1880 | 1887 | var item = { |
| 1881 | 1888 | cat_id: find2, |
| 1882 | 1889 | name: find2name, |
| 1890 | + sort:sort, | |
| 1883 | 1891 | s_arr: arr0 |
| 1884 | 1892 | }; |
| 1885 | 1893 | newarr.push(item); |
| ... | ... | @@ -1895,6 +1903,7 @@ Page({ |
| 1895 | 1903 | var item = { |
| 1896 | 1904 | cat_id: find2, |
| 1897 | 1905 | name: find2name, |
| 1906 | + sort:sort, | |
| 1898 | 1907 | s_arr: arr0 |
| 1899 | 1908 | }; |
| 1900 | 1909 | newarr.push(item); |
| ... | ... | @@ -1903,6 +1912,18 @@ Page({ |
| 1903 | 1912 | } |
| 1904 | 1913 | } |
| 1905 | 1914 | } |
| 1915 | + | |
| 1916 | + //门店分类要排序下 | |
| 1917 | + function compare(property){ | |
| 1918 | + return function(a,b){ | |
| 1919 | + var value1 = a[property]; | |
| 1920 | + var value2 = b[property]; | |
| 1921 | + return value1 - value2; | |
| 1922 | + } | |
| 1923 | + } | |
| 1924 | + if(newarr.length>0) | |
| 1925 | + newarr.sort(compare("sort")); | |
| 1926 | + | |
| 1906 | 1927 | |
| 1907 | 1928 | //----安排其他的分类----- |
| 1908 | 1929 | if (qita.length > 0) { |
| ... | ... | @@ -1913,6 +1934,10 @@ Page({ |
| 1913 | 1934 | }; |
| 1914 | 1935 | newarr.push(item); |
| 1915 | 1936 | } |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1916 | 1941 | th.setData({ |
| 1917 | 1942 | is_show_sto_cat: 1, |
| 1918 | 1943 | all_sto: newarr |
| ... | ... | @@ -2666,7 +2691,7 @@ Page({ |
| 2666 | 2691 | var user_info = getApp().globalData.userInfo; |
| 2667 | 2692 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 2668 | 2693 | wx.navigateTo({ |
| 2669 | - url: '/pages/getphone/getphone', | |
| 2694 | + url: '/pages/togoin/togoin', | |
| 2670 | 2695 | }) |
| 2671 | 2696 | return false; |
| 2672 | 2697 | } |
| ... | ... | @@ -3168,7 +3193,7 @@ Page({ |
| 3168 | 3193 | var user_info = getApp().globalData.userInfo; |
| 3169 | 3194 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 3170 | 3195 | wx.navigateTo({ |
| 3171 | - url: '/pages/getphone/getphone', | |
| 3196 | + url: '/pages/togoin/togoin', | |
| 3172 | 3197 | }) |
| 3173 | 3198 | return false; |
| 3174 | 3199 | } |
| ... | ... | @@ -3225,7 +3250,7 @@ Page({ |
| 3225 | 3250 | var user_info = getApp().globalData.userInfo; |
| 3226 | 3251 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 3227 | 3252 | //getApp().my_warnning("请先登录",0,this); |
| 3228 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | |
| 3253 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 3229 | 3254 | return false; |
| 3230 | 3255 | } |
| 3231 | 3256 | |
| ... | ... | @@ -3698,7 +3723,7 @@ Page({ |
| 3698 | 3723 | |
| 3699 | 3724 | if (bconfig.is_sort_storage) { |
| 3700 | 3725 | wx.getLocation({ |
| 3701 | - type: 'wgs84', | |
| 3726 | + type: 'gcj02', | |
| 3702 | 3727 | success: function(res) { |
| 3703 | 3728 | |
| 3704 | 3729 | th.data.lat = res.latitude; |
| ... | ... | @@ -4039,7 +4064,7 @@ Page({ |
| 4039 | 4064 | var e = th.data.bconfig; |
| 4040 | 4065 | if (e.is_sort_storage) { |
| 4041 | 4066 | wx.getLocation({ |
| 4042 | - type: 'wgs84', | |
| 4067 | + type: 'gcj02', | |
| 4043 | 4068 | success: function(res) { |
| 4044 | 4069 | th.data.lat = res.latitude; |
| 4045 | 4070 | th.data.lon = res.longitude; | ... | ... |
pages/goods/goodsList/g_filter.wxs
| ... | ... | @@ -7,7 +7,7 @@ var g_filters = { |
| 7 | 7 | }, |
| 8 | 8 | |
| 9 | 9 | //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- |
| 10 | - get_card_price:function(goods,all_card,type){ | |
| 10 | + get_card_price:function(goods,all_card,type){ | |
| 11 | 11 | var price1=parseFloat(goods['cardprice1']); |
| 12 | 12 | var price2=parseFloat(goods['cardprice2']); |
| 13 | 13 | var price3=parseFloat(goods['cardprice3']); |
| ... | ... | @@ -32,7 +32,7 @@ var g_filters = { |
| 32 | 32 | min_price=price1;min_name=vl['CardName']; |
| 33 | 33 | } |
| 34 | 34 | else if(price1<min_price) { |
| 35 | - min_price=price1;min_name=vl['CardName']; | |
| 35 | + min_price=price1;min_name=vl['CardName']; | |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | if(vl['CorrPrice']=="Price2" && price2>0) |
| ... | ... | @@ -41,7 +41,7 @@ var g_filters = { |
| 41 | 41 | min_price=price2;min_name=vl['CardName']; |
| 42 | 42 | } |
| 43 | 43 | else if(price2<min_price) { |
| 44 | - min_price=price2;min_name=vl['CardName']; | |
| 44 | + min_price=price2;min_name=vl['CardName']; | |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| ... | ... | @@ -51,7 +51,7 @@ var g_filters = { |
| 51 | 51 | min_price=price3;min_name=vl['CardName']; |
| 52 | 52 | } |
| 53 | 53 | else if(price3<min_price) { |
| 54 | - min_price=price3;min_name=vl['CardName']; | |
| 54 | + min_price=price3;min_name=vl['CardName']; | |
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
| ... | ... | @@ -74,10 +74,11 @@ var g_filters = { |
| 74 | 74 | } |
| 75 | 75 | })--*/ |
| 76 | 76 | //-- 获取最下价钱,和相应的卡的名称 -- |
| 77 | - //min_price=min.price; | |
| 78 | - //min_name=min.name; | |
| 77 | + min_price=min.price; | |
| 78 | + min_name=min.name; | |
| 79 | 79 | if(type==0) return min_price.toFixed(2); |
| 80 | - if(min_name.length>4 ) min_name=min_name.substring(0, 4); | |
| 80 | + | |
| 81 | + if(min_name.length>7) min_name=min_name.substring(0, 8); | |
| 81 | 82 | return min_name; |
| 82 | 83 | }, |
| 83 | 84 | } | ... | ... |
pages/goods/goodsList/goodsList.js
| ... | ... | @@ -105,7 +105,7 @@ Page({ |
| 105 | 105 | //--- 判断是等级会员,且在有效期范围内 --- |
| 106 | 106 | if(user.card_field && now<end){ |
| 107 | 107 | var card_name=ob.name_map.get(user.card_field); |
| 108 | - if(card_name.length>4) card_name=card_name.substring(0,4); | |
| 108 | + // if(card_name.length>4) card_name=card_name.substring(0,4); | |
| 109 | 109 | th.setData({card_field:user.card_field,card_name:card_name,card_list:ob.card_list}); |
| 110 | 110 | } |
| 111 | 111 | } | ... | ... |
pages/index/index/index.js
| ... | ... | @@ -16,6 +16,8 @@ var api = require('../../../api/api.js'); |
| 16 | 16 | var d = getApp().globalData; |
| 17 | 17 | |
| 18 | 18 | |
| 19 | + | |
| 20 | + | |
| 19 | 21 | Page({ |
| 20 | 22 | data: { |
| 21 | 23 | url: o.imghost, |
| ... | ... | @@ -730,8 +732,8 @@ Page({ |
| 730 | 732 | var user_info = getApp().globalData.userInfo; |
| 731 | 733 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 732 | 734 | wx.navigateTo({ |
| 733 | - //url: '/pages/togoin/togoin', | |
| 734 | - url: '/pages/getphone/getphone', | |
| 735 | + url: '/pages/togoin/togoin', | |
| 736 | + //url: '/pages/getphone/getphone', | |
| 735 | 737 | }) |
| 736 | 738 | return false; |
| 737 | 739 | } | ... | ... |
pages/store/index.js
pages/tabbar/tabbar.js deleted
pages/tabbar/tabbar.json deleted
pages/tabbar/tabbar.wxml deleted
| 1 | - | |
| 2 | -<!--pages/tabbar.wxml--> | |
| 3 | - <template name="tabBar"> | |
| 4 | - <!-- 如果是自定义的话 --> | |
| 5 | - <view hidden="{{tabBar.iscustom=='2'}}" class="tab-bar" style="width:100%;height:{{tabBar.isIpx ? '172rpx' : '104rpx'}};position:fixed;color: {{tabBar.color}}; background: {{tabBar.backgroundColor}}; bottom: 0;z-index:9999999;"> | |
| 6 | - <block wx:for="{{tabBar.list}}" wx:key="weappurl"> | |
| 7 | - <block wx:if="{{!item.active}}"> | |
| 8 | - <navigator url="{{item.weappurl}}" open-type="redirect" class="tabbar_item {{item.clas}}" style="position:relative;width:{{100 / tabBar.length}}%;height:100%;float:left;text-align:center;padding:5px 0;"> | |
| 9 | - <view wx:if="{{item.nav_name=='购物车'}}" style="top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;"> | |
| 10 | - {{tabBar.cartGoodsNum}} | |
| 11 | - </view> | |
| 12 | - <view style="width:35%;height:58rpx;margin-left:33%;display: flex; justify-content: center;align-items: center"> | |
| 13 | - <!--<image src="{{item.src}}" bindload="load_nav" data-index="{{ index }}" class="img" style="max-width: 100%; width:{{item.width?item.width:0}}rpx;height:{{item.height}}rpx"></image>--> | |
| 14 | - <view class="nav_imgage" style="background-image: url({{item.src}});height: 50rpx; width: 50rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%;"></view> | |
| 15 | - </view> | |
| 16 | - <view style="height:20px;line-height:15px; position: relative; top: -8rpx"><text class="tabbar_text" wx:if="{{item.nav_name}}" style="font-size:0.6rem">{{item.nav_name}}</text></view> | |
| 17 | - </navigator> | |
| 18 | - </block> | |
| 19 | - <block wx:else> | |
| 20 | - <view class="tabbar_item {{item.clas}}" style="color: {{item.selectedColor? item.selectedColor :tabBar.selectedColor}};position:relative;width:{{100 / tabBar.length}}%;height:100%;float:left;text-align:center;padding:5px 0;"> | |
| 21 | - <view wx:if="{{item.nav_name=='购物车'}}" style="top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;"> | |
| 22 | - {{tabBar.cartGoodsNum}} | |
| 23 | - </view> | |
| 24 | - <view style="width:35%;height:58rpx;margin-left:33%; display: flex; justify-content: center;align-items: center"> | |
| 25 | - <!--<image src="{{item.src_sele}}" bindload="load_nav" data-index="{{ index }}" class="img" style="max-width: 100%;width:{{item.width?item.width:0}}rpx;height:{{item.height}}rpx"></image>--> | |
| 26 | - <view class="nav_imgage" style="background-image: url({{item.src_sele}});height: 50rpx; width: 50rpx;background-position: center;background-repeat: no-repeat;background-size: auto 85%;"></view> | |
| 27 | - </view> | |
| 28 | - <view style="height:20px;line-height:15px; position: relative; top: -8rpx"><text class="tabbar_text" wx:if="{{item.nav_name}}" style="font-size:0.6rem">{{item.nav_name}}</text></view> | |
| 29 | - </view> | |
| 30 | - </block> | |
| 31 | - | |
| 32 | - </block> | |
| 33 | - </view> | |
| 34 | - | |
| 35 | - | |
| 36 | - <!-- 如果是默认的话 --> | |
| 37 | - <view hidden="{{tabBar.iscustom=='1'}}" class="tab-bar" style="width:100%;height:{{tabBar.isIpx ? '168rpx' : '100rpx'}};position:fixed;color:#6e6d6b; background:#ffffff; bottom: 0;z-index:9999999;padding:2px 0;"> | |
| 38 | - <!-- 1 --> | |
| 39 | - <block wx:if="{{tabBar.active!='/pages/index/index/index'}}"> | |
| 40 | - <navigator url="/pages/index/index/index" class="tabbar_item {{item.clas}}" open-type="redirect" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 41 | - <view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 42 | - <image src="{{tabBar.url}}/miniapp/images/bar/index.png" class="img" style="width:100%;height:100%"></image> | |
| 43 | - </view> | |
| 44 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">首页</text></view> | |
| 45 | - </navigator> | |
| 46 | - </block> | |
| 47 | - <block wx:else> | |
| 48 | - <view class="tabbar_item {{item.clas}}" style="color:#f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 49 | - <view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 50 | - <image src="{{tabBar.url}}/miniapp/images/bar/index_on.png" class="img" style="width:100%;height:100%"></image> | |
| 51 | - </view> | |
| 52 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">首页</text></view> | |
| 53 | - </view> | |
| 54 | - </block> | |
| 55 | - | |
| 56 | - | |
| 57 | - <!-- 2 --> | |
| 58 | - <block wx:if="{{tabBar.active!='/pages/goods/categoryList/categoryList'}}"> | |
| 59 | - <navigator url="/pages/goods/categoryList/categoryList" class="tabbar_item {{tabBar.clas}}" open-type="redirect" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 60 | - <view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 61 | - <image src="{{tabBar.url}}/miniapp/images/bar/fl.png" class="img" style="width:100%;height:100%"></image> | |
| 62 | - </view> | |
| 63 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" wx:if="分类" style="font-size:0.6rem">分类</text></view> | |
| 64 | - </navigator> | |
| 65 | - </block> | |
| 66 | - <block wx:else> | |
| 67 | - <view class="tabbar_item {{tabBar.clas}}" style="color:#f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 68 | - <view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 69 | - <image src="{{tabBar.url}}/miniapp/images/bar/fl_on.png" class="img" style="width:100%;height:100%"></image> | |
| 70 | - </view> | |
| 71 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" wx:if="分类" style="font-size:0.6rem">分类</text></view> | |
| 72 | - </view> | |
| 73 | - </block> | |
| 74 | - | |
| 75 | - | |
| 76 | - <!-- 3 --> | |
| 77 | - <block wx:if="{{tabBar.active!='/pages/cart/cart/cart'}}"> | |
| 78 | - <navigator url="/pages/cart/cart/cart" open-type="redirect" class="tabbar_item {{tabBar.clas}}" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 79 | - <view style="background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63%;display: flex;align-items: center;justify-content: center;"> | |
| 80 | - {{tabBar.cartGoodsNum}} | |
| 81 | - </view><view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 82 | - <image src="{{tabBar.url}}/miniapp/images/bar/car.png" class="img" style="width:100%;height:100%"></image> | |
| 83 | - </view> | |
| 84 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">购物车</text></view> | |
| 85 | - </navigator> | |
| 86 | - </block> | |
| 87 | - <block wx:else> | |
| 88 | - <view class="tabbar_item {{tabBar.clas}}" style="color: #f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 89 | - <view style="background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63%;display: flex;align-items: center;justify-content: center;"> | |
| 90 | - {{tabBar.cartGoodsNum}} | |
| 91 | - </view><view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 92 | - <image src="{{tabBar.url}}/miniapp/images/bar/car_on.png" class="img" style="width:100%;height:100%"></image> | |
| 93 | - </view> | |
| 94 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">购物车</text></view> | |
| 95 | - </view> | |
| 96 | - </block> | |
| 97 | - | |
| 98 | - <!-- 4 --> | |
| 99 | - <block wx:if="{{tabBar.active!='/pages/user/index/index'}}"> | |
| 100 | - <navigator url="/pages/user/index/index" open-type="redirect" class="tabbar_item {{tabBar.clas}}" style="position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 101 | - <view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 102 | - <image src="{{tabBar.url}}/miniapp/images/bar/user.png" class="img" style="width:100%;height:100%"></image> | |
| 103 | - </view> | |
| 104 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">我的</text></view> | |
| 105 | - </navigator> | |
| 106 | - </block> | |
| 107 | - <block wx:else> | |
| 108 | - <view class="tabbar_item {{tabBar.clas}}" style="color: #f23030;position:relative;width:25%;height:100%;float:left;text-align:center;padding:2px 0;"> | |
| 109 | - <view style="width:30%;height:54rpx;margin-left:35%;"> | |
| 110 | - <image src="{{tabBar.url}}/miniapp/images/bar/user_on.png" class="img" style="width:100%;height:100%"></image> | |
| 111 | - </view> | |
| 112 | - <view style="height:40rpx;line-height:22rpx;"><text class="tabbar_text" style="font-size:0.6rem">我的</text></view> | |
| 113 | - </view> | |
| 114 | - </block> | |
| 115 | - | |
| 116 | - </view> | |
| 117 | - </template> |
pages/tabbar/tabbar.wxss deleted
| 1 | -.menu_red{ | |
| 2 | - | |
| 3 | - top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx; | |
| 4 | -} | |
| 5 | - | |
| 6 | -.menu_default_red{ | |
| 7 | - background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;height: 40rpx;line-heith:40rpx;position: fixed;z-index: 100;left:63% | |
| 8 | -} | |
| 9 | 0 | \ No newline at end of file |
pages/team/team_show/team_show.js
| ... | ... | @@ -148,7 +148,7 @@ Page({ |
| 148 | 148 | //--先判断会员状态-- |
| 149 | 149 | var user_info=getApp().globalData.userInfo; |
| 150 | 150 | if(user_info==null || user_info.mobile==undefined || user_info.mobile=="" || user_info.mobile==null){ |
| 151 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | |
| 151 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 152 | 152 | return false; |
| 153 | 153 | } |
| 154 | 154 | |
| ... | ... | @@ -705,141 +705,7 @@ Page({ |
| 705 | 705 | }); |
| 706 | 706 | setTimeout(th.countDown2, 1000); |
| 707 | 707 | }, |
| 708 | - //--获取门店--- | |
| 709 | - async get_sto(e) { | |
| 710 | - var th = this, dd = null,i=getApp().request; | |
| 711 | - var g_distr_type = this.data.goods.distr_type; | |
| 712 | - if (g_distr_type != 0) { | |
| 713 | - dd = { | |
| 714 | - store_id: o.stoid, | |
| 715 | - distr_type: g_distr_type, | |
| 716 | - isstop: 0, | |
| 717 | - pageSize: 300 | |
| 718 | - } | |
| 719 | - } else { | |
| 720 | - dd = { | |
| 721 | - store_id: o.stoid, | |
| 722 | - isstop: 0, | |
| 723 | - pageSize: 300 | |
| 724 | - } | |
| 725 | - } | |
| 726 | - //----------获取门店---------------- | |
| 727 | - await getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 728 | - data: dd, | |
| 729 | - }).then(res => { | |
| 730 | - var e = res; | |
| 731 | - if (e.data.code == 0) { | |
| 732 | - //单总量超出5个的时候 | |
| 733 | - if (e.data.data.total > 5) { | |
| 734 | - i.get("/api/weshop/storagecategory/page", { | |
| 735 | - data: { | |
| 736 | - store_id: o.stoid, | |
| 737 | - is_show: 1, | |
| 738 | - pageSize: 300 | |
| 739 | - }, | |
| 740 | - success: function(ee) { | |
| 741 | - if (ee.data.code == 0) { | |
| 742 | - if (ee.data.data.pageData.length > 0) { | |
| 743 | - var sto_cate = ee.data.data.pageData; | |
| 744 | - var sto_arr = e.data.data.pageData; | |
| 745 | - var newarr = new Array(); | |
| 746 | - var qita = new Array(); | |
| 747 | - //----要进行门店分组-------- | |
| 748 | - for (var i = 0; i < sto_arr.length; i++) { | |
| 749 | - //找一下这个门店有没有在分类数组内 | |
| 750 | - var find2 = 0, | |
| 751 | - find2name = ""; | |
| 752 | - for (var m = 0; m < sto_cate.length; m++) { | |
| 753 | - if (sto_arr[i].category_id == sto_cate[m].cat_id) { | |
| 754 | - find2 = sto_cate[m].cat_id; | |
| 755 | - find2name = sto_cate[m].cat_name; | |
| 756 | - break; | |
| 757 | - } | |
| 758 | - } | |
| 759 | - | |
| 760 | - if (newarr.length > 0) { | |
| 761 | - var find = 0; | |
| 762 | - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 763 | - if (find2 != 0) { | |
| 764 | - for (var ii = 0; ii < newarr.length; ii++) { | |
| 765 | - if (sto_arr[i].category_id == newarr[ii].cat_id) { | |
| 766 | - newarr[ii].s_arr.push(sto_arr[i]); | |
| 767 | - find = 1; | |
| 768 | - break; | |
| 769 | - } | |
| 770 | - } | |
| 771 | - if (find == 0) { | |
| 772 | - var arr0 = new Array(); | |
| 773 | - arr0.push(sto_arr[i]); | |
| 774 | - var item = { | |
| 775 | - cat_id: find2, | |
| 776 | - name: find2name, | |
| 777 | - s_arr: arr0 | |
| 778 | - }; | |
| 779 | - newarr.push(item); | |
| 780 | - } | |
| 781 | - } else { | |
| 782 | - qita.push(sto_arr[i]); | |
| 783 | - } | |
| 784 | - } else { | |
| 785 | - //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 786 | - if (find2 != 0) { | |
| 787 | - var arr0 = new Array(); | |
| 788 | - arr0.push(sto_arr[i]); | |
| 789 | - var item = { | |
| 790 | - cat_id: find2, | |
| 791 | - name: find2name, | |
| 792 | - s_arr: arr0 | |
| 793 | - }; | |
| 794 | - newarr.push(item); | |
| 795 | - } else { | |
| 796 | - qita.push(sto_arr[i]); | |
| 797 | - } | |
| 798 | - } | |
| 799 | - } | |
| 800 | - | |
| 801 | - //----安排其他的分类----- | |
| 802 | - if (qita.length > 0) { | |
| 803 | - var item = { | |
| 804 | - cat_id: -1, | |
| 805 | - name: "其他", | |
| 806 | - s_arr: qita | |
| 807 | - }; | |
| 808 | - newarr.push(item); | |
| 809 | - } | |
| 810 | - //--给门店赋值-- | |
| 811 | - th.setData({ | |
| 812 | - is_show_sto_cat: 1, | |
| 813 | - ssl: newarr | |
| 814 | - }); | |
| 815 | - | |
| 816 | - } else { | |
| 817 | - //--只留第二层--- | |
| 818 | - th.setData({ | |
| 819 | - is_show_sto_cat: 0, | |
| 820 | - ssl_child: e.data.data.pageData, | |
| 821 | - }); | |
| 822 | - } | |
| 823 | - } else { | |
| 824 | - //--只留第二层--- | |
| 825 | - th.setData({ | |
| 826 | - is_show_sto_cat: 0, | |
| 827 | - ssl_child: e.data.data.pageData, | |
| 828 | - }); | |
| 829 | - } | |
| 830 | - } | |
| 831 | - }); | |
| 832 | - } else { | |
| 833 | - //--只留第二层--- | |
| 834 | - th.setData({ | |
| 835 | - is_show_sto_cat: 0, | |
| 836 | - ssl_child: e.data.data.pageData | |
| 837 | - }); | |
| 838 | - } | |
| 839 | - } | |
| 840 | - }) | |
| 841 | - }, | |
| 842 | - | |
| 708 | + | |
| 843 | 709 | //------去支付,购买------- |
| 844 | 710 | go_pay:function () { |
| 845 | 711 | var th=this; |
| ... | ... | @@ -1105,7 +971,7 @@ Page({ |
| 1105 | 971 | |
| 1106 | 972 | if (bconfig.is_sort_storage) { |
| 1107 | 973 | wx.getLocation({ |
| 1108 | - type: 'wgs84', | |
| 974 | + type: 'gcj02', | |
| 1109 | 975 | success: function(res) { |
| 1110 | 976 | |
| 1111 | 977 | th.data.lat = res.latitude; |
| ... | ... | @@ -1170,7 +1036,7 @@ Page({ |
| 1170 | 1036 | var e = th.data.bconfig; |
| 1171 | 1037 | if (e.is_sort_storage) { |
| 1172 | 1038 | wx.getLocation({ |
| 1173 | - type: 'wgs84', | |
| 1039 | + type: 'gcj02', | |
| 1174 | 1040 | success: function(res) { |
| 1175 | 1041 | th.data.lat = res.latitude; |
| 1176 | 1042 | th.data.lon = res.longitude; |
| ... | ... | @@ -1288,7 +1154,9 @@ Page({ |
| 1288 | 1154 | data: { |
| 1289 | 1155 | store_id: o.stoid, |
| 1290 | 1156 | is_show: 1, |
| 1291 | - pageSize: 1000 | |
| 1157 | + pageSize: 1000, | |
| 1158 | + orderField:"sort", | |
| 1159 | + orderType:'asc', | |
| 1292 | 1160 | }, |
| 1293 | 1161 | success: function(ee) { |
| 1294 | 1162 | if (ee.data.code == 0) { |
| ... | ... | @@ -1313,12 +1181,12 @@ Page({ |
| 1313 | 1181 | //----要进行门店分组-------- |
| 1314 | 1182 | for (var i = 0; i < sto_arr.length; i++) { |
| 1315 | 1183 | //找一下这个门店有没有在分类数组内 |
| 1316 | - var find2 = 0, | |
| 1317 | - find2name = ""; | |
| 1184 | + var find2 = 0,find2name = "",sort=0; | |
| 1318 | 1185 | for (var m = 0; m < sto_cate.length; m++) { |
| 1319 | 1186 | if (sto_arr[i].category_id == sto_cate[m].cat_id) { |
| 1320 | 1187 | find2 = sto_cate[m].cat_id; |
| 1321 | 1188 | find2name = sto_cate[m].cat_name; |
| 1189 | + sort=sto_cate[m].sort; | |
| 1322 | 1190 | break; |
| 1323 | 1191 | } |
| 1324 | 1192 | } |
| ... | ... | @@ -1340,6 +1208,7 @@ Page({ |
| 1340 | 1208 | var item = { |
| 1341 | 1209 | cat_id: find2, |
| 1342 | 1210 | name: find2name, |
| 1211 | + sort:sort, | |
| 1343 | 1212 | s_arr: arr0 |
| 1344 | 1213 | }; |
| 1345 | 1214 | newarr.push(item); |
| ... | ... | @@ -1355,6 +1224,7 @@ Page({ |
| 1355 | 1224 | var item = { |
| 1356 | 1225 | cat_id: find2, |
| 1357 | 1226 | name: find2name, |
| 1227 | + sort:sort, | |
| 1358 | 1228 | s_arr: arr0 |
| 1359 | 1229 | }; |
| 1360 | 1230 | newarr.push(item); |
| ... | ... | @@ -1363,7 +1233,19 @@ Page({ |
| 1363 | 1233 | } |
| 1364 | 1234 | } |
| 1365 | 1235 | } |
| 1366 | - | |
| 1236 | + | |
| 1237 | + //门店分类要排序下 | |
| 1238 | + function compare(property){ | |
| 1239 | + return function(a,b){ | |
| 1240 | + var value1 = a[property]; | |
| 1241 | + var value2 = b[property]; | |
| 1242 | + return value1 - value2; | |
| 1243 | + } | |
| 1244 | + } | |
| 1245 | + if(newarr.length>0) | |
| 1246 | + newarr.sort(compare("sort")); | |
| 1247 | + | |
| 1248 | + | |
| 1367 | 1249 | //----安排其他的分类----- |
| 1368 | 1250 | if (qita.length > 0) { |
| 1369 | 1251 | var item = { | ... | ... |
pages/togoin/togoin.js
| 1 | -var t = require("../../utils/common.js"); var os = getApp().globalData.setting; | |
| 1 | +var t = require("../../utils/common.js"); | |
| 2 | +var app=getApp(); | |
| 3 | +var os = app.globalData.setting; | |
| 4 | + | |
| 2 | 5 | Page({ |
| 3 | - data: { | |
| 4 | - store: null, | |
| 5 | - imghots: os.imghost, | |
| 6 | - }, | |
| 7 | - onLoad: function () { | |
| 8 | - var th = this, app = getApp(); | |
| 9 | - app.getConfig(function (e) { | |
| 10 | - th.setData({ store: e }); | |
| 11 | - }) | |
| 12 | - }, | |
| 13 | - onShow(){ | |
| 6 | + data: { | |
| 7 | + user:null, | |
| 8 | + show_bind:0, | |
| 9 | + imghots: os.imghost, | |
| 10 | + store_logo:'', | |
| 11 | + first_leader:'', //-- 邀请人 -- | |
| 12 | + }, | |
| 13 | + onLoad: function (options) { | |
| 14 | + //--判断是否有接受到邀请人的ID-- | |
| 15 | + if(options.first_leader){ | |
| 16 | + this.setData({first_leader:options.first_leader}); | |
| 17 | + } | |
| 18 | + var th=this; | |
| 19 | + app.getConfig(function (e) { | |
| 20 | + e.store_logo=th.data.imghots+e.store_logo; | |
| 21 | + th.setData({ store: e,store_logo:e.store_logo}); | |
| 22 | + }) | |
| 23 | + }, | |
| 24 | + //绑定手机号 | |
| 25 | + getphone:function (e) { | |
| 26 | + //接下来写业务代码登录 | |
| 27 | + e=e.detail; | |
| 28 | + if (e.encryptedData==undefined){ | |
| 29 | + return app.my_warnning("登录需要授权手机号码!", 0, this); | |
| 30 | + return false; | |
| 31 | + } | |
| 32 | + var th=this; | |
| 33 | + var sessionKey = getApp().globalData.sessionKey; | |
| 34 | + var openid = getApp().globalData.openid; | |
| 35 | + var r=getApp().globalData.getu; | |
| 36 | + | |
| 37 | + th.save_the_data(r,e,sessionKey,openid) | |
| 38 | + }, | |
| 14 | 39 | |
| 15 | - }, | |
| 40 | + //-- 会员授权 -- | |
| 41 | + bindGetUserInfo: function(ee) { | |
| 42 | + var that = this; | |
| 43 | + var user=ee.detail.userInfo; | |
| 44 | + //此处授权得到userInfo | |
| 45 | + getApp().globalData.getu = user; | |
| 46 | + | |
| 47 | + //--拿下code-- | |
| 48 | + wx.login({ | |
| 49 | + success: function (o) { | |
| 50 | + var dd = { | |
| 51 | + js_code:o.code, | |
| 52 | + store_id: os.stoid, | |
| 53 | + nickname: app.clear_word(app.globalData.getu.nickName), | |
| 54 | + head_pic: app.clear_word(app.globalData.getu.avatarUrl) | |
| 55 | + }; | |
| 56 | + | |
| 57 | + | |
| 58 | + getApp().request.get("/api/weshop/users/openidandkey", { | |
| 59 | + data: dd, | |
| 60 | + success: function (e) { | |
| 61 | + if(e.data.code==0){ | |
| 62 | + that.setData({user:user}) | |
| 63 | + //如果有会员的话,没有sessionKey | |
| 64 | + if(!e.data.data.sessionKey){ | |
| 65 | + getApp().showWarning("登陆成功"); | |
| 66 | + getApp().globalData.userInfo=e.data.data; | |
| 67 | + getApp().globalData.user_id=e.data.data.user_id; | |
| 68 | + getApp().globalData.openid = e.data.data.weapp_openid; | |
| 69 | + | |
| 70 | + setTimeout(function () { | |
| 71 | + wx.navigateBack({ delta: 1}) //返回上一页 | |
| 72 | + },1000) | |
| 73 | + }else{ | |
| 74 | + getApp().globalData.sessionKey=e.data.data.sessionKey; | |
| 75 | + getApp().globalData.openid=e.data.data.openid;; | |
| 76 | + that.setData({show_bind:1}) | |
| 77 | + } | |
| 78 | + }else{ | |
| 79 | + getApp().confirmBox(e.data.msg); | |
| 80 | + } | |
| 81 | + } | |
| 82 | + }); | |
| 83 | + } | |
| 84 | + }) | |
| 85 | + }, | |
| 86 | + | |
| 87 | + //暂不登陆,返回上一页 | |
| 88 | + cancle_bind:function () { | |
| 89 | + wx.navigateBack({ delta: 1}) | |
| 90 | + }, | |
| 91 | + | |
| 92 | + close_pop:function(){ | |
| 93 | + this.setData({show_bind:0}) | |
| 94 | + }, | |
| 95 | + show_bind_mobile:function(){ | |
| 96 | + this.setData({show_bind:1}) | |
| 97 | + }, | |
| 98 | + | |
| 99 | + save_the_data:function (r,e,sessionKey,openid) { | |
| 100 | + var app=getApp(),a=app,th=this; | |
| 101 | + var dd = { | |
| 102 | + oauth: "miniapp", | |
| 103 | + nickname:a.clear_word(r.nickName), | |
| 104 | + head_pic: r.avatarUrl, | |
| 105 | + sex: r.gender, | |
| 106 | + terminal: "miniapp", | |
| 107 | + sessionKey: sessionKey, | |
| 108 | + openid:openid, | |
| 109 | + encryptedData: e.encryptedData, | |
| 110 | + iv: e.iv, | |
| 111 | + store_id: getApp().globalData.setting.stoid, | |
| 112 | + }; | |
| 113 | + //--如果有邀请人的时候-- | |
| 114 | + if(th.data.first_leader){ | |
| 115 | + dd.first_leader=th.data.first_leader; | |
| 116 | + } | |
| 117 | + | |
| 118 | + console.log(dd); | |
| 119 | + app.request.get("/api/weshop/users/thirdLogin", { | |
| 120 | + data: dd, | |
| 121 | + success: function (e) { | |
| 122 | + | |
| 123 | + if (e.data.code == 0) { | |
| 124 | + app.globalData.user_id = e.data.data.user_id; | |
| 125 | + } else { | |
| 126 | + return app.showWarning("授权登入失败!"+e.data.msg); | |
| 127 | + } | |
| 128 | + | |
| 129 | + wx.setStorageSync("userinfo",e.data.data); | |
| 130 | + wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic); | |
| 131 | + wx.navigateBack({ delta: 1}) | |
| 132 | + | |
| 133 | + }, | |
| 134 | + failStatus: function (t) { | |
| 135 | + return app.my_warnning("授权登入失败,请稍后再试!", 0, that); | |
| 136 | + }, | |
| 137 | + fail: function (t) { | |
| 138 | + return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | |
| 139 | + } | |
| 140 | + }); | |
| 141 | + }, | |
| 16 | 142 | |
| 17 | - bindGetUserInfo: function(e) { | |
| 18 | - var that = this, app = getApp(); | |
| 19 | - //此处授权得到userInfo | |
| 20 | - console.log(e.detail.userInfo); | |
| 21 | - app.globalData.getu = e.detail.userInfo; | |
| 143 | + bind_bnerr:function(e){ | |
| 144 | + var _errImg = e.target.dataset.errorimg; | |
| 145 | + var _errObj = {}; | |
| 146 | + _errObj[_errImg] = this.data.imghots+"/miniapp/images/logo.png"; | |
| 147 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 148 | + } | |
| 22 | 149 | |
| 23 | - //接下来写业务代码 | |
| 24 | - //最后,记得返回刚才的页面 | |
| 25 | - app.auth.wxLogin_fir(function(){ | |
| 26 | - console.log("togoin"); | |
| 27 | - console.log("1"); | |
| 28 | - wx.navigateBack({ | |
| 29 | - delta: 1 | |
| 30 | - }) | |
| 31 | - }) | |
| 32 | - | |
| 33 | - }, | |
| 34 | - | |
| 35 | - cancle_bind:function(){ | |
| 36 | - getApp().goto('/pages/user/index/index'); | |
| 37 | - } | |
| 38 | - | |
| 39 | - | |
| 40 | -}); | |
| 150 | +}) | ... | ... |
pages/togoin/togoin.json
pages/togoin/togoin.wxml
| 1 | -<view class="all_page"> | |
| 2 | - <view class="content"> | |
| 3 | - <view><image class='logo' src="{{imghots+store.store_logo}}"> </image></view> | |
| 4 | - <view class="title">{{store.store_name}}</view> | |
| 5 | - <view style="padding:0 40rpx">为了更好的提供服务,小程序将申请获取您的头像,昵称信息</view> | |
| 6 | - <button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button> | |
| 7 | - <text class="btn2" bindtap="cancle_bind">暂不授权</text> | |
| 1 | +<view> | |
| 2 | + | |
| 3 | + <!-- 登录图 --> | |
| 4 | + <view > | |
| 5 | + <view class="logins flex-center2 ali-c flex" style="position: relative;top: 120rpx;"> | |
| 6 | + <image mode="widthFix" bindtap="go_index" class="login_img_back" src="{{imghots}}/miniapp/images/loginbg.jpg"></image> | |
| 7 | + <image bindtap="go_index" class="login_img" src="{{store_logo}}" binderror="bind_bnerr" lazy-load="true" data-errorimg="store_logo"></image> | |
| 8 | + <view style="position: absolute; margin-top:140rpx">{{store.store_name}}</view> | |
| 9 | + </view> | |
| 8 | 10 | </view> |
| 9 | -</view> | |
| 10 | 11 | \ No newline at end of file |
| 12 | + | |
| 13 | + <!-- 登录按钮 --> | |
| 14 | + <view> | |
| 15 | + <view class="phones"> | |
| 16 | + <!-- 授权获取基础信息 --> | |
| 17 | + <button hidden="{{user}}" class="getPhoneNumber" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo"> | |
| 18 | + <view class="flex flex-center2 ali-c"> | |
| 19 | + <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> | |
| 20 | + <view>微信账号快捷登陆</view> | |
| 21 | + </view> | |
| 22 | + </button> | |
| 23 | + <!-- 点击显示绑定手机的对话框 --> | |
| 24 | + <button hidden="{{!user}}" class="getPhoneNumber" bindtap="show_bind_mobile"> | |
| 25 | + <view class="flex flex-center2 ali-c" > | |
| 26 | + <image class="we_chat" src="{{imghots}}/miniapp/images/we_chat.png"></image> | |
| 27 | + <view>微信账号快捷登陆</view> | |
| 28 | + </view> | |
| 29 | + </button> | |
| 30 | + </view> | |
| 31 | + | |
| 32 | + <view class="userlongin flex-center2 flex fs30 jc_sb" style="margin: 0 130rpx"> | |
| 33 | + <view bindtap="cancle_bind">暂不登陆</view> | |
| 34 | + </view> | |
| 35 | + | |
| 36 | + </view> | |
| 37 | + | |
| 38 | +</view> | |
| 39 | + | |
| 40 | + | |
| 41 | +<view wx:if="{{show_bind}}"> | |
| 42 | + <view class="cover-layer" bindtap="close_pop"></view> | |
| 43 | + <view class="p_content"> | |
| 44 | + <view class="p_title flex ali-c fs34"> | |
| 45 | + 请授权绑定手机号完成注册,拒绝将登陆失败 | |
| 46 | + </view> | |
| 47 | + <view class="flex btn_view"> | |
| 48 | + <view bindtap="close_pop" style="height: 100%; line-height:normal;" class="txt-center f2 flex ali-c flex-center2 fs36 b_right">拒绝</view> | |
| 49 | + <button style="height: 100%;" class="g_mobile f2 flex ali-c flex-center2 fs36 txt-red" open-type="getPhoneNumber" bindgetphonenumber="getphone">绑定</button> | |
| 50 | + </view> | |
| 51 | + </view> | |
| 52 | +</view> | |
| 53 | + | |
| 54 | +<warn id="warn"></warn> | ... | ... |
pages/togoin/togoin.wxss
| 1 | -.all_page{ | |
| 2 | - position: fixed; | |
| 3 | - height: 100%; | |
| 4 | - width: 100%; | |
| 5 | - background: #fff; | |
| 6 | - justify-content: center;/*水平居中*/ | |
| 1 | +page{ | |
| 2 | + border-top: 3rpx solid #EAEAEC; | |
| 3 | + background-color: #fff; | |
| 7 | 4 | } |
| 8 | -.all_page .content{ | |
| 9 | - font-size: 30rpx; | |
| 10 | - text-align: center; | |
| 11 | - height: 400px; | |
| 5 | +.logins { | |
| 12 | 6 | width: 100%; |
| 13 | - position: absolute; | |
| 14 | - top: 50%; | |
| 15 | - margin-top:-200px; | |
| 16 | -} | |
| 17 | -.logo{width: 140rpx; height: 140rpx; border-radius:50% } | |
| 18 | -.all_page .content .title{ | |
| 19 | - font-size: 36rpx; margin: 20rpx 0 | |
| 7 | + padding-bottom: 130rpx; | |
| 8 | + background-position: center; | |
| 9 | + background-repeat: no-repeat; | |
| 10 | + background-size: cover | |
| 20 | 11 | } |
| 21 | 12 | |
| 22 | -.all_page .btn{ | |
| 23 | - height: 80rpx; | |
| 24 | - line-height: 80rpx; | |
| 25 | - width: 580rpx; | |
| 26 | - background: #fc661f; | |
| 27 | - color:#fff; | |
| 28 | - font-size: 32rpx; | |
| 29 | - margin-top: 100rpx; | |
| 30 | - border-radius: 5rpx; | |
| 13 | +.login_img { | |
| 14 | + width: 192rpx; | |
| 15 | + height: 192rpx; | |
| 16 | + border-radius: 50%; | |
| 17 | + position: absolute; | |
| 18 | +} | |
| 19 | +.phones{ | |
| 20 | + margin-bottom: 48rpx; | |
| 21 | +} | |
| 22 | +.getPhoneNumber { | |
| 23 | + width: 600rpx; | |
| 24 | + height: 94rpx; | |
| 25 | + line-height: 94rpx; | |
| 26 | + background-color: #57b837; | |
| 27 | + border-radius: 48rpx; | |
| 28 | + color: rgb(255,255,255); | |
| 29 | + font-size: 32rpx; | |
| 30 | + margin-top:150rpx; | |
| 31 | +} | |
| 32 | +.we_chat{ | |
| 33 | + width: 55rpx; | |
| 34 | + height: 45rpx; | |
| 35 | + margin-right: 15rpx; | |
| 36 | +} | |
| 37 | +.userlongin{ | |
| 38 | + color: #767f8e; | |
| 39 | +} | |
| 40 | +button{ | |
| 41 | + border:none; | |
| 42 | +} | |
| 43 | +.login_img_back{ width: 100%;} | |
| 44 | +.p_content{ | |
| 45 | + margin: 10%; | |
| 46 | + width: 80%; | |
| 47 | + height:340rpx; | |
| 48 | + top:50%; | |
| 49 | + margin-top: -180rpx; | |
| 50 | + background-color: #fff; | |
| 51 | + z-index: 12; | |
| 52 | + position: fixed; | |
| 31 | 53 | } |
| 32 | 54 | |
| 33 | -.all_page .btn2{ | |
| 34 | - height: 80rpx; | |
| 35 | - line-height: 80rpx; | |
| 36 | - width: 580rpx; | |
| 37 | - | |
| 38 | - color:#999; | |
| 39 | - font-size: 32rpx; | |
| 40 | - border-radius: 5rpx; | |
| 41 | - margin-top: 10rpx; | |
| 42 | -} | |
| 43 | 55 | \ No newline at end of file |
| 56 | +.btn_view { height: 120rpx; line-height: 120rpx; border-top:1rpx solid #e9e9e9;} | |
| 57 | +.p_title{ height:220rpx; padding: 0 40rpx; line-height: 50rpx;} | |
| 58 | +.g_mobile{ background: none;line-height: normal;} | |
| 59 | +.b_right{border-right:1rpx solid #e9e9e9;} | |
| 60 | + | |
| 61 | +.ali-c{align-items: center;} | |
| 62 | +.flex-center2{ justify-content: center;} | |
| 63 | +.f2 { | |
| 64 | + flex: 2 0; | |
| 65 | +} | ... | ... |
pages/user/assistance/assistance.js
| ... | ... | @@ -49,7 +49,7 @@ Page({ |
| 49 | 49 | //--先判断会员状态-- |
| 50 | 50 | var user_info = getApp().globalData.userInfo; |
| 51 | 51 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 52 | - getApp().goto('/pages/getphone/getphone'); | |
| 52 | + getApp().goto('/pages/togoin/togoin'); | |
| 53 | 53 | return false; |
| 54 | 54 | } |
| 55 | 55 | ... | ... |
pages/user/assistance/friend_assistance.js
| ... | ... | @@ -57,7 +57,7 @@ Page({ |
| 57 | 57 | //--先判断会员状态-- |
| 58 | 58 | var user_info = getApp().globalData.userInfo; |
| 59 | 59 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 60 | - getApp().goto('/pages/getphone/getphone'); | |
| 60 | + getApp().goto('/pages/togoin/togoin'); | |
| 61 | 61 | return false; |
| 62 | 62 | } |
| 63 | 63 | |
| ... | ... | @@ -117,7 +117,7 @@ Page({ |
| 117 | 117 | var user_info = getApp().globalData.userInfo; |
| 118 | 118 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 119 | 119 | wx.navigateTo({ |
| 120 | - url: '/pages/getphone/getphone', | |
| 120 | + url: '/pages/togoin/togoin', | |
| 121 | 121 | }) |
| 122 | 122 | return false; |
| 123 | 123 | } | ... | ... |
pages/user/assistance/giftpacklist.js
| ... | ... | @@ -71,7 +71,7 @@ Page({ |
| 71 | 71 | //--先判断会员状态-- |
| 72 | 72 | var user_info = getApp().globalData.userInfo; |
| 73 | 73 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 74 | - getApp().goto('/pages/getphone/getphone'); | |
| 74 | + getApp().goto('/pages/togoin/togoin'); | |
| 75 | 75 | return false; |
| 76 | 76 | } |
| 77 | 77 | ... | ... |
pages/user/assistance/task_assistance.js
| ... | ... | @@ -143,7 +143,7 @@ Page({ |
| 143 | 143 | //--先判断会员状态-- |
| 144 | 144 | var user_info = getApp().globalData.userInfo; |
| 145 | 145 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 146 | - getApp().goto('/pages/getphone/getphone'); | |
| 146 | + getApp().goto('/pages/togoin/togoin'); | |
| 147 | 147 | return false; |
| 148 | 148 | } |
| 149 | 149 | ... | ... |
pages/user/cardinfo/cardinfo.js
| ... | ... | @@ -53,7 +53,7 @@ Page({ |
| 53 | 53 | //--先判断会员状态-- |
| 54 | 54 | var user_info = getApp().globalData.userInfo; |
| 55 | 55 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 56 | - wx.navigateTo({ url: '/pages/getphone/getphone' }) | |
| 56 | + wx.navigateTo({ url: '/pages/togoin/togoin' }) | |
| 57 | 57 | return false; |
| 58 | 58 | } |
| 59 | 59 | ... | ... |
pages/user/coupons/coupons.js
| ... | ... | @@ -156,7 +156,7 @@ Page({ |
| 156 | 156 | //--先判断会员状态-- |
| 157 | 157 | var user_info = getApp().globalData.userInfo; |
| 158 | 158 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 159 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | |
| 159 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 160 | 160 | return false; |
| 161 | 161 | } |
| 162 | 162 | this.init(th.myyhj,th.s_guoqi); | ... | ... |
pages/user/deposit/deposit.js
| ... | ... | @@ -20,7 +20,7 @@ Page({ |
| 20 | 20 | // --先判断会员状态-- |
| 21 | 21 | var user_info = getApp().globalData.userInfo; |
| 22 | 22 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 23 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | |
| 23 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 24 | 24 | return false; |
| 25 | 25 | } |
| 26 | 26 | wx.setNavigationBarTitle({ | ... | ... |
pages/user/index/index.js
| ... | ... | @@ -41,6 +41,7 @@ Page({ |
| 41 | 41 | actImg: "", |
| 42 | 42 | is_assistance: 0, //助力活动 |
| 43 | 43 | ad_img:"", |
| 44 | + add_card_data:'', //等级卡的内容 | |
| 44 | 45 | }, |
| 45 | 46 | goto_nav: function(e) { |
| 46 | 47 | var th = this; |
| ... | ... | @@ -49,7 +50,7 @@ Page({ |
| 49 | 50 | getApp().goto(url); |
| 50 | 51 | } else { |
| 51 | 52 | wx.navigateTo({ |
| 52 | - url: '/pages/getphone/getphone', | |
| 53 | + url: '/pages/togoin/togoin', | |
| 53 | 54 | }) |
| 54 | 55 | } |
| 55 | 56 | }, |
| ... | ... | @@ -70,14 +71,17 @@ Page({ |
| 70 | 71 | th.setData({ad_img:item.ad_code}) |
| 71 | 72 | } |
| 72 | 73 | }) |
| 74 | + | |
| 75 | + app.getUserFir(); | |
| 76 | + | |
| 77 | + | |
| 73 | 78 | }, |
| 74 | 79 | |
| 75 | 80 | /** |
| 76 | 81 | * 生命周期函数--监听页面显示 |
| 77 | 82 | */ |
| 78 | 83 | onShow: function() { |
| 79 | - | |
| 80 | - | |
| 84 | + | |
| 81 | 85 | if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
| 82 | 86 | var index=getApp().getPageIndex(this); |
| 83 | 87 | this.getTabBar().setData({ |
| ... | ... | @@ -100,11 +104,27 @@ Page({ |
| 100 | 104 | if (getApp().globalData.user_id) getApp().requestCardNum(th); |
| 101 | 105 | },500) |
| 102 | 106 | /*------会员登录------*/ |
| 103 | - app.getUserFir(async function(e) { | |
| 104 | - if (e != undefined && e != null && e.mobile) { | |
| 107 | + var e=getApp().globalData.userInfo; | |
| 108 | + | |
| 109 | + if (e != undefined && e != null && e.mobile) { | |
| 105 | 110 | s.setData({ |
| 106 | 111 | userInfo: e |
| 107 | 112 | }); |
| 113 | + | |
| 114 | + //-- 要调用接口,获取卡的钱 -- | |
| 115 | + var url="/api/weshop/wxuser/getWxCardInfo?storeId="+os.stoid+"&userId="+e.user_id; | |
| 116 | + rq.get(url,{ | |
| 117 | + success: function(su) { | |
| 118 | + if(su.data.code==0){ | |
| 119 | + s.setData({ | |
| 120 | + add_card_data: su.data.data, | |
| 121 | + }); | |
| 122 | + } | |
| 123 | + } | |
| 124 | + }); | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 108 | 128 | /*-----统计-----*/ |
| 109 | 129 | rq.get("/api/weshop/order/waitlist", { |
| 110 | 130 | data: { |
| ... | ... | @@ -312,7 +332,6 @@ Page({ |
| 312 | 332 | //th.requestRecommend(); |
| 313 | 333 | |
| 314 | 334 | } |
| 315 | - }); | |
| 316 | 335 | |
| 317 | 336 | var goods_list = this.selectComponent("#goods_recommend"); //组件的id |
| 318 | 337 | goods_list.init(); |
| ... | ... | @@ -416,7 +435,7 @@ Page({ |
| 416 | 435 | //--跳到绑定页面-- |
| 417 | 436 | gobindtel: function() { |
| 418 | 437 | wx.navigateTo({ |
| 419 | - url: '/pages/getphone/getphone', | |
| 438 | + url: '/pages/togoin/togoin', | |
| 420 | 439 | }) |
| 421 | 440 | }, |
| 422 | 441 | |
| ... | ... | @@ -655,6 +674,37 @@ Page({ |
| 655 | 674 | if(!url || url=='') return; |
| 656 | 675 | if(url[0]!='/') url='/'+url; |
| 657 | 676 | getApp().goto(url); |
| 677 | + }, | |
| 678 | + | |
| 679 | + //添加卡包 | |
| 680 | + addcard:function(){ | |
| 681 | + var res=this.data.add_card_data; | |
| 682 | + var arr = new Array(6) | |
| 683 | + arr[0] = res.code; | |
| 684 | + arr[1] = res.timestamp; | |
| 685 | + arr[2] = res.jsapiTicket; | |
| 686 | + arr[3] = res.openid; | |
| 687 | + arr[4] = res.cardid; | |
| 688 | + arr[5] = res.nonceStr; | |
| 689 | + var c=arr.sort(); | |
| 690 | + var newstr=""; | |
| 691 | + for (var i=0;i<c.length;i++) | |
| 692 | + { | |
| 693 | + newstr+=c[i]; | |
| 694 | + } | |
| 695 | + | |
| 696 | + var sh1= ut.sha1(newstr); | |
| 697 | + wx.addCard({ | |
| 698 | + cardList: [ | |
| 699 | + { | |
| 700 | + cardId: res.cardid, | |
| 701 | + cardExt: '{"code": "'+res.code+'", "openid": "'+res.openid+'","timestamp": "' + res.timestamp + '","nonce_str":"' + res.nonceStr + '","outer_str":"web", "signature":"' + sh1 + '"}' | |
| 702 | + } | |
| 703 | + | |
| 704 | + ], | |
| 705 | + success: function (res) {}, | |
| 706 | + cancel: function (res) {} | |
| 707 | + }); | |
| 658 | 708 | } |
| 659 | 709 | |
| 660 | 710 | }) | ... | ... |
pages/user/index/index.wxml
| ... | ... | @@ -244,6 +244,13 @@ |
| 244 | 244 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> |
| 245 | 245 | <view class="four-level-word">我的地址</view> |
| 246 | 246 | </view> |
| 247 | + | |
| 248 | + <!-- 收入卡包 --> | |
| 249 | + <view class="item t-c" bindtap="addcard" wx:if="{{add_card_data}}"> | |
| 250 | + <image class="xc-center-img " src="{{iurl}}//miniapp/images/wx_cardbag.png"></image> | |
| 251 | + <view class="four-level-word">收入卡包</view> | |
| 252 | + </view> | |
| 253 | + | |
| 247 | 254 | <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_nav" > |
| 248 | 255 | <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> |
| 249 | 256 | <view class="four-level-word">我的服务</view> | ... | ... |
pages/user/integral/integral.js
| ... | ... | @@ -279,7 +279,7 @@ Page({ |
| 279 | 279 | //--先判断会员状态-- |
| 280 | 280 | var user_info = getApp().globalData.userInfo; |
| 281 | 281 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 282 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | |
| 282 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 283 | 283 | return false; |
| 284 | 284 | } |
| 285 | 285 | ... | ... |
pages/user/member/bring/bring.js
| ... | ... | @@ -365,7 +365,7 @@ Page({ |
| 365 | 365 | var user_info = getApp().globalData.userInfo; |
| 366 | 366 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == " " || user_info.mobile == null) { |
| 367 | 367 | wx.navigateTo({ |
| 368 | - url: '/pages/getphone/getphone', | |
| 368 | + url: '/pages/togoin/togoin', | |
| 369 | 369 | }) |
| 370 | 370 | return false; |
| 371 | 371 | } | ... | ... |
pages/user/member/menber.js
| ... | ... | @@ -23,7 +23,7 @@ Page({ |
| 23 | 23 | //--先判断会员状态-- |
| 24 | 24 | var user_info = getApp().globalData.userInfo; |
| 25 | 25 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 26 | - wx.navigateTo({ url: '/pages/getphone/getphone', }) | |
| 26 | + wx.navigateTo({ url: '/pages/togoin/togoin', }) | |
| 27 | 27 | return false; |
| 28 | 28 | } |
| 29 | 29 | this.init_fir(); | ... | ... |
pages/user/my_service/appment_main.js
pages/user/order_detail/order_detail.js
| ... | ... | @@ -665,6 +665,436 @@ Page({ |
| 665 | 665 | } |
| 666 | 666 | func(ob) |
| 667 | 667 | }, |
| 668 | + | |
| 669 | + | |
| 670 | + //再来一单的功能的实现 | |
| 671 | + moreOrder:function(e){ | |
| 672 | + var th=this; | |
| 673 | + var item=th.data.order; | |
| 674 | + th.check_more_order(item); | |
| 675 | + }, | |
| 676 | + | |
| 677 | + check_more_order:async function(item){ | |
| 678 | + var pickup=null,th=this; | |
| 679 | + //--------获取门店----------- | |
| 680 | + await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + item.pickup_id, { | |
| 681 | + | |
| 682 | + }).then(res=>{ | |
| 683 | + pickup = res.data.data; | |
| 684 | + }) | |
| 685 | + | |
| 686 | + //--------获取商品---------- | |
| 687 | + var goods_list=item.order_goods; | |
| 688 | + //--- 返回的内容 --- | |
| 689 | + var back_goods_arr=[]; | |
| 690 | + var err_text=""; | |
| 691 | + for(var i in goods_list){ | |
| 692 | + var g_item=goods_list[i]; | |
| 693 | + //--如果是赠品,不加入购物车-- | |
| 694 | + if(g_item['is_gift']) continue; | |
| 695 | + if(g_item['prom_type']==4 ){ | |
| 696 | + $err_text+= g_item['goods_name']+"积分购商品不加入购物车\n"; | |
| 697 | + continue; | |
| 698 | + } | |
| 699 | + if(g_item['prom_type']==5){ | |
| 700 | + $err_text+= g_item['goods_name']+"搭配购商品不加入购物车\n"; | |
| 701 | + continue; | |
| 702 | + } | |
| 703 | + if(g_item['prom_type']==6 ){ | |
| 704 | + $err_text+= g_item['goods_name']+"拼团商品不加入购物车\n"; | |
| 705 | + continue; | |
| 706 | + } | |
| 707 | + | |
| 708 | + //--获取商品-- | |
| 709 | + var good=null; | |
| 710 | + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + g_item.goods_id, { | |
| 711 | + | |
| 712 | + }).then(res=>{ | |
| 713 | + good=res.data.data; | |
| 714 | + }) | |
| 715 | + | |
| 716 | + if(!good){ | |
| 717 | + err_text+= g_item['goods_name']+"未找到商品\n"; | |
| 718 | + continue; | |
| 719 | + } | |
| 720 | + if (good.is_on_sale != 1) { | |
| 721 | + err_text+= g_item['goods_name']+"已经下架\n"; | |
| 722 | + continue; | |
| 723 | + } | |
| 724 | + | |
| 725 | + var timestamp = ut.gettimestamp(); | |
| 726 | + if (good.on_time > timestamp) { | |
| 727 | + err_text+= g_item['goods_name']+"还未上架\n"; | |
| 728 | + continue; | |
| 729 | + } | |
| 730 | + if (good.down_time > 0) { | |
| 731 | + if (good.down_time < timestamp) { | |
| 732 | + err_text+=g_item['goods_name']+"已经下架\n"; | |
| 733 | + continue; | |
| 734 | + } | |
| 735 | + } | |
| 736 | + | |
| 737 | + //如果商品的配送方式和门店不匹配 | |
| 738 | + if(good['distr_type']>0 && pick_up['distr_type']>0 && good['distr_type']!=pick_up['distr_type'] ){ | |
| 739 | + err_text+= good['goods_name']+"配送方式不一致\n"; | |
| 740 | + continue; | |
| 741 | + } | |
| 742 | + | |
| 743 | + var prom=null; | |
| 744 | + var b_item={} | |
| 745 | + b_item.goods_id=g_item.goods_id; | |
| 746 | + b_item.goods_name=g_item.goods_name; | |
| 747 | + b_item.goods_num=g_item.goods_num; | |
| 748 | + b_item.guide_id=g_item.guide_id; | |
| 749 | + b_item.guide_type=g_item.guide_type; | |
| 750 | + b_item.pickup_id=item.pickup_id; | |
| 751 | + b_item.price=good.shop_price; | |
| 752 | + b_item.goods_sn=good.goods_sn; | |
| 753 | + b_item.sku=good.sku; | |
| 754 | + | |
| 755 | + //--判断商品当前的活动情况-- | |
| 756 | + switch(good.prom_type){ | |
| 757 | + case 1: | |
| 758 | + var flash=null; | |
| 759 | + getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + good.prom_id, { | |
| 760 | + }).then(res=>{ | |
| 761 | + if (res.data.code== 0) { | |
| 762 | + flash=res.data.data; | |
| 763 | + } | |
| 764 | + }) | |
| 765 | + //----已经结束----- | |
| 766 | + if (flash && flash.is_end == 0 && flash.end_time > timestamp && flash.start_time > timestamp ) { | |
| 767 | + prom=flash; | |
| 768 | + b_item.price=prom.price; // | |
| 769 | + } | |
| 770 | + break; | |
| 771 | + case 6: | |
| 772 | + b_item.is_pd_normal=1; break; | |
| 773 | + } | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + //判断是不是线下库存的购买, 是不是秒杀活动 | |
| 778 | + if(th.data.sales_rules==2 && !prom){ | |
| 779 | + | |
| 780 | + //-- 看一下购物车上有多少商品 -- | |
| 781 | + var cart_num=0; | |
| 782 | + await getApp().request.promiseGet("/api/weshop/cart/page", { | |
| 783 | + data: { | |
| 784 | + store_id: os.stoid, | |
| 785 | + user_id: getApp().globalData.user_id, | |
| 786 | + state:0, is_gift:0, | |
| 787 | + goods_id:good.goods_id, | |
| 788 | + pick_id: b_item.pickup_id | |
| 789 | + } | |
| 790 | + }).then(res=>{ | |
| 791 | + var num = 0; | |
| 792 | + if(res.data.code==0 && res.data.data && res.data.data.pageData) { | |
| 793 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 794 | + num += res.data.data.pageData[i].goods_num; | |
| 795 | + } | |
| 796 | + } | |
| 797 | + cart_num=num; | |
| 798 | + }) | |
| 799 | + | |
| 800 | + var lock=0,plist=null; | |
| 801 | + //先读取门店的lock, | |
| 802 | + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ | |
| 803 | + data:{store_id:os.stoid,wareId:good.goods_id,storageId:b_item.pickup_id,pageSize:1000} | |
| 804 | + }).then(res=>{ | |
| 805 | + if(res.data.code==0 && res.data.data.total>0){ | |
| 806 | + for(var i in res.data.data.pageData) | |
| 807 | + lock+=res.data.data.pageData[i].outQty | |
| 808 | + } | |
| 809 | + }) | |
| 810 | + | |
| 811 | + //---通过接口获取门店的线下库存信息-- | |
| 812 | + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ | |
| 813 | + data:{storageNos:pickup.pickup_no,wareIds:encodeURIComponent(good.erpwareid),storeId:os.stoid} | |
| 814 | + }).then(res=>{ | |
| 815 | + if(res.data.code==0 && res.data.data.total>0){ | |
| 816 | + plist=res.data.data.pageData[0]; | |
| 817 | + } | |
| 818 | + }) | |
| 819 | + | |
| 820 | + if(!plist){ | |
| 821 | + err_text+= good['goods_name']+"库存不足\n"; | |
| 822 | + continue; | |
| 823 | + } | |
| 824 | + if(plist.CanOutQty-lock<=0){ | |
| 825 | + err_text+= good['goods_name']+"库存不足\n"; | |
| 826 | + continue; | |
| 827 | + } | |
| 828 | + if(b_item.goods_num>(plist.CanOutQty-lock)){ | |
| 829 | + b_item.goods_num=plist.CanOutQty-lock; | |
| 830 | + } | |
| 831 | + var req_data={ | |
| 832 | + store_id: os.stoid, | |
| 833 | + user_id: getApp().globalData.user_id, | |
| 834 | + goods_id: good.goods_id, | |
| 835 | + }; | |
| 836 | + | |
| 837 | + var buynum=0; | |
| 838 | + //---要获得商品,该用户买了多少件,同步应用--- | |
| 839 | + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 840 | + data: req_data, | |
| 841 | + }).then(res => { | |
| 842 | + if(res.data.code==0){ | |
| 843 | + var buy_num_data = res.data.data; | |
| 844 | + buynum = buy_num_data.goodsbuynum; | |
| 845 | + } | |
| 846 | + }) | |
| 847 | + | |
| 848 | + //---- 要计算商品的限购 ----- | |
| 849 | + if(good['viplimited']>0){ | |
| 850 | + if(cart_num+buynum>good['viplimited']){ | |
| 851 | + err_text+= good['goods_name']+"超出限购\n"; | |
| 852 | + continue; | |
| 853 | + } | |
| 854 | + good['viplimited']-=(cart_num+buynum); | |
| 855 | + if(b_item.goods_num>good['viplimited']){ | |
| 856 | + b_item.goods_num=good['viplimited']; | |
| 857 | + } | |
| 858 | + } | |
| 859 | + | |
| 860 | + back_goods_arr.push(b_item); //返回商品元素 | |
| 861 | + | |
| 862 | + }else{ | |
| 863 | + | |
| 864 | + //-- 看一下购物车上有多少商品 -- | |
| 865 | + var cart_num=0; | |
| 866 | + await getApp().request.promiseGet("/api/weshop/cart/page", { | |
| 867 | + data: { | |
| 868 | + store_id: os.stoid, | |
| 869 | + user_id: getApp().globalData.user_id, | |
| 870 | + state:0, is_gift:0, | |
| 871 | + goods_id:good.goods_id | |
| 872 | + } | |
| 873 | + }).then(res=>{ | |
| 874 | + var num = 0; | |
| 875 | + if(res.data.code==0 && res.data.data && res.data.data.pageData) { | |
| 876 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 877 | + num += res.data.data.pageData[i].goods_num; | |
| 878 | + } | |
| 879 | + } | |
| 880 | + cart_num=num; | |
| 881 | + }) | |
| 882 | + | |
| 883 | + | |
| 884 | + if(good.store_count<=0){ | |
| 885 | + err_text+= good['goods_name']+"库存不足\n"; | |
| 886 | + continue; | |
| 887 | + } | |
| 888 | + if(b_item.goods_num>good.store_count) | |
| 889 | + b_item.goods_num=good.store_count; | |
| 890 | + | |
| 891 | + var buynum=0; //商品已经购买多少件 | |
| 892 | + var promgoodsbuynum=0; //活动已经购买多少件 | |
| 893 | + var redis_num = 0; //redis库存 | |
| 894 | + | |
| 895 | + var req_data={ | |
| 896 | + store_id: os.stoid, | |
| 897 | + user_id: getApp().globalData.user_id, | |
| 898 | + goods_id: good.goods_id, | |
| 899 | + }; | |
| 900 | + | |
| 901 | + if(prom){ | |
| 902 | + req_data.prom_type= good.prom_type; | |
| 903 | + req_data.prom_id= good.prom_id; | |
| 904 | + | |
| 905 | + //------判断活动是否抢光----- | |
| 906 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
| 907 | + os.stoid + "/" + good.prom_type + "/" + good.prom_id, { | |
| 908 | + 1: 1 | |
| 909 | + }).then(res => { | |
| 910 | + redis_num = res.data.data; | |
| 911 | + }); | |
| 912 | + if(redis_num<=0){ | |
| 913 | + err_text+= good['goods_name']+"活动不足\n"; | |
| 914 | + continue; | |
| 915 | + } | |
| 916 | + | |
| 917 | + } | |
| 918 | + | |
| 919 | + //---要获得商品,该用户买了多少件,同步应用--- | |
| 920 | + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 921 | + data: req_data, | |
| 922 | + }).then(res => { | |
| 923 | + if(res.data.code==0){ | |
| 924 | + var buy_num_data = res.data.data; | |
| 925 | + if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum; | |
| 926 | + buynum = buy_num_data.goodsbuynum; | |
| 927 | + } | |
| 928 | + }) | |
| 929 | + | |
| 930 | + //---- 要计算商品的限购 ----- | |
| 931 | + if(good['viplimited']>0){ | |
| 932 | + if(cart_num+buynum>good['viplimited']){ | |
| 933 | + err_text+= good['goods_name']+"超出限购\n"; | |
| 934 | + continue; | |
| 935 | + } | |
| 936 | + good['viplimited']-=(cart_num+buynum); | |
| 937 | + if(b_item.goods_num>good['viplimited']){ | |
| 938 | + b_item.goods_num=good['viplimited']; | |
| 939 | + } | |
| 940 | + | |
| 941 | + } | |
| 942 | + | |
| 943 | + //-- 判断活动的库存 -- | |
| 944 | + if(prom){ | |
| 945 | + if(prom['goods_num']<=prom['buy_num']){ | |
| 946 | + err_text+= good['goods_name']+"超出活动库存\n";continue; | |
| 947 | + } | |
| 948 | + | |
| 949 | + if(b_item.goods_num>prom['goods_num']-prom['buy_num']){ | |
| 950 | + b_item['goods_num']= b_item['goods_num']-b_item['buy_num']; | |
| 951 | + } | |
| 952 | + | |
| 953 | + if(b_item.goods_num>redis_num){ | |
| 954 | + b_item.goods_num=redis_num; | |
| 955 | + } | |
| 956 | + | |
| 957 | + if(cart_num+buynum>prom['buy_limit']){ | |
| 958 | + err_text+= good['goods_name']+"超出活动限购\n";continue; | |
| 959 | + } | |
| 960 | + prom['buy_limit'] -= (cart_num+buynum); | |
| 961 | + if(b_item.goods_num>prom['buy_limit']){ | |
| 962 | + b_item.goods_num=prom['buy_limit']; | |
| 963 | + } | |
| 964 | + | |
| 965 | + } | |
| 966 | + back_goods_arr.push(b_item); //返回商品元素 | |
| 967 | + } | |
| 968 | + } | |
| 969 | + | |
| 970 | + //有重新购买的数据是时候,就要重新生成订单 | |
| 971 | + if(back_goods_arr.length>0){ | |
| 972 | + th.setData({back_goods_arr:back_goods_arr}); | |
| 973 | + if(!err_text){ | |
| 974 | + th.more_add_cart(); | |
| 975 | + }else{ | |
| 976 | + // 如果没有获取用户信息 | |
| 977 | + wx.showModal({ | |
| 978 | + title:'确定', | |
| 979 | + content: err_text+',确定要买其他商品码?', | |
| 980 | + success(res) { | |
| 981 | + if (res.confirm) { | |
| 982 | + //跳转到登录页 | |
| 983 | + th.more_add_cart(); | |
| 984 | + } | |
| 985 | + } | |
| 986 | + }); | |
| 987 | + | |
| 988 | + } | |
| 989 | + }else{ | |
| 990 | + getApp().confirmBox(err_text); | |
| 991 | + } | |
| 992 | + }, | |
| 993 | + | |
| 994 | + more_add_cart:async function(){ | |
| 995 | + var back_goods_arr=this.data.back_goods_arr; | |
| 996 | + var err_text=""; | |
| 997 | + var ok_num=0; | |
| 998 | + | |
| 999 | + for(var i in back_goods_arr){ | |
| 1000 | + //商品ID | |
| 1001 | + var g_item=back_goods_arr[i]; | |
| 1002 | + var newd = { | |
| 1003 | + goods_id: g_item.goods_id, | |
| 1004 | + goods_num: g_item.goods_num, | |
| 1005 | + pick_id: g_item.pickup_id, | |
| 1006 | + user_id: oo.user_id, | |
| 1007 | + store_id: os.stoid, | |
| 1008 | + goods_price: g_item.price, | |
| 1009 | + member_goods_price: g_item.price, | |
| 1010 | + goods_name: g_item.goods_name, | |
| 1011 | + goods_sn: g_item.goods_sn, | |
| 1012 | + sku: g_item.sku, | |
| 1013 | + }; | |
| 1014 | + | |
| 1015 | + if(g_item.guide_id){ | |
| 1016 | + newd['guide_id']=g_item.guide_id; | |
| 1017 | + newd['guide_type']=g_item.guide_type; | |
| 1018 | + } | |
| 1019 | + | |
| 1020 | + var b_cart_goods=null; | |
| 1021 | + await getApp().request.promiseGet("/api/weshop/cart/page", { | |
| 1022 | + data: { | |
| 1023 | + store_id: os.stoid, | |
| 1024 | + user_id: oo.user_id, | |
| 1025 | + goods_id: g_item.goods_id, | |
| 1026 | + pick_id: g_item.pickup_id, | |
| 1027 | + }, | |
| 1028 | + }).then(res=>{ | |
| 1029 | + //-------如果购物车中有相关的数据------- | |
| 1030 | + if (res.data.data.total > 0) { | |
| 1031 | + b_cart_goods= res.data.data.pageData[0]; | |
| 1032 | + } | |
| 1033 | + }) | |
| 1034 | + | |
| 1035 | + //-- 如果就加入过购物车 -- | |
| 1036 | + if(b_cart_goods){ | |
| 1037 | + var updata = { | |
| 1038 | + id: b_cart_goods.id, | |
| 1039 | + goods_num: newd.goods_num + b_cart_goods.goods_num, | |
| 1040 | + goods_price: newd.goods_price, | |
| 1041 | + member_goods_price:newd.goods_price, | |
| 1042 | + store_id: os.stoid, | |
| 1043 | + }; | |
| 1044 | + if(newd.guide_id){ | |
| 1045 | + updata.guide_id=newd.guide_id; | |
| 1046 | + updata.guide_type=newd.guide_type; | |
| 1047 | + } | |
| 1048 | + await getApp().request.promisePut("/api/weshop/cart/update", { | |
| 1049 | + data: updata | |
| 1050 | + }).then(res=>{ | |
| 1051 | + if(res.data.code==0) { | |
| 1052 | + ok_num++; | |
| 1053 | + }else{ | |
| 1054 | + err_text+=newd.goods_name+"加入购物车失败\n"; | |
| 1055 | + } | |
| 1056 | + }) | |
| 1057 | + | |
| 1058 | + }else{ | |
| 1059 | + await getApp().request.promisePost("/api/weshop/cart/save", { | |
| 1060 | + data: newd | |
| 1061 | + }).then(res=>{ | |
| 1062 | + if(res.data.code==0) { | |
| 1063 | + ok_num++; | |
| 1064 | + }else{ | |
| 1065 | + err_text+=newd.goods_name+"加入购物车失败\n"; | |
| 1066 | + } | |
| 1067 | + }) | |
| 1068 | + } | |
| 1069 | + } | |
| 1070 | + | |
| 1071 | + if(ok_num==0){ | |
| 1072 | + //-- 如果没有获取用户信息 -- | |
| 1073 | + wx.showModal({ | |
| 1074 | + title:'提示', | |
| 1075 | + content: err_text, | |
| 1076 | + success(res) {} | |
| 1077 | + }); | |
| 1078 | + }else{ | |
| 1079 | + if(err_text==""){ | |
| 1080 | + getApp().goto("/pages/cart/cart/cart"); | |
| 1081 | + }else{ | |
| 1082 | + // 如果没有获取用户信息 | |
| 1083 | + wx.showModal({ | |
| 1084 | + title:'提示', | |
| 1085 | + content: err_text, | |
| 1086 | + success(res) { | |
| 1087 | + if (res.confirm) { | |
| 1088 | + //跳转到登录页 | |
| 1089 | + getApp().goto("/pages/cart/cart/cart"); | |
| 1090 | + } | |
| 1091 | + } | |
| 1092 | + }); | |
| 1093 | + | |
| 1094 | + } | |
| 1095 | + | |
| 1096 | + } | |
| 1097 | + } | |
| 668 | 1098 | |
| 669 | 1099 | |
| 670 | 1100 | ... | ... |
pages/user/order_detail/order_detail.wxml
| ... | ... | @@ -160,10 +160,15 @@ |
| 160 | 160 | <navigator class="tips-btn" wx:if="{{order.is_all_return_status==0 || order.is_all_return_status==1}}" |
| 161 | 161 | url="/pages/user/return_goods_info/return_goods_info?order_id={{order.order_id}}">退款详情</navigator> |
| 162 | 162 | </block> |
| 163 | + | |
| 164 | + | |
| 165 | + <block wx:if="{{order.pay_status==1 || order.order_status==3 }}"> | |
| 166 | + <view style="background-color: #feca53;" class="tips-btn" bindtap="moreOrder" >再来一单</view> | |
| 167 | + </block> | |
| 163 | 168 | |
| 164 | 169 | <block wx:if="{{order.order_status==2 && order.is_zsorder!=4}}"> |
| 165 | 170 | <navigator wx:if="{{order.order_goods.length>1}}" class="tips-btn" |
| 166 | - url="/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价{{order.order_goods.length}}</navigator> | |
| 171 | + url="/pages/user/comment/comment?status=0&order_id={{order.order_id}}">评价</navigator> | |
| 167 | 172 | <navigator wx:else class="tips-btn" |
| 168 | 173 | url="/pages/user/add_comment/add_comment?goods_id={{order.order_goods[0].goods_id}}&order_id={{order.order_id}}}">去评价</navigator> |
| 169 | 174 | </block> | ... | ... |
pages/user/order_list/order_list.js
| ... | ... | @@ -41,9 +41,12 @@ Page({ |
| 41 | 41 | is_get: 0, |
| 42 | 42 | conf: null, |
| 43 | 43 | iscodeall: null, |
| 44 | + sales_rules:1, //默认是显示线上库存 | |
| 44 | 45 | |
| 45 | 46 | //会员的等级价位 |
| 46 | 47 | card_field:null, |
| 48 | + | |
| 49 | + back_goods_arr:null, //返回商品的列表 | |
| 47 | 50 | }, |
| 48 | 51 | onLoad: function(t) { |
| 49 | 52 | var th = this; |
| ... | ... | @@ -53,7 +56,7 @@ Page({ |
| 53 | 56 | s.init(this, "", "orderList"); |
| 54 | 57 | //---查看会员的等级价--- |
| 55 | 58 | getApp().getConfig2(function(e) { |
| 56 | - th.setData({conf: e }); | |
| 59 | + th.setData({conf: e,sales_rules:e.sales_rules }); | |
| 57 | 60 | //--- 看后台是不是有开通等级卡 --- |
| 58 | 61 | if(e.switch_list){ |
| 59 | 62 | var s_list=JSON.parse(e.switch_list); |
| ... | ... | @@ -746,5 +749,439 @@ Page({ |
| 746 | 749 | content: "请将二维码展示给核销员,收货更快捷" |
| 747 | 750 | }; |
| 748 | 751 | qc_com.open(obj) |
| 752 | + }, | |
| 753 | + | |
| 754 | + //再来一单的功能的实现 | |
| 755 | + moreOrder:function(e){ | |
| 756 | + var th=this; | |
| 757 | + var index=e.currentTarget.dataset.index; | |
| 758 | + var item=th.data.orderList[index]; | |
| 759 | + th.check_more_order(item); | |
| 760 | + }, | |
| 761 | + | |
| 762 | + check_more_order:async function(item){ | |
| 763 | + var pickup=null,th=this; | |
| 764 | + //--------获取门店----------- | |
| 765 | + await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + item.pickup_id, { | |
| 766 | + | |
| 767 | + }).then(res=>{ | |
| 768 | + pickup = res.data.data; | |
| 769 | + }) | |
| 770 | + | |
| 771 | + //--------获取商品---------- | |
| 772 | + var goods_list=item.order_goods; | |
| 773 | + //--- 返回的内容 --- | |
| 774 | + var back_goods_arr=[]; | |
| 775 | + var err_text=""; | |
| 776 | + for(var i in goods_list){ | |
| 777 | + var g_item=goods_list[i]; | |
| 778 | + //--如果是赠品,不加入购物车-- | |
| 779 | + if(g_item['is_gift']) continue; | |
| 780 | + if(g_item['prom_type']==4 ){ | |
| 781 | + $err_text+= g_item['goods_name']+"积分购商品不加入购物车\n"; | |
| 782 | + continue; | |
| 783 | + } | |
| 784 | + if(g_item['prom_type']==5){ | |
| 785 | + $err_text+= g_item['goods_name']+"搭配购商品不加入购物车\n"; | |
| 786 | + continue; | |
| 787 | + } | |
| 788 | + if(g_item['prom_type']==6 ){ | |
| 789 | + $err_text+= g_item['goods_name']+"拼团商品不加入购物车\n"; | |
| 790 | + continue; | |
| 791 | + } | |
| 792 | + | |
| 793 | + //--获取商品-- | |
| 794 | + var good=null; | |
| 795 | + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + g_item.goods_id, { | |
| 796 | + | |
| 797 | + }).then(res=>{ | |
| 798 | + good=res.data.data; | |
| 799 | + }) | |
| 800 | + | |
| 801 | + if(!good){ | |
| 802 | + err_text+= g_item['goods_name']+"未找到商品\n"; | |
| 803 | + continue; | |
| 804 | + } | |
| 805 | + if (good.is_on_sale != 1) { | |
| 806 | + err_text+= g_item['goods_name']+"已经下架\n"; | |
| 807 | + continue; | |
| 808 | + } | |
| 809 | + | |
| 810 | + var timestamp = ut.gettimestamp(); | |
| 811 | + if (good.on_time > timestamp) { | |
| 812 | + err_text+= g_item['goods_name']+"还未上架\n"; | |
| 813 | + continue; | |
| 814 | + } | |
| 815 | + if (good.down_time > 0) { | |
| 816 | + if (good.down_time < timestamp) { | |
| 817 | + err_text+=g_item['goods_name']+"已经下架\n"; | |
| 818 | + continue; | |
| 819 | + } | |
| 820 | + } | |
| 821 | + | |
| 822 | + //如果商品的配送方式和门店不匹配 | |
| 823 | + if(good['distr_type']>0 && pick_up['distr_type']>0 && good['distr_type']!=pick_up['distr_type'] ){ | |
| 824 | + err_text+= good['goods_name']+"配送方式不一致\n"; | |
| 825 | + continue; | |
| 826 | + } | |
| 827 | + | |
| 828 | + var prom=null; | |
| 829 | + var b_item={} | |
| 830 | + b_item.goods_id=g_item.goods_id; | |
| 831 | + b_item.goods_name=g_item.goods_name; | |
| 832 | + b_item.goods_num=g_item.goods_num; | |
| 833 | + b_item.guide_id=g_item.guide_id; | |
| 834 | + b_item.guide_type=g_item.guide_type; | |
| 835 | + b_item.pickup_id=item.pickup_id; | |
| 836 | + b_item.price=good.shop_price; | |
| 837 | + b_item.goods_sn=good.goods_sn; | |
| 838 | + b_item.sku=good.sku; | |
| 839 | + | |
| 840 | + //--判断商品当前的活动情况-- | |
| 841 | + switch(good.prom_type){ | |
| 842 | + case 1: | |
| 843 | + var flash=null; | |
| 844 | + getApp().request.promiseGet("/api/ms/flash_sale/get/" + os.stoid + "/" + good.prom_id, { | |
| 845 | + }).then(res=>{ | |
| 846 | + if (res.data.code== 0) { | |
| 847 | + flash=res.data.data; | |
| 848 | + } | |
| 849 | + }) | |
| 850 | + //----已经结束----- | |
| 851 | + if (flash && flash.is_end == 0 && flash.end_time > timestamp && flash.start_time > timestamp ) { | |
| 852 | + prom=flash; | |
| 853 | + b_item.price=prom.price; // | |
| 854 | + } | |
| 855 | + break; | |
| 856 | + case 6: | |
| 857 | + b_item.is_pd_normal=1; break; | |
| 858 | + } | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + //判断是不是线下库存的购买, 是不是秒杀活动 | |
| 863 | + if(th.data.sales_rules==2 && !prom){ | |
| 864 | + | |
| 865 | + //-- 看一下购物车上有多少商品 -- | |
| 866 | + var cart_num=0; | |
| 867 | + await getApp().request.promiseGet("/api/weshop/cart/page", { | |
| 868 | + data: { | |
| 869 | + store_id: os.stoid, | |
| 870 | + user_id: getApp().globalData.user_id, | |
| 871 | + state:0, is_gift:0, | |
| 872 | + goods_id:good.goods_id, | |
| 873 | + pick_id: b_item.pickup_id | |
| 874 | + } | |
| 875 | + }).then(res=>{ | |
| 876 | + var num = 0; | |
| 877 | + if(res.data.code==0 && res.data.data && res.data.data.pageData) { | |
| 878 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 879 | + num += res.data.data.pageData[i].goods_num; | |
| 880 | + } | |
| 881 | + } | |
| 882 | + cart_num=num; | |
| 883 | + }) | |
| 884 | + | |
| 885 | + var lock=0,plist=null; | |
| 886 | + //先读取门店的lock, | |
| 887 | + await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{ | |
| 888 | + data:{store_id:os.stoid,wareId:good.goods_id,storageId:b_item.pickup_id,pageSize:1000} | |
| 889 | + }).then(res=>{ | |
| 890 | + if(res.data.code==0 && res.data.data.total>0){ | |
| 891 | + for(var i in res.data.data.pageData) | |
| 892 | + lock+=res.data.data.pageData[i].outQty | |
| 893 | + } | |
| 894 | + }) | |
| 895 | + | |
| 896 | + //---通过接口获取门店的线下库存信息-- | |
| 897 | + await getApp().request.promiseGet("/api/weshop/goods/getWareStorages",{ | |
| 898 | + data:{storageNos:pickup.pickup_no,wareIds:encodeURIComponent(good.erpwareid),storeId:os.stoid} | |
| 899 | + }).then(res=>{ | |
| 900 | + if(res.data.code==0 && res.data.data.total>0){ | |
| 901 | + plist=res.data.data.pageData[0]; | |
| 902 | + } | |
| 903 | + }) | |
| 904 | + | |
| 905 | + if(!plist){ | |
| 906 | + err_text+= good['goods_name']+"库存不足\n"; | |
| 907 | + continue; | |
| 908 | + } | |
| 909 | + if(plist.CanOutQty-lock<=0){ | |
| 910 | + err_text+= good['goods_name']+"库存不足\n"; | |
| 911 | + continue; | |
| 912 | + } | |
| 913 | + if(b_item.goods_num>(plist.CanOutQty-lock)){ | |
| 914 | + b_item.goods_num=plist.CanOutQty-lock; | |
| 915 | + } | |
| 916 | + var req_data={ | |
| 917 | + store_id: os.stoid, | |
| 918 | + user_id: getApp().globalData.user_id, | |
| 919 | + goods_id: good.goods_id, | |
| 920 | + }; | |
| 921 | + | |
| 922 | + var buynum=0; | |
| 923 | + //---要获得商品,该用户买了多少件,同步应用--- | |
| 924 | + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 925 | + data: req_data, | |
| 926 | + }).then(res => { | |
| 927 | + if(res.data.code==0){ | |
| 928 | + var buy_num_data = res.data.data; | |
| 929 | + buynum = buy_num_data.goodsbuynum; | |
| 930 | + } | |
| 931 | + }) | |
| 932 | + | |
| 933 | + //---- 要计算商品的限购 ----- | |
| 934 | + if(good['viplimited']>0){ | |
| 935 | + if(cart_num+buynum>good['viplimited']){ | |
| 936 | + err_text+= good['goods_name']+"超出限购\n"; | |
| 937 | + continue; | |
| 938 | + } | |
| 939 | + good['viplimited']-=(cart_num+buynum); | |
| 940 | + if(b_item.goods_num>good['viplimited']){ | |
| 941 | + b_item.goods_num=good['viplimited']; | |
| 942 | + } | |
| 943 | + } | |
| 944 | + | |
| 945 | + back_goods_arr.push(b_item); //返回商品元素 | |
| 946 | + | |
| 947 | + }else{ | |
| 948 | + | |
| 949 | + //-- 看一下购物车上有多少商品 -- | |
| 950 | + var cart_num=0; | |
| 951 | + await getApp().request.promiseGet("/api/weshop/cart/page", { | |
| 952 | + data: { | |
| 953 | + store_id: os.stoid, | |
| 954 | + user_id: getApp().globalData.user_id, | |
| 955 | + state:0, is_gift:0, | |
| 956 | + goods_id:good.goods_id | |
| 957 | + } | |
| 958 | + }).then(res=>{ | |
| 959 | + var num = 0; | |
| 960 | + if(res.data.code==0 && res.data.data && res.data.data.pageData) { | |
| 961 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 962 | + num += res.data.data.pageData[i].goods_num; | |
| 963 | + } | |
| 964 | + } | |
| 965 | + cart_num=num; | |
| 966 | + }) | |
| 967 | + | |
| 968 | + | |
| 969 | + if(good.store_count<=0){ | |
| 970 | + err_text+= good['goods_name']+"库存不足\n"; | |
| 971 | + continue; | |
| 972 | + } | |
| 973 | + if(b_item.goods_num>good.store_count) | |
| 974 | + b_item.goods_num=good.store_count; | |
| 975 | + | |
| 976 | + var buynum=0; //商品已经购买多少件 | |
| 977 | + var promgoodsbuynum=0; //活动已经购买多少件 | |
| 978 | + var redis_num = 0; //redis库存 | |
| 979 | + | |
| 980 | + var req_data={ | |
| 981 | + store_id: os.stoid, | |
| 982 | + user_id: getApp().globalData.user_id, | |
| 983 | + goods_id: good.goods_id, | |
| 984 | + }; | |
| 985 | + | |
| 986 | + if(prom){ | |
| 987 | + req_data.prom_type= good.prom_type; | |
| 988 | + req_data.prom_id= good.prom_id; | |
| 989 | + | |
| 990 | + //------判断活动是否抢光----- | |
| 991 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + | |
| 992 | + os.stoid + "/" + good.prom_type + "/" + good.prom_id, { | |
| 993 | + 1: 1 | |
| 994 | + }).then(res => { | |
| 995 | + redis_num = res.data.data; | |
| 996 | + }); | |
| 997 | + if(redis_num<=0){ | |
| 998 | + err_text+= good['goods_name']+"活动不足\n"; | |
| 999 | + continue; | |
| 1000 | + } | |
| 1001 | + | |
| 1002 | + } | |
| 1003 | + | |
| 1004 | + //---要获得商品,该用户买了多少件,同步应用--- | |
| 1005 | + await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", { | |
| 1006 | + data: req_data, | |
| 1007 | + }).then(res => { | |
| 1008 | + if(res.data.code==0){ | |
| 1009 | + var buy_num_data = res.data.data; | |
| 1010 | + if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum; | |
| 1011 | + buynum = buy_num_data.goodsbuynum; | |
| 1012 | + } | |
| 1013 | + }) | |
| 1014 | + | |
| 1015 | + //---- 要计算商品的限购 ----- | |
| 1016 | + if(good['viplimited']>0){ | |
| 1017 | + if(cart_num+buynum>good['viplimited']){ | |
| 1018 | + err_text+= good['goods_name']+"超出限购\n"; | |
| 1019 | + continue; | |
| 1020 | + } | |
| 1021 | + good['viplimited']-=(cart_num+buynum); | |
| 1022 | + if(b_item.goods_num>good['viplimited']){ | |
| 1023 | + b_item.goods_num=good['viplimited']; | |
| 1024 | + } | |
| 1025 | + | |
| 1026 | + } | |
| 1027 | + | |
| 1028 | + //-- 判断活动的库存 -- | |
| 1029 | + if(prom){ | |
| 1030 | + if(prom['goods_num']<=prom['buy_num']){ | |
| 1031 | + err_text+= good['goods_name']+"超出活动库存\n";continue; | |
| 1032 | + } | |
| 1033 | + | |
| 1034 | + if(b_item.goods_num>prom['goods_num']-prom['buy_num']){ | |
| 1035 | + b_item['goods_num']= b_item['goods_num']-b_item['buy_num']; | |
| 1036 | + } | |
| 1037 | + | |
| 1038 | + if(b_item.goods_num>redis_num){ | |
| 1039 | + b_item.goods_num=redis_num; | |
| 1040 | + } | |
| 1041 | + | |
| 1042 | + if(cart_num+buynum>prom['buy_limit']){ | |
| 1043 | + err_text+= good['goods_name']+"超出活动限购\n";continue; | |
| 1044 | + } | |
| 1045 | + prom['buy_limit'] -= (cart_num+buynum); | |
| 1046 | + if(b_item.goods_num>prom['buy_limit']){ | |
| 1047 | + b_item.goods_num=prom['buy_limit']; | |
| 1048 | + } | |
| 1049 | + | |
| 1050 | + } | |
| 1051 | + back_goods_arr.push(b_item); //返回商品元素 | |
| 1052 | + } | |
| 1053 | + } | |
| 1054 | + | |
| 1055 | + //有重新购买的数据是时候,就要重新生成订单 | |
| 1056 | + if(back_goods_arr.length>0){ | |
| 1057 | + th.setData({back_goods_arr:back_goods_arr}); | |
| 1058 | + if(!err_text){ | |
| 1059 | + th.more_add_cart(); | |
| 1060 | + }else{ | |
| 1061 | + // 如果没有获取用户信息 | |
| 1062 | + wx.showModal({ | |
| 1063 | + title:'确定', | |
| 1064 | + content: err_text+',确定要买其他商品码?', | |
| 1065 | + success(res) { | |
| 1066 | + if (res.confirm) { | |
| 1067 | + //跳转到登录页 | |
| 1068 | + th.more_add_cart(); | |
| 1069 | + } | |
| 1070 | + } | |
| 1071 | + }); | |
| 1072 | + | |
| 1073 | + } | |
| 1074 | + }else{ | |
| 1075 | + getApp().confirmBox(err_text); | |
| 1076 | + } | |
| 1077 | + }, | |
| 1078 | + | |
| 1079 | + more_add_cart:async function(){ | |
| 1080 | + var back_goods_arr=this.data.back_goods_arr; | |
| 1081 | + var err_text=""; | |
| 1082 | + var ok_num=0; | |
| 1083 | + | |
| 1084 | + for(var i in back_goods_arr){ | |
| 1085 | + //商品ID | |
| 1086 | + var g_item=back_goods_arr[i]; | |
| 1087 | + var newd = { | |
| 1088 | + goods_id: g_item.goods_id, | |
| 1089 | + goods_num: g_item.goods_num, | |
| 1090 | + pick_id: g_item.pickup_id, | |
| 1091 | + user_id: oo.user_id, | |
| 1092 | + store_id: os.stoid, | |
| 1093 | + goods_price: g_item.price, | |
| 1094 | + member_goods_price: g_item.price, | |
| 1095 | + goods_name: g_item.goods_name, | |
| 1096 | + goods_sn: g_item.goods_sn, | |
| 1097 | + sku: g_item.sku, | |
| 1098 | + }; | |
| 1099 | + | |
| 1100 | + if(g_item.guide_id){ | |
| 1101 | + newd['guide_id']=g_item.guide_id; | |
| 1102 | + newd['guide_type']=g_item.guide_type; | |
| 1103 | + } | |
| 1104 | + | |
| 1105 | + var b_cart_goods=null; | |
| 1106 | + await getApp().request.promiseGet("/api/weshop/cart/page", { | |
| 1107 | + data: { | |
| 1108 | + store_id: os.stoid, | |
| 1109 | + user_id: oo.user_id, | |
| 1110 | + goods_id: g_item.goods_id, | |
| 1111 | + pick_id: g_item.pickup_id, | |
| 1112 | + }, | |
| 1113 | + }).then(res=>{ | |
| 1114 | + //-------如果购物车中有相关的数据------- | |
| 1115 | + if (res.data.data.total > 0) { | |
| 1116 | + b_cart_goods= res.data.data.pageData[0]; | |
| 1117 | + } | |
| 1118 | + }) | |
| 1119 | + | |
| 1120 | + //-- 如果就加入过购物车 -- | |
| 1121 | + if(b_cart_goods){ | |
| 1122 | + var updata = { | |
| 1123 | + id: b_cart_goods.id, | |
| 1124 | + goods_num: newd.goods_num + b_cart_goods.goods_num, | |
| 1125 | + goods_price: newd.goods_price, | |
| 1126 | + member_goods_price:newd.goods_price, | |
| 1127 | + store_id: os.stoid, | |
| 1128 | + }; | |
| 1129 | + if(newd.guide_id){ | |
| 1130 | + updata.guide_id=newd.guide_id; | |
| 1131 | + updata.guide_type=newd.guide_type; | |
| 1132 | + } | |
| 1133 | + await getApp().request.promisePut("/api/weshop/cart/update", { | |
| 1134 | + data: updata | |
| 1135 | + }).then(res=>{ | |
| 1136 | + if(res.data.code==0) { | |
| 1137 | + ok_num++; | |
| 1138 | + }else{ | |
| 1139 | + err_text+=newd.goods_name+"加入购物车失败\n"; | |
| 1140 | + } | |
| 1141 | + }) | |
| 1142 | + | |
| 1143 | + }else{ | |
| 1144 | + await getApp().request.promisePost("/api/weshop/cart/save", { | |
| 1145 | + data: newd | |
| 1146 | + }).then(res=>{ | |
| 1147 | + if(res.data.code==0) { | |
| 1148 | + ok_num++; | |
| 1149 | + }else{ | |
| 1150 | + err_text+=newd.goods_name+"加入购物车失败\n"; | |
| 1151 | + } | |
| 1152 | + }) | |
| 1153 | + } | |
| 1154 | + } | |
| 1155 | + | |
| 1156 | + if(ok_num==0){ | |
| 1157 | + //-- 如果没有获取用户信息 -- | |
| 1158 | + wx.showModal({ | |
| 1159 | + title:'提示', | |
| 1160 | + content: err_text, | |
| 1161 | + success(res) {} | |
| 1162 | + }); | |
| 1163 | + }else{ | |
| 1164 | + if(err_text==""){ | |
| 1165 | + getApp().goto("/pages/cart/cart/cart"); | |
| 1166 | + }else{ | |
| 1167 | + // 如果没有获取用户信息 | |
| 1168 | + wx.showModal({ | |
| 1169 | + title:'提示', | |
| 1170 | + content: err_text, | |
| 1171 | + success(res) { | |
| 1172 | + if (res.confirm) { | |
| 1173 | + //跳转到登录页 | |
| 1174 | + getApp().goto("/pages/cart/cart/cart"); | |
| 1175 | + } | |
| 1176 | + } | |
| 1177 | + }); | |
| 1178 | + | |
| 1179 | + } | |
| 1180 | + | |
| 1181 | + } | |
| 749 | 1182 | } |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 750 | 1187 | }); |
| 751 | 1188 | \ No newline at end of file | ... | ... |
pages/user/order_list/order_list.wxml
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 | <view class="goods-total flex"> |
| 100 | 100 | <block wx:if="{{item.pt_status==4 || item.pt_status==5}}"> |
| 101 | 101 | <view class="commodity_money flex baseline"> |
| 102 | - <view>合计:</view> | |
| 102 | + <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view> | |
| 103 | 103 | <view class="fs24 xc-wc">¥</view> |
| 104 | 104 | <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money+item.pt_tail_money,2)}} |
| 105 | 105 | </view> |
| ... | ... | @@ -108,13 +108,13 @@ |
| 108 | 108 | </block> |
| 109 | 109 | <block wx:else> |
| 110 | 110 | <view wx:if="{{item.is_zsorder==4}}" class="commodity_money flex baseline"> |
| 111 | - <view>定金:</view> | |
| 111 | + <view>定金<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view> | |
| 112 | 112 | <view class="fs24 xc-wc">¥</view> |
| 113 | 113 | <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} |
| 114 | 114 | </view> |
| 115 | 115 | </view> |
| 116 | 116 | <view class="commodity_money flex baseline" wx:else> |
| 117 | - <view>合计:</view> | |
| 117 | + <view>合计<text wx:if="{{item.discount!=underdefine && item.discount!=null && item.discount!=0}}" style="color:#d60021;">(改)</text>:</view> | |
| 118 | 118 | <view class="fs24 xc-wc">¥</view> |
| 119 | 119 | <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} |
| 120 | 120 | <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> |
| ... | ... | @@ -155,7 +155,12 @@ |
| 155 | 155 | <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">确认收货</view> |
| 156 | 156 | <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="commodity_To_evaluate flex-level comment_go" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==2)}}">确认收货</view> |
| 157 | 157 | </block> |
| 158 | - | |
| 158 | + | |
| 159 | + <block wx:if="{{item.pay_status==1 || item.order_status==3 }}"> | |
| 160 | + <view bindtap="moreOrder" class="commodity_To_evaluate flex-level comment_go" style="background-color: #feca53;" | |
| 161 | + data-index="{{index}}" >再来一单</view> | |
| 162 | + </block> | |
| 163 | + | |
| 159 | 164 | <block wx:if="{{item.order_status==2 && item.is_zsorder!=4}}"> |
| 160 | 165 | <navigator wx:if="{{item.order_goods.length>1}}" class="order-btn white red-b" |
| 161 | 166 | url="/pages/user/comment/comment?status=0&order_id={{item.order_id}}">评价</navigator> | ... | ... |
pages/user/plus/plus.js
| ... | ... | @@ -62,7 +62,7 @@ Page({ |
| 62 | 62 | //--先判断会员状态-- |
| 63 | 63 | var user_info = getApp().globalData.userInfo; |
| 64 | 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, }) | |
| 65 | + wx.navigateTo({ url: '/pages/togoin/togoin?first_leader=' + fir_leader, }) | |
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | 68 | //-----------商家配置信息----- 等级卡规则,是否又开邀请码,营业员------------ |
| ... | ... | @@ -319,8 +319,17 @@ Page({ |
| 319 | 319 | |
| 320 | 320 | //--支付成功,跳转到等级卡续费页面-- |
| 321 | 321 | success:function () { |
| 322 | - var u_url = "/pages/user/cardinfo/cardinfo"; | |
| 323 | - wx.reLaunch({url: u_url}) | |
| 322 | + | |
| 323 | + if(getApp().globalData.plus_buy_back){ | |
| 324 | + getApp().globalData.plus_buy_back=0; | |
| 325 | + getApp().globalData.is_card_back=1; | |
| 326 | + //返回购物车购买 | |
| 327 | + wx.navigateBack(); | |
| 328 | + }else{ | |
| 329 | + var u_url = "/pages/user/cardinfo/cardinfo"; | |
| 330 | + wx.reLaunch({url: u_url}) | |
| 331 | + } | |
| 332 | + | |
| 324 | 333 | }, |
| 325 | 334 | |
| 326 | 335 | //--绑定邀请码的输入-- |
| ... | ... | @@ -370,7 +379,7 @@ Page({ |
| 370 | 379 | //--先判断会员状态-- |
| 371 | 380 | var user_info = getApp().globalData.userInfo; |
| 372 | 381 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { |
| 373 | - wx.navigateTo({ url: '/pages/getphone/getphone?first_leader=' + fir_leader, }) | |
| 382 | + wx.navigateTo({ url: '/pages/togoin/togoin?first_leader=' + fir_leader, }) | |
| 374 | 383 | return false; |
| 375 | 384 | } |
| 376 | 385 | } | ... | ... |
pages/user/userinfo/userinfo.js
utils/auth.js
| ... | ... | @@ -207,47 +207,10 @@ module.exports = { |
| 207 | 207 | //获取本地存储 |
| 208 | 208 | var a = wx.getStorageSync("wx_user_info"); |
| 209 | 209 | var userInfo = a.userInfo; |
| 210 | - if (userInfo==undefined){ //判断本地是数据是否正确 | |
| 211 | - wx.getUserInfo({ | |
| 212 | - success: function (res) | |
| 213 | - { | |
| 214 | - console.log('doGetWxUser'); | |
| 215 | - console.log(res); | |
| 216 | - console.log(ind); | |
| 217 | - //组装用户 | |
| 218 | - var ar = {'nickName':res.userInfo.nickName, | |
| 219 | - 'avatarUrl':res.userInfo.avatarUrl, | |
| 220 | - 'gender': res.userInfo.gender}; | |
| 221 | - //----会员记录到全局------ | |
| 222 | - n.globalData.getu = ar; | |
| 223 | - var uu = {'userInfo': ar}; | |
| 224 | - a=uu; | |
| 225 | - | |
| 226 | - if(ind==1){ | |
| 227 | - a && void 0 != a ? (n.globalData.wechatUser = a, o.login_fir(t, a, e)) : o.goGetUserInfo(); | |
| 228 | - }else{ | |
| 229 | - a && void 0 != a ? (n.globalData.wechatUser = a, o.login(t, a, e)) : o.goGetUserInfo(); | |
| 230 | - } | |
| 231 | - | |
| 232 | - }, | |
| 233 | - | |
| 234 | - fail: function () { | |
| 235 | - //---获取用户信息失败后。请跳转授权页面-- | |
| 236 | - wx.showModal({ | |
| 237 | - title: '警告', | |
| 238 | - content: '尚未进行授权,请点击确定跳转到授权页面进行授权。', | |
| 239 | - success: function (res) { | |
| 240 | - if (res.confirm) { | |
| 241 | - console.log('用户点击确定') | |
| 242 | - wx.navigateTo({ | |
| 243 | - url: '/pages/togoin/togoin', | |
| 244 | - }) | |
| 245 | - } | |
| 246 | - } | |
| 247 | - }) | |
| 248 | - } | |
| 249 | - | |
| 250 | - }) | |
| 210 | + if (userInfo==undefined){ | |
| 211 | + //判断本地是数据是否正确 | |
| 212 | + n.goto("/pages/togoin/togoin"); | |
| 213 | + | |
| 251 | 214 | }else{ |
| 252 | 215 | a && void 0 != a ? (n.globalData.wechatUser = a, o.login(t, a, e)) : o.goGetUserInfo(); |
| 253 | 216 | } | ... | ... |
utils/request.js
| ... | ... | @@ -232,6 +232,27 @@ module.exports = { |
| 232 | 232 | }) |
| 233 | 233 | }) |
| 234 | 234 | }, |
| 235 | + | |
| 236 | + | |
| 237 | + //---promise的使用delete---- | |
| 238 | + promisePut:function(url,data){ | |
| 239 | + var th=this; | |
| 240 | + if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url; | |
| 241 | + return new Promise((resolve, reject) => { | |
| 242 | + data.isShowLoading && th.showLoading(); | |
| 243 | + wx.request({ | |
| 244 | + url, | |
| 245 | + method: 'PUT', | |
| 246 | + header: {"content-type": "application/x-www-form-urlencoded" }, | |
| 247 | + data:data.data, | |
| 248 | + success(res) { | |
| 249 | + data.isShowLoading && th.hideLoading(); | |
| 250 | + resolve(res); | |
| 251 | + }, | |
| 252 | + fail(err) { data.isShowLoading && th.hideLoading(); reject(err); } | |
| 253 | + }) | |
| 254 | + }) | |
| 255 | + }, | |
| 235 | 256 | |
| 236 | 257 | //--------具有时间限制的读取接口---------- |
| 237 | 258 | time_limit_get(time,url,data){ | ... | ... |
utils/util.js
| ... | ... | @@ -410,6 +410,60 @@ function ob_to_parm(ob){ |
| 410 | 410 | return parm; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | +function encodeUTF8(s) { | |
| 414 | + var i, r = [], c, x; | |
| 415 | + for (i = 0; i < s.length; i++) | |
| 416 | + if ((c = s.charCodeAt(i)) < 0x80) r.push(c); | |
| 417 | + else if (c < 0x800) r.push(0xC0 + (c >> 6 & 0x1F), 0x80 + (c & 0x3F)); | |
| 418 | + else { | |
| 419 | + if ((x = c ^ 0xD800) >> 10 == 0) //对四字节UTF-16转换为Unicode | |
| 420 | + c = (x << 10) + (s.charCodeAt(++i) ^ 0xDC00) + 0x10000, | |
| 421 | + r.push(0xF0 + (c >> 18 & 0x7), 0x80 + (c >> 12 & 0x3F)); | |
| 422 | + else r.push(0xE0 + (c >> 12 & 0xF)); | |
| 423 | + r.push(0x80 + (c >> 6 & 0x3F), 0x80 + (c & 0x3F)); | |
| 424 | + }; | |
| 425 | + return r; | |
| 426 | +}; | |
| 427 | +// 字符串加密成 hex 字符串 | |
| 428 | +function sha1(s) { | |
| 429 | + var data = new Uint8Array(encodeUTF8(s)) | |
| 430 | + var i, j, t; | |
| 431 | + var l = ((data.length + 8) >>> 6 << 4) + 16, s = new Uint8Array(l << 2); | |
| 432 | + s.set(new Uint8Array(data.buffer)), s = new Uint32Array(s.buffer); | |
| 433 | + for (t = new DataView(s.buffer), i = 0; i < l; i++)s[i] = t.getUint32(i << 2); | |
| 434 | + s[data.length >> 2] |= 0x80 << (24 - (data.length & 3) * 8); | |
| 435 | + s[l - 1] = data.length << 3; | |
| 436 | + var w = [], f = [ | |
| 437 | + function () { return m[1] & m[2] | ~m[1] & m[3]; }, | |
| 438 | + function () { return m[1] ^ m[2] ^ m[3]; }, | |
| 439 | + function () { return m[1] & m[2] | m[1] & m[3] | m[2] & m[3]; }, | |
| 440 | + function () { return m[1] ^ m[2] ^ m[3]; } | |
| 441 | + ], rol = function (n, c) { return n << c | n >>> (32 - c); }, | |
| 442 | + k = [1518500249, 1859775393, -1894007588, -899497514], | |
| 443 | + m = [1732584193, -271733879, null, null, -1009589776]; | |
| 444 | + m[2] = ~m[0], m[3] = ~m[1]; | |
| 445 | + for (i = 0; i < s.length; i += 16) { | |
| 446 | + var o = m.slice(0); | |
| 447 | + for (j = 0; j < 80; j++) | |
| 448 | + w[j] = j < 16 ? s[i + j] : rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1), | |
| 449 | + t = rol(m[0], 5) + f[j / 20 | 0]() + m[4] + w[j] + k[j / 20 | 0] | 0, | |
| 450 | + m[1] = rol(m[1], 30), m.pop(), m.unshift(t); | |
| 451 | + for (j = 0; j < 5; j++)m[j] = m[j] + o[j] | 0; | |
| 452 | + }; | |
| 453 | + t = new DataView(new Uint32Array(m).buffer); | |
| 454 | + for (var i = 0; i < 5; i++)m[i] = t.getUint32(i << 2); | |
| 455 | + | |
| 456 | + var hex = Array.prototype.map.call(new Uint8Array(new Uint32Array(m).buffer), function (e) { | |
| 457 | + return (e < 16 ? "0" : "") + e.toString(16); | |
| 458 | + }).join(""); | |
| 459 | + | |
| 460 | + return hex; | |
| 461 | +}; | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 413 | 467 | module.exports = { |
| 414 | 468 | formatTime: function(e, r) { |
| 415 | 469 | var t = e ? new Date(1e3 * e) : new Date(), n = t.getFullYear(), o = t.getMonth() + 1, a = t.getDate(), u = t.getHours(), i = t.getMinutes(), f = t.getSeconds(), s = function(e) { |
| ... | ... | @@ -515,5 +569,6 @@ module.exports = { |
| 515 | 569 | mergeArray:mergeArray, //数组合并 |
| 516 | 570 | isContained:isContained, //是否包含 |
| 517 | 571 | base64_encode:base64_encode, //64位加密 |
| 518 | - ob_to_parm:ob_to_parm //对象变成参数 | |
| 572 | + ob_to_parm:ob_to_parm ,//对象变成参数 | |
| 573 | + sha1:sha1, //sha1进行签名 | |
| 519 | 574 | }; | ... | ... |