Commit a84f09153c07adec64f40789e5ee5ffcd7cf0bf8
Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp
Showing
52 changed files
with
9314 additions
and
298 deletions
app.json
| ... | ... | @@ -239,7 +239,8 @@ | 
| 239 | 239 | "pages/user/my_service/tment_eval", | 
| 240 | 240 | "pages/user_template/index", | 
| 241 | 241 | "pages/team/team_show/team_show", | 
| 242 | - "pages/user/order_detail/order_detail" | |
| 242 | + "pages/user/order_detail/order_detail", | |
| 243 | + "pages/group_buy/goodsInfo/goodsInfo" | |
| 243 | 244 | ] | 
| 244 | 245 | } | 
| 245 | 246 | ], | ... | ... | 
components/diy_groupbuy/diy_groupbuy.js
| ... | ... | @@ -84,7 +84,7 @@ Component({ | 
| 84 | 84 | if(!user_id){ user_id=0;} | 
| 85 | 85 | |
| 86 | 86 | //--调用接口,读取团购-- | 
| 87 | - app.request.promiseGet("/api/weshop/goods/groupBuy/getGoodsList?store_id=" | |
| 87 | + app.request.promiseGet("/api/weshop/goods/groupBuy/getGoodsList?isnew=1&store_id=" | |
| 88 | 88 | + os.stoid + "&aidlist=" + goodsidlist+"&user_id="+user_id, {}).then(res => { | 
| 89 | 89 | console.log(res,100); | 
| 90 | 90 | //如果秒杀的数组为空的时候 | 
| ... | ... | @@ -106,7 +106,7 @@ Component({ | 
| 106 | 106 | if(!user_id){ user_id=0;} | 
| 107 | 107 | var req={ store_id: os.stoid, is_end: 0, is_show: 1, timetype: 2,user_id:user_id}; | 
| 108 | 108 | |
| 109 | - getApp().request.promiseGet("/api/weshop/goods/groupBuy/page?page=1&pageSize=9", | |
| 109 | + getApp().request.promiseGet("/api/weshop/goods/groupBuy/page?isnew=1&page=1&pageSize=9", | |
| 110 | 110 | { isShowLoading: 1, data:req } | 
| 111 | 111 | ).then(res => { | 
| 112 | 112 | if (res.data.code == 0 && res.data.data.pageData && res.data.data.pageData.length > 0) { | 
| ... | ... | @@ -122,15 +122,11 @@ Component({ | 
| 122 | 122 | var newTime = ut.gettimestamp(), all_array = [], th = this; | 
| 123 | 123 | th.setData({ newTime: newTime }); | 
| 124 | 124 | if (g_id) { | 
| 125 | - /*--商品队列按照添加的顺序排列--*/ | |
| 126 | - g_id.forEach(function (val, ind) { | |
| 125 | + | |
| 127 | 126 | goodslist.forEach(function (vy, indy) { | 
| 128 | - if (val.goodsid == vy.goods_id) { | |
| 129 | - if(!vy.id) vy.id=vy.prom_id; | |
| 130 | 127 | all_array.push(vy); | 
| 131 | - } | |
| 132 | 128 | }) | 
| 133 | - }) | |
| 129 | + | |
| 134 | 130 | } else { | 
| 135 | 131 | all_array = goodslist; | 
| 136 | 132 | } | 
| ... | ... | @@ -221,11 +217,25 @@ Component({ | 
| 221 | 217 | |
| 222 | 218 | //跳转到团购列表 | 
| 223 | 219 | go_to_group: function () { | 
| 224 | - | |
| 225 | 220 | var url="/packageC/pages/group_list/group_list"; | 
| 226 | 221 | getApp().goto(url); | 
| 227 | 222 | |
| 223 | + }, | |
| 224 | + | |
| 225 | + | |
| 226 | + //跳转到商品详情,要区别商品和服务卡项 | |
| 227 | + go_group_buy(e){ | |
| 228 | + let index=e.currentTarget.dataset.index; | |
| 229 | + let idx=e.currentTarget.dataset.idx; | |
| 230 | + let aitem=this.data.goods_array[index][idx]; | |
| 231 | + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+aitem.goods_id+"&prom_type=2&prom_id="+aitem.prom_id; | |
| 232 | + //如果是服务卡项的时候 | |
| 233 | + if(aitem.goods_type==1){ | |
| 234 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+aitem.goods_id+"&prom_id="+aitem.prom_id; | |
| 235 | + } | |
| 236 | + getApp().goto(url); | |
| 228 | 237 | } | 
| 238 | + | |
| 229 | 239 | |
| 230 | 240 | |
| 231 | 241 | ... | ... | 
components/diy_groupbuy/diy_groupbuy.wxml
| ... | ... | @@ -17,7 +17,9 @@ | 
| 17 | 17 | <swiper-item class="s_it" wx:for="{{goods_array}}"> | 
| 18 | 18 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 
| 19 | 19 | <navigator | 
| 20 | - url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_type=2&prom_id={{aitem.prom_id}}" | |
| 20 | + bindtap="go_group_buy" | |
| 21 | + data-index="{{index}}" | |
| 22 | + data-idx="{{aind}}" | |
| 21 | 23 | class="s1_gk_a1"> | 
| 22 | 24 | <view class='one'> | 
| 23 | 25 | <view class='sp_top'> | 
| ... | ... | @@ -64,7 +66,9 @@ | 
| 64 | 66 | <block wx:for="{{goods_array}}"> | 
| 65 | 67 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 
| 66 | 68 | <navigator | 
| 67 | - url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_type=2&prom_id={{aitem.prom_id}}" | |
| 69 | + bindtap="go_group_buy" | |
| 70 | + data-index="{{index}}" | |
| 71 | + data-idx="{{aind}}" | |
| 68 | 72 | class="s1_gk_a1"> | 
| 69 | 73 | <view class="flex jc_sb" style="padding: 0 20rpx; margin-top: 10rpx;"> | 
| 70 | 74 | <view> | ... | ... | 
components/diy_pingd_buy/diy_pingd_buy.js
| ... | ... | @@ -135,14 +135,12 @@ Component({ | 
| 135 | 135 | var th=this,all_array=[]; | 
| 136 | 136 | if(g_id){ | 
| 137 | 137 | /*--商品队列按照添加的顺序排列--*/ | 
| 138 | - g_id.forEach(function(val, ind) { | |
| 138 | + | |
| 139 | 139 | goodslist.forEach(function (vy,indy) { | 
| 140 | - if(val.goodsid==vy.goods_id){ | |
| 141 | - all_array.push(vy); | |
| 142 | - //th.setData({goods_array:arr}); | |
| 143 | - } | |
| 140 | + all_array.push(vy); | |
| 141 | + //th.setData({goods_array:arr}); | |
| 144 | 142 | }) | 
| 145 | - }) | |
| 143 | + | |
| 146 | 144 | }else{ | 
| 147 | 145 | all_array=goodslist; | 
| 148 | 146 | } | ... | ... | 
components/diy_pregoods/diy_pregoods.js
| ... | ... | @@ -112,12 +112,11 @@ Component({ | 
| 112 | 112 | var newTime = ut.gettimestamp(),all_array = [],th=this; | 
| 113 | 113 | th.setData({newTime:newTime}); | 
| 114 | 114 | if(g_id){ | 
| 115 | - /*--商品队列按照添加的顺序排列--*/ | |
| 116 | - g_id.forEach(function(val, ind) { | |
| 117 | - goodslist.forEach(function (vy,indy) { | |
| 118 | - if(val.goodsid==vy.goods_id){ all_array.push(vy); } | |
| 115 | + /*--商品队列按照添加的顺序排列--*/ | |
| 116 | + goodslist.forEach(function (vy,indy) { | |
| 117 | + all_array.push(vy); | |
| 119 | 118 | }) | 
| 120 | - }) | |
| 119 | + | |
| 121 | 120 | }else{ | 
| 122 | 121 | all_array=goodslist; | 
| 123 | 122 | } | ... | ... | 
components/diy_public/diy_public.js
| ... | ... | @@ -99,7 +99,7 @@ Component({ | 
| 99 | 99 | if (this.data.prom_type==2) { //团购 | 
| 100 | 100 | this.setData({ | 
| 101 | 101 | prom_text:'已团', | 
| 102 | - nav1:'/pages/goods/goodsInfo/goodsInfo?', | |
| 102 | + nav1:'/packageG/pages/group_buy/goodsInfo/goodsInfo?', | |
| 103 | 103 | nav2:'/pages/goods/goodsInfo/goodsInfo?' | 
| 104 | 104 | }) | 
| 105 | 105 | } | 
| ... | ... | @@ -168,7 +168,7 @@ Component({ | 
| 168 | 168 | } | 
| 169 | 169 | |
| 170 | 170 | if (th.data.prom_type==2) { //团购 | 
| 171 | - gUrl="/api/weshop/goods/groupBuy/getGoodsList?store_id=" | |
| 171 | + gUrl="/api/weshop/goods/groupBuy/getGoodsList?isnew=1&store_id=" | |
| 172 | 172 | +os.stoid+"&aidlist="+goodsidlist + "&user_id="+user_id; | 
| 173 | 173 | } | 
| 174 | 174 | |
| ... | ... | @@ -278,14 +278,13 @@ Component({ | 
| 278 | 278 | var newTime = ut.gettimestamp(), all_array = [], th = this; | 
| 279 | 279 | th.setData({ newTime: newTime }); | 
| 280 | 280 | if (g_id) { | 
| 281 | - /*--商品队列按照添加的顺序排列--*/ | |
| 282 | - g_id.forEach(function (val, ind) { | |
| 281 | + | |
| 283 | 282 | goodslist.forEach(function (vy, indy) { | 
| 284 | - if (val.goodsid == vy.goods_id) { | |
| 285 | - all_array.push(vy); | |
| 286 | - } | |
| 283 | + | |
| 284 | + all_array.push(vy); | |
| 285 | + | |
| 287 | 286 | }) | 
| 288 | - }) | |
| 287 | + | |
| 289 | 288 | } else { | 
| 290 | 289 | all_array = goodslist; | 
| 291 | 290 | } | ... | ... | 
components/diy_seckill/diy_seckill.js
| ... | ... | @@ -157,14 +157,11 @@ Component({ | 
| 157 | 157 | var newTime = ut.gettimestamp(), all_array = [], th = this; | 
| 158 | 158 | th.setData({ newTime: newTime }); | 
| 159 | 159 | if (g_id) { | 
| 160 | - /*--商品队列按照添加的顺序排列--*/ | |
| 161 | - g_id.forEach(function (val, ind) { | |
| 162 | - goodslist.forEach(function (vy, indy) { | |
| 163 | - if (val.goodsid == vy.goods_id) { | |
| 160 | + /*--商品队列按照添加的顺序排列--*/ | |
| 161 | + goodslist.forEach(function (vy, indy) { | |
| 164 | 162 | all_array.push(vy); | 
| 165 | - } | |
| 166 | 163 | }) | 
| 167 | - }) | |
| 164 | + | |
| 168 | 165 | } else { | 
| 169 | 166 | all_array = goodslist; | 
| 170 | 167 | } | ... | ... | 
components/diy_top_nav/diy_top_nav.wxml
| ... | ... | @@ -27,7 +27,7 @@ | 
| 27 | 27 | <!-- 广告轮播时 --> | 
| 28 | 28 | <view wx:if="{{nav_type==1}}" style="padding-bottom:{{nav_pb}}px;color: {{nav_frontColor}};"> | 
| 29 | 29 | <view style="height: {{nav_h}}px;width: 100%;"></view> | 
| 30 | - <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: left;padding-left: 20rpx;">{{nav_title}}</view> | |
| 30 | + <view style="width: 100%;height:{{mentButt_h}}px;line-height:{{mentButt_h}}px;text-align: center;">{{nav_title}}</view> | |
| 31 | 31 | </view> | 
| 32 | 32 | |
| 33 | 33 | <!-- 详情页面 --> | ... | ... | 
components/serviceCard_list/serviceCard_list.js
| ... | ... | @@ -153,10 +153,46 @@ Component({ | 
| 153 | 153 | }) | 
| 154 | 154 | }, | 
| 155 | 155 | |
| 156 | - go_url:function (e) { | |
| 157 | - var url=e.currentTarget.dataset.url; | |
| 158 | - console.log('url===>>>>', url); | |
| 159 | - getApp().goto(url); | |
| 156 | + go_url:async function (e) { | |
| 157 | + var gid = e.currentTarget.dataset.gid; | |
| 158 | + var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | |
| 159 | + var req_d = { | |
| 160 | + "store_id": os.stoid, | |
| 161 | + "goods_id": gid, | |
| 162 | + "user_id": getApp().globalData.user_id, | |
| 163 | + "goods_type":1 | |
| 164 | + } | |
| 165 | + var res= await getApp().request.promiseGet(rurl, {data: req_d}); | |
| 166 | + | |
| 167 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | |
| 168 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
| 169 | + var arr = res.data.data; | |
| 170 | + let times = new Date().getTime(); | |
| 171 | + //-- 预热也要计算 -- | |
| 172 | + var arr2 = arr.filter(function (e) { | |
| 173 | + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp()) | |
| 174 | + }) | |
| 175 | + if(arr2.length==1) { | |
| 176 | + switch(arr2[0].prom_type){ | |
| 177 | + case 1: | |
| 178 | + url+="&prom_type=1&prom_id="+arr2[0].act_id; | |
| 179 | + break; | |
| 180 | + case 2: | |
| 181 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+arr2[0].act_id; | |
| 182 | + break; | |
| 183 | + case 6: | |
| 184 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`; | |
| 185 | + break; | |
| 186 | + case 8: | |
| 187 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr2[0].act_id}`; | |
| 188 | + break; | |
| 189 | + } | |
| 190 | + } | |
| 191 | + | |
| 192 | + } | |
| 193 | + | |
| 194 | + | |
| 195 | + getApp().goto(url); | |
| 160 | 196 | } | 
| 161 | 197 | |
| 162 | 198 | }, | ... | ... | 
components/serviceCard_list/serviceCard_list.wxml
| ... | ... | @@ -5,7 +5,7 @@ | 
| 5 | 5 | <view class="hang "> | 
| 6 | 6 | <!-- 商品详情 --> | 
| 7 | 7 | |
| 8 | - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{item.id}}"> | |
| 8 | + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-gid="{{item.id}}"> | |
| 9 | 9 | <!--<view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="{{item.prom_type == 9 ? ('/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + item.goods_id + '&group_id=' + item.prom_id):('/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&title='+item.goods_name+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id)}}">--> | 
| 10 | 10 | <!-- <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}" hover-class="none"> --> | 
| 11 | 11 | <navigator hover-class="none"> | ... | ... | 
packageA/pages/activity_share/activity_share.js
| ... | ... | @@ -171,6 +171,12 @@ Page({ | 
| 171 | 171 | let goods_id = item.goods_id; | 
| 172 | 172 | let price = item.presell_money; | 
| 173 | 173 | let url = `packageC/pages/presell/goodsInfo/goodsInfo?goods_id=${goods_id}&pre_id=${pre_id}`; | 
| 174 | + | |
| 175 | + //如果是服务卡项的时候 | |
| 176 | + if(item.goods_type==1){ | |
| 177 | + url = `packageC/pages/presell/cardInfo/goodsInfo?goods_id=${goods_id}&pre_id=${pre_id}`; | |
| 178 | + } | |
| 179 | + | |
| 174 | 180 | let title = item.goods_name; | 
| 175 | 181 | let img = this.data.url + item.original_img; | 
| 176 | 182 | let ind = 9; | 
| ... | ... | @@ -240,26 +246,41 @@ Page({ | 
| 240 | 246 | if(item){ | 
| 241 | 247 | var price = item.price; | 
| 242 | 248 | if(!price) price=item.shop_price; | 
| 249 | + item.prom_id=item.id; | |
| 250 | + var url=''; | |
| 251 | + | |
| 243 | 252 | switch(th.data.currentIndex){ | 
| 244 | - case 0: item.prom_type=1;break; | |
| 245 | - case 1: item.prom_type=6;break; | |
| 246 | - case 2: | |
| 247 | - if(th.data.currentIndex2==1) item.prom_type = 5; | |
| 248 | - if(th.data.currentIndex2==2) { | |
| 249 | - item.prom_type = 3; | |
| 250 | - item.id=item.prom_id; | |
| 251 | - }; | |
| 252 | - break; | |
| 253 | - case 5: | |
| 254 | - item.prom_type = 2; | |
| 255 | - break; | |
| 256 | - } | |
| 253 | + case 0: | |
| 254 | + item.prom_type=1; | |
| 255 | + //服务卡项的时候 | |
| 256 | + if(item.goods_type>0) | |
| 257 | + url="/packageA/pages/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_type=1&prom_id="+item.prom_id; | |
| 258 | + break; | |
| 259 | + case 1: | |
| 260 | + item.prom_type=6; | |
| 261 | + //服务卡项的时候 | |
| 262 | + if(item.goods_type>0) | |
| 263 | + url="/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_type="+item.prom_type+"&prom_id="+item.prom_id; | |
| 264 | + break; | |
| 265 | + case 2: | |
| 266 | + if(th.data.currentIndex2==1) item.prom_type = 5; | |
| 267 | + if(th.data.currentIndex2==2) { | |
| 268 | + item.prom_type = 3; | |
| 269 | + item.id=item.prom_id; | |
| 270 | + } | |
| 271 | + break; | |
| 272 | + case 5: | |
| 273 | + item.prom_type = 2; | |
| 274 | + //服务卡项的时候 | |
| 275 | + if(item.goods_type>0) | |
| 276 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_id="+item.prom_id; | |
| 277 | + break; | |
| 278 | + } | |
| 257 | 279 | |
| 258 | - item.prom_id=item.id; | |
| 259 | 280 | |
| 260 | 281 | var title= item.goods_name; | 
| 261 | 282 | var img=this.data.url+item.original_img; | 
| 262 | - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_type="+item.prom_type+"&prom_id="+item.prom_id; | |
| 283 | + if(!url) url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_type="+item.prom_type+"&prom_id="+item.prom_id; | |
| 263 | 284 | if(getApp().globalData.user_id){ | 
| 264 | 285 | url+="&first_leader="+getApp().globalData.user_id; | 
| 265 | 286 | } | 
| ... | ... | @@ -689,15 +710,53 @@ Page({ | 
| 689 | 710 | that.setData({ | 
| 690 | 711 | canvasHidden: false,share_hidden:1 | 
| 691 | 712 | }) | 
| 692 | - | |
| 693 | - var app = getApp(); | |
| 694 | - var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
| 713 | + | |
| 714 | + var app = getApp(); | |
| 715 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
| 695 | 716 | |
| 696 | 717 | var prom_type=0; | 
| 697 | 718 | var prom_id=th.data.share_good.id; | 
| 719 | + | |
| 720 | + var scene=''; | |
| 721 | + var goods_path='pages/goods/goodsInfo/goodsInfo'; | |
| 722 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
| 723 | + | |
| 698 | 724 | switch(th.data.currentIndex){ | 
| 699 | - case 0: prom_type=1;break; | |
| 700 | - case 1: prom_type=6;break; | |
| 725 | + case 0: | |
| 726 | + prom_type=1; | |
| 727 | + //服务卡项的时候 | |
| 728 | + if(th.data.share_good.goods_type>0){ | |
| 729 | + | |
| 730 | + scene = th.data.share_good.goods_id; | |
| 731 | + if (user_id > 0) { | |
| 732 | + scene += "_" + user_id; | |
| 733 | + }else{ | |
| 734 | + scene += "_0"; | |
| 735 | + } | |
| 736 | + scene += "_0"; | |
| 737 | + scene += "_" + 1+"_"+prom_id; | |
| 738 | + | |
| 739 | + goods_path='packageA/pages/goodsInfo/goodsInfo'; | |
| 740 | + | |
| 741 | + } | |
| 742 | + break; | |
| 743 | + case 1: | |
| 744 | + prom_type=6; | |
| 745 | + //服务卡项的时候 | |
| 746 | + if(th.data.share_good.goods_type>0){ | |
| 747 | + | |
| 748 | + scene =th.data.share_good.goods_id+''; | |
| 749 | + if (user_id > 0) { | |
| 750 | + scene += "_" + user_id; | |
| 751 | + }else{ | |
| 752 | + scene += "_0"; | |
| 753 | + } | |
| 754 | + scene += "_0"; | |
| 755 | + scene += "_6"; | |
| 756 | + scene += "_"+prom_id; | |
| 757 | + goods_path='packageA/pages/serviceCard_pd/goodsInfo/goodsInfo'; | |
| 758 | + } | |
| 759 | + break; | |
| 701 | 760 | case 2: | 
| 702 | 761 | if(th.data.currentIndex2==1) prom_type = 5; | 
| 703 | 762 | if(th.data.currentIndex2==2){ | 
| ... | ... | @@ -705,23 +764,43 @@ Page({ | 
| 705 | 764 | prom_id=th.data.share_good.prom_id; | 
| 706 | 765 | } | 
| 707 | 766 | break; | 
| 708 | - } | |
| 767 | + case 5: | |
| 768 | + prom_type = 2; | |
| 769 | + //服务卡项的时候 | |
| 770 | + if(th.data.share_good.goods_type>0){ | |
| 709 | 771 | |
| 772 | + scene =th.data.share_good.goods_id+''; | |
| 773 | + if (user_id > 0) { | |
| 774 | + scene += "_" + user_id; | |
| 775 | + }else{ | |
| 776 | + scene += "_0"; | |
| 777 | + } | |
| 778 | + scene += "_0"; | |
| 779 | + scene += "_" +prom_id; | |
| 780 | + | |
| 781 | + goods_path='packageG/pages/group_buy/goodsInfo/goodsInfo'; | |
| 710 | 782 | |
| 783 | + } | |
| 784 | + break | |
| 785 | + } | |
| 711 | 786 | |
| 712 | - var scene = th.data.share_good.goods_id+""; | |
| 713 | - scene+="."+prom_type+"."+prom_id; | |
| 714 | 787 | |
| 715 | - var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0; | |
| 716 | - if(user_id>0){ | |
| 717 | - scene+="_"+user_id; | |
| 788 | + if(!scene){ | |
| 789 | + scene = th.data.share_good.goods_id+""+"."+prom_type+"."+prom_id; | |
| 790 | + if(user_id>0){ | |
| 791 | + scene+="_"+user_id; | |
| 792 | + } | |
| 718 | 793 | } | 
| 719 | - | |
| 794 | + | |
| 795 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 796 | + os.stoid + "?sceneValue=" + scene + "&pageValue="+goods_path; | |
| 797 | + | |
| 798 | + console.log(path3); | |
| 799 | + | |
| 720 | 800 | var ind=3; | 
| 721 | 801 | if(that.data.currentIndex==1){ | 
| 722 | 802 | ind=4; | 
| 723 | 803 | } | 
| 724 | - | |
| 725 | 804 | //-- 价格 -- | 
| 726 | 805 | var pri0 = th.data.share_good.shop_price; | 
| 727 | 806 | if (th.data.share_good.price) | 
| ... | ... | @@ -732,10 +811,6 @@ Page({ | 
| 732 | 811 | th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind,th.data.share_good.goods_sn,pri0); //插入分享 | 
| 733 | 812 | } | 
| 734 | 813 | |
| 735 | - ///二微码 | |
| 736 | - var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 737 | - os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo"; | |
| 738 | - | |
| 739 | 814 | //读取文件成功则OK-- | 
| 740 | 815 | wx.getImageInfo({ | 
| 741 | 816 | src: path3, | 
| ... | ... | @@ -1306,23 +1381,49 @@ Page({ | 
| 1306 | 1381 | go_goods: function (e) { | 
| 1307 | 1382 | var index = e.currentTarget.dataset.index; | 
| 1308 | 1383 | var item = this.data.list[index]; | 
| 1309 | - var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
| 1384 | + var url=''; | |
| 1310 | 1385 | |
| 1311 | - switch(this.data.currentIndex){ | |
| 1312 | - case 0: item.prom_type = 1;break; | |
| 1313 | - case 1: item.prom_type = 6;break; | |
| 1386 | + switch (this.data.currentIndex) { | |
| 1387 | + case 0: | |
| 1388 | + item.prom_type = 1; | |
| 1389 | + break; | |
| 1390 | + case 1: | |
| 1391 | + item.prom_type = 6; | |
| 1392 | + break; | |
| 1314 | 1393 | case 2: | 
| 1315 | - if(th.data.currentIndex2==1) item.prom_type = 5; | |
| 1316 | - if(th.data.currentIndex2==2) item.prom_type = 3; | |
| 1394 | + if (th.data.currentIndex2 == 1) item.prom_type = 5; | |
| 1395 | + if (th.data.currentIndex2 == 2) item.prom_type = 3; | |
| 1317 | 1396 | break; | 
| 1318 | 1397 | case 5: | 
| 1319 | - item.prom_type = 2;break; | |
| 1398 | + item.prom_type = 2; | |
| 1399 | + break; | |
| 1320 | 1400 | } | 
| 1321 | 1401 | |
| 1322 | - item.prom_id = item.id; | |
| 1323 | - url+="&prom_type="+item.prom_type+"&prom_id="+item.prom_id | |
| 1402 | + item.prom_id = item.id; | |
| 1324 | 1403 | |
| 1325 | - getApp().goto(url); | |
| 1404 | + //-- 秒杀,拼单,团购,预售 -- | |
| 1405 | + if(item.goods_type>0){ | |
| 1406 | + switch (item.prom_type){ | |
| 1407 | + case 1: //秒杀 | |
| 1408 | + url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
| 1409 | + break; | |
| 1410 | + case 2: //团购 | |
| 1411 | + url = '/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id=' + item.goods_id; | |
| 1412 | + break; | |
| 1413 | + case 6: //拼单 | |
| 1414 | + url="/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=" + item.goods_id | |
| 1415 | + break; | |
| 1416 | + case 8: //预售 | |
| 1417 | + url = `pageValue=packageC/pages/presell/cardInfo/goodsInfo?goods_id=${item.goods_id}&pre_id=${item.id}`; | |
| 1418 | + break; | |
| 1419 | + } | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + }else { | |
| 1423 | + url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id; | |
| 1424 | + } | |
| 1425 | + url += "&prom_type=" + item.prom_type + "&prom_id=" + item.prom_id | |
| 1426 | + getApp().goto(url); | |
| 1326 | 1427 | }, | 
| 1327 | 1428 | |
| 1328 | 1429 | go_coll_good:function(e){ | ... | ... | 
packageA/pages/cardList/cardList.js
| ... | ... | @@ -239,13 +239,16 @@ Page({ | 
| 239 | 239 | if(arr2.length==1) { | 
| 240 | 240 | switch(arr2[0].prom_type){ | 
| 241 | 241 | case 1: | 
| 242 | - url+="&prom_type=1&prom_id="+arr[0].act_id; | |
| 242 | + url+="&prom_type=1&prom_id="+arr2[0].act_id; | |
| 243 | + break; | |
| 244 | + case 2: | |
| 245 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+arr2[0].act_id; | |
| 243 | 246 | break; | 
| 244 | 247 | case 6: | 
| 245 | - url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr[0].act_id}`; | |
| 248 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`; | |
| 246 | 249 | break; | 
| 247 | 250 | case 8: | 
| 248 | - url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr[0].act_id}`; | |
| 251 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr2[0].act_id}`; | |
| 249 | 252 | break; | 
| 250 | 253 | } | 
| 251 | 254 | } | ... | ... | 
packageA/pages/cart2_ser/cart2_ser.js
| ... | ... | @@ -267,7 +267,7 @@ Page({ | 
| 267 | 267 | t.data.data['buynum'] = gg.goods_num; | 
| 268 | 268 | t.data.data.shop_price = gd.money; | 
| 269 | 269 | |
| 270 | - if(th.data.postdata.prom_type == 1) { | |
| 270 | + if([1,2].includes(th.data.postdata.prom_type)) { | |
| 271 | 271 | let postdata = th.data.postdata; | 
| 272 | 272 | t.data.data.shop_price = postdata.prom_price; | 
| 273 | 273 | }; | 
| ... | ... | @@ -535,7 +535,7 @@ Page({ | 
| 535 | 535 | return false; | 
| 536 | 536 | } | 
| 537 | 537 | |
| 538 | - if (gg.prom_type == 1 && gg.is_pd_normal == 0) { | |
| 538 | + if ((gg.prom_type == 1 && gg.is_pd_normal == 0) || gg.prom_type == 2) { | |
| 539 | 539 | // 秒杀活动购买 | 
| 540 | 540 | var goods = { | 
| 541 | 541 | 'card_id': gg.service_id, | 
| ... | ... | @@ -565,7 +565,6 @@ Page({ | 
| 565 | 565 | if(getApp().globalData.skinface_id){ | 
| 566 | 566 | goods.skinface_id=getApp().globalData.skinface_id; | 
| 567 | 567 | } | 
| 568 | - | |
| 569 | 568 | |
| 570 | 569 | //--导购分享过来的id-- | 
| 571 | 570 | if (gg.guide_id) { | 
| ... | ... | @@ -579,10 +578,11 @@ Page({ | 
| 579 | 578 | goods.guide_sn = res.data.data.salesman_no; | 
| 580 | 579 | } | 
| 581 | 580 | }) | 
| 582 | - } | |
| 583 | - if (gg.groupchat_id) { | |
| 584 | - goods.groupchat_id=gg.groupchat_id | |
| 585 | - } | |
| 581 | + } | |
| 582 | + | |
| 583 | + if (gg.groupchat_id) { | |
| 584 | + goods.groupchat_id=gg.groupchat_id | |
| 585 | + } | |
| 586 | 586 | item.list.push(goods); | 
| 587 | 587 | } | 
| 588 | 588 | } | 
| ... | ... | @@ -604,7 +604,7 @@ Page({ | 
| 604 | 604 | 'prom_id': this.data.postdata.prom_id, //促销活动id | 
| 605 | 605 | }; | 
| 606 | 606 | |
| 607 | - if(this.data.postdata.prom_type == 1) { | |
| 607 | + if([1,2].includes(this.data.postdata.prom_type)) { | |
| 608 | 608 | goods.price = this.data.postdata.prom_price; | 
| 609 | 609 | }; | 
| 610 | 610 | |
| ... | ... | @@ -619,23 +619,23 @@ Page({ | 
| 619 | 619 | |
| 620 | 620 | //--导购分享过来的id-- | 
| 621 | 621 | if (gg.guide_id) { | 
| 622 | - goods.guide_id = gg.guide_id; | |
| 623 | - goods.guide_type = gg.guide_type; | |
| 624 | - //调用接口判断是不是会员 | |
| 625 | - await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + oo.stoid + "/" + gg.guide_id, {}).then( | |
| 626 | - res => { | |
| 627 | - if (res.data.code == 0) { | |
| 628 | - goods.guide_name = res.data.data.salesman; | |
| 629 | - goods.guide_sn = res.data.data.salesman_no; | |
| 630 | - } | |
| 631 | - }) | |
| 632 | - } | |
| 633 | - | |
| 634 | - if(gg.groupchat_id){ | |
| 635 | - goods.groupchat_id=gg.groupchat_id | |
| 636 | - } | |
| 637 | - console.log('goooooooooooooooooods', goods); | |
| 638 | - item.list.push(goods); | |
| 622 | + goods.guide_id = gg.guide_id; | |
| 623 | + goods.guide_type = gg.guide_type; | |
| 624 | + //调用接口判断是不是会员 | |
| 625 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/getId/" + oo.stoid + "/" + gg.guide_id, {}).then( | |
| 626 | + res => { | |
| 627 | + if (res.data.code == 0) { | |
| 628 | + goods.guide_name = res.data.data.salesman; | |
| 629 | + goods.guide_sn = res.data.data.salesman_no; | |
| 630 | + } | |
| 631 | + }) | |
| 632 | + } | |
| 633 | + | |
| 634 | + if(gg.groupchat_id){ | |
| 635 | + goods.groupchat_id=gg.groupchat_id | |
| 636 | + } | |
| 637 | + console.log('goooooooooooooooooods', goods); | |
| 638 | + item.list.push(goods); | |
| 639 | 639 | } | 
| 640 | 640 | |
| 641 | 641 | |
| ... | ... | @@ -835,4 +835,37 @@ Page({ | 
| 835 | 835 | }, | 
| 836 | 836 | |
| 837 | 837 | |
| 838 | + //立即购买的点击跳转 | |
| 839 | + go_view(){ | |
| 840 | + if(!this.data.postdata.prom_type) this.data.postdata.prom_type=0; | |
| 841 | + let url='packageA/pages/goodsInfo/goodsInfo?goods_id='+this.data.postdata.id; | |
| 842 | + switch(this.data.postdata.prom_type){ | |
| 843 | + case 1: | |
| 844 | + url+= '&prom_id='+this.data.postdata.prom_id+'&prom_type=1'; | |
| 845 | + break; | |
| 846 | + case 2: | |
| 847 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+this.data.postdata.id+"&prom_id="+this.data.postdata.prom_id; | |
| 848 | + break | |
| 849 | + } | |
| 850 | + getApp().goto(url); | |
| 851 | + }, | |
| 852 | + | |
| 853 | + //购物车购买的点击跳转 | |
| 854 | + go_cart_view(e){ | |
| 855 | + let idx = e.currentTarget.dataset.idx; | |
| 856 | + let pidx=e.currentTarget.dataset.pidx; | |
| 857 | + let item=this.data.cartlist[pidx].goods[idx]; | |
| 858 | + let url='packageA/pages/goodsInfo/goodsInfo?goods_id='+this.data.postdata.id; | |
| 859 | + switch(item.prom_type){ | |
| 860 | + case 1: | |
| 861 | + url+= '&prom_id='+item.prom_id+'&prom_type=1'; | |
| 862 | + break; | |
| 863 | + case 2: | |
| 864 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+item.service_id+"&prom_id="+item.prom_id; | |
| 865 | + break | |
| 866 | + } | |
| 867 | + getApp().goto(url); | |
| 868 | + | |
| 869 | + } | |
| 870 | + | |
| 838 | 871 | }); | ... | ... | 
packageA/pages/cart2_ser/cart2_ser.wxml
| ... | ... | @@ -10,14 +10,14 @@ | 
| 10 | 10 | <!-- <view>门店:{{item.pname}}</view> --> | 
| 11 | 11 | <view>{{item.pname}}</view> | 
| 12 | 12 | </view> | 
| 13 | - <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> | |
| 13 | + <view class="order-detail" bindtap="go_cart_view" data-idx="{{idx}}" data-pidx="{{pidx}}" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items"> | |
| 14 | 14 | <!----商品图片-----> | 
| 15 | 15 | <view class="goods-img" style="position: relative"> | 
| 16 | 16 | <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> | 
| 17 | 17 | <image class="wh100 bdr14" src="{{items.img_url}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].img_url'></image> | 
| 18 | 18 | </view> | 
| 19 | 19 | <!----商品名称规格----> | 
| 20 | - <navigator class="order-cont" url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{items.service_id}}"> | |
| 20 | + <navigator class="order-cont"> | |
| 21 | 21 | <view class="goods-name ellipsis-2">{{items.service_name}}</view> | 
| 22 | 22 | <!-----商品名称规格------> | 
| 23 | 23 | <view class="order-num flex-space-between"> | 
| ... | ... | @@ -33,12 +33,12 @@ | 
| 33 | 33 | <block wx:else> | 
| 34 | 34 | <view class="use-item bfff bdr_t-14 mgt20"> | 
| 35 | 35 | <image class="dp" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'> </image> <view>{{bn_pickname}}</view></view> | 
| 36 | - <view class="order-detail"> | |
| 36 | + <view class="order-detail" bindtap="go_view"> | |
| 37 | 37 | <view class="goods-img"> | 
| 38 | 38 | <image class="wh100 bdr14" src="{{bn_goods.original_img}}" | 
| 39 | 39 | binderror='cart_set_err' data-err="bn_goods.original_img"></image> | 
| 40 | 40 | </view> | 
| 41 | - <navigator class="order-cont" url="/packageA/goodsInfo/goodsInfo?goods_id={{bn_goods.id}}"> | |
| 41 | + <navigator class="order-cont"> | |
| 42 | 42 | <view class="goods-name ellipsis-2">{{bn_goods.serviceName}}</view> | 
| 43 | 43 | <!-- 商品属性 --> | 
| 44 | 44 | <!-- <view class="flex-vertical fs28 color-gray n_guige"> --> | ... | ... | 
packageA/pages/details_serviceCard/details_serviceCard.js
| ... | ... | @@ -261,13 +261,16 @@ Page({ | 
| 261 | 261 | if(arr2.length==1) { | 
| 262 | 262 | switch(arr2[0].prom_type){ | 
| 263 | 263 | case 1: | 
| 264 | - url+="&prom_type=1&prom_id="+arr[0].act_id; | |
| 264 | + url+="&prom_type=1&prom_id="+arr2[0].act_id; | |
| 265 | + break; | |
| 266 | + case 2: | |
| 267 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+goods_id+"&prom_id="+arr2[0].act_id; | |
| 265 | 268 | break; | 
| 266 | 269 | case 6: | 
| 267 | - url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${arr2[0].prom_type}&prom_id=${arr[0].act_id}`; | |
| 270 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`; | |
| 268 | 271 | break; | 
| 269 | 272 | case 8: | 
| 270 | - url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${goods_id}&prom_id=${arr[0].act_id}`; | |
| 273 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${goods_id}&prom_id=${arr2[0].act_id}`; | |
| 271 | 274 | break; | 
| 272 | 275 | } | 
| 273 | 276 | } | 
| ... | ... | @@ -440,7 +443,7 @@ Page({ | 
| 440 | 443 | var boughtNum = 0; | 
| 441 | 444 | |
| 442 | 445 | // 秒杀活动中购买 | 
| 443 | - if (prom_type == 1 && !is_pd_normal) { | |
| 446 | + if ((prom_type == 1 && !is_pd_normal) || prom_type==2) { | |
| 444 | 447 | |
| 445 | 448 | // 获取已购数量 | 
| 446 | 449 | await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum?store_id="+os.stoid+"&user_id="+getApp().globalData.user_id+"&card_id="+card_id+"&prom_type="+prom_type+"&prom_id="+prom_id, { | 
| ... | ... | @@ -449,20 +452,35 @@ Page({ | 
| 449 | 452 | }); | 
| 450 | 453 | |
| 451 | 454 | // 获取库存 | 
| 452 | - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/1/" + prom_id, {}).then(res => { | |
| 455 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/"+prom_type+"/" + prom_id, {}).then(res => { | |
| 453 | 456 | if (res.data.code == 0) { | 
| 454 | 457 | redisNums = !res.data.data ? 0 : res.data.data; | 
| 455 | - }; | |
| 456 | - }); | |
| 458 | + } | |
| 459 | + }) | |
| 457 | 460 | |
| 458 | 461 | // 获取限购数 | 
| 459 | 462 | var is_end = 1; | 
| 460 | - await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {}).then(res => { | |
| 461 | - if (res.data.code == 0) { | |
| 462 | - is_end = res.data.data.is_end; | |
| 463 | - limitNum = res.data.data.buy_limit; | |
| 464 | - } | |
| 465 | - }); | |
| 463 | + | |
| 464 | + switch (prom_type){ | |
| 465 | + case 1: | |
| 466 | + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + "/" + user_id + "/" + prom_id, {}).then(res => { | |
| 467 | + if (res.data.code == 0) { | |
| 468 | + is_end = res.data.data.is_end; | |
| 469 | + limitNum = res.data.data.buy_limit; | |
| 470 | + } | |
| 471 | + }); | |
| 472 | + break; | |
| 473 | + case 2: | |
| 474 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + details.list[i].card_id + "/" + prom_id, {}).then(res => { | |
| 475 | + if (res.data.code == 0) { | |
| 476 | + is_end = res.data.data.is_end; | |
| 477 | + limitNum = res.data.data.buy_limit; | |
| 478 | + } | |
| 479 | + }); | |
| 480 | + break; | |
| 481 | + } | |
| 482 | + | |
| 483 | + | |
| 466 | 484 | // 判断活动是否结束 | 
| 467 | 485 | if (is_end == 1) { | 
| 468 | 486 | wx.showModal({ | 
| ... | ... | @@ -658,14 +676,15 @@ Page({ | 
| 658 | 676 | |
| 659 | 677 | //秒杀活动和拼团活动要重新计算一下 | 
| 660 | 678 | for (const it of list) { | 
| 661 | - if (it.prom_type == 1) { | |
| 679 | + if ([1,2].includes(it.prom_type)) { | |
| 662 | 680 | let act_details = null; | 
| 663 | 681 | let redis_num = 0; | 
| 664 | 682 | let promcardbuynum = 0; | 
| 665 | 683 | let qty = it.qty; | 
| 666 | 684 | |
| 667 | 685 | |
| 668 | - await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
| 686 | + if(it.prom_type==1) | |
| 687 | + await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
| 669 | 688 | console.log('11111111====>>>'); | 
| 670 | 689 | if (res.data.code == 0) { | 
| 671 | 690 | console.log('当前的秒杀活动信息:', res.data.data); | 
| ... | ... | @@ -679,16 +698,6 @@ Page({ | 
| 679 | 698 | flag = false; | 
| 680 | 699 | return false; | 
| 681 | 700 | }; | 
| 682 | - if (act_details.id != it.prom_id) { | |
| 683 | - wx.showModal({ | |
| 684 | - title: '提示', | |
| 685 | - content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
| 686 | - showCancel: false, | |
| 687 | - }); | |
| 688 | - flag = false; | |
| 689 | - return false; | |
| 690 | - }; | |
| 691 | - | |
| 692 | 701 | |
| 693 | 702 | var t_now = ut.gettimestamp(); | 
| 694 | 703 | if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | 
| ... | ... | @@ -716,6 +725,46 @@ Page({ | 
| 716 | 725 | |
| 717 | 726 | }; | 
| 718 | 727 | }); | 
| 728 | + if(it.prom_type==2) | |
| 729 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + it.card_id + "/" + it.prom_id, {}).then(res => { | |
| 730 | + if (res.data.code == 0) { | |
| 731 | + console.log('当前的t团购活动信息:', res.data.data); | |
| 732 | + act_details = res.data.data; | |
| 733 | + if (act_details.is_end == 1) { | |
| 734 | + wx.showModal({ | |
| 735 | + title: '提示', | |
| 736 | + content: '活动已结束,无法支付,请取消订单!', | |
| 737 | + showCancel: false, | |
| 738 | + }); | |
| 739 | + flag = false; | |
| 740 | + return false; | |
| 741 | + }; | |
| 742 | + var t_now = ut.gettimestamp(); | |
| 743 | + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | |
| 744 | + wx.showModal({ | |
| 745 | + title: '提示', | |
| 746 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
| 747 | + showCancel: false, | |
| 748 | + }); | |
| 749 | + flag = false; | |
| 750 | + return false; | |
| 751 | + } | |
| 752 | + | |
| 753 | + //指定门店的控制 | |
| 754 | + if (act_details.pick_up_lists) { | |
| 755 | + var idx0=act_details.pick_up_lists.findIndex(function (e){ | |
| 756 | + return e.pickup_id==it.pickup_id; | |
| 757 | + }) | |
| 758 | + if(idx0<0){ | |
| 759 | + getApp().confirmBox(it.service_name + "秒杀活动的门店不可售"); | |
| 760 | + th.setData({ paying: 0 }); | |
| 761 | + flag = false; | |
| 762 | + return false; | |
| 763 | + } | |
| 764 | + } | |
| 765 | + | |
| 766 | + }; | |
| 767 | + }); | |
| 719 | 768 | |
| 720 | 769 | if(act_details && act_details.buy_limit>0 && flag){ | 
| 721 | 770 | await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | ... | ... | 
packageA/pages/goodsInfo/goodsInfo.js
| ... | ... | @@ -273,6 +273,8 @@ Page({ | 
| 273 | 273 | prom_id=gid_str[4]; | 
| 274 | 274 | that.data.options.prom_type= parseInt(gid_str[3]); | 
| 275 | 275 | that.data.options.prom_id=parseInt(gid_str[4]); | 
| 276 | + | |
| 277 | + | |
| 276 | 278 | } | 
| 277 | 279 | |
| 278 | 280 | this.setData({options: that.data.options}); | 
| ... | ... | @@ -996,6 +998,19 @@ Page({ | 
| 996 | 998 | await this.getactLen().then(async function(res) { | 
| 997 | 999 | redisNums = res; | 
| 998 | 1000 | let curNum = th.data.goodsInputNum; | 
| 1001 | + | |
| 1002 | + if(curNum > res) { // t当前增减的数量 | |
| 1003 | + // wx.showModal({ | |
| 1004 | + // title: '超出活动库存', | |
| 1005 | + // }); | |
| 1006 | + getApp().my_warnning('超出活动库存', 0, self); | |
| 1007 | + th.setData({ | |
| 1008 | + goodsInputNum: res || 1 | |
| 1009 | + }); | |
| 1010 | + is_ok=0; | |
| 1011 | + return false; | |
| 1012 | + } | |
| 1013 | + | |
| 999 | 1014 | // res: redis可购买数量 | 
| 1000 | 1015 | console.log('当前可以购买的数量:', res); | 
| 1001 | 1016 | if(res <= 0) { | 
| ... | ... | @@ -1026,24 +1041,9 @@ Page({ | 
| 1026 | 1041 | |
| 1027 | 1042 | if(canBuyNum <= 0) { | 
| 1028 | 1043 | canBuyNum = 0; | 
| 1029 | - }; | |
| 1030 | - | |
| 1031 | - if(canBuyNum > res) { | |
| 1032 | - if(curNum > res) { // t当前增减的数量 | |
| 1033 | - // wx.showModal({ | |
| 1034 | - // title: '超出活动库存', | |
| 1035 | - // }); | |
| 1036 | - getApp().my_warnning('超出活动库存', 0, self); | |
| 1037 | - th.setData({ | |
| 1038 | - goodsInputNum: res || 1 | |
| 1039 | - }); | |
| 1040 | - is_ok=0; | |
| 1041 | - return false; | |
| 1042 | - }; | |
| 1043 | - }; | |
| 1044 | - | |
| 1045 | - if(canBuyNum <= res) { | |
| 1046 | - if(curNum > canBuyNum) { | |
| 1044 | + } | |
| 1045 | + | |
| 1046 | + if(curNum > canBuyNum) { | |
| 1047 | 1047 | // wx.showModal({ | 
| 1048 | 1048 | // title: '超出限购数量', | 
| 1049 | 1049 | // }); | 
| ... | ... | @@ -1053,8 +1053,8 @@ Page({ | 
| 1053 | 1053 | }); | 
| 1054 | 1054 | is_ok=0; | 
| 1055 | 1055 | return false; | 
| 1056 | - } | |
| 1057 | 1056 | } | 
| 1057 | + | |
| 1058 | 1058 | }) | 
| 1059 | 1059 | |
| 1060 | 1060 | } | 
| ... | ... | @@ -1495,6 +1495,7 @@ Page({ | 
| 1495 | 1495 | is_collect: 0, | 
| 1496 | 1496 | collect_id: 0, | 
| 1497 | 1497 | }); | 
| 1498 | + ut.m_toast('取消成功'); | |
| 1498 | 1499 | } | 
| 1499 | 1500 | } | 
| 1500 | 1501 | }); | 
| ... | ... | @@ -1525,6 +1526,7 @@ Page({ | 
| 1525 | 1526 | is_collect: 1, | 
| 1526 | 1527 | collect_id: e.data.data.collect_id, | 
| 1527 | 1528 | }); | 
| 1529 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 1528 | 1530 | } | 
| 1529 | 1531 | } | 
| 1530 | 1532 | }); | 
| ... | ... | @@ -3473,7 +3475,8 @@ Page({ | 
| 3473 | 3475 | user_id: user_id, | 
| 3474 | 3476 | card_id: th.data.options.goods_id, | 
| 3475 | 3477 | prom_type: th.data.options.prom_type, | 
| 3476 | - prom_id: th.data.options.prom_id | |
| 3478 | + prom_id: th.data.options.prom_id, | |
| 3479 | + isnew:1 | |
| 3477 | 3480 | }, | 
| 3478 | 3481 | //-----获取----- | 
| 3479 | 3482 | success: function (tt) { | ... | ... | 
packageA/pages/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -109,13 +109,24 @@ | 
| 109 | 109 | |
| 110 | 110 | <view class="flex jc_sb"> | 
| 111 | 111 | <view> | 
| 112 | - <!-- 秒杀价 --> | |
| 113 | - <view class="co-red" wx:if="{{options.prom_type == 1}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(prom_price,2)}}</view> | |
| 114 | - <!-- 手店价 --> | |
| 115 | - <view class="co-red" wx:else><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view> | |
| 116 | - <!-- <view class="word-line fs20 xc-qtunit-price"> | |
| 117 | - 零售价¥{{filters.toFix(data.market_price,2)}} | |
| 118 | - </view> --> | |
| 112 | + <view class="flex" style="align-items: baseline;"> | |
| 113 | + <!-- 秒杀价 --> | |
| 114 | + <view class="co-red" wx:if="{{options.prom_type == 1}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(prom_price,2)}}</view> | |
| 115 | + <!-- 手店价 --> | |
| 116 | + <view class="co-red" wx:else><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view> | |
| 117 | + <view wx:if="{{options.prom_type == 1}}" class="word-line no_line_x fs20 xc-qtunit-price"> | |
| 118 | + <block wx:if="{{sys_switch.is_retail_price}}"> | |
| 119 | + ¥{{filters.toFix(data.show_price,2)}} | |
| 120 | + </block> | |
| 121 | + <block wx:else> | |
| 122 | + ¥{{filters.toFix(data.shop_price,2)}} | |
| 123 | + </block> | |
| 124 | + </view> | |
| 125 | + | |
| 126 | + </view> | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 119 | 130 | <view class="goods-title"> | 
| 120 | 131 | <view class="goods-name elli">{{data.goods_name}}</view> | 
| 121 | 132 | </view> | 
| ... | ... | @@ -136,8 +147,9 @@ | 
| 136 | 147 | |
| 137 | 148 | <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | 
| 138 | 149 | <view class="stock" wx:else>限购:不限</view> | 
| 139 | - <view class="sales">已售:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
| 140 | - | |
| 150 | + <view wx:if="{{prom_st>0}}" class="sales">已售:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
| 151 | + <view wx:else class="sales">已售:{{prom_act.buy_num}}件</view> | |
| 152 | + | |
| 141 | 153 | <!-- <block wx:if="{{prom_st==0}}"> | 
| 142 | 154 | <view class="sales">已购:0件</view> | 
| 143 | 155 | </block> --> | ... | ... | 
packageA/pages/serviceCard_pd/goodsInfo/goodsInfo.js
| ... | ... | @@ -267,10 +267,12 @@ Page({ | 
| 267 | 267 | if (gid_str.length > 2 && gid_str[2]) { | 
| 268 | 268 | room_id = parseInt(gid_str[2]); | 
| 269 | 269 | room_user_share = 1; | 
| 270 | - | |
| 271 | 270 | that.data.options.room_id=room_id; | 
| 271 | + } | |
| 272 | + if (gid_str.length > 3 && gid_str[3]){ | |
| 272 | 273 | that.data.options.prom_type= parseInt(gid_str[3]); | 
| 273 | 274 | that.data.options.prom_id=parseInt(gid_str[4]); | 
| 275 | + | |
| 274 | 276 | } | 
| 275 | 277 | |
| 276 | 278 | this.setData({options: that.data.options}); | 
| ... | ... | @@ -1083,6 +1085,7 @@ Page({ | 
| 1083 | 1085 | is_collect: 0, | 
| 1084 | 1086 | collect_id: 0, | 
| 1085 | 1087 | }); | 
| 1088 | + ut.m_toast('取消成功'); | |
| 1086 | 1089 | } | 
| 1087 | 1090 | } | 
| 1088 | 1091 | }); | 
| ... | ... | @@ -1111,6 +1114,7 @@ Page({ | 
| 1111 | 1114 | is_collect: 1, | 
| 1112 | 1115 | collect_id: e.data.data.collect_id, | 
| 1113 | 1116 | }); | 
| 1117 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 1114 | 1118 | } | 
| 1115 | 1119 | } | 
| 1116 | 1120 | }); | ... | ... | 
packageC/pages/group_list/group_list.js
| ... | ... | @@ -360,7 +360,15 @@ Page({ | 
| 360 | 360 | }, | 
| 361 | 361 | |
| 362 | 362 | goto(e) { | 
| 363 | - let url = e.currentTarget.dataset.url; | |
| 363 | + let index = e.currentTarget.dataset.index; | |
| 364 | + let pidx = e.currentTarget.dataset.pidx; | |
| 365 | + let item=this.data.list[pidx][index]; | |
| 366 | + | |
| 367 | + let url="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.id+"&prom_type=2"; | |
| 368 | + //-- 如果是服务卡项的时候 -- | |
| 369 | + if(item.goods_type==1){ | |
| 370 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.id; | |
| 371 | + } | |
| 364 | 372 | app.goto(url); | 
| 365 | 373 | }, | 
| 366 | 374 | ... | ... | 
packageC/pages/group_list/group_list.wxml
| ... | ... | @@ -4,7 +4,7 @@ | 
| 4 | 4 | <block wx:for="{{list}}" wx:for-item="p_item" wx:for-index="p_idx"> | 
| 5 | 5 | |
| 6 | 6 | <block wx:for="{{p_item}}"> | 
| 7 | - <view class="list-item" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=2"> | |
| 7 | + <view class="list-item" bindtap="goto" data-pidx="{{p_idx}}" data-index="{{index}}" > | |
| 8 | 8 | <view class="img-container"> | 
| 9 | 9 | <image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}" | 
| 10 | 10 | data-errorimg="list[{{p_idx}}][{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image> | ... | ... | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| ... | ... | @@ -11,7 +11,7 @@ var oo = t.globalData.setting, | 
| 11 | 11 | var regeneratorRuntime = require('../../../../utils/runtime.js'); | 
| 12 | 12 | var util_pay = require("../../../../utils/pay.js"); | 
| 13 | 13 | let self = null; | 
| 14 | - | |
| 14 | + | |
| 15 | 15 | Page({ | 
| 16 | 16 | data: { | 
| 17 | 17 | prom_type: 9, | 
| ... | ... | @@ -87,6 +87,8 @@ Page({ | 
| 87 | 87 | can_use_ord_prom:{}, | 
| 88 | 88 | //存储订单促销的取价,按照门店进行索引 | 
| 89 | 89 | show_ord_prom:{}, | 
| 90 | + sameCityExp_off:0, //未达到起送价 | |
| 91 | + sameCityExp_info:'',//未达到起送价提示信息 | |
| 90 | 92 | }, | 
| 91 | 93 | |
| 92 | 94 | |
| ... | ... | @@ -144,6 +146,8 @@ Page({ | 
| 144 | 146 | title: '填写订单', | 
| 145 | 147 | }); | 
| 146 | 148 | self = this; | 
| 149 | + | |
| 150 | + t.goods_price_y=t.goods_price; | |
| 147 | 151 | this.setData({ | 
| 148 | 152 | is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, | 
| 149 | 153 | param: t, | 
| ... | ... | @@ -576,7 +580,6 @@ Page({ | 
| 576 | 580 | |
| 577 | 581 | } | 
| 578 | 582 | |
| 579 | - | |
| 580 | 583 | t.data.data.goods_price=th.data.param.goods_price; | 
| 581 | 584 | |
| 582 | 585 | //用深拷贝把商品缓存起来,方便后面使用 | 
| ... | ... | @@ -748,6 +751,13 @@ Page({ | 
| 748 | 751 | } | 
| 749 | 752 | } | 
| 750 | 753 | |
| 754 | + //价格要返回,在重新进来的时候 | |
| 755 | + let goods_price_y=this.data.param.goods_price_y; | |
| 756 | + this.setData({ | |
| 757 | + show_ord_prom:{}, | |
| 758 | + can_use_ord_prom:{}, | |
| 759 | + 'param.goods_price':goods_price_y | |
| 760 | + }) | |
| 751 | 761 | |
| 752 | 762 | //先获取是否有关闭使用优惠券 | 
| 753 | 763 | getApp().getConfig2(function (ee) { | 
| ... | ... | @@ -1073,7 +1083,22 @@ Page({ | 
| 1073 | 1083 | if (res.data.code == 0) { | 
| 1074 | 1084 | var wl_txt = "formData.shipping_price"; | 
| 1075 | 1085 | th.setData({ [wl_txt]: res.data.data, }) | 
| 1086 | + th.setData({ | |
| 1087 | + sameCityExp_off:0, | |
| 1088 | + sameCityExp_info:'' | |
| 1089 | + }) | |
| 1076 | 1090 | } else { | 
| 1091 | + if (res.data.code==-2) { //未达到起送价 | |
| 1092 | + th.setData({ | |
| 1093 | + sameCityExp_off:2, | |
| 1094 | + sameCityExp_info:res.data.msg | |
| 1095 | + }) | |
| 1096 | + }else{ | |
| 1097 | + th.setData({ | |
| 1098 | + sameCityExp_off:1, | |
| 1099 | + sameCityExp_info:res.data.msg | |
| 1100 | + }) | |
| 1101 | + } | |
| 1077 | 1102 | is_next = 0; | 
| 1078 | 1103 | wx.showToast({ | 
| 1079 | 1104 | title: res.data.msg, icon: 'none', duration: 2000 | 
| ... | ... | @@ -1821,7 +1846,10 @@ Page({ | 
| 1821 | 1846 | var th = this; | 
| 1822 | 1847 | var ty = t.currentTarget.dataset.t; | 
| 1823 | 1848 | th.setData({ | 
| 1824 | - bn_exp_type: ty,same_ok:1 | |
| 1849 | + bn_exp_type: ty, | |
| 1850 | + same_ok:1, | |
| 1851 | + sameCityExp_off:0, | |
| 1852 | + sameCityExp_info:'', | |
| 1825 | 1853 | }); | 
| 1826 | 1854 | //当物流为空的时候。 | 
| 1827 | 1855 | if (ty == 0 && th.data.wu_arr == null) { | 
| ... | ... | @@ -2344,6 +2372,10 @@ Page({ | 
| 2344 | 2372 | } | 
| 2345 | 2373 | func(isok); | 
| 2346 | 2374 | }, | 
| 2375 | + //去凑单 | |
| 2376 | + qcd(){ | |
| 2377 | + getApp().goto("/pages/index/index/index"); | |
| 2378 | + }, | |
| 2347 | 2379 | |
| 2348 | 2380 | |
| 2349 | 2381 | }); | ... | ... | 
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.wxml
| ... | ... | @@ -9,7 +9,7 @@ | 
| 9 | 9 | |
| 10 | 10 | <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">快递邮寄</view> | 
| 11 | 11 | |
| 12 | - <!-- 同城配送 --> | |
| 12 | + <!-- 同城配送 --> | |
| 13 | 13 | <block wx:if="{{show_same_city}}"> | 
| 14 | 14 | <view hidden="{{bn_t_exp_t==3}}" bindtap='setexptype' data-t='2' class="tab {{bn_exp_type== 2 ? 'active':''}}" data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}">同城配送</view> | 
| 15 | 15 | </block> | 
| ... | ... | @@ -221,11 +221,22 @@ | 
| 221 | 221 | </view> | 
| 222 | 222 | |
| 223 | 223 | <view class="btn-wrap" wx:if="{{is_show_sub}}"> | 
| 224 | - <view class="pay-amount"> | |
| 225 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 226 | - <!-- <view class="co-red big"></view> --> | |
| 227 | - </view> | |
| 228 | - <button disabled="{{sub || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 224 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
| 225 | + <view class="pay-amount"> | |
| 226 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
| 227 | + <!-- <view class="co-red big"></view> --> | |
| 228 | + </view> | |
| 229 | + <!-- <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> --> | |
| 230 | + </block> | |
| 231 | + <block wx:else> | |
| 232 | + <view class="pay-amount"> | |
| 233 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 234 | + <!-- <view class="co-red big"></view> --> | |
| 235 | + </view> | |
| 236 | + <button disabled="{{sub || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 237 | + </block> | |
| 238 | + | |
| 239 | + | |
| 229 | 240 | </view> | 
| 230 | 241 | </form> | 
| 231 | 242 | ... | ... | 
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -2535,6 +2535,7 @@ Page({ | 
| 2535 | 2535 | is_collect: 0, | 
| 2536 | 2536 | collect_id: 0, | 
| 2537 | 2537 | }); | 
| 2538 | + ut.m_toast('取消成功'); | |
| 2538 | 2539 | } | 
| 2539 | 2540 | } | 
| 2540 | 2541 | }); | 
| ... | ... | @@ -2564,6 +2565,7 @@ Page({ | 
| 2564 | 2565 | is_collect: 1, | 
| 2565 | 2566 | collect_id: e.data.data.collect_id, | 
| 2566 | 2567 | }); | 
| 2568 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 2567 | 2569 | } | 
| 2568 | 2570 | } | 
| 2569 | 2571 | }); | ... | ... | 
packageC/pages/presell/cardInfo/goodsInfo.js
| ... | ... | @@ -1247,6 +1247,7 @@ Page({ | 
| 1247 | 1247 | is_collect: 0, | 
| 1248 | 1248 | collect_id: 0, | 
| 1249 | 1249 | }); | 
| 1250 | + ut.m_toast('取消成功'); | |
| 1250 | 1251 | } | 
| 1251 | 1252 | } | 
| 1252 | 1253 | }); | 
| ... | ... | @@ -1277,6 +1278,7 @@ Page({ | 
| 1277 | 1278 | is_collect: 1, | 
| 1278 | 1279 | collect_id: e.data.data.collect_id, | 
| 1279 | 1280 | }); | 
| 1281 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 1280 | 1282 | } | 
| 1281 | 1283 | } | 
| 1282 | 1284 | }); | ... | ... | 
packageC/pages/presell/cart/cart.js
| ... | ... | @@ -123,7 +123,9 @@ Page({ | 
| 123 | 123 | bconfig: null, | 
| 124 | 124 | showFold:true, | 
| 125 | 125 | |
| 126 | - is_fwk:0, //-- 是不是服务卡项的购买 -- | |
| 126 | + is_fwk:0, //-- 是不是服务卡项的购买 -- | |
| 127 | + sameCityExp_off:0, //未达到起送价 | |
| 128 | + sameCityExp_info:'',//未达到起送价提示信息 | |
| 127 | 129 | }, | 
| 128 | 130 | |
| 129 | 131 | |
| ... | ... | @@ -2526,7 +2528,22 @@ Page({ | 
| 2526 | 2528 | }).then(res => { | 
| 2527 | 2529 | if (res.data.code == 0) { | 
| 2528 | 2530 | shipping_price = res.data.data; | 
| 2531 | + th.setData({ | |
| 2532 | + sameCityExp_off:0, | |
| 2533 | + sameCityExp_info:'' | |
| 2534 | + }) | |
| 2529 | 2535 | } else { | 
| 2536 | + if (res.data.code==-2) { //未达到起送价 | |
| 2537 | + th.setData({ | |
| 2538 | + sameCityExp_off:2, | |
| 2539 | + sameCityExp_info:res.data.msg | |
| 2540 | + }) | |
| 2541 | + }else{ | |
| 2542 | + th.setData({ | |
| 2543 | + sameCityExp_off:1, | |
| 2544 | + sameCityExp_info:res.data.msg | |
| 2545 | + }) | |
| 2546 | + } | |
| 2530 | 2547 | is_next = 0; | 
| 2531 | 2548 | wx.showToast({ | 
| 2532 | 2549 | title: res.data.msg, icon: 'none', duration: 2000 | 
| ... | ... | @@ -2595,10 +2612,14 @@ Page({ | 
| 2595 | 2612 | } | 
| 2596 | 2613 | }) | 
| 2597 | 2614 | var gd_w = good['weight'] * good['buynum']; | 
| 2615 | + //这个不是取尾款而是取总金额 | |
| 2616 | + let order_amount = parseFloat(o_condition); | |
| 2617 | + // var o_condition1 = parseFloat(o_condition); | |
| 2618 | + if (order_amount < 0) order_amount = 0; | |
| 2598 | 2619 | //-- 获取距离 -- | 
| 2599 | 2620 | var req_data = { | 
| 2600 | 2621 | store_id: os.stoid, | 
| 2601 | - order_amount: parseFloat(o_condition1), | |
| 2622 | + order_amount: parseFloat(order_amount), | |
| 2602 | 2623 | lon: lon, lat: lat, | 
| 2603 | 2624 | pickup_id: bn_pick, | 
| 2604 | 2625 | goods_weight: gd_w, | 
| ... | ... | @@ -2612,7 +2633,22 @@ Page({ | 
| 2612 | 2633 | }).then(res => { | 
| 2613 | 2634 | if (res.data.code == 0) { | 
| 2614 | 2635 | shipping_price = res.data.data; | 
| 2636 | + th.setData({ | |
| 2637 | + sameCityExp_off:0, | |
| 2638 | + sameCityExp_info:'' | |
| 2639 | + }) | |
| 2615 | 2640 | } else { | 
| 2641 | + if (res.data.code==-2) { //未达到起送价 | |
| 2642 | + th.setData({ | |
| 2643 | + sameCityExp_off:2, | |
| 2644 | + sameCityExp_info:res.data.msg | |
| 2645 | + }) | |
| 2646 | + }else{ | |
| 2647 | + th.setData({ | |
| 2648 | + sameCityExp_off:1, | |
| 2649 | + sameCityExp_info:res.data.msg | |
| 2650 | + }) | |
| 2651 | + } | |
| 2616 | 2652 | is_next = 0; | 
| 2617 | 2653 | wx.showToast({ | 
| 2618 | 2654 | title: res.data.msg, icon: 'none', duration: 2000 | 
| ... | ... | @@ -2927,7 +2963,10 @@ Page({ | 
| 2927 | 2963 | set_wuliu: function (e) { | 
| 2928 | 2964 | var type = e.currentTarget.dataset.type; | 
| 2929 | 2965 | this.setData({ | 
| 2930 | - exp_type: type,same_ok:1 | |
| 2966 | + exp_type: type, | |
| 2967 | + same_ok:1, | |
| 2968 | + sameCityExp_off:0, | |
| 2969 | + sameCityExp_info:'', | |
| 2931 | 2970 | }); | 
| 2932 | 2971 | this.calculatePrice2(); | 
| 2933 | 2972 | }, | 
| ... | ... | @@ -3443,7 +3482,12 @@ Page({ | 
| 3443 | 3482 | //-- 查看物流 -- | 
| 3444 | 3483 | go_wuliu:function (e) { | 
| 3445 | 3484 | getApp().go_wuliu(e); | 
| 3446 | - } | |
| 3485 | + }, | |
| 3486 | + //去凑单 | |
| 3487 | + qcd(){ | |
| 3488 | + getApp().goto("/pages/index/index/index"); | |
| 3489 | + }, | |
| 3490 | + | |
| 3447 | 3491 | |
| 3448 | 3492 | |
| 3449 | 3493 | ... | ... | 
packageC/pages/presell/cart/cart.wxml
| ... | ... | @@ -388,14 +388,26 @@ | 
| 388 | 388 | 请于{{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒内付款完成,超时订单将自动取消 | 
| 389 | 389 | </view> | 
| 390 | 390 | |
| 391 | - <view class="btn-wrap" hidden="{{disabled_btn}}"> | |
| 391 | + <view class="btn-wrap" > | |
| 392 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
| 392 | 393 | <view class="pay-amount"> | 
| 394 | + <view class="payable"> | |
| 395 | + <text class="co-red fs24">{{sameCityExp_info}}</text> | |
| 396 | + </view> | |
| 397 | + </view> | |
| 398 | + <!-- <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> --> | |
| 399 | + <!-- <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> --> | |
| 400 | + </block> | |
| 401 | + <block wx:else> | |
| 402 | + <view class="pay-amount" hidden="{{disabled_btn}}"> | |
| 393 | 403 | <view class="payable">应付金额: | 
| 394 | 404 | <text class="co-red"> <text class="fs24">¥</text>{{filters.toFix(order_m,2)}}</text> | 
| 395 | 405 | </view> | 
| 396 | 406 | </view> | 
| 397 | 407 | <button wx:if="{{no_start || is_end || is_complete}}" class="tips-btn gray">支付尾款</button> | 
| 398 | 408 | <button wx:else class="tips-btn" bindtap="show_pay" hidden="{{!show_submit || !same_ok}}">支付尾款</button> | 
| 409 | + </block> | |
| 410 | + | |
| 399 | 411 | <!-- 预售 --> | 
| 400 | 412 | <!-- <button class="tips-btn" formType="submit" id="submitOrder">立即支付</button> --> | 
| 401 | 413 | </view> | ... | ... | 
packageC/pages/presell/cart/cart2.js
| ... | ... | @@ -142,6 +142,8 @@ Page({ | 
| 142 | 142 | can_use_ord_prom:{}, | 
| 143 | 143 | //存储订单促销的取价,按照门店进行索引 | 
| 144 | 144 | show_ord_prom:{}, | 
| 145 | + sameCityExp_off:0, //未达到起送价 | |
| 146 | + sameCityExp_info:'',//未达到起送价提示信息 | |
| 145 | 147 | }, | 
| 146 | 148 | |
| 147 | 149 | |
| ... | ... | @@ -282,6 +284,11 @@ Page({ | 
| 282 | 284 | }); | 
| 283 | 285 | } | 
| 284 | 286 | |
| 287 | + this.setData({ | |
| 288 | + show_ord_prom:{}, | |
| 289 | + can_use_ord_prom:{} | |
| 290 | + }) | |
| 291 | + | |
| 285 | 292 | |
| 286 | 293 | th.data.g_cart_q_time = null; | 
| 287 | 294 | if (th.data.isclose == 0) { | 
| ... | ... | @@ -841,8 +848,8 @@ Page({ | 
| 841 | 848 | // return false; | 
| 842 | 849 | // } | 
| 843 | 850 | |
| 844 | - th.setData({dis_btn:1}) | |
| 845 | - this.data.submit=0; | |
| 851 | + th.setData({dis_btn:1,submit:1}) | |
| 852 | + //this.data.submit=0; | |
| 846 | 853 | |
| 847 | 854 | wx.showLoading({ | 
| 848 | 855 | title: "处理中.",mask:true | 
| ... | ... | @@ -1181,7 +1188,22 @@ Page({ | 
| 1181 | 1188 | if (res.data.code == 0) { | 
| 1182 | 1189 | var wl_txt = "formData.shipping_price"; | 
| 1183 | 1190 | th.setData({ [wl_txt]: res.data.data, }) | 
| 1191 | + th.setData({ | |
| 1192 | + sameCityExp_off:0, | |
| 1193 | + sameCityExp_info:'' | |
| 1194 | + }) | |
| 1184 | 1195 | }else{ | 
| 1196 | + if (res.data.code==-2) { //未达到起送价 | |
| 1197 | + th.setData({ | |
| 1198 | + sameCityExp_off:2, | |
| 1199 | + sameCityExp_info:res.data.msg | |
| 1200 | + }) | |
| 1201 | + }else{ | |
| 1202 | + th.setData({ | |
| 1203 | + sameCityExp_off:1, | |
| 1204 | + sameCityExp_info:res.data.msg | |
| 1205 | + }) | |
| 1206 | + } | |
| 1185 | 1207 | is_next=0; | 
| 1186 | 1208 | wx.showToast({ | 
| 1187 | 1209 | title: res.data.msg, icon: 'none', duration: 2000 | 
| ... | ... | @@ -1244,14 +1266,14 @@ Page({ | 
| 1244 | 1266 | if (th.data.bn_use_money == 1) { | 
| 1245 | 1267 | if (amoney > order_m) { | 
| 1246 | 1268 | order_m = parseFloat(order_m).toFixed(2); | 
| 1247 | - th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price, show_submit: 1,dis_btn:0 }) | |
| 1269 | + th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price,submit: 0, show_submit: 1,dis_btn:0 }) | |
| 1248 | 1270 | } else { | 
| 1249 | 1271 | order_m = parseFloat(order_m) - parseFloat(amoney); | 
| 1250 | 1272 | order_m = order_m.toFixed(2); | 
| 1251 | - th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,dis_btn:0 }) | |
| 1273 | + th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price,submit: 0, show_submit: 1,dis_btn:0 }) | |
| 1252 | 1274 | } | 
| 1253 | 1275 | } else { | 
| 1254 | - th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,dis_btn:0 }) | |
| 1276 | + th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price,submit: 0, show_submit: 1,dis_btn:0 }) | |
| 1255 | 1277 | } | 
| 1256 | 1278 | //优惠活动送积分 | 
| 1257 | 1279 | if (good.s_intValue) { | 
| ... | ... | @@ -2261,7 +2283,7 @@ Page({ | 
| 2261 | 2283 | setexptype: function (t) { | 
| 2262 | 2284 | var th = this; | 
| 2263 | 2285 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; | 
| 2264 | - th.setData({ bn_exp_type: ty,same_ok:1 }); | |
| 2286 | + th.setData({ bn_exp_type: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); | |
| 2265 | 2287 | if (ty == 0) { | 
| 2266 | 2288 | th.setData({ is_all_zt: 0 }); | 
| 2267 | 2289 | } | 
| ... | ... | @@ -3348,7 +3370,7 @@ Page({ | 
| 3348 | 3370 | //立即购买的时候,点击订单促销的参与 | 
| 3349 | 3371 | set_can_use_ord_prom_now:function (e){ | 
| 3350 | 3372 | |
| 3351 | - if(this.data.submit || this.data.dis_btn) return false; | |
| 3373 | + if(this.data.submit) return false; | |
| 3352 | 3374 | this.data.submit=1; | 
| 3353 | 3375 | |
| 3354 | 3376 | let pickid=this.data.bn_pick; | 
| ... | ... | @@ -3400,7 +3422,11 @@ Page({ | 
| 3400 | 3422 | if(!th.data.can_use_ord_prom[pickid]){ | 
| 3401 | 3423 | th.get_buy_now_quan(); | 
| 3402 | 3424 | } | 
| 3403 | - } | |
| 3425 | + }, | |
| 3426 | + //去凑单 | |
| 3427 | + qcd(){ | |
| 3428 | + getApp().goto("/pages/index/index/index"); | |
| 3429 | + }, | |
| 3404 | 3430 | |
| 3405 | 3431 | |
| 3406 | 3432 | ... | ... | 
packageC/pages/presell/cart/cart2.wxml
| ... | ... | @@ -272,10 +272,21 @@ | 
| 272 | 272 | </view> | 
| 273 | 273 | |
| 274 | 274 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> | 
| 275 | - <view class="pay-amount"> | |
| 276 | - <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> | |
| 277 | - </view> | |
| 278 | - <button disabled="{{dis_btn}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 275 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
| 276 | + <view class="pay-amount"> | |
| 277 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
| 278 | + </view> | |
| 279 | + <button class="tips-btn" catchtap="qcd">去凑单</button> | |
| 280 | + </block> | |
| 281 | + <block wx:else> | |
| 282 | + <view class="pay-amount"> | |
| 283 | + <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> | |
| 284 | + </view> | |
| 285 | + <button disabled="{{dis_btn}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 286 | + </block> | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 279 | 290 | </view> | 
| 280 | 291 | </form> | 
| 281 | 292 | ... | ... | 
packageC/pages/presell/goodsInfo/goodsInfo.js
| ... | ... | @@ -1603,6 +1603,7 @@ Page({ | 
| 1603 | 1603 | is_collect: 0, | 
| 1604 | 1604 | collect_id: 0, | 
| 1605 | 1605 | }); | 
| 1606 | + ut.m_toast('取消成功'); | |
| 1606 | 1607 | } | 
| 1607 | 1608 | } | 
| 1608 | 1609 | }); | 
| ... | ... | @@ -1632,6 +1633,7 @@ Page({ | 
| 1632 | 1633 | is_collect: 1, | 
| 1633 | 1634 | collect_id: e.data.data.collect_id, | 
| 1634 | 1635 | }); | 
| 1636 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 1635 | 1637 | } | 
| 1636 | 1638 | } | 
| 1637 | 1639 | }); | ... | ... | 
packageC/pages/presell/pregoodsInfo/goodsInfo.js
| ... | ... | @@ -1483,6 +1483,7 @@ Page({ | 
| 1483 | 1483 | is_collect: 0, | 
| 1484 | 1484 | collect_id: 0, | 
| 1485 | 1485 | }); | 
| 1486 | + ut.m_toast('取消成功'); | |
| 1486 | 1487 | } | 
| 1487 | 1488 | } | 
| 1488 | 1489 | }); | 
| ... | ... | @@ -1510,6 +1511,7 @@ Page({ | 
| 1510 | 1511 | is_collect: 1, | 
| 1511 | 1512 | collect_id: e.data.data.collect_id, | 
| 1512 | 1513 | }); | 
| 1514 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 1513 | 1515 | } | 
| 1514 | 1516 | } | 
| 1515 | 1517 | }); | ... | ... | 
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -186,7 +186,8 @@ Page({ | 
| 186 | 186 | can_use_ord_prom:{}, | 
| 187 | 187 | //存储订单促销的取价,按照门店进行索引 | 
| 188 | 188 | show_ord_prom:{}, | 
| 189 | - | |
| 189 | + sameCityExp_off:0, //未达到起送价 | |
| 190 | + sameCityExp_info:'',//未达到起送价提示信息 | |
| 190 | 191 | }, | 
| 191 | 192 | |
| 192 | 193 | |
| ... | ... | @@ -3691,8 +3692,23 @@ Page({ | 
| 3691 | 3692 | await getApp().request.promisePost("/api/weshop/order/sameCityExp/getMoney", { is_json: 1, data: req_data }).then(res => { | 
| 3692 | 3693 | if (res.data.code == 0) { | 
| 3693 | 3694 | cart_item.shipping_price = res.data.data; | 
| 3695 | + th.setData({ | |
| 3696 | + sameCityExp_off:0, | |
| 3697 | + sameCityExp_info:'' | |
| 3698 | + }) | |
| 3694 | 3699 | } else { | 
| 3695 | - is_next = 0; | |
| 3700 | + if (res.data.code==-2) { //未达到起送价 | |
| 3701 | + th.setData({ | |
| 3702 | + sameCityExp_off:2, | |
| 3703 | + sameCityExp_info:res.data.msg | |
| 3704 | + }) | |
| 3705 | + }else{ | |
| 3706 | + th.setData({ | |
| 3707 | + sameCityExp_off:1, | |
| 3708 | + sameCityExp_info:res.data.msg | |
| 3709 | + }) | |
| 3710 | + } | |
| 3711 | + // is_next = 0; | |
| 3696 | 3712 | |
| 3697 | 3713 | if (qfunc) qfunc(); | 
| 3698 | 3714 | else { | 
| ... | ... | @@ -4532,9 +4548,23 @@ Page({ | 
| 4532 | 4548 | if (res.data.code == 0) { | 
| 4533 | 4549 | var wl_txt = "formData.shipping_price"; | 
| 4534 | 4550 | th.setData({ [wl_txt]: res.data.data, }) | 
| 4535 | - | |
| 4551 | + th.setData({ | |
| 4552 | + sameCityExp_off:0, | |
| 4553 | + sameCityExp_info:'' | |
| 4554 | + }) | |
| 4536 | 4555 | } else { | 
| 4537 | - is_next = 0; | |
| 4556 | + if (res.data.code==-2) { //未达到起送价 | |
| 4557 | + th.setData({ | |
| 4558 | + sameCityExp_off:2, | |
| 4559 | + sameCityExp_info:res.data.msg | |
| 4560 | + }) | |
| 4561 | + }else{ | |
| 4562 | + th.setData({ | |
| 4563 | + sameCityExp_off:1, | |
| 4564 | + sameCityExp_info:res.data.msg | |
| 4565 | + }) | |
| 4566 | + } | |
| 4567 | + // is_next = 0; | |
| 4538 | 4568 | if (qfunc) { | 
| 4539 | 4569 | qfunc(); | 
| 4540 | 4570 | } else { | 
| ... | ... | @@ -7722,7 +7752,7 @@ Page({ | 
| 7722 | 7752 | setexptype2: function (e) { | 
| 7723 | 7753 | |
| 7724 | 7754 | if(this.data.submit) return false; | 
| 7725 | - this.setData({ submit: 1,same_ok:1 }); | |
| 7755 | + this.setData({ submit: 1,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); | |
| 7726 | 7756 | |
| 7727 | 7757 | if(this.data.all_collocation_list){ | 
| 7728 | 7758 | var bn_coll= this.selectComponent('#bn_coll'); | 
| ... | ... | @@ -7741,7 +7771,7 @@ Page({ | 
| 7741 | 7771 | setexptype_w2: function (e) { | 
| 7742 | 7772 | |
| 7743 | 7773 | if(this.data.submit) return false; | 
| 7744 | - this.setData({ submit: 1,same_ok:1 }); | |
| 7774 | + this.setData({ submit: 1,same_ok:1,sameCityExp_off:0, sameCityExp_info:'',}); | |
| 7745 | 7775 | |
| 7746 | 7776 | for (let i = 0; i <this.data.cartlist.length ; i++) { | 
| 7747 | 7777 | |
| ... | ... | @@ -9164,7 +9194,12 @@ Page({ | 
| 9164 | 9194 | if(!th.data.can_use_ord_prom[pickid]){ | 
| 9165 | 9195 | th.get_buy_now_quan(); | 
| 9166 | 9196 | } | 
| 9167 | - } | |
| 9197 | + }, | |
| 9198 | + | |
| 9199 | + //去凑单 | |
| 9200 | + qcd(){ | |
| 9201 | + getApp().goto("/pages/index/index/index"); | |
| 9202 | + }, | |
| 9168 | 9203 | |
| 9169 | 9204 | |
| 9170 | 9205 | ... | ... | 
packageE/pages/cart/cart2/cart2.wxml
| ... | ... | @@ -841,12 +841,21 @@ | 
| 841 | 841 | </view> | 
| 842 | 842 | |
| 843 | 843 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> | 
| 844 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
| 845 | + <view class="pay-amount"> | |
| 846 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text> | |
| 847 | + </view> | |
| 848 | + </view> | |
| 849 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn " catchtap="qcd">去凑单</button> | |
| 850 | + </block> | |
| 851 | + <block wx:else> | |
| 844 | 852 | <view class="pay-amount"> | 
| 845 | 853 | <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view> | 
| 846 | 854 | <!-- <view class="co-red big"></view> --> | 
| 847 | 855 | </view> | 
| 848 | 856 | <button class="tips-btn" formType="submit" id="submitOrder" | 
| 849 | 857 | disabled="{{submit || !same_ok}}" bindtap="requestSubscribe">提交订单</button> | 
| 858 | + </block> | |
| 850 | 859 | </view> | 
| 851 | 860 | </form> | 
| 852 | 861 | ... | ... | 
packageE/pages/cart/cart2/zh_calculate.js
packageE/pages/cart/cart2_inte/cart2_inte.js
| ... | ... | @@ -93,6 +93,8 @@ Page({ | 
| 93 | 93 | can_use_ord_prom:{}, | 
| 94 | 94 | //存储订单促销的取价,按照门店进行索引 | 
| 95 | 95 | show_ord_prom:{}, | 
| 96 | + sameCityExp_off:0, //未达到起送价 | |
| 97 | + sameCityExp_info:'',//未达到起送价提示信息 | |
| 96 | 98 | }, | 
| 97 | 99 | |
| 98 | 100 | |
| ... | ... | @@ -1029,7 +1031,22 @@ Page({ | 
| 1029 | 1031 | if (res.data.code == 0) { | 
| 1030 | 1032 | var wl_txt = "formData.shipping_price"; | 
| 1031 | 1033 | th.setData({ [wl_txt]: res.data.data, }) | 
| 1034 | + th.setData({ | |
| 1035 | + sameCityExp_off:0, | |
| 1036 | + sameCityExp_info:'' | |
| 1037 | + }) | |
| 1032 | 1038 | }else{ | 
| 1039 | + if (res.data.code==-2) { //未达到起送价 | |
| 1040 | + th.setData({ | |
| 1041 | + sameCityExp_off:2, | |
| 1042 | + sameCityExp_info:res.data.msg | |
| 1043 | + }) | |
| 1044 | + }else{ | |
| 1045 | + th.setData({ | |
| 1046 | + sameCityExp_off:1, | |
| 1047 | + sameCityExp_info:res.data.msg | |
| 1048 | + }) | |
| 1049 | + } | |
| 1033 | 1050 | is_next=0; | 
| 1034 | 1051 | wx.showToast({ | 
| 1035 | 1052 | title: res.data.msg, icon: 'none', duration: 2000 | 
| ... | ... | @@ -1637,7 +1654,7 @@ Page({ | 
| 1637 | 1654 | var th = this; | 
| 1638 | 1655 | var ty = t.currentTarget.dataset.t, def_exp_code = getApp().globalData.userInfo.def_exp_code; | 
| 1639 | 1656 | |
| 1640 | - th.setData({ bn_exp_type: ty,same_ok:1 }); | |
| 1657 | + th.setData({ bn_exp_type: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); | |
| 1641 | 1658 | //当物流为空的时候。 | 
| 1642 | 1659 | if (ty == 0 && th.data.wu_arr == null) { | 
| 1643 | 1660 | th.data.isget_by_quan = {}; | 
| ... | ... | @@ -1963,7 +1980,11 @@ Page({ | 
| 1963 | 1980 | mark:true | 
| 1964 | 1981 | }) | 
| 1965 | 1982 | th.calculatePrice2() | 
| 1966 | - } | |
| 1983 | + }, | |
| 1984 | + //去凑单 | |
| 1985 | + qcd(){ | |
| 1986 | + getApp().goto("/pages/index/index/index"); | |
| 1987 | + }, | |
| 1967 | 1988 | |
| 1968 | 1989 | |
| 1969 | 1990 | ... | ... | 
packageE/pages/cart/cart2_inte/cart2_inte.wxml
| ... | ... | @@ -216,11 +216,21 @@ | 
| 216 | 216 | |
| 217 | 217 | |
| 218 | 218 | <view class="btn-wrap shadow-1" wx:if="{{show_submit}}"> | 
| 219 | - <view class="pay-amount"> | |
| 220 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 221 | - <view hidden="{{can_use_ord_prom && can_use_ord_prom[bn_pick] }}" class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> | |
| 222 | - </view> | |
| 223 | - <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 219 | + | |
| 220 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
| 221 | + <view class="pay-amount"> | |
| 222 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
| 223 | + <!-- <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> --> | |
| 224 | + </view> | |
| 225 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | |
| 226 | + </block> | |
| 227 | + <block wx:else> | |
| 228 | + <view class="pay-amount"> | |
| 229 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 230 | + <view class="payable">应付积分:<text class="co-red">{{formData.integral}}积分</text></view> | |
| 231 | + </view> | |
| 232 | + <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 233 | + </block> | |
| 224 | 234 | </view> | 
| 225 | 235 | </form> | 
| 226 | 236 | ... | ... | 
packageE/pages/cart/cart2_pt/cart2_pt.js
| ... | ... | @@ -97,6 +97,8 @@ Page({ | 
| 97 | 97 | can_use_ord_prom:{}, | 
| 98 | 98 | //存储订单促销的取价,按照门店进行索引 | 
| 99 | 99 | show_ord_prom:{}, | 
| 100 | + sameCityExp_off:0, //未达到起送价 | |
| 101 | + sameCityExp_info:'',//未达到起送价提示信息 | |
| 100 | 102 | }, | 
| 101 | 103 | |
| 102 | 104 | |
| ... | ... | @@ -686,6 +688,11 @@ Page({ | 
| 686 | 688 | } | 
| 687 | 689 | } | 
| 688 | 690 | |
| 691 | + this.setData({ | |
| 692 | + show_ord_prom:{}, | |
| 693 | + can_use_ord_prom:{} | |
| 694 | + }) | |
| 695 | + | |
| 689 | 696 | |
| 690 | 697 | //先获取是否有关闭使用优惠券 | 
| 691 | 698 | getApp().getConfig2(function (ee) { | 
| ... | ... | @@ -1076,6 +1083,31 @@ Page({ | 
| 1076 | 1083 | th.setData({ [wl_txt]: 0, }) | 
| 1077 | 1084 | } | 
| 1078 | 1085 | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + //-- 如果是订单优惠的时候,allpice要拿来减掉一些 -- | |
| 1089 | + var order_prom_id=0; | |
| 1090 | + var order_prom_amount=0; | |
| 1091 | + if(ord_prom){ | |
| 1092 | + order_prom_id = ord_prom['id']; | |
| 1093 | + switch (ord_prom['type']) { | |
| 1094 | + case 0: | |
| 1095 | + allpice = Math.round(o_condition * ord_prom['expression']) / 100;//满额打折 | |
| 1096 | + order_prom_amount = (o_condition - allpice).toFixed(2); | |
| 1097 | + break; | |
| 1098 | + case 1: | |
| 1099 | + //-- 如果有优惠促销倍减的时候 -- | |
| 1100 | + var bs = 1; | |
| 1101 | + if (ord_prom.is_bz) { | |
| 1102 | + bs = Math.floor(o_condition / ord_prom.money); | |
| 1103 | + } | |
| 1104 | + allpice = o_condition - bs * ord_prom['expression'];//满额优惠金额 | |
| 1105 | + order_prom_amount = ord_prom['expression']; | |
| 1106 | + break; | |
| 1107 | + } | |
| 1108 | + } | |
| 1109 | + | |
| 1110 | + | |
| 1079 | 1111 | //判断是否同城配送,而且没有调用过 | 
| 1080 | 1112 | if (th.data.bn_exp_type == 2 && th.data.user_addr) { | 
| 1081 | 1113 | var lon = 0; | 
| ... | ... | @@ -1113,9 +1145,23 @@ Page({ | 
| 1113 | 1145 | if (res.data.code == 0) { | 
| 1114 | 1146 | var wl_txt = "formData.shipping_price"; | 
| 1115 | 1147 | th.setData({ [wl_txt]: res.data.data, }) | 
| 1116 | - | |
| 1148 | + th.setData({ | |
| 1149 | + sameCityExp_off:0, | |
| 1150 | + sameCityExp_info:'' | |
| 1151 | + }) | |
| 1117 | 1152 | } else { | 
| 1118 | - is_next = 0; | |
| 1153 | + if (res.data.code==-2) { //未达到起送价 | |
| 1154 | + th.setData({ | |
| 1155 | + sameCityExp_off:2, | |
| 1156 | + sameCityExp_info:res.data.msg | |
| 1157 | + }) | |
| 1158 | + }else{ | |
| 1159 | + th.setData({ | |
| 1160 | + sameCityExp_off:1, | |
| 1161 | + sameCityExp_info:res.data.msg | |
| 1162 | + }) | |
| 1163 | + } | |
| 1164 | + // is_next = 0; | |
| 1119 | 1165 | wx.showToast({ | 
| 1120 | 1166 | title: res.data.msg, icon: 'none', duration: 2000 | 
| 1121 | 1167 | }) | 
| ... | ... | @@ -1134,27 +1180,6 @@ Page({ | 
| 1134 | 1180 | |
| 1135 | 1181 | } | 
| 1136 | 1182 | |
| 1137 | - //-- 如果是订单优惠的时候,allpice要拿来减掉一些 -- | |
| 1138 | - var order_prom_id=0; | |
| 1139 | - var order_prom_amount=0; | |
| 1140 | - if(ord_prom){ | |
| 1141 | - order_prom_id = ord_prom['id']; | |
| 1142 | - switch (ord_prom['type']) { | |
| 1143 | - case 0: | |
| 1144 | - allpice = Math.round(o_condition * ord_prom['expression']) / 100;//满额打折 | |
| 1145 | - order_prom_amount = (o_condition - allpice).toFixed(2); | |
| 1146 | - break; | |
| 1147 | - case 1: | |
| 1148 | - //-- 如果有优惠促销倍减的时候 -- | |
| 1149 | - var bs = 1; | |
| 1150 | - if (ord_prom.is_bz) { | |
| 1151 | - bs = Math.floor(o_condition / ord_prom.money); | |
| 1152 | - } | |
| 1153 | - allpice = o_condition - bs * ord_prom['expression'];//满额优惠金额 | |
| 1154 | - order_prom_amount = ord_prom['expression']; | |
| 1155 | - break; | |
| 1156 | - } | |
| 1157 | - } | |
| 1158 | 1183 | |
| 1159 | 1184 | //--订单优惠的显示-- | 
| 1160 | 1185 | var order_prom_txt1 = "formData.order_prom_id"; | 
| ... | ... | @@ -1773,7 +1798,7 @@ Page({ | 
| 1773 | 1798 | setexptype_w: function (t) { | 
| 1774 | 1799 | var th = this; | 
| 1775 | 1800 | var ty = t.currentTarget.dataset.t, txt = t.currentTarget.dataset.txt; | 
| 1776 | - th.setData({ [txt]: ty,same_ok:1 }); | |
| 1801 | + th.setData({ [txt]: ty,same_ok:1,sameCityExp_off:0, sameCityExp_info:'', }); | |
| 1777 | 1802 | var iszt = 1; | 
| 1778 | 1803 | if (ty == 0) { | 
| 1779 | 1804 | th.setData({ is_all_zt: 0 }); | 
| ... | ... | @@ -1795,7 +1820,7 @@ Page({ | 
| 1795 | 1820 | setexptype: function (t) { | 
| 1796 | 1821 | var th = this; | 
| 1797 | 1822 | var ty = t.currentTarget.dataset.t; | 
| 1798 | - th.setData({ bn_exp_type: ty, same_ok:1 }); | |
| 1823 | + th.setData({ bn_exp_type: ty, same_ok:1, sameCityExp_off:0, sameCityExp_info:'',}); | |
| 1799 | 1824 | //当物流为空的时候。 | 
| 1800 | 1825 | if (ty == 0 && th.data.wu_arr == null) { | 
| 1801 | 1826 | return th.get_wuliu(th.calculatePrice2()); | 
| ... | ... | @@ -2538,6 +2563,10 @@ Page({ | 
| 2538 | 2563 | } | 
| 2539 | 2564 | func(isok); | 
| 2540 | 2565 | }, | 
| 2566 | + //去凑单 | |
| 2567 | + qcd(){ | |
| 2568 | + getApp().goto("/pages/index/index/index"); | |
| 2569 | + }, | |
| 2541 | 2570 | |
| 2542 | 2571 | |
| 2543 | 2572 | ... | ... | 
packageE/pages/cart/cart2_pt/cart2_pt.wxml
| ... | ... | @@ -237,11 +237,20 @@ | 
| 237 | 237 | </view> | 
| 238 | 238 | |
| 239 | 239 | <view class="btn-wrap" wx:if="{{show_btn}}"> | 
| 240 | - <view class="pay-amount"> | |
| 241 | - <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 242 | - <!-- <view class="co-red big"></view> --> | |
| 243 | - </view> | |
| 244 | - <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 240 | + <block wx:if="{{sameCityExp_off>0 && sameCityExp_info}}"> | |
| 241 | + <view class="pay-amount"> | |
| 242 | + <view class="payable"><text class="co-red fs24">{{sameCityExp_info}}</text></view> | |
| 243 | + </view> | |
| 244 | + <button wx:if="{{sameCityExp_off==2}}" class="tips-btn" catchtap="qcd">去凑单</button> | |
| 245 | + </block> | |
| 246 | + <block wx:else> | |
| 247 | + <view class="pay-amount"> | |
| 248 | + <view class="payable">应付金额:<text class="co-red">¥{{formData.order_amount}}</text></view> | |
| 249 | + <!-- <view class="co-red big"></view> --> | |
| 250 | + </view> | |
| 251 | + <button disabled="{{submit || !same_ok}}" class="tips-btn" formType="submit" id="submitOrder">提交订单</button> | |
| 252 | + </block> | |
| 253 | + | |
| 245 | 254 | </view> | 
| 246 | 255 | </form> | 
| 247 | 256 | ... | ... | 
packageG/pages/group_buy/goodsInfo/buy_flash_normal.wxml
0 → 100644
| 1 | +<view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view> | |
| 2 | + <view class="spec-model"> | |
| 3 | + <view class="pding"> | |
| 4 | + <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 5 | + <view class="spec-goods"> | |
| 6 | + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{iurl + (data.image_url ? data.image_url:'miniapp/images/default_g_img.gif')}}" binderror="pop_err_img" data-errorimg="data.img_url"></image> | |
| 7 | + <view class="spec-goods-info"> | |
| 8 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | |
| 9 | + <view class="flex ai_end xc-val-money"> | |
| 10 | + <view class="spec-goods-price"> | |
| 11 | + <text class="fs20">¥</text>{{data.shop_price}} | |
| 12 | + <!-- 如果是等级会员,且有等级价 --> | |
| 13 | + <!-- <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block> --> | |
| 14 | + <!-- <block wx:else>{{sele_g.shop_price}}</block> --> | |
| 15 | + </view> | |
| 16 | + </view> | |
| 17 | + | |
| 18 | + <!-- <view class="flex"> | |
| 19 | + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view> | |
| 20 | + <block wx:if="{{sales_rules==2}}"> | |
| 21 | + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view> | |
| 22 | + <view class="spec-goods-stock" wx:else>可售:0</view> | |
| 23 | + </block> | |
| 24 | + <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block> | |
| 25 | + </view> --> | |
| 26 | + | |
| 27 | + | |
| 28 | + </view> | |
| 29 | + | |
| 30 | + <!-- 选择门店模块 --> | |
| 31 | + <view class="flex-space-between address ai_end xc-width "> | |
| 32 | + | |
| 33 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 34 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 35 | + <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}"> | |
| 36 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 37 | + | |
| 38 | + </view> | |
| 39 | + </view> | |
| 40 | + | |
| 41 | + <!-- 没有门店的时候 --> | |
| 42 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 43 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 44 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 45 | + </view> | |
| 46 | + | |
| 47 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view> | |
| 48 | + </view> | |
| 49 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 50 | + <block wx:else> | |
| 51 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 52 | + <block wx:else> | |
| 53 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(该店不可售)</view> | |
| 54 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
| 55 | + </block> | |
| 56 | + </block> | |
| 57 | + <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 58 | + | |
| 59 | + | |
| 60 | + <!--商品的属性项目--> | |
| 61 | + <!-- <view class="xc-goods-attribute"> | |
| 62 | + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view> | |
| 63 | + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;"> | |
| 64 | + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g"> | |
| 65 | + {{item.gg}} | |
| 66 | + </view> | |
| 67 | + </view> | |
| 68 | + </view> --> | |
| 69 | + | |
| 70 | + <view class="b_num"> | |
| 71 | + <view>购买数量</view> | |
| 72 | + <view class="count"> | |
| 73 | + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view> | |
| 74 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 75 | + <view bindtap="addCartNum" class="add">+</view> | |
| 76 | + </view> | |
| 77 | + </view> | |
| 78 | + </view> | |
| 79 | + | |
| 80 | + | |
| 81 | + <!-- 提示再买多少优惠 --> | |
| 82 | + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}"> | |
| 83 | + 再买{{hui_condition.need}} | |
| 84 | + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text> | |
| 85 | + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text> | |
| 86 | + <text wx:if="{{hui_condition.past==1}}">,包邮</text> | |
| 87 | + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text> | |
| 88 | + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text> | |
| 89 | + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text> | |
| 90 | + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text> | |
| 91 | + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text> | |
| 92 | + </view> | |
| 93 | + | |
| 94 | + | |
| 95 | + <!-- 按钮部分 --> | |
| 96 | + <view class="spec-cart-btns"> | |
| 97 | + | |
| 98 | + <!-- 根本就找不到门店 --> | |
| 99 | + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}"> | |
| 100 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
| 101 | + </block> | |
| 102 | + <block wx:else> | |
| 103 | + <!-- 根本就找不到门店 --> | |
| 104 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 105 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 106 | + </block> | |
| 107 | + <block wx:else> | |
| 108 | + | |
| 109 | + | |
| 110 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 111 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 112 | + </block> | |
| 113 | + <block wx:else> | |
| 114 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 115 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 116 | + </block> | |
| 117 | + <block wx:else> | |
| 118 | + <block wx:if="{{!def_pick_store}}"> | |
| 119 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 120 | + </block> | |
| 121 | + <block wx:else> | |
| 122 | + <block wx:if="{{data.store_count<=0}}"> | |
| 123 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 124 | + </block> | |
| 125 | + <block wx:else> | |
| 126 | + <view class="flex jc_sb"> | |
| 127 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 128 | + data-action="add" style="background-color: #ffb03f;">加入购物车</view> | |
| 129 | + <view class="spec-cart-btn spec-buy w40" bindtap="addCart" | |
| 130 | + data-action="buy">立即购买</view> | |
| 131 | + </view> | |
| 132 | + </block> | |
| 133 | + | |
| 134 | + </block> | |
| 135 | + </block> | |
| 136 | + </block> | |
| 137 | + </block> | |
| 138 | + </block> | |
| 139 | + </view> | |
| 140 | + | |
| 141 | + </view> | |
| 142 | + </view> | |
| 143 | + <view class="clear"></view> | |
| 0 | 144 | \ No newline at end of file | ... | ... | 
packageG/pages/group_buy/goodsInfo/filter.wxs
0 → 100644
| 1 | +var is_has = function (text,val) { | |
| 2 | + if(text.indexOf(","+val+",")==-1) return false; | |
| 3 | + return true | |
| 4 | +} | |
| 5 | +function format_tt(ts) { | |
| 6 | + if(ts==null || ts==undefined || ts=='') return ""; | |
| 7 | + var d = getDate(ts*1000) | |
| 8 | + var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日"; | |
| 9 | + return fm; | |
| 10 | +} | |
| 11 | + | |
| 12 | +//拿来判断是不是在指定门店内 | |
| 13 | +function is_no_dis(text,val){ | |
| 14 | + if(text==undefined) return false; | |
| 15 | + if(text=='') return false; | |
| 16 | + if(!text) return false; | |
| 17 | + | |
| 18 | + if(text.indexOf(val)==-1) return true; | |
| 19 | + return false; | |
| 20 | +} | |
| 21 | + | |
| 22 | +module.exports = { | |
| 23 | + is_has: is_has, | |
| 24 | + format_tt:format_tt, | |
| 25 | + is_no_dis:is_no_dis | |
| 26 | +} | ... | ... | 
packageG/pages/group_buy/goodsInfo/g_filter.wxs
0 → 100644
| 1 | +var g_filters = { | |
| 2 | + //-- 判断是不是有等级价 -- | |
| 3 | + is_has_rank:function(rank_switch,item){ | |
| 4 | + if(!rank_switch) return false; | |
| 5 | + if(item.cardprice1 || item.cardprice2 || item.cardprice3) {return true} | |
| 6 | + return false; | |
| 7 | + }, | |
| 8 | + | |
| 9 | + //-- 判断,不是等级会员时候,要显示的最低等级价和名称 -- | |
| 10 | + get_card_price:function(goods,all_card,type){ | |
| 11 | + var price1=parseFloat(goods['cardprice1']); | |
| 12 | + var price2=parseFloat(goods['cardprice2']); | |
| 13 | + var price3=parseFloat(goods['cardprice3']); | |
| 14 | + if(!all_card){ | |
| 15 | + if(type==0) return 0; | |
| 16 | + return ""; | |
| 17 | + } | |
| 18 | + | |
| 19 | + var arr=[]; | |
| 20 | + var min_price= 0; | |
| 21 | + var min_name=""; | |
| 22 | + | |
| 23 | + var min_price=null; | |
| 24 | + var min_name=null; | |
| 25 | + //---设置对应的价格名字---- | |
| 26 | + for(var i=0;i<3;i++) { | |
| 27 | + var vl=all_card[i]; | |
| 28 | + if(!vl) continue; | |
| 29 | + if(vl['CorrPrice']=="Price1" && price1>0) | |
| 30 | + { | |
| 31 | + if(min_price==null) { | |
| 32 | + min_price=price1;min_name=vl['CardName']; | |
| 33 | + } | |
| 34 | + else if(price1<min_price) { | |
| 35 | + min_price=price1;min_name=vl['CardName']; | |
| 36 | + } | |
| 37 | + } | |
| 38 | + if(vl['CorrPrice']=="Price2" && price2>0) | |
| 39 | + { | |
| 40 | + if(min_price==null) { | |
| 41 | + min_price=price2;min_name=vl['CardName']; | |
| 42 | + } | |
| 43 | + else if(price2<min_price) { | |
| 44 | + min_price=price2;min_name=vl['CardName']; | |
| 45 | + } | |
| 46 | + } | |
| 47 | + | |
| 48 | + if(vl['CorrPrice']=="Price3" && price3>0) | |
| 49 | + { | |
| 50 | + if(min_price==null) { | |
| 51 | + min_price=price3;min_name=vl['CardName']; | |
| 52 | + } | |
| 53 | + else if(price3<min_price) { | |
| 54 | + min_price=price3;min_name=vl['CardName']; | |
| 55 | + } | |
| 56 | + } | |
| 57 | + | |
| 58 | + } | |
| 59 | + if(min_price==null){ | |
| 60 | + if(type==0) return 0; | |
| 61 | + return ""; | |
| 62 | + } | |
| 63 | + | |
| 64 | + //if(type==0) return arr.length; | |
| 65 | + //--进行排序,升序--- | |
| 66 | + /*--- | |
| 67 | + arr.sort(function(a,b){ | |
| 68 | + if (a.price < b.price) { | |
| 69 | + return -1; | |
| 70 | + } else if (a.fee == b.fee) { | |
| 71 | + return 0; | |
| 72 | + } else { | |
| 73 | + return 1; | |
| 74 | + } | |
| 75 | + })--*/ | |
| 76 | + //-- 获取最下价钱,和相应的卡的名称 -- | |
| 77 | + //min_price=min.price; | |
| 78 | + //min_name=min.name; | |
| 79 | + if(type==0) return min_price.toFixed(2); | |
| 80 | + if(min_name.length>4) min_name=min_name.substring(0, 8); | |
| 81 | + return min_name; | |
| 82 | + }, | |
| 83 | + | |
| 84 | + toFix: function (val, count,set) { | |
| 85 | + if(val===undefined) return 0; | |
| 86 | + if(val===null) return 0; | |
| 87 | + if(val==='') return 0; | |
| 88 | + val = parseFloat(val); | |
| 89 | + if(set==1 && val==0) return val; | |
| 90 | + return val.toFixed(count) | |
| 91 | + }, | |
| 92 | + | |
| 93 | + //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位; | |
| 94 | + num: function(value) { | |
| 95 | + if(value != 0) { | |
| 96 | + var val = value.toFixed(2).toString(); | |
| 97 | + if(val.indexOf('.') != -1) { | |
| 98 | + var arrval = val.split('.'); | |
| 99 | + if(arrval[1].length == 1 && arrval[1][0] == 0) { | |
| 100 | + val = val.slice(0,-2); | |
| 101 | + }; | |
| 102 | + | |
| 103 | + if(arrval[1].length == 2 && arrval[1][1] == 0) { | |
| 104 | + val = val.slice(0,-1); | |
| 105 | + }; | |
| 106 | + }; | |
| 107 | + return val; | |
| 108 | + } else { | |
| 109 | + return value.toFixed(0); | |
| 110 | + }; | |
| 111 | + }, | |
| 112 | +} | |
| 113 | +module.exports = { | |
| 114 | + is_has_rank:g_filters.is_has_rank, | |
| 115 | + get_card_price:g_filters.get_card_price, | |
| 116 | + num:g_filters.num, | |
| 117 | +} | |
| 0 | 118 | \ No newline at end of file | ... | ... | 
packageG/pages/group_buy/goodsInfo/goodsInfo.js
0 → 100644
| 1 | +var t = require("../../../../utils/util.js"), | |
| 2 | + ut = t, | |
| 3 | + e = require("../../../../utils/common.js"), | |
| 4 | + a = require("../../../../utils/wxParse/wxParse.js"), | |
| 5 | + s = getApp(), | |
| 6 | + i = s.request, | |
| 7 | + rq = i, | |
| 8 | + oo = s.globalData, | |
| 9 | + o = s.globalData.setting, | |
| 10 | + os = o; | |
| 11 | + | |
| 12 | +let self = null; | |
| 13 | + | |
| 14 | +//评价加载更多 | |
| 15 | +var more = function (e) { | |
| 16 | + return e && e.__esModule ? e : { | |
| 17 | + default: e | |
| 18 | + }; | |
| 19 | + }(require("../../../../utils/LoadMore.js")), | |
| 20 | + n = new more.default(); | |
| 21 | +var utils = require('../../../../utils/util.js'); | |
| 22 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 23 | + | |
| 24 | +Page({ | |
| 25 | + data: { | |
| 26 | + start_stop: 2, //秒杀开始 结束 的控制(1正在进行,2即将开始) | |
| 27 | + color_type: 0, //线条控制 | |
| 28 | + color_type_one: 0, | |
| 29 | + color_type_two: 1, | |
| 30 | + is_share_text: 1, | |
| 31 | + | |
| 32 | + gid: "", | |
| 33 | + stoid: o.stoid, | |
| 34 | + url: o.url, | |
| 35 | + resourceUrl: o.h5_url, //公众号那边的图片文件域名 | |
| 36 | + iurl: o.imghost, | |
| 37 | + defaultAvatar: o.resourceUrl + "/static/images/user68.jpg", | |
| 38 | + | |
| 39 | + data: null, | |
| 40 | + content: "", //商品详情 | |
| 41 | + | |
| 42 | + | |
| 43 | + gallery: null, //图片滚动 | |
| 44 | + is_collect: 0, | |
| 45 | + collect_id: 0, | |
| 46 | + cartGoodsNum: 0, | |
| 47 | + specSelect: 0, | |
| 48 | + optionItemId: 0, | |
| 49 | + goodsInputNum: 1, | |
| 50 | + openSpecModal: !1, | |
| 51 | + | |
| 52 | + activeCategoryId: 0, | |
| 53 | + supportPageScroll: !1, | |
| 54 | + address: { | |
| 55 | + address: "", | |
| 56 | + district: 0, | |
| 57 | + }, | |
| 58 | + shipping: "", | |
| 59 | + shippingCost: 0, | |
| 60 | + enterAddressPage: !1, | |
| 61 | + categories: [{ | |
| 62 | + name: "卡项", | |
| 63 | + id: 0 | |
| 64 | + }, { | |
| 65 | + name: "详情", | |
| 66 | + id: 1 | |
| 67 | + }, { | |
| 68 | + name: "评价", | |
| 69 | + id: 2 | |
| 70 | + }], | |
| 71 | + activeCategoryId2: 0, | |
| 72 | + categories2: [{ | |
| 73 | + name: "商品详情", | |
| 74 | + id: 0 | |
| 75 | + }, { | |
| 76 | + name: "规格参数", | |
| 77 | + id: 1 | |
| 78 | + }], | |
| 79 | + activeCategoryId3: 1, // 点击评价-全部、有图、好评、中评时对应的id | |
| 80 | + categories3: [{ | |
| 81 | + name: "全部", | |
| 82 | + id: 1, | |
| 83 | + num: 0 | |
| 84 | + }, | |
| 85 | + { | |
| 86 | + name: "有图", | |
| 87 | + id: 5, | |
| 88 | + num: 0 | |
| 89 | + }, | |
| 90 | + | |
| 91 | + { | |
| 92 | + name: "好评", | |
| 93 | + id: 2, | |
| 94 | + num: 0 | |
| 95 | + }, { | |
| 96 | + name: "中评", | |
| 97 | + id: 3, | |
| 98 | + num: 0 | |
| 99 | + }, { | |
| 100 | + name: "差评", | |
| 101 | + id: 4, | |
| 102 | + num: 0 | |
| 103 | + }, | |
| 104 | + ], | |
| 105 | + | |
| 106 | + select: { | |
| 107 | + price: 0, | |
| 108 | + stock: 0, | |
| 109 | + specName: "", | |
| 110 | + activity: null | |
| 111 | + }, | |
| 112 | + | |
| 113 | + | |
| 114 | + //门店相关 | |
| 115 | + ismend: 0, | |
| 116 | + is_sec_mend: 0, | |
| 117 | + sto_sele_name: "", //选中的门店名称 | |
| 118 | + sto_sele_id: "", //选中的门店id | |
| 119 | + sto_sele_keyid: '', //选中的门店线下 | |
| 120 | + sto_sele_distr: "", //选择的门店的配送方式 | |
| 121 | + is_show_sto_cat: 1, //是否显示门店分类 | |
| 122 | + only_pk: null, | |
| 123 | + all_sto: null, | |
| 124 | + sec_sto: null, //选择了的门店分类 | |
| 125 | + pickpu_list: null, //读出的所有门店list | |
| 126 | + def_pickpu_list: null, //一开始5个门店list | |
| 127 | + sec_pick_index: 0, //第二级门店选择ID | |
| 128 | + fir_pick_index: 0, //第一级门店选择ID | |
| 129 | + all_pick_list: null,//所有的门店先记录起来 | |
| 130 | + | |
| 131 | + //联系电话 | |
| 132 | + mobile: '', | |
| 133 | + //商品的活动类型 0普通 1秒杀 2团购 3优惠 4 积分购 6拼单 | |
| 134 | + timer: [], | |
| 135 | + | |
| 136 | + //商品的购买次数 | |
| 137 | + prom_buy_num: -1, | |
| 138 | + g_buy_num: null, | |
| 139 | + | |
| 140 | + //会员自己的购买的拼单商品的情况 | |
| 141 | + //购买的订单 | |
| 142 | + buy_order: null, | |
| 143 | + //1加入购物车 2立即购买 | |
| 144 | + openSpecModal_ind: 0, | |
| 145 | + | |
| 146 | + //---计时器开关---- | |
| 147 | + is_timer: 1, | |
| 148 | + isshow: 0, | |
| 149 | + bconfig: null, //基础配置 | |
| 150 | + | |
| 151 | + //会员分享的头像 | |
| 152 | + share_head: "", | |
| 153 | + share_goods_img: "", | |
| 154 | + | |
| 155 | + //----------视频图片data参数--------- | |
| 156 | + current: 0, //图片计数 | |
| 157 | + swiperCurrent: 0, //轮播的下标 | |
| 158 | + hiddenn: 0, //控制轮播计数显示 | |
| 159 | + | |
| 160 | + currentTab: 0, // 选择器控制参数 | |
| 161 | + mapurl: "", | |
| 162 | + mapurl_f_img: "", | |
| 163 | + videopicture: 0, //视频图片的控制 | |
| 164 | + | |
| 165 | + video: 0, //视频图片切换器 | |
| 166 | + index: 0, | |
| 167 | + noon: 0, //开始视频的隐藏 | |
| 168 | + | |
| 169 | + screenWidth: 0, | |
| 170 | + canvasHidden: 1, | |
| 171 | + | |
| 172 | + //--推荐-- | |
| 173 | + store_config: null, | |
| 174 | + is_show_pl: 0, //是否品类 | |
| 175 | + is_show_pp: 0, //是否品牌 | |
| 176 | + is_show_gb: 0, //是否国别 | |
| 177 | + is_closecoupon: 0, | |
| 178 | + | |
| 179 | + | |
| 180 | + select_store: 0, //选择更多 | |
| 181 | + index: 1, | |
| 182 | + more_store: 0, //选择门店 | |
| 183 | + sort_store: 0, //门店分类 | |
| 184 | + choice_sort_store: 0, //选择分类门店 | |
| 185 | + new_user: 0, //新用户 | |
| 186 | + | |
| 187 | + def_pick_store: null, // 默认的门店 | |
| 188 | + fir_def_store: null, //客户默认的门店的 | |
| 189 | + lat: null, //维度 | |
| 190 | + lon: null, //经度 | |
| 191 | + | |
| 192 | + is_get_local_ok: 0, //获取坐标是否完成 | |
| 193 | + region_name: "门店分类", //区域的名字 | |
| 194 | + is_gps: 1, | |
| 195 | + open_ind_store: 0, //哪里打开的门店列表的控制属性 | |
| 196 | + default_store: {}, //创建添加默认门店地址的对象 | |
| 197 | + | |
| 198 | + comments_no_more: 0, | |
| 199 | + | |
| 200 | + is_collect_load: 0, //是不是处理 | |
| 201 | + is_newsales_rules: 0, //是否开启最新的门店规则,此时会新读门店,当点击选择门店时会触发读取线下库存 | |
| 202 | + sales_rules: 1, //默认是线上销售 | |
| 203 | + | |
| 204 | + wait_for_user_store: null, | |
| 205 | + poster: null, //自定义海报 | |
| 206 | + share_b_img: '', //自定义分享的背景 | |
| 207 | + showPoster: false, | |
| 208 | + hui_condition: null, | |
| 209 | + sto_sele_name_1: '',//分享的门店名称 | |
| 210 | + | |
| 211 | + // 秒杀 | |
| 212 | + prom_st: null, | |
| 213 | + prom_r_null: 0, | |
| 214 | + | |
| 215 | + hiddenCS: true, //控制客服操作菜单显示和控制 | |
| 216 | + | |
| 217 | + openSpecModal_flash_normal: 0, | |
| 218 | + keyword: '', //门店搜索 | |
| 219 | + sec_i: -1,//选中分类门店 下标 | |
| 220 | + | |
| 221 | + nav_frontColor: "#ffffff", | |
| 222 | + nav_backgroundColor: "#ffffff", | |
| 223 | + nav_type: 2, //导航类型 | |
| 224 | + istop: 0, //是否置顶风格为1 | |
| 225 | + searchbox_transparent: 1, | |
| 226 | + }, | |
| 227 | + | |
| 228 | + //------初始化加载---------- | |
| 229 | + onLoad: function (t) { | |
| 230 | + self = this; | |
| 231 | + | |
| 232 | + | |
| 233 | + t.prom_type=2; | |
| 234 | + this.data.options=t; | |
| 235 | + | |
| 236 | + var ee = this, | |
| 237 | + that = ee, | |
| 238 | + th = ee, | |
| 239 | + gid = t.goods_id, | |
| 240 | + first_leader = t.first_leader, | |
| 241 | + prom_type = 2, | |
| 242 | + prom_id = t.prom_id, | |
| 243 | + room_id = t.room_id, | |
| 244 | + room_user_share = t.room_user_share; //如果是会员分享带有room_id的话,那么接下来会员分享就不传room_id | |
| 245 | + | |
| 246 | + var share_openid = t.share_openid; | |
| 247 | + | |
| 248 | + //检查测肤 | |
| 249 | + getApp().check_skin_face(t, 1, gid); | |
| 250 | + | |
| 251 | + //---获取手机地址坐标-- | |
| 252 | + //--如果tg_id是空的话,分享回来-- | |
| 253 | + if (gid == undefined || gid == null || gid == "") { | |
| 254 | + var gid_str = decodeURIComponent(t.scene); | |
| 255 | + gid_str = gid_str.split("_"); | |
| 256 | + gid = gid_str[0]; | |
| 257 | + this.data.options.goods_id=gid; | |
| 258 | + if (gid_str.length > 1 && gid_str[1] && parseInt(gid_str[1]) > 0) { | |
| 259 | + first_leader = gid_str[1]; | |
| 260 | + } | |
| 261 | + //-- 如果有room_id的获取 -- | |
| 262 | + if (gid_str.length > 2 && gid_str[2] && parseInt(gid_str[2]) > 0) { | |
| 263 | + room_id = gid_str[2]; | |
| 264 | + room_user_share = 1; | |
| 265 | + } | |
| 266 | + | |
| 267 | + if (gid_str.length > 3 && gid_str[3] && parseInt(gid_str[3]) > 0) { | |
| 268 | + this.data.options.prom_id = gid_str[3]; | |
| 269 | + } | |
| 270 | + | |
| 271 | + } | |
| 272 | + | |
| 273 | + //-- 设置顶部高度 -- | |
| 274 | + let height = getApp().globalData.navBarHeight; | |
| 275 | + ee.setData({gid: gid, top_nav: height}); | |
| 276 | + | |
| 277 | + if (first_leader > 0) { | |
| 278 | + getApp().globalData.first_leader = first_leader; | |
| 279 | + //调用接口判断是不是会员 | |
| 280 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
| 281 | + if (res.data.code == 0) { | |
| 282 | + getApp().globalData.guide_id = res.data.data.id; | |
| 283 | + getApp().globalData.guide_pick_id = res.data.data.pickup_id | |
| 284 | + } | |
| 285 | + }) | |
| 286 | + } | |
| 287 | + | |
| 288 | + //-- 如果有房间号 -- | |
| 289 | + if (room_id) { | |
| 290 | + getApp().globalData.room_id = room_id; | |
| 291 | + getApp().globalData.room_goods_id = gid; | |
| 292 | + //如果是会员分享过来的要记录 | |
| 293 | + if (room_user_share) | |
| 294 | + getApp().globalData.room_user_share = room_user_share; | |
| 295 | + | |
| 296 | + if (share_openid) { | |
| 297 | + this.get_room_share_guide(share_openid); | |
| 298 | + } | |
| 299 | + } | |
| 300 | + | |
| 301 | + | |
| 302 | + var c_guide_id = t.c_guide_id; | |
| 303 | + if (c_guide_id) { | |
| 304 | + th.data.c_guide_id = c_guide_id; | |
| 305 | + } | |
| 306 | + | |
| 307 | + getApp().getConfig(function (e) { | |
| 308 | + ee.setData({sto_sele_name_1: e.store_name}) | |
| 309 | + }) | |
| 310 | + | |
| 311 | + //----获取系统参数----- | |
| 312 | + getApp().getConfig2(function (e) { | |
| 313 | + ee.setData({ | |
| 314 | + bconfig: e, | |
| 315 | + sales_rules: e.sales_rules, | |
| 316 | + }); | |
| 317 | + | |
| 318 | + if (e.categoryset.indexOf("," + 1 + ",") != -1) { | |
| 319 | + ee.setData({ | |
| 320 | + is_show_pl: 1 | |
| 321 | + }); | |
| 322 | + } | |
| 323 | + if (e.categoryset.indexOf("," + 3 + ",") != -1) { | |
| 324 | + ee.setData({ | |
| 325 | + is_show_pp: 1 | |
| 326 | + }); | |
| 327 | + } | |
| 328 | + if (e.categoryset.indexOf("," + 2 + ",") != -1) { | |
| 329 | + ee.setData({ | |
| 330 | + is_show_gb: 1 | |
| 331 | + }); | |
| 332 | + } | |
| 333 | + // console.log(e); | |
| 334 | + var json_d = JSON.parse(e.switch_list); | |
| 335 | + ee.setData({ | |
| 336 | + store_config: e, | |
| 337 | + sys_switch: json_d, | |
| 338 | + is_closecoupon: json_d.is_closecoupon, | |
| 339 | + is_newsales_rules: json_d.is_newsales_rules | |
| 340 | + }); | |
| 341 | + ee.init(gid); | |
| 342 | + | |
| 343 | + //------几人评价------- | |
| 344 | + //n.init(th, "", "comments"); | |
| 345 | + wx.pageScrollTo && th.setData({ | |
| 346 | + supportPageScroll: !0 | |
| 347 | + }); | |
| 348 | + | |
| 349 | + }, 1); | |
| 350 | + | |
| 351 | + //获取用户设备信息,屏幕宽度 | |
| 352 | + wx.getSystemInfo({ | |
| 353 | + success: res => { | |
| 354 | + that.setData({ | |
| 355 | + screenWidth: res.screenWidth | |
| 356 | + }) | |
| 357 | + } | |
| 358 | + }); | |
| 359 | + | |
| 360 | + //-- 自定义海报 -- | |
| 361 | + getApp().request.promiseGet("/api/weshop/goods/poster/page", { | |
| 362 | + data: {store_id: os.stoid, type: 1, is_use: 1} | |
| 363 | + }).then(res => { | |
| 364 | + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]) { | |
| 365 | + | |
| 366 | + var poster_data = res.data.data.pageData[0]; | |
| 367 | + var json_str = poster_data.jsonStr; | |
| 368 | + | |
| 369 | + if (json_str) { | |
| 370 | + var json_data = JSON.parse(json_str); | |
| 371 | + if (json_data.bg_img) { | |
| 372 | + | |
| 373 | + //-- 把图片那到本地 -- | |
| 374 | + wx.getImageInfo({ | |
| 375 | + src: json_data.bg_img, | |
| 376 | + success: function (res) { | |
| 377 | + var path = res.path; | |
| 378 | + th.setData({share_b_img: path}) | |
| 379 | + }, | |
| 380 | + fail: function (res) { | |
| 381 | + } | |
| 382 | + }); | |
| 383 | + } | |
| 384 | + th.setData({poster: json_data}) | |
| 385 | + | |
| 386 | + } | |
| 387 | + } | |
| 388 | + }) | |
| 389 | + | |
| 390 | + | |
| 391 | + }, | |
| 392 | + | |
| 393 | + //-- 获取直播的分享人的导购信息 -- | |
| 394 | + async get_room_share_guide(share_openid) { | |
| 395 | + | |
| 396 | + var url = "/api/weshop/users/page"; | |
| 397 | + var first_leader = 0; | |
| 398 | + | |
| 399 | + //调用接口判断是不是会员 | |
| 400 | + await getApp().request.promiseGet(url, { | |
| 401 | + data: { | |
| 402 | + stoid: os.stoid, | |
| 403 | + weapp_openid: share_openid | |
| 404 | + } | |
| 405 | + }).then(res => { | |
| 406 | + if (ut.ajax_ok(res)) { | |
| 407 | + first_leader = res.data.data.pageData[0].user_id; | |
| 408 | + getApp().globalData.guide_id = res.data.data.id; | |
| 409 | + } | |
| 410 | + }) | |
| 411 | + | |
| 412 | + if (!first_leader) return false; | |
| 413 | + | |
| 414 | + getApp().globalData.first_leader = first_leader; | |
| 415 | + | |
| 416 | + //调用接口判断是不是会员 | |
| 417 | + await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
| 418 | + if (res.data.code == 0) { | |
| 419 | + getApp().globalData.guide_id = res.data.data.id; | |
| 420 | + getApp().globalData.guide_pick_id = res.data.data.pickup_id | |
| 421 | + } | |
| 422 | + }) | |
| 423 | + | |
| 424 | + }, | |
| 425 | + | |
| 426 | + | |
| 427 | + onReady() { | |
| 428 | + // 用于控制保障服务折叠图标的显示 | |
| 429 | + setTimeout(() => { | |
| 430 | + wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => { | |
| 431 | + if (res.length != 0) { | |
| 432 | + this.setData({ | |
| 433 | + showFold: res[0].height < res[1].height, | |
| 434 | + }); | |
| 435 | + } | |
| 436 | + }).exec(); | |
| 437 | + }, 1000); | |
| 438 | + | |
| 439 | + }, | |
| 440 | + | |
| 441 | + | |
| 442 | + //------------程序初始化入口------------- | |
| 443 | + async init(gid) { | |
| 444 | + var ee = this, | |
| 445 | + th = ee, | |
| 446 | + gallery = null, | |
| 447 | + is_collect = 0, | |
| 448 | + collect_id = 0, | |
| 449 | + categories3 = ee.data.categories3, | |
| 450 | + fir_com = null, | |
| 451 | + fir_quan = null, | |
| 452 | + mapurl = null, | |
| 453 | + mapurl_f_img = null; | |
| 454 | + | |
| 455 | + | |
| 456 | + //------是否收藏---------- | |
| 457 | + await getApp().request.promiseGet("/api/weshop/goodscollect/page", { | |
| 458 | + data: { | |
| 459 | + store_id: os.stoid, | |
| 460 | + goods_id: gid, | |
| 461 | + user_id: oo.user_id, | |
| 462 | + } | |
| 463 | + }).then(res => { | |
| 464 | + var t = res; | |
| 465 | + var data = t.data.data.pageData; | |
| 466 | + if (data && data.length > 0) { | |
| 467 | + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, }); | |
| 468 | + is_collect = 1; | |
| 469 | + collect_id = data[0].collect_id; | |
| 470 | + } | |
| 471 | + }) | |
| 472 | + | |
| 473 | + //------获取评价的统计数量---- | |
| 474 | + await getApp().request.promiseGet("/api/weshop/serviceComment/countlist/", { | |
| 475 | + data: { | |
| 476 | + store_id: os.stoid, | |
| 477 | + service_id: gid | |
| 478 | + }, | |
| 479 | + }).then(res => { | |
| 480 | + console.log('get评价统计数量', res.data.data); | |
| 481 | + var t = res; | |
| 482 | + var g = t.data.data[0]; | |
| 483 | + if (g != null && g != undefined) { | |
| 484 | + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5; | |
| 485 | + var num2 = g.c4 + g.c5; | |
| 486 | + var num3 = g.c3; | |
| 487 | + var num4 = g.c0 + g.c1 + g.c2; | |
| 488 | + | |
| 489 | + var dd = ee.data.categories3; | |
| 490 | + dd[0].num = allnum; | |
| 491 | + dd[1].num = g.cimg; | |
| 492 | + dd[2].num = num2; | |
| 493 | + dd[3].num = num3; | |
| 494 | + dd[4].num = num4; | |
| 495 | + | |
| 496 | + categories3 = dd; | |
| 497 | + } | |
| 498 | + }); | |
| 499 | + | |
| 500 | + //----获取详情页的评价---- | |
| 501 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | |
| 502 | + data: { | |
| 503 | + store_id: os.stoid, | |
| 504 | + service_id: gid, | |
| 505 | + pageSize: 3, | |
| 506 | + parent_id: 0, | |
| 507 | + page: 1, | |
| 508 | + is_show: 1, | |
| 509 | + }, | |
| 510 | + }).then(res => { | |
| 511 | + console.log('get详情页评价', res.data.data); | |
| 512 | + fir_com = res.data.data.pageData; | |
| 513 | + }); | |
| 514 | + | |
| 515 | + if (fir_com) { | |
| 516 | + for (var ind in fir_com) { | |
| 517 | + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png"; | |
| 518 | + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img); | |
| 519 | + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img); | |
| 520 | + } | |
| 521 | + } | |
| 522 | + ; | |
| 523 | + | |
| 524 | + | |
| 525 | + //this.getHistoryBuy(); //获取历史购买 | |
| 526 | + ee.setData({ | |
| 527 | + is_collect: is_collect, | |
| 528 | + collect_id: collect_id, | |
| 529 | + categories3: categories3, | |
| 530 | + fir_quan: fir_quan, | |
| 531 | + fir_comments: fir_com, | |
| 532 | + // cardComments: fir_com, | |
| 533 | + }); | |
| 534 | + | |
| 535 | + }, | |
| 536 | + | |
| 537 | + //检测有没有导购分享的门店 | |
| 538 | + check_guide(func) { | |
| 539 | + var first_leader = getApp().globalData.first_leader; | |
| 540 | + if (!first_leader) { | |
| 541 | + func(); | |
| 542 | + return false; | |
| 543 | + } | |
| 544 | + if (this.data.is_geted_guide_pick) { | |
| 545 | + func(); | |
| 546 | + return false; | |
| 547 | + } | |
| 548 | + | |
| 549 | + if (getApp().globalData.guide_pick_id) { | |
| 550 | + func(); | |
| 551 | + return false; | |
| 552 | + } | |
| 553 | + var th = this; | |
| 554 | + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => { | |
| 555 | + if (res.data.code == 0) { | |
| 556 | + getApp().globalData.guide_pick_id = res.data.data.pickup_id; | |
| 557 | + } | |
| 558 | + th.data.is_geted_guide_pick = 1; | |
| 559 | + func(); | |
| 560 | + }) | |
| 561 | + }, | |
| 562 | + | |
| 563 | + //---展示--- | |
| 564 | + // gid 在onload阶段已经保存在this.data中 | |
| 565 | + onShow: function () { | |
| 566 | + | |
| 567 | + getApp().check_can_share(this); | |
| 568 | + //-- 看一下隐私政策要不要显示 -- | |
| 569 | + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id | |
| 570 | + if (privacy_pop) { | |
| 571 | + privacy_pop.check_pri_show(); | |
| 572 | + } | |
| 573 | + | |
| 574 | + var that = this; | |
| 575 | + var th = this; | |
| 576 | + var ee = this, gid = this.data.gid, i = getApp().request; | |
| 577 | + | |
| 578 | + th.data.is_timer = 1; | |
| 579 | + //获取用户的默认门店 | |
| 580 | + th.check_guide(() => { | |
| 581 | + getApp().get_user_store(function (e) { | |
| 582 | + if (!e) { | |
| 583 | + th.data.fir_def_store = {}; //赋值空对象 | |
| 584 | + return false; | |
| 585 | + } | |
| 586 | + | |
| 587 | + if (getApp().globalData.is_dj_pk) th.setData({has_def: 1}) | |
| 588 | + | |
| 589 | + var ee = JSON.parse(JSON.stringify(e)); | |
| 590 | + console.log(e); | |
| 591 | + | |
| 592 | + //--定时器推迟一下-- | |
| 593 | + var appd = getApp().globalData; | |
| 594 | + var w_time = setInterval(function () { | |
| 595 | + if (that.data.is_get_local_ok == 0) return false; | |
| 596 | + if (!th.data.data) { | |
| 597 | + return false; | |
| 598 | + } | |
| 599 | + var ser_card = th.data.data; | |
| 600 | + //--如果默认门店不在等级卡的默认们店以内 | |
| 601 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(ee.keyid) == -1) { | |
| 602 | + ee.is_no_dis = 1; | |
| 603 | + } | |
| 604 | + | |
| 605 | + | |
| 606 | + clearInterval(w_time); | |
| 607 | + var distance = null; | |
| 608 | + var e = JSON.parse(JSON.stringify(ee)); | |
| 609 | + | |
| 610 | + //如果有开启近距离的话,同时距离优不一样了 | |
| 611 | + if (that.data.lat != null) { | |
| 612 | + //如果经纬度有变化的话 | |
| 613 | + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) { | |
| 614 | + that.data.fir_def_store = e; | |
| 615 | + that.setData({ | |
| 616 | + def_pick_store: e, | |
| 617 | + sto_sele_name: e.pickup_name, | |
| 618 | + sto_sele_id: e.pickup_id, | |
| 619 | + sto_sele_distr: e.distr_type, | |
| 620 | + sto_sele_keyid: e.keyid, | |
| 621 | + }) | |
| 622 | + } else { | |
| 623 | + //要用接口是获取距离,js的计算不准 | |
| 624 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 625 | + data: { | |
| 626 | + store_id: os.stoid, | |
| 627 | + pickup_id: e.pickup_id, | |
| 628 | + lat: th.data.lat, | |
| 629 | + lon: th.data.lon, | |
| 630 | + is_pos: 1 | |
| 631 | + }, | |
| 632 | + }).then(res => { | |
| 633 | + if (ut.ajax_ok(res)) { | |
| 634 | + e = res.data.data.pageData[0]; | |
| 635 | + if (e) { | |
| 636 | + e.is_no_dis = ee.is_no_dis; | |
| 637 | + appd.pk_store = e; | |
| 638 | + that.data.fir_def_store = e; | |
| 639 | + | |
| 640 | + console.log('get_user_store--2'); | |
| 641 | + console.log(e); | |
| 642 | + | |
| 643 | + that.setData({ | |
| 644 | + def_pick_store: e, | |
| 645 | + sto_sele_name: e.pickup_name, | |
| 646 | + sto_sele_id: e.pickup_id, | |
| 647 | + sto_sele_distr: e.distr_type, | |
| 648 | + sto_sele_keyid: e.keyid, | |
| 649 | + }) | |
| 650 | + } | |
| 651 | + | |
| 652 | + } | |
| 653 | + }) | |
| 654 | + } | |
| 655 | + | |
| 656 | + //e.distance = distance; | |
| 657 | + appd.lat = that.data.lat; | |
| 658 | + appd.lon = that.data.lon; | |
| 659 | + | |
| 660 | + } else { | |
| 661 | + if (e) { | |
| 662 | + | |
| 663 | + console.log('get_user_store3---'); | |
| 664 | + console.log(e); | |
| 665 | + | |
| 666 | + e.distance = null; | |
| 667 | + that.data.fir_def_store = e; | |
| 668 | + that.setData({ | |
| 669 | + def_pick_store: e, | |
| 670 | + sto_sele_name: e.pickup_name, | |
| 671 | + sto_sele_id: e.pickup_id, | |
| 672 | + sto_sele_distr: e.distr_type, | |
| 673 | + sto_sele_keyid: e.keyid, | |
| 674 | + }) | |
| 675 | + } | |
| 676 | + } | |
| 677 | + }, 200) | |
| 678 | + | |
| 679 | + | |
| 680 | + }); | |
| 681 | + }) | |
| 682 | + | |
| 683 | + th.wait_for_store_config(); | |
| 684 | + | |
| 685 | + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, { | |
| 686 | + failRollback: !0, | |
| 687 | + success: function (t) { | |
| 688 | + if (t.data.code == 0) { | |
| 689 | + // console.log('GET pic and video'); | |
| 690 | + if (t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_url) { | |
| 691 | + that.setData({ | |
| 692 | + mapurl: t.data.data.listServiceVideos[0].video_url, | |
| 693 | + }); | |
| 694 | + } | |
| 695 | + | |
| 696 | + if (t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_img) { | |
| 697 | + that.setData({ | |
| 698 | + mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | |
| 699 | + }); | |
| 700 | + } | |
| 701 | + | |
| 702 | + if (t.data.data.listServiceImages) { | |
| 703 | + that.setData({ | |
| 704 | + gallery: t.data.data.listServiceImages, | |
| 705 | + }); | |
| 706 | + } | |
| 707 | + | |
| 708 | + if (t.data.data.listServiceItem) { | |
| 709 | + that.setData({ | |
| 710 | + listServiceItem: t.data.data.listServiceItem, | |
| 711 | + }); | |
| 712 | + } | |
| 713 | + | |
| 714 | + that.setData({ | |
| 715 | + 'data.goods_name': t.data.data.serviceName, | |
| 716 | + 'data.shop_price': t.data.data.money, | |
| 717 | + 'data.show_price': t.data.data.show_price, | |
| 718 | + 'data.validDays': t.data.data.validDays, | |
| 719 | + 'data.serviceContent': t.data.data.serviceContent, | |
| 720 | + 'data.image_url': t.data.data.imgUrl, | |
| 721 | + 'data.goods_id': t.data.data.id, | |
| 722 | + 'data.id': t.data.data.id, | |
| 723 | + 'data.sales_sum': t.data.data.sales_sum, | |
| 724 | + 'data.storageId': t.data.data.storageId, | |
| 725 | + 'data.service_sn': t.data.data.serviceSn, | |
| 726 | + 'data.listServiceVideos': t.data.data.listServiceVideos, | |
| 727 | + // gallery: t.data.data.listServiceImages, | |
| 728 | + // mapurl: t.data.data.listServiceVideos[0].video_url, | |
| 729 | + // mapurl_f_img: t.data.data.listServiceVideos[0].video_img, | |
| 730 | + //listServiceItem: t.data.data.listServiceItem, | |
| 731 | + }); | |
| 732 | + | |
| 733 | + that.getTaohe(); | |
| 734 | + // ----> 秒杀 | |
| 735 | + let prom_type = th.data.options.prom_type; | |
| 736 | + | |
| 737 | + let goods_id = th.data.options.goods_id; | |
| 738 | + if (!goods_id) goods_id = th.data.data.goods_id; | |
| 739 | + | |
| 740 | + let prom_id = th.data.options.prom_id; | |
| 741 | + // 检查活动是否开始 | |
| 742 | + th.check_prom(goods_id, prom_type, prom_id); | |
| 743 | + | |
| 744 | + | |
| 745 | + getApp().deal_iframe(a, e, 'content', t.data.data.serviceContent, ee); | |
| 746 | + | |
| 747 | + //获取重表 | |
| 748 | + getApp().promiseGet("/api/weshop/serviceItem/list", { | |
| 749 | + data: {store_id: o.stoid, service_id: t.data.data.id} | |
| 750 | + }).then(res => { | |
| 751 | + if (res.data.code == 0) { | |
| 752 | + var list = res.data.data; | |
| 753 | + that.setData({service_list: list}) | |
| 754 | + } | |
| 755 | + }) | |
| 756 | + | |
| 757 | + } else { | |
| 758 | + wx.showModal({ | |
| 759 | + title: t.data.msg, | |
| 760 | + showCancel: !1, | |
| 761 | + complete: function () { | |
| 762 | + wx.navigateBack(); | |
| 763 | + } | |
| 764 | + }); | |
| 765 | + } | |
| 766 | + ; | |
| 767 | + } | |
| 768 | + }); | |
| 769 | + | |
| 770 | + th.data.enterAddressPage && (this.data.enterAddressPage = !1); | |
| 771 | + //没有互动,就调用默认的门店 | |
| 772 | + if (!th.data.prom_type) th.get_sto(); | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + }, | |
| 777 | + | |
| 778 | + enterAddress: function () { | |
| 779 | + this.data.enterAddressPage = !0, wx.navigateTo({ | |
| 780 | + url: "/packageF/pages/user/address_list/address_list?operate=selectAddress" | |
| 781 | + }); | |
| 782 | + }, | |
| 783 | + | |
| 784 | + onUnload: function () { | |
| 785 | + // for(var i = 1; i < 100; i++) { | |
| 786 | + // clearInterval(i); | |
| 787 | + // } | |
| 788 | + }, | |
| 789 | + | |
| 790 | + onHide: function () { | |
| 791 | + this.data.is_timer = 0; | |
| 792 | + // for(var i = 1; i < 100; i++) { | |
| 793 | + // clearInterval(i); | |
| 794 | + // } | |
| 795 | + }, | |
| 796 | + //----------三个选项按钮----------- | |
| 797 | + tabClick: function (t) { | |
| 798 | + var e = t.currentTarget.id; | |
| 799 | + this.setData({ | |
| 800 | + activeCategoryId: e | |
| 801 | + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment(); | |
| 802 | + }, | |
| 803 | + | |
| 804 | + tabClick3: function (t) { | |
| 805 | + var e = this; | |
| 806 | + if (t.currentTarget.id != this.data.activeCategoryId3) { | |
| 807 | + e.data.c_curr_p = 1; | |
| 808 | + this.setData({ | |
| 809 | + activeCategoryId3: t.currentTarget.id, | |
| 810 | + comments: null, comments_no_more: 0, get_c: 0, | |
| 811 | + }); | |
| 812 | + this.requestComments_new(); | |
| 813 | + } | |
| 814 | + }, | |
| 815 | + | |
| 816 | + tabComment: function () { | |
| 817 | + this.setData({ | |
| 818 | + activeCategoryId: 2, comments_no_more: 0, get_c: 0 | |
| 819 | + }), this.data.comments || this.requestComments_new(); | |
| 820 | + }, | |
| 821 | + | |
| 822 | + //商品详情的时候调用 | |
| 823 | + tabGoodsContent: function () { | |
| 824 | + var th = this, | |
| 825 | + i = getApp().request; | |
| 826 | + this.setData({ | |
| 827 | + activeCategoryId: 1 | |
| 828 | + }); | |
| 829 | + }, | |
| 830 | + | |
| 831 | + | |
| 832 | + //------------加入购物车-------------- | |
| 833 | + addCart: async function (t) { | |
| 834 | + var th = this; | |
| 835 | + var ind = t.currentTarget.dataset.openSpecModal_ind; | |
| 836 | + var action = t.currentTarget.dataset.action; | |
| 837 | + | |
| 838 | + | |
| 839 | + if (getApp().is_sp_hao() && action == 'add') { | |
| 840 | + wx.showToast({ | |
| 841 | + title: "视频号商品不允许加入购物车", | |
| 842 | + icon: 'none', | |
| 843 | + duration: 2000 | |
| 844 | + }); | |
| 845 | + return false; | |
| 846 | + } | |
| 847 | + | |
| 848 | + | |
| 849 | + if (this.data.goodsInputNum == 0) { | |
| 850 | + getApp().my_warnning('请输入购买数量', 1, th, 450); | |
| 851 | + return false; | |
| 852 | + } | |
| 853 | + | |
| 854 | + | |
| 855 | + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind; | |
| 856 | + | |
| 857 | + th.setData({ | |
| 858 | + open_ind_store: ind | |
| 859 | + }); | |
| 860 | + | |
| 861 | + if (!th.data.sto_sele_name) { | |
| 862 | + getApp().my_warnning('请选择门店', 1, th, 450); | |
| 863 | + return false; | |
| 864 | + } | |
| 865 | + | |
| 866 | + // 库存 | |
| 867 | + var redisNums = 0; | |
| 868 | + // 限购数 | |
| 869 | + var limitNum = 0; | |
| 870 | + // 已购买数量 | |
| 871 | + var boughtNum = 0; | |
| 872 | + var is_ok = 1; | |
| 873 | + | |
| 874 | + // 获取redis当前可以购买的数量 | |
| 875 | + // 如果数量为0,设置和显示已抢光 | |
| 876 | + // 否则,进一步判断是否超出限购或超出库存 | |
| 877 | + await this.getactLen().then(async function (res) { | |
| 878 | + redisNums = res; | |
| 879 | + let curNum = th.data.goodsInputNum; | |
| 880 | + // res: redis可购买数量 | |
| 881 | + console.log('当前可以购买的数量:', res); | |
| 882 | + if (res <= 0) { | |
| 883 | + // 可购买数量<=0, 设置和显示已抢光 | |
| 884 | + th.setData({ | |
| 885 | + prom_r_null: 1, | |
| 886 | + }); | |
| 887 | + getApp().my_warnning('超出活动库存', 0, self); | |
| 888 | + is_ok = 0; | |
| 889 | + return false; | |
| 890 | + } else { | |
| 891 | + | |
| 892 | + if(curNum>redisNums){ | |
| 893 | + getApp().my_warnning('超出活动库存', 0, self); | |
| 894 | + is_ok = 0; | |
| 895 | + return false; | |
| 896 | + } | |
| 897 | + // 可购买数量>0 | |
| 898 | + // 计算自己还可以购买的数量 | |
| 899 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | |
| 900 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | |
| 901 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | |
| 902 | + let actInfo = th.data.sele_g; | |
| 903 | + if(actInfo.buy_limit>0){ | |
| 904 | + await th.get_buy_num2().then(function (data) { | |
| 905 | + let limited = actInfo.buy_limit; // 限购数量a | |
| 906 | + let promcardbuynum = data.data.data.promcardbuynum; | |
| 907 | + let canBuyNum = limited - promcardbuynum; // 自己还可购买的数量c | |
| 908 | + | |
| 909 | + limitNum = limited; | |
| 910 | + boughtNum = promcardbuynum; | |
| 911 | + | |
| 912 | + if (canBuyNum <= 0) { | |
| 913 | + canBuyNum = 0; | |
| 914 | + } | |
| 915 | + | |
| 916 | + if (curNum > canBuyNum) { | |
| 917 | + getApp().my_warnning('超出限购数量', 0, self); | |
| 918 | + th.setData({ | |
| 919 | + goodsInputNum: canBuyNum || 1, | |
| 920 | + }); | |
| 921 | + is_ok = 0; | |
| 922 | + return false; | |
| 923 | + } | |
| 924 | + }) | |
| 925 | + } | |
| 926 | + } | |
| 927 | + }) | |
| 928 | + | |
| 929 | + if (!is_ok) return false; | |
| 930 | + | |
| 931 | + | |
| 932 | + if (action == "buy") { | |
| 933 | + //--------------此时操作的数据------------ | |
| 934 | + var newd = { | |
| 935 | + id: th.data.data.id, | |
| 936 | + goods_num: th.data.goodsInputNum, | |
| 937 | + pick_id: th.data.sto_sele_id, | |
| 938 | + keyid: th.data.sto_sele_keyid, | |
| 939 | + }; | |
| 940 | + newd['pick_name'] = th.data.sto_sele_name; | |
| 941 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 942 | + newd['guide_type'] = 0; | |
| 943 | + | |
| 944 | + if (getApp().globalData.groupchat_id) { | |
| 945 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | |
| 946 | + } | |
| 947 | + if (this.data.prom_type) { | |
| 948 | + newd['prom_type'] = this.data.prom_type; | |
| 949 | + newd['prom_id'] = this.data.prom_id; | |
| 950 | + newd['prom_price'] = this.data.prom_price; | |
| 951 | + } | |
| 952 | + th.buyNow(newd); | |
| 953 | + } else { | |
| 954 | + | |
| 955 | + var newd = { | |
| 956 | + service_id: th.data.data.id, | |
| 957 | + service_sn: th.data.data.service_sn, | |
| 958 | + service_name: th.data.data.goods_name, | |
| 959 | + goods_num: th.data.goodsInputNum, | |
| 960 | + pick_id: th.data.sto_sele_id, | |
| 961 | + user_id: oo.user_id, | |
| 962 | + store_id: os.stoid, | |
| 963 | + money: th.data.data.shop_price, | |
| 964 | + }; | |
| 965 | + if (getApp().globalData.guide_id) { | |
| 966 | + newd['guide_id'] = getApp().globalData.guide_id; | |
| 967 | + newd['guide_type'] = 0; | |
| 968 | + } | |
| 969 | + | |
| 970 | + if (getApp().globalData.groupchat_id) { | |
| 971 | + newd['groupchat_id'] = getApp().globalData.groupchat_id; | |
| 972 | + } | |
| 973 | + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价 | |
| 974 | + newd['prom_type'] = th.data.options.prom_type; | |
| 975 | + newd['prom_id'] = th.data.options.prom_id; | |
| 976 | + newd['money'] = th.data.prom_price; | |
| 977 | + | |
| 978 | + //----先看会员在购物车中是否加入了该商品----- | |
| 979 | + getApp().request.get("/api/weshop/cartService/page", { | |
| 980 | + data: { | |
| 981 | + store_id: os.stoid, | |
| 982 | + user_id: oo.user_id, | |
| 983 | + service_id: th.data.data.id, | |
| 984 | + pick_id: th.data.sto_sele_id | |
| 985 | + }, | |
| 986 | + success: function (re) { | |
| 987 | + //-------如果购物车中有相关的数据--------- | |
| 988 | + if (ut.ajax_ok(re)) { | |
| 989 | + var item = re.data.data.pageData[0]; | |
| 990 | + // 多门店问题 | |
| 991 | + var cartGoodsNum = 0; | |
| 992 | + const tmpObj = re.data.data.pageData; | |
| 993 | + for (let i = 0; i < tmpObj.length; i++) { | |
| 994 | + if (tmpObj[i].prom_id == th.data.prom_id && tmpObj[i].prom_type==2) { | |
| 995 | + cartGoodsNum += parseInt(tmpObj[i].goods_num); | |
| 996 | + } | |
| 997 | + } | |
| 998 | + // 以下为当前门店同类商品已经加入到购物车 | |
| 999 | + var totalNum = th.data.goodsInputNum + cartGoodsNum | |
| 1000 | + var snum = limitNum - boughtNum-totalNum; | |
| 1001 | + if (snum < 0 && limitNum>0 ) { | |
| 1002 | + getApp().my_warnning('购物车已经购买了该商品,超出活动限购数量', 0, self); | |
| 1003 | + return false; | |
| 1004 | + } | |
| 1005 | + if (totalNum >= redisNums) { | |
| 1006 | + getApp().my_warnning('购物车已经购买了该商品,超出活动数量', 0, self); | |
| 1007 | + return false; | |
| 1008 | + } | |
| 1009 | + var updata = { | |
| 1010 | + id: item.id, | |
| 1011 | + goods_num: totalNum, | |
| 1012 | + money: th.data.data.shop_price, | |
| 1013 | + store_id: os.stoid, | |
| 1014 | + }; | |
| 1015 | + updata['money'] = th.data.prom_price; | |
| 1016 | + | |
| 1017 | + if (getApp().globalData.guide_id) { | |
| 1018 | + updata['guide_id'] = getApp().globalData.guide_id; | |
| 1019 | + updata['guide_type'] = 1; | |
| 1020 | + } | |
| 1021 | + if (getApp().globalData.groupchat_id) { | |
| 1022 | + updata['groupchat_id'] = getApp().globalData.groupchat_id; | |
| 1023 | + } | |
| 1024 | + getApp().request.put("/api/weshop/cartService/update", { | |
| 1025 | + data: updata, | |
| 1026 | + success: function (t) { | |
| 1027 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
| 1028 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | |
| 1029 | + th.setData({ | |
| 1030 | + cartGoodsNum: c_num | |
| 1031 | + }); | |
| 1032 | + th.closeSpecModal(); | |
| 1033 | + } | |
| 1034 | + }); | |
| 1035 | + } else { | |
| 1036 | + getApp().request.post("/api/weshop/cartService/save", { | |
| 1037 | + data: newd, | |
| 1038 | + success: function (t) { | |
| 1039 | + getApp().my_warnning('加入购物车成功', 1, th, 450); | |
| 1040 | + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum; | |
| 1041 | + th.setData({ | |
| 1042 | + cartGoodsNum: c_num | |
| 1043 | + }); | |
| 1044 | + th.closeSpecModal(); | |
| 1045 | + } | |
| 1046 | + }); | |
| 1047 | + } | |
| 1048 | + } | |
| 1049 | + }); | |
| 1050 | + | |
| 1051 | + } | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + }, | |
| 1055 | + | |
| 1056 | + //----------立即购买----------- | |
| 1057 | + buyNow: function (e) { | |
| 1058 | + getApp().globalData.service_now = e; | |
| 1059 | + wx.redirectTo({ | |
| 1060 | + url: "/packageA/pages/cart2_ser/cart2_ser", | |
| 1061 | + }); | |
| 1062 | + }, | |
| 1063 | + //----------增加购买数量----------- | |
| 1064 | + addCartNum: function (t) { | |
| 1065 | + this.checkCartNum(this.data.goodsInputNum + 1); | |
| 1066 | + }, | |
| 1067 | + //----------减少购买数量----------- | |
| 1068 | + subCartNum: function (t) { | |
| 1069 | + this.checkCartNum(this.data.goodsInputNum - 1); | |
| 1070 | + }, | |
| 1071 | + //----------输入框输入购买数量----------- | |
| 1072 | + inputCartNum: function (t) { | |
| 1073 | + this.checkCartNum(Number(t.detail.value)); | |
| 1074 | + }, | |
| 1075 | + | |
| 1076 | + //------检查数量是不是超出限购------ | |
| 1077 | + checkCartNum: async function (t) { | |
| 1078 | + var th = this; | |
| 1079 | + | |
| 1080 | + if (!th.data.def_pick_store) { | |
| 1081 | + wx.showModal({title: '请选择门店',}); | |
| 1082 | + return false; | |
| 1083 | + } | |
| 1084 | + // 非秒杀活动 | |
| 1085 | + if (this.data.prom_type != 1) { | |
| 1086 | + this.setData({ | |
| 1087 | + goodsInputNum: t, | |
| 1088 | + }); | |
| 1089 | + } | |
| 1090 | + | |
| 1091 | + //团购活动 | |
| 1092 | + // 获取redis当前可以购买的数量 | |
| 1093 | + // 如果数量为0,设置和显示已抢光 | |
| 1094 | + // 否则,进一步判断是否超出限购或超出库存 | |
| 1095 | + await this.getactLen().then(async function (res) { | |
| 1096 | + | |
| 1097 | + if (t > res) { // t当前增减的数量 | |
| 1098 | + // wx.showModal({ | |
| 1099 | + // title: '超出活动库存', | |
| 1100 | + // }); | |
| 1101 | + getApp().my_warnning('超出活动库存', 0, self); | |
| 1102 | + th.setData({ | |
| 1103 | + goodsInputNum: res || 1, | |
| 1104 | + }); | |
| 1105 | + return false; | |
| 1106 | + } | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + // res: redis可购买数量 | |
| 1110 | + // console.log('当前可以购买的数量:', res); | |
| 1111 | + if (res <= 0) { | |
| 1112 | + // 可购买数量<=0, 设置和显示已抢光 | |
| 1113 | + th.setData({ | |
| 1114 | + prom_r_null: 1, | |
| 1115 | + }); | |
| 1116 | + } else { | |
| 1117 | + // 可购买数量>0 | |
| 1118 | + // 计算自己还可以购买的数量 | |
| 1119 | + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b | |
| 1120 | + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存 | |
| 1121 | + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 | |
| 1122 | + let actInfo = th.data.sele_g; | |
| 1123 | + await th.get_buy_num2().then(function (data) { | |
| 1124 | + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a | |
| 1125 | + let promcardbuynum = data.data.data.promcardbuynum; | |
| 1126 | + let buyedNum = promcardbuynum; // 自己已经购买的数量b | |
| 1127 | + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | |
| 1128 | + | |
| 1129 | + if (canBuyNum <= 0) { | |
| 1130 | + canBuyNum = 0; | |
| 1131 | + } | |
| 1132 | + | |
| 1133 | + if (t > canBuyNum) { | |
| 1134 | + // wx.showModal({ | |
| 1135 | + // title: '超出限购数量', | |
| 1136 | + // }); | |
| 1137 | + getApp().my_warnning('超出限购数量', 0, self); | |
| 1138 | + th.setData({ | |
| 1139 | + goodsInputNum: canBuyNum || 1, | |
| 1140 | + }); | |
| 1141 | + return false; | |
| 1142 | + } | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + th.setData({ | |
| 1146 | + goodsInputNum: t, | |
| 1147 | + }); | |
| 1148 | + }); | |
| 1149 | + } | |
| 1150 | + | |
| 1151 | + }) | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + }, | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + closeSpecModal: function () { | |
| 1160 | + this.setData({ | |
| 1161 | + openSpecModal: !1, | |
| 1162 | + openSpecModal_pt: !1, | |
| 1163 | + openSpecModal_flash_normal: !1, | |
| 1164 | + }); | |
| 1165 | + }, | |
| 1166 | + | |
| 1167 | + openSpecModel: function (t) { | |
| 1168 | + | |
| 1169 | + if (this.data.get_sto_ing) return false; | |
| 1170 | + | |
| 1171 | + var th = this; | |
| 1172 | + var open_store = t.currentTarget.dataset.ind; | |
| 1173 | + if (getApp().is_sp_hao() && open_store == 1) { | |
| 1174 | + wx.showToast({ | |
| 1175 | + title: "视频号商品不允许加入购物车", | |
| 1176 | + icon: 'none', | |
| 1177 | + duration: 2000 | |
| 1178 | + }); | |
| 1179 | + return false; | |
| 1180 | + } | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + //--先判断会员状态-- | |
| 1184 | + var user_info = getApp().globalData.userInfo; | |
| 1185 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 1186 | + wx.navigateTo({ | |
| 1187 | + url: '/packageE/pages/togoin/togoin', | |
| 1188 | + }) | |
| 1189 | + return false; | |
| 1190 | + } | |
| 1191 | + | |
| 1192 | + this.setData({ | |
| 1193 | + store: 0, | |
| 1194 | + choice_sort_store: 0, | |
| 1195 | + sort_store: 0, | |
| 1196 | + open_ind_store: open_store, | |
| 1197 | + }) | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + var ind = t.currentTarget.dataset.ind; | |
| 1201 | + this.setData({ | |
| 1202 | + openSpecModal: !0, | |
| 1203 | + openSpecModal_ind: ind, | |
| 1204 | + }); | |
| 1205 | + | |
| 1206 | + }, | |
| 1207 | + | |
| 1208 | + //---------点击收藏和不收藏------------ | |
| 1209 | + collectGoods: function () { | |
| 1210 | + var t = this, i = getApp().request; | |
| 1211 | + var user_id = s.globalData.user_id; | |
| 1212 | + if (user_id == '') { | |
| 1213 | + getApp().getUserFir(function () { | |
| 1214 | + }); | |
| 1215 | + getApp().showWarning("未登录"); | |
| 1216 | + return false; | |
| 1217 | + } else { | |
| 1218 | + | |
| 1219 | + if (t.data.is_collect_load) return false; | |
| 1220 | + t.data.is_collect_load = 1; | |
| 1221 | + | |
| 1222 | + if (t.data.is_collect == 1) { //删除收藏 | |
| 1223 | + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, { | |
| 1224 | + success: function (e) { | |
| 1225 | + t.data.is_collect_load = 0; | |
| 1226 | + if (e.data.code == 0) { | |
| 1227 | + t.setData({ | |
| 1228 | + is_collect: 0, | |
| 1229 | + collect_id: 0, | |
| 1230 | + }); | |
| 1231 | + ut.m_toast('取消成功'); | |
| 1232 | + } | |
| 1233 | + } | |
| 1234 | + }); | |
| 1235 | + } else { | |
| 1236 | + var timestamp = Date.parse(new Date()); | |
| 1237 | + timestamp = timestamp / 1000; | |
| 1238 | + var d = { | |
| 1239 | + goods_id: t.data.data.goods_id, | |
| 1240 | + user_id: s.globalData.user_id, | |
| 1241 | + store_id: o.stoid, | |
| 1242 | + add_time: timestamp, | |
| 1243 | + type: 1, | |
| 1244 | + }; | |
| 1245 | + //加入收藏夹就是导购的ID | |
| 1246 | + if (getApp().globalData.guide_id) { | |
| 1247 | + d.guide_id = getApp().globalData.guide_id; | |
| 1248 | + d.guide_type = 2; | |
| 1249 | + } | |
| 1250 | + if (getApp().globalData.groupchat_id) { | |
| 1251 | + d.groupchat_id = getApp().globalData.groupchat_id; | |
| 1252 | + } | |
| 1253 | + i.post("/api/weshop/goodscollect/save", { //添加收藏 | |
| 1254 | + data: d, | |
| 1255 | + success: function (e) { | |
| 1256 | + t.data.is_collect_load = 0; | |
| 1257 | + if (e.data.code == 0) { | |
| 1258 | + t.setData({ | |
| 1259 | + is_collect: 1, | |
| 1260 | + collect_id: e.data.data.collect_id, | |
| 1261 | + }); | |
| 1262 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 1263 | + } | |
| 1264 | + } | |
| 1265 | + }); | |
| 1266 | + } | |
| 1267 | + } | |
| 1268 | + }, | |
| 1269 | + //---------联系客服------------ | |
| 1270 | + contactService: function () { | |
| 1271 | + this.getTel() | |
| 1272 | + .then(() => { | |
| 1273 | + if (self.data.store_tel) { | |
| 1274 | + wx.showModal({ | |
| 1275 | + title: '联系客服', | |
| 1276 | + content: '客服热线:' + self.data.store_tel, | |
| 1277 | + confirmText: '拨打', | |
| 1278 | + success(res) { | |
| 1279 | + if (res.confirm) { | |
| 1280 | + wx.makePhoneCall({ | |
| 1281 | + phoneNumber: self.data.store_tel, | |
| 1282 | + }) | |
| 1283 | + } | |
| 1284 | + ; | |
| 1285 | + }, | |
| 1286 | + }); | |
| 1287 | + } | |
| 1288 | + ; | |
| 1289 | + }); | |
| 1290 | + }, | |
| 1291 | + // 获取客服电话 | |
| 1292 | + getTel() { | |
| 1293 | + return new Promise((resolve, reject) => { | |
| 1294 | + s.getConfig(function (t) { | |
| 1295 | + if (t.store_tel == undefined) { | |
| 1296 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | |
| 1297 | + isShowLoading: 1, | |
| 1298 | + data: {}, | |
| 1299 | + success: function (rs) { | |
| 1300 | + getApp().globalData.config = rs.data.data; | |
| 1301 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | |
| 1302 | + getApp().my_warnning("商家未设置电话", 0, th); | |
| 1303 | + return false; | |
| 1304 | + } | |
| 1305 | + self.setData({ | |
| 1306 | + store_tel: rs.data.data.store_tel, | |
| 1307 | + }); | |
| 1308 | + // s.confirmBox("请联系客服:" + rs.data.data.store_tel); | |
| 1309 | + } | |
| 1310 | + }) | |
| 1311 | + } else { | |
| 1312 | + self.setData({ | |
| 1313 | + store_tel: t.store_tel, | |
| 1314 | + }); | |
| 1315 | + // s.confirmBox("请联系客服:" + t.store_tel); | |
| 1316 | + } | |
| 1317 | + ; | |
| 1318 | + resolve(); | |
| 1319 | + }); | |
| 1320 | + }); | |
| 1321 | + }, | |
| 1322 | + //-------获取购物车数量---------- | |
| 1323 | + requestCardNum: function () { | |
| 1324 | + var t = this; | |
| 1325 | + getApp().request.get("/api/weshop/cart/page", { | |
| 1326 | + data: { | |
| 1327 | + store_id: o.stoid, | |
| 1328 | + user_id: s.globalData.user_id, | |
| 1329 | + state: 0, | |
| 1330 | + is_gift: 0 | |
| 1331 | + }, | |
| 1332 | + success: function (e) { | |
| 1333 | + var num = 0; | |
| 1334 | + for (var i = 0; i < e.data.data.pageData.length; i++) { | |
| 1335 | + num += e.data.data.pageData[i].goods_num; | |
| 1336 | + } | |
| 1337 | + | |
| 1338 | + //-- 读取服务卡的数量 -- | |
| 1339 | + getApp().promiseGet("/api/weshop/cartService/page", { | |
| 1340 | + data: { | |
| 1341 | + store_id: s.globalData.setting.stoid, | |
| 1342 | + user_id: s.globalData.user_id, | |
| 1343 | + } | |
| 1344 | + }).then(res => { | |
| 1345 | + for (var i = 0; i < res.data.data.pageData.length; i++) { | |
| 1346 | + num += res.data.data.pageData[i].goods_num; | |
| 1347 | + } | |
| 1348 | + t.setData({cartGoodsNum: num}); | |
| 1349 | + }) | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + } | |
| 1353 | + }); | |
| 1354 | + }, | |
| 1355 | + | |
| 1356 | + //--点击分享事件--- | |
| 1357 | + onShareAppMessage: function (t) { | |
| 1358 | + | |
| 1359 | + var th = this; | |
| 1360 | + var price = th.data.data.shop_price; | |
| 1361 | + if (th.data.prom_act) { | |
| 1362 | + price = th.data.prom_act.price; | |
| 1363 | + | |
| 1364 | + } | |
| 1365 | + var title = th.data.data.goods_name; | |
| 1366 | + var img = th.data.iurl + th.data.data.image_url; | |
| 1367 | + if (th.data.prom_type == 6) { | |
| 1368 | + title = th.data.prom_act.share_title; | |
| 1369 | + img = th.data.iurl + th.data.prom_act.share_imgurl; | |
| 1370 | + } | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + var url = "/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id=" + th.data.gid+"&prom_id="+th.data.prom_id; | |
| 1374 | + if (getApp().globalData.user_id) { | |
| 1375 | + url += "&first_leader=" + getApp().globalData.user_id; | |
| 1376 | + } | |
| 1377 | + | |
| 1378 | + //-- 如果房间分享,且不是会员分享的 -- | |
| 1379 | + if (getApp().globalData.room_id && | |
| 1380 | + th.data.data.goods_id == getApp().globalData.room_goods_id && | |
| 1381 | + !getApp().globalData.room_user_share | |
| 1382 | + ) { | |
| 1383 | + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; | |
| 1384 | + } | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + var ob = { | |
| 1388 | + title: price + "元 " + title, | |
| 1389 | + path: url, | |
| 1390 | + imageUrl: img, | |
| 1391 | + }; | |
| 1392 | + | |
| 1393 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | |
| 1394 | + if (th.data.prom_type == 1) { | |
| 1395 | + if (th.data.sele_g && th.data.sele_g.share_title) { | |
| 1396 | + title = th.data.sele_g.share_title; | |
| 1397 | + ob.title = title; | |
| 1398 | + } | |
| 1399 | + ; | |
| 1400 | + if (th.data.sele_g && th.data.sele_g.share_imgurl) { | |
| 1401 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | |
| 1402 | + ob.imageUrl = img; | |
| 1403 | + } | |
| 1404 | + } | |
| 1405 | + | |
| 1406 | + return ob; | |
| 1407 | + | |
| 1408 | + }, | |
| 1409 | + | |
| 1410 | + //-----图片失败,默认图片----- | |
| 1411 | + bind_bnerr: function (e) { | |
| 1412 | + var _errImg = e.target.dataset.errorimg; | |
| 1413 | + var _errObj = {}; | |
| 1414 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
| 1415 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 1416 | + }, | |
| 1417 | + | |
| 1418 | + //-----图片失败,默认图片----- | |
| 1419 | + bind_bnerr2: function (e) { | |
| 1420 | + | |
| 1421 | + var _errImg = e.target.dataset.errorimg; | |
| 1422 | + var _errObj = {}; | |
| 1423 | + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png" | |
| 1424 | + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ; | |
| 1425 | + }, | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + //---------拿出门店分类和门店------------ | |
| 1429 | + get_sto(e) { | |
| 1430 | + var is_normal = e; | |
| 1431 | + var th = this, that = this; | |
| 1432 | + | |
| 1433 | + if (e == 1) { | |
| 1434 | + th.setData({ | |
| 1435 | + is_normal: 1 | |
| 1436 | + }) | |
| 1437 | + } else { | |
| 1438 | + th.setData({ | |
| 1439 | + is_normal: 0 | |
| 1440 | + }) | |
| 1441 | + } | |
| 1442 | + | |
| 1443 | + this.data.get_sto_ing = 1; | |
| 1444 | + | |
| 1445 | + var timer_get = setInterval(function () { | |
| 1446 | + if (th.data.is_get_local_ok == 0) return false; | |
| 1447 | + if (!th.data.fir_def_store) return false; | |
| 1448 | + var i = getApp().request; | |
| 1449 | + if (!th.data.data) return false; | |
| 1450 | + var dd = { | |
| 1451 | + store_id: o.stoid, | |
| 1452 | + isstop: 0, | |
| 1453 | + is_pos: 1, | |
| 1454 | + pageSize: 2000 | |
| 1455 | + } | |
| 1456 | + //如果有距离的话 | |
| 1457 | + if (th.data.lat != null) { | |
| 1458 | + dd.lat = th.data.lat; | |
| 1459 | + dd.lon = th.data.lon; | |
| 1460 | + } | |
| 1461 | + clearInterval(timer_get); | |
| 1462 | + | |
| 1463 | + //如果会员是有默认的门店话 | |
| 1464 | + if (!th.data.def_pick_store && th.data.fir_def_store) { | |
| 1465 | + th.setData({def_pick_store: th.data.fir_def_store}); | |
| 1466 | + } | |
| 1467 | + | |
| 1468 | + wx.showLoading({ | |
| 1469 | + title: '加载中.' | |
| 1470 | + }); | |
| 1471 | + //----------获取门店---------------- | |
| 1472 | + getApp().request.promiseGet("/api/weshop/pickup/list", { | |
| 1473 | + data: dd, | |
| 1474 | + }).then(res => { | |
| 1475 | + var e = res; | |
| 1476 | + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { | |
| 1477 | + | |
| 1478 | + var his_cate_num = 0; | |
| 1479 | + for (let i in e.data.data.pageData) { | |
| 1480 | + let item = e.data.data.pageData[i]; | |
| 1481 | + if (item.category_id > 0) { | |
| 1482 | + his_cate_num = 1; | |
| 1483 | + break; | |
| 1484 | + } | |
| 1485 | + } | |
| 1486 | + e.his_cate_num = his_cate_num; | |
| 1487 | + | |
| 1488 | + //--普通门店排版,服务卡项有指定门店才能使用,所以要筛选一下-- | |
| 1489 | + setTimeout(function () { | |
| 1490 | + var sto_list = th.data.data.storageId; | |
| 1491 | + if (sto_list) { | |
| 1492 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
| 1493 | + var it = e.data.data.pageData[k]; | |
| 1494 | + if (sto_list.indexOf(it.keyid) == -1) { | |
| 1495 | + //删除 | |
| 1496 | + e.data.data.pageData.splice(k--, 1); | |
| 1497 | + } | |
| 1498 | + } | |
| 1499 | + | |
| 1500 | + } | |
| 1501 | + | |
| 1502 | + //如果有秒杀的指定门店 | |
| 1503 | + if (th.data.prom_type == 2 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length && !is_normal) { | |
| 1504 | + var pick_up_lists = th.data.prom_act.pick_up_lists; | |
| 1505 | + for (var kq = 0; kq < e.data.data.pageData.length; kq++) { | |
| 1506 | + var it0 = e.data.data.pageData[kq]; | |
| 1507 | + var idx0 = pick_up_lists.findIndex(function (e) { | |
| 1508 | + return e.pickup_id == it0.pickup_id; | |
| 1509 | + }) | |
| 1510 | + if (idx0 < 0) { | |
| 1511 | + //删除 | |
| 1512 | + e.data.data.pageData.splice(kq--, 1); | |
| 1513 | + } | |
| 1514 | + } | |
| 1515 | + | |
| 1516 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
| 1517 | + //-- 查找一下门店有没有在 -- | |
| 1518 | + var idx1 = pick_up_lists.findIndex(function (e) { | |
| 1519 | + return e.pickup_id == th.data.def_pick_store.pickup_id; | |
| 1520 | + }) | |
| 1521 | + if (idx1 < 0) { | |
| 1522 | + //如果是秒杀的指定门店,就要设置秒杀的 | |
| 1523 | + th.data.def_pick_store.is_no_dis_act = 1; | |
| 1524 | + that.setData({ | |
| 1525 | + def_pick_store: th.data.def_pick_store | |
| 1526 | + }) | |
| 1527 | + } | |
| 1528 | + } | |
| 1529 | + | |
| 1530 | + } | |
| 1531 | + | |
| 1532 | + //-- 如果门店过滤后,还会是数量 -- | |
| 1533 | + if (e.data.data.pageData.length) { | |
| 1534 | + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店 | |
| 1535 | + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
| 1536 | + th.setData({ | |
| 1537 | + def_pick_store: e.data.data.pageData[0], | |
| 1538 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 1539 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 1540 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | |
| 1541 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | |
| 1542 | + }); | |
| 1543 | + th.data.fir_def_store = e.data.data.pageData[0]; | |
| 1544 | + } | |
| 1545 | + | |
| 1546 | + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 -- | |
| 1547 | + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') { | |
| 1548 | + for (var k = 0; k < e.data.data.pageData.length; k++) { | |
| 1549 | + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) { | |
| 1550 | + e.data.data.pageData.splice(k, 1); //删除 | |
| 1551 | + break; | |
| 1552 | + } | |
| 1553 | + } | |
| 1554 | + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加 | |
| 1555 | + } | |
| 1556 | + | |
| 1557 | + th.setData({all_pick_list: e.data.data.pageData, isshow: 1}); | |
| 1558 | + th.deal_pickup(e); | |
| 1559 | + } else { | |
| 1560 | + th.data.get_sto_ing = 0; | |
| 1561 | + th.setData({ | |
| 1562 | + isshow: 1 | |
| 1563 | + }) | |
| 1564 | + wx.hideLoading(); | |
| 1565 | + } | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + }, 800) | |
| 1569 | + | |
| 1570 | + } | |
| 1571 | + }) | |
| 1572 | + }, 200) | |
| 1573 | + }, | |
| 1574 | + //获取搜索门店输入的值 | |
| 1575 | + input_store: function (e) { | |
| 1576 | + this.setData({ | |
| 1577 | + keyword: e.detail.value | |
| 1578 | + }) | |
| 1579 | + }, | |
| 1580 | + //搜索门店 | |
| 1581 | + searchfn() { | |
| 1582 | + let choice_sort_store = this.data.choice_sort_store | |
| 1583 | + if (choice_sort_store == 0) { //全局搜索 | |
| 1584 | + let all_pick_list = this.data.all_pick_list | |
| 1585 | + let def_pickpu_list = this.data.def_pickpu_list | |
| 1586 | + let keyword = this.data.keyword | |
| 1587 | + if (keyword) { | |
| 1588 | + let arr = all_pick_list.filter(item => { | |
| 1589 | + let i = item.pickup_name.indexOf(keyword) | |
| 1590 | + if (i > -1) { | |
| 1591 | + return true | |
| 1592 | + } else { | |
| 1593 | + return false | |
| 1594 | + } | |
| 1595 | + }) | |
| 1596 | + if (arr && arr.length > 0) { | |
| 1597 | + if (this.data.is_show_sto_cat == 1) { | |
| 1598 | + this.setData({ | |
| 1599 | + def_pickpu_list: arr | |
| 1600 | + }) | |
| 1601 | + } else { | |
| 1602 | + this.setData({ | |
| 1603 | + only_pk: arr | |
| 1604 | + }) | |
| 1605 | + } | |
| 1606 | + } else { | |
| 1607 | + wx.showToast({ | |
| 1608 | + title: '没有搜索到门店', | |
| 1609 | + icon: 'none', | |
| 1610 | + duration: 2000 | |
| 1611 | + }) | |
| 1612 | + } | |
| 1613 | + } else { | |
| 1614 | + if (this.data.is_show_sto_cat == 1) { | |
| 1615 | + this.setData({ | |
| 1616 | + def_pickpu_list: all_pick_list.slice(0, 10) | |
| 1617 | + }) | |
| 1618 | + } else { | |
| 1619 | + this.setData({ | |
| 1620 | + only_pk: all_pick_list | |
| 1621 | + }) | |
| 1622 | + } | |
| 1623 | + | |
| 1624 | + } | |
| 1625 | + } else { //分类下搜索 | |
| 1626 | + let sec_i = this.data.sec_i | |
| 1627 | + let all_sto = this.data.all_sto | |
| 1628 | + let old_all_sto = this.data.old_all_sto | |
| 1629 | + if (!old_all_sto) { | |
| 1630 | + this.setData({ | |
| 1631 | + old_all_sto: JSON.parse(JSON.stringify(all_sto)) | |
| 1632 | + }) | |
| 1633 | + } | |
| 1634 | + let sec_sto = this.data.sec_sto | |
| 1635 | + let sec_arr = this.data.old_all_sto[sec_i].s_arr | |
| 1636 | + let keyword = this.data.keyword | |
| 1637 | + let text = 'sec_sto.s_arr' | |
| 1638 | + if (keyword) { | |
| 1639 | + let arr = sec_arr.filter(item => { | |
| 1640 | + let i = item.pickup_name.indexOf(keyword) | |
| 1641 | + if (i > -1) { | |
| 1642 | + return true | |
| 1643 | + } else { | |
| 1644 | + return false | |
| 1645 | + } | |
| 1646 | + }) | |
| 1647 | + if (arr && arr.length > 0) { | |
| 1648 | + this.setData({ | |
| 1649 | + [text]: arr | |
| 1650 | + }) | |
| 1651 | + } else { | |
| 1652 | + wx.showToast({ | |
| 1653 | + title: '没有搜索到门店', | |
| 1654 | + icon: 'none', | |
| 1655 | + duration: 2000 | |
| 1656 | + }) | |
| 1657 | + } | |
| 1658 | + } else { | |
| 1659 | + if (this.data.old_all_sto) { | |
| 1660 | + this.setData({ | |
| 1661 | + [text]: this.data.old_all_sto[sec_i].s_arr | |
| 1662 | + }) | |
| 1663 | + } else { | |
| 1664 | + this.setData({ | |
| 1665 | + [text]: all_sto[sec_i].s_arr | |
| 1666 | + }) | |
| 1667 | + } | |
| 1668 | + } | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + } | |
| 1672 | + }, | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + //------------处理门店--------------- | |
| 1676 | + deal_pickup(e) { | |
| 1677 | + var th = this; | |
| 1678 | + if (!th.data.data) return false | |
| 1679 | + wx.hideLoading(); | |
| 1680 | + //单总量超出5个的时候 | |
| 1681 | + if (e.data.data.total > 10 && e.his_cate_num) { | |
| 1682 | + getApp().request.get("/api/weshop/storagecategory/page", { | |
| 1683 | + data: { | |
| 1684 | + store_id: o.stoid, | |
| 1685 | + pageSize: 1000, | |
| 1686 | + orderField: "sort", | |
| 1687 | + orderType: 'asc', | |
| 1688 | + }, | |
| 1689 | + success: function (ee) { | |
| 1690 | + if (ee.data.code == 0) { | |
| 1691 | + | |
| 1692 | + var check_all_cate = 0; | |
| 1693 | + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) { | |
| 1694 | + for (let i in ee.data.data.pageData) { | |
| 1695 | + let item = ee.data.data.pageData[i]; | |
| 1696 | + if (item.is_show == 1) { | |
| 1697 | + check_all_cate = 1; | |
| 1698 | + break | |
| 1699 | + } | |
| 1700 | + } | |
| 1701 | + } | |
| 1702 | + | |
| 1703 | + if (check_all_cate) { | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + var sto_cate = ee.data.data.pageData; | |
| 1707 | + var sto_arr = e.data.data.pageData; | |
| 1708 | + var newarr = new Array(); | |
| 1709 | + var qita = new Array(); | |
| 1710 | + | |
| 1711 | + var is_del_pk = 0; | |
| 1712 | + | |
| 1713 | + //----要进行门店分组-------- | |
| 1714 | + for (var i = 0; i < sto_arr.length; i++) { | |
| 1715 | + //找一下这个门店有没有在分类数组内 | |
| 1716 | + var find2 = 0, find2name = "", sort = 0; | |
| 1717 | + is_del_pk = 0; | |
| 1718 | + for (var m = 0; m < sto_cate.length; m++) { | |
| 1719 | + if (sto_arr[i].category_id == sto_cate[m].cat_id) { | |
| 1720 | + if (sto_cate[m].is_show != 1) { | |
| 1721 | + is_del_pk = 1; | |
| 1722 | + sto_arr.splice(i, 1); | |
| 1723 | + i--; | |
| 1724 | + } else { | |
| 1725 | + find2 = sto_cate[m].cat_id; | |
| 1726 | + find2name = sto_cate[m].cat_name; | |
| 1727 | + sort = sto_cate[m].sort; | |
| 1728 | + is_del_pk = 0; | |
| 1729 | + } | |
| 1730 | + break; | |
| 1731 | + } | |
| 1732 | + } | |
| 1733 | + if (is_del_pk) continue; | |
| 1734 | + | |
| 1735 | + if (newarr.length > 0) { | |
| 1736 | + var find = 0; | |
| 1737 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 1738 | + if (find2 != 0) { | |
| 1739 | + for (var ii = 0; ii < newarr.length; ii++) { | |
| 1740 | + if (sto_arr[i].category_id == newarr[ii].cat_id) { | |
| 1741 | + newarr[ii].s_arr.push(sto_arr[i]); | |
| 1742 | + find = 1; | |
| 1743 | + break; | |
| 1744 | + } | |
| 1745 | + } | |
| 1746 | + if (find == 0) { | |
| 1747 | + var arr0 = new Array(); | |
| 1748 | + arr0.push(sto_arr[i]); | |
| 1749 | + var item = { | |
| 1750 | + cat_id: find2, | |
| 1751 | + name: find2name, | |
| 1752 | + sort: sort, | |
| 1753 | + s_arr: arr0 | |
| 1754 | + }; | |
| 1755 | + newarr.push(item); | |
| 1756 | + } | |
| 1757 | + } else { | |
| 1758 | + qita.push(sto_arr[i]); | |
| 1759 | + } | |
| 1760 | + } else { | |
| 1761 | + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他 | |
| 1762 | + if (find2 != 0) { | |
| 1763 | + var arr0 = new Array(); | |
| 1764 | + arr0.push(sto_arr[i]); | |
| 1765 | + var item = { | |
| 1766 | + cat_id: find2, | |
| 1767 | + name: find2name, | |
| 1768 | + sort: sort, | |
| 1769 | + s_arr: arr0 | |
| 1770 | + }; | |
| 1771 | + newarr.push(item); | |
| 1772 | + } else { | |
| 1773 | + qita.push(sto_arr[i]); | |
| 1774 | + } | |
| 1775 | + } | |
| 1776 | + } | |
| 1777 | + | |
| 1778 | + var def_arr = new Array(); | |
| 1779 | + //-- 开始就看10个门店 -- | |
| 1780 | + for (var k = 0; k < 10; k++) { | |
| 1781 | + if (k == sto_arr.length) break; | |
| 1782 | + def_arr.push(sto_arr[k]); | |
| 1783 | + } | |
| 1784 | + | |
| 1785 | + th.setData({ | |
| 1786 | + def_pickpu_list: def_arr, | |
| 1787 | + pickpu_list: ee.data.data.pageData | |
| 1788 | + }); | |
| 1789 | + | |
| 1790 | + //门店分类要排序下 | |
| 1791 | + function compare(property) { | |
| 1792 | + return function (a, b) { | |
| 1793 | + var value1 = a[property]; | |
| 1794 | + var value2 = b[property]; | |
| 1795 | + return value1 - value2; | |
| 1796 | + } | |
| 1797 | + } | |
| 1798 | + | |
| 1799 | + if (newarr.length > 0) | |
| 1800 | + newarr.sort(compare("sort")); | |
| 1801 | + | |
| 1802 | + //----安排其他的分类----- | |
| 1803 | + if (qita.length > 0) { | |
| 1804 | + var item = { | |
| 1805 | + cat_id: -1, | |
| 1806 | + name: "其他", | |
| 1807 | + s_arr: qita | |
| 1808 | + }; | |
| 1809 | + newarr.push(item); | |
| 1810 | + } | |
| 1811 | + | |
| 1812 | + var sd = { | |
| 1813 | + all_sto: newarr, | |
| 1814 | + is_show_sto_cat: 1 | |
| 1815 | + } | |
| 1816 | + if (!sto_arr || sto_arr.length <= 10) { | |
| 1817 | + sd.is_show_sto_cat = -1; | |
| 1818 | + sd.only_pk = sto_arr; | |
| 1819 | + } | |
| 1820 | + th.setData(sd); | |
| 1821 | + | |
| 1822 | + } else { | |
| 1823 | + th.setData({ | |
| 1824 | + is_show_sto_cat: -1, | |
| 1825 | + only_pk: e.data.data.pageData | |
| 1826 | + }); | |
| 1827 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
| 1828 | + if (!th.data.def_pick_store) { | |
| 1829 | + th.setData({def_pick_store: e.data.data.pageData[0]}) | |
| 1830 | + } | |
| 1831 | + } | |
| 1832 | + } else { | |
| 1833 | + th.setData({ | |
| 1834 | + is_show_sto_cat: -1, | |
| 1835 | + only_pk: e.data.data.pageData | |
| 1836 | + }); | |
| 1837 | + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------ | |
| 1838 | + if (!th.data.def_pick_store) { | |
| 1839 | + th.setData({def_pick_store: e.data.data.pageData[0]}) | |
| 1840 | + } | |
| 1841 | + } | |
| 1842 | + th.data.get_sto_ing = 0; | |
| 1843 | + } | |
| 1844 | + }); | |
| 1845 | + } else { | |
| 1846 | + th.data.get_sto_ing = 0; | |
| 1847 | + | |
| 1848 | + th.setData({ | |
| 1849 | + is_show_sto_cat: 0, | |
| 1850 | + only_pk: e.data.data.pageData | |
| 1851 | + }); | |
| 1852 | + //-----如果没有默认门店,要取第一个门店作为默认店------ | |
| 1853 | + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) { | |
| 1854 | + | |
| 1855 | + if (e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) { | |
| 1856 | + th.setData({ | |
| 1857 | + def_pick_store: e.data.data.pageData[0], | |
| 1858 | + sto_sele_name: e.data.data.pageData[0].pickup_name, | |
| 1859 | + sto_sele_id: e.data.data.pageData[0].pickup_id, | |
| 1860 | + sto_sele_distr: e.data.data.pageData[0].distr_type, | |
| 1861 | + sto_sele_keyid: e.data.data.pageData[0].keyid, | |
| 1862 | + }) | |
| 1863 | + } | |
| 1864 | + | |
| 1865 | + } | |
| 1866 | + } | |
| 1867 | + }, | |
| 1868 | + | |
| 1869 | + //加载更多是靠这个函数 | |
| 1870 | + onReachBottom: function () { | |
| 1871 | + if (this.data.activeCategoryId == 2) { | |
| 1872 | + if (!this.data.comments_no_more) this.requestComments_new(); | |
| 1873 | + } | |
| 1874 | + | |
| 1875 | + var goods_list = this.selectComponent("#goods_list"); //组件的id | |
| 1876 | + if (goods_list) goods_list.get_list(); | |
| 1877 | + }, | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + //---小于10的格式化函数---- | |
| 1881 | + timeFormat(param) { | |
| 1882 | + return param < 10 ? '0' + param : param; | |
| 1883 | + }, | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + // ----视频图片---- | |
| 1887 | + // 图片计数器 | |
| 1888 | + swiperChange: function (e) { | |
| 1889 | + var that = this; | |
| 1890 | + if (e.detail.current > 0) { | |
| 1891 | + that.setData({ | |
| 1892 | + hiddenn: 1, | |
| 1893 | + videopicture: 1, | |
| 1894 | + }) | |
| 1895 | + } else { | |
| 1896 | + that.setData({ | |
| 1897 | + hiddenn: 0, | |
| 1898 | + videopicture: 0, | |
| 1899 | + }) | |
| 1900 | + } | |
| 1901 | + if (e.detail.source == 'touch') { | |
| 1902 | + that.setData({ | |
| 1903 | + current: e.detail.current | |
| 1904 | + }) | |
| 1905 | + } | |
| 1906 | + }, | |
| 1907 | + | |
| 1908 | + /*---视频相关--*/ | |
| 1909 | + videopicture: function (e) { | |
| 1910 | + var vipi = e.currentTarget.dataset.vipi; | |
| 1911 | + this.setData({ | |
| 1912 | + videopicture: vipi, | |
| 1913 | + swiperCurrent: vipi, | |
| 1914 | + noon: 0, | |
| 1915 | + current: 1 | |
| 1916 | + }); | |
| 1917 | + }, | |
| 1918 | + | |
| 1919 | + videoPlay: function (e) { | |
| 1920 | + var _index = e.currentTarget.id | |
| 1921 | + this.setData({ | |
| 1922 | + _index: _index, | |
| 1923 | + noon: 1 | |
| 1924 | + }) | |
| 1925 | + | |
| 1926 | + setTimeout(function () { | |
| 1927 | + //将点击视频进行播放 | |
| 1928 | + var videoContext = wx.createVideoContext(_index) | |
| 1929 | + videoContext.play(); | |
| 1930 | + }, 500) | |
| 1931 | + }, | |
| 1932 | + | |
| 1933 | + //--获取头像的本地缓存,回调写法-- | |
| 1934 | + get_head_temp: function (tt, func) { | |
| 1935 | + var ee = this; | |
| 1936 | + if (ee.data.share_head) { | |
| 1937 | + tt(func); | |
| 1938 | + return false; | |
| 1939 | + } | |
| 1940 | + //---获取分享图片的本地地址,头像和商品图片---- | |
| 1941 | + var path2 = getApp().globalData.userInfo ? getApp().globalData.userInfo.head_pic : ''; | |
| 1942 | + if (path2 == "") { | |
| 1943 | + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; | |
| 1944 | + tt(func); | |
| 1945 | + } else { | |
| 1946 | + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | |
| 1947 | + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); | |
| 1948 | + wx.getImageInfo({ | |
| 1949 | + src: path2, | |
| 1950 | + success: function (res) { | |
| 1951 | + //res.path是网络图片的本地地址 | |
| 1952 | + ee.data.share_head = res.path; | |
| 1953 | + tt(func); | |
| 1954 | + }, | |
| 1955 | + fail: function (res) { | |
| 1956 | + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 | |
| 1957 | + tt(func); | |
| 1958 | + } | |
| 1959 | + }); | |
| 1960 | + } | |
| 1961 | + }, | |
| 1962 | + | |
| 1963 | + //--获取商品图片的本地缓存,回调写法-- | |
| 1964 | + get_goods_temp: function (tt) { | |
| 1965 | + var ee = this; | |
| 1966 | + if (ee.data.share_goods_img) { | |
| 1967 | + tt(); | |
| 1968 | + return false; | |
| 1969 | + } | |
| 1970 | + | |
| 1971 | + var img = ee.data.iurl + ee.data.data.image_url; | |
| 1972 | + if (ee.data.prom_act && ee.data.prom_act.share_img) { | |
| 1973 | + img = ee.data.iurl + ee.data.prom_act.share_img; | |
| 1974 | + } | |
| 1975 | + | |
| 1976 | + //获取商品是分享图信息 | |
| 1977 | + wx.getImageInfo({ | |
| 1978 | + src: img, | |
| 1979 | + success: function (res) { | |
| 1980 | + //res.path是网络图片的本地地址 | |
| 1981 | + ee.data.share_goods_img = res.path; | |
| 1982 | + tt(); | |
| 1983 | + }, | |
| 1984 | + fail: function (res) { | |
| 1985 | + //获取默认空白图 | |
| 1986 | + wx.getImageInfo({ | |
| 1987 | + src: ee.data.iurl + '/miniapp/images/default_g_img.gif', | |
| 1988 | + success: function (res) { | |
| 1989 | + ee.data.share_goods_img = res.path; //分享的图片不能用网络的 | |
| 1990 | + tt(); | |
| 1991 | + } | |
| 1992 | + }) | |
| 1993 | + | |
| 1994 | + } | |
| 1995 | + }); | |
| 1996 | + }, | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + //--跳转到商品详情页面-- | |
| 2000 | + go_goods: function (e) { | |
| 2001 | + var gid = e.currentTarget.dataset.gid; | |
| 2002 | + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid; | |
| 2003 | + getApp().goto(url); | |
| 2004 | + }, | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + pop_err_img: function (e) { | |
| 2008 | + var txt = e.currentTarget.dataset.errorimg; | |
| 2009 | + var ob = {}; | |
| 2010 | + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif"; | |
| 2011 | + this.setData(ob); | |
| 2012 | + }, | |
| 2013 | + | |
| 2014 | + // 选择门店 | |
| 2015 | + choice_store: function (ee) { | |
| 2016 | + this.setData({ | |
| 2017 | + keyword: '' | |
| 2018 | + }) | |
| 2019 | + var th = this; | |
| 2020 | + var ind = ee.currentTarget.dataset.ind; | |
| 2021 | + var bconfig = th.data.bconfig; | |
| 2022 | + | |
| 2023 | + //--先判断会员状态-- | |
| 2024 | + var user_info = getApp().globalData.userInfo; | |
| 2025 | + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 2026 | + // wx.navigateTo({ | |
| 2027 | + // url: '/packageE/pages/togoin/togoin', | |
| 2028 | + // }) | |
| 2029 | + // return false; | |
| 2030 | + // } | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + //如果开启了,则不在选择门店 | |
| 2034 | + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) { | |
| 2035 | + return false; | |
| 2036 | + } | |
| 2037 | + if (!th.data.only_pk && !th.data.def_pickpu_list) { | |
| 2038 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | |
| 2039 | + return false; | |
| 2040 | + } | |
| 2041 | + | |
| 2042 | + if (th.data.only_pk && !th.data.only_pk.length) { | |
| 2043 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | |
| 2044 | + return false; | |
| 2045 | + } | |
| 2046 | + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) { | |
| 2047 | + getApp().confirmBox("暂无可售门店", null, 25000, !1); | |
| 2048 | + return false; | |
| 2049 | + } | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + if (bconfig && bconfig.is_sort_storage) { | |
| 2053 | + wx.getLocation({ | |
| 2054 | + type: 'gcj02', | |
| 2055 | + success: function (res) { | |
| 2056 | + | |
| 2057 | + th.data.lat = res.latitude; | |
| 2058 | + th.data.lon = res.longitude; | |
| 2059 | + th.data.is_get_local_ok = 1; | |
| 2060 | + th.setData({is_gps: 1}); | |
| 2061 | + th.get_sto(th.data.is_normal); | |
| 2062 | + }, | |
| 2063 | + fail: function (res) { | |
| 2064 | + | |
| 2065 | + th.data.is_get_local_ok = 1; | |
| 2066 | + th.get_sto(th.data.is_normal); | |
| 2067 | + if (res.errCode == 2) { | |
| 2068 | + th.setData({is_gps: 0}); | |
| 2069 | + if (th.data.is_gps == 0) { | |
| 2070 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
| 2071 | + } | |
| 2072 | + } else { | |
| 2073 | + th.setData({is_gps: "3"}); | |
| 2074 | + } | |
| 2075 | + | |
| 2076 | + } | |
| 2077 | + }) | |
| 2078 | + } else { | |
| 2079 | + th.data.is_get_local_ok = 1; | |
| 2080 | + th.get_sto(th.data.is_normal); | |
| 2081 | + } | |
| 2082 | + | |
| 2083 | + if (ind != undefined && ind != null) { | |
| 2084 | + this.setData({ | |
| 2085 | + open_ind_store: ind, | |
| 2086 | + store: 1, | |
| 2087 | + openSpecModal: !1, | |
| 2088 | + openSpecModal_pt: !1 | |
| 2089 | + }) | |
| 2090 | + } else { | |
| 2091 | + this.setData({ | |
| 2092 | + store: 1, | |
| 2093 | + openSpecModal: !1, | |
| 2094 | + openSpecModal_pt: !1 | |
| 2095 | + }) | |
| 2096 | + } | |
| 2097 | + }, | |
| 2098 | + //关闭选择门店 | |
| 2099 | + close_popup: function (e) { | |
| 2100 | + var th = this; | |
| 2101 | + this.setData({ | |
| 2102 | + store: 0, | |
| 2103 | + choice_sort_store: 0, | |
| 2104 | + sort_store: 0, | |
| 2105 | + fir_pick_index: 0, | |
| 2106 | + sec_pick_index: 0 | |
| 2107 | + }) | |
| 2108 | + | |
| 2109 | + var openindstore = this.data.open_ind_store; | |
| 2110 | + if (openindstore == 1) { | |
| 2111 | + th.setData({ | |
| 2112 | + openSpecModal: !0, | |
| 2113 | + openSpecModal_ind: openindstore, | |
| 2114 | + }); | |
| 2115 | + } else if (openindstore == 2) { | |
| 2116 | + th.setData({ | |
| 2117 | + openSpecModal: !0, | |
| 2118 | + openSpecModal_ind: openindstore, | |
| 2119 | + }); | |
| 2120 | + } else if (openindstore == 4) { //4就是拼团 | |
| 2121 | + th.setData({ | |
| 2122 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 2123 | + store: 0, //关闭门店 | |
| 2124 | + choice_sort_store: 0, //关闭门店2级 | |
| 2125 | + sort_store: 0, //关闭门店2级 | |
| 2126 | + }); | |
| 2127 | + } else { | |
| 2128 | + th.setData({ | |
| 2129 | + store: 0, | |
| 2130 | + choice_sort_store: 0, | |
| 2131 | + sort_store: 0 | |
| 2132 | + }) | |
| 2133 | + } | |
| 2134 | + }, | |
| 2135 | + | |
| 2136 | + //选择更多门店 | |
| 2137 | + more_store: function () { | |
| 2138 | + this.setData({ | |
| 2139 | + sort_store: 1 | |
| 2140 | + }); | |
| 2141 | + }, | |
| 2142 | + | |
| 2143 | + sort_store: function () { | |
| 2144 | + }, | |
| 2145 | + // 返回按钮 | |
| 2146 | + returns: function () { | |
| 2147 | + this.setData({ | |
| 2148 | + sort_store: 0, | |
| 2149 | + choice_sort_store: 0 | |
| 2150 | + }); | |
| 2151 | + }, | |
| 2152 | + //---选择分类门店--- | |
| 2153 | + choice_sort_store: function (e) { | |
| 2154 | + var index = e.currentTarget.dataset.index; | |
| 2155 | + var region_name = e.currentTarget.dataset.region; | |
| 2156 | + var item = this.data.all_sto[index]; | |
| 2157 | + this.setData({ | |
| 2158 | + region_name: region_name, | |
| 2159 | + sort_store: 0, | |
| 2160 | + choice_sort_store: 1, | |
| 2161 | + sec_sto: item, | |
| 2162 | + sec_i: index, | |
| 2163 | + sec_pick_index: 0 | |
| 2164 | + }); | |
| 2165 | + }, | |
| 2166 | + | |
| 2167 | + choose_for_store_fir: function (e) { | |
| 2168 | + var index_c = e.currentTarget.dataset.ind; | |
| 2169 | + var th = this; | |
| 2170 | + th.setData({ | |
| 2171 | + fir_pick_index: index_c | |
| 2172 | + }) | |
| 2173 | + | |
| 2174 | + }, | |
| 2175 | + | |
| 2176 | + //确定def_pick为选择的门店 | |
| 2177 | + sure_pick: function (e) { | |
| 2178 | + var th = this; | |
| 2179 | + var item = null; | |
| 2180 | + var openindstore = th.data.open_ind_store; | |
| 2181 | + | |
| 2182 | + if (th.data.choice_sort_store == 0) { | |
| 2183 | + var index = th.data.fir_pick_index; | |
| 2184 | + if (th.data.is_show_sto_cat == 1) { | |
| 2185 | + item = th.data.def_pickpu_list[index]; | |
| 2186 | + } else { | |
| 2187 | + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候 | |
| 2188 | + } | |
| 2189 | + | |
| 2190 | + } else { | |
| 2191 | + var index = th.data.sec_pick_index; | |
| 2192 | + item = th.data.sec_sto.s_arr[index]; | |
| 2193 | + } | |
| 2194 | + | |
| 2195 | + if (!item) return false; | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + var ser_card = this.data.data; | |
| 2199 | + //判断门店的配送方式是不是匹配 | |
| 2200 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(item.keyid) == -1) { | |
| 2201 | + wx.showToast({ | |
| 2202 | + title: "该门店无此服务项目,请重新选择!", | |
| 2203 | + icon: 'none', | |
| 2204 | + duration: 2000 | |
| 2205 | + }); | |
| 2206 | + return false; | |
| 2207 | + } | |
| 2208 | + | |
| 2209 | + if (!item) return false; | |
| 2210 | + | |
| 2211 | + th.setData({ | |
| 2212 | + def_pick_store: item, | |
| 2213 | + sto_sele_name: item.pickup_name, | |
| 2214 | + sto_sele_id: item.pickup_id, | |
| 2215 | + sto_sele_keyid: item.keyid, | |
| 2216 | + sto_sele_distr: item.distr_type, | |
| 2217 | + store: 0, | |
| 2218 | + choice_sort_store: 0, | |
| 2219 | + fir_pick_index: 0 | |
| 2220 | + }); | |
| 2221 | + | |
| 2222 | + if (openindstore == 1) { | |
| 2223 | + th.setData({ | |
| 2224 | + openSpecModal: !0, | |
| 2225 | + openSpecModal_ind: openindstore, | |
| 2226 | + }); | |
| 2227 | + } else if (openindstore == 2) { | |
| 2228 | + th.setData({ | |
| 2229 | + openSpecModal: !0, | |
| 2230 | + openSpecModal_ind: openindstore, | |
| 2231 | + }); | |
| 2232 | + } else if (openindstore == 4) { //4就是拼团 | |
| 2233 | + th.setData({ | |
| 2234 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 2235 | + store: 0, //关闭门店 | |
| 2236 | + choice_sort_store: 0, //关闭门店2级 | |
| 2237 | + sort_store: 0, //关闭门店2级 | |
| 2238 | + }); | |
| 2239 | + } else { | |
| 2240 | + th.setData({ | |
| 2241 | + store: 0, | |
| 2242 | + choice_sort_store: 0, | |
| 2243 | + sort_store: 0 | |
| 2244 | + }) | |
| 2245 | + } | |
| 2246 | + }, | |
| 2247 | + | |
| 2248 | + //---点击二级之后的选择--- | |
| 2249 | + choose_for_store: function (e) { | |
| 2250 | + var index_c = e.currentTarget.dataset.ind; | |
| 2251 | + var th = this; | |
| 2252 | + th.setData({ | |
| 2253 | + sec_pick_index: index_c, | |
| 2254 | + fir_pick_index: index_c | |
| 2255 | + }) | |
| 2256 | + | |
| 2257 | + }, | |
| 2258 | + //把选择的门店设置成默认的门店def_pick | |
| 2259 | + set_def_pick: function (e) { | |
| 2260 | + var th = this; | |
| 2261 | + var item = null; | |
| 2262 | + if (th.data.choice_sort_store == 0) { | |
| 2263 | + var index = th.data.fir_pick_index; | |
| 2264 | + if (th.data.is_show_sto_cat == 1) { | |
| 2265 | + item = th.data.def_pickpu_list[index]; | |
| 2266 | + } else { | |
| 2267 | + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候 | |
| 2268 | + } | |
| 2269 | + } else { | |
| 2270 | + var index = th.data.sec_pick_index; | |
| 2271 | + item = th.data.sec_sto.s_arr[index]; | |
| 2272 | + } | |
| 2273 | + | |
| 2274 | + if (!item) return false; | |
| 2275 | + | |
| 2276 | + //判断门店的配送方式是不是匹配 | |
| 2277 | + var ser_card = this.data.data; | |
| 2278 | + //判断门店的配送方式是不是匹配 | |
| 2279 | + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(item.keyid) == -1) { | |
| 2280 | + wx.showToast({ | |
| 2281 | + title: "该门店无此服务项目,请重新选择!", | |
| 2282 | + icon: 'none', | |
| 2283 | + duration: 2000 | |
| 2284 | + }); | |
| 2285 | + return false; | |
| 2286 | + } | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + var store_id = o.stoid; | |
| 2290 | + var user_id = getApp().globalData.user_id; | |
| 2291 | + var def_pickup_id = item.pickup_id; | |
| 2292 | + | |
| 2293 | + getApp().request.put('/api/weshop/users/update', { | |
| 2294 | + data: { | |
| 2295 | + user_id: user_id, | |
| 2296 | + def_pickup_id: def_pickup_id | |
| 2297 | + }, | |
| 2298 | + success: function (res) { | |
| 2299 | + if (res.data.code == 0) { | |
| 2300 | + if (th.data.choice_sort_store == 0) th.setData({ | |
| 2301 | + fir_pick_index: 0 | |
| 2302 | + }); | |
| 2303 | + getApp().globalData.pk_store = item; | |
| 2304 | + } else { | |
| 2305 | + //s.showWarning("设置默认门店地址失败", null, 500, !1); | |
| 2306 | + getApp().my_warnning("设置默认门店地址失败", 0, th) | |
| 2307 | + } | |
| 2308 | + | |
| 2309 | + } | |
| 2310 | + }); | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + if (!item) return false; | |
| 2314 | + | |
| 2315 | + th.setData({ | |
| 2316 | + def_pick_store: item, | |
| 2317 | + sto_sele_name: item.pickup_name, | |
| 2318 | + sto_sele_id: item.pickup_id, | |
| 2319 | + sto_sele_keyid: item.keyid, | |
| 2320 | + sto_sele_distr: item.distr_type, | |
| 2321 | + store: 0, | |
| 2322 | + choice_sort_store: 0 | |
| 2323 | + }); | |
| 2324 | + | |
| 2325 | + var openindstore = th.data.open_ind_store; | |
| 2326 | + if (openindstore == 1) { | |
| 2327 | + th.setData({ | |
| 2328 | + openSpecModal: !0, | |
| 2329 | + openSpecModal_ind: openindstore, | |
| 2330 | + store: 0, | |
| 2331 | + choice_sort_store: 0, | |
| 2332 | + sort_store: 0, | |
| 2333 | + }); | |
| 2334 | + } else if (openindstore == 2) { | |
| 2335 | + th.setData({ | |
| 2336 | + openSpecModal: !0, | |
| 2337 | + openSpecModal_ind: openindstore, | |
| 2338 | + store: 0, | |
| 2339 | + choice_sort_store: 0, | |
| 2340 | + sort_store: 0, | |
| 2341 | + }); | |
| 2342 | + } else if (openindstore == 4) { //4就是拼团 | |
| 2343 | + th.setData({ | |
| 2344 | + openSpecModal_pt: 1, //打开拼团购买界面 | |
| 2345 | + store: 0, //关闭门店 | |
| 2346 | + choice_sort_store: 0, //关闭门店2级 | |
| 2347 | + sort_store: 0, //关闭门店2级 | |
| 2348 | + }); | |
| 2349 | + } else { | |
| 2350 | + th.setData({ | |
| 2351 | + store: 0, | |
| 2352 | + choice_sort_store: 0, | |
| 2353 | + sort_store: 0, | |
| 2354 | + }) | |
| 2355 | + } | |
| 2356 | + | |
| 2357 | + }, | |
| 2358 | + | |
| 2359 | + wait_for_store_config: function () { | |
| 2360 | + var th = this; | |
| 2361 | + var t_time = setInterval(function () { | |
| 2362 | + if (th.data.bconfig == null) false; | |
| 2363 | + var e = th.data.bconfig; | |
| 2364 | + if (e && e.is_sort_storage) { | |
| 2365 | + wx.getLocation({ | |
| 2366 | + type: 'gcj02', | |
| 2367 | + success: function (res) { | |
| 2368 | + th.data.lat = res.latitude; | |
| 2369 | + th.data.lon = res.longitude; | |
| 2370 | + th.data.is_get_local_ok = 1; | |
| 2371 | + }, | |
| 2372 | + fail: function (res) { | |
| 2373 | + if (res.errCode == 2) { | |
| 2374 | + th.setData({ | |
| 2375 | + is_gps: 0 | |
| 2376 | + }); | |
| 2377 | + if (th.data.is_gps == 0) { | |
| 2378 | + getApp().confirmBox("请开启GPS定位", null, 10000, !1); | |
| 2379 | + } | |
| 2380 | + | |
| 2381 | + } else { | |
| 2382 | + th.setData({ | |
| 2383 | + is_gps: "3" | |
| 2384 | + }); | |
| 2385 | + } | |
| 2386 | + | |
| 2387 | + th.data.is_get_local_ok = 1; | |
| 2388 | + } | |
| 2389 | + }) | |
| 2390 | + } else { | |
| 2391 | + th.data.is_get_local_ok = 1; | |
| 2392 | + } | |
| 2393 | + clearInterval(t_time); | |
| 2394 | + }, 500) | |
| 2395 | + }, | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + //-- 根据ID拿出门店 -- | |
| 2399 | + get_pick_from_list(pid) { | |
| 2400 | + var all_pick_list = this.data.all_pick_list; | |
| 2401 | + for (var i in all_pick_list) { | |
| 2402 | + var item = all_pick_list[i]; | |
| 2403 | + if (item.pickup_id == pid) { | |
| 2404 | + return item; | |
| 2405 | + } | |
| 2406 | + } | |
| 2407 | + }, | |
| 2408 | + | |
| 2409 | + closePoster() { | |
| 2410 | + this.setData({ | |
| 2411 | + showPoster: false, | |
| 2412 | + }); | |
| 2413 | + }, | |
| 2414 | + | |
| 2415 | + // 保存图片到手机 | |
| 2416 | + savePic() { | |
| 2417 | + console.log('保存图片'); | |
| 2418 | + var self = this; | |
| 2419 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
| 2420 | + this.getSetting().then((res) => { | |
| 2421 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
| 2422 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
| 2423 | + this.authorize().then(() => { | |
| 2424 | + // 同意授权后保存下载文件 | |
| 2425 | + this.saveImage(self.data.shareImgPath) | |
| 2426 | + .then(() => { | |
| 2427 | + self.setData({ | |
| 2428 | + showPoster: false | |
| 2429 | + }); | |
| 2430 | + }); | |
| 2431 | + }) | |
| 2432 | + } else { | |
| 2433 | + // 如果已经授权,保存下载文件 | |
| 2434 | + this.saveImage(self.data.shareImgPath) | |
| 2435 | + .then(() => { | |
| 2436 | + self.setData({showPoster: false}); | |
| 2437 | + }); | |
| 2438 | + } | |
| 2439 | + | |
| 2440 | + }) | |
| 2441 | + }, | |
| 2442 | + | |
| 2443 | + // 获取用户已经授予了哪些权限 | |
| 2444 | + getSetting() { | |
| 2445 | + return new Promise((resolve, reject) => { | |
| 2446 | + wx.getSetting({ | |
| 2447 | + success: res => { | |
| 2448 | + resolve(res) | |
| 2449 | + } | |
| 2450 | + }) | |
| 2451 | + }) | |
| 2452 | + }, | |
| 2453 | + | |
| 2454 | + // 发起首次授权请求 | |
| 2455 | + authorize() { | |
| 2456 | + // isFirst 用来记录是否为首次发起授权, | |
| 2457 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
| 2458 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
| 2459 | + return new Promise((resolve, reject) => { | |
| 2460 | + wx.authorize({ | |
| 2461 | + scope: 'scope.writePhotosAlbum', | |
| 2462 | + // 同意授权 | |
| 2463 | + success: () => { | |
| 2464 | + resolve(); | |
| 2465 | + }, | |
| 2466 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
| 2467 | + fail: res => { | |
| 2468 | + if (isFirst === 0) { | |
| 2469 | + wx.setStorageSync('isFirst', 1); | |
| 2470 | + wx.showToast({ | |
| 2471 | + title: '保存失败', | |
| 2472 | + icon: 'none', | |
| 2473 | + duration: 1000 | |
| 2474 | + }) | |
| 2475 | + } else { | |
| 2476 | + this.showModal(); | |
| 2477 | + } | |
| 2478 | + console.log('拒绝授权'); | |
| 2479 | + reject(); | |
| 2480 | + } | |
| 2481 | + }) | |
| 2482 | + }) | |
| 2483 | + }, | |
| 2484 | + | |
| 2485 | + // 保存图片到系统相册 | |
| 2486 | + saveImage(saveUrl) { | |
| 2487 | + var self = this; | |
| 2488 | + return new Promise((resolve, reject) => { | |
| 2489 | + wx.saveImageToPhotosAlbum({ | |
| 2490 | + filePath: saveUrl, | |
| 2491 | + success: (res) => { | |
| 2492 | + wx.showToast({ | |
| 2493 | + title: '保存成功', | |
| 2494 | + duration: 1000, | |
| 2495 | + }); | |
| 2496 | + self.setData({ | |
| 2497 | + showPlaybill: 'true' | |
| 2498 | + }); | |
| 2499 | + resolve(); | |
| 2500 | + }, | |
| 2501 | + fail: () => { | |
| 2502 | + wx.showToast({ | |
| 2503 | + title: '保存失败', | |
| 2504 | + duration: 1000, | |
| 2505 | + }); | |
| 2506 | + } | |
| 2507 | + }) | |
| 2508 | + }) | |
| 2509 | + }, | |
| 2510 | + | |
| 2511 | + previewImage() { | |
| 2512 | + getApp().pre_img(this.data.shareImgPath); | |
| 2513 | + }, | |
| 2514 | + | |
| 2515 | + onShareTimeline() { | |
| 2516 | + getApp().globalData.no_clear = 1 | |
| 2517 | + | |
| 2518 | + var th = this; | |
| 2519 | + var price = th.data.data.shop_price; | |
| 2520 | + if (th.data.prom_act) { | |
| 2521 | + price = th.data.prom_act.price; | |
| 2522 | + | |
| 2523 | + } | |
| 2524 | + var title = th.data.data.goods_name; | |
| 2525 | + // var img=th.data.data.original_img; | |
| 2526 | + var img = th.data.iurl + th.data.data.image_url; | |
| 2527 | + if (th.data.prom_type == 6) { | |
| 2528 | + title = th.data.prom_act.share_title; | |
| 2529 | + img = th.data.iurl + th.data.prom_act.share_imgurl; | |
| 2530 | + } | |
| 2531 | + | |
| 2532 | + var url = "goods_id=" + th.data.gid; | |
| 2533 | + if (getApp().globalData.user_id) { | |
| 2534 | + url += "&first_leader=" + getApp().globalData.user_id; | |
| 2535 | + } | |
| 2536 | + | |
| 2537 | + //-- 如果房间分享,且不是会员分享的 -- | |
| 2538 | + if (getApp().globalData.room_id && | |
| 2539 | + th.data.data.goods_id == getApp().globalData.room_goods_id && | |
| 2540 | + !getApp().globalData.room_user_share | |
| 2541 | + ) { | |
| 2542 | + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1"; | |
| 2543 | + } | |
| 2544 | + | |
| 2545 | + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片 | |
| 2546 | + if (th.data.prom_type == 1) { | |
| 2547 | + if (th.data.sele_g && th.data.sele_g.share_imgurl) { | |
| 2548 | + img = th.data.iurl + th.data.sele_g.share_imgurl; | |
| 2549 | + } | |
| 2550 | + ; | |
| 2551 | + } | |
| 2552 | + ; | |
| 2553 | + | |
| 2554 | + return { | |
| 2555 | + title: price + "元 " + title, | |
| 2556 | + imageUrl: img, | |
| 2557 | + query: url | |
| 2558 | + } | |
| 2559 | + }, | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + clickCollapse() { | |
| 2563 | + this.setData({ | |
| 2564 | + flag: !this.data.flag, | |
| 2565 | + }) | |
| 2566 | + }, | |
| 2567 | + | |
| 2568 | + //---------联系微信客服------------ | |
| 2569 | + con_weixin: function () { | |
| 2570 | + var url = this.data.sys_switch.weapp_customertype_url; | |
| 2571 | + var id = this.data.sys_switch.weapp_customertype_appid; | |
| 2572 | + wx.openCustomerServiceChat({ | |
| 2573 | + extInfo: {url: url}, | |
| 2574 | + corpId: id, | |
| 2575 | + success(res) { | |
| 2576 | + } | |
| 2577 | + }) | |
| 2578 | + }, | |
| 2579 | + | |
| 2580 | + //评论的调用 | |
| 2581 | + requestComments_new: async function () { | |
| 2582 | + var e = this, th = e, ee = e; | |
| 2583 | + var tp = e.data.activeCategoryId3; | |
| 2584 | + var t = '/api/weshop/serviceComment/pageComment?page=' + e.data.c_curr_p; | |
| 2585 | + | |
| 2586 | + wx.showLoading(); | |
| 2587 | + var req_where = { | |
| 2588 | + store_id: o.stoid, pageSize: 5, is_show: 1, | |
| 2589 | + parent_id: 0, goods_id: th.data.gid, commenttype: tp, | |
| 2590 | + service_id: this.data.gid, | |
| 2591 | + } | |
| 2592 | + if (getApp().globalData.userInfo) { | |
| 2593 | + req_where.userId = getApp().globalData.user_id; | |
| 2594 | + } | |
| 2595 | + | |
| 2596 | + var rs_data = null; | |
| 2597 | + await getApp().request.promiseGet(t, {data: req_where}).then(res => { | |
| 2598 | + var tot = res.data.data.total; | |
| 2599 | + e.data.c_curr_p++; | |
| 2600 | + e.setData({ | |
| 2601 | + com_num: tot, //已经有加载 | |
| 2602 | + }); | |
| 2603 | + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 2604 | + rs_data = res.data.data.pageData; | |
| 2605 | + } else { | |
| 2606 | + th.setData({comments_no_more: 1, auto: 1}); | |
| 2607 | + } | |
| 2608 | + }) | |
| 2609 | + | |
| 2610 | + if (rs_data) { | |
| 2611 | + //var cda = th.data.comments; | |
| 2612 | + var cda = rs_data, com_data = th.data.comments; | |
| 2613 | + for (var ind in cda) { | |
| 2614 | + var ep = cda[ind]; | |
| 2615 | + if (cda[ind].head_pic == '') { | |
| 2616 | + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png"; | |
| 2617 | + } | |
| 2618 | + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) { | |
| 2619 | + cda[ind].weapp_img = JSON.parse(ep.weapp_img); | |
| 2620 | + } | |
| 2621 | + if (ep.img != "" && ut.isString(ep.img)) { | |
| 2622 | + cda[ind].img = ut.unserialize(ep.img); | |
| 2623 | + } | |
| 2624 | + | |
| 2625 | + //--测量多有字的宽带,计算有多少行-- | |
| 2626 | + var widh = ut.measureText(ep.content, 30); | |
| 2627 | + var lines = widh / 712; | |
| 2628 | + cda[ind].seeMore = false; | |
| 2629 | + if (lines > 3) cda[ind].seeMore = true; | |
| 2630 | + | |
| 2631 | + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", { | |
| 2632 | + data: { | |
| 2633 | + store_id: o.stoid, | |
| 2634 | + parent_id: ep.comment_id, | |
| 2635 | + service_id: this.data.gid, | |
| 2636 | + } | |
| 2637 | + }).then(res => { | |
| 2638 | + if (res.data.data.pageData && res.data.data.pageData.length > 0) { | |
| 2639 | + cda[ind].replay_list = res.data.data.pageData; | |
| 2640 | + } | |
| 2641 | + }) | |
| 2642 | + } | |
| 2643 | + | |
| 2644 | + if (!com_data) com_data = cda; | |
| 2645 | + else com_data = com_data.concat(cda); | |
| 2646 | + | |
| 2647 | + th.setData({comments: com_data}); | |
| 2648 | + } | |
| 2649 | + th.setData({get_c: 1}); | |
| 2650 | + wx.hideLoading(); | |
| 2651 | + }, | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + //--点赞功能-- | |
| 2655 | + click_zan: function (e) { | |
| 2656 | + var com_id = e.currentTarget.dataset.com_id; | |
| 2657 | + var item_id = e.currentTarget.dataset.item_id; | |
| 2658 | + var app = getApp(), | |
| 2659 | + th = this; | |
| 2660 | + | |
| 2661 | + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) { | |
| 2662 | + app.confirmBox("您还未登录"); | |
| 2663 | + return false; | |
| 2664 | + } | |
| 2665 | + | |
| 2666 | + var iszan = th.data.comments[item_id].userZanNum; | |
| 2667 | + if (this.data.iszaning) return false; | |
| 2668 | + this.data.iszaning = 1; | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + app.request.post("/api/weshop/serviceCommentZan/save", { | |
| 2672 | + data: { | |
| 2673 | + store_id: o.stoid, | |
| 2674 | + user_id: app.globalData.user_id, | |
| 2675 | + goods_id: th.data.gid, | |
| 2676 | + service_id: th.data.gid, | |
| 2677 | + comment_id: com_id | |
| 2678 | + }, | |
| 2679 | + success: function (ee) { | |
| 2680 | + | |
| 2681 | + if (ee.data.code == "-1") { | |
| 2682 | + app.my_warnning("不能给自己点赞", 0, th); | |
| 2683 | + th.data.iszaning = 0; | |
| 2684 | + return; | |
| 2685 | + } | |
| 2686 | + | |
| 2687 | + if (ee.data.code == 0 && iszan != 1) { | |
| 2688 | + var num = th.data.comments[item_id].zan_num; | |
| 2689 | + num++; | |
| 2690 | + var text = "comments[" + item_id + "].zan_num"; | |
| 2691 | + var text1 = "comments[" + item_id + "].userZanNum"; | |
| 2692 | + var _errObj = {}; | |
| 2693 | + _errObj[text] = num; | |
| 2694 | + _errObj[text1] = 1; | |
| 2695 | + th.setData(_errObj); | |
| 2696 | + | |
| 2697 | + } else { | |
| 2698 | + var num = th.data.comments[item_id].zan_num; | |
| 2699 | + num--; | |
| 2700 | + var text = "comments[" + item_id + "].zan_num"; | |
| 2701 | + var text1 = "comments[" + item_id + "].userZanNum"; | |
| 2702 | + var _errObj = {}; | |
| 2703 | + _errObj[text] = num; | |
| 2704 | + _errObj[text1] = 0; | |
| 2705 | + th.setData(_errObj); | |
| 2706 | + } | |
| 2707 | + | |
| 2708 | + setTimeout(function () { | |
| 2709 | + th.data.iszaning = 0; | |
| 2710 | + }, 500) | |
| 2711 | + | |
| 2712 | + } | |
| 2713 | + }) | |
| 2714 | + }, | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + //--外侧评价的点击效果--- | |
| 2718 | + clik_evaluate: function (e) { | |
| 2719 | + var val = e.currentTarget.dataset.val; | |
| 2720 | + this.setData({ | |
| 2721 | + activeCategoryId: 2, | |
| 2722 | + activeCategoryId3: val, | |
| 2723 | + comments: null | |
| 2724 | + }); | |
| 2725 | + this.requestComments_new(); | |
| 2726 | + }, | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + //显示全部 | |
| 2730 | + toggleHandler: function (e) { | |
| 2731 | + var that = this, | |
| 2732 | + index = e.currentTarget.dataset.index; | |
| 2733 | + for (var i = 0; i < that.data.comments.length; i++) { | |
| 2734 | + if (index == i) { | |
| 2735 | + for (var i = 0; i < that.data.comments.length; i++) { | |
| 2736 | + that.data.comments[index].auto = true; | |
| 2737 | + that.data.comments[index].seeMore = false; | |
| 2738 | + } | |
| 2739 | + } | |
| 2740 | + } | |
| 2741 | + that.setData({ | |
| 2742 | + comments: that.data.comments | |
| 2743 | + }) | |
| 2744 | + }, | |
| 2745 | + | |
| 2746 | + //收起更多 | |
| 2747 | + toggleContent: function (e) { | |
| 2748 | + var that = this, | |
| 2749 | + index = e.currentTarget.dataset.index; | |
| 2750 | + for (var i = 0; i < that.data.comments.length; i++) { | |
| 2751 | + if (index == i) { | |
| 2752 | + that.data.comments[index].auto = true; | |
| 2753 | + that.data.comments[index].seeMore = true; | |
| 2754 | + } | |
| 2755 | + } | |
| 2756 | + that.setData({ | |
| 2757 | + comments: that.data.comments | |
| 2758 | + }) | |
| 2759 | + }, | |
| 2760 | + | |
| 2761 | + //--查看评价-- | |
| 2762 | + look_pj: function () { | |
| 2763 | + this.tabComment(); | |
| 2764 | + this.doScrollTop(); | |
| 2765 | + }, | |
| 2766 | + | |
| 2767 | + previewCommentImgs_w: function (t) { | |
| 2768 | + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img; | |
| 2769 | + var b = e.slice() | |
| 2770 | + // for (var i in b) { | |
| 2771 | + // b[i] = this.data.iurl + e[i]; | |
| 2772 | + // } | |
| 2773 | + this.data.show_prew_img = 1; | |
| 2774 | + wx.previewImage({ | |
| 2775 | + current: b[t.currentTarget.dataset.id], | |
| 2776 | + urls: b | |
| 2777 | + }); | |
| 2778 | + }, | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + // 判断是否开启美业,获取套盒列表 | |
| 2782 | + getTaohe() { | |
| 2783 | + // 判断是否开启美业 | |
| 2784 | + getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => { | |
| 2785 | + if (res.data.code == 0) { | |
| 2786 | + let enableMeiye = res.data.data.EnableMeiye; | |
| 2787 | + self.setData({ | |
| 2788 | + enableMeiye, | |
| 2789 | + }); | |
| 2790 | + | |
| 2791 | + if (enableMeiye) { // 开启美业 | |
| 2792 | + // 获取套盒列表 | |
| 2793 | + let url = '/api/weshop/serviceGoods/list' | |
| 2794 | + let data = { | |
| 2795 | + store_id: getApp().globalData.setting.stoid, | |
| 2796 | + service_id: this.data.data.id, | |
| 2797 | + }; | |
| 2798 | + // 请求数据 | |
| 2799 | + getApp().promiseGet(url, { | |
| 2800 | + data: data, | |
| 2801 | + }).then(res => { | |
| 2802 | + if (res.data.code == 0) { | |
| 2803 | + console.log('请求成功套盒列表', res); | |
| 2804 | + self.setData({ | |
| 2805 | + taoheList: res.data.data, | |
| 2806 | + }); | |
| 2807 | + } else { | |
| 2808 | + throw (res); | |
| 2809 | + } | |
| 2810 | + ; | |
| 2811 | + }).catch(err => { | |
| 2812 | + }); | |
| 2813 | + | |
| 2814 | + } | |
| 2815 | + ; | |
| 2816 | + } | |
| 2817 | + ; | |
| 2818 | + }); | |
| 2819 | + }, | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + //---小于10的格式化函数---- | |
| 2823 | + // timeFormat(param) { | |
| 2824 | + // return param < 10 ? '0' + param : param; | |
| 2825 | + // }, | |
| 2826 | + | |
| 2827 | + //----倒计时函数----- | |
| 2828 | + countDown(time, prom_st) { | |
| 2829 | + if (!this.data.is_timer) return false; | |
| 2830 | + var th = this; | |
| 2831 | + // 获取当前时间,同时得到活动结束时间数组 | |
| 2832 | + var endTime = time; | |
| 2833 | + var newTime = ut.gettimestamp(); | |
| 2834 | + // 对结束时间进行处理渲染到页面 | |
| 2835 | + var obj = null; | |
| 2836 | + // 如果活动未结束,对时间进行处理 | |
| 2837 | + if (endTime - newTime > 0) { | |
| 2838 | + var time = (endTime - newTime); | |
| 2839 | + // 获取天、时、分、秒 | |
| 2840 | + var day = parseInt(time / (60 * 60 * 24)); | |
| 2841 | + var hou = parseInt(time % (60 * 60 * 24) / 3600); | |
| 2842 | + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60); | |
| 2843 | + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60); | |
| 2844 | + obj = { | |
| 2845 | + day: this.timeFormat(day), | |
| 2846 | + hou: this.timeFormat(hou), | |
| 2847 | + min: this.timeFormat(min), | |
| 2848 | + sec: this.timeFormat(sec) | |
| 2849 | + } | |
| 2850 | + } else { | |
| 2851 | + if (th.data.prom_st == 0) { | |
| 2852 | + //var endTime2 = new Date(th.data.prom_end_time).getTime(); | |
| 2853 | + var endTime2 = th.data.prom_act.end_time; | |
| 2854 | + th.setData({ | |
| 2855 | + prom_time_text: '距结束还剩:', | |
| 2856 | + prom_st: 1 | |
| 2857 | + }) | |
| 2858 | + setTimeout(function () { | |
| 2859 | + th.countDown(endTime2) | |
| 2860 | + }, 1000); | |
| 2861 | + return false; | |
| 2862 | + | |
| 2863 | + } else { | |
| 2864 | + //活动已结束,全部设置为'00' | |
| 2865 | + obj = { | |
| 2866 | + day: '00', | |
| 2867 | + hou: '00', | |
| 2868 | + min: '00', | |
| 2869 | + sec: '00' | |
| 2870 | + } | |
| 2871 | + th.setData({ | |
| 2872 | + prom_time_text: '活动已经结束:', | |
| 2873 | + prom_st: 3 | |
| 2874 | + }) | |
| 2875 | + th.setData({ | |
| 2876 | + djs: obj | |
| 2877 | + }); | |
| 2878 | + return false; | |
| 2879 | + } | |
| 2880 | + } | |
| 2881 | + | |
| 2882 | + th.setData({ | |
| 2883 | + djs: obj | |
| 2884 | + }); | |
| 2885 | + setTimeout(function () { | |
| 2886 | + th.countDown(endTime) | |
| 2887 | + }, 1000); | |
| 2888 | + }, | |
| 2889 | + | |
| 2890 | + get_normal(gid) { | |
| 2891 | + this.setData({ | |
| 2892 | + prom_type: 0, | |
| 2893 | + prom_id:0 | |
| 2894 | + }); | |
| 2895 | + this.get_sto(); | |
| 2896 | + this.data.is_normal = 1; | |
| 2897 | + }, | |
| 2898 | + | |
| 2899 | + //获取redis中的数量 | |
| 2900 | + async getactLen() { | |
| 2901 | + let prom_type = this.data.options.prom_type; | |
| 2902 | + let prom_id = this.data.options.prom_id; | |
| 2903 | + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 2904 | + 1: 1 | |
| 2905 | + }).then(res => { | |
| 2906 | + if (res.data.code == 0) { | |
| 2907 | + // 当前可以购买的数量 | |
| 2908 | + let r_num = res.data.data; | |
| 2909 | + return r_num; | |
| 2910 | + } | |
| 2911 | + ; | |
| 2912 | + }) | |
| 2913 | + }, | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + //--------检查是否活动,活动是否开始,或者是否结束------- | |
| 2917 | + async check_prom(gid, prom_type, prom_id) { | |
| 2918 | + var ee = this, th = ee; | |
| 2919 | + var user_id = getApp().globalData.user_id; | |
| 2920 | + if (!user_id) user_id = 0; | |
| 2921 | + | |
| 2922 | + //-------判断团购活动是否抢光--------- | |
| 2923 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | |
| 2924 | + 1: 1 | |
| 2925 | + }).then(res => { | |
| 2926 | + var em = res; | |
| 2927 | + if (em.data.code == 0) { | |
| 2928 | + if (em.data.data <= 0) ee.setData({ | |
| 2929 | + prom_r_null: 1 | |
| 2930 | + }); | |
| 2931 | + //拿取价格并且判断时间-- | |
| 2932 | + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, { | |
| 2933 | + success: function (t) { | |
| 2934 | + if (t.data.code != 0) { | |
| 2935 | + ee.get_normal(gid); | |
| 2936 | + return false; | |
| 2937 | + } | |
| 2938 | + //----已经结束----- | |
| 2939 | + if (t.data.data.is_end == 1) { | |
| 2940 | + ee.get_normal(gid); | |
| 2941 | + return false; | |
| 2942 | + } | |
| 2943 | + //----已经过期----- | |
| 2944 | + var now = ut.gettimestamp(); | |
| 2945 | + if (t.data.data.end_time < now || t.data.data.start_time > now) { | |
| 2946 | + ee.get_normal(gid); | |
| 2947 | + return false; | |
| 2948 | + } | |
| 2949 | + | |
| 2950 | + /*-- 还没有开始预热的也不显示 --*/ | |
| 2951 | + if (t.data.data.show_time > now) { | |
| 2952 | + ee.get_normal(gid); | |
| 2953 | + return false; | |
| 2954 | + } | |
| 2955 | + | |
| 2956 | + th.setData({ | |
| 2957 | + sele_g: t.data.data, | |
| 2958 | + }); | |
| 2959 | + | |
| 2960 | + var t_gd = ee.data.data; | |
| 2961 | + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss"); | |
| 2962 | + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss"); | |
| 2963 | + | |
| 2964 | + ee.setData({ | |
| 2965 | + prom_price: t.data.data.price, | |
| 2966 | + prom_type: 2, | |
| 2967 | + f_prom_type: 2, | |
| 2968 | + prom_id: prom_id, | |
| 2969 | + prom_buy_limit: t.data.data.buy_limit, | |
| 2970 | + prom_act: t.data.data, | |
| 2971 | + prom_end_time: prom_end_time, | |
| 2972 | + prom_start_time: prom_start_time, | |
| 2973 | + isshow: 1, | |
| 2974 | + }); | |
| 2975 | + | |
| 2976 | + ee.get_sto(); | |
| 2977 | + var newTime = ut.gettimestamp(); | |
| 2978 | + var endTime2 = t.data.data.end_time; | |
| 2979 | + var endTime1 = t.data.data.start_time; | |
| 2980 | + if (endTime1 > newTime) { | |
| 2981 | + ee.setData({ | |
| 2982 | + prom_time_text: '距团购开始还有' | |
| 2983 | + }) | |
| 2984 | + ee.countDown(endTime1, 0); | |
| 2985 | + } else { | |
| 2986 | + if (endTime2 > newTime) { | |
| 2987 | + ee.setData({ | |
| 2988 | + prom_time_text: '距团购结束还有', | |
| 2989 | + prom_st: 1 | |
| 2990 | + }) | |
| 2991 | + ee.countDown(endTime2); | |
| 2992 | + } | |
| 2993 | + } | |
| 2994 | + | |
| 2995 | + } | |
| 2996 | + }); | |
| 2997 | + } | |
| 2998 | + }) | |
| 2999 | + }, | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + viewFlash(e) { | |
| 3003 | + let prom_type = e.currentTarget.dataset.promtype; | |
| 3004 | + let prom_id = e.currentTarget.dataset.promid; | |
| 3005 | + let goods_id = this.data.data.goods_id; | |
| 3006 | + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | |
| 3007 | + if (prom_type == 6) { | |
| 3008 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`; | |
| 3009 | + } | |
| 3010 | + getApp().goto(url); | |
| 3011 | + }, | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + //-------------获取购买数量的总函数---------------- | |
| 3016 | + get_buy_num: function (gd, func) { | |
| 3017 | + // var map = this.data.g_buy_num, | |
| 3018 | + var th = this, | |
| 3019 | + user_id = getApp().globalData.user_id; | |
| 3020 | + if (user_id == null) { | |
| 3021 | + // map.set(gd.goods_id, 0); | |
| 3022 | + th.setData({ | |
| 3023 | + // g_buy_num: map, | |
| 3024 | + prom_buy_num: 0, | |
| 3025 | + }); | |
| 3026 | + "function" == typeof func && func(); | |
| 3027 | + return false; | |
| 3028 | + } | |
| 3029 | + | |
| 3030 | + // if (map.has(gd.goods_id)) { | |
| 3031 | + // "function" == typeof func && func(); | |
| 3032 | + // } else { | |
| 3033 | + //----获取商品购买数---- | |
| 3034 | + if (th.data.prom_type == 1) { | |
| 3035 | + //----获取活动购买数---- | |
| 3036 | + getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
| 3037 | + data: { | |
| 3038 | + store_id: os.stoid, | |
| 3039 | + user_id: user_id, | |
| 3040 | + card_id: th.data.options.goods_id, | |
| 3041 | + prom_type: th.data.options.prom_type, | |
| 3042 | + prom_id: th.data.options.prom_id | |
| 3043 | + }, | |
| 3044 | + //-----获取----- | |
| 3045 | + success: function (tt) { | |
| 3046 | + if (tt.data.code == 0) { | |
| 3047 | + // map.set(gd.goods_id, g_buy_num); | |
| 3048 | + th.setData({ | |
| 3049 | + // g_buy_num: map, | |
| 3050 | + promcardbuynum: tt.data.data.promcardbuynum, | |
| 3051 | + cardbuynum: tt.data.data.cardbuynum, | |
| 3052 | + }); | |
| 3053 | + "function" == typeof func && func(); | |
| 3054 | + } | |
| 3055 | + } | |
| 3056 | + }); | |
| 3057 | + } else { | |
| 3058 | + "function" == typeof func && func(); | |
| 3059 | + } | |
| 3060 | + }, | |
| 3061 | + | |
| 3062 | + get_buy_num2: async function () { | |
| 3063 | + var th = this, user_id = getApp().globalData.user_id; | |
| 3064 | + //----获取活动购买数---- | |
| 3065 | + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
| 3066 | + data: { | |
| 3067 | + store_id: os.stoid, | |
| 3068 | + user_id: user_id, | |
| 3069 | + card_id: th.data.options.goods_id, | |
| 3070 | + prom_type: th.data.options.prom_type, | |
| 3071 | + prom_id: th.data.options.prom_id, | |
| 3072 | + isnew:1 | |
| 3073 | + }, | |
| 3074 | + //-----获取----- | |
| 3075 | + success: function (tt) { | |
| 3076 | + if (tt.data.code == 0) { | |
| 3077 | + // map.set(gd.goods_id, g_buy_num); | |
| 3078 | + th.setData({ | |
| 3079 | + // g_buy_num: map, | |
| 3080 | + promcardbuynum: tt.data.data.promcardbuynum, | |
| 3081 | + cardbuynum: tt.data.data.cardbuynum, | |
| 3082 | + }); | |
| 3083 | + } | |
| 3084 | + } | |
| 3085 | + }); | |
| 3086 | + }, | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + // 促销 -> 送礼包 -> 查看详情 | |
| 3090 | + viewLbDetails(e) { | |
| 3091 | + let id = e.currentTarget.dataset.id; // 获取礼包id | |
| 3092 | + let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮 | |
| 3093 | + // console.log('myurl', url); | |
| 3094 | + getApp().goto(url); | |
| 3095 | + }, | |
| 3096 | + | |
| 3097 | + go_more_ladder: function (e) { | |
| 3098 | + var prom_id = e.currentTarget.dataset.id; | |
| 3099 | + getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id); | |
| 3100 | + }, | |
| 3101 | + | |
| 3102 | + getHistoryBuy() { | |
| 3103 | + let _this = this; | |
| 3104 | + let req_data = { | |
| 3105 | + store_id: os.stoid, | |
| 3106 | + goods_id: this.data.gid, | |
| 3107 | + pay_status: 1, | |
| 3108 | + rndid: 1 | |
| 3109 | + }; | |
| 3110 | + getApp().request.promiseGet('/api/weshop/ordergoods/list', { | |
| 3111 | + data: req_data, | |
| 3112 | + }) | |
| 3113 | + .then(res => { | |
| 3114 | + if (t.ajax_ok(res)) { | |
| 3115 | + _this.setData({ | |
| 3116 | + historyBuyInfo: res.data.data.pageData, | |
| 3117 | + }) | |
| 3118 | + } | |
| 3119 | + }) | |
| 3120 | + }, | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + //-- 秒杀的普通购买 -- | |
| 3124 | + openSpecModel_Nor: function () { | |
| 3125 | + var th = this; | |
| 3126 | + | |
| 3127 | + if (th.data.get_sto_ing) return false; | |
| 3128 | + | |
| 3129 | + // 是否授权登陆 | |
| 3130 | + var user_info = getApp().globalData.userInfo; | |
| 3131 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 3132 | + wx.navigateTo({ | |
| 3133 | + url: '/packageE/pages/togoin/togoin', | |
| 3134 | + }) | |
| 3135 | + return false; | |
| 3136 | + } | |
| 3137 | + this.data.g_buy_num = new Map(); | |
| 3138 | + var th = this; | |
| 3139 | + this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4 | |
| 3140 | + | |
| 3141 | + this.setData({openSpecModal_flash_normal: 1}); | |
| 3142 | + this.get_sto(1) | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + // if (th.data.sku_g_pt) { | |
| 3146 | + // // this.get_sto(1) | |
| 3147 | + // this.setData({openSpecModal_flash_normal: 1}); | |
| 3148 | + // } else { | |
| 3149 | + // th.get_sto(1); | |
| 3150 | + // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () { | |
| 3151 | + // th.setData({ | |
| 3152 | + // openSpecModal_flash_normal: 1 | |
| 3153 | + // }); | |
| 3154 | + // }); | |
| 3155 | + // } | |
| 3156 | + // this.check_is_youhui(th.data.gid, 1); | |
| 3157 | + }, | |
| 3158 | + | |
| 3159 | + closeSpecModal_flash_normal: function () { | |
| 3160 | + this.setData({openSpecModal_flash_normal: 0, is_normal: 0}); | |
| 3161 | + }, | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + //打开客服操作菜单 | |
| 3165 | + openCS() { | |
| 3166 | + // 判断会员状态 | |
| 3167 | + let user_info = getApp().globalData.userInfo; | |
| 3168 | + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) { | |
| 3169 | + wx.navigateTo({ | |
| 3170 | + url: '/packageE/pages/togoin/togoin', | |
| 3171 | + }) | |
| 3172 | + return false; | |
| 3173 | + } | |
| 3174 | + ; | |
| 3175 | + // csType/在线客服设置: | |
| 3176 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | |
| 3177 | + // 1小程序客服、 | |
| 3178 | + // 2企业微信客服 | |
| 3179 | + if (this.data.sys_switch) { | |
| 3180 | + let csType = this.data.sys_switch.weapp_customertype; | |
| 3181 | + if (csType == 0) { | |
| 3182 | + // 拨打电话号码 | |
| 3183 | + this.contactService(); | |
| 3184 | + } else { | |
| 3185 | + this.getTel() | |
| 3186 | + .then(() => { | |
| 3187 | + self.setData({ | |
| 3188 | + hiddenCS: false, | |
| 3189 | + }); | |
| 3190 | + }); | |
| 3191 | + } | |
| 3192 | + ; | |
| 3193 | + } | |
| 3194 | + ; | |
| 3195 | + | |
| 3196 | + }, | |
| 3197 | + | |
| 3198 | + //关闭客服操作菜单 | |
| 3199 | + closeCS() { | |
| 3200 | + this.setData({ | |
| 3201 | + hiddenCS: true, | |
| 3202 | + }); | |
| 3203 | + }, | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + click_contact: function () { | |
| 3207 | + getApp().globalData.no_clear = 1; | |
| 3208 | + }, | |
| 3209 | + | |
| 3210 | + //打开客服操作菜单 | |
| 3211 | + openCS() { | |
| 3212 | + // csType/在线客服设置: | |
| 3213 | + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、 | |
| 3214 | + // 1小程序客服、 | |
| 3215 | + // 2企业微信客服 | |
| 3216 | + let csType = this.data.sys_switch.weapp_customertype; | |
| 3217 | + if (csType == 0) { | |
| 3218 | + // 获取电话号码 | |
| 3219 | + this.contactService(); | |
| 3220 | + } else { | |
| 3221 | + this.getTel() | |
| 3222 | + .then(() => { | |
| 3223 | + self.setData({ | |
| 3224 | + hiddenCS: false, | |
| 3225 | + }); | |
| 3226 | + }); | |
| 3227 | + | |
| 3228 | + } | |
| 3229 | + ; | |
| 3230 | + }, | |
| 3231 | + | |
| 3232 | + //关闭客服操作菜单 | |
| 3233 | + closeCS() { | |
| 3234 | + this.setData({ | |
| 3235 | + hiddenCS: true, | |
| 3236 | + }); | |
| 3237 | + }, | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + //-- 弹出框的同意的优化,重新获取定位 --- | |
| 3241 | + agree_pri: function () { | |
| 3242 | + var th = this; | |
| 3243 | + var bconfig = th.data.bconfig; | |
| 3244 | + if (bconfig && bconfig.is_sort_storage) { | |
| 3245 | + wx.getLocation({ | |
| 3246 | + type: 'gcj02', | |
| 3247 | + success: function (res) { | |
| 3248 | + | |
| 3249 | + th.data.lat = res.latitude; | |
| 3250 | + th.data.lon = res.longitude; | |
| 3251 | + th.data.is_get_local_ok = 1; | |
| 3252 | + th.setData({is_gps: 1}); | |
| 3253 | + th.get_sto(); | |
| 3254 | + }, | |
| 3255 | + fail: function (res) { | |
| 3256 | + th.data.is_get_local_ok = 1; | |
| 3257 | + th.get_sto(); | |
| 3258 | + if (res.errCode == 2) { | |
| 3259 | + th.setData({is_gps: 0}); | |
| 3260 | + if (th.data.is_gps == 0) { | |
| 3261 | + getApp().confirmBox("请开启GPS定位", null, 25000, !1); | |
| 3262 | + } | |
| 3263 | + } else { | |
| 3264 | + th.setData({is_gps: "3"}); | |
| 3265 | + } | |
| 3266 | + | |
| 3267 | + } | |
| 3268 | + }) | |
| 3269 | + } | |
| 3270 | + }, | |
| 3271 | + | |
| 3272 | + clickShare() { | |
| 3273 | + this.setData({ | |
| 3274 | + share_hidden: true, | |
| 3275 | + }); | |
| 3276 | + }, | |
| 3277 | + send() { | |
| 3278 | + this.setData({ | |
| 3279 | + share_hidden: false, | |
| 3280 | + }); | |
| 3281 | + }, | |
| 3282 | + cancel() { | |
| 3283 | + this.setData({ | |
| 3284 | + share_hidden: false, | |
| 3285 | + }); | |
| 3286 | + }, | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + saveImageFn() { | |
| 3290 | + if (this.data.share_b_img) { | |
| 3291 | + this.saveImageToPhotosAlbum() | |
| 3292 | + } else { | |
| 3293 | + this.saveImageToPhotosAlbumDef() | |
| 3294 | + } | |
| 3295 | + }, | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + //--定义的保存图片方法,分享团--- | |
| 3299 | + saveImageToPhotosAlbum: function () { | |
| 3300 | + //--先判断会员状态-- | |
| 3301 | + // var user_info = getApp().globalData.userInfo; | |
| 3302 | + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 3303 | + // //getApp().my_warnning("请先登录",0,this); | |
| 3304 | + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', }) | |
| 3305 | + // return false; | |
| 3306 | + // } | |
| 3307 | + | |
| 3308 | + if (this.data.share_hidden) { | |
| 3309 | + this.setData({ | |
| 3310 | + share_hidden: false, | |
| 3311 | + }); | |
| 3312 | + } | |
| 3313 | + ; | |
| 3314 | + | |
| 3315 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | |
| 3316 | + var type = this.data.prom_type || 0; | |
| 3317 | + console.log('商品类型-----'); | |
| 3318 | + console.log(type); | |
| 3319 | + // if (type == 2) type = -1; | |
| 3320 | + if (type == 4) type = 0; | |
| 3321 | + if (type == 8) type = 0; | |
| 3322 | + if (type == 2) type = 0; | |
| 3323 | + if (type == 6) type = 2; // 6拼团 2团购 | |
| 3324 | + if (type == 10) type = -1; | |
| 3325 | + | |
| 3326 | + wx.showLoading({ | |
| 3327 | + title: '生成中...', | |
| 3328 | + }) | |
| 3329 | + var that = this, | |
| 3330 | + th = that; | |
| 3331 | + //设置画板显示,才能开始绘图 | |
| 3332 | + that.setData({ | |
| 3333 | + canvasHidden: false | |
| 3334 | + }) | |
| 3335 | + | |
| 3336 | + var app = getApp(); | |
| 3337 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
| 3338 | + var path2 = that.data.data.original_img; | |
| 3339 | + | |
| 3340 | + var scene = th.data.gid; | |
| 3341 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
| 3342 | + if (user_id > 0) { | |
| 3343 | + scene += "_" + user_id; | |
| 3344 | + } | |
| 3345 | + //-- 如果不是会员分享过来的要分享给别人 -- | |
| 3346 | + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 3347 | + //固定房间是第3个字符 | |
| 3348 | + if (!user_id) scene += "_0"; | |
| 3349 | + scene += "_" + getApp().globalData.room_id; | |
| 3350 | + } else { | |
| 3351 | + if (!user_id) scene += "_0"; | |
| 3352 | + scene += "_0"; | |
| 3353 | + } | |
| 3354 | + if (this.data.prom_id) { | |
| 3355 | + scene += "_" + th.data.prom_id; | |
| 3356 | + } | |
| 3357 | + | |
| 3358 | + ///二微码 | |
| 3359 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 3360 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageG/pages/group_buy/goodsInfo/goodsInfo"; | |
| 3361 | + | |
| 3362 | + | |
| 3363 | + console.log(path3); | |
| 3364 | + | |
| 3365 | + //读取文件成功则OK-- | |
| 3366 | + wx.getImageInfo({ | |
| 3367 | + src: path3, | |
| 3368 | + success: function (res) { | |
| 3369 | + //回调写法 | |
| 3370 | + th.get_head_temp(th.get_goods_temp, function () { | |
| 3371 | + var vpath = res.path; | |
| 3372 | + var context = wx.createCanvasContext('share'); | |
| 3373 | + //先画背景 | |
| 3374 | + var pg_path = "../../../../images/share/share_bg.png"; | |
| 3375 | + | |
| 3376 | + //-- 如果有自定义海报的时候,判断背景的图片 -- | |
| 3377 | + if (th.data.share_b_img) { | |
| 3378 | + pg_path = th.data.share_b_img; | |
| 3379 | + } | |
| 3380 | + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); | |
| 3381 | + | |
| 3382 | + let nick = app.globalData.userInfo ? app.globalData.userInfo.nickname : ''; | |
| 3383 | + | |
| 3384 | + //-- 是自定义海报的情况下 -- | |
| 3385 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 3386 | + //在线上分享人的情况下 | |
| 3387 | + if (parseInt(th.data.poster.show_headpic)) { | |
| 3388 | + //获取坐标 | |
| 3389 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
| 3390 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
| 3391 | + var x1 = (x + 90) * unit; | |
| 3392 | + var y1 = (y + 50) * unit; | |
| 3393 | + //--昵称--- | |
| 3394 | + context.setFontSize(24 * unit) | |
| 3395 | + context.setFillStyle("black") | |
| 3396 | + context.fillText(nick, x1, y1); | |
| 3397 | + var width = 24 * nick.length * unit + 4 * unit; | |
| 3398 | + //强烈推荐 改许程 | |
| 3399 | + var tj_path = "../../../../images/share/q_tj.png"; | |
| 3400 | + context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); | |
| 3401 | + context.setFontSize(16 * unit) | |
| 3402 | + context.setLineJoin('round'); //交点设置成圆角 | |
| 3403 | + context.setFillStyle("white") | |
| 3404 | + context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit); | |
| 3405 | + | |
| 3406 | + //context.setFillStyle("black") | |
| 3407 | + //context.setFontSize(24 * unit) | |
| 3408 | + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit); | |
| 3409 | + } | |
| 3410 | + } else { | |
| 3411 | + //--昵称--- | |
| 3412 | + context.setFontSize(24 * unit) | |
| 3413 | + context.setFillStyle("black") | |
| 3414 | + context.fillText(nick, 152 * unit, 76 * unit); | |
| 3415 | + var width = 24 * nick.length * unit + 2 * unit; | |
| 3416 | + //强烈推荐 改许程 | |
| 3417 | + var tj_path = "../../../../images/share/q_tj.png"; | |
| 3418 | + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); | |
| 3419 | + context.setFontSize(16 * unit); | |
| 3420 | + context.setLineJoin('round'); //交点设置成圆角 | |
| 3421 | + context.setFillStyle("white"); | |
| 3422 | + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit); | |
| 3423 | + } | |
| 3424 | + | |
| 3425 | + var share_title = th.data.data.goods_name; | |
| 3426 | + | |
| 3427 | + if (th.data.prom_type == 1 || th.data.prom_type == 2 || th.data.prom_type == 6 || th.data.prom_type == 4) { | |
| 3428 | + share_title = th.data.prom_act.share_title; | |
| 3429 | + if (!share_title) share_title = th.data.prom_act.title; | |
| 3430 | + if (th.data.prom_type == 4) share_title = th.data.prom_act.name; | |
| 3431 | + | |
| 3432 | + //-- 显示活动时间 -- | |
| 3433 | + if (th.data.share_b_img) { | |
| 3434 | + act_time = "截止时间:" + ut.formatTime(th.data.prom_act.end_time); | |
| 3435 | + } | |
| 3436 | + } | |
| 3437 | + | |
| 3438 | + //---产品名称--- | |
| 3439 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
| 3440 | + | |
| 3441 | + context.setFillStyle("black"); | |
| 3442 | + context.setFontSize(21.3 * unit) | |
| 3443 | + th.draw_Text(context, share_title, | |
| 3444 | + 80 * unit, 160 * unit, 200 * unit, 279 * unit, unit); | |
| 3445 | + | |
| 3446 | + //------产品的价格------- | |
| 3447 | + context.setFontSize(23 * unit) | |
| 3448 | + context.setFillStyle("red") | |
| 3449 | + | |
| 3450 | + // 7.商品价格 | |
| 3451 | + let price = th.data.data.shop_price; | |
| 3452 | + if (th.data.card_field && th.data.data[th.data.card_field]) { | |
| 3453 | + price = th.data.data[th.data.card_field]; | |
| 3454 | + } | |
| 3455 | + if (th.data.prom_act) price = th.data.prom_price; | |
| 3456 | + price = parseFloat(price).toFixed(2); | |
| 3457 | + | |
| 3458 | + var wd1 = th.data.screenWidth - ut.measureText(price, 31 * unit) - 25; | |
| 3459 | + context.fillText("¥", wd1 - 15, 160 * unit); | |
| 3460 | + context.setFontSize(31 * unit) | |
| 3461 | + context.fillText(price, wd1, 165 * unit); | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + //-- 零售价的优化 -- | |
| 3465 | + var wp = wd1; | |
| 3466 | + var hp = 203 * unit; | |
| 3467 | + if (th.data.prom_type != 4) wp -= 12; | |
| 3468 | + th.draw_pos_price(context, wp, hp, th.data.data.show_price, unit); | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + //console.log(th.data.share_goods_img); | |
| 3472 | + //let share_goods_img=th.data.presellForm.share_img; | |
| 3473 | + //share_goods_img?share_goods_img:th.data.data.share_goods_img; | |
| 3474 | + //---中间大图--- | |
| 3475 | + context.drawImage(th.data.share_goods_img, 70 * unit, 220 * unit, 408 * unit, 408 * unit); | |
| 3476 | + //---自定义海报 产品质量保证 | |
| 3477 | + if (th.data.poster.show_quality == 1) { | |
| 3478 | + var g_path = "../../../../images/share/s_gou.png"; | |
| 3479 | + context.drawImage(g_path, 56 * unit, 644 * unit, 22 * unit, 22 * unit); | |
| 3480 | + context.setFillStyle("red") | |
| 3481 | + context.setFontSize(18 * unit) | |
| 3482 | + context.fillText("正品保证", 84 * unit, 664 * unit); | |
| 3483 | + | |
| 3484 | + context.drawImage(g_path, 218 * unit, 644 * unit, 22 * unit, 22 * unit); | |
| 3485 | + context.setFillStyle("red") | |
| 3486 | + context.setFontSize(18 * unit) | |
| 3487 | + context.fillText("纯实体店", 246 * unit, 664 * unit); | |
| 3488 | + | |
| 3489 | + context.drawImage(g_path, 388 * unit, 644 * unit, 22 * unit, 22 * unit); | |
| 3490 | + context.setFillStyle("red") | |
| 3491 | + context.setFontSize(18 * unit) | |
| 3492 | + context.fillText("官方验证", 420 * unit, 664 * unit); | |
| 3493 | + | |
| 3494 | + } | |
| 3495 | + | |
| 3496 | + //---画线--- | |
| 3497 | + // context.setLineWidth(1 * unit) | |
| 3498 | + // context.moveTo(32 * unit, 662 * unit) | |
| 3499 | + // context.lineTo(520 * unit, 662 * unit) | |
| 3500 | + // context.stroke(); | |
| 3501 | + | |
| 3502 | + //-- 图片底部文字 -- | |
| 3503 | + switch (type) { | |
| 3504 | + case 0: | |
| 3505 | + //---文字--- | |
| 3506 | + //---文字--- | |
| 3507 | + context.setFillStyle("black"); | |
| 3508 | + context.setFontSize(22 * unit); | |
| 3509 | + | |
| 3510 | + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit); | |
| 3511 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit); | |
| 3512 | + | |
| 3513 | + break; | |
| 3514 | + | |
| 3515 | + case 1: | |
| 3516 | + | |
| 3517 | + //画秒杀的图片 | |
| 3518 | + if (th.data.is_share_text) { | |
| 3519 | + var miaos_path = '../../../../images/share/miao_share.png'; | |
| 3520 | + context.drawImage(miaos_path, 43 * unit, 690 * unit, 222 * unit, 40 * unit); | |
| 3521 | + } | |
| 3522 | + | |
| 3523 | + context.setFillStyle("black") | |
| 3524 | + context.setFontSize(24 * unit) | |
| 3525 | + context.fillText(th.data.sto_sele_name_1, 40 * unit, 770 * unit); | |
| 3526 | + //---文字--- | |
| 3527 | + context.setFontSize(22 * unit) | |
| 3528 | + context.setFillStyle("black") | |
| 3529 | + if (th.data.is_share_text) { | |
| 3530 | + context.fillText("特惠好物,限时秒杀", 40 * unit, 807 * unit); | |
| 3531 | + } | |
| 3532 | + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 844 * unit); | |
| 3533 | + | |
| 3534 | + break; | |
| 3535 | + | |
| 3536 | + } | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + //---二维吗图--- | |
| 3540 | + //-- 自定义海报 -- | |
| 3541 | + if (th.data.poster) { | |
| 3542 | + var erm_x = parseFloat(th.data.poster.ewm_x) * 2; | |
| 3543 | + var erm_y = parseFloat(th.data.poster.ewm_y) * 2; | |
| 3544 | + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit); | |
| 3545 | + } else { | |
| 3546 | + //---二维吗图--- | |
| 3547 | + context.drawImage(vpath, 390 * unit, 746 * unit, 130 * unit, 116 * unit); | |
| 3548 | + } | |
| 3549 | + | |
| 3550 | + //--- 如果是自定义海报的时候 --- | |
| 3551 | + if (th.data.poster && parseInt(th.data.poster.style) == 2) { | |
| 3552 | + | |
| 3553 | + //如果显示会员信息的话 | |
| 3554 | + if (parseInt(th.data.poster.show_headpic)) { | |
| 3555 | + //获取坐标 | |
| 3556 | + var x = parseFloat(th.data.poster.head_x) * 2; | |
| 3557 | + var y = parseFloat(th.data.poster.head_y) * 2; | |
| 3558 | + //---绘制圆形要放在最后---- | |
| 3559 | + context.save(); | |
| 3560 | + context.beginPath(); | |
| 3561 | + var h_x = x * unit; | |
| 3562 | + var h_y = y * unit; | |
| 3563 | + var h_r = 40 * unit; | |
| 3564 | + var cx = h_x + h_r; | |
| 3565 | + var cy = h_y + h_r; | |
| 3566 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 3567 | + context.closePath(); | |
| 3568 | + context.fill(); | |
| 3569 | + context.clip(); | |
| 3570 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 3571 | + context.restore(); | |
| 3572 | + } | |
| 3573 | + | |
| 3574 | + } else { | |
| 3575 | + //---绘制圆形要放在最后---- | |
| 3576 | + context.save(); | |
| 3577 | + context.beginPath(); | |
| 3578 | + var h_x = 60 * unit; | |
| 3579 | + var h_y = 24 * unit; | |
| 3580 | + var h_r = 40 * unit; | |
| 3581 | + var cx = h_x + h_r; | |
| 3582 | + var cy = h_y + h_r; | |
| 3583 | + context.arc(cx, cy, h_r, 0, Math.PI * 2, false); | |
| 3584 | + context.closePath(); | |
| 3585 | + context.fill(); | |
| 3586 | + context.clip(); | |
| 3587 | + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2); | |
| 3588 | + context.restore(); | |
| 3589 | + } | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + if (th.data.poster.show_time == 1 && th.data.prom_act) { | |
| 3593 | + var act_time = ''; | |
| 3594 | + act_time = "截止时间:" + ut.formatTime(th.data.prom_act.end_time); | |
| 3595 | + context.setFillStyle("red") | |
| 3596 | + getApp().draw_Text(context, act_time, 38 * unit, 880 * unit, 200 * unit, 340 * unit, unit); | |
| 3597 | + } | |
| 3598 | + | |
| 3599 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
| 3600 | + context.draw(false, function () { | |
| 3601 | + setTimeout(function () { | |
| 3602 | + wx.canvasToTempFilePath({ | |
| 3603 | + x: 0, | |
| 3604 | + y: 0, | |
| 3605 | + width: 750, | |
| 3606 | + height: 1217, | |
| 3607 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
| 3608 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
| 3609 | + canvasId: 'share', | |
| 3610 | + success: function (res) { | |
| 3611 | + | |
| 3612 | + that.setData({ | |
| 3613 | + shareImgPath: res.tempFilePath, | |
| 3614 | + canvasHidden: true | |
| 3615 | + }) | |
| 3616 | + | |
| 3617 | + if (!res.tempFilePath) { | |
| 3618 | + wx.showModal({ | |
| 3619 | + title: '提示', | |
| 3620 | + content: '图片绘制中,请稍后重试', | |
| 3621 | + showCancel: false | |
| 3622 | + }) | |
| 3623 | + return false; | |
| 3624 | + } | |
| 3625 | + | |
| 3626 | + // wx.previewImage({ | |
| 3627 | + // //将图片预览出来 | |
| 3628 | + // urls: [that.data.shareImgPath] | |
| 3629 | + // }); | |
| 3630 | + that.setData({ | |
| 3631 | + showPoster: true, | |
| 3632 | + }); | |
| 3633 | + wx.hideLoading(); | |
| 3634 | + } | |
| 3635 | + }) | |
| 3636 | + }, 500) | |
| 3637 | + | |
| 3638 | + }); | |
| 3639 | + }); | |
| 3640 | + }, | |
| 3641 | + fail: function (res) { | |
| 3642 | + console.log(res); | |
| 3643 | + wx.hideLoading(); | |
| 3644 | + | |
| 3645 | + } | |
| 3646 | + }); | |
| 3647 | + }, | |
| 3648 | + //--定义的保存图片方法,分享团--- | |
| 3649 | + saveImageToPhotosAlbumDef: function () { | |
| 3650 | + //--先判断会员状态-- | |
| 3651 | + // var user_info = getApp().globalData.userInfo; | |
| 3652 | + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | |
| 3653 | + // //getApp().my_warnning("请先登录",0,this); | |
| 3654 | + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',}) | |
| 3655 | + // return false; | |
| 3656 | + // } | |
| 3657 | + | |
| 3658 | + if (this.data.share_hidden) { | |
| 3659 | + this.setData({share_hidden: false,}); | |
| 3660 | + } | |
| 3661 | + ; | |
| 3662 | + | |
| 3663 | + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 | |
| 3664 | + var type = this.data.prom_type || 0; | |
| 3665 | + console.log('商品类型-----'); | |
| 3666 | + console.log(type); | |
| 3667 | + // if (type == 2) type = -1; | |
| 3668 | + if (type == 4) type = 0; | |
| 3669 | + if (type == 8) type = 0; | |
| 3670 | + if (type == 2) type = 0; | |
| 3671 | + if (type == 6) type = 2; // 6拼团 2团购 | |
| 3672 | + if (type == 10) type = -1; | |
| 3673 | + | |
| 3674 | + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3; | |
| 3675 | + console.log('商品类型。。。。。'); | |
| 3676 | + console.log(type); | |
| 3677 | + wx.showLoading({title: '生成中...',}) | |
| 3678 | + var that = this, th = that; | |
| 3679 | + //设置画板显示,才能开始绘图 | |
| 3680 | + that.setData({ | |
| 3681 | + canvasHidden: false | |
| 3682 | + }) | |
| 3683 | + | |
| 3684 | + var app = getApp(); | |
| 3685 | + var unit = that.data.screenWidth / 750 * 1.35; //基础单位, | |
| 3686 | + var path2 = that.data.data.original_img; | |
| 3687 | + | |
| 3688 | + var scene = th.data.gid; | |
| 3689 | + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0; | |
| 3690 | + if (user_id > 0) { | |
| 3691 | + scene += "_" + user_id; | |
| 3692 | + } | |
| 3693 | + //-- 如果不是会员分享过来的要分享给别人 -- | |
| 3694 | + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) { | |
| 3695 | + //固定房间是第3个字符 | |
| 3696 | + if (!user_id) scene += "_0"; | |
| 3697 | + scene += "_" + getApp().globalData.room_id; | |
| 3698 | + } else { | |
| 3699 | + if (!user_id) scene += "_0"; | |
| 3700 | + scene += "_0"; | |
| 3701 | + } | |
| 3702 | + if (this.data.prom_type) { | |
| 3703 | + scene += "_" + th.data.prom_id; | |
| 3704 | + } | |
| 3705 | + | |
| 3706 | + ///二微码 | |
| 3707 | + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + | |
| 3708 | + os.stoid + "?sceneValue=" + scene + "&pageValue=packageG/pages/group_buy/goodsInfo/goodsInfo"; | |
| 3709 | + | |
| 3710 | + console.log(path3); | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + // 读取文件成功则OK-- | |
| 3714 | + wx.getImageInfo({ | |
| 3715 | + src: path3, | |
| 3716 | + success: function (res) { | |
| 3717 | + // 回调写法 | |
| 3718 | + th.get_head_temp(th.get_goods_temp, function () { | |
| 3719 | + var vpath = res.path; | |
| 3720 | + var context = wx.createCanvasContext('share'); | |
| 3721 | + // 先画背景 | |
| 3722 | + var pg_path = "../../../../../images/share/share_bg.png"; | |
| 3723 | + th.drawPoster(context, unit, th.data.share_goods_img, vpath, type); | |
| 3724 | + | |
| 3725 | + //把画板内容绘制成图片,并回调 画板图片路径 | |
| 3726 | + context.draw(false, function () { | |
| 3727 | + setTimeout(function () { | |
| 3728 | + wx.canvasToTempFilePath({ | |
| 3729 | + x: 0, | |
| 3730 | + y: 0, | |
| 3731 | + width: 750, | |
| 3732 | + height: 1217, | |
| 3733 | + destWidth: 1.2 * 750 * 750 / that.data.screenWidth, | |
| 3734 | + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth, | |
| 3735 | + canvasId: 'share', | |
| 3736 | + success: function (res) { | |
| 3737 | + | |
| 3738 | + that.setData({ | |
| 3739 | + shareImgPath: res.tempFilePath, | |
| 3740 | + canvasHidden: true | |
| 3741 | + }) | |
| 3742 | + | |
| 3743 | + if (!res.tempFilePath) { | |
| 3744 | + wx.showModal({ | |
| 3745 | + title: '提示', | |
| 3746 | + content: '图片绘制中,请稍后重试', | |
| 3747 | + showCancel: false | |
| 3748 | + }) | |
| 3749 | + return false; | |
| 3750 | + } | |
| 3751 | + | |
| 3752 | + that.setData({ | |
| 3753 | + showPoster: true, | |
| 3754 | + }); | |
| 3755 | + wx.hideLoading(); | |
| 3756 | + } | |
| 3757 | + }) | |
| 3758 | + }, 500) | |
| 3759 | + | |
| 3760 | + }); | |
| 3761 | + }); | |
| 3762 | + }, | |
| 3763 | + fail: function (res) { | |
| 3764 | + console.log(res); | |
| 3765 | + wx.hideLoading(); | |
| 3766 | + | |
| 3767 | + } | |
| 3768 | + }); | |
| 3769 | + }, | |
| 3770 | + | |
| 3771 | + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度 | |
| 3772 | + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) { | |
| 3773 | + var lineWidth = 0; | |
| 3774 | + var lastSubStrIndex = 0; //每次开始截取的字符串的索引 | |
| 3775 | + var han = 0; | |
| 3776 | + for (let i = 0; i < str.length; i++) { | |
| 3777 | + if (han == 2) return; | |
| 3778 | + //lineWidth += ctx.measureText(str[i]).width; | |
| 3779 | + lineWidth += ut.measureText(str[i], 21.3 * unit); | |
| 3780 | + if (lineWidth > canvasWidth) { | |
| 3781 | + han++; | |
| 3782 | + | |
| 3783 | + if (han == 2) | |
| 3784 | + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分 | |
| 3785 | + else | |
| 3786 | + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); | |
| 3787 | + | |
| 3788 | + initHeight += 22; //22为字体的高度 | |
| 3789 | + lineWidth = 0; | |
| 3790 | + lastSubStrIndex = i; | |
| 3791 | + titleHeight += 20; | |
| 3792 | + } | |
| 3793 | + if (i == str.length - 1) { //绘制剩余部分 | |
| 3794 | + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight); | |
| 3795 | + } | |
| 3796 | + } | |
| 3797 | + }, | |
| 3798 | + | |
| 3799 | + drawPoster(context, unit, img, vpath, type) { | |
| 3800 | + // 1.灰色背景 | |
| 3801 | + context.setFillStyle('#f2f1f6'); | |
| 3802 | + context.rect(0, 0, 554 * unit, 899 * unit); | |
| 3803 | + context.fill(); | |
| 3804 | + | |
| 3805 | + // 2.商城名称 | |
| 3806 | + let shopName = this.data.sto_sele_name_1; | |
| 3807 | + context.setTextAlign('center'); | |
| 3808 | + context.setFontSize(26 * unit); | |
| 3809 | + context.setFillStyle('black'); | |
| 3810 | + context.fillText(shopName, 277 * unit, 60 * unit); | |
| 3811 | + | |
| 3812 | + // 3.推荐来源 | |
| 3813 | + if (getApp().globalData.userInfo) { | |
| 3814 | + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`; | |
| 3815 | + context.setTextAlign('center'); | |
| 3816 | + context.setFontSize(22 * unit); | |
| 3817 | + context.setFillStyle('#96959a'); | |
| 3818 | + context.fillText(fromText, 277 * unit, 105 * unit); | |
| 3819 | + } | |
| 3820 | + // 4.海报背景 | |
| 3821 | + context.setFillStyle('white'); | |
| 3822 | + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); | |
| 3823 | + | |
| 3824 | + // 5.商品图片 | |
| 3825 | + // 图片的x坐标 | |
| 3826 | + let bg_x = 37 * unit | |
| 3827 | + // 图片的y坐标 | |
| 3828 | + let bg_y = 157 * unit | |
| 3829 | + // 图片宽度 | |
| 3830 | + let bg_w = 480 * unit | |
| 3831 | + // 图片高度 | |
| 3832 | + let bg_h = 474 * unit | |
| 3833 | + // 图片圆角 | |
| 3834 | + let bg_r = 4 | |
| 3835 | + // 绘制海报背景图片圆角 | |
| 3836 | + context.save() | |
| 3837 | + context.beginPath() | |
| 3838 | + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5) | |
| 3839 | + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2) | |
| 3840 | + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5) | |
| 3841 | + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI) | |
| 3842 | + context.clip() | |
| 3843 | + context.drawImage(img, bg_x, bg_y, bg_w, bg_h); | |
| 3844 | + context.restore(); | |
| 3845 | + | |
| 3846 | + // 6.强烈推荐 | |
| 3847 | + let src = ''; | |
| 3848 | + context.beginPath(); | |
| 3849 | + if (type == 0) { // 普通 | |
| 3850 | + src = '../../../../images/share/q_tj.png'; | |
| 3851 | + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit); | |
| 3852 | + context.setFontSize(16 * unit) | |
| 3853 | + context.setFillStyle("white") | |
| 3854 | + context.setTextAlign('left'); | |
| 3855 | + context.fillText('强烈推荐', 64 * unit, 668 * unit); | |
| 3856 | + } | |
| 3857 | + if (type == 1) { // 秒杀 | |
| 3858 | + | |
| 3859 | + if (this.data.is_share_text == 1) { | |
| 3860 | + src = '../../../../images/share/miao_share.png'; | |
| 3861 | + context.drawImage(src, 54 * unit, 648 * unit, 200 * unit, 36 * unit); | |
| 3862 | + } | |
| 3863 | + context.setTextAlign('left'); | |
| 3864 | + } | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + // 7.商品价格 | |
| 3868 | + let price = this.data.data.shop_price; | |
| 3869 | + if (this.data.card_field && this.data.data[this.data.card_field]) { | |
| 3870 | + price = this.data.data[this.data.card_field]; | |
| 3871 | + } | |
| 3872 | + if (this.data.prom_act) price = this.data.prom_price; | |
| 3873 | + price = parseFloat(price).toFixed(2); | |
| 3874 | + context.setFontSize(32 * unit); | |
| 3875 | + context.setFillStyle('#DE1117'); | |
| 3876 | + | |
| 3877 | + //price = this.data.presellList.presell_price | |
| 3878 | + context.fillText('¥' + price, 54 * unit, 735 * unit); | |
| 3879 | + //-- 零售价的优化 -- | |
| 3880 | + var wp = 62 * unit + ut.measureText('¥' + price, 32 * unit); | |
| 3881 | + var hp = 735 * unit | |
| 3882 | + this.draw_pos_price(context, wp, hp, this.data.data.show_price, unit); | |
| 3883 | + | |
| 3884 | + | |
| 3885 | + // 8.商品标题 | |
| 3886 | + context.setFontSize(20 * unit); | |
| 3887 | + context.setFillStyle('#898989'); | |
| 3888 | + getApp().draw_Text(context, this.data.data.goods_name, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1); | |
| 3889 | + | |
| 3890 | + // 9.小程序码 | |
| 3891 | + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit); | |
| 3892 | + context.setFontSize(16 * unit); | |
| 3893 | + context.setFillStyle('#777'); | |
| 3894 | + context.fillText('长按识别二维码', 378 * unit, 810 * unit); | |
| 3895 | + | |
| 3896 | + // 10.竖线 | |
| 3897 | + context.beginPath(); | |
| 3898 | + context.setFillStyle('#eee'); | |
| 3899 | + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit); | |
| 3900 | + context.fill(); | |
| 3901 | + }, | |
| 3902 | + | |
| 3903 | + //---市场价划掉--- | |
| 3904 | + draw_pos_price(context, w, h, market_price, unit) { | |
| 3905 | + | |
| 3906 | + if (!this.data.sys_switch) return false; | |
| 3907 | + if (!this.data.sys_switch.is_retail_price) return false; | |
| 3908 | + | |
| 3909 | + context.setFillStyle("gray") | |
| 3910 | + context.setFontSize(22 * unit) | |
| 3911 | + var pri0 = "¥" + market_price.toFixed(2); | |
| 3912 | + context.fillText(pri0, w, h); | |
| 3913 | + | |
| 3914 | + var c_h = h - 6; | |
| 3915 | + context.setStrokeStyle('gray'); | |
| 3916 | + context.setLineWidth(1 * unit); | |
| 3917 | + context.moveTo(w - 5, c_h); | |
| 3918 | + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h); | |
| 3919 | + context.stroke(); | |
| 3920 | + | |
| 3921 | + }, | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + closePoster() { | |
| 3925 | + this.setData({ | |
| 3926 | + showPoster: false, | |
| 3927 | + }); | |
| 3928 | + }, | |
| 3929 | + | |
| 3930 | + // 保存图片到手机 | |
| 3931 | + savePic() { | |
| 3932 | + console.log('保存图片'); | |
| 3933 | + var self = this; | |
| 3934 | + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限 | |
| 3935 | + this.getSetting().then((res) => { | |
| 3936 | + // 判断用户是否授权了保存到相册的权限,如果没有发起授权 | |
| 3937 | + if (!res.authSetting['scope.writePhotosAlbum']) { | |
| 3938 | + this.authorize().then(() => { | |
| 3939 | + // 同意授权后保存下载文件 | |
| 3940 | + this.saveImage(self.data.shareImgPath) | |
| 3941 | + .then(() => { | |
| 3942 | + self.setData({ | |
| 3943 | + showPoster: false | |
| 3944 | + }); | |
| 3945 | + }); | |
| 3946 | + }) | |
| 3947 | + } else { | |
| 3948 | + // 如果已经授权,保存下载文件 | |
| 3949 | + this.saveImage(self.data.shareImgPath) | |
| 3950 | + .then(() => { | |
| 3951 | + self.setData({ | |
| 3952 | + showPoster: false | |
| 3953 | + }); | |
| 3954 | + }); | |
| 3955 | + } | |
| 3956 | + | |
| 3957 | + }) | |
| 3958 | + }, | |
| 3959 | + | |
| 3960 | + // 发起首次授权请求 | |
| 3961 | + authorize() { | |
| 3962 | + // isFirst 用来记录是否为首次发起授权, | |
| 3963 | + // 如果首次授权拒绝后,isFirst赋值为1 | |
| 3964 | + let isFirst = wx.getStorageSync('isFirst') || 0; | |
| 3965 | + return new Promise((resolve, reject) => { | |
| 3966 | + wx.authorize({ | |
| 3967 | + scope: 'scope.writePhotosAlbum', | |
| 3968 | + // 同意授权 | |
| 3969 | + success: () => { | |
| 3970 | + resolve(); | |
| 3971 | + }, | |
| 3972 | + // 拒绝授权,这里是用户拒绝授权后的回调 | |
| 3973 | + fail: res => { | |
| 3974 | + if (isFirst === 0) { | |
| 3975 | + wx.setStorageSync('isFirst', 1); | |
| 3976 | + wx.showToast({ | |
| 3977 | + title: '保存失败', | |
| 3978 | + icon: 'none', | |
| 3979 | + duration: 1000 | |
| 3980 | + }) | |
| 3981 | + } else { | |
| 3982 | + this.showModal(); | |
| 3983 | + } | |
| 3984 | + console.log('拒绝授权'); | |
| 3985 | + reject(); | |
| 3986 | + } | |
| 3987 | + }) | |
| 3988 | + }) | |
| 3989 | + }, | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + // 保存图片到系统相册 | |
| 3993 | + saveImage(saveUrl) { | |
| 3994 | + var self = this; | |
| 3995 | + return new Promise((resolve, reject) => { | |
| 3996 | + wx.saveImageToPhotosAlbum({ | |
| 3997 | + filePath: saveUrl, | |
| 3998 | + success: (res) => { | |
| 3999 | + wx.showToast({ | |
| 4000 | + title: '保存成功', | |
| 4001 | + duration: 1000, | |
| 4002 | + }); | |
| 4003 | + self.setData({ | |
| 4004 | + showPlaybill: 'true' | |
| 4005 | + }); | |
| 4006 | + resolve(); | |
| 4007 | + }, | |
| 4008 | + fail: () => { | |
| 4009 | + wx.showToast({ | |
| 4010 | + title: '保存失败', | |
| 4011 | + duration: 1000, | |
| 4012 | + }); | |
| 4013 | + } | |
| 4014 | + }) | |
| 4015 | + }) | |
| 4016 | + }, | |
| 4017 | + | |
| 4018 | + // 预览海报 | |
| 4019 | + previewPoster() { | |
| 4020 | + getApp().globalData.no_clear = 1; | |
| 4021 | + wx.previewImage({ | |
| 4022 | + current: this.data.shareImgPath, // 当前显示图片的http链接 | |
| 4023 | + urls: [this.data.shareImgPath], // 需要预览的图片http链接列表 | |
| 4024 | + }); | |
| 4025 | + }, | |
| 4026 | + | |
| 4027 | + | |
| 4028 | +}); | |
| 4029 | + | |
| 4030 | + | ... | ... | 
packageG/pages/group_buy/goodsInfo/goodsInfo.json
0 → 100644
| 1 | +{ | |
| 2 | + "navigationBarTitleText": "卡项详情", | |
| 3 | + "enablePullDownRefresh": false, | |
| 4 | + "usingComponents": { | |
| 5 | + "nav_box": "/components/nav_box/nav_box", | |
| 6 | + "warn": "/components/long_warn/long_warn", | |
| 7 | + "serviceCard_recommend": "/components/serviceCard_list/serviceCard_list", | |
| 8 | + "privacy_pop": "/components/privacy_pop/privacy_pop", | |
| 9 | + "top_nav": "/components/diy_top_nav/diy_top_nav", | |
| 10 | + "share": "/components/share/share" | |
| 11 | + }, | |
| 12 | + "navigationStyle": "custom" | |
| 13 | +} | |
| 0 | 14 | \ No newline at end of file | ... | ... | 
packageG/pages/group_buy/goodsInfo/goodsInfo.wxml
0 → 100644
| 1 | +<import src="../../../../utils/wxParse/wxParse.wxml"></import> | |
| 2 | +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs> | |
| 3 | +<wxs module="g_filters" src="g_filter.wxs"></wxs> | |
| 4 | +<wxs module="tool" src="filter.wxs"></wxs> | |
| 5 | +<!-- 判断隐私是不是显示 --> | |
| 6 | +<privacy_pop id="privacy_pop" bind:agree_pri="agree_pri"></privacy_pop> | |
| 7 | +<!-- 顶开 --> | |
| 8 | +<top_nav wx:if="{{!istop || activeCategoryId>0}}" nav_type="{{-1}}" nav_frontColor="{{nav_frontColor}}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | |
| 9 | +<!-- 商品内容区域,普通商品,秒杀,拼团 --> | |
| 10 | +<block wx:if="{{isshow}}"> | |
| 11 | + <view class="container"> | |
| 12 | + | |
| 13 | + <view class="type-navbar_box"> | |
| 14 | + <top_nav id="my-nav" bindclickShare="clickShare" nav_type="{{nav_type}}" is_share="{{true}}" | |
| 15 | + nav_frontColor="{{nav_frontColor}}" istop="{{(istop && searchbox_transparent && activeCategoryId==0) ? 1 : 0 }}" nav_backgroundColor="{{nav_backgroundColor}}" nav_title="{{gtitle}}"></top_nav> | |
| 16 | + </view> | |
| 17 | + | |
| 18 | + <view class="type-navbar" style="top:{{top_nav?(top_nav-4):0}}px"> | |
| 19 | + <view class="type-box" wx:for="{{categories}}" wx:key="categories"> | |
| 20 | + <view bindtap="tabClick" class="type-navbar-item {{activeCategoryId==item.id?'type-item-on':''}}" id="{{item.id}}"> | |
| 21 | + {{item.name}} | |
| 22 | + </view> | |
| 23 | + </view> | |
| 24 | + </view> | |
| 25 | + <view class="goods-detail"> | |
| 26 | + <view class="goods-info" hidden="{{activeCategoryId==0?false:true}}"> | |
| 27 | + | |
| 28 | + <!-- 有视频和图片的情况 --> | |
| 29 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove" wx:if="{{mapurl}}"> | |
| 30 | + <view class="xc-videos-picture rel"> | |
| 31 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | |
| 32 | + <swiper-item wx:if="{{mapurl}}"> | |
| 33 | + <view wx:if="{{noon == 0}}"> | |
| 34 | + <image class="xc-picturess" src="{{iurl+mapurl_f_img}}" mode="aspectFit"> | |
| 35 | + <image id="{{index}}" class="xc-play" src="{{iurl}}/miniapp/images/pofang.png" bindtap="videoPlay"></image> | |
| 36 | + </image> | |
| 37 | + </view> | |
| 38 | + <view wx:else> | |
| 39 | + <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> | |
| 40 | + </view> | |
| 41 | + </swiper-item> | |
| 42 | + <swiper-item wx:for="{{gallery}}" wx:key="gallery" class="sty"> | |
| 43 | + <view class="wh100 g_img_box" style="background-image:url({{iurl +(data.image_url?data.image_url:'miniapp/images/default_g_img.gif')}});"></view> | |
| 44 | + </swiper-item> | |
| 45 | + </swiper> | |
| 46 | + | |
| 47 | + <block wx:if="{{mapurl}}"> | |
| 48 | + <view wx:if="{{hiddenn==1}}"> | |
| 49 | + <view class="xc-imageCount">{{current}}/{{gallery.length}}</view> | |
| 50 | + </view> | |
| 51 | + <view class="xc-video-picture abs"> | |
| 52 | + <view class="xc-video" data-vipi="0" bindtap="videopicture"> | |
| 53 | + <view class="{{videopicture==0 ? 'xc-video-button':'xc-video-buttons'}} {{videopicture==0 ? 'xc-sn':''}}"> | |
| 54 | + 视频 | |
| 55 | + </view> | |
| 56 | + </view> | |
| 57 | + <view class="xc-picture {{videopicture==1 ? 'xc-sn':''}}" data-vipi="1" bindtap="videopicture"> | |
| 58 | + <view>图片</view> | |
| 59 | + </view> | |
| 60 | + </view> | |
| 61 | + </block> | |
| 62 | + | |
| 63 | + </view> | |
| 64 | + </view> | |
| 65 | + | |
| 66 | + | |
| 67 | + <!-- 只有图片的情况 --> | |
| 68 | + <view id="id" bindtouchstart="handletouchtart" bindtouchmove="handletouchmove" wx:else> | |
| 69 | + <view class="xc-videos-picture rel"> | |
| 70 | + <swiper autoplay="{{false}}" current="{{swiperCurrent}}" class="swiper_box swiperContainer rel" duration="{{1000}}" | |
| 71 | + indicatorDots="{{mapurl?false:true}}" interval="{{3000}}" vertical="{{false}}" bindchange="swiperChange"> | |
| 72 | + <swiper-item class="sty1"> | |
| 73 | + <image class="wh100" src="{{iurl + (data.image_url?data.image_url:'miniapp/images/default_g_img.gif')}}" | |
| 74 | + binderror="bind_bnerr" mode="aspectFit" lazy-load="true" data-errorimg="gallery[{{index}}].image_url"></image> | |
| 75 | + </swiper-item> | |
| 76 | + </swiper> | |
| 77 | + </view> | |
| 78 | + </view> | |
| 79 | + | |
| 80 | + | |
| 81 | + <!-- --显示团购价和剩余时间 --> | |
| 82 | + <view class="prom_show rel" wx:if="{{prom_type==2}}"> | |
| 83 | + | |
| 84 | + <view class="abs flex fs36" style="align-items:flex-end;color: #fff; margin-top: 34rpx; margin-left: 10rpx; height: 60rpx">¥{{prom_price}} | |
| 85 | + | |
| 86 | + <view wx:if="{{sys_switch.is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(data.show_price,2)}}</view> | |
| 87 | + <view wx:else class="word-line no_line_x fs24" style="margin-left: 10rpx;position: relative;top: -6rpx;color:#fff !important">¥{{filters.toFix(data.shop_price,2)}}</view> | |
| 88 | + </view> | |
| 89 | + | |
| 90 | + <image class="abs" style="width: 120rpx;top: 32rpx; right: 220rpx;" mode="widthFix" src='{{iurl+"/miniapp/images/activity-time.png"}}'></image> | |
| 91 | + | |
| 92 | + <image class="secondkill-img" src='{{iurl+"/miniapp/images/group_img.png"}}'></image> | |
| 93 | + <view class="stop fs26 abs" style="color: #fff;top: 22rpx"> | |
| 94 | + | |
| 95 | + <block wx:if="{{prom_st==0 && !prom_r_null}}">开始时间</block> | |
| 96 | + <block wx:else>结束时间</block> | |
| 97 | + | |
| 98 | + </view> | |
| 99 | + <view class="secview flex abs fs24 xc-miaosha-time" style="color: #fff;top: 68rpx"> | |
| 100 | + <block wx:if="djs.day">{{djs.day}}天</block>{{djs.hou}}小时{{djs.min}}分{{djs.sec}}秒 | |
| 101 | + </view> | |
| 102 | + </view> | |
| 103 | + | |
| 104 | + | |
| 105 | + <block> | |
| 106 | + <view class="goods-price rel"> | |
| 107 | + <view class="co-red" style="overflow: hidden"> | |
| 108 | + <view class="market-price" style="overflow: hidden"></view> | |
| 109 | + </view> | |
| 110 | + | |
| 111 | + | |
| 112 | + <view class="flex jc_sb" style="padding-bottom: 20rpx;"> | |
| 113 | + <view> | |
| 114 | + <!-- 手店价 --> | |
| 115 | + <view class="co-red" wx:if="{{prom_type == 0}}"><text class="rel yuan fs28">¥</text>{{filters.toFix(data.shop_price,2)}}</view> | |
| 116 | + <view class="goods-title"> | |
| 117 | + <view class="goods-name elli">{{data.goods_name}}</view> | |
| 118 | + </view> | |
| 119 | + </view> | |
| 120 | + | |
| 121 | + <!-- 这个是分享按钮 --> | |
| 122 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 123 | + <view class="iconfont icon-share"></view> | |
| 124 | + <view class="fs22 c-7b">分享</view> | |
| 125 | + </view> | |
| 126 | + </view> | |
| 127 | + | |
| 128 | + | |
| 129 | + <block wx:if="{{prom_type==1}}"> | |
| 130 | + <view class="goods-num"> | |
| 131 | + <block> | |
| 132 | + <view class="stock">总数量:{{prom_act.is_virtual_count ? prom_act.goods_num : (prom_act.goods_num+prom_act.virtual)}}件</view> | |
| 133 | + | |
| 134 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
| 135 | + <view class="stock" wx:else>限购:不限</view> | |
| 136 | + <view wx:if="{{prom_st>0}}" class="sales">已售:{{prom_act.buy_num+prom_act.virtual}}件</view> | |
| 137 | + <view wx:else class="sales">已售:{{prom_act.buy_num}}件</view> | |
| 138 | + | |
| 139 | + </block> | |
| 140 | + </view> | |
| 141 | + </block> | |
| 142 | + | |
| 143 | + <block wx:if="{{prom_type==2}}"> | |
| 144 | + <view class="goods-num"> | |
| 145 | + <block> | |
| 146 | + <view class="stock">总数量:{{ prom_act.goods_num+prom_act.virtualNum}}件</view> | |
| 147 | + | |
| 148 | + <view class="stock" wx:if="{{prom_act.buy_limit>0}}">限购:{{prom_act.buy_limit}}件</view> | |
| 149 | + <view class="stock" wx:else>限购:不限</view> | |
| 150 | + <view wx:if="{{prom_st>0}}" class="sales">已售:{{prom_act.buy_num+prom_act.virtualNum}}件</view> | |
| 151 | + <view wx:else class="sales">已售:{{prom_act.buy_num}}件</view> | |
| 152 | + | |
| 153 | + </block> | |
| 154 | + </view> | |
| 155 | + </block> | |
| 156 | + | |
| 157 | + | |
| 158 | + <view class="goods-num" wx:else> | |
| 159 | + <view class="sales">销量:{{data.sales_sum}}</view> | |
| 160 | + <view class="sales">有效天数:{{data.validDays?data.validDays:'不限'}}</view> | |
| 161 | + </view> | |
| 162 | + | |
| 163 | + </view> | |
| 164 | + </block> | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + <!-- 门店收货地址 --> | |
| 169 | + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}"> | |
| 170 | + <view class="address_frame" bindtap="choice_store" data-ind="0"> | |
| 171 | + <view class="flex-vertical-between "> | |
| 172 | + <view class="flex-vertical select_store_height"> | |
| 173 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 174 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 175 | + </view> | |
| 176 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view> | |
| 177 | + </view> | |
| 178 | + | |
| 179 | + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 180 | + <view class="flex-space-between address ai_end "> | |
| 181 | + <view> | |
| 182 | + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text> | |
| 183 | + </view> | |
| 184 | + <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}"> | |
| 185 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}} | |
| 186 | + | |
| 187 | + </view> | |
| 188 | + </view> | |
| 189 | + | |
| 190 | + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(未找到门店)</view> | |
| 191 | + <block wx:else> | |
| 192 | + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(未找到门店)</view> | |
| 193 | + <text wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
| 194 | + <block wx:else> | |
| 195 | + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(该店不可售)</view> | |
| 196 | + </block> | |
| 197 | + </block> | |
| 198 | + | |
| 199 | + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view> | |
| 200 | + </view> | |
| 201 | + </view> | |
| 202 | + | |
| 203 | + </view> | |
| 204 | + | |
| 205 | + | |
| 206 | + <!-- 保障服务 --> | |
| 207 | + <view class="bz_view flex bdt16 ai_c" wx:if="{{store_config.service_bz}}"> | |
| 208 | + <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image> | |
| 209 | + <view class="flex f1 ai_c rel" style="position: relative;" bindtap="{{showFold ? 'clickCollapse':''}}"> | |
| 210 | + <view class="bz-content showArea {{flag ? '':'ellipsis-1x'}}">{{store_config.service_bz}}</view> | |
| 211 | + <view class="bz-content hideArea">{{store_config.service_bz}}</view> | |
| 212 | + <view class="cx-obtain-coupon wsize arrow" wx:if="{{showFold}}"> | |
| 213 | + <text class="bg_jj down {{flag ? 'up':''}}"></text> | |
| 214 | + </view> | |
| 215 | + </view> | |
| 216 | + </view> | |
| 217 | + | |
| 218 | + <!-- - 宝贝评价 -- --> | |
| 219 | + <view class="bdt16"> | |
| 220 | + <view class="bb_view"> | |
| 221 | + <view class="bold">宝贝评价({{categories3[0].num}})</view> | |
| 222 | + <view class="red_bb fs26" bindtap="look_pj"> | |
| 223 | + 查看全部 | |
| 224 | + <text class="bg_jj"></text> | |
| 225 | + </view> | |
| 226 | + </view> | |
| 227 | + <view class="xc_comment"> | |
| 228 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate"> | |
| 229 | + 有图({{categories3[1].num}}) | |
| 230 | + </view> | |
| 231 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate"> | |
| 232 | + 好评({{categories3[2].num}}) | |
| 233 | + </view> | |
| 234 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate"> | |
| 235 | + 中评({{categories3[3].num}}) | |
| 236 | + </view> | |
| 237 | + <view class="xc_comment-discuss" data-val="4" bindtap="clik_evaluate"> | |
| 238 | + 差评({{categories3[4].num}}) | |
| 239 | + </view> | |
| 240 | + </view> | |
| 241 | + <scroll-view scroll-x="true" class="pj_scroll"> | |
| 242 | + <view class="flex"> | |
| 243 | + <view class="xc_comment-detail" style="" wx:for="{{fir_comments}}" wx:key="{{item}}"> | |
| 244 | + <view class="xc_comment-left"> | |
| 245 | + <view class="xc_comment-user"> | |
| 246 | + <view class="xc_user-img"> | |
| 247 | + <image class="xc_imgs" src='{{item.is_anonymous!=1?item.head_pic:iurl+"/miniapp/images/hui_hear_pic.png"}}' binderror="bind_bnerr2" data-errorimg="fir_comments[{{index}}].head_pic"></image> | |
| 248 | + </view> | |
| 249 | + <view class="xc_user"> | |
| 250 | + <view class="xc_user-name five-level-word"> | |
| 251 | + {{item.is_anonymous!=1?item.username:'匿名'}} | |
| 252 | + </view> | |
| 253 | + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
| 254 | + </view> | |
| 255 | + </view> | |
| 256 | + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12"> | |
| 257 | + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}}</text> | |
| 258 | + </view> | |
| 259 | + <view class="xc_comment-val"> | |
| 260 | + <view class="xc_comment-time">{{item.add_time}}</view> | |
| 261 | + </view> | |
| 262 | + </view> | |
| 263 | + <view class="xc_goods-img-frame"> | |
| 264 | + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image> | |
| 265 | + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image> | |
| 266 | + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image> | |
| 267 | + </view> | |
| 268 | + </view> | |
| 269 | + </view> | |
| 270 | + </scroll-view> | |
| 271 | + </view> | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + <!-- 图文详情 --> | |
| 276 | + <view class="t_g_info bdt16"> | |
| 277 | + <view class="red_shu"></view> | |
| 278 | + <view class="fs30 bold">卡项详情</view> | |
| 279 | + </view> | |
| 280 | + <view class="pdh20"> | |
| 281 | + | |
| 282 | + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}"> | |
| 283 | + <view class="card fs28" wx:for="{{listServiceItem}}"> | |
| 284 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
| 285 | + <view class="ellipsis-2 f1" wx:if="{{item.displayqty==1}}" >{{item.projectName}}(无限次)</view> | |
| 286 | + <view class="ellipsis-2 f1" wx:else>{{item.projectName}}({{item.frequency}}次)</view> | |
| 287 | + <view class="pdl30 t-r"> | |
| 288 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
| 289 | + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view> | |
| 290 | + </view> | |
| 291 | + </view> | |
| 292 | + <view class="flex ai_c jc_sb fs24 c-6"> | |
| 293 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
| 294 | + <!-- 指定开始日期和结束日期 --> | |
| 295 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view> | |
| 296 | + </view> | |
| 297 | + </view> | |
| 298 | + </block> | |
| 299 | + | |
| 300 | + <block wx:if="{{enableMeiye}}"> | |
| 301 | + <block wx:if="{{taoheList && taoheList.length > 0}}"> | |
| 302 | + <view class="taohe fs28" wx:for="{{taoheList}}"> | |
| 303 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
| 304 | + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view> | |
| 305 | + <view class="pdl30 t-r"> | |
| 306 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
| 307 | + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view> | |
| 308 | + </view> | |
| 309 | + </view> | |
| 310 | + <view class="flex ai_c jc_sb fs24 c-6 pdt10"> | |
| 311 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
| 312 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view> | |
| 313 | + </view> | |
| 314 | + </view> | |
| 315 | + </block> | |
| 316 | + </block> | |
| 317 | + | |
| 318 | + <!-- <view class="table_s" wx:if="{{service_list}}"> | |
| 319 | + <view class="tb_item tb-l"> | |
| 320 | + <view class="item_left f1"> | |
| 321 | + <text>项目名称</text> | |
| 322 | + </view> | |
| 323 | + <view class="item_left f1"> | |
| 324 | + <text>耗时(分)</text> | |
| 325 | + </view> | |
| 326 | + <view class="item_left f1"> | |
| 327 | + <text>次数</text> | |
| 328 | + </view> | |
| 329 | + </view> | |
| 330 | + <view class="tb_item tb-l" wx:for="{{service_list}}"> | |
| 331 | + <view class="item_right f1"> | |
| 332 | + <text>{{item.projectName}}</text> | |
| 333 | + </view> | |
| 334 | + <view class="item_right f1"> | |
| 335 | + <text>{{item.timeConsuming}}</text> | |
| 336 | + </view> | |
| 337 | + <view class="item_right f1"> | |
| 338 | + <text>{{item.frequency}}</text> | |
| 339 | + </view> | |
| 340 | + </view> | |
| 341 | + </view> --> | |
| 342 | + | |
| 343 | + <view class="wxParse"> | |
| 344 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | |
| 345 | + </view> | |
| 346 | + | |
| 347 | + </view> | |
| 348 | + | |
| 349 | + <!-- 推荐商品 --> | |
| 350 | + <view class="flex-center rel xc-linellae-frame"> | |
| 351 | + <view class="xc-linellae"></view> | |
| 352 | + <view class="abs flex-center xc-recommend-frame "> | |
| 353 | + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image> | |
| 354 | + <view class="xc-recommend-word">推荐</view> | |
| 355 | + </view> | |
| 356 | + </view> | |
| 357 | + <serviceCard_recommend id="goods_list"></serviceCard_recommend> | |
| 358 | + | |
| 359 | + </view> | |
| 360 | + | |
| 361 | + | |
| 362 | + <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}"> | |
| 363 | + <view class="pd20"> | |
| 364 | + <!-- <view class="table_s" wx:if="{{service_list}}"> | |
| 365 | + <view class="tb_item tb-l"> | |
| 366 | + <view class="item_left f1"> | |
| 367 | + <text>项目名称</text> | |
| 368 | + </view> | |
| 369 | + <view class="item_left f1"> | |
| 370 | + <text>耗时(分)</text> | |
| 371 | + </view> | |
| 372 | + <view class="item_left f1"> | |
| 373 | + <text>次数</text> | |
| 374 | + </view> | |
| 375 | + </view> | |
| 376 | + <view class="tb_item tb-l" wx:for="{{service_list}}"> | |
| 377 | + <view class="item_right f1"> | |
| 378 | + <text>{{item.projectName}}</text> | |
| 379 | + </view> | |
| 380 | + <view class="item_right f1"> | |
| 381 | + <text>{{item.timeConsuming}}</text> | |
| 382 | + </view> | |
| 383 | + <view class="item_right f1"> | |
| 384 | + <text>{{item.frequency}}</text> | |
| 385 | + </view> | |
| 386 | + </view> | |
| 387 | + </view> --> | |
| 388 | + | |
| 389 | + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}"> | |
| 390 | + <view class="card fs28" wx:for="{{listServiceItem}}"> | |
| 391 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
| 392 | + <view class="ellipsis-2 f1">{{item.projectName}}({{item.frequency}}次)</view> | |
| 393 | + <view class="pdl30 t-r"> | |
| 394 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
| 395 | + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view> | |
| 396 | + </view> | |
| 397 | + </view> | |
| 398 | + <view class="flex ai_c jc_sb fs24 c-6"> | |
| 399 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
| 400 | + <!-- 指定开始日期和结束日期 --> | |
| 401 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view> | |
| 402 | + </view> | |
| 403 | + </view> | |
| 404 | + </block> | |
| 405 | + | |
| 406 | + <block wx:if="{{enableMeiye}}"> | |
| 407 | + <block wx:if="{{taoheList && taoheList.length > 0}}"> | |
| 408 | + <view class="taohe fs28" wx:for="{{taoheList}}"> | |
| 409 | + <view class="flex ai_c jc_sb" style="height: 88rpx;"> | |
| 410 | + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view> | |
| 411 | + <view class="pdl30 t-r"> | |
| 412 | + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view> | |
| 413 | + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view> | |
| 414 | + </view> | |
| 415 | + </view> | |
| 416 | + <view class="flex ai_c jc_sb fs24 c-6 pdt10"> | |
| 417 | + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view> | |
| 418 | + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view> | |
| 419 | + </view> | |
| 420 | + </view> | |
| 421 | + </block> | |
| 422 | + </block> | |
| 423 | + | |
| 424 | + <view class="wxParse"> | |
| 425 | + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template> | |
| 426 | + </view> | |
| 427 | + | |
| 428 | + </view> | |
| 429 | + </view> | |
| 430 | + | |
| 431 | + <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}"> | |
| 432 | + <view class="topframe"> | |
| 433 | + <view class="topframe-top"> | |
| 434 | + <view class="topframe-top-content"> | |
| 435 | + <view>宝贝评价</view> | |
| 436 | + <view class="topframe-top-val">({{categories3[0].num}})</view> | |
| 437 | + </view> | |
| 438 | + <view class="topframe-praise" wx:if="{{categories3[0].num}}"> | |
| 439 | + 好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}% | |
| 440 | + </view> | |
| 441 | + <view wx:else>好评 0%</view> | |
| 442 | + </view> | |
| 443 | + <view class="buttem-list"> | |
| 444 | + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}"> | |
| 445 | + {{item.name}}({{item.num}}) | |
| 446 | + </view> | |
| 447 | + </view> | |
| 448 | + </view> | |
| 449 | + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}"> | |
| 450 | + <view style='border-bottom:4rpx solid #eee;'> | |
| 451 | + <view class="middle"> | |
| 452 | + <view class="middle-img-frame"> | |
| 453 | + <image class="middle-img" src="{{item.is_anonymous!=1?item.head_pic:iurl+'/miniapp/images/hui_hear_pic.png'}}" binderror="bind_bnerr2" data-errorimg="comments[{{cIdx}}].head_pic"></image> | |
| 454 | + <view class="middle-user-frame"> | |
| 455 | + <view class="middle-user"> | |
| 456 | + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}} | |
| 457 | + </view> | |
| 458 | + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image> | |
| 459 | + </view> | |
| 460 | + </view> | |
| 461 | + <view class="xc-pirces"> | |
| 462 | + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" style="word-break: break-all;"> | |
| 463 | + {{item.content?item.content:'此用户没有填写评价。'}} | |
| 464 | + </view> | |
| 465 | + </view> | |
| 466 | + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'> | |
| 467 | + 全部显示 | |
| 468 | + </view> | |
| 469 | + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'> | |
| 470 | + 收起 | |
| 471 | + </view> | |
| 472 | + <view class="img-ul"> | |
| 473 | + <block wx:if="{{item.source_type==0}}"> | |
| 474 | + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}"> | |
| 475 | + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image> | |
| 476 | + </view> | |
| 477 | + </block> | |
| 478 | + <block wx:if="{{item.source_type==1}}"> | |
| 479 | + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem"> | |
| 480 | + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image> | |
| 481 | + </view> | |
| 482 | + </block> | |
| 483 | + </view> | |
| 484 | + <view class="z_parameter"> | |
| 485 | + <view class="parameter-font">{{item.add_time}}</view> | |
| 486 | + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}"> | |
| 487 | + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image> | |
| 488 | + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image> | |
| 489 | + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}'> | |
| 490 | + {{item.zan_num}} | |
| 491 | + </view> | |
| 492 | + </view> | |
| 493 | + </view> | |
| 494 | + </view> | |
| 495 | + <view class="reply rel" wx:if="{{item.replay_list}}"> | |
| 496 | + <view class="line_bulge"></view> | |
| 497 | + <view class="shop-reply">店家回复:</view> | |
| 498 | + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}"> | |
| 499 | + {{r_item.content}} | |
| 500 | + </view> | |
| 501 | + </view> | |
| 502 | + </view> | |
| 503 | + </block> | |
| 504 | + <block wx:if="{{(!comments || comments.length==0) && get_c }}"> | |
| 505 | + <text class="no_pj_list">暂无评价</text> | |
| 506 | + </block> | |
| 507 | + <block wx:if="{{comments.length>10 && comments_no_more}}"> | |
| 508 | + <text class="no_pj_list">已经加载到底部</text> | |
| 509 | + </block> | |
| 510 | + </view> | |
| 511 | + </view> | |
| 512 | + </view> | |
| 513 | + <!---滚动到顶部----> | |
| 514 | + <!-- <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}"> | |
| 515 | + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image> | |
| 516 | + </view> --> | |
| 517 | + | |
| 518 | + <!-- 底部按钮 --> | |
| 519 | + <view class="join-cart ai_c"> | |
| 520 | + | |
| 521 | + <view class="flex"> | |
| 522 | + <view class="custom-service cart-ico new_split pdh20" bindtap="openCS"> | |
| 523 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | |
| 524 | + <view>客服</view> | |
| 525 | + </view> | |
| 526 | + | |
| 527 | + <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20"> | |
| 528 | + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image> | |
| 529 | + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image> | |
| 530 | + <view>收藏</view> | |
| 531 | + </view> | |
| 532 | + | |
| 533 | + <view class="shopping-cart cart-ico new_split pdh20"> | |
| 534 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart" style="text-align: center"> | |
| 535 | + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image> | |
| 536 | +<!-- <view class="cart-num ellipsis-1"> {{cartGoodsNum}} </view>--> | |
| 537 | + <view>购物车</view> | |
| 538 | + </navigator> | |
| 539 | + </view> | |
| 540 | + </view> | |
| 541 | + | |
| 542 | + | |
| 543 | + <view class="flex f1 btn-group"> | |
| 544 | + <!-- -----团购------ --> | |
| 545 | + <block wx:if="{{prom_type==2}}"> | |
| 546 | + <block wx:if="{{prom_st==1 && !prom_r_null}}"> | |
| 547 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | |
| 548 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即抢购</view> | |
| 549 | + </block> | |
| 550 | + | |
| 551 | + <block wx:if="{{prom_st==0 && !prom_r_null}}"> | |
| 552 | + <view class="buy-btn cart-btn cart-btn-lg lanse f1">即将开始</view> | |
| 553 | + </block> | |
| 554 | + <block wx:if="{{prom_r_null}}"> | |
| 555 | + <view class="buy-btn cart-btn cart-btn-lg huise f1">已抢光</view> | |
| 556 | + </block> | |
| 557 | + <block wx:if="{{prom_st==3 && !prom_r_null}}"> | |
| 558 | + <view class="buy-btn cart-btn cart-btn-lg lanse f1">活动已经结束</view> | |
| 559 | + </block> | |
| 560 | + </block> | |
| 561 | + | |
| 562 | + <!-- 从“我的服务”入口进入购买商品 --> | |
| 563 | + <block wx:else> | |
| 564 | + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view> | |
| 565 | + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view> | |
| 566 | + </block> | |
| 567 | + | |
| 568 | + </view> | |
| 569 | + | |
| 570 | + </view> | |
| 571 | + | |
| 572 | + <!-- 制作一个圆球导航 --> | |
| 573 | + <nav_box></nav_box> | |
| 574 | +</block> | |
| 575 | + | |
| 576 | +<!-- 弹起来,选择规格数量,普通商品购买和秒杀 --> | |
| 577 | +<view hidden="{{!openSpecModal}}"> | |
| 578 | + | |
| 579 | + <view bindtap="closeSpecModal" class="cover-layer"></view> | |
| 580 | + <view class="spec-model"> | |
| 581 | + <view class="pding"> | |
| 582 | + | |
| 583 | + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon> | |
| 584 | + | |
| 585 | + | |
| 586 | + <view class="spec-goods"> | |
| 587 | + <image class="wh100 spec-img" src="{{iurl}}{{data.image_url?data.image_url:'miniapp/images/default_g_img.gif'}}" | |
| 588 | + binderror="pop_err_img" data-errorimg="data.image_url" /> | |
| 589 | + <view class="spec-goods-info"> | |
| 590 | + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view> | |
| 591 | + <view class="flex ai_end xc-val-money"> | |
| 592 | + <view class="spec-goods-price"> | |
| 593 | + <text class="fs20">¥</text> | |
| 594 | + <block wx:if="{{prom_type == 2}}">{{prom_price}}</block> | |
| 595 | + <block wx:else>{{data.shop_price}}</block> | |
| 596 | + </view> | |
| 597 | + </view> | |
| 598 | + </view> | |
| 599 | + </view> | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + <!-- 选择门店模块 --> | |
| 604 | + <view class="flex-space-between address ai_end xc-width" style="padding-top: 30rpx;"> | |
| 605 | + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}"> | |
| 606 | + <text class="fs30 xc-black3 shop_name" style="width:360rpx">{{def_pick_store.pickup_name}}</text> | |
| 607 | + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}"> | |
| 608 | + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}</view> | |
| 609 | + </view> | |
| 610 | + | |
| 611 | + <!-- 没有门店的时候 --> | |
| 612 | + <view class="flex" bindtap="choice_store" wx:else> | |
| 613 | + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image> | |
| 614 | + <view class="fs30" style="color:black;">选择门店</view> | |
| 615 | + </view> | |
| 616 | + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view> | |
| 617 | + </view> | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view> | |
| 622 | + <block wx:else> | |
| 623 | + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view> | |
| 624 | + <block wx:else> | |
| 625 | + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(该店不可售)</view> | |
| 626 | + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act}}">(该店不可售)</view> | |
| 627 | + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && !filters.is_virtual_gd(sele_g.is_virtual) && sales_rules==2 && prom_type==0}}">(库存不足)</view> | |
| 628 | + </block> | |
| 629 | + </block> | |
| 630 | + | |
| 631 | + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view> | |
| 632 | + </view> | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + <view class="b_num"> | |
| 637 | + <view>购买数量</view> | |
| 638 | + <view class="count"> | |
| 639 | + <view class="sub {{goodsInputNum <= 1 ? 'active':''}}" wx:if="{{goodsInputNum <= 1}}">-</view> | |
| 640 | + <view bindtap="subCartNum" class="sub" wx:else>-</view> | |
| 641 | + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input> | |
| 642 | + <view bindtap="addCartNum" class="add">+</view> | |
| 643 | + </view> | |
| 644 | + </view> | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + <view class="spec-cart-btns"> | |
| 649 | + <view wx:if="{{def_pick_store && def_pick_store.is_no_dis}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
| 650 | + <view wx:elif="{{def_pick_store && def_pick_store.is_no_dis_act}}" class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">该店不可售</view> | |
| 651 | + <block wx:else> | |
| 652 | + | |
| 653 | + <!-- 根本就找不到门店 --> | |
| 654 | + <block wx:if="{{!only_pk && !def_pickpu_list}}"> | |
| 655 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 656 | + </block> | |
| 657 | + <block wx:else> | |
| 658 | + | |
| 659 | + <block wx:if="{{only_pk.length && !only_pk.length}}"> | |
| 660 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view> | |
| 661 | + </block> | |
| 662 | + <block wx:else> | |
| 663 | + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}"> | |
| 664 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view> | |
| 665 | + </block> | |
| 666 | + | |
| 667 | + <block wx:else> | |
| 668 | + <block wx:if="{{!def_pick_store}}"> | |
| 669 | + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view> | |
| 670 | + </block> | |
| 671 | + <block wx:else> | |
| 672 | + | |
| 673 | + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32 {{!sto_sele_name?'gray':''}}" | |
| 674 | + data-action="add">加入购物车</view> | |
| 675 | + <!-- 秒杀 --> | |
| 676 | + <block wx:if="{{prom_type == 2}}"> | |
| 677 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}" | |
| 678 | + data-action="buy" data-promtype="{{prom_type}}" data-promid="{{prom_id}}"> | |
| 679 | + 立即购买 | |
| 680 | + </view> | |
| 681 | + </block> | |
| 682 | + | |
| 683 | + <!-- 普通商品 --> | |
| 684 | + <block wx:else> | |
| 685 | + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}" | |
| 686 | + data-action="buy"> | |
| 687 | + 立即购买 | |
| 688 | + </view> | |
| 689 | + </block> | |
| 690 | + | |
| 691 | + </block> | |
| 692 | + </block> | |
| 693 | + </block> | |
| 694 | + </block> | |
| 695 | + | |
| 696 | + </block> | |
| 697 | + </view> | |
| 698 | + | |
| 699 | + <view class="clear"></view> | |
| 700 | + </view> | |
| 701 | +</view> | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | +<!-- 选择门店的弹框,1.1版最新的 --> | |
| 706 | +<block wx:if="{{store==1}}"> | |
| 707 | + <view class="mongolia-layer" bindtap="close_popup"></view> | |
| 708 | + <view class="popup-frame"> | |
| 709 | + <block wx:if="{{sort_store==0}}"> | |
| 710 | + <!-- 头部 标题 --> | |
| 711 | + <view class="popup-top flex-space-between"> | |
| 712 | + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text> | |
| 713 | + <view> | |
| 714 | + <view> | |
| 715 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
| 716 | + </view> | |
| 717 | + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}"> | |
| 718 | + <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text> | |
| 719 | + <view class="bg_rights"></view> | |
| 720 | + </view> | |
| 721 | + </view> | |
| 722 | + </view> | |
| 723 | + <view class="searchbar flex-vertical-between storeListpadd"> | |
| 724 | + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" /> | |
| 725 | + <view class="search flex-center" bindtap="searchfn"> | |
| 726 | + <view class="fs28">搜索</view> | |
| 727 | + </view> | |
| 728 | + </view> | |
| 729 | + <!-- 门店列表,最外层的门店列表,一开始 --> | |
| 730 | + <view class="store-list"> | |
| 731 | + <!--如果还没有点击更多门店的时候 --> | |
| 732 | + <block wx:if="{{choice_sort_store==0}}"> | |
| 733 | + <!-- 需要for循环 --> | |
| 734 | + <block wx:if="{{is_show_sto_cat==1}}"> | |
| 735 | + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 736 | + <view class="store flex-vertical"> | |
| 737 | + <!-- 需要点击事件 --> | |
| 738 | + <block wx:if="{{index==fir_pick_index}}"> | |
| 739 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 740 | + </block> | |
| 741 | + <block wx:else> | |
| 742 | + <view class="circle xc-hooks"></view> | |
| 743 | + </block> | |
| 744 | + <view class="address-frame xc-ash"> | |
| 745 | + <view class="flex-vertical-between butttem5"> | |
| 746 | + <view class="flex xc-ash"> | |
| 747 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
| 748 | + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}"> | |
| 749 | + <text class="no_store">(该店不可售)</text> | |
| 750 | + </block> | |
| 751 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售1)</text> | |
| 752 | + | |
| 753 | + </view> | |
| 754 | + </view> | |
| 755 | + <view> | |
| 756 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
| 757 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view> | |
| 758 | + </view> | |
| 759 | + </view> | |
| 760 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 761 | + </view> | |
| 762 | + </view> | |
| 763 | + </view> | |
| 764 | + </block> | |
| 765 | + <block wx:else> | |
| 766 | + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}"> | |
| 767 | + <view class="store flex-vertical"> | |
| 768 | + <!-- 需要点击事件 --> | |
| 769 | + <block wx:if="{{index==fir_pick_index}}"> | |
| 770 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 771 | + </block> | |
| 772 | + <block wx:else> | |
| 773 | + <view class="circle xc-hooks"></view> | |
| 774 | + </block> | |
| 775 | + | |
| 776 | + <view class="address-frame xc-ash"> | |
| 777 | + <view class="flex-vertical-between "> | |
| 778 | + <view class="flex xc-ash"> | |
| 779 | + <view class="fs30 xc-black3 address_name">{{item.pickup_name}} | |
| 780 | + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}"> | |
| 781 | + <text class="no_store">(该店不可售)</text> | |
| 782 | + </block> | |
| 783 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
| 784 | + </view> | |
| 785 | + </view> | |
| 786 | + <view> | |
| 787 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}} | |
| 788 | + </view> | |
| 789 | + </view> | |
| 790 | + </view> | |
| 791 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 792 | + </view> | |
| 793 | + </view> | |
| 794 | + </view> | |
| 795 | + </block> | |
| 796 | + </block> | |
| 797 | + <block wx:else> | |
| 798 | + <!-- 如果是点击选择门店分类后显示分类下的门店 --> | |
| 799 | + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store"> | |
| 800 | + <view class="store flex-vertical"> | |
| 801 | + <!-- 需要点击事件 --> | |
| 802 | + <block wx:if="{{index==sec_pick_index}}"> | |
| 803 | + <view class="circle white xc-hook fs20 red-b">Г</view> | |
| 804 | + </block> | |
| 805 | + <block wx:else> | |
| 806 | + <view class="circle xc-hooks"></view> | |
| 807 | + </block> | |
| 808 | + | |
| 809 | + <view class="address-frame xc-ash"> | |
| 810 | + <view class="flex-vertical-between "> | |
| 811 | + <view class="flex xc-ash"> | |
| 812 | + <view class="fs28 xc-black3 address_name">{{item.pickup_name}} | |
| 813 | + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}"> | |
| 814 | + <text class="no_store">(该店不可售)</text> | |
| 815 | + </block> | |
| 816 | + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text> | |
| 817 | + </view> | |
| 818 | + </view> | |
| 819 | + <view> | |
| 820 | + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}"> | |
| 821 | + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view> | |
| 822 | + </view> | |
| 823 | + </view> | |
| 824 | + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view> | |
| 825 | + </view> | |
| 826 | + </view> | |
| 827 | + </view> | |
| 828 | + </block> | |
| 829 | + | |
| 830 | + </view> | |
| 831 | + | |
| 832 | + <!-- 门店列表底部 --> | |
| 833 | + <view class="store-bottom-frame"> | |
| 834 | + <view class="store-bottom flex-vertical-between"> | |
| 835 | + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">确定</view> | |
| 836 | + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">设为默认</view> | |
| 837 | + </view> | |
| 838 | + </view> | |
| 839 | + | |
| 840 | + </block> | |
| 841 | + | |
| 842 | + <block wx:else> | |
| 843 | + <view class="popup-top flex-space-between"> | |
| 844 | + <text class="fs32 nearby_store">门店分类选择</text> | |
| 845 | + <view> | |
| 846 | + <view> | |
| 847 | + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon> | |
| 848 | + </view> | |
| 849 | + <view class="felx choose_mores" bindtap="returns"> | |
| 850 | + <text class="fs26 red-co">返回</text> | |
| 851 | + </view> | |
| 852 | + </view> | |
| 853 | + </view> | |
| 854 | + <view class="sort_store_list"> | |
| 855 | + | |
| 856 | + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}"> | |
| 857 | + <view class="sort-store flex-vertical-between"> | |
| 858 | + <view class="fs30" di>{{item.name}}</view> | |
| 859 | + <view class="black_rights-frame"> | |
| 860 | + <view class="black_rights"></view> | |
| 861 | + </view> | |
| 862 | + </view> | |
| 863 | + </view> | |
| 864 | + | |
| 865 | + </view> | |
| 866 | + </block> | |
| 867 | + </view> | |
| 868 | +</block> | |
| 869 | +<!-- ---------------分享弹窗--------------- --> | |
| 870 | +<!--二维码显示页面--> | |
| 871 | +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas> | |
| 872 | +<warn id="warn"></warn> | |
| 873 | + | |
| 874 | +<view wx:if="{{showPoster}}"> | |
| 875 | + <view class="mask" catchtap="closePoster"></view> | |
| 876 | + <view class="poster-container"> | |
| 877 | + <view class="poster-wrapper"> | |
| 878 | + <view class="poster" bindtap="previewPoster"> | |
| 879 | + <!-- <view class="poster" bindtap="previewImage"> --> | |
| 880 | + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image> | |
| 881 | + <view class="btn-close" catchtap="closePoster"> | |
| 882 | + <text class="iconfont icon-close"></text> | |
| 883 | + </view> | |
| 884 | + </view> | |
| 885 | + <view class="btn-container"> | |
| 886 | + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> --> | |
| 887 | + <button class="btn-share" bindtap="savePic">保存到相册</button> | |
| 888 | + </view> | |
| 889 | + </view> | |
| 890 | + </view> | |
| 891 | +</view> | |
| 892 | + | |
| 893 | +<!-- 弹起来,购买预热商品的普通购买 --> | |
| 894 | +<view hidden="{{!openSpecModal_flash_normal}}"> | |
| 895 | + <include src="buy_flash_normal.wxml" /> | |
| 896 | +</view> | |
| 897 | + | |
| 898 | + | |
| 899 | +<!-- 联系客服操作菜单 --> | |
| 900 | +<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}"> | |
| 901 | + <view class="pd20 t-c pr"> | |
| 902 | + <text class="bold">联系客服</text> | |
| 903 | + <text class="iconfont icon-guan" bindtap="closeCS"></text> | |
| 904 | + </view> | |
| 905 | + <!-- 客服热线 --> | |
| 906 | + <view class="pd20 bdt fs30 btn2" bindtap="contactService" wx:if="{{store_tel}}"> | |
| 907 | + <text class="iconfont icon-dianhua"></text>客服热线: | |
| 908 | + <text class="c-red">{{store_tel}}</text> | |
| 909 | + </view> | |
| 910 | + <!-- 小程序客服 --> | |
| 911 | + <block wx:if="{{sys_switch.weapp_customertype == 1}}"> | |
| 912 | + <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | |
| 913 | + <text class="iconfont icon-kefu1"></text>在线客服 | |
| 914 | + </button> | |
| 915 | + </block> | |
| 916 | + <!-- 微信客服 --> | |
| 917 | + <block wx:elif="{{sys_switch.weapp_customertype == 2}}"> | |
| 918 | + <view class="pd20 bdt fs30 btn2" bindtap="con_weixin"> | |
| 919 | + <text class="iconfont icon-kefu1"></text>在线客服 | |
| 920 | + </view> | |
| 921 | + </block> | |
| 922 | +</view> | |
| 923 | + | |
| 924 | +<view class="mask2" bindtap="closeCS"></view> | |
| 925 | +<!-- 分享控件,底部弹出 --> | |
| 926 | +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageFn" wx:if="{{share_hidden}}"></share> | ... | ... | 
packageG/pages/group_buy/goodsInfo/goodsInfo.wxss
0 → 100644
| 1 | +@import "../../../../utils/wxParse/wxParse.wxss"; | |
| 2 | +.container { margin-bottom: 100rpx; overflow: hidden;} | |
| 3 | +image { | |
| 4 | + vertical-align: top; | |
| 5 | +} | |
| 6 | +.goods-detail{ | |
| 7 | + /* overflow: hidden */ | |
| 8 | + padding-top: 78rpx; | |
| 9 | +} | |
| 10 | + | |
| 11 | +.type-navbar { | |
| 12 | + display: flex; | |
| 13 | + justify-content: center; | |
| 14 | + width: 100%; | |
| 15 | + position: fixed; | |
| 16 | + top: 0; | |
| 17 | + z-index: 999; | |
| 18 | + /* height: 80rpx; */ | |
| 19 | + /* margin-bottom: 20rpx; */ | |
| 20 | + background-color: #fff; | |
| 21 | + border-top: 2rpx solid #ebedf0; | |
| 22 | + /* border-bottom: 1rpx #fafafa solid; */ | |
| 23 | +} | |
| 24 | +.type-box { | |
| 25 | + width: 25%; | |
| 26 | + box-sizing: border-box; | |
| 27 | + font-size: 32rpx; | |
| 28 | + line-height: 76rpx; | |
| 29 | + padding: 0 20rpx; | |
| 30 | + text-align: center; | |
| 31 | + display: inline-block; | |
| 32 | + overflow: hidden; | |
| 33 | +} | |
| 34 | +.type-navbar-item { | |
| 35 | + /* border-bottom: 4rpx solid #fff; */ | |
| 36 | + display: flex; | |
| 37 | + justify-content: center; | |
| 38 | + width: 100%; | |
| 39 | + font-size: 26rpx; | |
| 40 | +} | |
| 41 | +.type-item-on { | |
| 42 | + color: #F95D74; | |
| 43 | + font-weight: bold; | |
| 44 | + /* border-bottom: 4rpx solid #F95D74; */ | |
| 45 | + position: relative; | |
| 46 | + font-size: 30rpx; | |
| 47 | +} | |
| 48 | +.type-item-on:after { | |
| 49 | + content: ''; | |
| 50 | + position: absolute; | |
| 51 | + width: 50%; | |
| 52 | + height: 4rpx; | |
| 53 | + background-color: #F95D74; | |
| 54 | + left: 0; | |
| 55 | + right: 0; | |
| 56 | + bottom: 0; | |
| 57 | + margin: 0 auto; | |
| 58 | +} | |
| 59 | +.swiper_box { | |
| 60 | + width: 100%; | |
| 61 | + height: 750rpx; | |
| 62 | + background-color: #f2f2f2; | |
| 63 | +} | |
| 64 | +.goods-title { | |
| 65 | + display: flex; | |
| 66 | + justify-content: space-between; | |
| 67 | + /* overflow: hidden; */ | |
| 68 | + /* height: 108rpx; */ | |
| 69 | +} | |
| 70 | +.goods-name { | |
| 71 | + /* width: 560rpx; */ | |
| 72 | + /* line-height: 46rpx; */ | |
| 73 | + font-size: 32rpx; | |
| 74 | + font-weight: bold; | |
| 75 | + color: #333; | |
| 76 | + /* margin-top: 30rpx; | |
| 77 | + margin-bottom:30rpx; */ | |
| 78 | + flex: 1; | |
| 79 | + text-align: justify; | |
| 80 | + margin: 10rpx 0 20rpx; | |
| 81 | +} | |
| 82 | + | |
| 83 | +.goods-collect { | |
| 84 | + width: 112rpx; | |
| 85 | + padding-top: 30rpx; | |
| 86 | +} | |
| 87 | + | |
| 88 | +.collect-img { | |
| 89 | + width: 50rpx; | |
| 90 | + height: 44rpx; | |
| 91 | + margin: 0 auto; | |
| 92 | + overflow: hidden; | |
| 93 | +} | |
| 94 | + | |
| 95 | +.collect-des { | |
| 96 | + text-align: center; | |
| 97 | + font-size: 24rpx; | |
| 98 | + color: #333; | |
| 99 | +} | |
| 100 | + | |
| 101 | +.goods-price { | |
| 102 | + font-size: 60rpx; | |
| 103 | + /* padding: 20rpx 34rpx; */ | |
| 104 | + /* padding:0rpx 34rpx; */ | |
| 105 | + /* line-height: 60rpx; */ | |
| 106 | + color: #999; | |
| 107 | + padding: 20rpx; | |
| 108 | + /* margin-top: 46rpx; */ | |
| 109 | + /* margin-top:26rpx; | |
| 110 | + padding-bottom:20rpx; */ | |
| 111 | +} | |
| 112 | + | |
| 113 | +.prom-info { | |
| 114 | + margin: 10rpx 0; | |
| 115 | + color: #f23030; | |
| 116 | +} | |
| 117 | + | |
| 118 | +.prom-info>.prom-type { | |
| 119 | + color: white; | |
| 120 | + background-color: #f23030; | |
| 121 | + margin-right: 14rpx; | |
| 122 | + padding: 2rpx 8rpx; | |
| 123 | + border-radius: 4rpx; | |
| 124 | +} | |
| 125 | +.market-price { | |
| 126 | + /* display: flex; | |
| 127 | + margin-left: -5rpx; */ | |
| 128 | +} | |
| 129 | + | |
| 130 | +.market-price .yuan{ | |
| 131 | + /* top:24rpx; */ | |
| 132 | + font-size: 30rpx | |
| 133 | +} | |
| 134 | + | |
| 135 | +.market-price>view>text { | |
| 136 | + text-decoration: line-through; | |
| 137 | +} | |
| 138 | + | |
| 139 | +.market-price>.yj{ | |
| 140 | + color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */ | |
| 141 | + display: inline-block; | |
| 142 | +} | |
| 143 | + | |
| 144 | +.goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;} | |
| 145 | + | |
| 146 | +.goods-num { | |
| 147 | + display: flex; | |
| 148 | + font-size: 24rpx; | |
| 149 | + justify-content: space-between; | |
| 150 | + | |
| 151 | +} | |
| 152 | + | |
| 153 | +.goods-detail .twen{ | |
| 154 | + background: #fff;height: 60rpx; line-height: 60rpx; font-size: 30rpx;padding-left: 30rpx;display: flex; | |
| 155 | +} | |
| 156 | +.goods-detail .twen .img{ width: 32rpx; height: 32rpx; margin-left: 200rpx; background: #fff} | |
| 157 | +.goods-detail .twen image.img{vertical-align:auto;} | |
| 158 | + | |
| 159 | + | |
| 160 | +.logistics-item { | |
| 161 | + display: flex; | |
| 162 | + justify-content: space-between; | |
| 163 | + align-items: center; | |
| 164 | + height: 90rpx; | |
| 165 | + /*border-bottom: 1px solid #f5f5f5;*/ | |
| 166 | + font-size: 32rpx; | |
| 167 | + color: #666; | |
| 168 | +} | |
| 169 | +.logistics-item .small{color: #999; font-size: 24rpx;} | |
| 170 | + | |
| 171 | +.item-title { width: 180rpx;} | |
| 172 | +.item-mes { | |
| 173 | + color: #333; width: 420rpx; | |
| 174 | + height: 90rpx; line-height: 90rpx; | |
| 175 | +} | |
| 176 | +.item-img { width: 32rpx; height: 32rpx;} | |
| 177 | +.prom-item { | |
| 178 | + color: #f23030; | |
| 179 | + border: 1px solid #f23030; | |
| 180 | + border-radius: 18rpx; | |
| 181 | + line-height: 40rpx; | |
| 182 | + height: 40rpx; | |
| 183 | + padding: 2rpx 8rpx; | |
| 184 | +} | |
| 185 | + | |
| 186 | +.guarantee { | |
| 187 | + justify-content: space-around; | |
| 188 | +} | |
| 189 | + | |
| 190 | +.ico-item { | |
| 191 | + width: 32rpx; | |
| 192 | + height: 32rpx; | |
| 193 | + margin-right: 10rpx; | |
| 194 | +} | |
| 195 | + | |
| 196 | +.guarantee>view { | |
| 197 | + display: flex; | |
| 198 | + align-items: center; | |
| 199 | + height: 32rpx; | |
| 200 | + color: #666; | |
| 201 | +} | |
| 202 | + | |
| 203 | +.user-comment { | |
| 204 | + margin: 10rpx 0; | |
| 205 | + font-size: 28rpx; | |
| 206 | +} | |
| 207 | + | |
| 208 | +.good-comment,.comment-num { | |
| 209 | + display: flex; | |
| 210 | +} | |
| 211 | + | |
| 212 | +.recommend { | |
| 213 | + background-color: #fff; | |
| 214 | + border-bottom: 1px solid #ddd; | |
| 215 | + padding-bottom: 20rpx; | |
| 216 | +} | |
| 217 | + | |
| 218 | +.recommend-title { | |
| 219 | + height: 70rpx; | |
| 220 | + line-height: 70rpx; | |
| 221 | + font-size: 28rpx; | |
| 222 | + padding: 0 30rpx; | |
| 223 | +} | |
| 224 | + | |
| 225 | +.recommend-ul { | |
| 226 | + display: flex; | |
| 227 | + justify-content: flex-start; | |
| 228 | +} | |
| 229 | + | |
| 230 | +.recommend-ul .li { | |
| 231 | + width: 25%; | |
| 232 | + box-sizing: border-box; | |
| 233 | + text-align: center; | |
| 234 | + font-size: 28rpx; | |
| 235 | + color: #333; | |
| 236 | +} | |
| 237 | + | |
| 238 | +.li-img { | |
| 239 | + width: 120rpx; | |
| 240 | + height: 120rpx; | |
| 241 | + margin: 0 auto; | |
| 242 | +} | |
| 243 | + | |
| 244 | +.li-title { | |
| 245 | + height: 58rpx; | |
| 246 | + line-height: 30rpx; | |
| 247 | + margin: 10rpx 0; | |
| 248 | +} | |
| 249 | + | |
| 250 | +.comment-item { | |
| 251 | + background-color: #fff; | |
| 252 | + font-size: 28rpx; | |
| 253 | +} | |
| 254 | + | |
| 255 | +.comment-title { | |
| 256 | + display: flex; | |
| 257 | + justify-content: space-between; | |
| 258 | + align-items: center; | |
| 259 | + height: 102rpx; | |
| 260 | + margin: 0 30rpx; | |
| 261 | + color: #333; | |
| 262 | + border-bottom: 1px solid #eee; | |
| 263 | +} | |
| 264 | + | |
| 265 | +.user-name { | |
| 266 | + display: flex; | |
| 267 | + align-items: center; | |
| 268 | +} | |
| 269 | + | |
| 270 | +.user-pic { | |
| 271 | + width: 54rpx; | |
| 272 | + height: 54rpx; | |
| 273 | + margin-right: 10rpx; | |
| 274 | + border-radius: 50%; | |
| 275 | + overflow: hidden; | |
| 276 | +} | |
| 277 | + | |
| 278 | +.stars { | |
| 279 | + float: left; | |
| 280 | + display: flex; | |
| 281 | + height: 42rpx; | |
| 282 | + line-height: 42rpx; | |
| 283 | + margin: 15rpx 0; | |
| 284 | + width: 200rpx; | |
| 285 | +} | |
| 286 | + | |
| 287 | +.star { | |
| 288 | + width: 26rpx; | |
| 289 | + height: 26rpx; | |
| 290 | + margin-right: 5rpx; | |
| 291 | +} | |
| 292 | + | |
| 293 | +.state-spec { | |
| 294 | + margin: 15rpx 0; | |
| 295 | + float: right; | |
| 296 | + font-size: 24rpx; | |
| 297 | + color: #666; | |
| 298 | + width: 460rpx; | |
| 299 | + text-align: right; | |
| 300 | +} | |
| 301 | + | |
| 302 | +.comment-cont { | |
| 303 | + padding: 0 30rpx 30rpx; | |
| 304 | + border-bottom: 1px solid #eee; | |
| 305 | +} | |
| 306 | + | |
| 307 | +.comment-mes { | |
| 308 | + line-height: 42rpx; | |
| 309 | +} | |
| 310 | + | |
| 311 | +.img-ul { | |
| 312 | + display: flex; | |
| 313 | + flex-wrap: wrap; | |
| 314 | +} | |
| 315 | + | |
| 316 | +.img-li { | |
| 317 | + width: 150rpx; | |
| 318 | + height: 150rpx; | |
| 319 | + margin-top: 8rpx; | |
| 320 | + margin-right: 10rpx; | |
| 321 | +} | |
| 322 | + | |
| 323 | +.comment-btn { | |
| 324 | + height: 60rpx; | |
| 325 | + padding: 20rpx 30rpx; | |
| 326 | +} | |
| 327 | + | |
| 328 | +.comment-btn .btn { | |
| 329 | + display: flex; | |
| 330 | + justify-content: center; | |
| 331 | + align-items: center; | |
| 332 | + height: 60rpx; | |
| 333 | + width: 45%; | |
| 334 | + border: 1px solid #eee; | |
| 335 | +} | |
| 336 | + | |
| 337 | +.comment-btn .btn-img { | |
| 338 | + width: 30rpx; | |
| 339 | + height: 28rpx; | |
| 340 | + margin: 0 10rpx; | |
| 341 | +} | |
| 342 | + | |
| 343 | +.reply-ul { | |
| 344 | + margin-top: 20rpx; | |
| 345 | +} | |
| 346 | + | |
| 347 | +.reply-li { | |
| 348 | + color: #aaa; | |
| 349 | +} | |
| 350 | + | |
| 351 | +.join-cart { | |
| 352 | + position: fixed; | |
| 353 | + left: 0; | |
| 354 | + bottom: 0; | |
| 355 | + display: flex; | |
| 356 | + width: 100%; | |
| 357 | + height: 100rpx; | |
| 358 | + background-color: #fff; | |
| 359 | + z-index: 9; | |
| 360 | + border-top: 4rpx solid #eee; | |
| 361 | + | |
| 362 | +} | |
| 363 | + | |
| 364 | +.join-cart > view { | |
| 365 | + /* width: 29%; */ | |
| 366 | +} | |
| 367 | + | |
| 368 | +.join-cart .new_split { | |
| 369 | + /* width: 13%; */ | |
| 370 | + /* text-align: center; */ | |
| 371 | + /* padding: 20rpx; */ | |
| 372 | + /* box-sizing: border-box; */ | |
| 373 | + /* flex-shrink: 0; */ | |
| 374 | + /* padding: 0; | |
| 375 | + margin: 0; */ | |
| 376 | +} | |
| 377 | + | |
| 378 | +.cart-ico { | |
| 379 | + font-size: 24rpx; | |
| 380 | + color: #333; | |
| 381 | +} | |
| 382 | + | |
| 383 | +.shopping-cart { | |
| 384 | + position: relative; | |
| 385 | +} | |
| 386 | + | |
| 387 | +.cs-img { | |
| 388 | + width: 45rpx; | |
| 389 | + height: 40rpx; | |
| 390 | + /* margin-top: 15rpx; */ | |
| 391 | +} | |
| 392 | + | |
| 393 | +.sc-img { | |
| 394 | + width: 42rpx; | |
| 395 | + height: 40rpx; | |
| 396 | + /* margin-top: 15rpx; */ | |
| 397 | +} | |
| 398 | + | |
| 399 | +.cart-num { | |
| 400 | + position: absolute; | |
| 401 | + left: 50%; | |
| 402 | + top: 1rpx; | |
| 403 | + width: 40rpx; | |
| 404 | + height: 40rpx; | |
| 405 | + line-height: 40rpx; | |
| 406 | + text-align: center; | |
| 407 | + border-radius: 50%; | |
| 408 | + color: #fff; | |
| 409 | + background-color: rgba(217,81,99,0.9); | |
| 410 | +} | |
| 411 | + | |
| 412 | +.cart-btn { | |
| 413 | + font-size: 28rpx; | |
| 414 | + color: #fff; | |
| 415 | + line-height: 70rpx; | |
| 416 | + /* margin-top: 16rpx; */ | |
| 417 | + text-align: center; | |
| 418 | + | |
| 419 | + | |
| 420 | +} | |
| 421 | + | |
| 422 | +.join-btn { | |
| 423 | + background-color: #ffb03f; | |
| 424 | + height: 70rpx; | |
| 425 | +/* border-radius: 55rpx 0rpx 0rpx 55rpx; | |
| 426 | +margin-top: 16rpx; */ | |
| 427 | + | |
| 428 | + | |
| 429 | +} | |
| 430 | + | |
| 431 | +view.cart-btn-lg { | |
| 432 | + width: 50%; | |
| 433 | +} | |
| 434 | + | |
| 435 | +.buy-btn { | |
| 436 | + background-color: #f23030; | |
| 437 | + height: 70rpx; | |
| 438 | +/* border-radius: 0 56rpx 55rpx 0; */ | |
| 439 | + | |
| 440 | +} | |
| 441 | + | |
| 442 | +.buy-btn-all{ | |
| 443 | + background-color: #f23030; | |
| 444 | + height: 70rpx; | |
| 445 | + border-radius: 56rpx; | |
| 446 | +} | |
| 447 | + | |
| 448 | + | |
| 449 | +.toTop { | |
| 450 | + position: fixed; | |
| 451 | + z-index: 3; | |
| 452 | + right: 20rpx; | |
| 453 | + bottom: 160rpx; | |
| 454 | + width: 68rpx; | |
| 455 | + height: 68rpx; | |
| 456 | + border: 1px solid #ddd; | |
| 457 | + border-radius: 50%; | |
| 458 | + overflow: hidden; | |
| 459 | + cursor: pointer; | |
| 460 | +} | |
| 461 | + | |
| 462 | +.comment-more { | |
| 463 | + height: 56rpx; | |
| 464 | + line-height: 56rpx; | |
| 465 | + font-size: 26rpx; | |
| 466 | + color: #999; | |
| 467 | + text-align: center; | |
| 468 | + background-color: #eee; | |
| 469 | +} | |
| 470 | + | |
| 471 | +.goods-more { | |
| 472 | + background-color: #fff; | |
| 473 | +} | |
| 474 | + | |
| 475 | +.goods-norms { | |
| 476 | + background-color: #fff; | |
| 477 | +} | |
| 478 | + | |
| 479 | +.type-navbar2 { | |
| 480 | + display: flex; | |
| 481 | + height: 72rpx; | |
| 482 | + border-top: 1px solid #ddd; | |
| 483 | + border-bottom: 1px solid #ddd; | |
| 484 | +} | |
| 485 | + | |
| 486 | +.type-box2 { | |
| 487 | + width: 50%; | |
| 488 | + font-size: 26rpx; | |
| 489 | + line-height: 72rpx; | |
| 490 | + text-align: center; | |
| 491 | + overflow: hidden; | |
| 492 | +} | |
| 493 | + | |
| 494 | +.type-item2-on { | |
| 495 | + color: #f23030; | |
| 496 | +} | |
| 497 | + | |
| 498 | +.parameter { | |
| 499 | + padding: 40rpx 0; | |
| 500 | +} | |
| 501 | + | |
| 502 | +.table { | |
| 503 | + width: 698rpx; | |
| 504 | + margin: 0 auto; | |
| 505 | + border: 1px solid #ddd; | |
| 506 | + border-bottom: none; | |
| 507 | +} | |
| 508 | + | |
| 509 | +.tb { | |
| 510 | + width: 100%; | |
| 511 | + min-height: 69rpx; | |
| 512 | + line-height: 69rpx; | |
| 513 | + border-bottom: 1px solid #ddd; | |
| 514 | + font-size: 28rpx; | |
| 515 | + text-align: center; | |
| 516 | + color: #333; | |
| 517 | +} | |
| 518 | + | |
| 519 | +.th-thitle { | |
| 520 | + font-weight: bold; | |
| 521 | + background-color: #f5fafe; | |
| 522 | +} | |
| 523 | + | |
| 524 | +.td-cont { | |
| 525 | + display: flex; | |
| 526 | +} | |
| 527 | + | |
| 528 | +.td-title { | |
| 529 | + width: 259rpx; | |
| 530 | + background-color: #f5fafe; | |
| 531 | + border-right: 1px solid #ddd; | |
| 532 | +} | |
| 533 | + | |
| 534 | +.td-text { | |
| 535 | + width: 439rpx; | |
| 536 | +} | |
| 537 | + | |
| 538 | +.goods-comment { | |
| 539 | + background-color: #fff; | |
| 540 | +} | |
| 541 | + | |
| 542 | +.type-navbar3 { | |
| 543 | + display: flex; | |
| 544 | + height: 88rpx; | |
| 545 | + border-top: 1px solid #ddd; | |
| 546 | + border-bottom: 1px solid #ddd; | |
| 547 | + padding: 10rpx 0; | |
| 548 | +} | |
| 549 | + | |
| 550 | +.type-box3 { | |
| 551 | + width: 20%; | |
| 552 | + font-size: 30rpx; | |
| 553 | + line-height: 44rpx; | |
| 554 | + text-align: center; | |
| 555 | + overflow: hidden; | |
| 556 | +} | |
| 557 | + | |
| 558 | +.type-item3-on { | |
| 559 | + color: #f23030; | |
| 560 | +} | |
| 561 | + | |
| 562 | +.spec-model { | |
| 563 | + position: fixed; | |
| 564 | + bottom: 0; | |
| 565 | + z-index: 19; | |
| 566 | + background: white; | |
| 567 | + width: 100%; | |
| 568 | + /* padding: 0 30rpx; */ | |
| 569 | + font-size: 32rpx; | |
| 570 | + box-sizing: border-box; | |
| 571 | + border-radius: 20rpx 20rpx 0 0; | |
| 572 | + /* height: 72%; */ | |
| 573 | +} | |
| 574 | + | |
| 575 | +.spec-model .pding{padding: 0 20rpx;} | |
| 576 | + | |
| 577 | +.spec-goods { | |
| 578 | + padding: 30rpx 0 20rpx; | |
| 579 | + /* float: left; */ | |
| 580 | + width: 100%; | |
| 581 | + /* border-bottom:2rpx solid #eee; */ | |
| 582 | +} | |
| 583 | + | |
| 584 | +.spec-img { | |
| 585 | + float: left; | |
| 586 | + height: 186rpx; | |
| 587 | + width: 186rpx; | |
| 588 | + border: 4rpx solid #eee | |
| 589 | +} | |
| 590 | + | |
| 591 | +.spec-goods-info { | |
| 592 | + float: left; | |
| 593 | + padding: 0 25rpx; | |
| 594 | + width: 400rpx; | |
| 595 | +} | |
| 596 | + | |
| 597 | +.spec-goods-name { | |
| 598 | + font-size: 30rpx; | |
| 599 | + line-height: 35rpx; | |
| 600 | + height: 70rpx; | |
| 601 | + margin: 15rpx 20rpx 25rpx 0; | |
| 602 | + overflow: hidden; | |
| 603 | + text-overflow: ellipsis;color: #333; | |
| 604 | +} | |
| 605 | + | |
| 606 | +.spec-goods-price { | |
| 607 | + color: #d60021; | |
| 608 | + font-size: 33rpx; | |
| 609 | + font-weight: bold; | |
| 610 | +} | |
| 611 | + | |
| 612 | +.spec-goods-stock { | |
| 613 | + margin-top: 3rpx; | |
| 614 | + font-size: 24rpx; | |
| 615 | + color: #999999; | |
| 616 | + margin-right: 15rpx; | |
| 617 | +} | |
| 618 | + | |
| 619 | +.spec-name { | |
| 620 | + clear: both; | |
| 621 | + padding: 20rpx 0; | |
| 622 | + font-size: 30rpx;color: #333; | |
| 623 | +} | |
| 624 | + | |
| 625 | +.quhuo{font-size: 30rpx; color: #000} | |
| 626 | +.b_num{ | |
| 627 | + display: flex;font-size: 30rpx; color: #333; | |
| 628 | + justify-content: space-between; | |
| 629 | + align-items: center; | |
| 630 | + padding: 20rpx; | |
| 631 | +} | |
| 632 | + | |
| 633 | +.count { | |
| 634 | + /* position: fixed; */ | |
| 635 | + display: flex; | |
| 636 | + height: 50rpx; | |
| 637 | + /* border: 1rpx solid #000; */ | |
| 638 | + font-size: 28rpx; | |
| 639 | + right: 30rpx; | |
| 640 | +} | |
| 641 | + | |
| 642 | + | |
| 643 | +.count>view,.count>input { | |
| 644 | + width: 60rpx; | |
| 645 | + height: 50rpx; | |
| 646 | + line-height: 50rpx; | |
| 647 | + text-align: center; | |
| 648 | +} | |
| 649 | +.spec_bt{ | |
| 650 | + background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; display: inline-block; | |
| 651 | + border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx; | |
| 652 | +} | |
| 653 | +.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;} | |
| 654 | +.sub { | |
| 655 | + /* border-right: 1px solid #000; */ | |
| 656 | +} | |
| 657 | +.sub.active { | |
| 658 | + /* background-color: #ddd; */ | |
| 659 | + color: #ccc; | |
| 660 | +} | |
| 661 | + | |
| 662 | +.sub, .add, .count>input { | |
| 663 | + /* border-right: 1px solid #000; */ | |
| 664 | + background-color: #f8f8f8; | |
| 665 | + border-radius: 8rpx; | |
| 666 | +} | |
| 667 | +.sub.active { | |
| 668 | + /* background-color: #ddd; */ | |
| 669 | + color: #ccc; | |
| 670 | +} | |
| 671 | +.count>input { | |
| 672 | + margin: 0 10rpx; | |
| 673 | + line-height: normal; | |
| 674 | +} | |
| 675 | + | |
| 676 | +.add { | |
| 677 | + /* border-left: 1px solid #000; */ | |
| 678 | +} | |
| 679 | + | |
| 680 | +.spec-btn { | |
| 681 | + color: black; | |
| 682 | + background-color: white; | |
| 683 | + padding: 10rpx 10rpx; | |
| 684 | + font-size: 26rpx; | |
| 685 | + line-height: 28rpx; | |
| 686 | + float: left; | |
| 687 | + border: 1rpx solid #dedede; | |
| 688 | + margin: 4rpx 10rpx 4rpx 0; | |
| 689 | + border-radius: 4rpx; | |
| 690 | +} | |
| 691 | + | |
| 692 | +.spec-btn-click { | |
| 693 | + color: white; | |
| 694 | + background-color: #f23030; | |
| 695 | + border: 1rpx solid #f23030; | |
| 696 | +} | |
| 697 | + | |
| 698 | +.spec-cart-btns { | |
| 699 | + /* width: 92%; */ | |
| 700 | + line-height: 70rpx; | |
| 701 | + /* margin: 0rpx auto; | |
| 702 | + margin-top: 160rpx; */ | |
| 703 | + /* border-radius: 20rpx; */ | |
| 704 | +/* position: fixed; */ | |
| 705 | +/* bottom: 50rpx; */ | |
| 706 | +/* left: 4%; */ | |
| 707 | + padding: 20rpx; | |
| 708 | +} | |
| 709 | + | |
| 710 | +.spec-cart-btn { | |
| 711 | + | |
| 712 | + width:100%; | |
| 713 | + font-size: 30rpx; | |
| 714 | + text-align: center; | |
| 715 | + color: white; | |
| 716 | + border-radius: 40rpx; | |
| 717 | +} | |
| 718 | + | |
| 719 | +.spec-cart-btn.w40 { | |
| 720 | + width: 46%; | |
| 721 | +} | |
| 722 | + | |
| 723 | +.spec-add-cart { | |
| 724 | + background-color: #ffb03f; | |
| 725 | +} | |
| 726 | + | |
| 727 | +.spec-buy { | |
| 728 | + background-color: #f23030; | |
| 729 | + /* margin-left: 34rpx; */ | |
| 730 | +} | |
| 731 | + | |
| 732 | +.spec-cart-disable { | |
| 733 | + background: #bbbbbb; | |
| 734 | +} | |
| 735 | + | |
| 736 | +.spec-cart-btn-lg { | |
| 737 | + width: 614rpx; | |
| 738 | +} | |
| 739 | + | |
| 740 | +.prom-model { | |
| 741 | + position: fixed; | |
| 742 | + bottom: 0; | |
| 743 | + z-index: 20; | |
| 744 | + background: white; | |
| 745 | + width: 100%; | |
| 746 | + padding: 0 30rpx 30rpx; | |
| 747 | + font-size: 32rpx; | |
| 748 | + box-sizing: border-box; | |
| 749 | + overflow-x: hidden; | |
| 750 | +} | |
| 751 | + | |
| 752 | +.prom-model .prom-title {text-align: center;margin: 30rpx 0;} | |
| 753 | +.prom-model .logistics-item {border: 0;} | |
| 754 | +.prom-model .item-mes {width: 500rpx;} | |
| 755 | +.integral-btn {width: 100%; padding: 0rpx;margin: 0rpx;} | |
| 756 | +.clear{clear: both;} | |
| 757 | +.sto_v .title,.sto_v .stitle{ border-top: 1rpx solid #dedede;border-bottom: 1rpx solid #dedede; height: 78rpx; line-height: 78rpx;} | |
| 758 | +.sto_v .title .tubiao,.sto_v .stitle .tubiao{width: 32rpx; height: 32rpx; margin-top: 23rpx;} | |
| 759 | +.itemlists .item{border-bottom: 1rpx solid #dedede; height: 72rpx; line-height: 72rpx;font-size: 28rpx; margin: 0 10rpx;} | |
| 760 | + | |
| 761 | +.cshu{margin-bottom: 30rpx; margin-top: 20rpx;} | |
| 762 | +.cshu view{color: #999; font-size: 30rpx; margin-left: 26rpx;} | |
| 763 | + | |
| 764 | + | |
| 765 | +/*---活动特殊显示---*/ | |
| 766 | +.prom_show{height: 120rpx; display: flex;} | |
| 767 | +.prom_show .secondkill-img{width: 100%; height: 100%;} | |
| 768 | +.prom_show .spike-img{width: 283rpx; height: 57rpx; top:35rpx; | |
| 769 | +left:31rpx;} | |
| 770 | +.prom_show .stop{ color:#d81731;top: 17rpx;right:65rpx; font-weight:600;} | |
| 771 | +.prom_show .start{ color:#009ae2;top: 17rpx;right:65rpx; font-weight:600;} | |
| 772 | +.prom_show .timeac { font-size: 32rpx; height: 120rpx; color: #333; } | |
| 773 | +.prom_show .timeac.left{width: 66%; color: #fff;background:#f23030;} | |
| 774 | +.prom_show .timeac.right{width: 34%;background-color: #d7d7d7; text-align: center} | |
| 775 | + | |
| 776 | +.prom_show .secview .day{padding-right:10rpx;} | |
| 777 | +.prom_show .secview .time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | |
| 778 | +.prom_show .secview .time{margin-right:10rpx; margin-left:10rpx;} | |
| 779 | + | |
| 780 | + | |
| 781 | +.prom_show .timeac.left view{ margin-left: 20rpx} | |
| 782 | +.prom_show .timeac.left view.firview{margin-top: 10rpx} | |
| 783 | +.prom_show .timeac.left view .tr_line{ text-decoration: line-through; font-size: 28rpx;} | |
| 784 | +.prom_show .timeac.left view .bprice{ font-size: 50rpx; } | |
| 785 | + | |
| 786 | +.prom_show .timeac.right view.firview{margin-top:12rpx; margin-bottom: 10rpx} | |
| 787 | +.prom_show .timeac.right view.secview{display: flex; text-align: center; justify-content:center; flex-direction: row;} | |
| 788 | +.prom_show .timeac.right view .tui-conutdown-box{ | |
| 789 | + /* background: #6b6b6b; */ | |
| 790 | + width: auto; | |
| 791 | + /* min-width: 45rpx; */ | |
| 792 | + height: 45rpx; color: #c4182e; font-size: 27rpx; text-align: center; line-height: 46rpx;} | |
| 793 | + | |
| 794 | +.huise{ background:gray} | |
| 795 | +.lanse{background:#0199e2} | |
| 796 | + | |
| 797 | + | |
| 798 | +/*------拼单------*/ | |
| 799 | +.pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx} | |
| 800 | +.pt_view .secondkill-img{width: 100%;height: 100%;} | |
| 801 | +.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */} | |
| 802 | +.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;} | |
| 803 | +.pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx; | |
| 804 | + height: 40rpx; font-size: 24rpx; text-align: center;} | |
| 805 | +.pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;} | |
| 806 | +.pt_fir .pt_fir_title .bigw{font-size: 36rpx;} | |
| 807 | +.pt_fir .pt_fir_title .tprice{text-decoration: line-through;color: #949494} | |
| 808 | +.pt_fir .pt_fir_title .tprice.ml50{margin-left: 50rpx} | |
| 809 | + | |
| 810 | +.pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;} | |
| 811 | +.pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;} | |
| 812 | +.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%; | |
| 813 | + padding-right: 20rpx;font-size: 26rpx;color: #ea120f} | |
| 814 | +.pdres{margin-left: 10rpx;color: #8f8f94} | |
| 815 | +.ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden } | |
| 816 | +.shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx} | |
| 817 | +.ptgz_an{position: absolute;top:5rpx; right: 6rpx} | |
| 818 | +.ptgz_an .arrow-two{width:18rpx;height:18rpx;border-color:#da0b31; margin-top:30rpx;} | |
| 819 | + | |
| 820 | +.pt_fir.se{height: auto; margin-bottom: 10rpx} | |
| 821 | +.t_gz{padding: 10rpx 20rpx; font-size:28rpx } | |
| 822 | + | |
| 823 | +.pt_fir.se1{height: auto; margin: 0} | |
| 824 | +.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */} | |
| 825 | + | |
| 826 | +.pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx; | |
| 827 | + border-bottom: 1rpx solid #E5E5E5 } | |
| 828 | +.ptgz_an.xq{font-size: 32rpx; color:#d40024} | |
| 829 | +.wf{display: flex; padding: 20rpx 0;} | |
| 830 | +.wf .item{width: 24.5%; text-align: center; font-size: 26rpx; color: #666} | |
| 831 | +.wf .item .item_txy{position: relative;width: 60rpx; height: 60rpx; background: #ea120f; border-radius: 50%;left: 50%;margin-left: -30rpx; | |
| 832 | + border: 3px #dfdfdf solid; text-align: center;line-height: 60rpx; color: #fff; margin-bottom: 10rpx;} | |
| 833 | +.wf .item .item_txy.hs{ background: #cbcbcb;} | |
| 834 | +.po{margin-bottom: 20rpx;} | |
| 835 | + | |
| 836 | +.cart-btn.line-h{ line-height: 26rpx;} | |
| 837 | +.cart-btn .fir-v{ margin-top: 10rpx;} | |
| 838 | + | |
| 839 | +.hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;} | |
| 840 | +.hyt .r_f{color: #e9120f;font-size: 26rpx;position: relative;top:3rpx} | |
| 841 | +.hyt .byj{color: #e9120f;font-size: 32rpx;position: relative;top:5rpx} | |
| 842 | + | |
| 843 | +.pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx} | |
| 844 | +.pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid} | |
| 845 | + | |
| 846 | +.jie_price{/* padding: 10rpx 30rpx; */} | |
| 847 | +.jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx} | |
| 848 | +.price_list{display: flex; width: 100%;} | |
| 849 | +.price_item{width: 25%;font-size: 28rpx; color: #4c336c} | |
| 850 | + | |
| 851 | +.pt_fir.se2 .zzk-1{/* margin-top: 23rpx; */ font-size: 30rpx;position: relative; /* margin-bottom: 30rpx; */ border-left:4rpx solid red;/* margin-left:14rpx; */height:30rpx;line-height:30rpx;/* padding-left:5rpx; */} | |
| 852 | +.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;} | |
| 853 | +.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;} | |
| 854 | +.bview{ | |
| 855 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | |
| 856 | + background-color: rgba(0, 0, 0, 0.5); | |
| 857 | +} | |
| 858 | +.juzhong{ | |
| 859 | + position: fixed; top:0; left:0; width: 100%; height: 100%; | |
| 860 | + display: flex; | |
| 861 | + flex-direction:row; | |
| 862 | + justify-content: center; | |
| 863 | + align-items: center; | |
| 864 | +} | |
| 865 | + | |
| 866 | +.juzhong .xq{ padding: 0 20rpx; background: #fff; font-size: 30rpx; padding-bottom: 20rpx;} | |
| 867 | +.juzhong .xq .title{text-align: center; margin: 20rpx 0; position: relative; height: 50rpx;} | |
| 868 | +.juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e} | |
| 869 | +.juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;} | |
| 870 | + | |
| 871 | +.pt_qd{margin-top: 40rpx; height: auto;} | |
| 872 | +.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; } | |
| 873 | + | |
| 874 | +.sto_v{color: #333;} | |
| 875 | +.ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} | |
| 876 | + | |
| 877 | + | |
| 878 | +/*---多少人参加团--*/ | |
| 879 | +.group { | |
| 880 | + padding-top:20rpx; | |
| 881 | + padding-bottom:20rpx; | |
| 882 | + width: 100%; | |
| 883 | + /* min-height: 92rpx; */ | |
| 884 | + border-bottom: 2rpx solid #ebedf0; | |
| 885 | + | |
| 886 | +} | |
| 887 | + | |
| 888 | +.group .group-list { | |
| 889 | + display: flex; | |
| 890 | + align-items: center; | |
| 891 | + justify-content: space-around; | |
| 892 | + /* height: 90rpx; */ | |
| 893 | + /* padding: 0 130rpx 0 100rpx; */ | |
| 894 | + /* width: 470rpx; | |
| 895 | + | |
| 896 | + position: absolute; */ | |
| 897 | +} | |
| 898 | + | |
| 899 | +.group .group-list .gtou { | |
| 900 | + width: 70rpx; | |
| 901 | + height: 70rpx; | |
| 902 | + /* float: left; | |
| 903 | + position: relative; | |
| 904 | + top: 6rpx; | |
| 905 | + left: -96rpx; */ | |
| 906 | +} | |
| 907 | + | |
| 908 | +.group .group-list .gtou image { | |
| 909 | + display: block; | |
| 910 | + width: 100%; | |
| 911 | + height: 100%; | |
| 912 | + border-radius: 50%; | |
| 913 | + background-color: #f0f0f0; | |
| 914 | +} | |
| 915 | + | |
| 916 | +.group .group-list .gdn { | |
| 917 | + width: 140rpx; | |
| 918 | + text-align: center; | |
| 919 | + /* float: left; */ | |
| 920 | + font-size: 26rpx; | |
| 921 | + /* padding-left: 20rpx; */ | |
| 922 | + /* line-height: 48rpx; | |
| 923 | + height: 48rpx; | |
| 924 | + width: 168rpx; | |
| 925 | + position: relative; | |
| 926 | + left: -80rpx; | |
| 927 | + top:20rpx; */ | |
| 928 | + font-weight:bold; | |
| 929 | +} | |
| 930 | + | |
| 931 | +.group .group-list .ghaicha { | |
| 932 | + /* width:300rpx; */ | |
| 933 | + font-size: 27rpx; | |
| 934 | + /* margin-left:180rpx; | |
| 935 | + top:13rpx; | |
| 936 | + left:-3rpx; */ | |
| 937 | + font-weight: bold; | |
| 938 | + | |
| 939 | + | |
| 940 | +} | |
| 941 | + | |
| 942 | +.group .group-list .ghaicha .gred { | |
| 943 | + /* height: 48rpx; | |
| 944 | + width: 300rpx; */ | |
| 945 | +} | |
| 946 | + | |
| 947 | +.gsj { | |
| 948 | + float: left; | |
| 949 | + color: #8f8f94; | |
| 950 | +} | |
| 951 | + | |
| 952 | +.group .group-list .cjt { | |
| 953 | + height:42rpx; | |
| 954 | + width: 137rpx; | |
| 955 | + /* position: absolute; | |
| 956 | + right: 4rpx; | |
| 957 | + top:25rpx; */ | |
| 958 | + line-height: 42rpx; | |
| 959 | + font-size: 24rpx; | |
| 960 | + color: #fff; | |
| 961 | + border:2rpx solid #d60024; | |
| 962 | + background-color:#d60024; | |
| 963 | + border-radius:25rpx; | |
| 964 | + | |
| 965 | +} | |
| 966 | + | |
| 967 | +.gbody { | |
| 968 | + background-color: white; | |
| 969 | +} | |
| 970 | +.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx; | |
| 971 | +} | |
| 972 | +.join-cart>view.set_width { | |
| 973 | + width:58%; | |
| 974 | +} | |
| 975 | + | |
| 976 | +/*秒杀样式zwp*/ | |
| 977 | +#zwpMs{ | |
| 978 | + width: 31%; | |
| 979 | + color: #fff; | |
| 980 | + background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat; | |
| 981 | + background-size: 100% 60px; | |
| 982 | +} | |
| 983 | + | |
| 984 | + | |
| 985 | +/*--------- 修改后的样式 -----------*/ | |
| 986 | +.elli{ | |
| 987 | + overflow : hidden; | |
| 988 | + text-overflow: ellipsis; | |
| 989 | + display: -webkit-box; | |
| 990 | + -webkit-line-clamp: 2; | |
| 991 | + -webkit-box-orient: vertical; | |
| 992 | +} | |
| 993 | +.one_elli{ | |
| 994 | + overflow : hidden; | |
| 995 | + text-overflow: ellipsis; | |
| 996 | + white-space:nowrap; | |
| 997 | +} | |
| 998 | + | |
| 999 | +.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative; | |
| 1000 | + display: flex; justify-content: center;align-items: center; padding: 20rpx;} | |
| 1001 | + | |
| 1002 | +.tuwen_title .g_line{ | |
| 1003 | + width:496rpx; | |
| 1004 | + height:1rpx; | |
| 1005 | + border-bottom:#ababab 1rpx solid; | |
| 1006 | +} | |
| 1007 | +.tuwen_title .center_s{ | |
| 1008 | + width: 124rpx; position: absolute; height: 34rpx; background-color:#eeeeee; font-size: 32rpx; display: flex; | |
| 1009 | + overflow: hidden; justify-content: center;align-items: center; | |
| 1010 | +} | |
| 1011 | +.tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx} | |
| 1012 | +.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; } | |
| 1013 | +.red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; } | |
| 1014 | + | |
| 1015 | +.tb-l{ /* line-height: 96rpx; */} | |
| 1016 | +.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;border-right: none;} | |
| 1017 | +.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 } | |
| 1018 | +.item_left{width: 210rpx; height: 100%; box-sizing:border-box; text-align: center;padding: 20rpx; background: #f9f9f9 ;border-right:2rpx solid #e4e4e4} .item_left text{ /* margin-left: 44rpx; */} | |
| 1019 | +.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;border-right:2rpx solid #e4e4e4;text-align: center;} | |
| 1020 | +.item_right text{ /* margin-left: 66rpx; */} | |
| 1021 | + | |
| 1022 | +.table_s .tb-l:last-child {border-bottom: none;} | |
| 1023 | + | |
| 1024 | +.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ } | |
| 1025 | + .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx; | |
| 1026 | + /* border-bottom: 3rpx solid #eee; */ | |
| 1027 | + /* border-top: 3rpx solid #eee; */} | |
| 1028 | + .bz_view view{ width: 520rpx; /* max-height: 70rpx; */ /* overflow: hidden; */} | |
| 1029 | + | |
| 1030 | +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333; | |
| 1031 | + font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ } | |
| 1032 | +.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */} | |
| 1033 | + | |
| 1034 | +.bg_jj { | |
| 1035 | + width: 14rpx; | |
| 1036 | + height: 14rpx; | |
| 1037 | + border-top: 2rpx solid #d70026; | |
| 1038 | + border-right: 2rpx solid #d70026; | |
| 1039 | + transform: rotateZ(45deg); | |
| 1040 | + display: inline-block; | |
| 1041 | + margin-bottom: 3rpx; | |
| 1042 | +} | |
| 1043 | + | |
| 1044 | +.bg_jj.down { | |
| 1045 | + transform: rotateZ(135deg); | |
| 1046 | +} | |
| 1047 | + | |
| 1048 | +.bg_jj.up { | |
| 1049 | + transform: rotateZ(-45deg); | |
| 1050 | + margin-top: 6rpx; | |
| 1051 | +} | |
| 1052 | + | |
| 1053 | +.bz-content { | |
| 1054 | + padding: 0 0 0 20rpx; | |
| 1055 | +} | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | +/* 顶部边框 */ | |
| 1060 | +.topframe{ | |
| 1061 | + width: 100%; | |
| 1062 | + height: 172rpx; | |
| 1063 | + flex-direction: row; | |
| 1064 | + justify-content: space-between; | |
| 1065 | + border-bottom: 6rpx solid #eeeeee; | |
| 1066 | + overflow: hidden; | |
| 1067 | +} | |
| 1068 | +/* 评价人边框*/ | |
| 1069 | +.topframe .topframe-top{ | |
| 1070 | + display: flex; | |
| 1071 | + margin-top: 40rpx; | |
| 1072 | + margin-bottom: 36rpx; | |
| 1073 | + color: #7d7d7d; | |
| 1074 | + padding-left: 20rpx; | |
| 1075 | + font-size: 32rpx; | |
| 1076 | +} | |
| 1077 | +/*评价人数量*/ | |
| 1078 | +.topframe .topframe-top .topframe-top-val{ | |
| 1079 | + margin-left: 15rpx; | |
| 1080 | + | |
| 1081 | +} | |
| 1082 | +.topframe-top-content{ | |
| 1083 | + display: flex; | |
| 1084 | + width: 36%; | |
| 1085 | +} | |
| 1086 | +/* 好评 */ | |
| 1087 | +.topframe-praise{ | |
| 1088 | + width: 61%; | |
| 1089 | + text-align: right; | |
| 1090 | + color: #dc4355; | |
| 1091 | + font-size: 28rpx; | |
| 1092 | +} | |
| 1093 | +/* 按钮列表 */ | |
| 1094 | +.buttem-list{ | |
| 1095 | + width: 100%; | |
| 1096 | + display: flex; | |
| 1097 | + font-size: 20rpx; | |
| 1098 | + overflow: hidden; | |
| 1099 | +} | |
| 1100 | + | |
| 1101 | +.buttem-list .item{ | |
| 1102 | + min-width: 17%; | |
| 1103 | + font-size: 24rpx; | |
| 1104 | + border-radius: 20rpx; | |
| 1105 | + background:#ffe3e2; | |
| 1106 | + height:38rpx; | |
| 1107 | + text-align: center; | |
| 1108 | + line-height: 38rpx; | |
| 1109 | + margin-left: 20rpx; | |
| 1110 | +} | |
| 1111 | + | |
| 1112 | +.buttem-list .item.red{ | |
| 1113 | + color: #fff; | |
| 1114 | + background: #d60022; | |
| 1115 | +} | |
| 1116 | + | |
| 1117 | +/* 用户评价 */ | |
| 1118 | +.middle{ | |
| 1119 | + width: 95%; | |
| 1120 | + margin:0 auto; | |
| 1121 | +} | |
| 1122 | +.middle-img-frame{ | |
| 1123 | + height:65rpx; | |
| 1124 | + display: flex; | |
| 1125 | + margin-top: 32rpx; | |
| 1126 | + | |
| 1127 | +} | |
| 1128 | +/* 评价的用户图片 */ | |
| 1129 | +.middle-img{ | |
| 1130 | + width:60rpx; | |
| 1131 | + height:60rpx; | |
| 1132 | + border-radius: 50%; | |
| 1133 | + -moz-border-radius: 50%; | |
| 1134 | + -webkit-border-radius: 50%; | |
| 1135 | + margin-right: 15rpx; | |
| 1136 | +} | |
| 1137 | +/* 评价的用户边框 */ | |
| 1138 | +.middle-user-frame{ | |
| 1139 | + height: 72rpx; | |
| 1140 | + overflow: hidden; | |
| 1141 | +} | |
| 1142 | +.middle-user{ | |
| 1143 | + height: 25; | |
| 1144 | + font-size: 28rpx; | |
| 1145 | +} | |
| 1146 | +/* 评价图片 */ | |
| 1147 | +.middle-img-two{ | |
| 1148 | + width: 115rpx; | |
| 1149 | + height: 25rpx; | |
| 1150 | + text-align: center; | |
| 1151 | + margin-bottom:20rpx; | |
| 1152 | + margin-left:5rpx; | |
| 1153 | +} | |
| 1154 | +.xc-pirces{ | |
| 1155 | + margin-top: 14rpx; | |
| 1156 | +} | |
| 1157 | +/* 评价文字 */ | |
| 1158 | +.middle-font{ | |
| 1159 | + font-size: 30rpx; | |
| 1160 | + | |
| 1161 | +} | |
| 1162 | +.iddle-goods-img{ | |
| 1163 | + width: 100%; | |
| 1164 | + display: flex; | |
| 1165 | + margin-top:22rpx; | |
| 1166 | +} | |
| 1167 | +/* 商品图片 */ | |
| 1168 | +.goods-img{ | |
| 1169 | + width: 156rpx; | |
| 1170 | + height: 156rpx; | |
| 1171 | + margin-left: 22rpx; | |
| 1172 | + height: 100%; | |
| 1173 | +} | |
| 1174 | +.parameter-frame{ | |
| 1175 | + margin-top:14rxp; | |
| 1176 | + margin-bottom: 14rpx; | |
| 1177 | + width:50%; | |
| 1178 | + height: 30rpx; | |
| 1179 | +} | |
| 1180 | +.z_parameter{ | |
| 1181 | + width:98%; | |
| 1182 | + height: 45rpx; | |
| 1183 | + display:flex; | |
| 1184 | + line-height: 45rpx; | |
| 1185 | + margin-top: 20rpx; | |
| 1186 | + margin-bottom: 14rpx; | |
| 1187 | + justify-content : space-between; | |
| 1188 | +} | |
| 1189 | +.parameter-font{ | |
| 1190 | + font-size: 26rpx; | |
| 1191 | + | |
| 1192 | +} | |
| 1193 | +/* 规格 */ | |
| 1194 | +.parameter-state{ | |
| 1195 | + width: 100rpx; | |
| 1196 | + font-size: 24rpx; | |
| 1197 | + color: #c4c4c4; | |
| 1198 | +} | |
| 1199 | +.parameter-dian{ | |
| 1200 | + display: flex; | |
| 1201 | + width: 94rpx; | |
| 1202 | + height: 33rpx; | |
| 1203 | + font-size: 20rpx; | |
| 1204 | + border-radius: 20rpx; | |
| 1205 | + line-height:33rpx; | |
| 1206 | + padding-left: 25rpx; | |
| 1207 | + border:4rpx solid #eeeeee; | |
| 1208 | + | |
| 1209 | +} | |
| 1210 | +/* 点赞图片 */ | |
| 1211 | +.parameter-img{ | |
| 1212 | + width: 27rpx; | |
| 1213 | + height: 27rpx; | |
| 1214 | + margin-top: 3rpx; | |
| 1215 | +} | |
| 1216 | +.parameter-val{ | |
| 1217 | + margin-left:25rpx; | |
| 1218 | + font-size: 26rpx; | |
| 1219 | + color: #999; | |
| 1220 | +} | |
| 1221 | +/* 回复 */ | |
| 1222 | +.reply{ | |
| 1223 | + width: 95%; | |
| 1224 | + /* height: 120rpx; */ | |
| 1225 | + padding-top: 14rpx; | |
| 1226 | + border-top:3rpx solid #eeeeee; | |
| 1227 | + margin:0 auto; | |
| 1228 | + | |
| 1229 | +} | |
| 1230 | +.shop-reply{ | |
| 1231 | + height: 30rpx; | |
| 1232 | + color:#d60022; | |
| 1233 | + font-size:24rpx; | |
| 1234 | + overflow: hidden; | |
| 1235 | +} | |
| 1236 | +.shop-font{ | |
| 1237 | + width: 94%; | |
| 1238 | + font-size: 24rpx; | |
| 1239 | + padding-top: 10rpx; | |
| 1240 | + | |
| 1241 | +} | |
| 1242 | +.line_bulge{ | |
| 1243 | + width: 17rpx; | |
| 1244 | + height: 17rpx; | |
| 1245 | + border-top: 1rpx solid #eeeeee; | |
| 1246 | + border-left: 1rpx solid #eeeeee; | |
| 1247 | + transform:rotate(45deg); | |
| 1248 | + position: absolute; | |
| 1249 | + top: -12rpx; | |
| 1250 | + left:50rpx; | |
| 1251 | + background:#fff; | |
| 1252 | +} | |
| 1253 | + | |
| 1254 | + | |
| 1255 | +.xc_comment{ | |
| 1256 | + display: flex; | |
| 1257 | + justify-content: space-around; | |
| 1258 | + width: 100%; | |
| 1259 | + box-sizing: border-box; | |
| 1260 | + padding: 10rpx 20rpx; | |
| 1261 | + /* height: 42rpx; | |
| 1262 | + padding-left: 34rpx; */ | |
| 1263 | + color: #333; | |
| 1264 | + | |
| 1265 | +} | |
| 1266 | +.xc_comment-have-pictures{ | |
| 1267 | + width: 153rpx; | |
| 1268 | + /* height: 42rpx; */ | |
| 1269 | + line-height: 42rpx; | |
| 1270 | + text-align: center; | |
| 1271 | + background: #ffe3e2; | |
| 1272 | + color: 28rpx; | |
| 1273 | + border-radius:21rpx; | |
| 1274 | + font-size: 24rpx; | |
| 1275 | +} | |
| 1276 | +.xc_comment-discuss{ | |
| 1277 | + width: 152rpx; | |
| 1278 | + height: 42rpx; | |
| 1279 | + line-height: 42rpx; | |
| 1280 | + text-align: center; | |
| 1281 | + background: #ffe3e2; | |
| 1282 | + color: 28rpx; | |
| 1283 | + border-radius:20rpx; | |
| 1284 | + font-size: 24rpx; | |
| 1285 | + margin-left: 28rpx | |
| 1286 | +} | |
| 1287 | + | |
| 1288 | +.xc_comment-detail{ | |
| 1289 | + display: flex; | |
| 1290 | + /* margin-top: 40rpx; */ | |
| 1291 | + /* width: 524rpx; */ | |
| 1292 | + /* margin-left: 34rpx; */ | |
| 1293 | + border-radius: 24rpx; | |
| 1294 | + border: 2rpx solid #ebedf0; | |
| 1295 | + margin-left: 20rpx; | |
| 1296 | + box-sizing: border-box; | |
| 1297 | + /* overflow: hidden; */ | |
| 1298 | +} | |
| 1299 | + | |
| 1300 | +.xc_user-img{ | |
| 1301 | + border-radius:50%; | |
| 1302 | + margin: auto 0; | |
| 1303 | +} | |
| 1304 | + | |
| 1305 | +.xc_comment-user{ | |
| 1306 | + display: flex; | |
| 1307 | + /* margin-top: 22rpx; | |
| 1308 | + margin-left: 22rpx; */ | |
| 1309 | +} | |
| 1310 | +.xc_user{ | |
| 1311 | + width: 170rpx; | |
| 1312 | + height: 60rpx; | |
| 1313 | + margin-left: 6rpx; | |
| 1314 | + overflow: hidden; | |
| 1315 | +} | |
| 1316 | +.xc_user-name{ /* height: 25rpx; */} | |
| 1317 | +.xc_comment-img{ | |
| 1318 | + width: 22rpx; | |
| 1319 | + height: 22rpx; | |
| 1320 | + /* margin-top: 14rpx; */ | |
| 1321 | + margin-right: 5rpx | |
| 1322 | +} | |
| 1323 | +.xc_comment-font{ | |
| 1324 | + /* height: 75rpx; */ | |
| 1325 | + /* margin-left: 22rpx; */ | |
| 1326 | + white-space:normal; | |
| 1327 | + overflow: hidden; | |
| 1328 | + /* margin-top: 8rpx; | |
| 1329 | + line-height: 38rpx; */ | |
| 1330 | + | |
| 1331 | +} | |
| 1332 | +.xc_comment-val{ | |
| 1333 | + /* width: 88%; | |
| 1334 | + height: 30rpx; | |
| 1335 | + margin-left: 22rpx; | |
| 1336 | + display: flex; | |
| 1337 | + margin-top: 15rpx; | |
| 1338 | + margin-bottom:15rpx; */ | |
| 1339 | +} | |
| 1340 | + | |
| 1341 | +.xc_comment-time{ | |
| 1342 | + /* height: 30rpx; */ | |
| 1343 | + font-size: 22rpx; | |
| 1344 | + color: #a5a5a5; | |
| 1345 | + overflow: hidden; | |
| 1346 | +} | |
| 1347 | + | |
| 1348 | +.xc_goods-img{ | |
| 1349 | + width: 190rpx; | |
| 1350 | + height: 190rpx; | |
| 1351 | +} | |
| 1352 | +.xc_comment-left{ | |
| 1353 | + display:inline-block; | |
| 1354 | + width: 312rpx; | |
| 1355 | + padding: 20rpx; | |
| 1356 | +} | |
| 1357 | +.xc_goods-img-frame{ | |
| 1358 | + border-radius: 0 22rpx 22rpx 0; | |
| 1359 | + overflow: hidden; | |
| 1360 | + /* display:inline-block; */ | |
| 1361 | + /* width: 40%; | |
| 1362 | + height: 90%; | |
| 1363 | + text-align: center; | |
| 1364 | + padding-top: 30rpx; | |
| 1365 | + vertical-align: top; */ | |
| 1366 | +} | |
| 1367 | +.xc_imgs{ | |
| 1368 | + width: 50rpx; | |
| 1369 | + height:50rpx; | |
| 1370 | + border-radius:50%; | |
| 1371 | + margin-right: 5rpx; | |
| 1372 | +} | |
| 1373 | + | |
| 1374 | +.pj_word_size{ font-size: 28rpx} | |
| 1375 | +.pj_scroll{ | |
| 1376 | + /* white-space: nowrap; */ | |
| 1377 | + /* height: 324rpx; */ | |
| 1378 | + /* margin-bottom: 50rpx; */ | |
| 1379 | + display: flex; | |
| 1380 | + align-items: center; | |
| 1381 | + padding: 20rpx 0; | |
| 1382 | + /* box-sizing: border-box; */ | |
| 1383 | + /* box-shadow: 0 8px 12px #e7e9eb; */ | |
| 1384 | +} | |
| 1385 | + | |
| 1386 | + | |
| 1387 | +/*领券*/ | |
| 1388 | +.three-level-word{ | |
| 1389 | + font-size: 25rpx; | |
| 1390 | +} | |
| 1391 | +.four-level-word{ | |
| 1392 | + font-size: 23rpx; | |
| 1393 | +} | |
| 1394 | +.cx-frame{ | |
| 1395 | + /* border-top:3rpx solid #eee; */ | |
| 1396 | + /* width:99%; | |
| 1397 | + height: 95rpx; | |
| 1398 | + line-height: 95rpx; | |
| 1399 | + padding-left:24rpx; */ | |
| 1400 | + padding: 20rpx; | |
| 1401 | +} | |
| 1402 | +.cx-frame .cx-sizs{ | |
| 1403 | + /* width: 68rpx; */ | |
| 1404 | + /* height: 100%; */ | |
| 1405 | + /* line-height: 100rpx; */ | |
| 1406 | + /* overflow: hidden; */ | |
| 1407 | + /* margin-left: 10rpx; */ | |
| 1408 | +} | |
| 1409 | +.xc-coupon-fram{ | |
| 1410 | + position: relative; | |
| 1411 | + margin-right: 16rpx; | |
| 1412 | + /* width:200rpx; */ | |
| 1413 | + /* padding-top:30rpx; */ | |
| 1414 | + | |
| 1415 | +} | |
| 1416 | +.xc-coupon-fram .xc-coupon{ | |
| 1417 | + /* width:175rpx ; | |
| 1418 | + height: 40rpx; | |
| 1419 | + line-height: 40rpx; */ | |
| 1420 | + background-color:#d60021 ; | |
| 1421 | + /* margin:0 auto; */ | |
| 1422 | + color:#fff; | |
| 1423 | + padding: 6rpx 20rpx; | |
| 1424 | + | |
| 1425 | +} | |
| 1426 | +.xc-coupon-fram .xc-circular{ | |
| 1427 | + width: 16rpx; | |
| 1428 | + height:16rpx; | |
| 1429 | + background-color: white; | |
| 1430 | + position:absolute; | |
| 1431 | + top: 50%; | |
| 1432 | + /* left: -10rpx; */ | |
| 1433 | + transform: translateY(-50%); | |
| 1434 | +} | |
| 1435 | +.xc-coupon-fram .xc-one{ | |
| 1436 | + left: -8rpx; | |
| 1437 | +} | |
| 1438 | +.xc-coupon-fram .xc-two{ | |
| 1439 | + right: -8rpx; | |
| 1440 | +} | |
| 1441 | + | |
| 1442 | +.cx-obtain-coupon{ | |
| 1443 | + /* width: 65rpx; | |
| 1444 | + height: 100%; | |
| 1445 | + padding-left:15rpx; */ | |
| 1446 | + color: #d70025; | |
| 1447 | + display: flex; | |
| 1448 | + align-items: center; | |
| 1449 | + /* position: absolute; | |
| 1450 | + right: 5rpx; */ | |
| 1451 | +} | |
| 1452 | + | |
| 1453 | +/* 自定义弹出窗口 */ | |
| 1454 | +.cx-popup{ | |
| 1455 | + width:100%; | |
| 1456 | + background: #fff; | |
| 1457 | + z-index: 35; | |
| 1458 | + border-top-left-radius: 25rpx; | |
| 1459 | + border-top-right-radius: 25rpx; | |
| 1460 | + position:fixed; | |
| 1461 | + bottom:0; | |
| 1462 | +} | |
| 1463 | + | |
| 1464 | +.cx-popup .top{ | |
| 1465 | + /* width: 90%; | |
| 1466 | + height:85rpx; */ | |
| 1467 | + font-size: 32rpx; | |
| 1468 | + padding: 20rpx 0; | |
| 1469 | + border-bottom: 2rpx solid #ebedf0; | |
| 1470 | + /* padding-top: 50rpx; | |
| 1471 | + font-weight:600; */ | |
| 1472 | + | |
| 1473 | +} | |
| 1474 | +.cx-popup .top-frame{ | |
| 1475 | + /* width: 100%; | |
| 1476 | + display: flex; | |
| 1477 | + justify-content: center; | |
| 1478 | + overflow: hidden; */ | |
| 1479 | +} | |
| 1480 | +.xc-valid-coupon{ | |
| 1481 | + width: 90%; | |
| 1482 | + height:40rpx; | |
| 1483 | + padding-top: 24rpx; | |
| 1484 | + overflow: hidden; | |
| 1485 | +} | |
| 1486 | +.xc-frame{ | |
| 1487 | + position: relative; | |
| 1488 | +} | |
| 1489 | +.xc-coupon-frame { | |
| 1490 | + width: 100%; | |
| 1491 | + max-height: 560rpx; | |
| 1492 | + overflow: auto; | |
| 1493 | + | |
| 1494 | +} | |
| 1495 | +.xc-coupon-frame .rel:not(:first-child) { | |
| 1496 | + margin-top: 20rpx; | |
| 1497 | +} | |
| 1498 | +.xc-coupon-frame .coupon { | |
| 1499 | + width:100%; | |
| 1500 | + height: 168rpx; | |
| 1501 | + border-radius: 25rpx; | |
| 1502 | + border:2rpx solid #ffdcdc; | |
| 1503 | + overflow: hidden; | |
| 1504 | + /* margin-top:16rpx; */ | |
| 1505 | + box-sizing: border-box; | |
| 1506 | + | |
| 1507 | +} | |
| 1508 | +/* .xc-coupon-frame .coupon ~ .coupon { | |
| 1509 | + margin-top:16rpx; | |
| 1510 | +} */ | |
| 1511 | +.xc-coupon-left{ | |
| 1512 | + width: 216rpx; | |
| 1513 | + /* height: 100%; */ | |
| 1514 | + background-color: #ffeeef; | |
| 1515 | + border-right: 4rpx dashed #ffdbd9; | |
| 1516 | + overflow: hidden; | |
| 1517 | + /* line-height: 100%; */ | |
| 1518 | + display: flex; | |
| 1519 | + flex-direction: column; | |
| 1520 | + justify-content: center; | |
| 1521 | + align-items: center; | |
| 1522 | + flex-shrink: 0; | |
| 1523 | +} | |
| 1524 | +.xc-money{ | |
| 1525 | + color: #f30026; | |
| 1526 | + text-align:center; | |
| 1527 | +} | |
| 1528 | +.xc-rmb{ | |
| 1529 | + /* width:44rpx; | |
| 1530 | + padding-top:7rpx; */ | |
| 1531 | +} | |
| 1532 | +.xc-money-frame{ | |
| 1533 | + /* margin-left:35rpx; | |
| 1534 | + margin-top:48rpx; */ | |
| 1535 | + | |
| 1536 | +} | |
| 1537 | +.xc-spacing{ | |
| 1538 | + letter-spacing:4rpx; | |
| 1539 | +} | |
| 1540 | +.xc-circular-one{ | |
| 1541 | + position: absolute; | |
| 1542 | + top:-15rpx; | |
| 1543 | + left:205rpx; | |
| 1544 | + width: 30rpx; | |
| 1545 | + height: 30rpx; | |
| 1546 | + background: #fff; | |
| 1547 | + overflow: hidden; | |
| 1548 | +} | |
| 1549 | +.xc-circular-two{ | |
| 1550 | + position: absolute; | |
| 1551 | + bottom: -15rpx; | |
| 1552 | + /* top:150rpx; */ | |
| 1553 | + left:205rpx; | |
| 1554 | + width: 30rpx; | |
| 1555 | + height:30rpx; | |
| 1556 | + background: #fff; | |
| 1557 | +} | |
| 1558 | +.xc-detail-coupon{ | |
| 1559 | + /* margin-left: 22rpx; | |
| 1560 | + overflow: hidden; | |
| 1561 | + padding-top: 43rpx; */ | |
| 1562 | + /* display: flex; | |
| 1563 | + align-items: center; */ | |
| 1564 | +} | |
| 1565 | +.xc-coupon-right{ | |
| 1566 | + /* width: 455rpx; | |
| 1567 | + height: 100%; */ | |
| 1568 | + background: #fffaf9; | |
| 1569 | + padding: 20rpx; | |
| 1570 | + box-sizing: border-box; | |
| 1571 | + width: 100%; | |
| 1572 | + justify-content: space-between; | |
| 1573 | + align-items: center; | |
| 1574 | +} | |
| 1575 | +.xc-below{ | |
| 1576 | + margin-top:20rpx; | |
| 1577 | + | |
| 1578 | +} | |
| 1579 | +.xc-get{ | |
| 1580 | + | |
| 1581 | + width: 140rpx; | |
| 1582 | + /* height: 48rpx; */ | |
| 1583 | + color: #fff; | |
| 1584 | + text-align: center; | |
| 1585 | + border-radius:27rpx; | |
| 1586 | + line-height:54rpx; | |
| 1587 | + /* margin-left:20rpx; */ | |
| 1588 | +} | |
| 1589 | + | |
| 1590 | +.background{ | |
| 1591 | + background:#f40028; | |
| 1592 | +} | |
| 1593 | +/*--不可使用--*/ | |
| 1594 | +.background.nouse{ | |
| 1595 | + background:gainsboro; | |
| 1596 | +} | |
| 1597 | + | |
| 1598 | +.xc-background{ | |
| 1599 | + background:#b9b9b9; | |
| 1600 | +} | |
| 1601 | + | |
| 1602 | + | |
| 1603 | +.cx-confirm{ | |
| 1604 | + width: 100%; | |
| 1605 | + padding: 20rpx; | |
| 1606 | + box-sizing: border-box; | |
| 1607 | + /* height: 160rpx; */ | |
| 1608 | + | |
| 1609 | +} | |
| 1610 | +.cx-confirm .confirm{ | |
| 1611 | + /* width: 372rpx; | |
| 1612 | + height: 60rpx; */ | |
| 1613 | + background-color: #f40026; | |
| 1614 | + color: #fff; | |
| 1615 | + border-radius:10rpx; | |
| 1616 | + line-height: 80rpx; | |
| 1617 | + font-size: 28rpx; | |
| 1618 | + | |
| 1619 | +} | |
| 1620 | + | |
| 1621 | +.up{ animation: up .7s; } | |
| 1622 | +.down{ animation: down 1s; } | |
| 1623 | +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } } | |
| 1624 | +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } } | |
| 1625 | + | |
| 1626 | + | |
| 1627 | +/* 分享 */ | |
| 1628 | +.icon-share { | |
| 1629 | + font-size: 46rpx; | |
| 1630 | + color: #d60021; | |
| 1631 | +} | |
| 1632 | +.xc-share-frame{ | |
| 1633 | + /* width: 129rpx; | |
| 1634 | + height: 48rpx; | |
| 1635 | + border-top-left-radius: 18rpx; | |
| 1636 | + border-bottom-left-radius: 18rpx; */ | |
| 1637 | + /* background: #d60021; */ | |
| 1638 | + /* position:absolute; | |
| 1639 | + left:622rpx; | |
| 1640 | + top:-37rpx; | |
| 1641 | + line-height:50rpx; | |
| 1642 | + margin-top:52rpx; */ | |
| 1643 | +} | |
| 1644 | +.xc-share-frame-jieti{ | |
| 1645 | + width: 129rpx; | |
| 1646 | + height: 48rpx; | |
| 1647 | + border-top-left-radius: 18rpx; | |
| 1648 | + border-bottom-left-radius: 18rpx; | |
| 1649 | + background: #d60021; | |
| 1650 | + line-height:50rpx; | |
| 1651 | +} | |
| 1652 | + | |
| 1653 | +.xc-share-frame .share-font,.xc-share-frame-jieti .share-font{ | |
| 1654 | + font-size: 32rpx; | |
| 1655 | + color:#fff; | |
| 1656 | + margin-left:10rpx; | |
| 1657 | + | |
| 1658 | +} | |
| 1659 | + | |
| 1660 | + | |
| 1661 | +.xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{ | |
| 1662 | + width: 30rpx; | |
| 1663 | + height: 30rpx; | |
| 1664 | + margin-top:9rpx; | |
| 1665 | + margin-left: 10rpx; | |
| 1666 | + | |
| 1667 | +} | |
| 1668 | +.xc-share { | |
| 1669 | + width:90%; | |
| 1670 | + height:800rpx; | |
| 1671 | + background:#fff; | |
| 1672 | + z-index:35; | |
| 1673 | +} | |
| 1674 | +.img-frame{ | |
| 1675 | + position: absolute; | |
| 1676 | + top: 175rpx; | |
| 1677 | + left:100rpx; | |
| 1678 | + z-index: 55; | |
| 1679 | + overflow:hidden; | |
| 1680 | + | |
| 1681 | +} | |
| 1682 | +.img-frame .img{ | |
| 1683 | + width: 100rpx; | |
| 1684 | + height: 100rpx; | |
| 1685 | + | |
| 1686 | +} | |
| 1687 | +.xc-share .top{ | |
| 1688 | + height: 85rpx; | |
| 1689 | + width: 100%; | |
| 1690 | + border-bottom: 4rpx dashed #f5f5f5; | |
| 1691 | + overflow:hidden; | |
| 1692 | + | |
| 1693 | +} | |
| 1694 | +.xc-share .name{ | |
| 1695 | + font-size: 25rpx; | |
| 1696 | + margin-left:180rpx; | |
| 1697 | + color:#000; | |
| 1698 | + | |
| 1699 | +} | |
| 1700 | + | |
| 1701 | +.xc-share .recommend{ | |
| 1702 | + width: 110rpx; | |
| 1703 | + height: 12rpx; | |
| 1704 | + color: #fff; | |
| 1705 | + background: #d60021; | |
| 1706 | + font-size: 20rpx; | |
| 1707 | + border-radius:25rpx; | |
| 1708 | + margin-left:10rpx; | |
| 1709 | + line-height:37rpx; | |
| 1710 | +} | |
| 1711 | +.xc-left-circle{ | |
| 1712 | + width: 40rpx; | |
| 1713 | + height: 25rpx; | |
| 1714 | + position: absolute; | |
| 1715 | + top:280rpx; | |
| 1716 | + left:29rpx; | |
| 1717 | + z-index: 55; | |
| 1718 | + background:#727272; | |
| 1719 | + border-radius:50rpx 50rpx 0 0; | |
| 1720 | + transform:rotate(90deg); | |
| 1721 | + | |
| 1722 | +} | |
| 1723 | +.xc-right-circle{ | |
| 1724 | + width: 40rpx; | |
| 1725 | + height: 25rpx; | |
| 1726 | + position: absolute; | |
| 1727 | + top: 280rpx; | |
| 1728 | + left:683rpx; | |
| 1729 | + z-index: 55; | |
| 1730 | + background:#727272; | |
| 1731 | + border-radius:50rpx 50rpx 0 0; | |
| 1732 | + transform:rotate(270deg); | |
| 1733 | + | |
| 1734 | +} | |
| 1735 | +.xc-circle-frame{ | |
| 1736 | + width: 25rpx; | |
| 1737 | + height: 40rpx; | |
| 1738 | + overflow: hidden; | |
| 1739 | +} | |
| 1740 | +.xc-goods-name{ | |
| 1741 | + width: 95%; | |
| 1742 | + font-size: 35rpx; | |
| 1743 | + padding-left: 75rpx; | |
| 1744 | + height: 50rpx; | |
| 1745 | + padding-top: 10rpx; | |
| 1746 | + color:#000; | |
| 1747 | + | |
| 1748 | +} | |
| 1749 | +.xc-good-img{ | |
| 1750 | + width: 100%; | |
| 1751 | + height: 381rpx; | |
| 1752 | + margin-top:5rpx; | |
| 1753 | + | |
| 1754 | +} | |
| 1755 | +.xc-good-img .img{ | |
| 1756 | + width: 90%; | |
| 1757 | + height: 381rpx; | |
| 1758 | +} | |
| 1759 | +.xc-ensure-frame{ | |
| 1760 | + width: 90%; | |
| 1761 | + height: 60rpx; | |
| 1762 | + border-bottom: 2rpx solid #d8d6d7; | |
| 1763 | +} | |
| 1764 | +.xc-ensure{ | |
| 1765 | + width: 30%; | |
| 1766 | + height: 60rpx; | |
| 1767 | + line-height: 60rpx; | |
| 1768 | +} | |
| 1769 | +xc-ensure-div{ | |
| 1770 | + width: 100%; | |
| 1771 | + height: 60rpx; | |
| 1772 | +} | |
| 1773 | +.xc-ensure .word{ | |
| 1774 | + font-size: 25rpx; | |
| 1775 | + color: #d30025; | |
| 1776 | + margin-left:9rpx; | |
| 1777 | + | |
| 1778 | +} | |
| 1779 | +.xc-ensure .img{ | |
| 1780 | + width: 25rpx; | |
| 1781 | + height: 25rpx; | |
| 1782 | + margin-top:18rpx; | |
| 1783 | + | |
| 1784 | +} | |
| 1785 | + | |
| 1786 | +.xc-bottmon{ | |
| 1787 | + width: 100%; | |
| 1788 | +} | |
| 1789 | +.xc-bottmon .xc-left{ | |
| 1790 | + width: 55%; | |
| 1791 | + margin-top:30rpx; | |
| 1792 | + padding-left:20rpx; | |
| 1793 | + | |
| 1794 | +} | |
| 1795 | +.xc-left .xc-top{ | |
| 1796 | + font-size: 25rpx; | |
| 1797 | + height:40rpx; | |
| 1798 | + line-height:40rpx; | |
| 1799 | + color:#000; | |
| 1800 | +} | |
| 1801 | +.xc-left .xc-middle{ | |
| 1802 | + font-size: 25rpx; | |
| 1803 | + color: #b2b2b2; | |
| 1804 | + height:30rpx; | |
| 1805 | + line-height:30rpx; | |
| 1806 | +} | |
| 1807 | +.xc-left .xc-buttem{ | |
| 1808 | + font-size: 25rpx; | |
| 1809 | + height:100rpx; | |
| 1810 | + line-height:100rpx; | |
| 1811 | + color:#000; | |
| 1812 | +} | |
| 1813 | +.xc-ensure-right{ | |
| 1814 | + width: 30%; | |
| 1815 | +} | |
| 1816 | +.xc-qrcode{ | |
| 1817 | + width:120rpx; | |
| 1818 | + height: 120rpx; | |
| 1819 | + margin-top:43rpx; | |
| 1820 | + margin-left:80rpx; | |
| 1821 | + | |
| 1822 | +} | |
| 1823 | +.xc-close{ | |
| 1824 | + width:50rpx; | |
| 1825 | + height:50rpx; | |
| 1826 | + border-radius:50%; | |
| 1827 | + border:3rpx solid #fff; | |
| 1828 | + text-align:center; | |
| 1829 | + line-height: 41rpx; | |
| 1830 | + font-size:50rpx; | |
| 1831 | + color:#fff; | |
| 1832 | + font-weight: lighter; | |
| 1833 | + font-family:MingLiU; | |
| 1834 | + transform:rotate(270deg); | |
| 1835 | + overflow:auto; | |
| 1836 | + margin-top:6rpx; | |
| 1837 | + margin-bottom:1rpx; | |
| 1838 | + | |
| 1839 | +} | |
| 1840 | +.xc-close-frame{ | |
| 1841 | + position:absolute; | |
| 1842 | + margin-top:30rpx; | |
| 1843 | + width:90%; | |
| 1844 | + display:flex; | |
| 1845 | + justify-content:center; | |
| 1846 | + overflow: auto; | |
| 1847 | + | |
| 1848 | +} | |
| 1849 | +.xc-guanbi{ | |
| 1850 | + width: 100%; | |
| 1851 | + height: 80rpx; | |
| 1852 | + overflow: hidden; | |
| 1853 | +} | |
| 1854 | + | |
| 1855 | + | |
| 1856 | +/* 自定义弹出窗口 */ | |
| 1857 | +.cx-popup{ | |
| 1858 | + width:100%; | |
| 1859 | + background: #fff; | |
| 1860 | + z-index: 35; | |
| 1861 | + border-top-left-radius: 10rpx; | |
| 1862 | + border-top-right-radius: 10rpx; | |
| 1863 | + position:fixed; | |
| 1864 | + bottom:0; | |
| 1865 | +} | |
| 1866 | + | |
| 1867 | +.xc-top-content{ | |
| 1868 | + width: 88%; | |
| 1869 | + height:85rpx; | |
| 1870 | + padding-top: 50rpx; | |
| 1871 | + font-size: 36rpx; | |
| 1872 | +} | |
| 1873 | + | |
| 1874 | + | |
| 1875 | +.xc-valid-coupon{ | |
| 1876 | + width: 90%; | |
| 1877 | + height:40rpx; | |
| 1878 | + padding-top: 24rpx; | |
| 1879 | + overflow: hidden; | |
| 1880 | +} | |
| 1881 | +.xc-frame { | |
| 1882 | + /* width: 100%; | |
| 1883 | + margin-top:20rpx; */ | |
| 1884 | + padding: 20rpx; | |
| 1885 | +} | |
| 1886 | + | |
| 1887 | +.xc-frame .list-frame{ | |
| 1888 | + width: 90%; | |
| 1889 | + height: 100%; | |
| 1890 | + overflow-y:scroll; | |
| 1891 | + | |
| 1892 | + margin-top:20rpx; | |
| 1893 | + | |
| 1894 | +} | |
| 1895 | +.xc-close-frame{ | |
| 1896 | + margin-top:30rpx; | |
| 1897 | + width:15%; | |
| 1898 | + display:flex; | |
| 1899 | +} | |
| 1900 | + | |
| 1901 | +.xc-close{ | |
| 1902 | + width:70rpx; | |
| 1903 | + height:70rpx; | |
| 1904 | + border-radius:50%; | |
| 1905 | + border:5rpx solid #a5a5a7; | |
| 1906 | + text-align:center; | |
| 1907 | + line-height: 55rpx; | |
| 1908 | + font-size:80rpx; | |
| 1909 | + color:#a5a5a7; | |
| 1910 | + font-family:"微软正黑体"; | |
| 1911 | + margin-top:8rpx; | |
| 1912 | + | |
| 1913 | +} | |
| 1914 | +.xc-money{ | |
| 1915 | + color: #ff0013; | |
| 1916 | +} | |
| 1917 | + | |
| 1918 | +.xc-money-frame{ | |
| 1919 | + /* margin-left:35rpx; */ | |
| 1920 | + | |
| 1921 | +} | |
| 1922 | +.xc-coupon-effect{ | |
| 1923 | + width: 99%; | |
| 1924 | + height: 128rpx; | |
| 1925 | + border-bottom:3rpx solid #ddd; | |
| 1926 | + | |
| 1927 | + | |
| 1928 | +} | |
| 1929 | +.xc-goods-coupon{ | |
| 1930 | + width: 80%; | |
| 1931 | + height:100%; | |
| 1932 | + | |
| 1933 | +} | |
| 1934 | +.xc-title{ | |
| 1935 | + width:50%; | |
| 1936 | + margin-left:222rpx; | |
| 1937 | + | |
| 1938 | +} | |
| 1939 | +.xc-coupon-money{ | |
| 1940 | + color: #c91e31; | |
| 1941 | + font-size: 35rpx; | |
| 1942 | + margin-top:20rpx; | |
| 1943 | + | |
| 1944 | +} | |
| 1945 | +.xc-coupon-time{ | |
| 1946 | + height: 50rpx; | |
| 1947 | + font-size: 27rpx; | |
| 1948 | + color: #a4a4a4; | |
| 1949 | +} | |
| 1950 | +.xc-coupon-time .time{ | |
| 1951 | + margin-left: 15rpx; | |
| 1952 | + font-size: 27rpx; | |
| 1953 | +} | |
| 1954 | +.xc-coupon-selection{ | |
| 1955 | + width:99%; | |
| 1956 | + height:100%; | |
| 1957 | + | |
| 1958 | + | |
| 1959 | +} | |
| 1960 | +.xc-confirm { | |
| 1961 | + width: 90%; | |
| 1962 | + height: 75rpx; | |
| 1963 | + margin:0 auto; | |
| 1964 | + background:#c41830; | |
| 1965 | + color:#fff; | |
| 1966 | + border-radius:10rpx; | |
| 1967 | + font-size:30rpx; | |
| 1968 | + margin-top: 50rpx; | |
| 1969 | +} | |
| 1970 | +.xc-not-Selection{ | |
| 1971 | + width: 60rpx; | |
| 1972 | + height: 60rpx; | |
| 1973 | + background: #eeeeee; | |
| 1974 | +} | |
| 1975 | + | |
| 1976 | +/*---------------视频图片---------------*/ | |
| 1977 | +.xc-imageCount { | |
| 1978 | + width:95rpx; | |
| 1979 | + height:50rpx; | |
| 1980 | + background-color: rgba(0, 0, 0, 0.3); | |
| 1981 | + border-radius:40rpx; | |
| 1982 | + line-height:50rpx; | |
| 1983 | + color:#fff; | |
| 1984 | + text-align:center; | |
| 1985 | + font-size:26rpx; | |
| 1986 | + position:absolute; | |
| 1987 | + | |
| 1988 | + right:23rpx; | |
| 1989 | + bottom:21rpx; | |
| 1990 | +} | |
| 1991 | + | |
| 1992 | + | |
| 1993 | +/* 视频图片的边框 */ | |
| 1994 | +.xc-videos-picture{ | |
| 1995 | + width: 100%; | |
| 1996 | + height: 750rpx; | |
| 1997 | +} | |
| 1998 | +/* 视频 */ | |
| 1999 | +.xc-videos{ | |
| 2000 | + width: 100%; | |
| 2001 | + height:544rpx; | |
| 2002 | + | |
| 2003 | + | |
| 2004 | +} | |
| 2005 | +/* 点击视频或图片 */ | |
| 2006 | +.xc-video-picture{ | |
| 2007 | + | |
| 2008 | + bottom: 20rpx; | |
| 2009 | + left: 0rpx; | |
| 2010 | + display: flex; | |
| 2011 | + align-items: center; | |
| 2012 | + justify-content:center; | |
| 2013 | + width: 45%; | |
| 2014 | + height: 60rpx; | |
| 2015 | + margin-left: 215rpx; | |
| 2016 | + | |
| 2017 | +} | |
| 2018 | +.xc-video-button:before{ | |
| 2019 | + content: ""; | |
| 2020 | + position: absolute; | |
| 2021 | + left: 48%; | |
| 2022 | + top: 40%; | |
| 2023 | + width: 0; | |
| 2024 | + height: 0; | |
| 2025 | + margin-left: -36rpx; | |
| 2026 | + margin-top: -10rpx; | |
| 2027 | + border-width:13rpx; | |
| 2028 | + border-style: dashed; | |
| 2029 | + border-color: transparent transparent transparent #fff; | |
| 2030 | + font-size: 0; | |
| 2031 | + line-height: 0; | |
| 2032 | + z-index: 2; | |
| 2033 | + -webkit-backface-visibility: hidden; | |
| 2034 | +} | |
| 2035 | +.xc-video-buttons:before{ | |
| 2036 | + content: ""; | |
| 2037 | + position: absolute; | |
| 2038 | + left: 50%; | |
| 2039 | + top:41%; | |
| 2040 | + width: 0; | |
| 2041 | + height: 0; | |
| 2042 | + margin-left: -36rpx; | |
| 2043 | + margin-top: -10rpx; | |
| 2044 | + border-width:13rpx; | |
| 2045 | + border-style: dashed; | |
| 2046 | + border-color: transparent transparent transparent #000; | |
| 2047 | + font-size: 0; | |
| 2048 | + line-height: 0; | |
| 2049 | + z-index: 2; | |
| 2050 | + -webkit-backface-visibility: hidden; | |
| 2051 | +} | |
| 2052 | + | |
| 2053 | +.xc-video{ | |
| 2054 | + /* width:100rpx; */ | |
| 2055 | + /* height: 50rpx; | |
| 2056 | + line-height: 50rpx; */ | |
| 2057 | + text-align: center; | |
| 2058 | + /* margin-left:-30rpx; */ | |
| 2059 | + | |
| 2060 | + | |
| 2061 | +} | |
| 2062 | +/* 图片 */ | |
| 2063 | +.xc-picture{ | |
| 2064 | + color: #000; | |
| 2065 | + background: #dcdcdc; | |
| 2066 | + width: 94rpx; | |
| 2067 | + height: 45rpx; | |
| 2068 | + font-size: 25rpx; | |
| 2069 | + border-radius: 25rpx; | |
| 2070 | + font-family: 'SimHei',Arial; | |
| 2071 | + text-align: center; | |
| 2072 | + line-height: 45rpx; | |
| 2073 | + margin-left:53rpx | |
| 2074 | + | |
| 2075 | +} | |
| 2076 | +/* 点击视频 */ | |
| 2077 | +.xc-video-button{ | |
| 2078 | + position: relative; | |
| 2079 | + color: #000; | |
| 2080 | + background: #dcdcdc; | |
| 2081 | + width: 85rpx; | |
| 2082 | + height: 45rpx; | |
| 2083 | + line-height: 45rpx; | |
| 2084 | + font-size: 30rpx; | |
| 2085 | + border-radius: 25rpx; | |
| 2086 | + font-family: 'SimHei',Arial; | |
| 2087 | + padding-left: 11rpx; | |
| 2088 | +} | |
| 2089 | + | |
| 2090 | + | |
| 2091 | +.xc-sn{ | |
| 2092 | + color: #fff; | |
| 2093 | + background: #c7161e; | |
| 2094 | + border-color: transparent transparent transparent #fff; | |
| 2095 | +} | |
| 2096 | +/* 图片 */ | |
| 2097 | +.xc-pictures{ | |
| 2098 | + width: 100%; | |
| 2099 | + height:529rpx; | |
| 2100 | + | |
| 2101 | +} | |
| 2102 | +/*视频封面的图片 */ | |
| 2103 | +.xc-picturess{ | |
| 2104 | + position: relative; | |
| 2105 | + width: 100%; | |
| 2106 | + height:529rpx; | |
| 2107 | +} | |
| 2108 | +/* 播放 */ | |
| 2109 | +.xc-play{ | |
| 2110 | + width: 130rpx; | |
| 2111 | + height: 130rpx; | |
| 2112 | + position: absolute; | |
| 2113 | + top:207rpx; | |
| 2114 | + left:309rpx; | |
| 2115 | +} | |
| 2116 | + | |
| 2117 | +.xc-video-buttons{ | |
| 2118 | + position: relative; | |
| 2119 | + color: #000; | |
| 2120 | + background: #dcdcdc; | |
| 2121 | + width: 85rpx; | |
| 2122 | + height: 45rpx; | |
| 2123 | + line-height: 45rpx; | |
| 2124 | + font-size: 30rpx; | |
| 2125 | + border-radius: 25rpx; | |
| 2126 | + font-family: 'SimHei',Arial; | |
| 2127 | + padding-left: 11rpx; | |
| 2128 | +} | |
| 2129 | + | |
| 2130 | + | |
| 2131 | +.wsize{font-size: 32rpx} | |
| 2132 | +.five-level-word{font-size: 24rpx;} | |
| 2133 | + | |
| 2134 | + | |
| 2135 | +/*-- 推荐商品 --*/ | |
| 2136 | +.xc-goods{ | |
| 2137 | + height: auto; | |
| 2138 | + background: #f2f2f2; | |
| 2139 | + padding: 0 20rpx; | |
| 2140 | + margin-top: -25rpx; | |
| 2141 | + padding-bottom: 20rpx | |
| 2142 | +} | |
| 2143 | + | |
| 2144 | +.xc-goods-recommend { | |
| 2145 | + border-radius: 20rpx; | |
| 2146 | + width:345rpx; | |
| 2147 | + height: 450rpx; | |
| 2148 | + margin-top: 25rpx; | |
| 2149 | + display: inline-block; | |
| 2150 | + | |
| 2151 | +} | |
| 2152 | + | |
| 2153 | +.xc-goods-recommend.ml{ margin-left: 22rpx} | |
| 2154 | + | |
| 2155 | +.xc-goods-recommend .xc-goods-imgs{ | |
| 2156 | + width: 100%; | |
| 2157 | + height: 325rpx; | |
| 2158 | + border-radius:20rpx 20rpx 0 0; | |
| 2159 | +} | |
| 2160 | + | |
| 2161 | +.xc-goods-bottom{ | |
| 2162 | + width: 345rpx; | |
| 2163 | + height: 134rpx; | |
| 2164 | + background: #fff; | |
| 2165 | + border-radius:0 0 20rpx 20rpx; | |
| 2166 | + bottom:-8rpx; | |
| 2167 | + left:0rpx; | |
| 2168 | +} | |
| 2169 | +.xc-goods-bottom .monry-frame{ | |
| 2170 | + width:283rpx; | |
| 2171 | +height:52rpx; | |
| 2172 | +padding-left:24rpx; | |
| 2173 | + | |
| 2174 | +} | |
| 2175 | +.xc-good-explain{ | |
| 2176 | + width: 283rpx; | |
| 2177 | + height:60rpx; | |
| 2178 | + word-break: normal; | |
| 2179 | + margin-left:30rpx; | |
| 2180 | + font-size: 26rpx; | |
| 2181 | + line-height: 30rpx; | |
| 2182 | + margin-top: 5rpx; | |
| 2183 | +} | |
| 2184 | +.money-color-val{ | |
| 2185 | + color: #c6172f; | |
| 2186 | +} | |
| 2187 | +.rmb-symbol{ | |
| 2188 | + line-height:81rpx; | |
| 2189 | + height:53rpx; | |
| 2190 | + font-size: 28rpx; | |
| 2191 | +} | |
| 2192 | +.xc-original-price{ | |
| 2193 | + color: #c0c0c0; | |
| 2194 | +} | |
| 2195 | +/* 文字中间加线条 */ | |
| 2196 | +.word-lines{ | |
| 2197 | + text-decoration:line-through; | |
| 2198 | + line-height:90rpx; | |
| 2199 | + margin-left:10rpx; | |
| 2200 | + font-size: 20rpx; | |
| 2201 | +} | |
| 2202 | + | |
| 2203 | + .xc-linellae-frame{ | |
| 2204 | + width: 100%; | |
| 2205 | + height: 80rpx; | |
| 2206 | + background: #f2f2f2; | |
| 2207 | +} | |
| 2208 | +.xc-linellae-frame .xc-linellae{ | |
| 2209 | + width: 386rpx; | |
| 2210 | + height: 1rpx; | |
| 2211 | + border-bottom: 1rpx solid #ebedf0; | |
| 2212 | +} | |
| 2213 | +.xc-recommend-frame{ | |
| 2214 | +background:#f2f2f2; | |
| 2215 | +width:97rpx; | |
| 2216 | +height:100%; | |
| 2217 | +padding-left: 10rpx; | |
| 2218 | +} | |
| 2219 | +.xc-recommend-frame .xc-recommend{ | |
| 2220 | + width: 35rpx; | |
| 2221 | + height: 27rpx; | |
| 2222 | +} | |
| 2223 | +.xc-recommend-frame .xc-recommend-word{ | |
| 2224 | + width:58rpx; | |
| 2225 | +font-size:24rpx; | |
| 2226 | +color: #a9a9a9; | |
| 2227 | +margin-left: 5rpx; | |
| 2228 | +margin-bottom: 5rpx; | |
| 2229 | +margin-top: 1rpx; | |
| 2230 | + | |
| 2231 | +} | |
| 2232 | +.xc-price-frame{ | |
| 2233 | + color: #ec0022; | |
| 2234 | + align-items: baseline; | |
| 2235 | +/* height:44rpx; */ | |
| 2236 | +} | |
| 2237 | +.xc-price-frame .sign{ | |
| 2238 | +margin-top:19rpx; | |
| 2239 | +margin-left:-4px; | |
| 2240 | +} | |
| 2241 | +.xc-val-price{ | |
| 2242 | +margin-left:24rpx; | |
| 2243 | +color: #ec0022; | |
| 2244 | +padding-top:13rpx; | |
| 2245 | +} | |
| 2246 | +.xc-val-price .save{ | |
| 2247 | + border-radius:10rpx; | |
| 2248 | + margin-top:5rpx; | |
| 2249 | + background:#fed2d9; | |
| 2250 | + min-width:230rpx; | |
| 2251 | + height:40rpx; | |
| 2252 | + line-height:40rpx; | |
| 2253 | + width: auto; | |
| 2254 | + padding-left:12rpx; | |
| 2255 | + padding-right:12rpx; | |
| 2256 | + | |
| 2257 | +} | |
| 2258 | +.xc-unit-price{ | |
| 2259 | + margin-top:25rpx; | |
| 2260 | +padding-left:-4rpx; | |
| 2261 | + | |
| 2262 | +} | |
| 2263 | +.xc-explain{ | |
| 2264 | + color:#292929; | |
| 2265 | + width:542rpx; | |
| 2266 | + margin: 10rpx 0 20rpx; | |
| 2267 | + width: 100%; | |
| 2268 | + font-weight: bold; | |
| 2269 | +} | |
| 2270 | +.xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;} | |
| 2271 | +.xc-item .yuan{ | |
| 2272 | + width: 38rpx; | |
| 2273 | + height: 38rpx; | |
| 2274 | + line-height: 38rpx; | |
| 2275 | + border:1rpx solid #f3f1f2; | |
| 2276 | +margin-left:33rpx; | |
| 2277 | + | |
| 2278 | +} | |
| 2279 | +.xc-item .word{ | |
| 2280 | + width:104rpx; | |
| 2281 | + margin-top:16rpx; | |
| 2282 | + color:#363636; | |
| 2283 | + font-weight:600; | |
| 2284 | + | |
| 2285 | +} | |
| 2286 | +.xc-item .circle-color{ | |
| 2287 | + background: #d60024; | |
| 2288 | + color: #fff; | |
| 2289 | +} | |
| 2290 | +.xc-item .circle-color1{ | |
| 2291 | + background: #fefefe; | |
| 2292 | + color: #666666; | |
| 2293 | +} | |
| 2294 | +.link{ | |
| 2295 | +height:6rpx; | |
| 2296 | +width:180rpx; | |
| 2297 | +top:54rpx; | |
| 2298 | +left:32px; | |
| 2299 | +} | |
| 2300 | +.link1{ | |
| 2301 | +height:6rpx; | |
| 2302 | +width:166rpx; | |
| 2303 | +top:54rpx; | |
| 2304 | +left:264rpx; | |
| 2305 | +} | |
| 2306 | +.link2{ | |
| 2307 | + height:6rpx; | |
| 2308 | +width:157rpx; | |
| 2309 | +top:54rpx; | |
| 2310 | +right:87rpx; | |
| 2311 | +} | |
| 2312 | +.link-color-red{ | |
| 2313 | + background: #d60024;} | |
| 2314 | +.link-color{ | |
| 2315 | + background: #e5e5e5; | |
| 2316 | +} | |
| 2317 | +.xc-qt-price{ | |
| 2318 | + top:-15rpx; | |
| 2319 | +left:25rpx; | |
| 2320 | + color: #fff; | |
| 2321 | +} | |
| 2322 | +.xc-qt-price .xc-qtunit-price{ | |
| 2323 | + margin-left:6rpx; | |
| 2324 | +margin-top:-4rpx; | |
| 2325 | +} | |
| 2326 | +.xc-nanber{ | |
| 2327 | + top:-25rpx; | |
| 2328 | +left:289rpx; | |
| 2329 | + | |
| 2330 | +} | |
| 2331 | +.xc-qtsign{ | |
| 2332 | +margin-top:5rpx; | |
| 2333 | + | |
| 2334 | +} | |
| 2335 | +.xc-people-img{ | |
| 2336 | + height: 36rpx; | |
| 2337 | + width: 36rpx; | |
| 2338 | + background: #fff; | |
| 2339 | + border-radius: 7rpx; | |
| 2340 | + | |
| 2341 | +} | |
| 2342 | +.xc-people-img .imgs{ | |
| 2343 | + width: 28rpx; | |
| 2344 | + height: 28rpx; | |
| 2345 | + margin-top:4rpx; | |
| 2346 | + | |
| 2347 | +} | |
| 2348 | +.xc-people-val{ | |
| 2349 | + | |
| 2350 | + height: 32rpx; | |
| 2351 | + border-top: 1rpx solid #fff; | |
| 2352 | + border-bottom: 1rpx solid #fff; | |
| 2353 | + border-right: 1rpx solid #fff; | |
| 2354 | + border-radius:0 7rpx 7rpx 0; | |
| 2355 | + line-height:32rpx; | |
| 2356 | + margin-left:-6rpx; | |
| 2357 | + padding: 0 12rpx; | |
| 2358 | +} | |
| 2359 | +.word-color{ | |
| 2360 | + color:#d70024; | |
| 2361 | +} | |
| 2362 | +.word-color-lan{ | |
| 2363 | + color:#0393e1; | |
| 2364 | +} | |
| 2365 | +.pt_view .hy-stop{ | |
| 2366 | + top: -23rpx; | |
| 2367 | + right: 56rpx; | |
| 2368 | +} | |
| 2369 | +.xc-time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;} | |
| 2370 | +.xc-time{margin-right:10rpx; margin-left:10rpx; margin-top:-32rpx; | |
| 2371 | +} | |
| 2372 | +.xc-goods-explain{ | |
| 2373 | + width:100%; | |
| 2374 | + /* padding-left:30rpx; | |
| 2375 | + margin-left:-9rpx; | |
| 2376 | + height: 150rpx */ | |
| 2377 | +} | |
| 2378 | +.xc-partner-frame{ | |
| 2379 | +border-bottom:2rpx solid #eee; | |
| 2380 | +width:100%; | |
| 2381 | +padding:20rpx; | |
| 2382 | +/* height:56rpx; */ | |
| 2383 | +box-sizing: border-box; | |
| 2384 | +} | |
| 2385 | +.xc-person-number{ | |
| 2386 | + width:120rpx; | |
| 2387 | + color: #999999; | |
| 2388 | + padding-left:8rpx; | |
| 2389 | + text-align: left | |
| 2390 | +} | |
| 2391 | + | |
| 2392 | +.xc-miaosha-time{ | |
| 2393 | +right:17rpx; top:55rpx; | |
| 2394 | +} | |
| 2395 | +.pd_top1{padding-top: 10rpx} | |
| 2396 | +.s_ms_bth{margin-top: 85rpx} | |
| 2397 | + | |
| 2398 | + | |
| 2399 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx} | |
| 2400 | +/* 门店地址 */ | |
| 2401 | +.xc-address_frame{ | |
| 2402 | + /* border-top:1rpx solid #eee; */ | |
| 2403 | + width: 100%; | |
| 2404 | + height: auto; | |
| 2405 | + padding: 20rpx; | |
| 2406 | + box-sizing: border-box; | |
| 2407 | +} | |
| 2408 | +.on_height{ | |
| 2409 | +height: 90rpx; | |
| 2410 | +} | |
| 2411 | +.sn_height{ | |
| 2412 | + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */ | |
| 2413 | +} | |
| 2414 | +.xc-address_frame .address_frame{ | |
| 2415 | + width: 100%; | |
| 2416 | +/* padding-left: 10rpx; | |
| 2417 | +margin: auto; */ | |
| 2418 | + | |
| 2419 | +} | |
| 2420 | + | |
| 2421 | +.stores-img{ | |
| 2422 | + width: 28rpx; | |
| 2423 | + height: 28rpx; | |
| 2424 | + margin-right: 10rpx; | |
| 2425 | +} | |
| 2426 | +.shop_name{ | |
| 2427 | + margin-right: 10rpx; | |
| 2428 | + max-width: 370rpx; | |
| 2429 | +} | |
| 2430 | +.address{ | |
| 2431 | + /* width: 100%; | |
| 2432 | + margin-top: 5rpx; | |
| 2433 | + margin-bottom: 5rpx; */ | |
| 2434 | +} | |
| 2435 | +.distance{ | |
| 2436 | + padding-left: 20rpx; | |
| 2437 | + padding-right: 20rpx; | |
| 2438 | + background: #eee; | |
| 2439 | + border-radius: 20rpx; | |
| 2440 | + /* margin-right: 5rpx; */ | |
| 2441 | + color: #999; | |
| 2442 | + height: 38rpx; | |
| 2443 | +line-height: 38rpx; | |
| 2444 | + | |
| 2445 | +} | |
| 2446 | +/* 选择门店的弹窗 */ | |
| 2447 | +.mongolia-layer{ | |
| 2448 | + position: fixed; | |
| 2449 | +left: 0; | |
| 2450 | +top: 0; | |
| 2451 | +right: 0; | |
| 2452 | +bottom: 0; | |
| 2453 | +z-index: 11; | |
| 2454 | +background: rgba(0,0,0,0.4); | |
| 2455 | +width: 100%; | |
| 2456 | +height: 91.9%; | |
| 2457 | + | |
| 2458 | +} | |
| 2459 | + | |
| 2460 | +.popup-frame{ | |
| 2461 | + position: fixed; | |
| 2462 | +bottom:99rpx; | |
| 2463 | +z-index: 20; | |
| 2464 | +background: white; | |
| 2465 | +width: 100%; | |
| 2466 | +border-radius: 20rpx 20rpx 0 0; | |
| 2467 | +height: 72%; | |
| 2468 | +bottom: 0; | |
| 2469 | +} | |
| 2470 | +.popup-top{ | |
| 2471 | + border-bottom: 1rpx solid #eee; | |
| 2472 | + height: 155rpx; | |
| 2473 | + width: 95%; | |
| 2474 | + margin: auto; | |
| 2475 | + line-height: 155rpx; | |
| 2476 | + | |
| 2477 | +} | |
| 2478 | +.bg_rights{ | |
| 2479 | + border-top: 2rpx solid ; | |
| 2480 | + border-right: 2rpx solid ; | |
| 2481 | + transform: rotate(45deg); | |
| 2482 | + display:inline-block; | |
| 2483 | + width:15rpx;height:15rpx; | |
| 2484 | + border-color:#da0b31; | |
| 2485 | +} | |
| 2486 | +.modal-closes { | |
| 2487 | + position: absolute; | |
| 2488 | + right: 30rpx; | |
| 2489 | + top: -15rpx; | |
| 2490 | + height: 25rpx; | |
| 2491 | + | |
| 2492 | +} | |
| 2493 | +.choose_more{ | |
| 2494 | + margin-top: 40rpx; | |
| 2495 | + margin-right: 20rpx; | |
| 2496 | + | |
| 2497 | +} | |
| 2498 | +.choose_mores{ | |
| 2499 | + margin-top: 30rpx; | |
| 2500 | + margin-right: 15rpx; | |
| 2501 | + | |
| 2502 | +} | |
| 2503 | +.store-list{ | |
| 2504 | + width: 95%; | |
| 2505 | + height: 60%; | |
| 2506 | + overflow-y: scroll; | |
| 2507 | + margin: auto; | |
| 2508 | +} | |
| 2509 | +.store-list .store_choose{ | |
| 2510 | + width: 100%; | |
| 2511 | + height: 120rpx; | |
| 2512 | + line-height: 125rpx; | |
| 2513 | + border-bottom: 1rpx solid #eee; | |
| 2514 | + | |
| 2515 | +} | |
| 2516 | +.store-list .store_choose .store{ | |
| 2517 | +width: 100%; | |
| 2518 | +margin: auto; | |
| 2519 | +line-height: 37rpx; | |
| 2520 | +padding-left: 20rpx; | |
| 2521 | + | |
| 2522 | +} | |
| 2523 | +.xc-hook{ | |
| 2524 | + width: 35rpx; | |
| 2525 | + height: 35rpx; | |
| 2526 | + transform: rotate(-145deg); | |
| 2527 | +line-height: 37rpx; | |
| 2528 | +text-align: center; | |
| 2529 | +} | |
| 2530 | + .xc-hooks{ | |
| 2531 | + width: 30rpx; | |
| 2532 | + height: 30rpx; | |
| 2533 | + border: 1rpx solid #999; | |
| 2534 | + } | |
| 2535 | + .address-frame{ | |
| 2536 | + width: 93%; | |
| 2537 | +margin-left: 7rpx; | |
| 2538 | + | |
| 2539 | + } | |
| 2540 | + .nearby_store{ | |
| 2541 | +margin-left: 17rpx; | |
| 2542 | + } | |
| 2543 | + .address_name{ | |
| 2544 | + margin-right: 10rpx; | |
| 2545 | + max-width: 390rpx; | |
| 2546 | + | |
| 2547 | + } | |
| 2548 | + .address-val{ | |
| 2549 | + height: 38rpx; | |
| 2550 | +line-height: 38rpx; | |
| 2551 | + | |
| 2552 | + } | |
| 2553 | + .store-bottom{ | |
| 2554 | + width: 85%; | |
| 2555 | + margin: auto; | |
| 2556 | + height: 70rpx; | |
| 2557 | + } | |
| 2558 | + .determine{ | |
| 2559 | + width: 260rpx; | |
| 2560 | + height: 55rpx; | |
| 2561 | + border-radius: 50rpx; | |
| 2562 | + line-height: 55rpx; | |
| 2563 | + } | |
| 2564 | + .default{ | |
| 2565 | + width: 260rpx; | |
| 2566 | + height: 55rpx; | |
| 2567 | + border:3rpx solid #c8c8c8; | |
| 2568 | + border-radius: 50rpx; | |
| 2569 | + line-height: 55rpx; | |
| 2570 | + } | |
| 2571 | + .store-bottom-frame{ | |
| 2572 | + width: 95%; | |
| 2573 | + margin: auto; | |
| 2574 | + | |
| 2575 | + } | |
| 2576 | + /* 门店分类列表 */ | |
| 2577 | +.sort_store_list{ | |
| 2578 | + max-height: 700rpx; | |
| 2579 | + overflow: hidden; | |
| 2580 | + overflow-y: scroll; | |
| 2581 | + width: 95%; | |
| 2582 | + margin: auto; | |
| 2583 | +} | |
| 2584 | +.sort_store_list .sort-store-frame{ | |
| 2585 | + width: 100%; | |
| 2586 | +height: 100rpx; | |
| 2587 | +line-height:100rpx; | |
| 2588 | +border-bottom: 1rpx solid #eee; | |
| 2589 | + | |
| 2590 | +} | |
| 2591 | +.sort_store_list .sort-store-frame .sort-store{ | |
| 2592 | + width: 94.5%; | |
| 2593 | + margin: auto; | |
| 2594 | +} | |
| 2595 | +.black_rights-frame{ | |
| 2596 | +width: 50%; | |
| 2597 | +} | |
| 2598 | +.black_rights-frame .black_rights{ | |
| 2599 | + border-top: 3rpx solid; | |
| 2600 | +border-right: 3rpx solid; | |
| 2601 | +transform: rotate(45deg); | |
| 2602 | +display: inline-block; | |
| 2603 | +width: 20rpx; | |
| 2604 | +height: 20rpx; | |
| 2605 | +} | |
| 2606 | +.xc-val-money{ | |
| 2607 | + height:55rpx; | |
| 2608 | +} | |
| 2609 | + | |
| 2610 | +.xc-distance-bottom{ | |
| 2611 | + margin-bottom: 40rpx; | |
| 2612 | +} | |
| 2613 | +.xc-distance-top{ | |
| 2614 | +margin-top: 10rpx; | |
| 2615 | +} | |
| 2616 | +.xc-width{ | |
| 2617 | + width: 100%; | |
| 2618 | +} | |
| 2619 | +.right-arrow{ width: 15rpx; height:15rpx; | |
| 2620 | + border-top: 2rpx solid #d70026; | |
| 2621 | + border-right: 2rpx solid #d70026; | |
| 2622 | + transform: rotate(45deg);display:inline-block; | |
| 2623 | + margin-bottom:3rpx; | |
| 2624 | +} | |
| 2625 | +.xc-goods-attribute{ | |
| 2626 | + border-bottom: 1px solid #eee; | |
| 2627 | +padding-bottom: 20rpx; | |
| 2628 | +/* margin-bottom:40rpx; */ | |
| 2629 | +} | |
| 2630 | +.xc-val-fream{ | |
| 2631 | + width: 105rpx; | |
| 2632 | +} | |
| 2633 | +.is_stock{ | |
| 2634 | +width: 58%; | |
| 2635 | +height: 70rpx; | |
| 2636 | +border-radius: 55rpx; | |
| 2637 | +} | |
| 2638 | +.select_store_height{ | |
| 2639 | + height: 50rpx; | |
| 2640 | +} | |
| 2641 | +.butttem5{ | |
| 2642 | + margin-bottom: 5rpx; | |
| 2643 | +} | |
| 2644 | + | |
| 2645 | +.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx} | |
| 2646 | + | |
| 2647 | + | |
| 2648 | +.join-cart>view.no_store { | |
| 2649 | + width: 58%; background-color: #adadad; | |
| 2650 | +} | |
| 2651 | + | |
| 2652 | +.s_btn{ margin-top: 25rpx; } | |
| 2653 | +/* 美妆价的样式 */ | |
| 2654 | +.beauty-makeup-frame{ | |
| 2655 | + /* width: 101.5%; | |
| 2656 | + margin: auto; */ | |
| 2657 | + height: 120rpx; | |
| 2658 | + border-radius: 15rpx; | |
| 2659 | + margin-top: 10px; | |
| 2660 | + | |
| 2661 | +} | |
| 2662 | +.beauty-makeup-frame .left{ | |
| 2663 | + width: 80%; | |
| 2664 | + height: 100%; | |
| 2665 | + background:#f7f7f7; | |
| 2666 | + border-radius: 20rpx 0rpx 0rpx 20rpx; | |
| 2667 | + /* padding: 0 10rpx; */ | |
| 2668 | +} | |
| 2669 | + .card-frame{ | |
| 2670 | + margin-top: 0rpx; | |
| 2671 | + /* padding-right: 23rpx; | |
| 2672 | + margin-right: 15rpx; */ | |
| 2673 | +} | |
| 2674 | +.advert-card{ | |
| 2675 | + margin-top: 0rpx!important; | |
| 2676 | + | |
| 2677 | +} | |
| 2678 | +.beauty-makeup-frame .right{ | |
| 2679 | + width: 20%; | |
| 2680 | + height: 100%; | |
| 2681 | + background:#f3efe3; | |
| 2682 | + border-radius: 0rpx 20rpx 20rpx 0rpx; | |
| 2683 | + } | |
| 2684 | +.grade-card-frame{ | |
| 2685 | + | |
| 2686 | + /* height:45rpx ; */ | |
| 2687 | + background: #3c300a; | |
| 2688 | + border-radius: 20rpx; | |
| 2689 | + /* margin-top: 10px; | |
| 2690 | + margin-left: 7rpx; */ | |
| 2691 | + justify-content: center; | |
| 2692 | + padding: 4rpx 12rpx; | |
| 2693 | +} | |
| 2694 | +.grade-card-frame .img{ | |
| 2695 | + width: 24rpx; | |
| 2696 | + height: 24rpx; | |
| 2697 | + margin-top: 2px; | |
| 2698 | + | |
| 2699 | +} | |
| 2700 | +.grade-card-frame .card-name{ | |
| 2701 | + margin-left: 8rpx; | |
| 2702 | + /* max-width: 120rpx; */ | |
| 2703 | + max-width: 165rpx; | |
| 2704 | +} | |
| 2705 | +.card-effect{ | |
| 2706 | + /* margin-left: 15rpx; */ | |
| 2707 | +} | |
| 2708 | +.at_once_carde{ | |
| 2709 | + width:65rpx; | |
| 2710 | + height: 75rpx; | |
| 2711 | + line-height:38rpx; | |
| 2712 | +} | |
| 2713 | +.bg_right{ width: 18rpx; height:18rpx; | |
| 2714 | + border-top: 2rpx solid #333; | |
| 2715 | + border-right: 2rpx solid #333; | |
| 2716 | + transform: rotate(45deg);display:inline-block; | |
| 2717 | + margin-bottom:3rpx; | |
| 2718 | + | |
| 2719 | +} | |
| 2720 | +.carde_frame{ | |
| 2721 | + height: 50rpx; | |
| 2722 | + line-height: 18rpx | |
| 2723 | +} | |
| 2724 | + | |
| 2725 | +button.custom-service { line-height: normal; border: 0;} | |
| 2726 | +button.custom-service::after{ | |
| 2727 | + border: 0; | |
| 2728 | +} | |
| 2729 | +.no_store{color:#d60021; font-size: 26rpx;} | |
| 2730 | +.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ } | |
| 2731 | +.cx_show_view .word{ width: 400rpx} | |
| 2732 | +.prom_condition { | |
| 2733 | + color: #d60021; | |
| 2734 | + /* width: 180rpx; */ | |
| 2735 | + /* height: 30rpx; */ | |
| 2736 | + font-size: 20rpx; | |
| 2737 | + /* padding-top: 0.01rpx; */ | |
| 2738 | + /* display: flex; | |
| 2739 | + justify-content: center; | |
| 2740 | + align-items: center; */ | |
| 2741 | + border: 2rpx solid #d60021; | |
| 2742 | + border-radius: 10rpx; | |
| 2743 | + margin-right:10rpx ; | |
| 2744 | + /* margin-left: 10rpx; */ | |
| 2745 | + font-size: 24rpx; | |
| 2746 | + padding: 0 10rpx; | |
| 2747 | +} | |
| 2748 | +.hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx} | |
| 2749 | +.order_hui{color: #444; width: 420rpx} | |
| 2750 | +.order_hui view{ height: 34rpx; line-height: 34rpx;} | |
| 2751 | +.dp_img{width: 240rpx; height: 240rpx; margin: 0 40rpx} | |
| 2752 | +.dp_cx_view{border-bottom: 0.02rpx solid #eee; padding-bottom: 40rpx} | |
| 2753 | +.act_content{ margin-top: 40rpx} | |
| 2754 | +.act_content view{ margin-bottom: 12rpx} | |
| 2755 | +.color_b{color: #ff9c00} | |
| 2756 | + | |
| 2757 | +.poster-container { | |
| 2758 | + box-sizing: border-box; | |
| 2759 | + position: fixed; | |
| 2760 | + top: 50%; | |
| 2761 | + left: 50%; | |
| 2762 | + transform: translate(-50%, -50%); | |
| 2763 | + width: calc(100% - 120rpx); | |
| 2764 | + z-index: 1000; | |
| 2765 | +} | |
| 2766 | +.mask { | |
| 2767 | + position: fixed; | |
| 2768 | + top: 0; | |
| 2769 | + left: 0; | |
| 2770 | + width: 100%; | |
| 2771 | + height: 100%; | |
| 2772 | + z-index: 999; | |
| 2773 | + background-color: rgba(0,0,0,.4); | |
| 2774 | +} | |
| 2775 | +.poster-wrapper { | |
| 2776 | + width: 100%; | |
| 2777 | +} | |
| 2778 | + | |
| 2779 | +.poster { | |
| 2780 | + box-sizing: border-box; | |
| 2781 | + width: 100%; | |
| 2782 | + height: 1055rpx; | |
| 2783 | + border-radius: 20rpx; | |
| 2784 | + /* box-shadow: 0 8px 12px #666; */ | |
| 2785 | + position: relative; | |
| 2786 | + z-index: 999; | |
| 2787 | + overflow: hidden; | |
| 2788 | +} | |
| 2789 | +.poster-img { | |
| 2790 | + display: block; | |
| 2791 | + width: 100%; | |
| 2792 | + height: 100%; | |
| 2793 | +} | |
| 2794 | +.btn-container { | |
| 2795 | + display: flex; | |
| 2796 | + justify-content: space-around; | |
| 2797 | +} | |
| 2798 | +.btn-share { | |
| 2799 | + display: block; | |
| 2800 | + background-color: #FE6867; | |
| 2801 | + color: white; | |
| 2802 | + border-radius: 8rpx; | |
| 2803 | + line-height: 80rpx; | |
| 2804 | + margin-top: 28rpx; | |
| 2805 | + padding: 0 60rpx; | |
| 2806 | +} | |
| 2807 | +/* .btn-close { | |
| 2808 | + background-color: rgba(0,0,0,.5); | |
| 2809 | + color: white; | |
| 2810 | + width: 40rpx; | |
| 2811 | + height: 40rpx; | |
| 2812 | + line-height: 40rpx; | |
| 2813 | + text-align: center; | |
| 2814 | + border-radius: 50%; | |
| 2815 | + position: absolute; | |
| 2816 | + right: 20rpx; | |
| 2817 | + top: 10rpx; | |
| 2818 | +} */ | |
| 2819 | + | |
| 2820 | +.goods-price .rel_txt{ | |
| 2821 | + position: relative; top: 32rpx; font-size: 30rpx; | |
| 2822 | +} | |
| 2823 | +.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 12rpx;} | |
| 2824 | + | |
| 2825 | +.btn-close { | |
| 2826 | + /* background-color: rgba(0,0,0,.5); */ | |
| 2827 | + color: #ccc; | |
| 2828 | + width: 50rpx; | |
| 2829 | + height: 50rpx; | |
| 2830 | + line-height: 50rpx; | |
| 2831 | + text-align: center; | |
| 2832 | + border-radius: 50%; | |
| 2833 | + position: absolute; | |
| 2834 | + right: 20rpx; | |
| 2835 | + top: 20rpx; | |
| 2836 | +} | |
| 2837 | + | |
| 2838 | +.icon-close { | |
| 2839 | + font-size: 48rpx; | |
| 2840 | +} | |
| 2841 | +.quan_price{ | |
| 2842 | + background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx; | |
| 2843 | +} | |
| 2844 | + | |
| 2845 | +/*--闪白屏--*/ | |
| 2846 | +.g_img_box{ | |
| 2847 | + background-position: center center; | |
| 2848 | + background-repeat: no-repeat; | |
| 2849 | + -webkit-background-size: cover; | |
| 2850 | + -moz-background-size: cover; | |
| 2851 | + background-size: cover; | |
| 2852 | +} | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | +.arrow { | |
| 2857 | + width: auto !important; | |
| 2858 | + position: absolute; | |
| 2859 | + right: 0; | |
| 2860 | + top: 50%; | |
| 2861 | + transform: translateY(-50%); | |
| 2862 | +} | |
| 2863 | + | |
| 2864 | +.stock { | |
| 2865 | + flex: 1; | |
| 2866 | +} | |
| 2867 | + | |
| 2868 | +.gray{ background-color: #dcdcdc !important;} | |
| 2869 | + | |
| 2870 | + | |
| 2871 | +.card, | |
| 2872 | +.taohe { | |
| 2873 | + position: relative; | |
| 2874 | + padding: 20rpx; | |
| 2875 | + margin-bottom: 20rpx; | |
| 2876 | + border-radius: 8rpx; | |
| 2877 | + background: #ffdcdc; | |
| 2878 | + overflow: hidden; | |
| 2879 | + /* background: #ffdcdc url(https://mshopimg.yolipai.net/miniapp/images/fwk/crown_bg.png) no-repeat left top; | |
| 2880 | + background-position: 10rpx 10rpx; | |
| 2881 | + background-size: 206rpx 136rpx; */ | |
| 2882 | +} | |
| 2883 | + | |
| 2884 | +.card::before { | |
| 2885 | + position: absolute; | |
| 2886 | + font-family: iconfont; | |
| 2887 | + content: '\e62a'; | |
| 2888 | + color: rgba(255,0,0,.1); | |
| 2889 | + font-size: 260rpx; | |
| 2890 | + /* transform: rotateZ(45deg); */ | |
| 2891 | + top: -110rpx; | |
| 2892 | + left: -70rpx; | |
| 2893 | +} | |
| 2894 | + | |
| 2895 | +.taohe::before { | |
| 2896 | + position: absolute; | |
| 2897 | + font-family: iconfont; | |
| 2898 | + content: '\e64e'; | |
| 2899 | + color: rgba(255,0,0,.1); | |
| 2900 | + font-size: 260rpx; | |
| 2901 | + top: -20rpx; | |
| 2902 | + left: -30rpx; | |
| 2903 | +} | |
| 2904 | + | |
| 2905 | +.rmb::before { | |
| 2906 | + content: '¥'; | |
| 2907 | + font-size: 24rpx; | |
| 2908 | +} | |
| 2909 | + | |
| 2910 | +.c-red { | |
| 2911 | + color: #f23030; | |
| 2912 | +} | |
| 2913 | + | |
| 2914 | +.btn-group { | |
| 2915 | + border-radius: 70rpx; | |
| 2916 | + overflow: hidden; | |
| 2917 | + margin-right: 10rpx; | |
| 2918 | +} | |
| 2919 | + | |
| 2920 | +.del { | |
| 2921 | + text-decoration: line-through; | |
| 2922 | +} | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | +.tick { | |
| 2928 | + position: relative; | |
| 2929 | +} | |
| 2930 | + | |
| 2931 | +.tick:before { | |
| 2932 | + content: ''; | |
| 2933 | + display: inline-block; | |
| 2934 | + vertical-align: middle; | |
| 2935 | + margin-top: -4rpx; | |
| 2936 | + margin-right: 12rpx; | |
| 2937 | + width: 22rpx; | |
| 2938 | + height: 22rpx; | |
| 2939 | + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat; | |
| 2940 | + background-size: 22rpx auto; | |
| 2941 | +} | |
| 2942 | + | |
| 2943 | +.details::after { | |
| 2944 | + content: ''; | |
| 2945 | + position: absolute; | |
| 2946 | + right: 0; | |
| 2947 | + top: 0; | |
| 2948 | + bottom: 0; | |
| 2949 | + margin: auto; | |
| 2950 | + display: inline-block; | |
| 2951 | + width: 40rpx; | |
| 2952 | + height: 40rpx; | |
| 2953 | + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=); | |
| 2954 | + background-repeat: no-repeat; | |
| 2955 | + background-size: 40rpx auto; | |
| 2956 | +} | |
| 2957 | + | |
| 2958 | +.lh2 { | |
| 2959 | + line-height: 2; | |
| 2960 | +} | |
| 2961 | + | |
| 2962 | +.huise { | |
| 2963 | + background: gray | |
| 2964 | +} | |
| 2965 | + | |
| 2966 | +.hideArea { | |
| 2967 | + position: absolute; | |
| 2968 | + left: -1000px; | |
| 2969 | + top: -1000px; | |
| 2970 | +} | |
| 2971 | + | |
| 2972 | +.searchbar { | |
| 2973 | + height: 95rpx; | |
| 2974 | + border-bottom: 2rpx solid rgb(238, 238, 238); | |
| 2975 | +} | |
| 2976 | +.storeListpadd { | |
| 2977 | + padding: 0rpx 31rpx; | |
| 2978 | +} | |
| 2979 | +.search { | |
| 2980 | + width: 125rpx; | |
| 2981 | + height: 45rpx; | |
| 2982 | + line-height: 45rpx; | |
| 2983 | + background-color: rgb(219, 27, 52); | |
| 2984 | + border-radius: 30rpx; | |
| 2985 | + color: rgb(255, 255, 255); | |
| 2986 | +} | |
| 2987 | +.inputstore { | |
| 2988 | + width: 510rpx; | |
| 2989 | + height: 43rpx; | |
| 2990 | + line-height: 43rpx; | |
| 2991 | + border-radius: 30rpx; | |
| 2992 | + border: 2rpx solid rgb(238, 238, 238); | |
| 2993 | + padding-left: 30rpx; | |
| 2994 | +} | |
| 2995 | + | |
| 2996 | + | |
| 2997 | +/*按钮变灰色的优化*/ | |
| 2998 | +.spec-cart-btn.gray{ background-color:gainsboro !important; } | |
| 2999 | + | |
| 3000 | +.type-navbar_box{ | |
| 3001 | + position: fixed; | |
| 3002 | + top: 0; | |
| 3003 | + z-index: 999; | |
| 3004 | + width: 100%; | |
| 3005 | +} | |
| 3006 | + | ... | ... | 
pages/cart/cart/cart.js
| ... | ... | @@ -1029,15 +1029,33 @@ Page({ | 
| 1029 | 1029 | } | 
| 1030 | 1030 | } | 
| 1031 | 1031 | |
| 1032 | - if (item.prom_type == 1) { | |
| 1032 | + | |
| 1033 | + //秒杀和团购都能加入购物车 | |
| 1034 | + if( [1,2].indexOf(item.prom_type)>-1) { | |
| 1033 | 1035 | var prom = null; | 
| 1034 | 1036 | var now = ut.gettimestamp(); | 
| 1035 | - await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + os.stoid + '/' + user_id + '/' + item.prom_id, {}).then(res => { | |
| 1036 | - if (res.data.code == 0) { | |
| 1037 | - prom = res.data.data; | |
| 1038 | - prom.price = prom.user_price; | |
| 1039 | - } | |
| 1040 | - }); | |
| 1037 | + | |
| 1038 | + //获取秒杀 | |
| 1039 | + if(item.prom_type==1) { | |
| 1040 | + await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + os.stoid + '/' + user_id + '/' + item.prom_id, {}).then(res => { | |
| 1041 | + if (res.data.code == 0) { | |
| 1042 | + prom = res.data.data; | |
| 1043 | + prom.price = prom.user_price; | |
| 1044 | + } | |
| 1045 | + }); | |
| 1046 | + } | |
| 1047 | + | |
| 1048 | + //获取团购 | |
| 1049 | + if(item.prom_type==2) { | |
| 1050 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + item.service_id + "/" + item.prom_id, {}).then(res => { | |
| 1051 | + if (res.data.code == 0) { | |
| 1052 | + prom = res.data.data; | |
| 1053 | + } | |
| 1054 | + }); | |
| 1055 | + } | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1041 | 1059 | console.log('服务的秒杀信息') | 
| 1042 | 1060 | console.log(prom) | 
| 1043 | 1061 | //---如果互动都已经过期,或者还未开始,或者无活动 | 
| ... | ... | @@ -1057,10 +1075,12 @@ Page({ | 
| 1057 | 1075 | store_id: os.stoid, | 
| 1058 | 1076 | user_id: user_id, | 
| 1059 | 1077 | card_id: prom.goods_id, | 
| 1078 | + prom_type: item.prom_type, | |
| 1079 | + prom_id: item.prom_id | |
| 1060 | 1080 | } | 
| 1061 | 1081 | }).then(res => { | 
| 1062 | 1082 | if (res.data.code == 0) { | 
| 1063 | - msNum = res.data.data.cardbuynum | |
| 1083 | + msNum = res.data.data.promcardbuynum, | |
| 1064 | 1084 | console.log('秒杀限购:' + msNum) | 
| 1065 | 1085 | } | 
| 1066 | 1086 | }) | 
| ... | ... | @@ -3104,9 +3124,9 @@ Page({ | 
| 3104 | 3124 | [txt]: t.goods_num | 
| 3105 | 3125 | }); | 
| 3106 | 3126 | |
| 3107 | - // 1.秒杀活动 | |
| 3127 | + // 1.秒杀活动 ,团购的活动 | |
| 3108 | 3128 | // 2.活动开始 | 
| 3109 | - if (t.prom_type == 1 && t.is_pd_normal == 0) { | |
| 3129 | + if((t.prom_type == 1 && t.is_pd_normal == 0) || t.prom_type==2) { | |
| 3110 | 3130 | var txt = "service_data[" + pitem + "].goods[" + item + "].goods_num"; | 
| 3111 | 3131 | var redis_num = 0; | 
| 3112 | 3132 | |
| ... | ... | @@ -3119,7 +3139,6 @@ Page({ | 
| 3119 | 3139 | if (t.id != v.id) { | 
| 3120 | 3140 | cartGoodsNum += parseInt(v.goods_num); | 
| 3121 | 3141 | } | 
| 3122 | - | |
| 3123 | 3142 | }); | 
| 3124 | 3143 | } | 
| 3125 | 3144 | }); | 
| ... | ... | @@ -3157,27 +3176,38 @@ Page({ | 
| 3157 | 3176 | |
| 3158 | 3177 | // 限购数量 | 
| 3159 | 3178 | var buylimit = 0 | 
| 3160 | - await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + t.store_id + "/" + getApp().globalData.user_id + "/" + t.prom_id, { | |
| 3179 | + if(t.prom_type==1) { | |
| 3180 | + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + t.store_id + "/" + getApp().globalData.user_id + "/" + t.prom_id, {}).then(res => { | |
| 3181 | + if (res.data.code == 0) { | |
| 3182 | + th.data.sele_g = res.data.data; | |
| 3183 | + th.data.sele_g.viplimited = res.data.data.buy_limit; | |
| 3184 | + buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit; | |
| 3185 | + } | |
| 3186 | + }); | |
| 3187 | + } | |
| 3188 | + | |
| 3189 | + if(t.prom_type==2) { | |
| 3190 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + t.goods_id + "/" + t.prom_id, {}).then(res => { | |
| 3191 | + if (res.data.code == 0) { | |
| 3192 | + th.data.sele_g = res.data.data; | |
| 3193 | + th.data.sele_g.viplimited = res.data.data.buy_limit; | |
| 3194 | + buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit; | |
| 3195 | + } | |
| 3196 | + }); | |
| 3197 | + } | |
| 3161 | 3198 | |
| 3162 | - }).then(res => { | |
| 3163 | - if (res.data.code == 0) { | |
| 3164 | - th.data.sele_g = res.data.data; | |
| 3165 | - th.data.sele_g.viplimited = res.data.data.buy_limit; | |
| 3166 | - buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit; | |
| 3167 | - }; | |
| 3168 | - }); | |
| 3169 | 3199 | |
| 3170 | 3200 | //用户已经成功付款购买的数量 | 
| 3171 | 3201 | var gd_buy_num = 0; | 
| 3172 | - await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum?store_id=" + t.store_id + "&user_id=" + getApp().globalData.user_id + "&card_id=" + t.card_id + "&prom_type=" + t.prom_type + "&prom_id=" + t.prom_id, {}).then(tt => { | |
| 3202 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum?store_id=" + t.store_id + "&isnew=1&user_id=" + getApp().globalData.user_id + "&card_id=" + t.card_id + "&prom_type=" + t.prom_type + "&prom_id=" + t.prom_id, {}).then(tt => { | |
| 3173 | 3203 | if (tt.data.code == 0) { | 
| 3174 | 3204 | gd_buy_num = !tt.data.data.promcardbuynum ? 0 : tt.data.data.promcardbuynum; | 
| 3175 | 3205 | th.setData({ | 
| 3176 | 3206 | promcardbuynum: !tt.data.data.promcardbuynum ? 0 : tt.data.data.promcardbuynum, | 
| 3177 | 3207 | cardbuynum: tt.data.data.cardbuynum, | 
| 3178 | 3208 | }); | 
| 3179 | - }; | |
| 3180 | - }); | |
| 3209 | + } | |
| 3210 | + }) | |
| 3181 | 3211 | |
| 3182 | 3212 | // 剩余购买数 | 
| 3183 | 3213 | let num = buylimit - gd_buy_num; | 
| ... | ... | @@ -4065,35 +4095,130 @@ Page({ | 
| 4065 | 4095 | } | 
| 4066 | 4096 | } else { | 
| 4067 | 4097 | |
| 4098 | + //进行累计,秒杀和团购的购买数量 | |
| 4099 | + var flash_map = {}; | |
| 4100 | + var group_map = {}; | |
| 4101 | + | |
| 4068 | 4102 | //-- 开始服务卡的购物车购买 -- | 
| 4069 | 4103 | for (var i = 0; i < this.data.service_data.length; i++) { | 
| 4070 | 4104 | var i_arr = this.data.service_data[i].goods; | 
| 4071 | 4105 | console.log(i_arr) | 
| 4072 | 4106 | |
| 4073 | 4107 | for (var j = 0; j < i_arr.length; j++) { | 
| 4074 | - await rq.promisePut("/api/weshop/cartService/update", { | |
| 4075 | - data: { | |
| 4076 | - id: i_arr[j].id, | |
| 4077 | - selected: i_arr[j].selected, | |
| 4078 | - store_id: oo.stoid | |
| 4108 | + await rq.promisePut("/api/weshop/cartService/update", { | |
| 4109 | + data: { | |
| 4110 | + id: i_arr[j].id, | |
| 4111 | + selected: i_arr[j].selected, | |
| 4112 | + store_id: oo.stoid | |
| 4113 | + } | |
| 4114 | + }); | |
| 4115 | + | |
| 4116 | + //判断秒杀的指定门店 | |
| 4117 | + if( [1,2].includes(i_arr[j].prom_type) && i_arr[j].prom && i_arr[j].prom.pick_up_lists && i_arr[j].selected){ | |
| 4118 | + var idx0=i_arr[j].prom.pick_up_lists.findIndex(function (e){ | |
| 4119 | + return e.pickup_id==i_arr[j].pick_id; | |
| 4120 | + }) | |
| 4121 | + if(idx0<0){ | |
| 4122 | + getApp().confirmBox(i_arr[j].service_name + "秒杀活动的门店不可售"); | |
| 4123 | + th.clear_checkouting(); | |
| 4124 | + return false; | |
| 4125 | + } | |
| 4079 | 4126 | } | 
| 4080 | - }); | |
| 4081 | 4127 | |
| 4128 | + //选中的情况下才进行计算 | |
| 4129 | + if(i_arr[j].selected) { | |
| 4130 | + //进行秒杀和团购的累计 | |
| 4131 | + switch (i_arr[j].prom_type) { | |
| 4132 | + case 1: | |
| 4133 | + if (!flash_map[i_arr[j].prom_id]) { | |
| 4134 | + flash_map[i_arr[j].prom_id] = {prom: i_arr[j].prom, num: i_arr[j].goods_num}; | |
| 4135 | + } else { | |
| 4136 | + flash_map[i_arr[j].prom_id].num += i_arr[j].goods_num; | |
| 4137 | + } | |
| 4138 | + break; | |
| 4139 | + case 2: | |
| 4140 | + if (!group_map[i_arr[j].prom_id]) { | |
| 4141 | + group_map[i_arr[j].prom_id] = {prom: i_arr[j].prom, num: i_arr[j].goods_num}; | |
| 4142 | + } else { | |
| 4143 | + group_map[i_arr[j].prom_id].num += i_arr[j].goods_num; | |
| 4144 | + } | |
| 4145 | + break; | |
| 4146 | + } | |
| 4147 | + } | |
| 4148 | + } | |
| 4149 | + } | |
| 4082 | 4150 | |
| 4083 | - //判断秒杀的指定门店 | |
| 4084 | - if(i_arr[j].prom_type==1 && i_arr[j].prom && i_arr[j].prom.pick_up_lists && i_arr[j].selected){ | |
| 4085 | - var idx0=i_arr[j].prom.pick_up_lists.findIndex(function (e){ | |
| 4086 | - return e.pickup_id==i_arr[j].pick_id; | |
| 4087 | - }) | |
| 4088 | - if(idx0<0){ | |
| 4089 | - getApp().confirmBox(i_arr[j].service_name + "秒杀活动的门店不可售"); | |
| 4151 | + //判断flash_map是不是空,同时判断flash prom.buy_limit | |
| 4152 | + if(Object.keys(flash_map).length>0){ | |
| 4153 | + for(let i in flash_map){ | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + if(flash_map[i].prom.buy_limit>0) { | |
| 4157 | + //查一下团购已经购买了多少减 | |
| 4158 | + var f_buyed = 0; | |
| 4159 | + //获取当前商品活动库存 | |
| 4160 | + var fl_rs=await th.get_buy_num_ser_2(flash_map[i].prom.goods_id,1,flash_map[i].prom.id); | |
| 4161 | + if(fl_rs.data.code==0 && fl_rs.data.data && fl_rs.data.data.promcardbuynum){ | |
| 4162 | + f_buyed=fl_rs.data.data.promcardbuynum | |
| 4163 | + } | |
| 4164 | + | |
| 4165 | + if (flash_map[i].num+f_buyed> flash_map[i].prom.buy_limit) { | |
| 4166 | + getApp().confirmBox(flash_map[i].prom.title + "秒杀活动的超出活动限购"); | |
| 4167 | + th.clear_checkouting(); | |
| 4168 | + return false; | |
| 4169 | + } | |
| 4170 | + } | |
| 4171 | + let redis_num=0; | |
| 4172 | + //获取当前商品活动库存 | |
| 4173 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +oo.stoid + "/1/" + i, { | |
| 4174 | + 1: 1 | |
| 4175 | + }).then(res => { | |
| 4176 | + redis_num = res.data.data; | |
| 4177 | + }); | |
| 4178 | + if(flash_map[i].num>redis_num){ | |
| 4179 | + getApp().confirmBox(flash_map[i].prom.title + "秒杀活动的超出活动数量"); | |
| 4180 | + th.clear_checkouting(); | |
| 4181 | + return false; | |
| 4182 | + } | |
| 4183 | + } | |
| 4184 | + } | |
| 4185 | + //group_map,同时判断group prom.buy_limit | |
| 4186 | + if(Object.keys(group_map).length>0){ | |
| 4187 | + for(let jg in group_map){ | |
| 4188 | + | |
| 4189 | + if(group_map[jg].prom.buy_limit>0){ | |
| 4190 | + //查一下团购已经购买了多少减 | |
| 4191 | + var gr_buyed=0; | |
| 4192 | + //获取当前商品活动库存 | |
| 4193 | + var gb_rs=await th.get_buy_num_ser_2(group_map[jg].prom.goods_id,2,group_map[jg].prom.id); | |
| 4194 | + if(gb_rs.data.code==0 && gb_rs.data.data && gb_rs.data.data.promcardbuynum){ | |
| 4195 | + gr_buyed=gb_rs.data.data.promcardbuynum | |
| 4196 | + } | |
| 4197 | + if(group_map[jg].num+gr_buyed>group_map[jg].prom.buy_limit){ | |
| 4198 | + getApp().confirmBox(group_map[jg].prom.title + "团购活动的超出活动限购"); | |
| 4199 | + th.clear_checkouting(); | |
| 4200 | + return false; | |
| 4201 | + } | |
| 4202 | + | |
| 4203 | + } | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + let redis_num=0; | |
| 4207 | + //获取当前商品活动库存 | |
| 4208 | + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +oo.stoid+ "/2/" + jg, { | |
| 4209 | + 1: 1 | |
| 4210 | + }).then(res => { | |
| 4211 | + redis_num = res.data.data; | |
| 4212 | + }); | |
| 4213 | + if(group_map[jg].num>redis_num){ | |
| 4214 | + getApp().confirmBox(group_map[jg].prom.title + "团购活动的超出活动数量"); | |
| 4090 | 4215 | th.clear_checkouting(); | 
| 4091 | 4216 | return false; | 
| 4092 | 4217 | } | 
| 4093 | - } | |
| 4094 | 4218 | } | 
| 4095 | 4219 | } | 
| 4096 | 4220 | |
| 4221 | + | |
| 4097 | 4222 | //排除失效服务结算 | 
| 4098 | 4223 | this.data.invalidList.map(item => { | 
| 4099 | 4224 | if (item.selected && item.classType == 1) { | 
| ... | ... | @@ -5662,7 +5787,65 @@ Page({ | 
| 5662 | 5787 | |
| 5663 | 5788 | |
| 5664 | 5789 | |
| 5665 | - } | |
| 5790 | + }, | |
| 5791 | + | |
| 5792 | + async go_card(e){ | |
| 5793 | + var gid=e.currentTarget.dataset.gid; | |
| 5794 | + var rurl = '/api/weshop/activitylist/listGoodActInfo2New'; | |
| 5795 | + var req_d = { | |
| 5796 | + "store_id": app.globalData.setting.stoid, | |
| 5797 | + "goods_id": gid, | |
| 5798 | + "user_id": getApp().globalData.user_id, | |
| 5799 | + "goods_type":1 | |
| 5800 | + } | |
| 5801 | + var res= await getApp().request.promiseGet(rurl, {data: req_d}); | |
| 5802 | + | |
| 5803 | + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid; | |
| 5804 | + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { | |
| 5805 | + var arr = res.data.data; | |
| 5806 | + let times = new Date().getTime(); | |
| 5807 | + //-- 预热也要计算 -- | |
| 5808 | + var arr2 = arr.filter(function (e) { | |
| 5809 | + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp()) | |
| 5810 | + }) | |
| 5811 | + if(arr2.length==1) { | |
| 5812 | + switch(arr2[0].prom_type){ | |
| 5813 | + case 1: | |
| 5814 | + url+="&prom_type=1&prom_id="+arr2[0].act_id; | |
| 5815 | + break; | |
| 5816 | + case 2: | |
| 5817 | + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+arr2[0].act_id; | |
| 5818 | + break; | |
| 5819 | + case 6: | |
| 5820 | + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`; | |
| 5821 | + break; | |
| 5822 | + case 8: | |
| 5823 | + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr2[0].act_id}`; | |
| 5824 | + break; | |
| 5825 | + } | |
| 5826 | + } | |
| 5827 | + | |
| 5828 | + } | |
| 5829 | + | |
| 5830 | + app.goto(url); | |
| 5831 | + }, | |
| 5832 | + | |
| 5833 | + //-- 在结算的时候,判断有没有超出限购 -- | |
| 5834 | + get_buy_num_ser_2: async function (goods_id,prom_type,prom_id) { | |
| 5835 | + var th = this, user_id = getApp().globalData.user_id; | |
| 5836 | + //----获取活动购买数---- | |
| 5837 | + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
| 5838 | + data: { | |
| 5839 | + store_id: os.stoid, | |
| 5840 | + user_id: user_id, | |
| 5841 | + card_id: goods_id, | |
| 5842 | + prom_type: prom_type, | |
| 5843 | + prom_id: prom_id, | |
| 5844 | + isnew:1 | |
| 5845 | + }, | |
| 5846 | + }); | |
| 5847 | + }, | |
| 5848 | + | |
| 5666 | 5849 | |
| 5667 | 5850 | |
| 5668 | 5851 | }); | 
| 5669 | 5852 | \ No newline at end of file | ... | ... | 
pages/cart/cart/cart.wxml
| ... | ... | @@ -284,13 +284,13 @@ | 
| 284 | 284 | </block> | 
| 285 | 285 | |
| 286 | 286 | |
| 287 | - <navigator class="goods-img rel" url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{items.service_id}}"> | |
| 287 | + <navigator class="goods-img rel" bindtap="go_card" data-gid="{{items.service_id}}"> | |
| 288 | 288 | <image class="wh100" src="{{items.img_url}}" binderror="bind_bnerr2" data-errorimg="service_data[{{pidx}}].goods[{{idx}}].img_url" data-url="{{items.img_url}}"></image> | 
| 289 | 289 | |
| 290 | 290 | </navigator> | 
| 291 | 291 | <view class="goods-cont"> | 
| 292 | 292 | <view class="goods-name"> | 
| 293 | - <navigator class="ellipsis-2 fs30" url="/packageA/pages/goodsInfo/goodsInfo?goods_id={{items.service_id}}">{{items.service_name}}</navigator> | |
| 293 | + <navigator class="ellipsis-2 fs30" bindtap="go_card" data-gid="{{items.service_id}}">{{items.service_name}}</navigator> | |
| 294 | 294 | <block wx:if="{{items.is_gift}}"> | 
| 295 | 295 | <view>{{items.goods_num}}件</view> | 
| 296 | 296 | </block> | ... | ... | 
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -3004,6 +3004,7 @@ Page({ | 
| 3004 | 3004 | is_collect: 0, | 
| 3005 | 3005 | collect_id: 0, | 
| 3006 | 3006 | }); | 
| 3007 | + ut.m_toast('取消成功'); | |
| 3007 | 3008 | } | 
| 3008 | 3009 | } | 
| 3009 | 3010 | }); | 
| ... | ... | @@ -3034,6 +3035,8 @@ Page({ | 
| 3034 | 3035 | is_collect: 1, | 
| 3035 | 3036 | collect_id: e.data.data.collect_id, | 
| 3036 | 3037 | }); | 
| 3038 | + | |
| 3039 | + ut.m_toast('收藏成功 在【我的-收藏夹】中查看'); | |
| 3037 | 3040 | } | 
| 3038 | 3041 | } | 
| 3039 | 3042 | }); | ... | ... | 
pages/index/index/index.js
| ... | ... | @@ -436,7 +436,7 @@ Page({ | 
| 436 | 436 | //要等一下会员默认登录 | 
| 437 | 437 | getApp().waitfor_login(async ()=> { | 
| 438 | 438 | |
| 439 | - getApp().check_can_share(); | |
| 439 | + getApp().check_can_share(th); | |
| 440 | 440 | if (typeof this.getTabBar === 'function' && this.getTabBar()) { | 
| 441 | 441 | this.getTabBar().setData({ | 
| 442 | 442 | cartGoodsNum: getApp().globalData.cartGoodsNum | ... | ... | 
pages/template/index.js
| ... | ... | @@ -18,6 +18,7 @@ Page({ | 
| 18 | 18 | is_full_screen_navigation_index: -1, //广告轮播满屏下标 | 
| 19 | 19 | nav_title: '首页', | 
| 20 | 20 | nav_frontColor: "#000", | 
| 21 | + old_nav_frontColor: "", | |
| 21 | 22 | nav_backgroundColor: "#fff", | 
| 22 | 23 | nav_type: 1, //导航类型 | 
| 23 | 24 | searchbox_transparent: 1, //搜索框背景是否透明 | 
| ... | ... | @@ -213,7 +214,7 @@ Page({ | 
| 213 | 214 | backgroundColor: temp_data.top_color, // 必写项 | 
| 214 | 215 | }) | 
| 215 | 216 | th.setData({ | 
| 216 | - // nav_frontColor: top_w_color, // 必写项 | |
| 217 | + nav_frontColor: top_w_color, // 必写项 | |
| 217 | 218 | nav_backgroundColor: temp_data.top_color, // 必写项 | 
| 218 | 219 | }) | 
| 219 | 220 | } | 
| ... | ... | @@ -232,8 +233,13 @@ Page({ | 
| 232 | 233 | }) | 
| 233 | 234 | }, | 
| 234 | 235 | onPageScroll: function (e) { | 
| 235 | - //满屏模式监听 | |
| 236 | + //满屏模式监听 | |
| 236 | 237 | let num = e.scrollTop | 
| 238 | + if (!this.data.old_nav_frontColor) { | |
| 239 | + this.setData({ | |
| 240 | + old_nav_frontColor:this.data.nav_frontColor | |
| 241 | + }) | |
| 242 | + } | |
| 237 | 243 | if (this.data.is_full_screen_navigation) { | 
| 238 | 244 | let nav_type = this.data.nav_type | 
| 239 | 245 | if (num >= 100 && nav_type) { | 
| ... | ... | @@ -248,7 +254,7 @@ Page({ | 
| 248 | 254 | this.setData({ | 
| 249 | 255 | nav_type: 1, | 
| 250 | 256 | searchbox_transparent: 1, | 
| 251 | - nav_frontColor: '#000' | |
| 257 | + nav_frontColor: this.data.old_nav_frontColor | |
| 252 | 258 | }) | 
| 253 | 259 | // this.data.nav_type = 1 | 
| 254 | 260 | } | ... | ... | 
pages/user/index/index.js
pages/user/order_list/order_list.js
| ... | ... | @@ -91,14 +91,17 @@ Page({ | 
| 91 | 91 | var startDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); | 
| 92 | 92 | |
| 93 | 93 | |
| 94 | - if (t.index && t.tabindex) { | |
| 94 | + if (t.index) { | |
| 95 | + if(t.tabindex) t.tabindex=0; | |
| 95 | 96 | this.setData({ | 
| 96 | 97 | currentIndex: t.index, | 
| 97 | 98 | tabIndex: t.tabindex, | 
| 98 | 99 | }); | 
| 99 | - this.clickTab(); | |
| 100 | + //this.clickTab(); | |
| 100 | 101 | }; | 
| 101 | 102 | |
| 103 | + | |
| 104 | + | |
| 102 | 105 | this.setData({ | 
| 103 | 106 | currentDate: this.currentDate(), | 
| 104 | 107 | startDate: startDate, | 
| ... | ... | @@ -185,8 +188,13 @@ Page({ | 
| 185 | 188 | } | 
| 186 | 189 | }, 1) | 
| 187 | 190 | |
| 188 | - th.resetData(), th.requestOrderList(th.data.activeCategoryId); | |
| 189 | - th.clickTab(); | |
| 191 | + th.resetData(); | |
| 192 | + if(th.data.currentIndex>0){ | |
| 193 | + th.clickTab(); | |
| 194 | + }else{ | |
| 195 | + th.requestOrderList(th.data.activeCategoryId); | |
| 196 | + } | |
| 197 | + | |
| 190 | 198 | },1500); | 
| 191 | 199 | }, | 
| 192 | 200 | |
| ... | ... | @@ -2735,6 +2743,7 @@ Page({ | 
| 2735 | 2743 | app.request.promiseGet(url, { | 
| 2736 | 2744 | data: data | 
| 2737 | 2745 | }).then(async res => { | 
| 2746 | + wx.hideLoading(); | |
| 2738 | 2747 | // 关闭加载状态 | 
| 2739 | 2748 | th.data.is_load2 = 0; | 
| 2740 | 2749 | // 请求成功 | 
| ... | ... | @@ -3133,14 +3142,14 @@ Page({ | 
| 3133 | 3142 | |
| 3134 | 3143 | for (const it of list) { | 
| 3135 | 3144 | //秒杀 | 
| 3136 | - if (it.prom_type == 1) { | |
| 3145 | + if ([1,2].includes(it.prom_type)) { | |
| 3137 | 3146 | let act_details = null; | 
| 3138 | 3147 | let redis_num = 0; | 
| 3139 | 3148 | let promcardbuynum = 0; | 
| 3140 | 3149 | let qty = it.qty; | 
| 3141 | 3150 | |
| 3142 | - | |
| 3143 | - await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
| 3151 | + if(it.prom_type==1) | |
| 3152 | + await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
| 3144 | 3153 | |
| 3145 | 3154 | if (res.data.code == 0) { | 
| 3146 | 3155 | act_details = res.data.data; | 
| ... | ... | @@ -3191,6 +3200,46 @@ Page({ | 
| 3191 | 3200 | |
| 3192 | 3201 | } | 
| 3193 | 3202 | }); | 
| 3203 | + if(it.prom_type==2) | |
| 3204 | + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + it.card_id + "/" + it.prom_id, {}).then(res => { | |
| 3205 | + if (res.data.code == 0) { | |
| 3206 | + console.log('当前的t团购活动信息:', res.data.data); | |
| 3207 | + act_details = res.data.data; | |
| 3208 | + if (act_details.is_end == 1) { | |
| 3209 | + wx.showModal({ | |
| 3210 | + title: '提示', | |
| 3211 | + content: '活动已结束,无法支付,请取消订单!', | |
| 3212 | + showCancel: false, | |
| 3213 | + }); | |
| 3214 | + flag = false; | |
| 3215 | + return false; | |
| 3216 | + }; | |
| 3217 | + var t_now = ut.gettimestamp(); | |
| 3218 | + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | |
| 3219 | + wx.showModal({ | |
| 3220 | + title: '提示', | |
| 3221 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
| 3222 | + showCancel: false, | |
| 3223 | + }); | |
| 3224 | + flag = false; | |
| 3225 | + return false; | |
| 3226 | + } | |
| 3227 | + | |
| 3228 | + //指定门店的控制 | |
| 3229 | + if (act_details.pick_up_lists) { | |
| 3230 | + var idx0=act_details.pick_up_lists.findIndex(function (e){ | |
| 3231 | + return e.pickup_id==it.pickup_id; | |
| 3232 | + }) | |
| 3233 | + if(idx0<0){ | |
| 3234 | + getApp().confirmBox(it.service_name + "秒杀活动的门店不可售"); | |
| 3235 | + th.setData({ paying: 0 }); | |
| 3236 | + flag = false; | |
| 3237 | + return false; | |
| 3238 | + } | |
| 3239 | + } | |
| 3240 | + | |
| 3241 | + }; | |
| 3242 | + }); | |
| 3194 | 3243 | |
| 3195 | 3244 | if(act_details && act_details.buy_limit>0 && flag){ | 
| 3196 | 3245 | await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | ... | ... | 
pages/user/order_list/order_list.wxml
| ... | ... | @@ -399,7 +399,7 @@ | 
| 399 | 399 | <navigator class="detail_commodity flex-vertical padding" wx:for="{{item.list}}" wx:for-item="goods" wx:for-index="pinx" url="{{ofil.card_url(item)}}"> | 
| 400 | 400 | <!-- 商品图片 --> | 
| 401 | 401 | <navigator class="rel"> | 
| 402 | - <image src="{{resourceUrl+goods.img_url}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="orderList[{{index}}].list[{{pinx}}].img_url"></image> | |
| 402 | + <image src="{{resourceUrl+goods.img_url}}" binderror="bind_bnerr" lazy-load="{{true}}" data-errorimg="cardList[{{index}}].list[{{pinx}}].img_url"></image> | |
| 403 | 403 | <view class="abs flex-center fs26" wx:if="{{goods.prom_type==1}}">秒杀</view> | 
| 404 | 404 | <view class="abs flex-center fs26" wx:if="{{goods.prom_type==6}}">团购</view> | 
| 405 | 405 | </navigator> | 
| ... | ... | @@ -456,7 +456,8 @@ | 
| 456 | 456 | </view> | 
| 457 | 457 | |
| 458 | 458 | <view class="links flex-right-vertical fs24 padding"> | 
| 459 | - <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1 && !(item.order_goods[0].prom_type==9))}}" class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image> | |
| 459 | + <image wx:if="{{(item.order_status==1&&item.pay_status==1 && item.shipping_status==0 && item.exp_type==1 && !(item.order_goods[0].prom_type==9))}}" | |
| 460 | + class="code" src="{{iurl}}miniapp/images/order/code.png" bindtap="code_show" data-order_sn="{{item.order_sn}}"></image> | |
| 460 | 461 | <view bindtap="cancle" class="commodity_To_evaluate flex-level View_evaluation" data-id="{{tabIndex}}" data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}" wx:if="{{(item.order_status==0)}}" data-index="{{tabIndex}}">取消订单</view> | 
| 461 | 462 | |
| 462 | 463 | <!-- 尾款的支付时候,不显示订单详情 --> | ... | ... | 
