Commit 2c4389baba96c492bcf282f08615fe24f12e60db
Merge branch 'test' into 'qa'
Test See merge request !429
Showing
6 changed files
with
51 additions
and
11 deletions
pages/cart/cart/cart.js
| ... | ... | @@ -1137,10 +1137,10 @@ Page({ |
| 1137 | 1137 | map.set(item.prom_id+"",ob); |
| 1138 | 1138 | } |
| 1139 | 1139 | } |
| 1140 | - | |
| 1141 | 1140 | if(item.is_gift==1){ |
| 1142 | 1141 | var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; |
| 1143 | - getApp().request.delete(url, {}); | |
| 1142 | + //getApp().request.delete(url, {}); | |
| 1143 | + await getApp().request.promiseDelete(url, {}) // 要用同步让赠品删除 | |
| 1144 | 1144 | list.goods.splice(i,1); |
| 1145 | 1145 | } |
| 1146 | 1146 | } | ... | ... |
pages/cart/cart2/cart2.js
| ... | ... | @@ -747,7 +747,7 @@ Page({ |
| 747 | 747 | cart_item.shipping_price = 0; |
| 748 | 748 | |
| 749 | 749 | //--有不包邮区域,且不免运费,全场的计算-- |
| 750 | - if(no_ex_id && freight_free>0 && o_price>freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list) ){ | |
| 750 | + if(no_ex_id && freight_free>0 && o_price>=freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list) ){ | |
| 751 | 751 | //如果有设置不包邮区域的时候 |
| 752 | 752 | if(by_qc.region_list!="" && by_qc.region_list!=null && by_qc.region_list!=undefined ){ |
| 753 | 753 | if(th.check_by_area(by_qc.region_list)){ | ... | ... |
pages/goods/categoryList/categoryList.js
| ... | ... | @@ -47,14 +47,13 @@ Page({ |
| 47 | 47 | is_pl_time:0, |
| 48 | 48 | requestData:null, //风格三的商品数据列表 分页 |
| 49 | 49 | stylePage:1, //商品列表分页标识 |
| 50 | - | |
| 51 | 50 | //风格三使用 |
| 52 | 51 | url: t.globalData.setting.imghost, |
| 53 | 52 | currentPage: 1, |
| 54 | 53 | requestData: null, |
| 55 | 54 | allData: null, |
| 56 | 55 | openFilterModal: !1, |
| 57 | - baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=goods_id&orderType=desc&page=1&is_mainshow=1&isonsale=1&store_id=1&is_recommend=1", | |
| 56 | + baseUrl: "api/weshop/goods/page?1=1&orderField=goods_id&orderType=desc&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1", | |
| 58 | 57 | requestUrl: "", |
| 59 | 58 | tabname: "goods_id", //排序的字段 |
| 60 | 59 | adname: "desc", //升降的字段 |
| ... | ... | @@ -643,7 +642,7 @@ Page({ |
| 643 | 642 | var that = this; |
| 644 | 643 | that.data.requestUrl = t; |
| 645 | 644 | e.get("/api/weshop/goods/page?1=1", { |
| 646 | - data: { page: that.data.stylePage, cat_id: that.data.cat_id, parent_id: 0, orderField: 'goods_id', orderType: 'desc', is_mainshow: 1, isonsale: 1, store_id: 1, is_recommend: 1 }, | |
| 645 | + data: { page: that.data.stylePage, cat_id: that.data.cat_id, parent_id: 0, orderField: 'goods_id', orderType: 'desc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, | |
| 647 | 646 | success: function (data) { |
| 648 | 647 | console.log(data.data.data.pageData) |
| 649 | 648 | that.setData({ |
| ... | ... | @@ -705,7 +704,7 @@ Page({ |
| 705 | 704 | console.log("page:=" + page) |
| 706 | 705 | var s = this |
| 707 | 706 | e.get("/api/weshop/goods/page?1=1", { |
| 708 | - data: { page: page, cat_id: cid, parent_id: 0, orderField: 'goods_id', orderType: 'desc', is_mainshow: 1, isonsale: 1, store_id: 1, is_recommend: 1 }, | |
| 707 | + data: { page: page, cat_id: cid, parent_id: 0, orderField: 'goods_id', orderType: 'desc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, | |
| 709 | 708 | success: function (e) { |
| 710 | 709 | console.log(e.data.data.pageData) |
| 711 | 710 | s.setData({ |
| ... | ... | @@ -767,7 +766,7 @@ Page({ |
| 767 | 766 | requestData: [] |
| 768 | 767 | }); |
| 769 | 768 | s.setData({ |
| 770 | - timer: setInterval(function () { | |
| 769 | + timer:setInterval(function () { | |
| 771 | 770 | if (countDownNum == 0) { |
| 772 | 771 | clearInterval(s.data.timer); |
| 773 | 772 | //关闭定时器之后,可作其他处理 | ... | ... |
pages/user/index/index.js
| ... | ... | @@ -41,6 +41,7 @@ Page({ |
| 41 | 41 | actImg: "", |
| 42 | 42 | is_assistance: 0, //助力活动 |
| 43 | 43 | ad_img:"", |
| 44 | + isshow_vip:0, | |
| 44 | 45 | }, |
| 45 | 46 | goto_nav: function(e) { |
| 46 | 47 | var th = this; |
| ... | ... | @@ -78,6 +79,7 @@ Page({ |
| 78 | 79 | onShow: function() { |
| 79 | 80 | |
| 80 | 81 | this.is_assistance(); |
| 82 | + this.getPlusCardType(); | |
| 81 | 83 | |
| 82 | 84 | |
| 83 | 85 | var stoid = app_d.setting.stoid; |
| ... | ... | @@ -632,9 +634,23 @@ Page({ |
| 632 | 634 | |
| 633 | 635 | } |
| 634 | 636 | }) |
| 635 | - } | |
| 636 | - | |
| 637 | - | |
| 637 | + }, | |
| 638 | 638 | |
| 639 | + //--- 获取卡类列表 --- | |
| 640 | + getPlusCardType: function () { | |
| 641 | + var storid = os.stoid; | |
| 642 | + var th = this; | |
| 643 | + var isshow_vip=0; | |
| 644 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | |
| 645 | + if(res.data.code==0){ | |
| 646 | + for(var i in res.data.data){ | |
| 647 | + var item=res.data.data[i]; | |
| 648 | + //IsStopBuy 如果是真的话,代表这个卡没有停用 | |
| 649 | + if(item.IsStopBuy!=true){ isshow_vip=1;break; } | |
| 650 | + } | |
| 651 | + th.setData({isshow_vip:isshow_vip}) | |
| 652 | + } | |
| 653 | + }) | |
| 654 | + } | |
| 639 | 655 | |
| 640 | 656 | }) | ... | ... |
pages/user/index/index.wxml
| ... | ... | @@ -63,6 +63,9 @@ |
| 63 | 63 | </image> |
| 64 | 64 | |
| 65 | 65 | </view> |
| 66 | + | |
| 67 | + <block wx:if="{{isshow_vip}}"> | |
| 68 | + | |
| 66 | 69 | <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2}}"> |
| 67 | 70 | <view class="xc-add-member flex-center-around "> |
| 68 | 71 | <view class="flex jc-center ai-center"> |
| ... | ... | @@ -86,6 +89,7 @@ |
| 86 | 89 | </view> |
| 87 | 90 | </view> |
| 88 | 91 | </view> |
| 92 | + </block> | |
| 89 | 93 | |
| 90 | 94 | </view> |
| 91 | 95 | <view class="xc-after-sale rel"> | ... | ... |
utils/request.js
| ... | ... | @@ -206,6 +206,27 @@ module.exports = { |
| 206 | 206 | }) |
| 207 | 207 | }) |
| 208 | 208 | }, |
| 209 | + | |
| 210 | + //---promise的使用delete---- | |
| 211 | + promiseDelete:function(url,data){ | |
| 212 | + var th=this; | |
| 213 | + if(url.indexOf("http")==-1) url=getApp().globalData.setting.url +url; | |
| 214 | + return new Promise((resolve, reject) => { | |
| 215 | + data.isShowLoading && th.showLoading(); | |
| 216 | + wx.request({ | |
| 217 | + url, | |
| 218 | + method: 'DELETE', | |
| 219 | + header: {"content-type": "application/x-www-form-urlencoded" }, | |
| 220 | + data:data.data, | |
| 221 | + success(res) { | |
| 222 | + data.isShowLoading && th.hideLoading(); | |
| 223 | + resolve(res); | |
| 224 | + }, | |
| 225 | + fail(err) { data.isShowLoading && th.hideLoading(); reject(err); } | |
| 226 | + }) | |
| 227 | + }) | |
| 228 | + }, | |
| 229 | + | |
| 209 | 230 | //--------具有时间限制的读取接口---------- |
| 210 | 231 | time_limit_get(time,url,data){ |
| 211 | 232 | var req=this.get(url,data); | ... | ... |