Commit 1af8561d446aabdbdc35347be47d621d7264adbc
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
7 changed files
with
192 additions
and
31 deletions
app.wxss
| ... | ... | @@ -4,6 +4,9 @@ | 
| 4 | 4 | .pdt4 { | 
| 5 | 5 | padding-top: 4rpx; | 
| 6 | 6 | } | 
| 7 | +.pdt6 { | |
| 8 | + padding-top: 6rpx; | |
| 9 | +} | |
| 7 | 10 | .pd10 { | 
| 8 | 11 | padding: 10rpx; | 
| 9 | 12 | } | 
| ... | ... | @@ -712,9 +715,9 @@ background: #ffe3e2; | 
| 712 | 715 | /* 图标字体(ty) */ | 
| 713 | 716 | @font-face { | 
| 714 | 717 | font-family: 'iconfont'; /* Project id 2054717 */ | 
| 715 | - src: url('//at.alicdn.com/t/font_2054717_5ibgy0a15gm.woff2?t=1635479077648') format('woff2'), | |
| 716 | - url('//at.alicdn.com/t/font_2054717_5ibgy0a15gm.woff?t=1635479077648') format('woff'), | |
| 717 | - url('//at.alicdn.com/t/font_2054717_5ibgy0a15gm.ttf?t=1635479077648') format('truetype'); | |
| 718 | + src: url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff2?t=1635844276600') format('woff2'), | |
| 719 | + url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff?t=1635844276600') format('woff'), | |
| 720 | + url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.ttf?t=1635844276600') format('truetype'); | |
| 718 | 721 | } | 
| 719 | 722 | |
| 720 | 723 | .iconfont { | 
| ... | ... | @@ -725,6 +728,10 @@ background: #ffe3e2; | 
| 725 | 728 | -moz-osx-font-smoothing: grayscale; | 
| 726 | 729 | } | 
| 727 | 730 | |
| 731 | +.icon-luck:before { | |
| 732 | + content: "\e621"; | |
| 733 | +} | |
| 734 | + | |
| 728 | 735 | .icon-shizhong:before { | 
| 729 | 736 | content: "\e74f"; | 
| 730 | 737 | } | ... | ... | 
pages/cart/cart/cart.js
| ... | ... | @@ -155,6 +155,7 @@ Page({ | 
| 155 | 155 | }, | 
| 156 | 156 | //-------------获取购物车列表,要安装门店进行分类订单----------- | 
| 157 | 157 | getCardList: function() { | 
| 158 | + | |
| 158 | 159 | var th = this; | 
| 159 | 160 | |
| 160 | 161 | //要获取会员是不是等级会员 | 
| ... | ... | @@ -190,6 +191,7 @@ Page({ | 
| 190 | 191 | th.get_cart(); | 
| 191 | 192 | th.get_ser_cart(); | 
| 192 | 193 | } | 
| 194 | + | |
| 193 | 195 | |
| 194 | 196 | } | 
| 195 | 197 | }) | 
| ... | ... | @@ -219,6 +221,7 @@ Page({ | 
| 219 | 221 | state:0 | 
| 220 | 222 | }, | 
| 221 | 223 | success:async function(su) { | 
| 224 | + console.log(su,10000); | |
| 222 | 225 | //按门店分类的数组 | 
| 223 | 226 | var arr = new Array(), | 
| 224 | 227 | carr = su.data.data.pageData; | 
| ... | ... | @@ -385,9 +388,11 @@ Page({ | 
| 385 | 388 | if(!th.data.zuhe_map[item.prom_id]){ | 
| 386 | 389 | //如果有组合购 | 
| 387 | 390 | var isok = 1; | 
| 391 | + var is_flag=1; | |
| 388 | 392 | var act=null; | 
| 389 | 393 | var url="/api/weshop/prom/zhbuy/get/"+os.stoid+"/"+item.prom_id+"/"+getApp().globalData.userInfo.user_id; | 
| 390 | 394 | await getApp().request.promiseGet(url, {}).then(res => { | 
| 395 | + console.log(res,1000); | |
| 391 | 396 | if(res.data.code==0 && res.data.data){ | 
| 392 | 397 | if(res.data.data.is_show!=1){ | 
| 393 | 398 | isok=0; | 
| ... | ... | @@ -405,12 +410,11 @@ Page({ | 
| 405 | 410 | isok=0; | 
| 406 | 411 | } | 
| 407 | 412 | act=res.data.data; | 
| 408 | - | |
| 413 | + | |
| 409 | 414 | }else{ | 
| 410 | - //未找到商品的活动 | |
| 411 | - isok = 0; | |
| 412 | - } | |
| 413 | - | |
| 415 | + //未找到商品的活动 | |
| 416 | + is_flag = 0; | |
| 417 | + } | |
| 414 | 418 | }) | 
| 415 | 419 | if (!isok){ | 
| 416 | 420 | var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | 
| ... | ... | @@ -419,7 +423,6 @@ Page({ | 
| 419 | 423 | continue; | 
| 420 | 424 | } | 
| 421 | 425 | th.data.zuhe_map[item.prom_id]=act; | 
| 422 | - | |
| 423 | 426 | var url1 = "/api/weshop/prom/zhbuyGoods/page"; | 
| 424 | 427 | var req_data = { | 
| 425 | 428 | page: 1, | 
| ... | ... | @@ -430,8 +433,17 @@ Page({ | 
| 430 | 433 | await getApp().request.promiseGet(url1, { | 
| 431 | 434 | data: req_data | 
| 432 | 435 | }).then(res => { | 
| 436 | + console.log(res,2000); | |
| 433 | 437 | if (ut.ajax_ok(res)) { | 
| 434 | 438 | var gdlist = res.data.data.pageData; | 
| 439 | + gdlist.forEach(i=>{ | |
| 440 | + if(item.goods_id==i.goods_id&&!is_flag){ | |
| 441 | + item.prom_type=0; | |
| 442 | + item.prom_type1=0; | |
| 443 | + item.prom_id=0; | |
| 444 | + item.prom_id1=0 | |
| 445 | + } | |
| 446 | + }) | |
| 435 | 447 | th.data.zuhe_map_good[item.prom_id]=gdlist; | 
| 436 | 448 | } | 
| 437 | 449 | }) | 
| ... | ... | @@ -451,12 +463,12 @@ Page({ | 
| 451 | 463 | item.buyqty=t_item.buyqty; | 
| 452 | 464 | item.zh_b_num=promgoodsbuynum; | 
| 453 | 465 | item.act=th.data.zuhe_map[item.prom_id]; | 
| 454 | - }else{ | |
| 455 | - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | |
| 456 | - getApp().request.delete(url, {}); | |
| 457 | - th.data.zuhe_map[item.prom_id]=-1; | |
| 458 | - continue; | |
| 459 | - } | |
| 466 | + }//else{ | |
| 467 | + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id; | |
| 468 | + // getApp().request.delete(url, {}); | |
| 469 | + // th.data.zuhe_map[item.prom_id]=-1; | |
| 470 | + // continue; | |
| 471 | + // } | |
| 460 | 472 | } | 
| 461 | 473 | else if(item.prom_type == 0) { | 
| 462 | 474 | //如果有优惠活动,要更新活动 | 
| ... | ... | @@ -563,7 +575,9 @@ Page({ | 
| 563 | 575 | } | 
| 564 | 576 | } | 
| 565 | 577 | |
| 566 | - | |
| 578 | + // console.log('AAAAAAAAAAAA', all_num); | |
| 579 | + // getApp().globalData.cartGoodsNum = all_num; | |
| 580 | + | |
| 567 | 581 | th.setData({ | 
| 568 | 582 | requestData: arr, | 
| 569 | 583 | all_num: all_num, | 
| ... | ... | @@ -662,7 +676,7 @@ Page({ | 
| 662 | 676 | } | 
| 663 | 677 | } | 
| 664 | 678 | |
| 665 | - | |
| 679 | + // console.log('BBBBBB', all_num); | |
| 666 | 680 | th.setData({ | 
| 667 | 681 | service_data: arr, | 
| 668 | 682 | all_num2: all_num, | 
| ... | ... | @@ -773,7 +787,8 @@ Page({ | 
| 773 | 787 | var a = t.currentTarget.dataset.item; | 
| 774 | 788 | var b = t.currentTarget.dataset.pitems; | 
| 775 | 789 | a = this.data.requestData[b].goods[a]; | 
| 776 | - | |
| 790 | + | |
| 791 | + console.log('add+'); | |
| 777 | 792 | if (a.goods_num<a.store_count) { | 
| 778 | 793 | var e = { | 
| 779 | 794 | goods_num: a.goods_num + 1, | 
| ... | ... | @@ -781,6 +796,7 @@ Page({ | 
| 781 | 796 | goods_id: a.goods_id, | 
| 782 | 797 | store_id: oo.stoid | 
| 783 | 798 | }; | 
| 799 | + // console.log('goods_num', e.goods_num); | |
| 784 | 800 | this.postCardList(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems); | 
| 785 | 801 | } else { | 
| 786 | 802 | wx.showModal({ | 
| ... | ... | @@ -859,7 +875,7 @@ Page({ | 
| 859 | 875 | goods_id: a.goods_id, | 
| 860 | 876 | store_id: oo.stoid | 
| 861 | 877 | }; | 
| 862 | - this.postCardList_ser(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems); | |
| 878 | + // this.postCardList_ser(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems); | |
| 863 | 879 | |
| 864 | 880 | }, | 
| 865 | 881 | //-------------减数量--------------------- | 
| ... | ... | @@ -1393,6 +1409,9 @@ Page({ | 
| 1393 | 1409 | }); | 
| 1394 | 1410 | } | 
| 1395 | 1411 | } | 
| 1412 | + | |
| 1413 | + // getApp().globalData.cartGoodsNum = all_num; | |
| 1414 | + // console.log('CCCCCCC', all_num, getApp().globalData.cartGoodsNum); | |
| 1396 | 1415 | |
| 1397 | 1416 | this.setData({ | 
| 1398 | 1417 | checkAllToggle: ischeck, | 
| ... | ... | @@ -1407,14 +1426,14 @@ Page({ | 
| 1407 | 1426 | |
| 1408 | 1427 | var e = this,th=e; | 
| 1409 | 1428 | var user_id = getApp().globalData.user_id; | 
| 1410 | - console.log('update'); | |
| 1411 | - console.log(t); | |
| 1429 | + // console.log('update'); | |
| 1430 | + // console.log('9995959595959',t); | |
| 1412 | 1431 | rq.get("/api/weshop/goods/get/" + oo.stoid + "/" + t.goods_id, { | 
| 1413 | 1432 | isShowLoading: 0, | 
| 1414 | 1433 | async success(d) { | 
| 1415 | 1434 | var limit = d.data.data.viplimited; | 
| 1416 | 1435 | var store_count = d.data.data.store_count; | 
| 1417 | - var wareIds=d.data.data.erpwareid; | |
| 1436 | + var wareIds = d.data.data.erpwareid; | |
| 1418 | 1437 | |
| 1419 | 1438 | var goodsinfo = e.data.requestData[pitem].goods[item]; | 
| 1420 | 1439 | var promgoodsbuynum = 0; | 
| ... | ... | @@ -1437,8 +1456,12 @@ Page({ | 
| 1437 | 1456 | th.setData({[txt]:promgoodsbuynum}); | 
| 1438 | 1457 | } | 
| 1439 | 1458 | goodsbuynum = buy_num_data.goodsbuynum; | 
| 1459 | + | |
| 1460 | + | |
| 1461 | + // console.log('goodsbuynum===========', goodsbuynum); | |
| 1440 | 1462 | }) | 
| 1441 | 1463 | |
| 1464 | + | |
| 1442 | 1465 | |
| 1443 | 1466 | var buyed_mum2 = t.goods_num + goodsbuynum; | 
| 1444 | 1467 | if (buyed_mum2 > limit && limit > 0) { | 
| ... | ... | @@ -2094,7 +2117,11 @@ Page({ | 
| 2094 | 2117 | var url = '/api/weshop/cart/delIds/' + oo.stoid + '/' + user_id + "/" + glist; | 
| 2095 | 2118 | getApp().request.delete(url, { | 
| 2096 | 2119 | success: function(t) { | 
| 2120 | + // console.log('del done1111111111'); | |
| 2097 | 2121 | th.getCardList(); | 
| 2122 | + getApp().requestCardNum(th); | |
| 2123 | + // console.log('all================', th.data.all_num); | |
| 2124 | + // getApp().globalData.cartGoodsNum = | |
| 2098 | 2125 | } | 
| 2099 | 2126 | }); | 
| 2100 | 2127 | } | 
| ... | ... | @@ -2105,10 +2132,12 @@ Page({ | 
| 2105 | 2132 | getApp().request.delete(url, { | 
| 2106 | 2133 | success: function(t) { | 
| 2107 | 2134 | th.getCardList(); | 
| 2135 | + getApp().requestCardNum(th); | |
| 2136 | + console.log('all2================', th.data.all_num); | |
| 2108 | 2137 | } | 
| 2109 | 2138 | }); | 
| 2110 | 2139 | } | 
| 2111 | - | |
| 2140 | + | |
| 2112 | 2141 | }, | 
| 2113 | 2142 | //跳到首页 | 
| 2114 | 2143 | goto: function(e) { | ... | ... | 
pages/cart/cart2/cart2.js
pages/goods/categoryList/categoryList.js
| ... | ... | @@ -52,7 +52,7 @@ Page({ | 
| 52 | 52 | currentPage: 1, | 
| 53 | 53 | allData: null, | 
| 54 | 54 | openFilterModal: !1, | 
| 55 | - 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="+oo.stoid+"&is_recommend=1", | |
| 55 | + baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=sort&orderType=asc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1", | |
| 56 | 56 | requestUrl: "", | 
| 57 | 57 | tabname: "goods_id", //排序的字段 | 
| 58 | 58 | adname: "desc", //升降的字段 | 
| ... | ... | @@ -791,7 +791,7 @@ Page({ | 
| 791 | 791 | var that = this; | 
| 792 | 792 | that.data.requestUrl = t; | 
| 793 | 793 | e.get("/api/weshop/goods/page?1=1", { | 
| 794 | - 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 }, | |
| 794 | + data: { page: that.data.stylePage, cat_id: that.data.cat_id, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, | |
| 795 | 795 | success: function (data) { | 
| 796 | 796 | console.log(data.data.data.pageData) | 
| 797 | 797 | that.setData({ | 
| ... | ... | @@ -853,7 +853,7 @@ Page({ | 
| 853 | 853 | console.log("page:=" + page) | 
| 854 | 854 | var s = this | 
| 855 | 855 | e.get("/api/weshop/goods/page?1=1", { | 
| 856 | - 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 }, | |
| 856 | + data: { page: page, cat_id: cid, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 }, | |
| 857 | 857 | success: function (e) { | 
| 858 | 858 | console.log(e.data.data.pageData) | 
| 859 | 859 | s.setData({ | ... | ... | 
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -1399,7 +1399,7 @@ Page({ | 
| 1399 | 1399 | add_cart_next(e, t, a, o, newd, CanOutQty) { | 
| 1400 | 1400 | var th = this, i = getApp().request; | 
| 1401 | 1401 | //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------ | 
| 1402 | - if (o.prom_type != 1 && ((o.prom_type != 6 && o.prom_type != 4) || th.data.is_normal)) { | |
| 1402 | + if ((o.prom_type != 1 || o.prom_id<=0) && ((o.prom_type != 6 && o.prom_type != 4) || th.data.is_normal)) { | |
| 1403 | 1403 | var conf = th.data.bconfig; | 
| 1404 | 1404 | if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) { | 
| 1405 | 1405 | var s_list = JSON.parse(conf.switch_list); | ... | ... | 
pages/index/index/index.wxml
| ... | ... | @@ -215,7 +215,52 @@ | 
| 215 | 215 | </swiper-item> | 
| 216 | 216 | </swiper> | 
| 217 | 217 | </view> | 
| 218 | - </view> | |
| 218 | + </view> | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + <!--幸运购--> | |
| 223 | + <view class="seckill" wx:if="{{false}}"> | |
| 224 | + <navigator bindtap="go_pre" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none"> | |
| 225 | + <view class="seckill-time"> | |
| 226 | + <view class="classname flex ai_c"> | |
| 227 | + <i class="iconfont icon-luck"></i> | |
| 228 | + <text class="bold fs30">幸运购</text> | |
| 229 | + </view> | |
| 230 | + <view class="flex ai_c seckill-list"> | |
| 231 | + <text class="fs24 xc-marfin-right">查看全部</text> | |
| 232 | + <image class="arrow-right" src="{{url}}/miniapp/images/icon-arrowdown.png"></image> | |
| 233 | + </view> | |
| 234 | + </view> | |
| 235 | + </navigator> | |
| 236 | + <view class="seckill-list luck"> | |
| 237 | + <view class="list-item" wx:for="{{3}}"> | |
| 238 | + <view class="flex ai-center"> | |
| 239 | + <view class="img-container"><image class="img-block" src="../../../images/bk.png"></image></view> | |
| 240 | + <view class="pdl20 flex fdc jc_sb f1"> | |
| 241 | + | |
| 242 | + <view class="ellipsis-2 name fs28">我是商品</view> | |
| 243 | + <view> | |
| 244 | + <view class="flex ai-center"> | |
| 245 | + <text class="rmb c-red">189.00</text> | |
| 246 | + <view class="del fs22 c-a pdl10">零售价:<text class="rmb">155</text></view> | |
| 247 | + </view> | |
| 248 | + <view class="flex jc_sb"> | |
| 249 | + <progress class="pdr20 f1 progress" percent="50" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="1人已参团"></progress> | |
| 250 | + <view class="btn fs26">去参团</view> | |
| 251 | + </view> | |
| 252 | + </view> | |
| 253 | + | |
| 254 | + </view> | |
| 255 | + </view> | |
| 256 | + <view class="fs24 pdt10 c-7b">*<text class="c-red">5</text>人成团,<text class="c-red">5</text>人得商品,<text class="c-red">5</text>人全额退款并得<text class="c-red">惊喜礼品</text>!</view> | |
| 257 | + </view> | |
| 258 | + </view> | |
| 259 | + </view> | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 219 | 264 | |
| 220 | 265 | |
| 221 | 266 | ... | ... | 
pages/index/index/index.wxss
| ... | ... | @@ -2,7 +2,8 @@ | 
| 2 | 2 | background: #ff7295; | 
| 3 | 3 | } | 
| 4 | 4 | |
| 5 | -.icon-presell { | |
| 5 | +.icon-presell, | |
| 6 | +.icon-luck { | |
| 6 | 7 | color: #ED6064; | 
| 7 | 8 | font-size: 18px; | 
| 8 | 9 | margin-right: 4rpx; | 
| ... | ... | @@ -1115,3 +1116,82 @@ page { | 
| 1115 | 1116 | margin-right: 10rpx; | 
| 1116 | 1117 | } | 
| 1117 | 1118 | |
| 1119 | + | |
| 1120 | + | |
| 1121 | +/* .luck { | |
| 1122 | + padding-left: 20rpx; | |
| 1123 | + padding-right: 20rpx; | |
| 1124 | +} */ | |
| 1125 | + | |
| 1126 | +.luck .list-item { | |
| 1127 | + background-color: white; | |
| 1128 | + padding: 20rpx; | |
| 1129 | + border-radius: 12rpx; | |
| 1130 | +} | |
| 1131 | + | |
| 1132 | +.luck .img-container { | |
| 1133 | + width: 200rpx; | |
| 1134 | + height: 200rpx; | |
| 1135 | + border-radius: 14rpx; | |
| 1136 | + overflow: hidden; | |
| 1137 | + flex-shrink: 0; | |
| 1138 | + position: relative; | |
| 1139 | +} | |
| 1140 | + | |
| 1141 | +.luck .img-container::before { | |
| 1142 | + content: '幸运购'; | |
| 1143 | + position: absolute; | |
| 1144 | + left: 0; | |
| 1145 | + top: 0; | |
| 1146 | + padding: 4rpx; | |
| 1147 | + background-color: rgba(255,103,103,.7); | |
| 1148 | + color: white; | |
| 1149 | + font-size: 22rpx; | |
| 1150 | + border-radius: 0 0 14rpx 0; | |
| 1151 | +} | |
| 1152 | + | |
| 1153 | +.luck .name::before { | |
| 1154 | + content: '5人团'; | |
| 1155 | + background-color: #FF6768; | |
| 1156 | + color: white; | |
| 1157 | + font-size: 26rpx; | |
| 1158 | + padding-left: 10rpx; | |
| 1159 | + padding-right: 10rpx; | |
| 1160 | + border-radius: 20rpx; | |
| 1161 | + margin-right: 10rpx; | |
| 1162 | +} | |
| 1163 | + | |
| 1164 | +.rmb::before { | |
| 1165 | + content: '¥'; | |
| 1166 | + font-size: 24rpx; | |
| 1167 | +} | |
| 1168 | + | |
| 1169 | +.del { | |
| 1170 | + text-decoration: line-through; | |
| 1171 | +} | |
| 1172 | + | |
| 1173 | +.luck .btn { | |
| 1174 | + background-color: #FF6768; | |
| 1175 | + border-radius: 20rpx; | |
| 1176 | + padding-left:20rpx; | |
| 1177 | + padding-right: 20rpx; | |
| 1178 | + color: white; | |
| 1179 | +} | |
| 1180 | + | |
| 1181 | +.luck .name { | |
| 1182 | + height: 88rpx; | |
| 1183 | +} | |
| 1184 | + | |
| 1185 | + | |
| 1186 | +.luck .progress { | |
| 1187 | + position: relative; | |
| 1188 | +} | |
| 1189 | +.luck .progress::before { | |
| 1190 | + position: absolute; | |
| 1191 | + width: 100%; | |
| 1192 | + content: attr(data-content); | |
| 1193 | + font-size: 20rpx; | |
| 1194 | + color: white; | |
| 1195 | + text-align: center; | |
| 1196 | +} | |
| 1197 | + | ... | ... |