Merged
Merge Request #773 · created by 后端研发-苏明海


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants

pages/cart/cart/cart.js
@@ -36,7 +36,8 @@ Page({ @@ -36,7 +36,8 @@ Page({
36 36
37 zhhe_prom:[], //组合活动需要显示差多少件 37 zhhe_prom:[], //组合活动需要显示差多少件
38 zuhe_map:{}, 38 zuhe_map:{},
39 - zuhe_map_good:{} 39 + zuhe_map_good:{},
  40 + in_zhact_gdmap:{}, //不同门店参与同一活动的限购
40 }, 41 },
41 onLoad: function() { 42 onLoad: function() {
42 var a = this,ee=a; 43 var a = this,ee=a;
@@ -59,6 +60,8 @@ Page({ @@ -59,6 +60,8 @@ Page({
59 60
60 }, 61 },
61 onShow: function() { 62 onShow: function() {
  63 + //每次显示都清空
  64 + this.data.in_zhact_gdmap={};
62 65
63 if (typeof this.getTabBar === 'function' && this.getTabBar()) { 66 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
64 var index=getApp().getPageIndex(this); 67 var index=getApp().getPageIndex(this);
@@ -199,6 +202,7 @@ Page({ @@ -199,6 +202,7 @@ Page({
199 //-----真的获取购物车-------- 202 //-----真的获取购物车--------
200 get_cart: function() { 203 get_cart: function() {
201 var th = this; 204 var th = this;
  205 + th.data.in_zhact_gdmap={};
202 var rd = Math.random().toString(36).substr(2, 15); 206 var rd = Math.random().toString(36).substr(2, 15);
203 var user_id=getApp().globalData.userInfo.user_id; 207 var user_id=getApp().globalData.userInfo.user_id;
204 getApp().request.get("/api/weshop/cart/list", { 208 getApp().request.get("/api/weshop/cart/list", {
@@ -884,6 +888,7 @@ Page({ @@ -884,6 +888,7 @@ Page({
884 888
885 var offline_price=0; 889 var offline_price=0;
886 var offline_num=0; 890 var offline_num=0;
  891 + th.data.in_zhact_gdmap={};
887 892
888 893
889 if(dda && dda.length>0){ 894 if(dda && dda.length>0){
@@ -902,7 +907,8 @@ Page({ @@ -902,7 +907,8 @@ Page({
902 907
903 var obj=JSON.parse(JSON.stringify(item[j])); 908 var obj=JSON.parse(JSON.stringify(item[j]));
904 //计算之前先移除 909 //计算之前先移除
905 - zh_calc.remove_zhprom(dda,i,obj); 910 + if(obj.prom_type==7)
  911 + zh_calc.remove_zhprom(dda,i,obj);
906 912
907 913
908 if (fir == 0) { 914 if (fir == 0) {
@@ -917,7 +923,8 @@ Page({ @@ -917,7 +923,8 @@ Page({
917 var txt = "requestData[" + i + "].goods[" + j + "].selected"; 923 var txt = "requestData[" + i + "].goods[" + j + "].selected";
918 924
919 if(e.data.checkAllToggle) obj.goods_num=0; 925 if(e.data.checkAllToggle) obj.goods_num=0;
920 - zh_calc.add_zhprom(dda,i,obj); 926 + if(obj.prom_type==7)
  927 + zh_calc.add_zhprom(dda,i,obj);
921 928
922 e.setData({ 929 e.setData({
923 [txt]: !e.data.checkAllToggle, 930 [txt]: !e.data.checkAllToggle,
@@ -1265,6 +1272,7 @@ Page({ @@ -1265,6 +1272,7 @@ Page({
1265 1272
1266 //-- 购物车 -- 1273 //-- 购物车 --
1267 if(car && car.length>0){ 1274 if(car && car.length>0){
  1275 + th.data.in_zhact_gdmap={};
1268 for (var a = 0; a < car.length; a++) { 1276 for (var a = 0; a < car.length; a++) {
1269 var item = car[a].goods, 1277 var item = car[a].goods,
1270 is_s_sele = 1; 1278 is_s_sele = 1;
@@ -1300,6 +1308,7 @@ Page({ @@ -1300,6 +1308,7 @@ Page({
1300 offline_num+=item[c].goods_num; 1308 offline_num+=item[c].goods_num;
1301 } 1309 }
1302 } 1310 }
  1311 +
1303 //总的价格,把组合商品的价格拿出来 1312 //总的价格,把组合商品的价格拿出来
1304 var zh_calc_res=zh_calc.calculate_zh(car,a,th); 1313 var zh_calc_res=zh_calc.calculate_zh(car,a,th);
1305 tfeel+=zh_calc_res.tfeel; 1314 tfeel+=zh_calc_res.tfeel;
pages/cart/cart/zh_calculate.js
@@ -130,7 +130,14 @@ module.exports = { @@ -130,7 +130,14 @@ module.exports = {
130 item.cart_num =cart_num; 130 item.cart_num =cart_num;
131 //-- 当商品有购买的时候,以及有限购的时候 -- 131 //-- 当商品有购买的时候,以及有限购的时候 --
132 if(item.buyqty>0){ 132 if(item.buyqty>0){
  133 +
  134 + console.log(111,th.data.in_zhact_gdmap);
  135 +
133 var cbuy=item.buyqty-zh_b_num; 136 var cbuy=item.buyqty-zh_b_num;
  137 + var key=item.goods_id+""+act.id;
  138 + if(th.data.in_zhact_gdmap[key]){
  139 + var cbuy=item.buyqty-zh_b_num-th.data.in_zhact_gdmap[key];
  140 + }
134 //当可买的数量为0 141 //当可买的数量为0
135 if(cbuy<=0){ 142 if(cbuy<=0){
136 item.num=0; 143 item.num=0;
@@ -158,7 +165,6 @@ module.exports = { @@ -158,7 +165,6 @@ module.exports = {
158 } 165 }
159 if (item.num) { 166 if (item.num) {
160 all_num += item.num; 167 all_num += item.num;
161 -  
162 //当有起购数的控制的时候 168 //当有起购数的控制的时候
163 if (item.zhqty) { 169 if (item.zhqty) {
164 all_zhqty += item.zhqty; 170 all_zhqty += item.zhqty;
@@ -189,6 +195,22 @@ module.exports = { @@ -189,6 +195,22 @@ module.exports = {
189 195
190 //当满足组合的要求:总数要满足,起购数要满足 196 //当满足组合的要求:总数要满足,起购数要满足
191 if (all_num >= act.zhbuyqty && !need_to_buy) { 197 if (all_num >= act.zhbuyqty && !need_to_buy) {
  198 + //商品的列表
  199 + for (var u in goods) {
  200 + var ite=goods[u];
  201 + if(ite.buyqty>0 && ite.num>0){
  202 +
  203 + console.log(222,th.data.in_zhact_gdmap);
  204 +
  205 + var key=ite.goods_id+""+act.id;
  206 + if(th.data.in_zhact_gdmap[key]){
  207 + th.data.in_zhact_gdmap[key]+=ite.num;
  208 + }else{
  209 + th.data.in_zhact_gdmap[key]=ite.num;
  210 + }
  211 + }
  212 + }
  213 +
192 function sortData(a, b) { 214 function sortData(a, b) {
193 return a.price - b.price 215 return a.price - b.price
194 } 216 }
pages/cart/cart2/cart2.js
@@ -120,6 +120,10 @@ Page({ @@ -120,6 +120,10 @@ Page({
120 120
121 tabs: ['门店自提', '快递邮寄'], 121 tabs: ['门店自提', '快递邮寄'],
122 currentTabIndex: 1, 122 currentTabIndex: 1,
  123 +
  124 + in_zhact_gdmap:{}, //不同门店参与同一活动的限购
  125 + hid_inp:1,
  126 + user_note:{},
123 }, 127 },
124 onLoad: function (t) { 128 onLoad: function (t) {
125 wx.setNavigationBarTitle({title: "填写订单",}) 129 wx.setNavigationBarTitle({title: "填写订单",})
@@ -413,6 +417,7 @@ Page({ @@ -413,6 +417,7 @@ Page({
413 var arr = new Array(); 417 var arr = new Array();
414 var carr = su.data.data.pageData; 418 var carr = su.data.data.pageData;
415 th.data.cartlist_y = carr; //存储原始购物车列表 419 th.data.cartlist_y = carr; //存储原始购物车列表
  420 + th.data.in_zhact_gdmap={};
416 421
417 //---是不是购买等级卡成功的返回---等级卡显示的判断--- 422 //---是不是购买等级卡成功的返回---等级卡显示的判断---
418 var is_card_back = getApp().globalData.is_card_back; 423 var is_card_back = getApp().globalData.is_card_back;
@@ -651,6 +656,7 @@ Page({ @@ -651,6 +656,7 @@ Page({
651 } 656 }
652 } 657 }
653 658
  659 +
654 //每一个门店内的组合购要进行拆分, 660 //每一个门店内的组合购要进行拆分,
655 //还得把组合商品的多余商品的线下价格算一算 661 //还得把组合商品的多余商品的线下价格算一算
656 for (let var1 in arr) { 662 for (let var1 in arr) {
@@ -1009,8 +1015,11 @@ Page({ @@ -1009,8 +1015,11 @@ Page({
1009 }); 1015 });
1010 }, 1016 },
1011 keyUpChangeNum: function (t) { 1017 keyUpChangeNum: function (t) {
  1018 + var index = t.currentTarget.dataset.index;
  1019 + var txt="user_note."+index;
1012 this.setData({ 1020 this.setData({
1013 - maxWord: t.detail.value.length 1021 + maxWord: t.detail.value.length,
  1022 + [txt]: t.detail.value
1014 }); 1023 });
1015 }, 1024 },
1016 1025
@@ -3786,5 +3795,17 @@ Page({ @@ -3786,5 +3795,17 @@ Page({
3786 }); 3795 });
3787 }, 3796 },
3788 3797
  3798 + set_hid_inp:function (e) {
  3799 + var index = e.currentTarget.dataset.index;
  3800 + var txt = "cartlist[" + index + "].focus";
  3801 + this.setData({[txt]:1})
  3802 + },
  3803 +
  3804 + clear_hid_inp:function (e) {
  3805 + var index = e.currentTarget.dataset.index;
  3806 + var txt = "cartlist[" + index + "].focus";
  3807 + this.setData({[txt]:0})
  3808 + }
  3809 +
3789 3810
3790 }); 3811 });
pages/cart/cart2/cart2.wxml
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 <!-- <view>门店:{{item.pname}}</view> --> 76 <!-- <view>门店:{{item.pname}}</view> -->
77 <view>{{item.pname}}</view> 77 <view>{{item.pname}}</view>
78 </view> 78 </view>
79 - <view class="order-detail" wx:if="{{items.goods_num>0}}" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> 79 + <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items">
80 <!----商品图片-----> 80 <!----商品图片----->
81 <view class="goods-img" style="position: relative"> 81 <view class="goods-img" style="position: relative">
82 <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> 82 <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>
@@ -104,7 +104,6 @@ @@ -104,7 +104,6 @@
104 <view class="goods-num">x{{items.goods_num}}</view> 104 <view class="goods-num">x{{items.goods_num}}</view>
105 </view> 105 </view>
106 </navigator> 106 </navigator>
107 -  
108 </view> 107 </view>
109 108
110 <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> 109 <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
@@ -208,9 +207,14 @@ @@ -208,9 +207,14 @@
208 <view class="coupon-mes flex-vertical"> 207 <view class="coupon-mes flex-vertical">
209 <view>留言</view> 208 <view>留言</view>
210 <view class="leave-word"> 209 <view class="leave-word">
211 - <input placeholder-class="fs28" placeholder='给商家留言,最多100字' bindinput="keyUpChangeNum" disabled="{{disabled}}"  
212 - class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}"></input> 210 + <input hidden="{{!item.focus}}" bindinput="keyUpChangeNum" disabled="{{disabled}}"
  211 + data-index="{{index}}" bindblur="clear_hid_inp" focus="{{item.focus}}" value="{{user_note[index]}}"
  212 + class="word-box" maxlength="100" name="user_note_{{item.pickup_id}}" />
213 213
  214 + <view class="{{user_note[index]?'':'c-a'}}" style="width: 80%;font-size: 26rpx" data-index="{{index}}"
  215 + bindtap="set_hid_inp" wx:if="{{!item.focus}}">
  216 + {{user_note[index]?user_note[index]:'给商家留言,最多100字'}}
  217 + </view>
214 </view> 218 </view>
215 </view> 219 </view>
216 220
pages/cart/cart2/cart2.wxss
@@ -249,7 +249,10 @@ margin:auto; */ @@ -249,7 +249,10 @@ margin:auto; */
249 position: relative; 249 position: relative;
250 font-size: 24rpx; 250 font-size: 24rpx;
251 margin-left: 20rpx; 251 margin-left: 20rpx;
252 - flex-grow: 1; 252 + display: flex;
  253 + align-items: center;
  254 + height: 50rpx;
  255 + width: 500rpx;
253 } 256 }
254 257
255 .word-box { 258 .word-box {
pages/cart/cart2/zh_calculate.js
@@ -2,7 +2,7 @@ var regeneratorRuntime = require(&#39;../../../utils/runtime.js&#39;); @@ -2,7 +2,7 @@ var regeneratorRuntime = require(&#39;../../../utils/runtime.js&#39;);
2 module.exports = { 2 module.exports = {
3 //主要的作用,就是把组合购多余的商品进行拆分, 3 //主要的作用,就是把组合购多余的商品进行拆分,
4 //如果没有达成组合购的要求,所有的商品都打回原价购买 4 //如果没有达成组合购的要求,所有的商品都打回原价购买
5 - fir_set_arr: function (c_item) { 5 + fir_set_arr: function (c_item,th) {
6 //组合活动,以及组合活动从表的商品 6 //组合活动,以及组合活动从表的商品
7 let zh_prom_goods = c_item.zh_prom_goods; 7 let zh_prom_goods = c_item.zh_prom_goods;
8 let goods = c_item.goods; //一个门店中所有的商品 8 let goods = c_item.goods; //一个门店中所有的商品
@@ -47,7 +47,14 @@ module.exports = { @@ -47,7 +47,14 @@ module.exports = {
47 var cart_num=item.cart_num =item_j.goods_num; 47 var cart_num=item.cart_num =item_j.goods_num;
48 var zh_b_num=item_j.promgoodsbuynum; 48 var zh_b_num=item_j.promgoodsbuynum;
49 if(item.buyqty>0){ 49 if(item.buyqty>0){
  50 +
  51 + var key=item.goods_id+""+act.id;
50 var cbuy=item.buyqty-zh_b_num; 52 var cbuy=item.buyqty-zh_b_num;
  53 + if(th.data.in_zhact_gdmap[key]){
  54 + var cbuy=item.buyqty-zh_b_num-th.data.in_zhact_gdmap[key];
  55 + }
  56 +
  57 +
51 //当可买的数量为0 58 //当可买的数量为0
52 if(cbuy<=0){ 59 if(cbuy<=0){
53 item.num=0; 60 item.num=0;
@@ -97,6 +104,21 @@ module.exports = { @@ -97,6 +104,21 @@ module.exports = {
97 104
98 //当满足组合的要求:总数要满足,起购数要满足 105 //当满足组合的要求:总数要满足,起购数要满足
99 if (all_num >= act.zhbuyqty && !need_to_buy) { 106 if (all_num >= act.zhbuyqty && !need_to_buy) {
  107 +
  108 + //商品的列表
  109 + for (var u in act_goos) {
  110 + var ite=act_goos[u];
  111 + if(ite.buyqty>0 && ite.num>0){
  112 + var key=ite.goods_id+""+act.id;
  113 + if(th.data.in_zhact_gdmap[key]){
  114 + th.data.in_zhact_gdmap[key]+=ite.num;
  115 + }else{
  116 + th.data.in_zhact_gdmap[key]=ite.num;
  117 + }
  118 + }
  119 + }
  120 +
  121 +
100 function sortData(a, b) { 122 function sortData(a, b) {
101 return a.price - b.price 123 return a.price - b.price
102 } 124 }
pages/goods/categoryList/categoryList.wxml
@@ -122,9 +122,9 @@ @@ -122,9 +122,9 @@
122 122
123 123
124 <!-- 分类项目内容 22 --> 124 <!-- 分类项目内容 22 -->
125 - <view class="flex project_height" style="margin-left:-10rpx;margin-bottom:120rpx; height: auto;" id="two_type"> 125 + <view class="flex project_height" style="height:100%;box-sizing:border-box;padding-bottom:100rpx;" id="two_type">
126 <!-- 分类项目的类型 --> 126 <!-- 分类项目的类型 -->
127 - <view class="project_type" style="background-color:#eee;height:88%;overflow-y:auto;position:fixed;left:0;z-index:99;top:126rpx;"> 127 + <view class="project_type" style="background-color:#eee;<!-- height:88%; -->overflow-y:auto;position:fixed;left:0;z-index:99;top:120rpx;">
128 <view class="project_type-frame" style="margin-bottom:120rpx;"> 128 <view class="project_type-frame" style="margin-bottom:120rpx;">
129 <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}"> 129 <view wx:if="{{is_show_gb}}" class="{{status_show == 1?'':''}}">
130 <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> --> 130 <!-- <view style="{{status_show == 1?'position: absolute;height: 52rpx;width: 6rpx;background-color: red;left: 0; margin-top: 24rpx;':''}}"></view> -->
@@ -159,7 +159,7 @@ @@ -159,7 +159,7 @@
159 159
160 </view> 160 </view>
161 <!-- 分类项目的内容 --> 161 <!-- 分类项目的内容 -->
162 - <view class="classify_content" style="margin-left:27%;margin-top:130rpx"> 162 + <view class="classify_content" style="padding-left:196rpx;">
163 <!-- 国家的样式 --> 163 <!-- 国家的样式 -->
164 <block wx:if="{{select_classify_on==223&&is_show_gb}}"> 164 <block wx:if="{{select_classify_on==223&&is_show_gb}}">
165 <view class="classify_name fs28 flex-space-between"> 165 <view class="classify_name fs28 flex-space-between">
@@ -209,7 +209,7 @@ @@ -209,7 +209,7 @@
209 <!-- 品类--> 209 <!-- 品类-->
210 <block wx:if="{{is_show_pl}}"> 210 <block wx:if="{{is_show_pl}}">
211 <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}"> 211 <block wx:if="{{select_classify_on!=220&&select_classify_on!=223&&is_level_three!=1}}">
212 - <view> 212 + <view class="my-container">
213 <view class="classify_name fs28 flex-space-between"data-pid="0"data-cid="{{cat_id}}" bindtap='select_more'> 213 <view class="classify_name fs28 flex-space-between"data-pid="0"data-cid="{{cat_id}}" bindtap='select_more'>
214 <view class="classify_title ellipsis-1">{{classify_name}}</view> 214 <view class="classify_title ellipsis-1">{{classify_name}}</view>
215 <view class="flex select_more" > 215 <view class="flex select_more" >
@@ -220,7 +220,7 @@ @@ -220,7 +220,7 @@
220 <!-- 显示2级列表 --> 220 <!-- 显示2级列表 -->
221 <view class="classify_content-frame flex-wrap"> 221 <view class="classify_content-frame flex-wrap">
222 <block wx:if="{{goodslist && goodslist.length>0}}"> 222 <block wx:if="{{goodslist && goodslist.length>0}}">
223 - <block wx:for="{{goodslist}}" wx:for-item="goods"wx:for-index="indx"> 223 + <block wx:for="{{goodslist}}" wx:for-item="goods" wx:for-index="indx">
224 <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate"> 224 <view class="type_img_frame t-c ib" data-cid="{{goods.items.id}}" data-pid="{{goods.items.parent_id}}" bindtap="go_cate">
225 <image class=" type_img" src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> 225 <image class=" type_img" src="{{goods.items.icoimg==null||goods.items.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':goods.items.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image>
226 <view class="brand_img_name fs24 ellipsis-1">{{goods.items.name}}</view> 226 <view class="brand_img_name fs24 ellipsis-1">{{goods.items.name}}</view>
@@ -297,7 +297,7 @@ @@ -297,7 +297,7 @@
297 <!-- 分类项目内容 --> 297 <!-- 分类项目内容 -->
298 <view class="flex project_height" style="margin-left:-10rpx;"> 298 <view class="flex project_height" style="margin-left:-10rpx;">
299 <!-- 分类项目的类型 --> 299 <!-- 分类项目的类型 -->
300 - <view class="project_type" style="background-color:#eee;height:88%;overflow-y:auto;position:fixed;left:0;z-index:99;top:126rpx;" id="thress_type3"> 300 + <view class="project_type" style="background-color:#eee;height:88%;overflow-y:auto;position:fixed;left:0;z-index:99;top:120rpx;" id="thress_type3">
301 <view class="project_type-frame" style="margin-bottom:120rpx;"> 301 <view class="project_type-frame" style="margin-bottom:120rpx;">
302 <view wx:if="{{is_show_gb}}"> 302 <view wx:if="{{is_show_gb}}">
303 <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-current="223" data-index="223" data-name="国家" wx:if="{{is_country}}"> 303 <view bindtap="click_classify" class="tab-bar-item {{select_classify_on==223 ? 'active' : ''}}" data-current="223" data-index="223" data-name="国家" wx:if="{{is_country}}">
@@ -345,7 +345,7 @@ @@ -345,7 +345,7 @@
345 </view> 345 </view>
346 </view> 346 </view>
347 <!-- 分类项目的内容 --> 347 <!-- 分类项目的内容 -->
348 - <view class="classify_content" style="margin-left:27%;margin-top:130rpx"> 348 + <view class="classify_content" style="margin-left:27%;margin-top:120rpx">
349 <!-- 国家的样式 --> 349 <!-- 国家的样式 -->
350 <block wx:if="{{select_classify_on==223&&is_show_gb}}"> 350 <block wx:if="{{select_classify_on==223&&is_show_gb}}">
351 <view class="classify_name fs28 flex-space-between"> 351 <view class="classify_name fs28 flex-space-between">
pages/goods/categoryList/categoryList.wxss
1 /*---nyf 2018-9-7---*/ 1 /*---nyf 2018-9-7---*/
2 2
3 -page{height: 100%; background: #fff;} 3 +page{height: 100%; background: #fff;padding-top:120rpx;box-sizing: border-box;}
4 .top_view{ width: 100%;background: #fff;} 4 .top_view{ width: 100%;background: #fff;}
5 5
6 .swiper-tab{ 6 .swiper-tab{
@@ -103,7 +103,7 @@ line-height: 50rpx; @@ -103,7 +103,7 @@ line-height: 50rpx;
103 103
104 /*--国家--*/ 104 /*--国家--*/
105 .nation_box{ position: absolute;width: 260rpx; height: 160rpx; background-size: 100% 100%; background-repeat: no-repeat; 105 .nation_box{ position: absolute;width: 260rpx; height: 160rpx; background-size: 100% 100%; background-repeat: no-repeat;
106 - top:110rpx;left: 50%; margin-left: -130rpx;z-index: 8; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN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fiA8QH4gPxAeID8QHiA/EB4gPxAeID8QHiA/EB4gPxgfgA8YH4APGB+ADxgfgA8YH4APGB+ADxgfhAfID4QHyA+OB/6uzBiGjmgveUzBxmANdOEB8gPhAfID4QHyA+2MotwAD/ZBI/EDK5cgAAAABJRU5ErkJggg==");}
107 107
108 .n_img{width: 100%; height: 375rpx;} 108 .n_img{width: 100%; height: 375rpx;}
109 .nt_1{height:82rpx; line-height: 100rpx;} 109 .nt_1{height:82rpx; line-height: 100rpx;}
@@ -177,7 +177,7 @@ line-height: 50rpx; @@ -177,7 +177,7 @@ line-height: 50rpx;
177 height: 120rpx; 177 height: 120rpx;
178 z-index: 10; 178 z-index: 10;
179 background: #fff; 179 background: #fff;
180 - border-top: 4rpx solid #eee; 180 + /* border-top: 4rpx solid #eee; */
181 border-bottom: 1rpx solid #eee; 181 border-bottom: 1rpx solid #eee;
182 182
183 } 183 }
@@ -212,13 +212,14 @@ margin-top: 8rpx; @@ -212,13 +212,14 @@ margin-top: 8rpx;
212 212
213 } 213 }
214 .project_type{ 214 .project_type{
  215 + box-sizing: border-box;
215 width: 26%; 216 width: 26%;
216 height: 100%; 217 height: 100%;
  218 + padding-bottom: 100rpx;
217 border-right: 1rpx solid #eee; 219 border-right: 1rpx solid #eee;
218 white-space: nowrap; 220 white-space: nowrap;
219 -overflow: hidden;  
220 -overflow-y: scroll;  
221 - 221 + overflow: hidden;
  222 + overflow-y: scroll;
222 } 223 }
223 .share_type{ 224 .share_type{
224 margin: auto; 225 margin: auto;
@@ -301,20 +302,16 @@ width: 60%; @@ -301,20 +302,16 @@ width: 60%;
301 302
302 } 303 }
303 .classify_content{ 304 .classify_content{
304 - width: 72% 305 + width: 100%
305 306
306 } 307 }
307 - .classify_content-frame{  
308 - width: 90%;  
309 - margin: auto;  
310 - flex-wrap:wrap;  
311 - max-height: 90%;  
312 - overflow-y:scroll;  
313 - overflow: hidden scroll;  
314 - /* padding-bottom: 65rpx; */  
315 -  
316 -  
317 - } 308 + .classify_content-frame{
  309 + box-sizing: border-box;
  310 + width: 100%;
  311 + padding: 0 20rpx;
  312 + flex-wrap:wrap;
  313 + overflow-y:scroll;
  314 + }
318 .country_img-frame{ 315 .country_img-frame{
319 width: 48%; 316 width: 48%;
320 height: 140rpx; 317 height: 140rpx;
@@ -331,12 +328,12 @@ width: 60%; @@ -331,12 +328,12 @@ width: 60%;
331 328
332 } 329 }
333 .nation_box.box{ 330 .nation_box.box{
334 - top: 16%;  
335 -width:80%;  
336 -height:70%;  
337 -left: 70.5%;  
338 -overflow: hidden;  
339 - 331 + width:80%;
  332 + height:70%;
  333 + top: 50%;
  334 + left: 50%;
  335 + overflow: hidden;
  336 + transform: translate(-50%, -50%);
340 } 337 }
341 .nt_1.line-height{ 338 .nt_1.line-height{
342 line-height: 65rpx; 339 line-height: 65rpx;
@@ -363,10 +360,10 @@ line-height: 65rpx; @@ -363,10 +360,10 @@ line-height: 65rpx;
363 font-size: 24rpx; 360 font-size: 24rpx;
364 } 361 }
365 .brand_img_frame{ 362 .brand_img_frame{
366 - width: 45%; 363 + width: 50%;
367 margin-top: 18rpx; 364 margin-top: 18rpx;
368 - margin-right: 15rpx;  
369 - height: 160rpx; 365 + /* margin-right: 15rpx; */
  366 + height: 160rpx;
370 } 367 }
371 .brand_img{ 368 .brand_img{
372 width:220rpx; 369 width:220rpx;
@@ -375,13 +372,12 @@ line-height: 65rpx; @@ -375,13 +372,12 @@ line-height: 65rpx;
375 margin-top: 10rpx; 372 margin-top: 10rpx;
376 373
377 } 374 }
378 - .type_img_frame{  
379 - width: 30%; 375 + .type_img_frame {
  376 + width: calc(100% / 3);
380 height: 140rpx; 377 height: 140rpx;
381 - margin-top: 18rpx;  
382 - margin-right: 15rpx;  
383 -  
384 - 378 + margin-top: 20rpx;
  379 + margin-bottom: 20rpx;
  380 + /* margin-right: 15rpx; */
385 } 381 }
386 382
387 383
@@ -504,7 +500,8 @@ margin: auto; @@ -504,7 +500,8 @@ margin: auto;
504 border-left: 8rpx solid #E41F19; 500 border-left: 8rpx solid #E41F19;
505 height: 50rpx; 501 height: 50rpx;
506 left: 0; 502 left: 0;
507 - top:26rpx; 503 + top:50%;
  504 + transform: translateY(-50%);
508 } 505 }
509 506
510 507
@@ -517,11 +514,29 @@ margin: auto; @@ -517,11 +514,29 @@ margin: auto;
517 height: 110rpx; 514 height: 110rpx;
518 515
519 } 516 }
  517 +
  518 +
  519 + .classify_content > view:last-of-type .classify_content-frame {
  520 + padding-bottom: 100rpx;
  521 + }
  522 +
  523 + .classify_content > view:only-child .classify_content-frame {
  524 + padding-bottom: 0;
  525 + }
  526 +
  527 + .classify_content > .classify_content-frame {
  528 + padding-bottom: 118rpx;
  529 + }
  530 +
520 531
521 page { 532 page {
522 - overflow-x: hidden;  
523 - padding-bottom: 40rpx; 533 + /* overflow-x: hidden; */
  534 + /* padding-bottom: 40rpx; */
524 } 535 }
  536 +
  537 + /* .my-container {
  538 + padding-bottom: 118rpx;
  539 + } */
525 540
526 /* 风格三商品列表样式引入 */ 541 /* 风格三商品列表样式引入 */
527 @import "../goodsList/goodsList.wxss"; 542 @import "../goodsList/goodsList.wxss";
528 \ No newline at end of file 543 \ No newline at end of file
pages/index/index/index.wxml
@@ -392,10 +392,7 @@ @@ -392,10 +392,7 @@
392 <!--商品分组--> 392 <!--商品分组-->
393 <block wx:if="{{item.ename=='goodsGroup'}}"> 393 <block wx:if="{{item.ename=='goodsGroup'}}">
394 <goodsGroup object="{{item.content}}"></goodsGroup> 394 <goodsGroup object="{{item.content}}"></goodsGroup>
395 - <!-- 技术支持 -->  
396 - <view class="logo-container t-c">  
397 - <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{url + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image>提供技术支持</view>  
398 - </view> 395 +
399 </block> 396 </block>
400 <!--通知--> 397 <!--通知-->
401 <block wx:if="{{item.ename=='notice'}}"> 398 <block wx:if="{{item.ename=='notice'}}">
@@ -449,6 +446,10 @@ @@ -449,6 +446,10 @@
449 446
450 447
451 </block> 448 </block>
  449 + <!-- 技术支持 -->
  450 + <view class="logo-container t-c">
  451 + <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{url + 'miniapp/images/luckDraw/logo.png?v=3'}}" class="logo" lazy-load></image>提供技术支持</view>
  452 + </view>
452 </view> 453 </view>
453 454
454 </block> 455 </block>
pages/index/index/index.wxss
@@ -1076,7 +1076,7 @@ page { @@ -1076,7 +1076,7 @@ page {
1076 width: 100%; 1076 width: 100%;
1077 height: 100%; 1077 height: 100%;
1078 background-position: center; 1078 background-position: center;
1079 - background-size: 100% 100%; 1079 + background-size:cover;
1080 background-repeat: no-repeat; 1080 background-repeat: no-repeat;
1081 } 1081 }
1082 1082
pages/user/order_detail/order_detail.js
@@ -377,8 +377,74 @@ Page({ @@ -377,8 +377,74 @@ Page({
377 th.toast(content); 377 th.toast(content);
378 return false; 378 return false;
379 } 379 }
380 -  
381 - //如果优惠促销和搭配购的时候 380 +
  381 + //当是组合优惠的时候
  382 + if(good.prom_type==7){
  383 + //如果有组合购
  384 + var isok = 1;
  385 + var url="/api/weshop/prom/zhbuy/get/"+os.stoid+"/"+good.prom_id+"/"+getApp().globalData.userInfo.user_id;
  386 + await getApp().request.promiseGet(url, {}).then(res => {
  387 + if(res.data.code==0 && res.data.data){
  388 + if(res.data.data.is_show!=1){
  389 + isok=0;
  390 + }
  391 + //如果活动已经结束
  392 + if(res.data.data.is_end==1){
  393 + isok=0;
  394 + }
  395 + //已经结束
  396 + if(ut.gettimestamp()>res.data.data.end_time){
  397 + isok=0;
  398 + }
  399 + //还未开始
  400 + if(ut.gettimestamp()<res.data.data.start_time){
  401 + isok=0;
  402 + }
  403 +
  404 + }else{
  405 + //未找到商品的活动
  406 + isok = 0;
  407 + }
  408 +
  409 + })
  410 + if (!isok){
  411 + var content=gg.goods_name+'活动已经结束,请取消订单';
  412 + th.toast(content);
  413 + return false;
  414 + }
  415 +
  416 + var url1 = "/api/weshop/prom/zhbuyGoods/page";
  417 + var req_data = {
  418 + page: 1,
  419 + pageSize: 1,
  420 + store_id: os.stoid,
  421 + zh_id: good.prom_id,
  422 + goods_id:good.goods_id
  423 + }
  424 + await getApp().request.promiseGet(url1, {
  425 + data: req_data
  426 + }).then(res => {
  427 + if (ut.ajax_ok(res)) {
  428 + var gdlist = res.data.data.pageData[0];
  429 + good.buyqty=gdlist.buyqty;
  430 + }
  431 + })
  432 +
  433 + var num=good['buyqty'];
  434 + console.log(1111);
  435 + console.log(num);
  436 + //---- 要计算商品的限购 -----
  437 + if(good['buyqty']>0){
  438 + if(good.goods_num+promgoodsbuynum>good['buyqty']){
  439 +
  440 + var content= good['goods_name']+"超出活动限购\n";
  441 + th.toast(content);
  442 + return false;
  443 + }
  444 + }
  445 + }
  446 +
  447 + //如果优惠促销和搭配购的时候
382 if((good.prom_type==3 || good.prom_type==5) && good.is_collocation!=1 && good.is_gift!=1){ 448 if((good.prom_type==3 || good.prom_type==5) && good.is_collocation!=1 && good.is_gift!=1){
383 var p_ok=1; 449 var p_ok=1;
384 await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => { 450 await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+good.goods_id+"/0", {}).then(res => {