Commit a5b73a15911e6f9948f747a62fe7c4d8ac86b699

Authored by WXD-SEASON\season
2 parents 1d4a5449 77d9102b

合并OA

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/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 + "/" + gid + "/" + 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});
... ... @@ -1495,6 +1497,7 @@ Page({
1495 1497 is_collect: 0,
1496 1498 collect_id: 0,
1497 1499 });
  1500 + ut.m_toast('取消成功');
1498 1501 }
1499 1502 }
1500 1503 });
... ... @@ -1525,6 +1528,7 @@ Page({
1525 1528 is_collect: 1,
1526 1529 collect_id: e.data.data.collect_id,
1527 1530 });
  1531 + ut.m_toast('收藏成功 在【我的-收藏夹】中查看');
1528 1532 }
1529 1533 }
1530 1534 });
... ...
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_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/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/zh_calculate.js
... ... @@ -379,7 +379,6 @@ module.exports = {
379 379 c_item.offline_price = offline_price;
380 380 c_item.offline_num = offline_num;
381 381 }
382   -
383 382 },
384 383 //筛选组合购,纯粹的数组按活动id分组
385 384 find_split: function (arr) {
... ...
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 + if (gid_str.length > 1 && gid_str[1] && parseInt(gid_str[1]) > 0) {
  258 + first_leader = gid_str[1];
  259 + }
  260 + //-- 如果有room_id的获取 --
  261 + if (gid_str.length > 2 && gid_str[2] && parseInt(gid_str[2]) > 0) {
  262 + room_id = gid_str[2];
  263 + room_user_share = 1;
  264 + }
  265 +
  266 + if (gid_str.length > 3 && gid_str[3] && parseInt(gid_str[3]) > 0) {
  267 + this.data.options.prom_id = gid_str[3];
  268 + }
  269 +
  270 + }
  271 +
  272 + //-- 设置顶部高度 --
  273 + let height = getApp().globalData.navBarHeight;
  274 + ee.setData({gid: gid, top_nav: height});
  275 +
  276 + if (first_leader > 0) {
  277 + getApp().globalData.first_leader = first_leader;
  278 + //调用接口判断是不是会员
  279 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  280 + if (res.data.code == 0) {
  281 + getApp().globalData.guide_id = res.data.data.id;
  282 + getApp().globalData.guide_pick_id = res.data.data.pickup_id
  283 + }
  284 + })
  285 + }
  286 +
  287 + //-- 如果有房间号 --
  288 + if (room_id) {
  289 + getApp().globalData.room_id = room_id;
  290 + getApp().globalData.room_goods_id = gid;
  291 + //如果是会员分享过来的要记录
  292 + if (room_user_share)
  293 + getApp().globalData.room_user_share = room_user_share;
  294 +
  295 + if (share_openid) {
  296 + this.get_room_share_guide(share_openid);
  297 + }
  298 + }
  299 +
  300 +
  301 + var c_guide_id = t.c_guide_id;
  302 + if (c_guide_id) {
  303 + th.data.c_guide_id = c_guide_id;
  304 + }
  305 +
  306 + getApp().getConfig(function (e) {
  307 + ee.setData({sto_sele_name_1: e.store_name})
  308 + })
  309 +
  310 + //----获取系统参数-----
  311 + getApp().getConfig2(function (e) {
  312 + ee.setData({
  313 + bconfig: e,
  314 + sales_rules: e.sales_rules,
  315 + });
  316 +
  317 + if (e.categoryset.indexOf("," + 1 + ",") != -1) {
  318 + ee.setData({
  319 + is_show_pl: 1
  320 + });
  321 + }
  322 + if (e.categoryset.indexOf("," + 3 + ",") != -1) {
  323 + ee.setData({
  324 + is_show_pp: 1
  325 + });
  326 + }
  327 + if (e.categoryset.indexOf("," + 2 + ",") != -1) {
  328 + ee.setData({
  329 + is_show_gb: 1
  330 + });
  331 + }
  332 + // console.log(e);
  333 + var json_d = JSON.parse(e.switch_list);
  334 + ee.setData({
  335 + store_config: e,
  336 + sys_switch: json_d,
  337 + is_closecoupon: json_d.is_closecoupon,
  338 + is_newsales_rules: json_d.is_newsales_rules
  339 + });
  340 + ee.init(gid);
  341 +
  342 + //------几人评价-------
  343 + //n.init(th, "", "comments");
  344 + wx.pageScrollTo && th.setData({
  345 + supportPageScroll: !0
  346 + });
  347 +
  348 + }, 1);
  349 +
  350 + //获取用户设备信息,屏幕宽度
  351 + wx.getSystemInfo({
  352 + success: res => {
  353 + that.setData({
  354 + screenWidth: res.screenWidth
  355 + })
  356 + }
  357 + });
  358 +
  359 + //-- 自定义海报 --
  360 + getApp().request.promiseGet("/api/weshop/goods/poster/page", {
  361 + data: {store_id: os.stoid, type: 1, is_use: 1}
  362 + }).then(res => {
  363 + if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0]) {
  364 +
  365 + var poster_data = res.data.data.pageData[0];
  366 + var json_str = poster_data.jsonStr;
  367 +
  368 + if (json_str) {
  369 + var json_data = JSON.parse(json_str);
  370 + if (json_data.bg_img) {
  371 +
  372 + //-- 把图片那到本地 --
  373 + wx.getImageInfo({
  374 + src: json_data.bg_img,
  375 + success: function (res) {
  376 + var path = res.path;
  377 + th.setData({share_b_img: path})
  378 + },
  379 + fail: function (res) {
  380 + }
  381 + });
  382 + }
  383 + th.setData({poster: json_data})
  384 +
  385 + }
  386 + }
  387 + })
  388 +
  389 +
  390 + },
  391 +
  392 + //-- 获取直播的分享人的导购信息 --
  393 + async get_room_share_guide(share_openid) {
  394 +
  395 + var url = "/api/weshop/users/page";
  396 + var first_leader = 0;
  397 +
  398 + //调用接口判断是不是会员
  399 + await getApp().request.promiseGet(url, {
  400 + data: {
  401 + stoid: os.stoid,
  402 + weapp_openid: share_openid
  403 + }
  404 + }).then(res => {
  405 + if (ut.ajax_ok(res)) {
  406 + first_leader = res.data.data.pageData[0].user_id;
  407 + getApp().globalData.guide_id = res.data.data.id;
  408 + }
  409 + })
  410 +
  411 + if (!first_leader) return false;
  412 +
  413 + getApp().globalData.first_leader = first_leader;
  414 +
  415 + //调用接口判断是不是会员
  416 + await getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  417 + if (res.data.code == 0) {
  418 + getApp().globalData.guide_id = res.data.data.id;
  419 + getApp().globalData.guide_pick_id = res.data.data.pickup_id
  420 + }
  421 + })
  422 +
  423 + },
  424 +
  425 +
  426 + onReady() {
  427 + // 用于控制保障服务折叠图标的显示
  428 + setTimeout(() => {
  429 + wx.createSelectorQuery().selectAll(".showArea, .hideArea").boundingClientRect(res => {
  430 + if (res.length != 0) {
  431 + this.setData({
  432 + showFold: res[0].height < res[1].height,
  433 + });
  434 + }
  435 + }).exec();
  436 + }, 1000);
  437 +
  438 + },
  439 +
  440 +
  441 + //------------程序初始化入口-------------
  442 + async init(gid) {
  443 + var ee = this,
  444 + th = ee,
  445 + gallery = null,
  446 + is_collect = 0,
  447 + collect_id = 0,
  448 + categories3 = ee.data.categories3,
  449 + fir_com = null,
  450 + fir_quan = null,
  451 + mapurl = null,
  452 + mapurl_f_img = null;
  453 +
  454 +
  455 + //------是否收藏----------
  456 + await getApp().request.promiseGet("/api/weshop/goodscollect/page", {
  457 + data: {
  458 + store_id: os.stoid,
  459 + goods_id: gid,
  460 + user_id: oo.user_id,
  461 + }
  462 + }).then(res => {
  463 + var t = res;
  464 + var data = t.data.data.pageData;
  465 + if (data && data.length > 0) {
  466 + //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, });
  467 + is_collect = 1;
  468 + collect_id = data[0].collect_id;
  469 + }
  470 + })
  471 +
  472 + //------获取评价的统计数量----
  473 + await getApp().request.promiseGet("/api/weshop/serviceComment/countlist/", {
  474 + data: {
  475 + store_id: os.stoid,
  476 + service_id: gid
  477 + },
  478 + }).then(res => {
  479 + console.log('get评价统计数量', res.data.data);
  480 + var t = res;
  481 + var g = t.data.data[0];
  482 + if (g != null && g != undefined) {
  483 + var allnum = g.c0 + g.c1 + g.c2 + g.c3 + g.c4 + g.c5;
  484 + var num2 = g.c4 + g.c5;
  485 + var num3 = g.c3;
  486 + var num4 = g.c0 + g.c1 + g.c2;
  487 +
  488 + var dd = ee.data.categories3;
  489 + dd[0].num = allnum;
  490 + dd[1].num = g.cimg;
  491 + dd[2].num = num2;
  492 + dd[3].num = num3;
  493 + dd[4].num = num4;
  494 +
  495 + categories3 = dd;
  496 + }
  497 + });
  498 +
  499 + //----获取详情页的评价----
  500 + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", {
  501 + data: {
  502 + store_id: os.stoid,
  503 + service_id: gid,
  504 + pageSize: 3,
  505 + parent_id: 0,
  506 + page: 1,
  507 + is_show: 1,
  508 + },
  509 + }).then(res => {
  510 + console.log('get详情页评价', res.data.data);
  511 + fir_com = res.data.data.pageData;
  512 + });
  513 +
  514 + if (fir_com) {
  515 + for (var ind in fir_com) {
  516 + if (fir_com[ind].head_pic == "") fir_com[ind].head_pic = ee.data.iurl + "/miniapp/images/hui_hear_pic.png";
  517 + if (fir_com[ind].img) fir_com[ind].img = ut.unserialize(fir_com[ind].img);
  518 + if (fir_com[ind].weapp_img) fir_com[ind].weapp_img = JSON.parse(fir_com[ind].weapp_img);
  519 + }
  520 + }
  521 + ;
  522 +
  523 +
  524 + //this.getHistoryBuy(); //获取历史购买
  525 + ee.setData({
  526 + is_collect: is_collect,
  527 + collect_id: collect_id,
  528 + categories3: categories3,
  529 + fir_quan: fir_quan,
  530 + fir_comments: fir_com,
  531 + // cardComments: fir_com,
  532 + });
  533 +
  534 + },
  535 +
  536 + //检测有没有导购分享的门店
  537 + check_guide(func) {
  538 + var first_leader = getApp().globalData.first_leader;
  539 + if (!first_leader) {
  540 + func();
  541 + return false;
  542 + }
  543 + if (this.data.is_geted_guide_pick) {
  544 + func();
  545 + return false;
  546 + }
  547 +
  548 + if (getApp().globalData.guide_pick_id) {
  549 + func();
  550 + return false;
  551 + }
  552 + var th = this;
  553 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
  554 + if (res.data.code == 0) {
  555 + getApp().globalData.guide_pick_id = res.data.data.pickup_id;
  556 + }
  557 + th.data.is_geted_guide_pick = 1;
  558 + func();
  559 + })
  560 + },
  561 +
  562 + //---展示---
  563 + // gid 在onload阶段已经保存在this.data中
  564 + onShow: function () {
  565 +
  566 + getApp().check_can_share(this);
  567 + //-- 看一下隐私政策要不要显示 --
  568 + var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id
  569 + if (privacy_pop) {
  570 + privacy_pop.check_pri_show();
  571 + }
  572 +
  573 + var that = this;
  574 + var th = this;
  575 + var ee = this, gid = this.data.gid, i = getApp().request;
  576 +
  577 + th.data.is_timer = 1;
  578 + //获取用户的默认门店
  579 + th.check_guide(() => {
  580 + getApp().get_user_store(function (e) {
  581 + if (!e) {
  582 + th.data.fir_def_store = {}; //赋值空对象
  583 + return false;
  584 + }
  585 +
  586 + if (getApp().globalData.is_dj_pk) th.setData({has_def: 1})
  587 +
  588 + var ee = JSON.parse(JSON.stringify(e));
  589 + console.log(e);
  590 +
  591 + //--定时器推迟一下--
  592 + var appd = getApp().globalData;
  593 + var w_time = setInterval(function () {
  594 + if (that.data.is_get_local_ok == 0) return false;
  595 + if (!th.data.data) {
  596 + return false;
  597 + }
  598 + var ser_card = th.data.data;
  599 + //--如果默认门店不在等级卡的默认们店以内
  600 + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(ee.keyid) == -1) {
  601 + ee.is_no_dis = 1;
  602 + }
  603 +
  604 +
  605 + clearInterval(w_time);
  606 + var distance = null;
  607 + var e = JSON.parse(JSON.stringify(ee));
  608 +
  609 + //如果有开启近距离的话,同时距离优不一样了
  610 + if (that.data.lat != null) {
  611 + //如果经纬度有变化的话
  612 + if (e && appd.lat == that.data.lat && appd.lon == that.data.lon && e.distance > 0) {
  613 + that.data.fir_def_store = e;
  614 + that.setData({
  615 + def_pick_store: e,
  616 + sto_sele_name: e.pickup_name,
  617 + sto_sele_id: e.pickup_id,
  618 + sto_sele_distr: e.distr_type,
  619 + sto_sele_keyid: e.keyid,
  620 + })
  621 + } else {
  622 + //要用接口是获取距离,js的计算不准
  623 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  624 + data: {
  625 + store_id: os.stoid,
  626 + pickup_id: e.pickup_id,
  627 + lat: th.data.lat,
  628 + lon: th.data.lon,
  629 + is_pos: 1
  630 + },
  631 + }).then(res => {
  632 + if (ut.ajax_ok(res)) {
  633 + e = res.data.data.pageData[0];
  634 + if (e) {
  635 + e.is_no_dis = ee.is_no_dis;
  636 + appd.pk_store = e;
  637 + that.data.fir_def_store = e;
  638 +
  639 + console.log('get_user_store--2');
  640 + console.log(e);
  641 +
  642 + that.setData({
  643 + def_pick_store: e,
  644 + sto_sele_name: e.pickup_name,
  645 + sto_sele_id: e.pickup_id,
  646 + sto_sele_distr: e.distr_type,
  647 + sto_sele_keyid: e.keyid,
  648 + })
  649 + }
  650 +
  651 + }
  652 + })
  653 + }
  654 +
  655 + //e.distance = distance;
  656 + appd.lat = that.data.lat;
  657 + appd.lon = that.data.lon;
  658 +
  659 + } else {
  660 + if (e) {
  661 +
  662 + console.log('get_user_store3---');
  663 + console.log(e);
  664 +
  665 + e.distance = null;
  666 + that.data.fir_def_store = e;
  667 + that.setData({
  668 + def_pick_store: e,
  669 + sto_sele_name: e.pickup_name,
  670 + sto_sele_id: e.pickup_id,
  671 + sto_sele_distr: e.distr_type,
  672 + sto_sele_keyid: e.keyid,
  673 + })
  674 + }
  675 + }
  676 + }, 200)
  677 +
  678 +
  679 + });
  680 + })
  681 +
  682 + th.wait_for_store_config();
  683 +
  684 + i.get("/api/weshop/serviceCard/get/" + o.stoid + "/" + ee.data.gid, {
  685 + failRollback: !0,
  686 + success: function (t) {
  687 + if (t.data.code == 0) {
  688 + // console.log('GET pic and video');
  689 + if (t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_url) {
  690 + that.setData({
  691 + mapurl: t.data.data.listServiceVideos[0].video_url,
  692 + });
  693 + }
  694 +
  695 + if (t.data.data.listServiceVideos && t.data.data.listServiceVideos[0] && t.data.data.listServiceVideos[0].video_img) {
  696 + that.setData({
  697 + mapurl_f_img: t.data.data.listServiceVideos[0].video_img,
  698 + });
  699 + }
  700 +
  701 + if (t.data.data.listServiceImages) {
  702 + that.setData({
  703 + gallery: t.data.data.listServiceImages,
  704 + });
  705 + }
  706 +
  707 + if (t.data.data.listServiceItem) {
  708 + that.setData({
  709 + listServiceItem: t.data.data.listServiceItem,
  710 + });
  711 + }
  712 +
  713 + that.setData({
  714 + 'data.goods_name': t.data.data.serviceName,
  715 + 'data.shop_price': t.data.data.money,
  716 + 'data.show_price': t.data.data.show_price,
  717 + 'data.validDays': t.data.data.validDays,
  718 + 'data.serviceContent': t.data.data.serviceContent,
  719 + 'data.image_url': t.data.data.imgUrl,
  720 + 'data.goods_id': t.data.data.id,
  721 + 'data.id': t.data.data.id,
  722 + 'data.sales_sum': t.data.data.sales_sum,
  723 + 'data.storageId': t.data.data.storageId,
  724 + 'data.service_sn': t.data.data.serviceSn,
  725 + 'data.listServiceVideos': t.data.data.listServiceVideos,
  726 + // gallery: t.data.data.listServiceImages,
  727 + // mapurl: t.data.data.listServiceVideos[0].video_url,
  728 + // mapurl_f_img: t.data.data.listServiceVideos[0].video_img,
  729 + //listServiceItem: t.data.data.listServiceItem,
  730 + });
  731 +
  732 + that.getTaohe();
  733 + // ----> 秒杀
  734 + let prom_type = th.data.options.prom_type;
  735 +
  736 + let goods_id = th.data.options.goods_id;
  737 + if (!goods_id) goods_id = th.data.data.goods_id;
  738 +
  739 + let prom_id = th.data.options.prom_id;
  740 + // 检查活动是否开始
  741 + th.check_prom(goods_id, prom_type, prom_id);
  742 +
  743 +
  744 + getApp().deal_iframe(a, e, 'content', t.data.data.serviceContent, ee);
  745 +
  746 + //获取重表
  747 + getApp().promiseGet("/api/weshop/serviceItem/list", {
  748 + data: {store_id: o.stoid, service_id: t.data.data.id}
  749 + }).then(res => {
  750 + if (res.data.code == 0) {
  751 + var list = res.data.data;
  752 + that.setData({service_list: list})
  753 + }
  754 + })
  755 +
  756 + } else {
  757 + wx.showModal({
  758 + title: t.data.msg,
  759 + showCancel: !1,
  760 + complete: function () {
  761 + wx.navigateBack();
  762 + }
  763 + });
  764 + }
  765 + ;
  766 + }
  767 + });
  768 +
  769 + th.data.enterAddressPage && (this.data.enterAddressPage = !1);
  770 + //没有互动,就调用默认的门店
  771 + if (!th.data.prom_type) th.get_sto();
  772 +
  773 +
  774 +
  775 + },
  776 +
  777 + enterAddress: function () {
  778 + this.data.enterAddressPage = !0, wx.navigateTo({
  779 + url: "/packageF/pages/user/address_list/address_list?operate=selectAddress"
  780 + });
  781 + },
  782 +
  783 + onUnload: function () {
  784 + // for(var i = 1; i < 100; i++) {
  785 + // clearInterval(i);
  786 + // }
  787 + },
  788 +
  789 + onHide: function () {
  790 + this.data.is_timer = 0;
  791 + // for(var i = 1; i < 100; i++) {
  792 + // clearInterval(i);
  793 + // }
  794 + },
  795 + //----------三个选项按钮-----------
  796 + tabClick: function (t) {
  797 + var e = t.currentTarget.id;
  798 + this.setData({
  799 + activeCategoryId: e
  800 + }), 1 == e ? this.tabGoodsContent() : 2 == e && this.tabComment();
  801 + },
  802 +
  803 + tabClick3: function (t) {
  804 + var e = this;
  805 + if (t.currentTarget.id != this.data.activeCategoryId3) {
  806 + e.data.c_curr_p = 1;
  807 + this.setData({
  808 + activeCategoryId3: t.currentTarget.id,
  809 + comments: null, comments_no_more: 0, get_c: 0,
  810 + });
  811 + this.requestComments_new();
  812 + }
  813 + },
  814 +
  815 + tabComment: function () {
  816 + this.setData({
  817 + activeCategoryId: 2, comments_no_more: 0, get_c: 0
  818 + }), this.data.comments || this.requestComments_new();
  819 + },
  820 +
  821 + //商品详情的时候调用
  822 + tabGoodsContent: function () {
  823 + var th = this,
  824 + i = getApp().request;
  825 + this.setData({
  826 + activeCategoryId: 1
  827 + });
  828 + },
  829 +
  830 +
  831 + //------------加入购物车--------------
  832 + addCart: async function (t) {
  833 + var th = this;
  834 + var ind = t.currentTarget.dataset.openSpecModal_ind;
  835 + var action = t.currentTarget.dataset.action;
  836 +
  837 +
  838 + if (getApp().is_sp_hao() && action == 'add') {
  839 + wx.showToast({
  840 + title: "视频号商品不允许加入购物车",
  841 + icon: 'none',
  842 + duration: 2000
  843 + });
  844 + return false;
  845 + }
  846 +
  847 +
  848 + if (this.data.goodsInputNum == 0) {
  849 + getApp().my_warnning('请输入购买数量', 1, th, 450);
  850 + return false;
  851 + }
  852 +
  853 +
  854 + if (!ind) ind = t.currentTarget.dataset.openspecmodal_ind;
  855 +
  856 + th.setData({
  857 + open_ind_store: ind
  858 + });
  859 +
  860 + if (!th.data.sto_sele_name) {
  861 + getApp().my_warnning('请选择门店', 1, th, 450);
  862 + return false;
  863 + }
  864 +
  865 + // 库存
  866 + var redisNums = 0;
  867 + // 限购数
  868 + var limitNum = 0;
  869 + // 已购买数量
  870 + var boughtNum = 0;
  871 + var is_ok = 1;
  872 +
  873 + // 获取redis当前可以购买的数量
  874 + // 如果数量为0,设置和显示已抢光
  875 + // 否则,进一步判断是否超出限购或超出库存
  876 + await this.getactLen().then(async function (res) {
  877 + redisNums = res;
  878 + let curNum = th.data.goodsInputNum;
  879 + // res: redis可购买数量
  880 + console.log('当前可以购买的数量:', res);
  881 + if (res <= 0) {
  882 + // 可购买数量<=0, 设置和显示已抢光
  883 + th.setData({
  884 + prom_r_null: 1,
  885 + });
  886 + getApp().my_warnning('超出活动库存', 0, self);
  887 + is_ok = 0;
  888 + return false;
  889 + } else {
  890 +
  891 + if(curNum>redisNums){
  892 + getApp().my_warnning('超出活动库存', 0, self);
  893 + is_ok = 0;
  894 + return false;
  895 + }
  896 + // 可购买数量>0
  897 + // 计算自己还可以购买的数量
  898 + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
  899 + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
  900 + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
  901 + let actInfo = th.data.sele_g;
  902 + if(actInfo.buy_limit>0){
  903 + await th.get_buy_num2().then(function (data) {
  904 + let limited = actInfo.buy_limit; // 限购数量a
  905 + let promcardbuynum = data.data.data.promcardbuynum;
  906 + let canBuyNum = limited - promcardbuynum; // 自己还可购买的数量c
  907 +
  908 + limitNum = limited;
  909 + boughtNum = promcardbuynum;
  910 +
  911 + if (canBuyNum <= 0) {
  912 + canBuyNum = 0;
  913 + }
  914 + if (canBuyNum > res) {
  915 + getApp().my_warnning('超出活动库存', 0, self);
  916 + th.setData({
  917 + goodsInputNum: res || 1
  918 + });
  919 + is_ok = 0;
  920 + return false;
  921 + }
  922 +
  923 + if (curNum > canBuyNum) {
  924 + getApp().my_warnning('超出限购数量', 0, self);
  925 + th.setData({
  926 + goodsInputNum: canBuyNum || 1,
  927 + });
  928 + is_ok = 0;
  929 + return false;
  930 + }
  931 + })
  932 + }
  933 + }
  934 + })
  935 +
  936 + if (!is_ok) return false;
  937 +
  938 +
  939 + if (action == "buy") {
  940 + //--------------此时操作的数据------------
  941 + var newd = {
  942 + id: th.data.data.id,
  943 + goods_num: th.data.goodsInputNum,
  944 + pick_id: th.data.sto_sele_id,
  945 + keyid: th.data.sto_sele_keyid,
  946 + };
  947 + newd['pick_name'] = th.data.sto_sele_name;
  948 + newd['guide_id'] = getApp().globalData.guide_id;
  949 + newd['guide_type'] = 0;
  950 +
  951 + if (getApp().globalData.groupchat_id) {
  952 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  953 + }
  954 + if (this.data.prom_type) {
  955 + newd['prom_type'] = this.data.prom_type;
  956 + newd['prom_id'] = this.data.prom_id;
  957 + newd['prom_price'] = this.data.prom_price;
  958 + }
  959 + th.buyNow(newd);
  960 + } else {
  961 +
  962 + var newd = {
  963 + service_id: th.data.data.id,
  964 + service_sn: th.data.data.service_sn,
  965 + service_name: th.data.data.goods_name,
  966 + goods_num: th.data.goodsInputNum,
  967 + pick_id: th.data.sto_sele_id,
  968 + user_id: oo.user_id,
  969 + store_id: os.stoid,
  970 + money: th.data.data.shop_price,
  971 + };
  972 + if (getApp().globalData.guide_id) {
  973 + newd['guide_id'] = getApp().globalData.guide_id;
  974 + newd['guide_type'] = 0;
  975 + }
  976 +
  977 + if (getApp().globalData.groupchat_id) {
  978 + newd['groupchat_id'] = getApp().globalData.groupchat_id;
  979 + }
  980 + // 秒杀:单独购买的情况下,加入购物车显示的是零售价,否则显示秒杀活动价
  981 + newd['prom_type'] = th.data.options.prom_type;
  982 + newd['prom_id'] = th.data.options.prom_id;
  983 + newd['money'] = th.data.prom_price;
  984 +
  985 + //----先看会员在购物车中是否加入了该商品-----
  986 + getApp().request.get("/api/weshop/cartService/page", {
  987 + data: {
  988 + store_id: os.stoid,
  989 + user_id: oo.user_id,
  990 + service_id: th.data.data.id,
  991 + pick_id: th.data.sto_sele_id
  992 + },
  993 + success: function (re) {
  994 + //-------如果购物车中有相关的数据---------
  995 + if (ut.ajax_ok(re)) {
  996 + var item = null;
  997 + // 多门店问题
  998 + var cartGoodsNum = 0;
  999 + const tmpObj = re.data.data.pageData;
  1000 + for (let i = 0; i < tmpObj.length; i++) {
  1001 + if (tmpObj[i].prom_id == th.data.prom_id && tmpObj[i].prom_type==2) {
  1002 + cartGoodsNum += parseInt(tmpObj[i].goods_num);
  1003 + }
  1004 + }
  1005 + // 以下为当前门店同类商品已经加入到购物车
  1006 + var totalNum = th.data.goodsInputNum + cartGoodsNum
  1007 + var snum = limitNum - boughtNum-totalNum;
  1008 + if (snum < 0 && limitNum>0 ) {
  1009 + getApp().my_warnning('购物车已经购买了该商品,超出活动限购数量', 0, self);
  1010 + return false;
  1011 + }
  1012 + if (totalNum >= redisNums) {
  1013 + getApp().my_warnning('购物车已经购买了该商品,超出活动数量', 0, self);
  1014 + return false;
  1015 + }
  1016 + var updata = {
  1017 + id: item.id,
  1018 + goods_num: totalNum,
  1019 + money: th.data.data.shop_price,
  1020 + store_id: os.stoid,
  1021 + };
  1022 + updata['money'] = th.data.prom_price;
  1023 +
  1024 + if (getApp().globalData.guide_id) {
  1025 + updata['guide_id'] = getApp().globalData.guide_id;
  1026 + updata['guide_type'] = 1;
  1027 + }
  1028 + if (getApp().globalData.groupchat_id) {
  1029 + updata['groupchat_id'] = getApp().globalData.groupchat_id;
  1030 + }
  1031 + getApp().request.put("/api/weshop/cartService/update", {
  1032 + data: updata,
  1033 + success: function (t) {
  1034 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  1035 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  1036 + th.setData({
  1037 + cartGoodsNum: c_num
  1038 + });
  1039 + th.closeSpecModal();
  1040 + }
  1041 + });
  1042 + } else {
  1043 + getApp().request.post("/api/weshop/cartService/save", {
  1044 + data: newd,
  1045 + success: function (t) {
  1046 + getApp().my_warnning('加入购物车成功', 1, th, 450);
  1047 + var c_num = th.data.cartGoodsNum + th.data.goodsInputNum;
  1048 + th.setData({
  1049 + cartGoodsNum: c_num
  1050 + });
  1051 + th.closeSpecModal();
  1052 + }
  1053 + });
  1054 + }
  1055 + }
  1056 + });
  1057 +
  1058 + }
  1059 +
  1060 +
  1061 + },
  1062 +
  1063 + //----------立即购买-----------
  1064 + buyNow: function (e) {
  1065 + getApp().globalData.service_now = e;
  1066 + wx.redirectTo({
  1067 + url: "/packageA/pages/cart2_ser/cart2_ser",
  1068 + });
  1069 + },
  1070 + //----------增加购买数量-----------
  1071 + addCartNum: function (t) {
  1072 + this.checkCartNum(this.data.goodsInputNum + 1);
  1073 + },
  1074 + //----------减少购买数量-----------
  1075 + subCartNum: function (t) {
  1076 + this.checkCartNum(this.data.goodsInputNum - 1);
  1077 + },
  1078 + //----------输入框输入购买数量-----------
  1079 + inputCartNum: function (t) {
  1080 + this.checkCartNum(Number(t.detail.value));
  1081 + },
  1082 +
  1083 + //------检查数量是不是超出限购------
  1084 + checkCartNum: async function (t) {
  1085 + var th = this;
  1086 +
  1087 + if (!th.data.def_pick_store) {
  1088 + wx.showModal({title: '请选择门店',});
  1089 + return false;
  1090 + }
  1091 + // 非秒杀活动
  1092 + if (this.data.prom_type != 1) {
  1093 + this.setData({
  1094 + goodsInputNum: t,
  1095 + });
  1096 + }
  1097 +
  1098 + // 秒杀活动
  1099 + if (this.data.prom_type == 1) {
  1100 + // 如果是秒杀活动下的单独购买,is_normal为1
  1101 + if (this.data.openSpecModal_flash_normal) this.data.is_normal = 1;
  1102 +
  1103 + if (this.data.is_normal) {// 单独购买
  1104 + this.setData({
  1105 + goodsInputNum: t,
  1106 + });
  1107 + } else {// 秒杀购买
  1108 +
  1109 + // 获取redis当前可以购买的数量
  1110 + // 如果数量为0,设置和显示已抢光
  1111 + // 否则,进一步判断是否超出限购或超出库存
  1112 + await this.getactLen().then(async function (res) {
  1113 + // res: redis可购买数量
  1114 + // console.log('当前可以购买的数量:', res);
  1115 + if (res <= 0) {
  1116 + // 可购买数量<=0, 设置和显示已抢光
  1117 + th.setData({
  1118 + prom_r_null: 1,
  1119 + });
  1120 + } else {
  1121 + // 可购买数量>0
  1122 + // 计算自己还可以购买的数量
  1123 + // 自己还可购买的数量c = 每人活动限购数量a - 自己已经购买的数量b
  1124 + // 如果限购数量a>redis可购买数量d,当增加数量t>d, 提示超出库存
  1125 + // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
  1126 + let actInfo = th.data.sele_g;
  1127 + await th.get_buy_num2().then(function (data) {
  1128 + let limited = actInfo.buy_limit == 0 ? 100000 : actInfo.buy_limit; // 限购数量a
  1129 + let promcardbuynum = data.data.data.promcardbuynum;
  1130 + let buyedNum = promcardbuynum; // 自己已经购买的数量b
  1131 + let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
  1132 +
  1133 + if (canBuyNum <= 0) {
  1134 + canBuyNum = 0;
  1135 + }
  1136 + ;
  1137 +
  1138 + if (limited > res) {
  1139 + if (t > res) { // t当前增减的数量
  1140 + // wx.showModal({
  1141 + // title: '超出活动库存',
  1142 + // });
  1143 + getApp().my_warnning('超出活动库存', 0, self);
  1144 + th.setData({
  1145 + goodsInputNum: res || 1,
  1146 + });
  1147 + return false;
  1148 + }
  1149 +
  1150 + }
  1151 +
  1152 +
  1153 + if (limited <= res) {
  1154 + if (t > canBuyNum) {
  1155 + // wx.showModal({
  1156 + // title: '超出限购数量',
  1157 + // });
  1158 + getApp().my_warnning('超出限购数量', 0, self);
  1159 + th.setData({
  1160 + goodsInputNum: canBuyNum || 1,
  1161 + });
  1162 + return false;
  1163 + }
  1164 +
  1165 + }
  1166 +
  1167 +
  1168 + th.setData({
  1169 + goodsInputNum: t,
  1170 + });
  1171 + });
  1172 + }
  1173 + ;
  1174 + });
  1175 +
  1176 + }
  1177 +
  1178 +
  1179 + }
  1180 +
  1181 +
  1182 + },
  1183 +
  1184 +
  1185 + closeSpecModal: function () {
  1186 + this.setData({
  1187 + openSpecModal: !1,
  1188 + openSpecModal_pt: !1,
  1189 + openSpecModal_flash_normal: !1,
  1190 + });
  1191 + },
  1192 +
  1193 + openSpecModel: function (t) {
  1194 +
  1195 + if (this.data.get_sto_ing) return false;
  1196 +
  1197 + var th = this;
  1198 + var open_store = t.currentTarget.dataset.ind;
  1199 + if (getApp().is_sp_hao() && open_store == 1) {
  1200 + wx.showToast({
  1201 + title: "视频号商品不允许加入购物车",
  1202 + icon: 'none',
  1203 + duration: 2000
  1204 + });
  1205 + return false;
  1206 + }
  1207 +
  1208 +
  1209 + //--先判断会员状态--
  1210 + var user_info = getApp().globalData.userInfo;
  1211 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1212 + wx.navigateTo({
  1213 + url: '/packageE/pages/togoin/togoin',
  1214 + })
  1215 + return false;
  1216 + }
  1217 +
  1218 + this.setData({
  1219 + store: 0,
  1220 + choice_sort_store: 0,
  1221 + sort_store: 0,
  1222 + open_ind_store: open_store,
  1223 + })
  1224 +
  1225 +
  1226 + var ind = t.currentTarget.dataset.ind;
  1227 + this.setData({
  1228 + openSpecModal: !0,
  1229 + openSpecModal_ind: ind,
  1230 + });
  1231 +
  1232 + },
  1233 +
  1234 + //---------点击收藏和不收藏------------
  1235 + collectGoods: function () {
  1236 + var t = this, i = getApp().request;
  1237 + var user_id = s.globalData.user_id;
  1238 + if (user_id == '') {
  1239 + getApp().getUserFir(function () {
  1240 + });
  1241 + getApp().showWarning("未登录");
  1242 + return false;
  1243 + } else {
  1244 +
  1245 + if (t.data.is_collect_load) return false;
  1246 + t.data.is_collect_load = 1;
  1247 +
  1248 + if (t.data.is_collect == 1) { //删除收藏
  1249 + i.delete("/api/weshop/goodscollect/del/" + o.stoid + "/" + t.data.collect_id, {
  1250 + success: function (e) {
  1251 + t.data.is_collect_load = 0;
  1252 + if (e.data.code == 0) {
  1253 + t.setData({
  1254 + is_collect: 0,
  1255 + collect_id: 0,
  1256 + });
  1257 + ut.m_toast('取消成功');
  1258 + }
  1259 + }
  1260 + });
  1261 + } else {
  1262 + var timestamp = Date.parse(new Date());
  1263 + timestamp = timestamp / 1000;
  1264 + var d = {
  1265 + goods_id: t.data.data.goods_id,
  1266 + user_id: s.globalData.user_id,
  1267 + store_id: o.stoid,
  1268 + add_time: timestamp,
  1269 + type: 1,
  1270 + };
  1271 + //加入收藏夹就是导购的ID
  1272 + if (getApp().globalData.guide_id) {
  1273 + d.guide_id = getApp().globalData.guide_id;
  1274 + d.guide_type = 2;
  1275 + }
  1276 + if (getApp().globalData.groupchat_id) {
  1277 + d.groupchat_id = getApp().globalData.groupchat_id;
  1278 + }
  1279 + i.post("/api/weshop/goodscollect/save", { //添加收藏
  1280 + data: d,
  1281 + success: function (e) {
  1282 + t.data.is_collect_load = 0;
  1283 + if (e.data.code == 0) {
  1284 + t.setData({
  1285 + is_collect: 1,
  1286 + collect_id: e.data.data.collect_id,
  1287 + });
  1288 + ut.m_toast('收藏成功 在【我的-收藏夹】中查看');
  1289 + }
  1290 + }
  1291 + });
  1292 + }
  1293 + }
  1294 + },
  1295 + //---------联系客服------------
  1296 + contactService: function () {
  1297 + this.getTel()
  1298 + .then(() => {
  1299 + if (self.data.store_tel) {
  1300 + wx.showModal({
  1301 + title: '联系客服',
  1302 + content: '客服热线:' + self.data.store_tel,
  1303 + confirmText: '拨打',
  1304 + success(res) {
  1305 + if (res.confirm) {
  1306 + wx.makePhoneCall({
  1307 + phoneNumber: self.data.store_tel,
  1308 + })
  1309 + }
  1310 + ;
  1311 + },
  1312 + });
  1313 + }
  1314 + ;
  1315 + });
  1316 + },
  1317 + // 获取客服电话
  1318 + getTel() {
  1319 + return new Promise((resolve, reject) => {
  1320 + s.getConfig(function (t) {
  1321 + if (t.store_tel == undefined) {
  1322 + getApp().request.get("/api/weshop/store/get/" + os.stoid, {
  1323 + isShowLoading: 1,
  1324 + data: {},
  1325 + success: function (rs) {
  1326 + getApp().globalData.config = rs.data.data;
  1327 + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) {
  1328 + getApp().my_warnning("商家未设置电话", 0, th);
  1329 + return false;
  1330 + }
  1331 + self.setData({
  1332 + store_tel: rs.data.data.store_tel,
  1333 + });
  1334 + // s.confirmBox("请联系客服:" + rs.data.data.store_tel);
  1335 + }
  1336 + })
  1337 + } else {
  1338 + self.setData({
  1339 + store_tel: t.store_tel,
  1340 + });
  1341 + // s.confirmBox("请联系客服:" + t.store_tel);
  1342 + }
  1343 + ;
  1344 + resolve();
  1345 + });
  1346 + });
  1347 + },
  1348 + //-------获取购物车数量----------
  1349 + requestCardNum: function () {
  1350 + var t = this;
  1351 + getApp().request.get("/api/weshop/cart/page", {
  1352 + data: {
  1353 + store_id: o.stoid,
  1354 + user_id: s.globalData.user_id,
  1355 + state: 0,
  1356 + is_gift: 0
  1357 + },
  1358 + success: function (e) {
  1359 + var num = 0;
  1360 + for (var i = 0; i < e.data.data.pageData.length; i++) {
  1361 + num += e.data.data.pageData[i].goods_num;
  1362 + }
  1363 +
  1364 + //-- 读取服务卡的数量 --
  1365 + getApp().promiseGet("/api/weshop/cartService/page", {
  1366 + data: {
  1367 + store_id: s.globalData.setting.stoid,
  1368 + user_id: s.globalData.user_id,
  1369 + }
  1370 + }).then(res => {
  1371 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  1372 + num += res.data.data.pageData[i].goods_num;
  1373 + }
  1374 + t.setData({cartGoodsNum: num});
  1375 + })
  1376 +
  1377 +
  1378 + }
  1379 + });
  1380 + },
  1381 +
  1382 + //--点击分享事件---
  1383 + onShareAppMessage: function (t) {
  1384 +
  1385 + var th = this;
  1386 + var price = th.data.data.shop_price;
  1387 + if (th.data.prom_act) {
  1388 + price = th.data.prom_act.price;
  1389 +
  1390 + }
  1391 + var title = th.data.data.goods_name;
  1392 + var img = th.data.iurl + th.data.data.image_url;
  1393 + if (th.data.prom_type == 6) {
  1394 + title = th.data.prom_act.share_title;
  1395 + img = th.data.iurl + th.data.prom_act.share_imgurl;
  1396 + }
  1397 +
  1398 +
  1399 + var url = "/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id=" + th.data.gid+"&prom_id="+th.data.prom_id;
  1400 + if (getApp().globalData.user_id) {
  1401 + url += "&first_leader=" + getApp().globalData.user_id;
  1402 + }
  1403 +
  1404 + //-- 如果房间分享,且不是会员分享的 --
  1405 + if (getApp().globalData.room_id &&
  1406 + th.data.data.goods_id == getApp().globalData.room_goods_id &&
  1407 + !getApp().globalData.room_user_share
  1408 + ) {
  1409 + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";
  1410 + }
  1411 +
  1412 +
  1413 + var ob = {
  1414 + title: price + "元 " + title,
  1415 + path: url,
  1416 + imageUrl: img,
  1417 + };
  1418 +
  1419 + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片
  1420 + if (th.data.prom_type == 1) {
  1421 + if (th.data.sele_g && th.data.sele_g.share_title) {
  1422 + title = th.data.sele_g.share_title;
  1423 + ob.title = title;
  1424 + }
  1425 + ;
  1426 + if (th.data.sele_g && th.data.sele_g.share_imgurl) {
  1427 + img = th.data.iurl + th.data.sele_g.share_imgurl;
  1428 + ob.imageUrl = img;
  1429 + }
  1430 + }
  1431 +
  1432 + return ob;
  1433 +
  1434 + },
  1435 +
  1436 + //-----图片失败,默认图片-----
  1437 + bind_bnerr: function (e) {
  1438 + var _errImg = e.target.dataset.errorimg;
  1439 + var _errObj = {};
  1440 + _errObj[_errImg] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  1441 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  1442 + },
  1443 +
  1444 + //-----图片失败,默认图片-----
  1445 + bind_bnerr2: function (e) {
  1446 +
  1447 + var _errImg = e.target.dataset.errorimg;
  1448 + var _errObj = {};
  1449 + _errObj[_errImg] = this.data.iurl + "/miniapp/images/hui_hear_pic.png"
  1450 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  1451 + },
  1452 +
  1453 +
  1454 + //---------拿出门店分类和门店------------
  1455 + get_sto(e) {
  1456 + var is_normal = e;
  1457 + var th = this, that = this;
  1458 +
  1459 + if (e == 1) {
  1460 + th.setData({
  1461 + is_normal: 1
  1462 + })
  1463 + } else {
  1464 + th.setData({
  1465 + is_normal: 0
  1466 + })
  1467 + }
  1468 +
  1469 + this.data.get_sto_ing = 1;
  1470 +
  1471 + var timer_get = setInterval(function () {
  1472 + if (th.data.is_get_local_ok == 0) return false;
  1473 + if (!th.data.fir_def_store) return false;
  1474 + var i = getApp().request;
  1475 + if (!th.data.data) return false;
  1476 + var dd = {
  1477 + store_id: o.stoid,
  1478 + isstop: 0,
  1479 + is_pos: 1,
  1480 + pageSize: 2000
  1481 + }
  1482 + //如果有距离的话
  1483 + if (th.data.lat != null) {
  1484 + dd.lat = th.data.lat;
  1485 + dd.lon = th.data.lon;
  1486 + }
  1487 + clearInterval(timer_get);
  1488 +
  1489 + //如果会员是有默认的门店话
  1490 + if (!th.data.def_pick_store && th.data.fir_def_store) {
  1491 + th.setData({def_pick_store: th.data.fir_def_store});
  1492 + }
  1493 +
  1494 + wx.showLoading({
  1495 + title: '加载中.'
  1496 + });
  1497 + //----------获取门店----------------
  1498 + getApp().request.promiseGet("/api/weshop/pickup/list", {
  1499 + data: dd,
  1500 + }).then(res => {
  1501 + var e = res;
  1502 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
  1503 +
  1504 + var his_cate_num = 0;
  1505 + for (let i in e.data.data.pageData) {
  1506 + let item = e.data.data.pageData[i];
  1507 + if (item.category_id > 0) {
  1508 + his_cate_num = 1;
  1509 + break;
  1510 + }
  1511 + }
  1512 + e.his_cate_num = his_cate_num;
  1513 +
  1514 + //--普通门店排版,服务卡项有指定门店才能使用,所以要筛选一下--
  1515 + setTimeout(function () {
  1516 + var sto_list = th.data.data.storageId;
  1517 + if (sto_list) {
  1518 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  1519 + var it = e.data.data.pageData[k];
  1520 + if (sto_list.indexOf(it.keyid) == -1) {
  1521 + //删除
  1522 + e.data.data.pageData.splice(k--, 1);
  1523 + }
  1524 + }
  1525 +
  1526 + }
  1527 +
  1528 + //如果有秒杀的指定门店
  1529 + if (th.data.prom_type == 1 && th.data.prom_act && th.data.prom_act.pick_up_lists && e.data.data.pageData.length && !is_normal) {
  1530 + var pick_up_lists = th.data.prom_act.pick_up_lists;
  1531 + for (var kq = 0; kq < e.data.data.pageData.length; kq++) {
  1532 + var it0 = e.data.data.pageData[kq];
  1533 + var idx0 = pick_up_lists.findIndex(function (e) {
  1534 + return e.pickup_id == it0.pickup_id;
  1535 + })
  1536 + if (idx0 < 0) {
  1537 + //删除
  1538 + e.data.data.pageData.splice(kq--, 1);
  1539 + }
  1540 + }
  1541 +
  1542 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1543 + //-- 查找一下门店有没有在 --
  1544 + var idx1 = pick_up_lists.findIndex(function (e) {
  1545 + return e.pickup_id == th.data.def_pick_store.pickup_id;
  1546 + })
  1547 + if (idx1 < 0) {
  1548 + //如果是秒杀的指定门店,就要设置秒杀的
  1549 + th.data.def_pick_store.is_no_dis_act = 1;
  1550 + that.setData({
  1551 + def_pick_store: th.data.def_pick_store
  1552 + })
  1553 + }
  1554 + }
  1555 +
  1556 + }
  1557 +
  1558 + //-- 如果门店过滤后,还会是数量 --
  1559 + if (e.data.data.pageData.length) {
  1560 + //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
  1561 + if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  1562 + th.setData({
  1563 + def_pick_store: e.data.data.pageData[0],
  1564 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1565 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1566 + sto_sele_distr: e.data.data.pageData[0].distr_type,
  1567 + sto_sele_keyid: e.data.data.pageData[0].keyid,
  1568 + });
  1569 + th.data.fir_def_store = e.data.data.pageData[0];
  1570 + }
  1571 +
  1572 + //-- 如果有默认选择门店的时候,要把默认门店放在第一位,修改不要配送方式的判断 --
  1573 + if (th.data.def_pick_store && JSON.stringify(th.data.def_pick_store) != '{}') {
  1574 + for (var k = 0; k < e.data.data.pageData.length; k++) {
  1575 + if (e.data.data.pageData[k].pickup_id == th.data.def_pick_store.pickup_id) {
  1576 + e.data.data.pageData.splice(k, 1); //删除
  1577 + break;
  1578 + }
  1579 + }
  1580 + e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
  1581 + }
  1582 +
  1583 + th.setData({all_pick_list: e.data.data.pageData, isshow: 1});
  1584 + th.deal_pickup(e);
  1585 + } else {
  1586 + th.data.get_sto_ing = 0;
  1587 + th.setData({
  1588 + isshow: 1
  1589 + })
  1590 + wx.hideLoading();
  1591 + }
  1592 +
  1593 +
  1594 + }, 800)
  1595 +
  1596 + }
  1597 + })
  1598 + }, 200)
  1599 + },
  1600 + //获取搜索门店输入的值
  1601 + input_store: function (e) {
  1602 + this.setData({
  1603 + keyword: e.detail.value
  1604 + })
  1605 + },
  1606 + //搜索门店
  1607 + searchfn() {
  1608 + let choice_sort_store = this.data.choice_sort_store
  1609 + if (choice_sort_store == 0) { //全局搜索
  1610 + let all_pick_list = this.data.all_pick_list
  1611 + let def_pickpu_list = this.data.def_pickpu_list
  1612 + let keyword = this.data.keyword
  1613 + if (keyword) {
  1614 + let arr = all_pick_list.filter(item => {
  1615 + let i = item.pickup_name.indexOf(keyword)
  1616 + if (i > -1) {
  1617 + return true
  1618 + } else {
  1619 + return false
  1620 + }
  1621 + })
  1622 + if (arr && arr.length > 0) {
  1623 + if (this.data.is_show_sto_cat == 1) {
  1624 + this.setData({
  1625 + def_pickpu_list: arr
  1626 + })
  1627 + } else {
  1628 + this.setData({
  1629 + only_pk: arr
  1630 + })
  1631 + }
  1632 + } else {
  1633 + wx.showToast({
  1634 + title: '没有搜索到门店',
  1635 + icon: 'none',
  1636 + duration: 2000
  1637 + })
  1638 + }
  1639 + } else {
  1640 + if (this.data.is_show_sto_cat == 1) {
  1641 + this.setData({
  1642 + def_pickpu_list: all_pick_list.slice(0, 10)
  1643 + })
  1644 + } else {
  1645 + this.setData({
  1646 + only_pk: all_pick_list
  1647 + })
  1648 + }
  1649 +
  1650 + }
  1651 + } else { //分类下搜索
  1652 + let sec_i = this.data.sec_i
  1653 + let all_sto = this.data.all_sto
  1654 + let old_all_sto = this.data.old_all_sto
  1655 + if (!old_all_sto) {
  1656 + this.setData({
  1657 + old_all_sto: JSON.parse(JSON.stringify(all_sto))
  1658 + })
  1659 + }
  1660 + let sec_sto = this.data.sec_sto
  1661 + let sec_arr = this.data.old_all_sto[sec_i].s_arr
  1662 + let keyword = this.data.keyword
  1663 + let text = 'sec_sto.s_arr'
  1664 + if (keyword) {
  1665 + let arr = sec_arr.filter(item => {
  1666 + let i = item.pickup_name.indexOf(keyword)
  1667 + if (i > -1) {
  1668 + return true
  1669 + } else {
  1670 + return false
  1671 + }
  1672 + })
  1673 + if (arr && arr.length > 0) {
  1674 + this.setData({
  1675 + [text]: arr
  1676 + })
  1677 + } else {
  1678 + wx.showToast({
  1679 + title: '没有搜索到门店',
  1680 + icon: 'none',
  1681 + duration: 2000
  1682 + })
  1683 + }
  1684 + } else {
  1685 + if (this.data.old_all_sto) {
  1686 + this.setData({
  1687 + [text]: this.data.old_all_sto[sec_i].s_arr
  1688 + })
  1689 + } else {
  1690 + this.setData({
  1691 + [text]: all_sto[sec_i].s_arr
  1692 + })
  1693 + }
  1694 + }
  1695 +
  1696 +
  1697 + }
  1698 + },
  1699 +
  1700 +
  1701 + //------------处理门店---------------
  1702 + deal_pickup(e) {
  1703 + var th = this;
  1704 + if (!th.data.data) return false
  1705 + wx.hideLoading();
  1706 + //单总量超出5个的时候
  1707 + if (e.data.data.total > 10 && e.his_cate_num) {
  1708 + getApp().request.get("/api/weshop/storagecategory/page", {
  1709 + data: {
  1710 + store_id: o.stoid,
  1711 + pageSize: 1000,
  1712 + orderField: "sort",
  1713 + orderType: 'asc',
  1714 + },
  1715 + success: function (ee) {
  1716 + if (ee.data.code == 0) {
  1717 +
  1718 + var check_all_cate = 0;
  1719 + if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
  1720 + for (let i in ee.data.data.pageData) {
  1721 + let item = ee.data.data.pageData[i];
  1722 + if (item.is_show == 1) {
  1723 + check_all_cate = 1;
  1724 + break
  1725 + }
  1726 + }
  1727 + }
  1728 +
  1729 + if (check_all_cate) {
  1730 +
  1731 +
  1732 + var sto_cate = ee.data.data.pageData;
  1733 + var sto_arr = e.data.data.pageData;
  1734 + var newarr = new Array();
  1735 + var qita = new Array();
  1736 +
  1737 + var is_del_pk = 0;
  1738 +
  1739 + //----要进行门店分组--------
  1740 + for (var i = 0; i < sto_arr.length; i++) {
  1741 + //找一下这个门店有没有在分类数组内
  1742 + var find2 = 0, find2name = "", sort = 0;
  1743 + is_del_pk = 0;
  1744 + for (var m = 0; m < sto_cate.length; m++) {
  1745 + if (sto_arr[i].category_id == sto_cate[m].cat_id) {
  1746 + if (sto_cate[m].is_show != 1) {
  1747 + is_del_pk = 1;
  1748 + sto_arr.splice(i, 1);
  1749 + i--;
  1750 + } else {
  1751 + find2 = sto_cate[m].cat_id;
  1752 + find2name = sto_cate[m].cat_name;
  1753 + sort = sto_cate[m].sort;
  1754 + is_del_pk = 0;
  1755 + }
  1756 + break;
  1757 + }
  1758 + }
  1759 + if (is_del_pk) continue;
  1760 +
  1761 + if (newarr.length > 0) {
  1762 + var find = 0;
  1763 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1764 + if (find2 != 0) {
  1765 + for (var ii = 0; ii < newarr.length; ii++) {
  1766 + if (sto_arr[i].category_id == newarr[ii].cat_id) {
  1767 + newarr[ii].s_arr.push(sto_arr[i]);
  1768 + find = 1;
  1769 + break;
  1770 + }
  1771 + }
  1772 + if (find == 0) {
  1773 + var arr0 = new Array();
  1774 + arr0.push(sto_arr[i]);
  1775 + var item = {
  1776 + cat_id: find2,
  1777 + name: find2name,
  1778 + sort: sort,
  1779 + s_arr: arr0
  1780 + };
  1781 + newarr.push(item);
  1782 + }
  1783 + } else {
  1784 + qita.push(sto_arr[i]);
  1785 + }
  1786 + } else {
  1787 + //如果有找到,那门店就在这个分组内,否则,分类就要排在其他
  1788 + if (find2 != 0) {
  1789 + var arr0 = new Array();
  1790 + arr0.push(sto_arr[i]);
  1791 + var item = {
  1792 + cat_id: find2,
  1793 + name: find2name,
  1794 + sort: sort,
  1795 + s_arr: arr0
  1796 + };
  1797 + newarr.push(item);
  1798 + } else {
  1799 + qita.push(sto_arr[i]);
  1800 + }
  1801 + }
  1802 + }
  1803 +
  1804 + var def_arr = new Array();
  1805 + //-- 开始就看10个门店 --
  1806 + for (var k = 0; k < 10; k++) {
  1807 + if (k == sto_arr.length) break;
  1808 + def_arr.push(sto_arr[k]);
  1809 + }
  1810 +
  1811 + th.setData({
  1812 + def_pickpu_list: def_arr,
  1813 + pickpu_list: ee.data.data.pageData
  1814 + });
  1815 +
  1816 + //门店分类要排序下
  1817 + function compare(property) {
  1818 + return function (a, b) {
  1819 + var value1 = a[property];
  1820 + var value2 = b[property];
  1821 + return value1 - value2;
  1822 + }
  1823 + }
  1824 +
  1825 + if (newarr.length > 0)
  1826 + newarr.sort(compare("sort"));
  1827 +
  1828 + //----安排其他的分类-----
  1829 + if (qita.length > 0) {
  1830 + var item = {
  1831 + cat_id: -1,
  1832 + name: "其他",
  1833 + s_arr: qita
  1834 + };
  1835 + newarr.push(item);
  1836 + }
  1837 +
  1838 + var sd = {
  1839 + all_sto: newarr,
  1840 + is_show_sto_cat: 1
  1841 + }
  1842 + if (!sto_arr || sto_arr.length <= 10) {
  1843 + sd.is_show_sto_cat = -1;
  1844 + sd.only_pk = sto_arr;
  1845 + }
  1846 + th.setData(sd);
  1847 +
  1848 + } else {
  1849 + th.setData({
  1850 + is_show_sto_cat: -1,
  1851 + only_pk: e.data.data.pageData
  1852 + });
  1853 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  1854 + if (!th.data.def_pick_store) {
  1855 + th.setData({def_pick_store: e.data.data.pageData[0]})
  1856 + }
  1857 + }
  1858 + } else {
  1859 + th.setData({
  1860 + is_show_sto_cat: -1,
  1861 + only_pk: e.data.data.pageData
  1862 + });
  1863 + //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
  1864 + if (!th.data.def_pick_store) {
  1865 + th.setData({def_pick_store: e.data.data.pageData[0]})
  1866 + }
  1867 + }
  1868 + th.data.get_sto_ing = 0;
  1869 + }
  1870 + });
  1871 + } else {
  1872 + th.data.get_sto_ing = 0;
  1873 +
  1874 + th.setData({
  1875 + is_show_sto_cat: 0,
  1876 + only_pk: e.data.data.pageData
  1877 + });
  1878 + //-----如果没有默认门店,要取第一个门店作为默认店------
  1879 + if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
  1880 +
  1881 + if (e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
  1882 + th.setData({
  1883 + def_pick_store: e.data.data.pageData[0],
  1884 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1885 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1886 + sto_sele_distr: e.data.data.pageData[0].distr_type,
  1887 + sto_sele_keyid: e.data.data.pageData[0].keyid,
  1888 + })
  1889 + }
  1890 +
  1891 + }
  1892 + }
  1893 + },
  1894 +
  1895 + //加载更多是靠这个函数
  1896 + onReachBottom: function () {
  1897 + if (this.data.activeCategoryId == 2) {
  1898 + if (!this.data.comments_no_more) this.requestComments_new();
  1899 + }
  1900 +
  1901 + var goods_list = this.selectComponent("#goods_list"); //组件的id
  1902 + if (goods_list) goods_list.get_list();
  1903 + },
  1904 +
  1905 +
  1906 + //---小于10的格式化函数----
  1907 + timeFormat(param) {
  1908 + return param < 10 ? '0' + param : param;
  1909 + },
  1910 +
  1911 +
  1912 + // ----视频图片----
  1913 + // 图片计数器
  1914 + swiperChange: function (e) {
  1915 + var that = this;
  1916 + if (e.detail.current > 0) {
  1917 + that.setData({
  1918 + hiddenn: 1,
  1919 + videopicture: 1,
  1920 + })
  1921 + } else {
  1922 + that.setData({
  1923 + hiddenn: 0,
  1924 + videopicture: 0,
  1925 + })
  1926 + }
  1927 + if (e.detail.source == 'touch') {
  1928 + that.setData({
  1929 + current: e.detail.current
  1930 + })
  1931 + }
  1932 + },
  1933 +
  1934 + /*---视频相关--*/
  1935 + videopicture: function (e) {
  1936 + var vipi = e.currentTarget.dataset.vipi;
  1937 + this.setData({
  1938 + videopicture: vipi,
  1939 + swiperCurrent: vipi,
  1940 + noon: 0,
  1941 + current: 1
  1942 + });
  1943 + },
  1944 +
  1945 + videoPlay: function (e) {
  1946 + var _index = e.currentTarget.id
  1947 + this.setData({
  1948 + _index: _index,
  1949 + noon: 1
  1950 + })
  1951 +
  1952 + setTimeout(function () {
  1953 + //将点击视频进行播放
  1954 + var videoContext = wx.createVideoContext(_index)
  1955 + videoContext.play();
  1956 + }, 500)
  1957 + },
  1958 +
  1959 + //--获取头像的本地缓存,回调写法--
  1960 + get_head_temp: function (tt, func) {
  1961 + var ee = this;
  1962 + if (ee.data.share_head) {
  1963 + tt(func);
  1964 + return false;
  1965 + }
  1966 + //---获取分享图片的本地地址,头像和商品图片----
  1967 + var path2 = getApp().globalData.userInfo ? getApp().globalData.userInfo.head_pic : '';
  1968 + if (path2 == "") {
  1969 + ee.data.share_head = "../../../../images/share/hui_hear_pic.png";
  1970 + tt(func);
  1971 + } else {
  1972 + path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
  1973 + path2 = path2.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
  1974 + wx.getImageInfo({
  1975 + src: path2,
  1976 + success: function (res) {
  1977 + //res.path是网络图片的本地地址
  1978 + ee.data.share_head = res.path;
  1979 + tt(func);
  1980 + },
  1981 + fail: function (res) {
  1982 + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
  1983 + tt(func);
  1984 + }
  1985 + });
  1986 + }
  1987 + },
  1988 +
  1989 + //--获取商品图片的本地缓存,回调写法--
  1990 + get_goods_temp: function (tt) {
  1991 + var ee = this;
  1992 + if (ee.data.share_goods_img) {
  1993 + tt();
  1994 + return false;
  1995 + }
  1996 +
  1997 + var img = ee.data.iurl + ee.data.data.image_url;
  1998 + if (ee.data.prom_act && ee.data.prom_act.share_img) {
  1999 + img = ee.data.iurl + ee.data.prom_act.share_img;
  2000 + }
  2001 +
  2002 + //获取商品是分享图信息
  2003 + wx.getImageInfo({
  2004 + src: img,
  2005 + success: function (res) {
  2006 + //res.path是网络图片的本地地址
  2007 + ee.data.share_goods_img = res.path;
  2008 + tt();
  2009 + },
  2010 + fail: function (res) {
  2011 + //获取默认空白图
  2012 + wx.getImageInfo({
  2013 + src: ee.data.iurl + '/miniapp/images/default_g_img.gif',
  2014 + success: function (res) {
  2015 + ee.data.share_goods_img = res.path; //分享的图片不能用网络的
  2016 + tt();
  2017 + }
  2018 + })
  2019 +
  2020 + }
  2021 + });
  2022 + },
  2023 +
  2024 +
  2025 + //--跳转到商品详情页面--
  2026 + go_goods: function (e) {
  2027 + var gid = e.currentTarget.dataset.gid;
  2028 + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + gid;
  2029 + getApp().goto(url);
  2030 + },
  2031 +
  2032 +
  2033 + pop_err_img: function (e) {
  2034 + var txt = e.currentTarget.dataset.errorimg;
  2035 + var ob = {};
  2036 + ob[txt] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  2037 + this.setData(ob);
  2038 + },
  2039 +
  2040 + // 选择门店
  2041 + choice_store: function (ee) {
  2042 + this.setData({
  2043 + keyword: ''
  2044 + })
  2045 + var th = this;
  2046 + var ind = ee.currentTarget.dataset.ind;
  2047 + var bconfig = th.data.bconfig;
  2048 +
  2049 + //--先判断会员状态--
  2050 + var user_info = getApp().globalData.userInfo;
  2051 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  2052 + // wx.navigateTo({
  2053 + // url: '/packageE/pages/togoin/togoin',
  2054 + // })
  2055 + // return false;
  2056 + // }
  2057 +
  2058 +
  2059 + //如果开启了,则不在选择门店
  2060 + if (this.data.sys_switch.is_pricing_open_store && getApp().globalData.pk_store) {
  2061 + return false;
  2062 + }
  2063 + if (!th.data.only_pk && !th.data.def_pickpu_list) {
  2064 + getApp().confirmBox("暂无可售门店", null, 25000, !1);
  2065 + return false;
  2066 + }
  2067 +
  2068 + if (th.data.only_pk && !th.data.only_pk.length) {
  2069 + getApp().confirmBox("暂无可售门店", null, 25000, !1);
  2070 + return false;
  2071 + }
  2072 + if (th.data.def_pickpu_list && !th.data.def_pickpu_list.length) {
  2073 + getApp().confirmBox("暂无可售门店", null, 25000, !1);
  2074 + return false;
  2075 + }
  2076 +
  2077 +
  2078 + if (bconfig && bconfig.is_sort_storage) {
  2079 + wx.getLocation({
  2080 + type: 'gcj02',
  2081 + success: function (res) {
  2082 +
  2083 + th.data.lat = res.latitude;
  2084 + th.data.lon = res.longitude;
  2085 + th.data.is_get_local_ok = 1;
  2086 + th.setData({is_gps: 1});
  2087 + th.get_sto(th.data.is_normal);
  2088 + },
  2089 + fail: function (res) {
  2090 +
  2091 + th.data.is_get_local_ok = 1;
  2092 + th.get_sto(th.data.is_normal);
  2093 + if (res.errCode == 2) {
  2094 + th.setData({is_gps: 0});
  2095 + if (th.data.is_gps == 0) {
  2096 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  2097 + }
  2098 + } else {
  2099 + th.setData({is_gps: "3"});
  2100 + }
  2101 +
  2102 + }
  2103 + })
  2104 + } else {
  2105 + th.data.is_get_local_ok = 1;
  2106 + th.get_sto(th.data.is_normal);
  2107 + }
  2108 +
  2109 + if (ind != undefined && ind != null) {
  2110 + this.setData({
  2111 + open_ind_store: ind,
  2112 + store: 1,
  2113 + openSpecModal: !1,
  2114 + openSpecModal_pt: !1
  2115 + })
  2116 + } else {
  2117 + this.setData({
  2118 + store: 1,
  2119 + openSpecModal: !1,
  2120 + openSpecModal_pt: !1
  2121 + })
  2122 + }
  2123 + },
  2124 + //关闭选择门店
  2125 + close_popup: function (e) {
  2126 + var th = this;
  2127 + this.setData({
  2128 + store: 0,
  2129 + choice_sort_store: 0,
  2130 + sort_store: 0,
  2131 + fir_pick_index: 0,
  2132 + sec_pick_index: 0
  2133 + })
  2134 +
  2135 + var openindstore = this.data.open_ind_store;
  2136 + if (openindstore == 1) {
  2137 + th.setData({
  2138 + openSpecModal: !0,
  2139 + openSpecModal_ind: openindstore,
  2140 + });
  2141 + } else if (openindstore == 2) {
  2142 + th.setData({
  2143 + openSpecModal: !0,
  2144 + openSpecModal_ind: openindstore,
  2145 + });
  2146 + } else if (openindstore == 4) { //4就是拼团
  2147 + th.setData({
  2148 + openSpecModal_pt: 1, //打开拼团购买界面
  2149 + store: 0, //关闭门店
  2150 + choice_sort_store: 0, //关闭门店2级
  2151 + sort_store: 0, //关闭门店2级
  2152 + });
  2153 + } else {
  2154 + th.setData({
  2155 + store: 0,
  2156 + choice_sort_store: 0,
  2157 + sort_store: 0
  2158 + })
  2159 + }
  2160 + },
  2161 +
  2162 + //选择更多门店
  2163 + more_store: function () {
  2164 + this.setData({
  2165 + sort_store: 1
  2166 + });
  2167 + },
  2168 +
  2169 + sort_store: function () {
  2170 + },
  2171 + // 返回按钮
  2172 + returns: function () {
  2173 + this.setData({
  2174 + sort_store: 0,
  2175 + choice_sort_store: 0
  2176 + });
  2177 + },
  2178 + //---选择分类门店---
  2179 + choice_sort_store: function (e) {
  2180 + var index = e.currentTarget.dataset.index;
  2181 + var region_name = e.currentTarget.dataset.region;
  2182 + var item = this.data.all_sto[index];
  2183 + this.setData({
  2184 + region_name: region_name,
  2185 + sort_store: 0,
  2186 + choice_sort_store: 1,
  2187 + sec_sto: item,
  2188 + sec_i: index,
  2189 + sec_pick_index: 0
  2190 + });
  2191 + },
  2192 +
  2193 + choose_for_store_fir: function (e) {
  2194 + var index_c = e.currentTarget.dataset.ind;
  2195 + var th = this;
  2196 + th.setData({
  2197 + fir_pick_index: index_c
  2198 + })
  2199 +
  2200 + },
  2201 +
  2202 + //确定def_pick为选择的门店
  2203 + sure_pick: function (e) {
  2204 + var th = this;
  2205 + var item = null;
  2206 + var openindstore = th.data.open_ind_store;
  2207 +
  2208 + if (th.data.choice_sort_store == 0) {
  2209 + var index = th.data.fir_pick_index;
  2210 + if (th.data.is_show_sto_cat == 1) {
  2211 + item = th.data.def_pickpu_list[index];
  2212 + } else {
  2213 + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候
  2214 + }
  2215 +
  2216 + } else {
  2217 + var index = th.data.sec_pick_index;
  2218 + item = th.data.sec_sto.s_arr[index];
  2219 + }
  2220 +
  2221 + if (!item) return false;
  2222 +
  2223 +
  2224 + var ser_card = this.data.data;
  2225 + //判断门店的配送方式是不是匹配
  2226 + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(item.keyid) == -1) {
  2227 + wx.showToast({
  2228 + title: "该门店无此服务项目,请重新选择!",
  2229 + icon: 'none',
  2230 + duration: 2000
  2231 + });
  2232 + return false;
  2233 + }
  2234 +
  2235 + if (!item) return false;
  2236 +
  2237 + th.setData({
  2238 + def_pick_store: item,
  2239 + sto_sele_name: item.pickup_name,
  2240 + sto_sele_id: item.pickup_id,
  2241 + sto_sele_keyid: item.keyid,
  2242 + sto_sele_distr: item.distr_type,
  2243 + store: 0,
  2244 + choice_sort_store: 0,
  2245 + fir_pick_index: 0
  2246 + });
  2247 +
  2248 + if (openindstore == 1) {
  2249 + th.setData({
  2250 + openSpecModal: !0,
  2251 + openSpecModal_ind: openindstore,
  2252 + });
  2253 + } else if (openindstore == 2) {
  2254 + th.setData({
  2255 + openSpecModal: !0,
  2256 + openSpecModal_ind: openindstore,
  2257 + });
  2258 + } else if (openindstore == 4) { //4就是拼团
  2259 + th.setData({
  2260 + openSpecModal_pt: 1, //打开拼团购买界面
  2261 + store: 0, //关闭门店
  2262 + choice_sort_store: 0, //关闭门店2级
  2263 + sort_store: 0, //关闭门店2级
  2264 + });
  2265 + } else {
  2266 + th.setData({
  2267 + store: 0,
  2268 + choice_sort_store: 0,
  2269 + sort_store: 0
  2270 + })
  2271 + }
  2272 + },
  2273 +
  2274 + //---点击二级之后的选择---
  2275 + choose_for_store: function (e) {
  2276 + var index_c = e.currentTarget.dataset.ind;
  2277 + var th = this;
  2278 + th.setData({
  2279 + sec_pick_index: index_c,
  2280 + fir_pick_index: index_c
  2281 + })
  2282 +
  2283 + },
  2284 + //把选择的门店设置成默认的门店def_pick
  2285 + set_def_pick: function (e) {
  2286 + var th = this;
  2287 + var item = null;
  2288 + if (th.data.choice_sort_store == 0) {
  2289 + var index = th.data.fir_pick_index;
  2290 + if (th.data.is_show_sto_cat == 1) {
  2291 + item = th.data.def_pickpu_list[index];
  2292 + } else {
  2293 + item = th.data.only_pk ? th.data.only_pk[index] : null; //当没有门店分类的时候
  2294 + }
  2295 + } else {
  2296 + var index = th.data.sec_pick_index;
  2297 + item = th.data.sec_sto.s_arr[index];
  2298 + }
  2299 +
  2300 + if (!item) return false;
  2301 +
  2302 + //判断门店的配送方式是不是匹配
  2303 + var ser_card = this.data.data;
  2304 + //判断门店的配送方式是不是匹配
  2305 + if (ser_card.storageId != null && ser_card.storageId != "" && ser_card.storageId.indexOf(item.keyid) == -1) {
  2306 + wx.showToast({
  2307 + title: "该门店无此服务项目,请重新选择!",
  2308 + icon: 'none',
  2309 + duration: 2000
  2310 + });
  2311 + return false;
  2312 + }
  2313 +
  2314 +
  2315 + var store_id = o.stoid;
  2316 + var user_id = getApp().globalData.user_id;
  2317 + var def_pickup_id = item.pickup_id;
  2318 +
  2319 + getApp().request.put('/api/weshop/users/update', {
  2320 + data: {
  2321 + user_id: user_id,
  2322 + def_pickup_id: def_pickup_id
  2323 + },
  2324 + success: function (res) {
  2325 + if (res.data.code == 0) {
  2326 + if (th.data.choice_sort_store == 0) th.setData({
  2327 + fir_pick_index: 0
  2328 + });
  2329 + getApp().globalData.pk_store = item;
  2330 + } else {
  2331 + //s.showWarning("设置默认门店地址失败", null, 500, !1);
  2332 + getApp().my_warnning("设置默认门店地址失败", 0, th)
  2333 + }
  2334 +
  2335 + }
  2336 + });
  2337 +
  2338 +
  2339 + if (!item) return false;
  2340 +
  2341 + th.setData({
  2342 + def_pick_store: item,
  2343 + sto_sele_name: item.pickup_name,
  2344 + sto_sele_id: item.pickup_id,
  2345 + sto_sele_keyid: item.keyid,
  2346 + sto_sele_distr: item.distr_type,
  2347 + store: 0,
  2348 + choice_sort_store: 0
  2349 + });
  2350 +
  2351 + var openindstore = th.data.open_ind_store;
  2352 + if (openindstore == 1) {
  2353 + th.setData({
  2354 + openSpecModal: !0,
  2355 + openSpecModal_ind: openindstore,
  2356 + store: 0,
  2357 + choice_sort_store: 0,
  2358 + sort_store: 0,
  2359 + });
  2360 + } else if (openindstore == 2) {
  2361 + th.setData({
  2362 + openSpecModal: !0,
  2363 + openSpecModal_ind: openindstore,
  2364 + store: 0,
  2365 + choice_sort_store: 0,
  2366 + sort_store: 0,
  2367 + });
  2368 + } else if (openindstore == 4) { //4就是拼团
  2369 + th.setData({
  2370 + openSpecModal_pt: 1, //打开拼团购买界面
  2371 + store: 0, //关闭门店
  2372 + choice_sort_store: 0, //关闭门店2级
  2373 + sort_store: 0, //关闭门店2级
  2374 + });
  2375 + } else {
  2376 + th.setData({
  2377 + store: 0,
  2378 + choice_sort_store: 0,
  2379 + sort_store: 0,
  2380 + })
  2381 + }
  2382 +
  2383 + },
  2384 +
  2385 + wait_for_store_config: function () {
  2386 + var th = this;
  2387 + var t_time = setInterval(function () {
  2388 + if (th.data.bconfig == null) false;
  2389 + var e = th.data.bconfig;
  2390 + if (e && e.is_sort_storage) {
  2391 + wx.getLocation({
  2392 + type: 'gcj02',
  2393 + success: function (res) {
  2394 + th.data.lat = res.latitude;
  2395 + th.data.lon = res.longitude;
  2396 + th.data.is_get_local_ok = 1;
  2397 + },
  2398 + fail: function (res) {
  2399 + if (res.errCode == 2) {
  2400 + th.setData({
  2401 + is_gps: 0
  2402 + });
  2403 + if (th.data.is_gps == 0) {
  2404 + getApp().confirmBox("请开启GPS定位", null, 10000, !1);
  2405 + }
  2406 +
  2407 + } else {
  2408 + th.setData({
  2409 + is_gps: "3"
  2410 + });
  2411 + }
  2412 +
  2413 + th.data.is_get_local_ok = 1;
  2414 + }
  2415 + })
  2416 + } else {
  2417 + th.data.is_get_local_ok = 1;
  2418 + }
  2419 + clearInterval(t_time);
  2420 + }, 500)
  2421 + },
  2422 +
  2423 +
  2424 + //-- 根据ID拿出门店 --
  2425 + get_pick_from_list(pid) {
  2426 + var all_pick_list = this.data.all_pick_list;
  2427 + for (var i in all_pick_list) {
  2428 + var item = all_pick_list[i];
  2429 + if (item.pickup_id == pid) {
  2430 + return item;
  2431 + }
  2432 + }
  2433 + },
  2434 +
  2435 + closePoster() {
  2436 + this.setData({
  2437 + showPoster: false,
  2438 + });
  2439 + },
  2440 +
  2441 + // 保存图片到手机
  2442 + savePic() {
  2443 + console.log('保存图片');
  2444 + var self = this;
  2445 + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限
  2446 + this.getSetting().then((res) => {
  2447 + // 判断用户是否授权了保存到相册的权限,如果没有发起授权
  2448 + if (!res.authSetting['scope.writePhotosAlbum']) {
  2449 + this.authorize().then(() => {
  2450 + // 同意授权后保存下载文件
  2451 + this.saveImage(self.data.shareImgPath)
  2452 + .then(() => {
  2453 + self.setData({
  2454 + showPoster: false
  2455 + });
  2456 + });
  2457 + })
  2458 + } else {
  2459 + // 如果已经授权,保存下载文件
  2460 + this.saveImage(self.data.shareImgPath)
  2461 + .then(() => {
  2462 + self.setData({showPoster: false});
  2463 + });
  2464 + }
  2465 +
  2466 + })
  2467 + },
  2468 +
  2469 + // 获取用户已经授予了哪些权限
  2470 + getSetting() {
  2471 + return new Promise((resolve, reject) => {
  2472 + wx.getSetting({
  2473 + success: res => {
  2474 + resolve(res)
  2475 + }
  2476 + })
  2477 + })
  2478 + },
  2479 +
  2480 + // 发起首次授权请求
  2481 + authorize() {
  2482 + // isFirst 用来记录是否为首次发起授权,
  2483 + // 如果首次授权拒绝后,isFirst赋值为1
  2484 + let isFirst = wx.getStorageSync('isFirst') || 0;
  2485 + return new Promise((resolve, reject) => {
  2486 + wx.authorize({
  2487 + scope: 'scope.writePhotosAlbum',
  2488 + // 同意授权
  2489 + success: () => {
  2490 + resolve();
  2491 + },
  2492 + // 拒绝授权,这里是用户拒绝授权后的回调
  2493 + fail: res => {
  2494 + if (isFirst === 0) {
  2495 + wx.setStorageSync('isFirst', 1);
  2496 + wx.showToast({
  2497 + title: '保存失败',
  2498 + icon: 'none',
  2499 + duration: 1000
  2500 + })
  2501 + } else {
  2502 + this.showModal();
  2503 + }
  2504 + console.log('拒绝授权');
  2505 + reject();
  2506 + }
  2507 + })
  2508 + })
  2509 + },
  2510 +
  2511 + // 保存图片到系统相册
  2512 + saveImage(saveUrl) {
  2513 + var self = this;
  2514 + return new Promise((resolve, reject) => {
  2515 + wx.saveImageToPhotosAlbum({
  2516 + filePath: saveUrl,
  2517 + success: (res) => {
  2518 + wx.showToast({
  2519 + title: '保存成功',
  2520 + duration: 1000,
  2521 + });
  2522 + self.setData({
  2523 + showPlaybill: 'true'
  2524 + });
  2525 + resolve();
  2526 + },
  2527 + fail: () => {
  2528 + wx.showToast({
  2529 + title: '保存失败',
  2530 + duration: 1000,
  2531 + });
  2532 + }
  2533 + })
  2534 + })
  2535 + },
  2536 +
  2537 + previewImage() {
  2538 + getApp().pre_img(this.data.shareImgPath);
  2539 + },
  2540 +
  2541 + onShareTimeline() {
  2542 + getApp().globalData.no_clear = 1
  2543 +
  2544 + var th = this;
  2545 + var price = th.data.data.shop_price;
  2546 + if (th.data.prom_act) {
  2547 + price = th.data.prom_act.price;
  2548 +
  2549 + }
  2550 + var title = th.data.data.goods_name;
  2551 + // var img=th.data.data.original_img;
  2552 + var img = th.data.iurl + th.data.data.image_url;
  2553 + if (th.data.prom_type == 6) {
  2554 + title = th.data.prom_act.share_title;
  2555 + img = th.data.iurl + th.data.prom_act.share_imgurl;
  2556 + }
  2557 +
  2558 + var url = "goods_id=" + th.data.gid;
  2559 + if (getApp().globalData.user_id) {
  2560 + url += "&first_leader=" + getApp().globalData.user_id;
  2561 + }
  2562 +
  2563 + //-- 如果房间分享,且不是会员分享的 --
  2564 + if (getApp().globalData.room_id &&
  2565 + th.data.data.goods_id == getApp().globalData.room_goods_id &&
  2566 + !getApp().globalData.room_user_share
  2567 + ) {
  2568 + url += "&room_id=" + getApp().globalData.room_id + "&room_user_share=1";
  2569 + }
  2570 +
  2571 + // 如果服务卡参加秒杀活动,且后台设置了分享标题和分享图片
  2572 + if (th.data.prom_type == 1) {
  2573 + if (th.data.sele_g && th.data.sele_g.share_imgurl) {
  2574 + img = th.data.iurl + th.data.sele_g.share_imgurl;
  2575 + }
  2576 + ;
  2577 + }
  2578 + ;
  2579 +
  2580 + return {
  2581 + title: price + "元 " + title,
  2582 + imageUrl: img,
  2583 + query: url
  2584 + }
  2585 + },
  2586 +
  2587 +
  2588 + clickCollapse() {
  2589 + this.setData({
  2590 + flag: !this.data.flag,
  2591 + })
  2592 + },
  2593 +
  2594 + //---------联系微信客服------------
  2595 + con_weixin: function () {
  2596 + var url = this.data.sys_switch.weapp_customertype_url;
  2597 + var id = this.data.sys_switch.weapp_customertype_appid;
  2598 + wx.openCustomerServiceChat({
  2599 + extInfo: {url: url},
  2600 + corpId: id,
  2601 + success(res) {
  2602 + }
  2603 + })
  2604 + },
  2605 +
  2606 + //评论的调用
  2607 + requestComments_new: async function () {
  2608 + var e = this, th = e, ee = e;
  2609 + var tp = e.data.activeCategoryId3;
  2610 + var t = '/api/weshop/serviceComment/pageComment?page=' + e.data.c_curr_p;
  2611 +
  2612 + wx.showLoading();
  2613 + var req_where = {
  2614 + store_id: o.stoid, pageSize: 5, is_show: 1,
  2615 + parent_id: 0, goods_id: th.data.gid, commenttype: tp,
  2616 + service_id: this.data.gid,
  2617 + }
  2618 + if (getApp().globalData.userInfo) {
  2619 + req_where.userId = getApp().globalData.user_id;
  2620 + }
  2621 +
  2622 + var rs_data = null;
  2623 + await getApp().request.promiseGet(t, {data: req_where}).then(res => {
  2624 + var tot = res.data.data.total;
  2625 + e.data.c_curr_p++;
  2626 + e.setData({
  2627 + com_num: tot, //已经有加载
  2628 + });
  2629 + if (res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
  2630 + rs_data = res.data.data.pageData;
  2631 + } else {
  2632 + th.setData({comments_no_more: 1, auto: 1});
  2633 + }
  2634 + })
  2635 +
  2636 + if (rs_data) {
  2637 + //var cda = th.data.comments;
  2638 + var cda = rs_data, com_data = th.data.comments;
  2639 + for (var ind in cda) {
  2640 + var ep = cda[ind];
  2641 + if (cda[ind].head_pic == '') {
  2642 + cda[ind].head_pic = th.data.iurl + "/miniapp/images/hui_hear_pic.png";
  2643 + }
  2644 + if (ep.weapp_img != "" && ut.isString(ep.weapp_img)) {
  2645 + cda[ind].weapp_img = JSON.parse(ep.weapp_img);
  2646 + }
  2647 + if (ep.img != "" && ut.isString(ep.img)) {
  2648 + cda[ind].img = ut.unserialize(ep.img);
  2649 + }
  2650 +
  2651 + //--测量多有字的宽带,计算有多少行--
  2652 + var widh = ut.measureText(ep.content, 30);
  2653 + var lines = widh / 712;
  2654 + cda[ind].seeMore = false;
  2655 + if (lines > 3) cda[ind].seeMore = true;
  2656 +
  2657 + await getApp().request.promiseGet("/api/weshop/serviceComment/pageComment", {
  2658 + data: {
  2659 + store_id: o.stoid,
  2660 + parent_id: ep.comment_id,
  2661 + service_id: this.data.gid,
  2662 + }
  2663 + }).then(res => {
  2664 + if (res.data.data.pageData && res.data.data.pageData.length > 0) {
  2665 + cda[ind].replay_list = res.data.data.pageData;
  2666 + }
  2667 + })
  2668 + }
  2669 +
  2670 + if (!com_data) com_data = cda;
  2671 + else com_data = com_data.concat(cda);
  2672 +
  2673 + th.setData({comments: com_data});
  2674 + }
  2675 + th.setData({get_c: 1});
  2676 + wx.hideLoading();
  2677 + },
  2678 +
  2679 +
  2680 + //--点赞功能--
  2681 + click_zan: function (e) {
  2682 + var com_id = e.currentTarget.dataset.com_id;
  2683 + var item_id = e.currentTarget.dataset.item_id;
  2684 + var app = getApp(),
  2685 + th = this;
  2686 +
  2687 + if (app.globalData.userInfo == null || app.globalData.userInfo == undefined) {
  2688 + app.confirmBox("您还未登录");
  2689 + return false;
  2690 + }
  2691 +
  2692 + var iszan = th.data.comments[item_id].userZanNum;
  2693 + if (this.data.iszaning) return false;
  2694 + this.data.iszaning = 1;
  2695 +
  2696 +
  2697 + app.request.post("/api/weshop/serviceCommentZan/save", {
  2698 + data: {
  2699 + store_id: o.stoid,
  2700 + user_id: app.globalData.user_id,
  2701 + goods_id: th.data.gid,
  2702 + service_id: th.data.gid,
  2703 + comment_id: com_id
  2704 + },
  2705 + success: function (ee) {
  2706 +
  2707 + if (ee.data.code == "-1") {
  2708 + app.my_warnning("不能给自己点赞", 0, th);
  2709 + th.data.iszaning = 0;
  2710 + return;
  2711 + }
  2712 +
  2713 + if (ee.data.code == 0 && iszan != 1) {
  2714 + var num = th.data.comments[item_id].zan_num;
  2715 + num++;
  2716 + var text = "comments[" + item_id + "].zan_num";
  2717 + var text1 = "comments[" + item_id + "].userZanNum";
  2718 + var _errObj = {};
  2719 + _errObj[text] = num;
  2720 + _errObj[text1] = 1;
  2721 + th.setData(_errObj);
  2722 +
  2723 + } else {
  2724 + var num = th.data.comments[item_id].zan_num;
  2725 + num--;
  2726 + var text = "comments[" + item_id + "].zan_num";
  2727 + var text1 = "comments[" + item_id + "].userZanNum";
  2728 + var _errObj = {};
  2729 + _errObj[text] = num;
  2730 + _errObj[text1] = 0;
  2731 + th.setData(_errObj);
  2732 + }
  2733 +
  2734 + setTimeout(function () {
  2735 + th.data.iszaning = 0;
  2736 + }, 500)
  2737 +
  2738 + }
  2739 + })
  2740 + },
  2741 +
  2742 +
  2743 + //--外侧评价的点击效果---
  2744 + clik_evaluate: function (e) {
  2745 + var val = e.currentTarget.dataset.val;
  2746 + this.setData({
  2747 + activeCategoryId: 2,
  2748 + activeCategoryId3: val,
  2749 + comments: null
  2750 + });
  2751 + this.requestComments_new();
  2752 + },
  2753 +
  2754 +
  2755 + //显示全部
  2756 + toggleHandler: function (e) {
  2757 + var that = this,
  2758 + index = e.currentTarget.dataset.index;
  2759 + for (var i = 0; i < that.data.comments.length; i++) {
  2760 + if (index == i) {
  2761 + for (var i = 0; i < that.data.comments.length; i++) {
  2762 + that.data.comments[index].auto = true;
  2763 + that.data.comments[index].seeMore = false;
  2764 + }
  2765 + }
  2766 + }
  2767 + that.setData({
  2768 + comments: that.data.comments
  2769 + })
  2770 + },
  2771 +
  2772 + //收起更多
  2773 + toggleContent: function (e) {
  2774 + var that = this,
  2775 + index = e.currentTarget.dataset.index;
  2776 + for (var i = 0; i < that.data.comments.length; i++) {
  2777 + if (index == i) {
  2778 + that.data.comments[index].auto = true;
  2779 + that.data.comments[index].seeMore = true;
  2780 + }
  2781 + }
  2782 + that.setData({
  2783 + comments: that.data.comments
  2784 + })
  2785 + },
  2786 +
  2787 + //--查看评价--
  2788 + look_pj: function () {
  2789 + this.tabComment();
  2790 + this.doScrollTop();
  2791 + },
  2792 +
  2793 + previewCommentImgs_w: function (t) {
  2794 + var e = this.data.comments[t.currentTarget.dataset.cidx].weapp_img;
  2795 + var b = e.slice()
  2796 + // for (var i in b) {
  2797 + // b[i] = this.data.iurl + e[i];
  2798 + // }
  2799 + this.data.show_prew_img = 1;
  2800 + wx.previewImage({
  2801 + current: b[t.currentTarget.dataset.id],
  2802 + urls: b
  2803 + });
  2804 + },
  2805 +
  2806 +
  2807 + // 判断是否开启美业,获取套盒列表
  2808 + getTaohe() {
  2809 + // 判断是否开启美业
  2810 + getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => {
  2811 + if (res.data.code == 0) {
  2812 + let enableMeiye = res.data.data.EnableMeiye;
  2813 + self.setData({
  2814 + enableMeiye,
  2815 + });
  2816 +
  2817 + if (enableMeiye) { // 开启美业
  2818 + // 获取套盒列表
  2819 + let url = '/api/weshop/serviceGoods/list'
  2820 + let data = {
  2821 + store_id: getApp().globalData.setting.stoid,
  2822 + service_id: this.data.data.id,
  2823 + };
  2824 + // 请求数据
  2825 + getApp().promiseGet(url, {
  2826 + data: data,
  2827 + }).then(res => {
  2828 + if (res.data.code == 0) {
  2829 + console.log('请求成功套盒列表', res);
  2830 + self.setData({
  2831 + taoheList: res.data.data,
  2832 + });
  2833 + } else {
  2834 + throw (res);
  2835 + }
  2836 + ;
  2837 + }).catch(err => {
  2838 + });
  2839 +
  2840 + }
  2841 + ;
  2842 + }
  2843 + ;
  2844 + });
  2845 + },
  2846 +
  2847 +
  2848 + //---小于10的格式化函数----
  2849 + // timeFormat(param) {
  2850 + // return param < 10 ? '0' + param : param;
  2851 + // },
  2852 +
  2853 + //----倒计时函数-----
  2854 + countDown(time, prom_st) {
  2855 + if (!this.data.is_timer) return false;
  2856 + var th = this;
  2857 + // 获取当前时间,同时得到活动结束时间数组
  2858 + var endTime = time;
  2859 + var newTime = ut.gettimestamp();
  2860 + // 对结束时间进行处理渲染到页面
  2861 + var obj = null;
  2862 + // 如果活动未结束,对时间进行处理
  2863 + if (endTime - newTime > 0) {
  2864 + var time = (endTime - newTime);
  2865 + // 获取天、时、分、秒
  2866 + var day = parseInt(time / (60 * 60 * 24));
  2867 + var hou = parseInt(time % (60 * 60 * 24) / 3600);
  2868 + var min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  2869 + var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  2870 + obj = {
  2871 + day: this.timeFormat(day),
  2872 + hou: this.timeFormat(hou),
  2873 + min: this.timeFormat(min),
  2874 + sec: this.timeFormat(sec)
  2875 + }
  2876 + } else {
  2877 + if (th.data.prom_st == 0) {
  2878 + //var endTime2 = new Date(th.data.prom_end_time).getTime();
  2879 + var endTime2 = th.data.prom_act.end_time;
  2880 + th.setData({
  2881 + prom_time_text: '距结束还剩:',
  2882 + prom_st: 1
  2883 + })
  2884 + setTimeout(function () {
  2885 + th.countDown(endTime2)
  2886 + }, 1000);
  2887 + return false;
  2888 +
  2889 + } else {
  2890 + //活动已结束,全部设置为'00'
  2891 + obj = {
  2892 + day: '00',
  2893 + hou: '00',
  2894 + min: '00',
  2895 + sec: '00'
  2896 + }
  2897 + th.setData({
  2898 + prom_time_text: '活动已经结束:',
  2899 + prom_st: 3
  2900 + })
  2901 + th.setData({
  2902 + djs: obj
  2903 + });
  2904 + return false;
  2905 + }
  2906 + }
  2907 +
  2908 + th.setData({
  2909 + djs: obj
  2910 + });
  2911 + setTimeout(function () {
  2912 + th.countDown(endTime)
  2913 + }, 1000);
  2914 + },
  2915 +
  2916 + get_normal(gid) {
  2917 + this.setData({
  2918 + prom_type: 0,
  2919 + prom_id:0
  2920 + });
  2921 + this.get_sto();
  2922 + this.data.is_normal = 1;
  2923 + },
  2924 +
  2925 + //获取redis中的数量
  2926 + async getactLen() {
  2927 + let prom_type = this.data.options.prom_type;
  2928 + let prom_id = this.data.options.prom_id;
  2929 + return await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  2930 + 1: 1
  2931 + }).then(res => {
  2932 + if (res.data.code == 0) {
  2933 + // 当前可以购买的数量
  2934 + let r_num = res.data.data;
  2935 + return r_num;
  2936 + }
  2937 + ;
  2938 + })
  2939 + },
  2940 +
  2941 +
  2942 + //--------检查是否活动,活动是否开始,或者是否结束-------
  2943 + async check_prom(gid, prom_type, prom_id) {
  2944 + var ee = this, th = ee;
  2945 + var user_id = getApp().globalData.user_id;
  2946 + if (!user_id) user_id = 0;
  2947 +
  2948 + //-------判断团购活动是否抢光---------
  2949 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
  2950 + 1: 1
  2951 + }).then(res => {
  2952 + var em = res;
  2953 + if (em.data.code == 0) {
  2954 + if (em.data.data <= 0) ee.setData({
  2955 + prom_r_null: 1
  2956 + });
  2957 + //拿取价格并且判断时间--
  2958 + getApp().request.get("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + gid + "/" + prom_id, {
  2959 + success: function (t) {
  2960 + if (t.data.code != 0) {
  2961 + ee.get_normal(gid);
  2962 + return false;
  2963 + }
  2964 + //----已经结束-----
  2965 + if (t.data.data.is_end == 1) {
  2966 + ee.get_normal(gid);
  2967 + return false;
  2968 + }
  2969 + //----已经过期-----
  2970 + var now = ut.gettimestamp();
  2971 + if (t.data.data.end_time < now || t.data.data.start_time > now) {
  2972 + ee.get_normal(gid);
  2973 + return false;
  2974 + }
  2975 +
  2976 + /*-- 还没有开始预热的也不显示 --*/
  2977 + if (t.data.data.show_time > now) {
  2978 + ee.get_normal(gid);
  2979 + return false;
  2980 + }
  2981 +
  2982 + th.setData({
  2983 + sele_g: t.data.data,
  2984 + });
  2985 +
  2986 + var t_gd = ee.data.data;
  2987 + var prom_end_time = ut.formatTime(t.data.data.end_time, "yyyy-MM-dd hh:mm:ss");
  2988 + var prom_start_time = ut.formatTime(t.data.data.start_time, "yyyy-MM-dd hh:mm:ss");
  2989 +
  2990 + ee.setData({
  2991 + prom_price: t.data.data.price,
  2992 + prom_type: 2,
  2993 + f_prom_type: 2,
  2994 + prom_id: prom_id,
  2995 + prom_buy_limit: t.data.data.buy_limit,
  2996 + prom_act: t.data.data,
  2997 + prom_end_time: prom_end_time,
  2998 + prom_start_time: prom_start_time,
  2999 + isshow: 1,
  3000 + });
  3001 +
  3002 + ee.get_sto();
  3003 + var newTime = ut.gettimestamp();
  3004 + var endTime2 = t.data.data.end_time;
  3005 + var endTime1 = t.data.data.start_time;
  3006 + if (endTime1 > newTime) {
  3007 + ee.setData({
  3008 + prom_time_text: '距团购开始还有'
  3009 + })
  3010 + ee.countDown(endTime1, 0);
  3011 + } else {
  3012 + if (endTime2 > newTime) {
  3013 + ee.setData({
  3014 + prom_time_text: '距团购结束还有',
  3015 + prom_st: 1
  3016 + })
  3017 + ee.countDown(endTime2);
  3018 + }
  3019 + }
  3020 +
  3021 + }
  3022 + });
  3023 + }
  3024 + })
  3025 + },
  3026 +
  3027 +
  3028 + viewFlash(e) {
  3029 + let prom_type = e.currentTarget.dataset.promtype;
  3030 + let prom_id = e.currentTarget.dataset.promid;
  3031 + let goods_id = this.data.data.goods_id;
  3032 + let url = `/packageA/pages/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`;
  3033 + if (prom_type == 6) {
  3034 + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${goods_id}&prom_type=${prom_type}&prom_id=${prom_id}`;
  3035 + }
  3036 + getApp().goto(url);
  3037 + },
  3038 +
  3039 +
  3040 +
  3041 + //-------------获取购买数量的总函数----------------
  3042 + get_buy_num: function (gd, func) {
  3043 + // var map = this.data.g_buy_num,
  3044 + var th = this,
  3045 + user_id = getApp().globalData.user_id;
  3046 + if (user_id == null) {
  3047 + // map.set(gd.goods_id, 0);
  3048 + th.setData({
  3049 + // g_buy_num: map,
  3050 + prom_buy_num: 0,
  3051 + });
  3052 + "function" == typeof func && func();
  3053 + return false;
  3054 + }
  3055 +
  3056 + // if (map.has(gd.goods_id)) {
  3057 + // "function" == typeof func && func();
  3058 + // } else {
  3059 + //----获取商品购买数----
  3060 + if (th.data.prom_type == 1) {
  3061 + //----获取活动购买数----
  3062 + getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
  3063 + data: {
  3064 + store_id: os.stoid,
  3065 + user_id: user_id,
  3066 + card_id: th.data.options.goods_id,
  3067 + prom_type: th.data.options.prom_type,
  3068 + prom_id: th.data.options.prom_id
  3069 + },
  3070 + //-----获取-----
  3071 + success: function (tt) {
  3072 + if (tt.data.code == 0) {
  3073 + // map.set(gd.goods_id, g_buy_num);
  3074 + th.setData({
  3075 + // g_buy_num: map,
  3076 + promcardbuynum: tt.data.data.promcardbuynum,
  3077 + cardbuynum: tt.data.data.cardbuynum,
  3078 + });
  3079 + "function" == typeof func && func();
  3080 + }
  3081 + }
  3082 + });
  3083 + } else {
  3084 + "function" == typeof func && func();
  3085 + }
  3086 + },
  3087 +
  3088 +
  3089 + get_buy_num2: async function () {
  3090 + var th = this, user_id = getApp().globalData.user_id;
  3091 + //----获取活动购买数----
  3092 + return await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", {
  3093 + data: {
  3094 + store_id: os.stoid,
  3095 + user_id: user_id,
  3096 + card_id: th.data.options.goods_id,
  3097 + prom_type: th.data.options.prom_type,
  3098 + prom_id: th.data.options.prom_id
  3099 + },
  3100 + //-----获取-----
  3101 + success: function (tt) {
  3102 + if (tt.data.code == 0) {
  3103 + // map.set(gd.goods_id, g_buy_num);
  3104 + th.setData({
  3105 + // g_buy_num: map,
  3106 + promcardbuynum: tt.data.data.promcardbuynum,
  3107 + cardbuynum: tt.data.data.cardbuynum,
  3108 + });
  3109 + }
  3110 + }
  3111 + });
  3112 + },
  3113 +
  3114 +
  3115 + // 促销 -> 送礼包 -> 查看详情
  3116 + viewLbDetails(e) {
  3117 + let id = e.currentTarget.dataset.id; // 获取礼包id
  3118 + let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
  3119 + // console.log('myurl', url);
  3120 + getApp().goto(url);
  3121 + },
  3122 +
  3123 + go_more_ladder: function (e) {
  3124 + var prom_id = e.currentTarget.dataset.id;
  3125 + getApp().goto("/pages/goods/goodsList/goodsList?ladder_id=" + prom_id);
  3126 + },
  3127 +
  3128 + getHistoryBuy() {
  3129 + let _this = this;
  3130 + let req_data = {
  3131 + store_id: os.stoid,
  3132 + goods_id: this.data.gid,
  3133 + pay_status: 1,
  3134 + rndid: 1
  3135 + };
  3136 + getApp().request.promiseGet('/api/weshop/ordergoods/list', {
  3137 + data: req_data,
  3138 + })
  3139 + .then(res => {
  3140 + if (t.ajax_ok(res)) {
  3141 + _this.setData({
  3142 + historyBuyInfo: res.data.data.pageData,
  3143 + })
  3144 + }
  3145 + })
  3146 + },
  3147 +
  3148 +
  3149 + //-- 秒杀的普通购买 --
  3150 + openSpecModel_Nor: function () {
  3151 + var th = this;
  3152 +
  3153 + if (th.data.get_sto_ing) return false;
  3154 +
  3155 + // 是否授权登陆
  3156 + var user_info = getApp().globalData.userInfo;
  3157 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3158 + wx.navigateTo({
  3159 + url: '/packageE/pages/togoin/togoin',
  3160 + })
  3161 + return false;
  3162 + }
  3163 + this.data.g_buy_num = new Map();
  3164 + var th = this;
  3165 + this.setData({open_ind_store: 5, goodsInputNum: 1});//拼团直接给4
  3166 +
  3167 + this.setData({openSpecModal_flash_normal: 1});
  3168 + this.get_sto(1)
  3169 +
  3170 +
  3171 + // if (th.data.sku_g_pt) {
  3172 + // // this.get_sto(1)
  3173 + // this.setData({openSpecModal_flash_normal: 1});
  3174 + // } else {
  3175 + // th.get_sto(1);
  3176 + // th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function () {
  3177 + // th.setData({
  3178 + // openSpecModal_flash_normal: 1
  3179 + // });
  3180 + // });
  3181 + // }
  3182 + // this.check_is_youhui(th.data.gid, 1);
  3183 + },
  3184 +
  3185 + closeSpecModal_flash_normal: function () {
  3186 + this.setData({openSpecModal_flash_normal: 0, is_normal: 0});
  3187 + },
  3188 +
  3189 +
  3190 + //打开客服操作菜单
  3191 + openCS() {
  3192 + // 判断会员状态
  3193 + let user_info = getApp().globalData.userInfo;
  3194 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == '' || user_info.mobile == null) {
  3195 + wx.navigateTo({
  3196 + url: '/packageE/pages/togoin/togoin',
  3197 + })
  3198 + return false;
  3199 + }
  3200 + ;
  3201 + // csType/在线客服设置:
  3202 + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
  3203 + // 1小程序客服、
  3204 + // 2企业微信客服
  3205 + if (this.data.sys_switch) {
  3206 + let csType = this.data.sys_switch.weapp_customertype;
  3207 + if (csType == 0) {
  3208 + // 拨打电话号码
  3209 + this.contactService();
  3210 + } else {
  3211 + this.getTel()
  3212 + .then(() => {
  3213 + self.setData({
  3214 + hiddenCS: false,
  3215 + });
  3216 + });
  3217 + }
  3218 + ;
  3219 + }
  3220 + ;
  3221 +
  3222 + },
  3223 +
  3224 + //关闭客服操作菜单
  3225 + closeCS() {
  3226 + this.setData({
  3227 + hiddenCS: true,
  3228 + });
  3229 + },
  3230 +
  3231 +
  3232 + click_contact: function () {
  3233 + getApp().globalData.no_clear = 1;
  3234 + },
  3235 +
  3236 + //打开客服操作菜单
  3237 + openCS() {
  3238 + // csType/在线客服设置:
  3239 + // 0关闭(如果有设置热线电话,则显示拨打热线电话)、
  3240 + // 1小程序客服、
  3241 + // 2企业微信客服
  3242 + let csType = this.data.sys_switch.weapp_customertype;
  3243 + if (csType == 0) {
  3244 + // 获取电话号码
  3245 + this.contactService();
  3246 + } else {
  3247 + this.getTel()
  3248 + .then(() => {
  3249 + self.setData({
  3250 + hiddenCS: false,
  3251 + });
  3252 + });
  3253 +
  3254 + }
  3255 + ;
  3256 + },
  3257 +
  3258 + //关闭客服操作菜单
  3259 + closeCS() {
  3260 + this.setData({
  3261 + hiddenCS: true,
  3262 + });
  3263 + },
  3264 +
  3265 +
  3266 + //-- 弹出框的同意的优化,重新获取定位 ---
  3267 + agree_pri: function () {
  3268 + var th = this;
  3269 + var bconfig = th.data.bconfig;
  3270 + if (bconfig && bconfig.is_sort_storage) {
  3271 + wx.getLocation({
  3272 + type: 'gcj02',
  3273 + success: function (res) {
  3274 +
  3275 + th.data.lat = res.latitude;
  3276 + th.data.lon = res.longitude;
  3277 + th.data.is_get_local_ok = 1;
  3278 + th.setData({is_gps: 1});
  3279 + th.get_sto();
  3280 + },
  3281 + fail: function (res) {
  3282 + th.data.is_get_local_ok = 1;
  3283 + th.get_sto();
  3284 + if (res.errCode == 2) {
  3285 + th.setData({is_gps: 0});
  3286 + if (th.data.is_gps == 0) {
  3287 + getApp().confirmBox("请开启GPS定位", null, 25000, !1);
  3288 + }
  3289 + } else {
  3290 + th.setData({is_gps: "3"});
  3291 + }
  3292 +
  3293 + }
  3294 + })
  3295 + }
  3296 + },
  3297 +
  3298 + clickShare() {
  3299 + this.setData({
  3300 + share_hidden: true,
  3301 + });
  3302 + },
  3303 + send() {
  3304 + this.setData({
  3305 + share_hidden: false,
  3306 + });
  3307 + },
  3308 + cancel() {
  3309 + this.setData({
  3310 + share_hidden: false,
  3311 + });
  3312 + },
  3313 +
  3314 +
  3315 + saveImageFn() {
  3316 + if (this.data.share_b_img) {
  3317 + this.saveImageToPhotosAlbum()
  3318 + } else {
  3319 + this.saveImageToPhotosAlbumDef()
  3320 + }
  3321 + },
  3322 +
  3323 +
  3324 + //--定义的保存图片方法,分享团---
  3325 + saveImageToPhotosAlbum: function () {
  3326 + //--先判断会员状态--
  3327 + // var user_info = getApp().globalData.userInfo;
  3328 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3329 + // //getApp().my_warnning("请先登录",0,this);
  3330 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  3331 + // return false;
  3332 + // }
  3333 +
  3334 + if (this.data.share_hidden) {
  3335 + this.setData({
  3336 + share_hidden: false,
  3337 + });
  3338 + }
  3339 + ;
  3340 +
  3341 + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团
  3342 + var type = this.data.prom_type || 0;
  3343 + console.log('商品类型-----');
  3344 + console.log(type);
  3345 + // if (type == 2) type = -1;
  3346 + if (type == 4) type = 0;
  3347 + if (type == 8) type = 0;
  3348 + if (type == 2) type = 0;
  3349 + if (type == 6) type = 2; // 6拼团 2团购
  3350 + if (type == 10) type = -1;
  3351 +
  3352 + wx.showLoading({
  3353 + title: '生成中...',
  3354 + })
  3355 + var that = this,
  3356 + th = that;
  3357 + //设置画板显示,才能开始绘图
  3358 + that.setData({
  3359 + canvasHidden: false
  3360 + })
  3361 +
  3362 + var app = getApp();
  3363 + var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
  3364 + var path2 = that.data.data.original_img;
  3365 +
  3366 + var scene = th.data.gid;
  3367 + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
  3368 + if (user_id > 0) {
  3369 + scene += "_" + user_id;
  3370 + }
  3371 + //-- 如果不是会员分享过来的要分享给别人 --
  3372 + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) {
  3373 + //固定房间是第3个字符
  3374 + if (!user_id) scene += "_0";
  3375 + scene += "_" + getApp().globalData.room_id;
  3376 + } else {
  3377 + if (!user_id) scene += "_0";
  3378 + scene += "_0";
  3379 + }
  3380 + if (this.data.prom_id) {
  3381 + scene += "_" + th.data.prom_id;
  3382 + }
  3383 +
  3384 + ///二微码
  3385 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  3386 + os.stoid + "?sceneValue=" + scene + "&pageValue=packageG/pages/group_buy/goodsInfo/goodsInfo";
  3387 +
  3388 +
  3389 + console.log(path3);
  3390 +
  3391 + //读取文件成功则OK--
  3392 + wx.getImageInfo({
  3393 + src: path3,
  3394 + success: function (res) {
  3395 + //回调写法
  3396 + th.get_head_temp(th.get_goods_temp, function () {
  3397 + var vpath = res.path;
  3398 + var context = wx.createCanvasContext('share');
  3399 + //先画背景
  3400 + var pg_path = "../../../../images/share/share_bg.png";
  3401 +
  3402 + //-- 如果有自定义海报的时候,判断背景的图片 --
  3403 + if (th.data.share_b_img) {
  3404 + pg_path = th.data.share_b_img;
  3405 + }
  3406 + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  3407 +
  3408 + let nick = app.globalData.userInfo ? app.globalData.userInfo.nickname : '';
  3409 +
  3410 + //-- 是自定义海报的情况下 --
  3411 + if (th.data.poster && parseInt(th.data.poster.style) == 2) {
  3412 + //在线上分享人的情况下
  3413 + if (parseInt(th.data.poster.show_headpic)) {
  3414 + //获取坐标
  3415 + var x = parseFloat(th.data.poster.head_x) * 2;
  3416 + var y = parseFloat(th.data.poster.head_y) * 2;
  3417 + var x1 = (x + 90) * unit;
  3418 + var y1 = (y + 50) * unit;
  3419 + //--昵称---
  3420 + context.setFontSize(24 * unit)
  3421 + context.setFillStyle("black")
  3422 + context.fillText(nick, x1, y1);
  3423 + var width = 24 * nick.length * unit + 4 * unit;
  3424 + //强烈推荐 改许程
  3425 + var tj_path = "../../../../images/share/q_tj.png";
  3426 + context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
  3427 + context.setFontSize(16 * unit)
  3428 + context.setLineJoin('round'); //交点设置成圆角
  3429 + context.setFillStyle("white")
  3430 + context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit);
  3431 +
  3432 + //context.setFillStyle("black")
  3433 + //context.setFontSize(24 * unit)
  3434 + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit);
  3435 + }
  3436 + } else {
  3437 + //--昵称---
  3438 + context.setFontSize(24 * unit)
  3439 + context.setFillStyle("black")
  3440 + context.fillText(nick, 152 * unit, 76 * unit);
  3441 + var width = 24 * nick.length * unit + 2 * unit;
  3442 + //强烈推荐 改许程
  3443 + var tj_path = "../../../../images/share/q_tj.png";
  3444 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
  3445 + context.setFontSize(16 * unit);
  3446 + context.setLineJoin('round'); //交点设置成圆角
  3447 + context.setFillStyle("white");
  3448 + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
  3449 + }
  3450 +
  3451 + var share_title = th.data.data.goods_name;
  3452 +
  3453 + if (th.data.prom_type == 1 || th.data.prom_type == 2 || th.data.prom_type == 6 || th.data.prom_type == 4) {
  3454 + share_title = th.data.prom_act.share_title;
  3455 + if (!share_title) share_title = th.data.prom_act.title;
  3456 + if (th.data.prom_type == 4) share_title = th.data.prom_act.name;
  3457 +
  3458 + //-- 显示活动时间 --
  3459 + if (th.data.share_b_img) {
  3460 + act_time = "截止时间:" + ut.formatTime(th.data.prom_act.end_time);
  3461 + }
  3462 + }
  3463 +
  3464 + //---产品名称---
  3465 + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
  3466 +
  3467 + context.setFillStyle("black");
  3468 + context.setFontSize(21.3 * unit)
  3469 + th.draw_Text(context, share_title,
  3470 + 80 * unit, 160 * unit, 200 * unit, 279 * unit, unit);
  3471 +
  3472 + //------产品的价格-------
  3473 + context.setFontSize(23 * unit)
  3474 + context.setFillStyle("red")
  3475 +
  3476 + // 7.商品价格
  3477 + let price = th.data.data.shop_price;
  3478 + if (th.data.card_field && th.data.data[th.data.card_field]) {
  3479 + price = th.data.data[th.data.card_field];
  3480 + }
  3481 + if (th.data.prom_act) price = th.data.prom_price;
  3482 + price = parseFloat(price).toFixed(2);
  3483 +
  3484 + var wd1 = th.data.screenWidth - ut.measureText(price, 31 * unit) - 25;
  3485 + context.fillText("¥", wd1 - 15, 160 * unit);
  3486 + context.setFontSize(31 * unit)
  3487 + context.fillText(price, wd1, 165 * unit);
  3488 +
  3489 +
  3490 + //-- 零售价的优化 --
  3491 + var wp = wd1;
  3492 + var hp = 203 * unit;
  3493 + if (th.data.prom_type != 4) wp -= 12;
  3494 + th.draw_pos_price(context, wp, hp, th.data.data.show_price, unit);
  3495 +
  3496 +
  3497 + //console.log(th.data.share_goods_img);
  3498 + //let share_goods_img=th.data.presellForm.share_img;
  3499 + //share_goods_img?share_goods_img:th.data.data.share_goods_img;
  3500 + //---中间大图---
  3501 + context.drawImage(th.data.share_goods_img, 70 * unit, 220 * unit, 408 * unit, 408 * unit);
  3502 + //---自定义海报 产品质量保证
  3503 + if (th.data.poster.show_quality == 1) {
  3504 + var g_path = "../../../../images/share/s_gou.png";
  3505 + context.drawImage(g_path, 56 * unit, 644 * unit, 22 * unit, 22 * unit);
  3506 + context.setFillStyle("red")
  3507 + context.setFontSize(18 * unit)
  3508 + context.fillText("正品保证", 84 * unit, 664 * unit);
  3509 +
  3510 + context.drawImage(g_path, 218 * unit, 644 * unit, 22 * unit, 22 * unit);
  3511 + context.setFillStyle("red")
  3512 + context.setFontSize(18 * unit)
  3513 + context.fillText("纯实体店", 246 * unit, 664 * unit);
  3514 +
  3515 + context.drawImage(g_path, 388 * unit, 644 * unit, 22 * unit, 22 * unit);
  3516 + context.setFillStyle("red")
  3517 + context.setFontSize(18 * unit)
  3518 + context.fillText("官方验证", 420 * unit, 664 * unit);
  3519 +
  3520 + }
  3521 +
  3522 + //---画线---
  3523 + // context.setLineWidth(1 * unit)
  3524 + // context.moveTo(32 * unit, 662 * unit)
  3525 + // context.lineTo(520 * unit, 662 * unit)
  3526 + // context.stroke();
  3527 +
  3528 + //-- 图片底部文字 --
  3529 + switch (type) {
  3530 + case 0:
  3531 + //---文字---
  3532 + //---文字---
  3533 + context.setFillStyle("black");
  3534 + context.setFontSize(22 * unit);
  3535 +
  3536 + context.fillText("优惠乐翻天,精彩就在你身边", 40 * unit, 776 * unit);
  3537 + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 826 * unit);
  3538 +
  3539 + break;
  3540 +
  3541 + case 1:
  3542 +
  3543 + //画秒杀的图片
  3544 + if (th.data.is_share_text) {
  3545 + var miaos_path = '../../../../images/share/miao_share.png';
  3546 + context.drawImage(miaos_path, 43 * unit, 690 * unit, 222 * unit, 40 * unit);
  3547 + }
  3548 +
  3549 + context.setFillStyle("black")
  3550 + context.setFontSize(24 * unit)
  3551 + context.fillText(th.data.sto_sele_name_1, 40 * unit, 770 * unit);
  3552 + //---文字---
  3553 + context.setFontSize(22 * unit)
  3554 + context.setFillStyle("black")
  3555 + if (th.data.is_share_text) {
  3556 + context.fillText("特惠好物,限时秒杀", 40 * unit, 807 * unit);
  3557 + }
  3558 + context.fillText("长按识别二维码,立即开始抢购", 40 * unit, 844 * unit);
  3559 +
  3560 + break;
  3561 +
  3562 + }
  3563 +
  3564 +
  3565 + //---二维吗图---
  3566 + //-- 自定义海报 --
  3567 + if (th.data.poster) {
  3568 + var erm_x = parseFloat(th.data.poster.ewm_x) * 2;
  3569 + var erm_y = parseFloat(th.data.poster.ewm_y) * 2;
  3570 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 136 * unit, 136 * unit);
  3571 + } else {
  3572 + //---二维吗图---
  3573 + context.drawImage(vpath, 390 * unit, 746 * unit, 130 * unit, 116 * unit);
  3574 + }
  3575 +
  3576 + //--- 如果是自定义海报的时候 ---
  3577 + if (th.data.poster && parseInt(th.data.poster.style) == 2) {
  3578 +
  3579 + //如果显示会员信息的话
  3580 + if (parseInt(th.data.poster.show_headpic)) {
  3581 + //获取坐标
  3582 + var x = parseFloat(th.data.poster.head_x) * 2;
  3583 + var y = parseFloat(th.data.poster.head_y) * 2;
  3584 + //---绘制圆形要放在最后----
  3585 + context.save();
  3586 + context.beginPath();
  3587 + var h_x = x * unit;
  3588 + var h_y = y * unit;
  3589 + var h_r = 40 * unit;
  3590 + var cx = h_x + h_r;
  3591 + var cy = h_y + h_r;
  3592 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  3593 + context.closePath();
  3594 + context.fill();
  3595 + context.clip();
  3596 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  3597 + context.restore();
  3598 + }
  3599 +
  3600 + } else {
  3601 + //---绘制圆形要放在最后----
  3602 + context.save();
  3603 + context.beginPath();
  3604 + var h_x = 60 * unit;
  3605 + var h_y = 24 * unit;
  3606 + var h_r = 40 * unit;
  3607 + var cx = h_x + h_r;
  3608 + var cy = h_y + h_r;
  3609 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  3610 + context.closePath();
  3611 + context.fill();
  3612 + context.clip();
  3613 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  3614 + context.restore();
  3615 + }
  3616 +
  3617 +
  3618 + if (th.data.poster.show_time == 1 && th.data.prom_act) {
  3619 + var act_time = '';
  3620 + act_time = "截止时间:" + ut.formatTime(th.data.prom_act.end_time);
  3621 + context.setFillStyle("red")
  3622 + getApp().draw_Text(context, act_time, 38 * unit, 880 * unit, 200 * unit, 340 * unit, unit);
  3623 + }
  3624 +
  3625 + //把画板内容绘制成图片,并回调 画板图片路径
  3626 + context.draw(false, function () {
  3627 + setTimeout(function () {
  3628 + wx.canvasToTempFilePath({
  3629 + x: 0,
  3630 + y: 0,
  3631 + width: 750,
  3632 + height: 1217,
  3633 + destWidth: 1.2 * 750 * 750 / that.data.screenWidth,
  3634 + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth,
  3635 + canvasId: 'share',
  3636 + success: function (res) {
  3637 +
  3638 + that.setData({
  3639 + shareImgPath: res.tempFilePath,
  3640 + canvasHidden: true
  3641 + })
  3642 +
  3643 + if (!res.tempFilePath) {
  3644 + wx.showModal({
  3645 + title: '提示',
  3646 + content: '图片绘制中,请稍后重试',
  3647 + showCancel: false
  3648 + })
  3649 + return false;
  3650 + }
  3651 +
  3652 + // wx.previewImage({
  3653 + // //将图片预览出来
  3654 + // urls: [that.data.shareImgPath]
  3655 + // });
  3656 + that.setData({
  3657 + showPoster: true,
  3658 + });
  3659 + wx.hideLoading();
  3660 + }
  3661 + })
  3662 + }, 500)
  3663 +
  3664 + });
  3665 + });
  3666 + },
  3667 + fail: function (res) {
  3668 + console.log(res);
  3669 + wx.hideLoading();
  3670 +
  3671 + }
  3672 + });
  3673 + },
  3674 + //--定义的保存图片方法,分享团---
  3675 + saveImageToPhotosAlbumDef: function () {
  3676 + //--先判断会员状态--
  3677 + // var user_info = getApp().globalData.userInfo;
  3678 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3679 + // //getApp().my_warnning("请先登录",0,this);
  3680 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  3681 + // return false;
  3682 + // }
  3683 +
  3684 + if (this.data.share_hidden) {
  3685 + this.setData({share_hidden: false,});
  3686 + }
  3687 + ;
  3688 +
  3689 + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团
  3690 + var type = this.data.prom_type || 0;
  3691 + console.log('商品类型-----');
  3692 + console.log(type);
  3693 + // if (type == 2) type = -1;
  3694 + if (type == 4) type = 0;
  3695 + if (type == 8) type = 0;
  3696 + if (type == 2) type = 0;
  3697 + if (type == 6) type = 2; // 6拼团 2团购
  3698 + if (type == 10) type = -1;
  3699 +
  3700 + if (this.data.prom_act && this.data.prom_act.kttype == 3) type = 3;
  3701 + console.log('商品类型。。。。。');
  3702 + console.log(type);
  3703 + wx.showLoading({title: '生成中...',})
  3704 + var that = this, th = that;
  3705 + //设置画板显示,才能开始绘图
  3706 + that.setData({
  3707 + canvasHidden: false
  3708 + })
  3709 +
  3710 + var app = getApp();
  3711 + var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
  3712 + var path2 = that.data.data.original_img;
  3713 +
  3714 + var scene = th.data.gid;
  3715 + var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
  3716 + if (user_id > 0) {
  3717 + scene += "_" + user_id;
  3718 + }
  3719 + //-- 如果不是会员分享过来的要分享给别人 --
  3720 + if (getApp().globalData.room_id && th.data.data.goods_id == getApp().globalData.room_goods_id && !getApp().globalData.room_user_share) {
  3721 + //固定房间是第3个字符
  3722 + if (!user_id) scene += "_0";
  3723 + scene += "_" + getApp().globalData.room_id;
  3724 + } else {
  3725 + if (!user_id) scene += "_0";
  3726 + scene += "_0";
  3727 + }
  3728 + if (this.data.prom_type) {
  3729 + scene += "_" + th.data.prom_id;
  3730 + }
  3731 +
  3732 + ///二微码
  3733 + var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
  3734 + os.stoid + "?sceneValue=" + scene + "&pageValue=packageG/pages/group_buy/goodsInfo/goodsInfo";
  3735 +
  3736 + console.log(path3);
  3737 +
  3738 +
  3739 + // 读取文件成功则OK--
  3740 + wx.getImageInfo({
  3741 + src: path3,
  3742 + success: function (res) {
  3743 + // 回调写法
  3744 + th.get_head_temp(th.get_goods_temp, function () {
  3745 + var vpath = res.path;
  3746 + var context = wx.createCanvasContext('share');
  3747 + // 先画背景
  3748 + var pg_path = "../../../../../images/share/share_bg.png";
  3749 + th.drawPoster(context, unit, th.data.share_goods_img, vpath, type);
  3750 +
  3751 + //把画板内容绘制成图片,并回调 画板图片路径
  3752 + context.draw(false, function () {
  3753 + setTimeout(function () {
  3754 + wx.canvasToTempFilePath({
  3755 + x: 0,
  3756 + y: 0,
  3757 + width: 750,
  3758 + height: 1217,
  3759 + destWidth: 1.2 * 750 * 750 / that.data.screenWidth,
  3760 + destHeight: 1.2 * 1217 * 750 / that.data.screenWidth,
  3761 + canvasId: 'share',
  3762 + success: function (res) {
  3763 +
  3764 + that.setData({
  3765 + shareImgPath: res.tempFilePath,
  3766 + canvasHidden: true
  3767 + })
  3768 +
  3769 + if (!res.tempFilePath) {
  3770 + wx.showModal({
  3771 + title: '提示',
  3772 + content: '图片绘制中,请稍后重试',
  3773 + showCancel: false
  3774 + })
  3775 + return false;
  3776 + }
  3777 +
  3778 + that.setData({
  3779 + showPoster: true,
  3780 + });
  3781 + wx.hideLoading();
  3782 + }
  3783 + })
  3784 + }, 500)
  3785 +
  3786 + });
  3787 + });
  3788 + },
  3789 + fail: function (res) {
  3790 + console.log(res);
  3791 + wx.hideLoading();
  3792 +
  3793 + }
  3794 + });
  3795 + },
  3796 +
  3797 + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
  3798 + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) {
  3799 + var lineWidth = 0;
  3800 + var lastSubStrIndex = 0; //每次开始截取的字符串的索引
  3801 + var han = 0;
  3802 + for (let i = 0; i < str.length; i++) {
  3803 + if (han == 2) return;
  3804 + //lineWidth += ctx.measureText(str[i]).width;
  3805 + lineWidth += ut.measureText(str[i], 21.3 * unit);
  3806 + if (lineWidth > canvasWidth) {
  3807 + han++;
  3808 +
  3809 + if (han == 2)
  3810 + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分
  3811 + else
  3812 + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight);
  3813 +
  3814 + initHeight += 22; //22为字体的高度
  3815 + lineWidth = 0;
  3816 + lastSubStrIndex = i;
  3817 + titleHeight += 20;
  3818 + }
  3819 + if (i == str.length - 1) { //绘制剩余部分
  3820 + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight);
  3821 + }
  3822 + }
  3823 + },
  3824 +
  3825 + drawPoster(context, unit, img, vpath, type) {
  3826 + // 1.灰色背景
  3827 + context.setFillStyle('#f2f1f6');
  3828 + context.rect(0, 0, 554 * unit, 899 * unit);
  3829 + context.fill();
  3830 +
  3831 + // 2.商城名称
  3832 + let shopName = this.data.sto_sele_name_1;
  3833 + context.setTextAlign('center');
  3834 + context.setFontSize(26 * unit);
  3835 + context.setFillStyle('black');
  3836 + context.fillText(shopName, 277 * unit, 60 * unit);
  3837 +
  3838 + // 3.推荐来源
  3839 + if (getApp().globalData.userInfo) {
  3840 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  3841 + context.setTextAlign('center');
  3842 + context.setFontSize(22 * unit);
  3843 + context.setFillStyle('#96959a');
  3844 + context.fillText(fromText, 277 * unit, 105 * unit);
  3845 + }
  3846 + // 4.海报背景
  3847 + context.setFillStyle('white');
  3848 + context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit);
  3849 +
  3850 + // 5.商品图片
  3851 + // 图片的x坐标
  3852 + let bg_x = 37 * unit
  3853 + // 图片的y坐标
  3854 + let bg_y = 157 * unit
  3855 + // 图片宽度
  3856 + let bg_w = 480 * unit
  3857 + // 图片高度
  3858 + let bg_h = 474 * unit
  3859 + // 图片圆角
  3860 + let bg_r = 4
  3861 + // 绘制海报背景图片圆角
  3862 + context.save()
  3863 + context.beginPath()
  3864 + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI * 1.5)
  3865 + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
  3866 + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
  3867 + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
  3868 + context.clip()
  3869 + context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
  3870 + context.restore();
  3871 +
  3872 + // 6.强烈推荐
  3873 + let src = '';
  3874 + context.beginPath();
  3875 + if (type == 0) { // 普通
  3876 + src = '../../../../images/share/q_tj.png';
  3877 + context.drawImage(src, 54 * unit, 648 * unit, 85 * unit, 30 * unit);
  3878 + context.setFontSize(16 * unit)
  3879 + context.setFillStyle("white")
  3880 + context.setTextAlign('left');
  3881 + context.fillText('强烈推荐', 64 * unit, 668 * unit);
  3882 + }
  3883 + if (type == 1) { // 秒杀
  3884 +
  3885 + if (this.data.is_share_text == 1) {
  3886 + src = '../../../../images/share/miao_share.png';
  3887 + context.drawImage(src, 54 * unit, 648 * unit, 200 * unit, 36 * unit);
  3888 + }
  3889 + context.setTextAlign('left');
  3890 + }
  3891 +
  3892 +
  3893 + // 7.商品价格
  3894 + let price = this.data.data.shop_price;
  3895 + if (this.data.card_field && this.data.data[this.data.card_field]) {
  3896 + price = this.data.data[this.data.card_field];
  3897 + }
  3898 + if (this.data.prom_act) price = this.data.prom_price;
  3899 + price = parseFloat(price).toFixed(2);
  3900 + context.setFontSize(32 * unit);
  3901 + context.setFillStyle('#DE1117');
  3902 +
  3903 + //price = this.data.presellList.presell_price
  3904 + context.fillText('¥' + price, 54 * unit, 735 * unit);
  3905 + //-- 零售价的优化 --
  3906 + var wp = 62 * unit + ut.measureText('¥' + price, 32 * unit);
  3907 + var hp = 735 * unit
  3908 + this.draw_pos_price(context, wp, hp, this.data.data.show_price, unit);
  3909 +
  3910 +
  3911 + // 8.商品标题
  3912 + context.setFontSize(20 * unit);
  3913 + context.setFillStyle('#898989');
  3914 + getApp().draw_Text(context, this.data.data.goods_name, 54 * unit, 800 * unit, 240 * unit, 280 * unit, unit, 1);
  3915 +
  3916 + // 9.小程序码
  3917 + context.drawImage(vpath, 375 * unit, 660 * unit, 120 * unit, 120 * unit);
  3918 + context.setFontSize(16 * unit);
  3919 + context.setFillStyle('#777');
  3920 + context.fillText('长按识别二维码', 378 * unit, 810 * unit);
  3921 +
  3922 + // 10.竖线
  3923 + context.beginPath();
  3924 + context.setFillStyle('#eee');
  3925 + context.rect(354 * unit, 670 * unit, 1 * unit, 130 * unit);
  3926 + context.fill();
  3927 + },
  3928 +
  3929 + //---市场价划掉---
  3930 + draw_pos_price(context, w, h, market_price, unit) {
  3931 +
  3932 + if (!this.data.sys_switch) return false;
  3933 + if (!this.data.sys_switch.is_retail_price) return false;
  3934 +
  3935 + context.setFillStyle("gray")
  3936 + context.setFontSize(22 * unit)
  3937 + var pri0 = "¥" + market_price.toFixed(2);
  3938 + context.fillText(pri0, w, h);
  3939 +
  3940 + var c_h = h - 6;
  3941 + context.setStrokeStyle('gray');
  3942 + context.setLineWidth(1 * unit);
  3943 + context.moveTo(w - 5, c_h);
  3944 + context.lineTo(w + ut.measureText(pri0, 22 * unit) + 5, c_h);
  3945 + context.stroke();
  3946 +
  3947 + },
  3948 +
  3949 +
  3950 + closePoster() {
  3951 + this.setData({
  3952 + showPoster: false,
  3953 + });
  3954 + },
  3955 +
  3956 + // 保存图片到手机
  3957 + savePic() {
  3958 + console.log('保存图片');
  3959 + var self = this;
  3960 + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限
  3961 + this.getSetting().then((res) => {
  3962 + // 判断用户是否授权了保存到相册的权限,如果没有发起授权
  3963 + if (!res.authSetting['scope.writePhotosAlbum']) {
  3964 + this.authorize().then(() => {
  3965 + // 同意授权后保存下载文件
  3966 + this.saveImage(self.data.shareImgPath)
  3967 + .then(() => {
  3968 + self.setData({
  3969 + showPoster: false
  3970 + });
  3971 + });
  3972 + })
  3973 + } else {
  3974 + // 如果已经授权,保存下载文件
  3975 + this.saveImage(self.data.shareImgPath)
  3976 + .then(() => {
  3977 + self.setData({
  3978 + showPoster: false
  3979 + });
  3980 + });
  3981 + }
  3982 +
  3983 + })
  3984 + },
  3985 +
  3986 + // 发起首次授权请求
  3987 + authorize() {
  3988 + // isFirst 用来记录是否为首次发起授权,
  3989 + // 如果首次授权拒绝后,isFirst赋值为1
  3990 + let isFirst = wx.getStorageSync('isFirst') || 0;
  3991 + return new Promise((resolve, reject) => {
  3992 + wx.authorize({
  3993 + scope: 'scope.writePhotosAlbum',
  3994 + // 同意授权
  3995 + success: () => {
  3996 + resolve();
  3997 + },
  3998 + // 拒绝授权,这里是用户拒绝授权后的回调
  3999 + fail: res => {
  4000 + if (isFirst === 0) {
  4001 + wx.setStorageSync('isFirst', 1);
  4002 + wx.showToast({
  4003 + title: '保存失败',
  4004 + icon: 'none',
  4005 + duration: 1000
  4006 + })
  4007 + } else {
  4008 + this.showModal();
  4009 + }
  4010 + console.log('拒绝授权');
  4011 + reject();
  4012 + }
  4013 + })
  4014 + })
  4015 + },
  4016 +
  4017 +
  4018 + // 保存图片到系统相册
  4019 + saveImage(saveUrl) {
  4020 + var self = this;
  4021 + return new Promise((resolve, reject) => {
  4022 + wx.saveImageToPhotosAlbum({
  4023 + filePath: saveUrl,
  4024 + success: (res) => {
  4025 + wx.showToast({
  4026 + title: '保存成功',
  4027 + duration: 1000,
  4028 + });
  4029 + self.setData({
  4030 + showPlaybill: 'true'
  4031 + });
  4032 + resolve();
  4033 + },
  4034 + fail: () => {
  4035 + wx.showToast({
  4036 + title: '保存失败',
  4037 + duration: 1000,
  4038 + });
  4039 + }
  4040 + })
  4041 + })
  4042 + },
  4043 +
  4044 + // 预览海报
  4045 + previewPoster() {
  4046 + getApp().globalData.no_clear = 1;
  4047 + wx.previewImage({
  4048 + current: this.data.shareImgPath, // 当前显示图片的http链接
  4049 + urls: [this.data.shareImgPath], // 需要预览的图片http链接列表
  4050 + });
  4051 + },
  4052 +
  4053 +
  4054 +});
  4055 +
  4056 +
... ...
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="{{is_retail_price}}" class="word-line fs24 no_line_c" style="margin-left: 10rpx;position: relative;top: -6rpx; color:#fff !important">零售价:¥{{filters.toFix(front_g.market_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(front_g.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 class="sales">已售:{{prom_act.buy_num+prom_act.virtual}}件</view>
  137 +
  138 + </block>
  139 + </view>
  140 + </block>
  141 +
  142 + <view class="goods-num" wx:else>
  143 + <view class="sales">销量:{{data.sales_sum}}</view>
  144 + <view class="sales">有效天数:{{data.validDays?data.validDays:'不限'}}</view>
  145 + </view>
  146 +
  147 + </view>
  148 + </block>
  149 +
  150 +
  151 +
  152 + <!-- 门店收货地址 -->
  153 + <view class="xc-address_frame bdt16 flex-vertical xc-ash {{def_pick_store!=null?'sn_height':'on_height'}}">
  154 + <view class="address_frame" bindtap="choice_store" data-ind="0">
  155 + <view class="flex-vertical-between ">
  156 + <view class="flex-vertical select_store_height">
  157 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
  158 + <view class="fs30" style="color:black;">选择门店</view>
  159 + </view>
  160 + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red_bb fs26">更多门店<text class="bg_jj"></text></view>
  161 + </view>
  162 +
  163 + <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
  164 + <view class="flex-space-between address ai_end ">
  165 + <view>
  166 + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
  167 + </view>
  168 + <view class="distance fs24" wx:if="{{def_pick_store.distance!=null}}">
  169 + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
  170 +
  171 + </view>
  172 + </view>
  173 +
  174 + <view class="no_store" wx:if="{{only_pk && !only_pk.length}}">(未找到门店)</view>
  175 + <block wx:else>
  176 + <view class="no_store" wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(未找到门店)</view>
  177 + <text wx:elif="{{def_pick_store.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text>
  178 + <block wx:else>
  179 + <view class="no_store" wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">(该店不可售)</view>
  180 + </block>
  181 + </block>
  182 +
  183 + <view class="fs24 xc-ash-9f">地址:{{def_pick_store.fulladdress}}</view>
  184 + </view>
  185 + </view>
  186 +
  187 + </view>
  188 +
  189 +
  190 + <!-- 保障服务 -->
  191 + <view class="bz_view flex bdt16 ai_c" wx:if="{{store_config.service_bz}}">
  192 + <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
  193 + <view class="flex f1 ai_c rel" style="position: relative;" bindtap="{{showFold ? 'clickCollapse':''}}">
  194 + <view class="bz-content showArea {{flag ? '':'ellipsis-1x'}}">{{store_config.service_bz}}</view>
  195 + <view class="bz-content hideArea">{{store_config.service_bz}}</view>
  196 + <view class="cx-obtain-coupon wsize arrow" wx:if="{{showFold}}">
  197 + <text class="bg_jj down {{flag ? 'up':''}}"></text>
  198 + </view>
  199 + </view>
  200 + </view>
  201 +
  202 + <!-- - 宝贝评价 -- -->
  203 + <view class="bdt16">
  204 + <view class="bb_view">
  205 + <view class="bold">宝贝评价({{categories3[0].num}})</view>
  206 + <view class="red_bb fs26" bindtap="look_pj">
  207 + 查看全部
  208 + <text class="bg_jj"></text>
  209 + </view>
  210 + </view>
  211 + <view class="xc_comment">
  212 + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate">
  213 + 有图({{categories3[1].num}})
  214 + </view>
  215 + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate">
  216 + 好评({{categories3[2].num}})
  217 + </view>
  218 + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate">
  219 + 中评({{categories3[3].num}})
  220 + </view>
  221 + <view class="xc_comment-discuss" data-val="4" bindtap="clik_evaluate">
  222 + 差评({{categories3[4].num}})
  223 + </view>
  224 + </view>
  225 + <scroll-view scroll-x="true" class="pj_scroll">
  226 + <view class="flex">
  227 + <view class="xc_comment-detail" style="" wx:for="{{fir_comments}}" wx:key="{{item}}">
  228 + <view class="xc_comment-left">
  229 + <view class="xc_comment-user">
  230 + <view class="xc_user-img">
  231 + <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>
  232 + </view>
  233 + <view class="xc_user">
  234 + <view class="xc_user-name five-level-word">
  235 + {{item.is_anonymous!=1?item.username:'匿名'}}
  236 + </view>
  237 + <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image>
  238 + </view>
  239 + </view>
  240 + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12">
  241 + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}}</text>
  242 + </view>
  243 + <view class="xc_comment-val">
  244 + <view class="xc_comment-time">{{item.add_time}}</view>
  245 + </view>
  246 + </view>
  247 + <view class="xc_goods-img-frame">
  248 + <image wx:if="{{item.img[0]!=undefined && item.img[0]!=null}}" class="xc_goods-img" src='{{iurl+item.img[0]}}'></image>
  249 + <image wx:elif="{{item.weapp_img[0]!=undefined && item.weapp_img[0]!=null}}" class="xc_goods-img" src='{{item.weapp_img[0]}}'></image>
  250 + <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image>
  251 + </view>
  252 + </view>
  253 + </view>
  254 + </scroll-view>
  255 + </view>
  256 +
  257 +
  258 +
  259 + <!-- 图文详情 -->
  260 + <view class="t_g_info bdt16">
  261 + <view class="red_shu"></view>
  262 + <view class="fs30 bold">卡项详情</view>
  263 + </view>
  264 + <view class="pdh20">
  265 +
  266 + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}">
  267 + <view class="card fs28" wx:for="{{listServiceItem}}">
  268 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  269 + <view class="ellipsis-2 f1" wx:if="{{item.displayqty==1}}" >{{item.projectName}}(无限次)</view>
  270 + <view class="ellipsis-2 f1" wx:else>{{item.projectName}}({{item.frequency}}次)</view>
  271 + <view class="pdl30 t-r">
  272 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  273 + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view>
  274 + </view>
  275 + </view>
  276 + <view class="flex ai_c jc_sb fs24 c-6">
  277 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  278 + <!-- 指定开始日期和结束日期 -->
  279 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view>
  280 + </view>
  281 + </view>
  282 + </block>
  283 +
  284 + <block wx:if="{{enableMeiye}}">
  285 + <block wx:if="{{taoheList && taoheList.length > 0}}">
  286 + <view class="taohe fs28" wx:for="{{taoheList}}">
  287 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  288 + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view>
  289 + <view class="pdl30 t-r">
  290 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  291 + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view>
  292 + </view>
  293 + </view>
  294 + <view class="flex ai_c jc_sb fs24 c-6 pdt10">
  295 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  296 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view>
  297 + </view>
  298 + </view>
  299 + </block>
  300 + </block>
  301 +
  302 + <!-- <view class="table_s" wx:if="{{service_list}}">
  303 + <view class="tb_item tb-l">
  304 + <view class="item_left f1">
  305 + <text>项目名称</text>
  306 + </view>
  307 + <view class="item_left f1">
  308 + <text>耗时(分)</text>
  309 + </view>
  310 + <view class="item_left f1">
  311 + <text>次数</text>
  312 + </view>
  313 + </view>
  314 + <view class="tb_item tb-l" wx:for="{{service_list}}">
  315 + <view class="item_right f1">
  316 + <text>{{item.projectName}}</text>
  317 + </view>
  318 + <view class="item_right f1">
  319 + <text>{{item.timeConsuming}}</text>
  320 + </view>
  321 + <view class="item_right f1">
  322 + <text>{{item.frequency}}</text>
  323 + </view>
  324 + </view>
  325 + </view> -->
  326 +
  327 + <view class="wxParse">
  328 + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
  329 + </view>
  330 +
  331 + </view>
  332 +
  333 + <!-- 推荐商品 -->
  334 + <view class="flex-center rel xc-linellae-frame">
  335 + <view class="xc-linellae"></view>
  336 + <view class="abs flex-center xc-recommend-frame ">
  337 + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png"></image>
  338 + <view class="xc-recommend-word">推荐</view>
  339 + </view>
  340 + </view>
  341 + <serviceCard_recommend id="goods_list"></serviceCard_recommend>
  342 +
  343 + </view>
  344 +
  345 +
  346 + <view class="goods-norms" hidden="{{activeCategoryId==1?false:true}}">
  347 + <view class="pd20">
  348 + <!-- <view class="table_s" wx:if="{{service_list}}">
  349 + <view class="tb_item tb-l">
  350 + <view class="item_left f1">
  351 + <text>项目名称</text>
  352 + </view>
  353 + <view class="item_left f1">
  354 + <text>耗时(分)</text>
  355 + </view>
  356 + <view class="item_left f1">
  357 + <text>次数</text>
  358 + </view>
  359 + </view>
  360 + <view class="tb_item tb-l" wx:for="{{service_list}}">
  361 + <view class="item_right f1">
  362 + <text>{{item.projectName}}</text>
  363 + </view>
  364 + <view class="item_right f1">
  365 + <text>{{item.timeConsuming}}</text>
  366 + </view>
  367 + <view class="item_right f1">
  368 + <text>{{item.frequency}}</text>
  369 + </view>
  370 + </view>
  371 + </view> -->
  372 +
  373 + <block wx:if="{{listServiceItem && listServiceItem.length > 0}}">
  374 + <view class="card fs28" wx:for="{{listServiceItem}}">
  375 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  376 + <view class="ellipsis-2 f1">{{item.projectName}}({{item.frequency}}次)</view>
  377 + <view class="pdl30 t-r">
  378 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  379 + <view class="fs22 c-9 del" wx:if="{{item.showPrice}}">零售价:¥{{item.showPrice}}</view>
  380 + </view>
  381 + </view>
  382 + <view class="flex ai_c jc_sb fs24 c-6">
  383 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  384 + <!-- 指定开始日期和结束日期 -->
  385 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item, data.validDays)}}</view>
  386 + </view>
  387 + </view>
  388 + </block>
  389 +
  390 + <block wx:if="{{enableMeiye}}">
  391 + <block wx:if="{{taoheList && taoheList.length > 0}}">
  392 + <view class="taohe fs28" wx:for="{{taoheList}}">
  393 + <view class="flex ai_c jc_sb" style="height: 88rpx;">
  394 + <view class="ellipsis-2 f1">{{item.goods_name}} ({{item.goods_sn}}) ({{item.frequency}}个)</view>
  395 + <view class="pdl30 t-r">
  396 + <view class="rmb fs36 bold c-red">{{item.vipprice}}</view>
  397 + <view class="fs22 c-9 del">零售价:¥{{item.show_price}}</view>
  398 + </view>
  399 + </view>
  400 + <view class="flex ai_c jc_sb fs24 c-6 pdt10">
  401 + <view class="ellipsis-1">备注:{{filters.show_default(item.remark, '无')}}</view>
  402 + <view class="pdl30 shrink0">有效期:{{filters.showStartAndEndDate(item,data.validDays)}}</view>
  403 + </view>
  404 + </view>
  405 + </block>
  406 + </block>
  407 +
  408 + <view class="wxParse">
  409 + <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
  410 + </view>
  411 +
  412 + </view>
  413 + </view>
  414 +
  415 + <view class="goods-comment" hidden="{{activeCategoryId==2?false:true}}">
  416 + <view class="topframe">
  417 + <view class="topframe-top">
  418 + <view class="topframe-top-content">
  419 + <view>宝贝评价</view>
  420 + <view class="topframe-top-val">({{categories3[0].num}})</view>
  421 + </view>
  422 + <view class="topframe-praise" wx:if="{{categories3[0].num}}">
  423 + 好评{{ filters.toFix(categories3[2].num/categories3[0].num*100,2) }}%
  424 + </view>
  425 + <view wx:else>好评 0%</view>
  426 + </view>
  427 + <view class="buttem-list">
  428 + <view bindtap="tabClick3" id="{{item.id}}" wx:for="{{categories3}}" wx:key="categories3" class="item {{activeCategoryId3==item.id?'red':''}}">
  429 + {{item.name}}({{item.num}})
  430 + </view>
  431 + </view>
  432 + </view>
  433 + <block wx:for="{{comments}}" wx:for-index="cIdx" wx:key="{{cIdx}}">
  434 + <view style='border-bottom:4rpx solid #eee;'>
  435 + <view class="middle">
  436 + <view class="middle-img-frame">
  437 + <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>
  438 + <view class="middle-user-frame">
  439 + <view class="middle-user">
  440 + {{item.username==''||item.is_anonymous==1 ?'匿名用户':item.username}}
  441 + </view>
  442 + <image class="star" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image>
  443 + </view>
  444 + </view>
  445 + <view class="xc-pirces">
  446 + <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" style="word-break: break-all;">
  447 + {{item.content?item.content:'此用户没有填写评价。'}}
  448 + </view>
  449 + </view>
  450 + <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'>
  451 + 全部显示
  452 + </view>
  453 + <view wx:if='{{!item.seeMore && item.auto}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleContent'>
  454 + 收起
  455 + </view>
  456 + <view class="img-ul">
  457 + <block wx:if="{{item.source_type==0}}">
  458 + <view class="img-li" wx:for="{{item.img}}" wx:key="{{index}}">
  459 + <image bindtap="previewCommentImgs" class="wh100" data-cidx="{{cIdx}}" data-img="{{iurl}}{{item}}" data-id="{{index}}" src="{{iurl}}{{item}}"></image>
  460 + </view>
  461 + </block>
  462 + <block wx:if="{{item.source_type==1}}">
  463 + <view class="img-li" wx:for="{{item.weapp_img}}" wx:if="{{aitem.length>10}}" wx:key="{{index}}" wx:for-item="aitem">
  464 + <image bindtap="previewCommentImgs_w" class="wh100" data-cidx="{{cIdx}}" data-img="{{aitem}}" data-id="{{index}}" src="{{aitem}}"></image>
  465 + </view>
  466 + </block>
  467 + </view>
  468 + <view class="z_parameter">
  469 + <view class="parameter-font">{{item.add_time}}</view>
  470 + <view class="parameter-dian" bindtap="click_zan" data-com_id="{{item.comment_id}}" data-item_id="{{cIdx}}">
  471 + <image wx:if="{{item.userZanNum==1}}" class="parameter-img" src="{{iurl}}/miniapp/images/zan_red.png"></image>
  472 + <image wx:else class="parameter-img" src="{{iurl}}/miniapp/images/dianzan.png"></image>
  473 + <view class="parameter-val" style='color:{{item.userZanNum==1? "#d60022":"#999" }}'>
  474 + {{item.zan_num}}
  475 + </view>
  476 + </view>
  477 + </view>
  478 + </view>
  479 + <view class="reply rel" wx:if="{{item.replay_list}}">
  480 + <view class="line_bulge"></view>
  481 + <view class="shop-reply">店家回复:</view>
  482 + <view class="shop-font" wx:for="{{item.replay_list}}" wx:for-item="r_item" wx:key="{{index}}">
  483 + {{r_item.content}}
  484 + </view>
  485 + </view>
  486 + </view>
  487 + </block>
  488 + <block wx:if="{{(!comments || comments.length==0) && get_c }}">
  489 + <text class="no_pj_list">暂无评价</text>
  490 + </block>
  491 + <block wx:if="{{comments.length>10 && comments_no_more}}">
  492 + <text class="no_pj_list">已经加载到底部</text>
  493 + </block>
  494 + </view>
  495 + </view>
  496 + </view>
  497 + <!---滚动到顶部---->
  498 + <!-- <view bindtap="doScrollTop" class="toTop" wx:if="{{supportPageScroll}}">
  499 + <image class="wh100" src="{{iurl}}/miniapp/images/topup.png"></image>
  500 + </view> -->
  501 +
  502 + <!-- 底部按钮 -->
  503 + <view class="join-cart ai_c">
  504 +
  505 + <view class="flex">
  506 + <view class="custom-service cart-ico new_split pdh20" bindtap="openCS">
  507 + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
  508 + <view>客服</view>
  509 + </view>
  510 +
  511 + <view bindtap="collectGoods" class="custom-service cart-ico new_split t-c pdh20">
  512 + <image hidden="{{is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart.png"></image>
  513 + <image hidden="{{!is_collect}}" class="cs-img" src="{{iurl}}/miniapp/images/heart-h.png"></image>
  514 + <view>收藏</view>
  515 + </view>
  516 +
  517 + <view class="shopping-cart cart-ico new_split pdh20">
  518 + <navigator open-type="switchTab" url="/pages/cart/cart/cart" style="text-align: center">
  519 + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image>
  520 +<!-- <view class="cart-num ellipsis-1"> {{cartGoodsNum}} </view>-->
  521 + <view>购物车</view>
  522 + </navigator>
  523 + </view>
  524 + </view>
  525 +
  526 +
  527 + <view class="flex f1 btn-group">
  528 + <!-- -----团购------ -->
  529 + <block wx:if="{{prom_type==2}}">
  530 + <block wx:if="{{prom_st==1 && !prom_r_null}}">
  531 + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
  532 + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即抢购</view>
  533 + </block>
  534 +
  535 + <block wx:if="{{prom_st==0 && !prom_r_null}}">
  536 + <view class="buy-btn cart-btn cart-btn-lg lanse f1">即将开始</view>
  537 + </block>
  538 + <block wx:if="{{prom_r_null}}">
  539 + <view class="buy-btn cart-btn cart-btn-lg huise f1">已抢光</view>
  540 + </block>
  541 + <block wx:if="{{prom_st==3 && !prom_r_null}}">
  542 + <view class="buy-btn cart-btn cart-btn-lg lanse f1">活动已经结束</view>
  543 + </block>
  544 + </block>
  545 +
  546 + <!-- 从“我的服务”入口进入购买商品 -->
  547 + <block wx:else>
  548 + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
  549 + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view>
  550 + </block>
  551 +
  552 + </view>
  553 +
  554 + </view>
  555 +
  556 + <!-- 制作一个圆球导航 -->
  557 + <nav_box></nav_box>
  558 +</block>
  559 +
  560 +<!-- 弹起来,选择规格数量,普通商品购买和秒杀 -->
  561 +<view hidden="{{!openSpecModal}}">
  562 +
  563 + <view bindtap="closeSpecModal" class="cover-layer"></view>
  564 + <view class="spec-model">
  565 + <view class="pding">
  566 +
  567 + <icon bindtap="closeSpecModal" class="modal-close" color="black" size="22" type="cancel"></icon>
  568 +
  569 +
  570 + <view class="spec-goods">
  571 + <image class="wh100 spec-img" src="{{iurl}}{{data.image_url?data.image_url:'miniapp/images/default_g_img.gif'}}"
  572 + binderror="pop_err_img" data-errorimg="data.image_url" />
  573 + <view class="spec-goods-info">
  574 + <view class="spec-goods-name ellipsis-2">{{data.goods_name}}</view>
  575 + <view class="flex ai_end xc-val-money">
  576 + <view class="spec-goods-price">
  577 + <text class="fs20">¥</text>
  578 + <block wx:if="{{prom_type == 2}}">{{prom_price}}</block>
  579 + <block wx:else>{{data.shop_price}}</block>
  580 + </view>
  581 + </view>
  582 + </view>
  583 + </view>
  584 +
  585 +
  586 +
  587 + <!-- 选择门店模块 -->
  588 + <view class="flex-space-between address ai_end xc-width" style="padding-top: 30rpx;">
  589 + <view class="flex" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
  590 + <text class="fs30 xc-black3 shop_name" style="width:360rpx">{{def_pick_store.pickup_name}}</text>
  591 + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}">
  592 + 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}</view>
  593 + </view>
  594 +
  595 + <!-- 没有门店的时候 -->
  596 + <view class="flex" bindtap="choice_store" wx:else>
  597 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
  598 + <view class="fs30" style="color:black;">选择门店</view>
  599 + </view>
  600 + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view>
  601 + </view>
  602 +
  603 +
  604 +
  605 + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
  606 + <block wx:else>
  607 + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
  608 + <block wx:else>
  609 + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(该店不可售)</view>
  610 + <view class="no_store" wx:elif="{{def_pick_store.is_no_dis_act}}">(该店不可售)</view>
  611 + <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>
  612 + </block>
  613 + </block>
  614 +
  615 + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view>
  616 + </view>
  617 +
  618 +
  619 +
  620 + <view class="b_num">
  621 + <view>购买数量</view>
  622 + <view class="count">
  623 + <view class="sub {{goodsInputNum <= 1 ? 'active':''}}" wx:if="{{goodsInputNum <= 1}}">-</view>
  624 + <view bindtap="subCartNum" class="sub" wx:else>-</view>
  625 + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
  626 + <view bindtap="addCartNum" class="add">+</view>
  627 + </view>
  628 + </view>
  629 +
  630 +
  631 +
  632 + <view class="spec-cart-btns">
  633 + <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>
  634 + <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>
  635 + <block wx:else>
  636 +
  637 + <!-- 根本就找不到门店 -->
  638 + <block wx:if="{{!only_pk && !def_pickpu_list}}">
  639 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view>
  640 + </block>
  641 + <block wx:else>
  642 +
  643 + <block wx:if="{{only_pk.length && !only_pk.length}}">
  644 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view>
  645 + </block>
  646 + <block wx:else>
  647 + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
  648 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view>
  649 + </block>
  650 +
  651 + <block wx:else>
  652 + <block wx:if="{{!def_pick_store}}">
  653 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view>
  654 + </block>
  655 + <block wx:else>
  656 +
  657 + <view wx:if="{{openSpecModal_ind==1}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn yellow fs32 {{!sto_sele_name?'gray':''}}"
  658 + data-action="add">加入购物车</view>
  659 + <!-- 秒杀 -->
  660 + <block wx:if="{{prom_type == 2}}">
  661 + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}"
  662 + data-action="buy" data-promtype="{{prom_type}}" data-promid="{{prom_id}}">
  663 + 立即购买
  664 + </view>
  665 + </block>
  666 +
  667 + <!-- 普通商品 -->
  668 + <block wx:else>
  669 + <view wx:if="{{openSpecModal_ind==2}}" bindtap="addCart" data-openSpecModal_ind="{{openSpecModal_ind}}" class="spec-cart-btn spec-buy {{!sto_sele_name?'gray':''}}"
  670 + data-action="buy">
  671 + 立即购买
  672 + </view>
  673 + </block>
  674 +
  675 + </block>
  676 + </block>
  677 + </block>
  678 + </block>
  679 +
  680 + </block>
  681 + </view>
  682 +
  683 + <view class="clear"></view>
  684 + </view>
  685 +</view>
  686 +
  687 +
  688 +
  689 +<!-- 选择门店的弹框,1.1版最新的 -->
  690 +<block wx:if="{{store==1}}">
  691 + <view class="mongolia-layer" bindtap="close_popup"></view>
  692 + <view class="popup-frame">
  693 + <block wx:if="{{sort_store==0}}">
  694 + <!-- 头部 标题 -->
  695 + <view class="popup-top flex-space-between">
  696 + <text class="fs32 nearby_store">{{choice_sort_store==0?'附近的门店':region_name}}</text>
  697 + <view>
  698 + <view>
  699 + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
  700 + </view>
  701 + <view class="felx choose_more" bindtap="more_store" wx:if="{{is_show_sto_cat>0}}">
  702 + <text class="fs26 red-co">{{choice_sort_store==0?'更多门店':'返回'}}</text>
  703 + <view class="bg_rights"></view>
  704 + </view>
  705 + </view>
  706 + </view>
  707 + <view class="searchbar flex-vertical-between storeListpadd">
  708 + <input class="inputstore fs28" placeholder="输入要搜索的门店" value="{{keyword}}" placeholder-class="fs28" maxlength="16" bindinput="input_store" bindconfirm="searchfn" />
  709 + <view class="search flex-center" bindtap="searchfn">
  710 + <view class="fs28">搜索</view>
  711 + </view>
  712 + </view>
  713 + <!-- 门店列表,最外层的门店列表,一开始 -->
  714 + <view class="store-list">
  715 + <!--如果还没有点击更多门店的时候 -->
  716 + <block wx:if="{{choice_sort_store==0}}">
  717 + <!-- 需要for循环 -->
  718 + <block wx:if="{{is_show_sto_cat==1}}">
  719 + <view class="store_choose flex" wx:for="{{def_pickpu_list}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  720 + <view class="store flex-vertical">
  721 + <!-- 需要点击事件 -->
  722 + <block wx:if="{{index==fir_pick_index}}">
  723 + <view class="circle white xc-hook fs20 red-b">Г</view>
  724 + </block>
  725 + <block wx:else>
  726 + <view class="circle xc-hooks"></view>
  727 + </block>
  728 + <view class="address-frame xc-ash">
  729 + <view class="flex-vertical-between butttem5">
  730 + <view class="flex xc-ash">
  731 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
  732 + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}">
  733 + <text class="no_store">(该店不可售)</text>
  734 + </block>
  735 + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售1)</text>
  736 +
  737 + </view>
  738 + </view>
  739 + <view>
  740 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  741 + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}</view>
  742 + </view>
  743 + </view>
  744 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  745 + </view>
  746 + </view>
  747 + </view>
  748 + </block>
  749 + <block wx:else>
  750 + <view class="store_choose flex" wx:for="{{only_pk}}" bindtap="choose_for_store_fir" data-ind="{{index}}">
  751 + <view class="store flex-vertical">
  752 + <!-- 需要点击事件 -->
  753 + <block wx:if="{{index==fir_pick_index}}">
  754 + <view class="circle white xc-hook fs20 red-b">Г</view>
  755 + </block>
  756 + <block wx:else>
  757 + <view class="circle xc-hooks"></view>
  758 + </block>
  759 +
  760 + <view class="address-frame xc-ash">
  761 + <view class="flex-vertical-between ">
  762 + <view class="flex xc-ash">
  763 + <view class="fs30 xc-black3 address_name">{{item.pickup_name}}
  764 + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}">
  765 + <text class="no_store">(该店不可售)</text>
  766 + </block>
  767 + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text>
  768 + </view>
  769 + </view>
  770 + <view>
  771 + <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"}}
  772 + </view>
  773 + </view>
  774 + </view>
  775 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  776 + </view>
  777 + </view>
  778 + </view>
  779 + </block>
  780 + </block>
  781 + <block wx:else>
  782 + <!-- 如果是点击选择门店分类后显示分类下的门店 -->
  783 + <view class="store_choose flex" wx:for="{{sec_sto.s_arr}}" data-ind="{{index}}" bindtap="choose_for_store">
  784 + <view class="store flex-vertical">
  785 + <!-- 需要点击事件 -->
  786 + <block wx:if="{{index==sec_pick_index}}">
  787 + <view class="circle white xc-hook fs20 red-b">Г</view>
  788 + </block>
  789 + <block wx:else>
  790 + <view class="circle xc-hooks"></view>
  791 + </block>
  792 +
  793 + <view class="address-frame xc-ash">
  794 + <view class="flex-vertical-between ">
  795 + <view class="flex xc-ash">
  796 + <view class="fs28 xc-black3 address_name">{{item.pickup_name}}
  797 + <block wx:if="{{tool.is_no_dis(data.storageId,item.keyid)}}">
  798 + <text class="no_store">(该店不可售)</text>
  799 + </block>
  800 + <text wx:elif="{{item.is_no_dis_act && !is_normal}}" class="no_store">(该店不可售)</text>
  801 + </view>
  802 + </view>
  803 + <view>
  804 + <view class="distance fs24 address-val" wx:if="{{item.distance!=null}}">
  805 + 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}</view>
  806 + </view>
  807 + </view>
  808 + <view class="fs24 xc-ash-9f">地址:{{item.fulladdress}}</view>
  809 + </view>
  810 + </view>
  811 + </view>
  812 + </block>
  813 +
  814 + </view>
  815 +
  816 + <!-- 门店列表底部 -->
  817 + <view class="store-bottom-frame">
  818 + <view class="store-bottom flex-vertical-between">
  819 + <view class="determine red-b fs28 white t-c" bindtap="sure_pick" data-openindstore="{{open_ind_store}}">确定</view>
  820 + <view class="default t-c fs28" bindtap="set_def_pick" data-openindstore="{{open_ind_store}}">设为默认</view>
  821 + </view>
  822 + </view>
  823 +
  824 + </block>
  825 +
  826 + <block wx:else>
  827 + <view class="popup-top flex-space-between">
  828 + <text class="fs32 nearby_store">门店分类选择</text>
  829 + <view>
  830 + <view>
  831 + <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
  832 + </view>
  833 + <view class="felx choose_mores" bindtap="returns">
  834 + <text class="fs26 red-co">返回</text>
  835 + </view>
  836 + </view>
  837 + </view>
  838 + <view class="sort_store_list">
  839 +
  840 + <view class="sort-store-frame" wx:for="{{all_sto}}" data-index="{{index}}" bindtap="choice_sort_store" data-region="{{item.name}}">
  841 + <view class="sort-store flex-vertical-between">
  842 + <view class="fs30" di>{{item.name}}</view>
  843 + <view class="black_rights-frame">
  844 + <view class="black_rights"></view>
  845 + </view>
  846 + </view>
  847 + </view>
  848 +
  849 + </view>
  850 + </block>
  851 + </view>
  852 +</block>
  853 +<!-- ---------------分享弹窗--------------- -->
  854 +<!--二维码显示页面-->
  855 +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas>
  856 +<warn id="warn"></warn>
  857 +
  858 +<view wx:if="{{showPoster}}">
  859 + <view class="mask" catchtap="closePoster"></view>
  860 + <view class="poster-container">
  861 + <view class="poster-wrapper">
  862 + <view class="poster" bindtap="previewPoster">
  863 + <!-- <view class="poster" bindtap="previewImage"> -->
  864 + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image>
  865 + <view class="btn-close" catchtap="closePoster">
  866 + <text class="iconfont icon-close"></text>
  867 + </view>
  868 + </view>
  869 + <view class="btn-container">
  870 + <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> -->
  871 + <button class="btn-share" bindtap="savePic">保存到相册</button>
  872 + </view>
  873 + </view>
  874 + </view>
  875 +</view>
  876 +
  877 +<!-- 弹起来,购买预热商品的普通购买 -->
  878 +<view hidden="{{!openSpecModal_flash_normal}}">
  879 + <include src="buy_flash_normal.wxml" />
  880 +</view>
  881 +
  882 +
  883 +<!-- 联系客服操作菜单 -->
  884 +<view class="action {{!hiddenCS ? 'active':''}}" hidden="{{hiddenCS}}">
  885 + <view class="pd20 t-c pr">
  886 + <text class="bold">联系客服</text>
  887 + <text class="iconfont icon-guan" bindtap="closeCS"></text>
  888 + </view>
  889 + <!-- 客服热线 -->
  890 + <view class="pd20 bdt fs30 btn2" bindtap="contactService" wx:if="{{store_tel}}">
  891 + <text class="iconfont icon-dianhua"></text>客服热线:
  892 + <text class="c-red">{{store_tel}}</text>
  893 + </view>
  894 + <!-- 小程序客服 -->
  895 + <block wx:if="{{sys_switch.weapp_customertype == 1}}">
  896 + <button class="pd20 bdt fs30 btn2" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
  897 + <text class="iconfont icon-kefu1"></text>在线客服
  898 + </button>
  899 + </block>
  900 + <!-- 微信客服 -->
  901 + <block wx:elif="{{sys_switch.weapp_customertype == 2}}">
  902 + <view class="pd20 bdt fs30 btn2" bindtap="con_weixin">
  903 + <text class="iconfont icon-kefu1"></text>在线客服
  904 + </view>
  905 + </block>
  906 +</view>
  907 +
  908 +<view class="mask2" bindtap="closeCS"></view>
  909 +<!-- 分享控件,底部弹出 -->
  910 +<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)) {
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 //---如果互动都已经过期,或者还未开始,或者无活动
... ... @@ -3104,9 +3122,9 @@ Page({
3104 3122 [txt]: t.goods_num
3105 3123 });
3106 3124  
3107   - // 1.秒杀活动
  3125 + // 1.秒杀活动 ,团购的活动
3108 3126 // 2.活动开始
3109   - if (t.prom_type == 1 && t.is_pd_normal == 0) {
  3127 + if((t.prom_type == 1 && t.is_pd_normal == 0) || t.prom_type==2) {
3110 3128 var txt = "service_data[" + pitem + "].goods[" + item + "].goods_num";
3111 3129 var redis_num = 0;
3112 3130  
... ... @@ -3119,7 +3137,6 @@ Page({
3119 3137 if (t.id != v.id) {
3120 3138 cartGoodsNum += parseInt(v.goods_num);
3121 3139 }
3122   -
3123 3140 });
3124 3141 }
3125 3142 });
... ... @@ -3157,15 +3174,26 @@ Page({
3157 3174  
3158 3175 // 限购数量
3159 3176 var buylimit = 0
3160   - await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + t.store_id + "/" + getApp().globalData.user_id + "/" + t.prom_id, {
  3177 + if(t.prom_type==1) {
  3178 + await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + t.store_id + "/" + getApp().globalData.user_id + "/" + t.prom_id, {}).then(res => {
  3179 + if (res.data.code == 0) {
  3180 + th.data.sele_g = res.data.data;
  3181 + th.data.sele_g.viplimited = res.data.data.buy_limit;
  3182 + buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit;
  3183 + }
  3184 + });
  3185 + }
  3186 +
  3187 + if(t.prom_type==2) {
  3188 + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + t.goods_id + "/" + t.prom_id, {}).then(res => {
  3189 + if (res.data.code == 0) {
  3190 + th.data.sele_g = res.data.data;
  3191 + th.data.sele_g.viplimited = res.data.data.buy_limit;
  3192 + buylimit = !res.data.data.buy_limit ? 0 : res.data.data.buy_limit;
  3193 + }
  3194 + });
  3195 + }
3161 3196  
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 3197  
3170 3198 //用户已经成功付款购买的数量
3171 3199 var gd_buy_num = 0;
... ... @@ -3176,8 +3204,8 @@ Page({
3176 3204 promcardbuynum: !tt.data.data.promcardbuynum ? 0 : tt.data.data.promcardbuynum,
3177 3205 cardbuynum: tt.data.data.cardbuynum,
3178 3206 });
3179   - };
3180   - });
  3207 + }
  3208 + })
3181 3209  
3182 3210 // 剩余购买数
3183 3211 let num = buylimit - gd_buy_num;
... ... @@ -4065,35 +4093,105 @@ Page({
4065 4093 }
4066 4094 } else {
4067 4095  
  4096 + //进行累计,秒杀和团购的购买数量
  4097 + var flash_map = {};
  4098 + var group_map = {};
  4099 +
4068 4100 //-- 开始服务卡的购物车购买 --
4069 4101 for (var i = 0; i < this.data.service_data.length; i++) {
4070 4102 var i_arr = this.data.service_data[i].goods;
4071 4103 console.log(i_arr)
4072 4104  
4073 4105 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
  4106 + await rq.promisePut("/api/weshop/cartService/update", {
  4107 + data: {
  4108 + id: i_arr[j].id,
  4109 + selected: i_arr[j].selected,
  4110 + store_id: oo.stoid
  4111 + }
  4112 + });
  4113 +
  4114 + //判断秒杀的指定门店
  4115 + if( [1,2].includes(i_arr[j].prom_type) && i_arr[j].prom && i_arr[j].prom.pick_up_lists && i_arr[j].selected){
  4116 + var idx0=i_arr[j].prom.pick_up_lists.findIndex(function (e){
  4117 + return e.pickup_id==i_arr[j].pick_id;
  4118 + })
  4119 + if(idx0<0){
  4120 + getApp().confirmBox(i_arr[j].service_name + "秒杀活动的门店不可售");
  4121 + th.clear_checkouting();
  4122 + return false;
  4123 + }
4079 4124 }
4080   - });
4081 4125  
  4126 + //选中的情况下才进行计算
  4127 + if(i_arr[j].selected) {
  4128 + //进行秒杀和团购的累计
  4129 + switch (i_arr[j].prom_type) {
  4130 + case 1:
  4131 + if (!flash_map[i_arr[j].prom_id]) {
  4132 + flash_map[i_arr[j].prom_id] = {prom: i_arr[j].prom, num: i_arr[j].goods_num};
  4133 + } else {
  4134 + flash_map[i_arr[j].prom_id].num += i_arr[j].goods_num;
  4135 + }
  4136 + break;
  4137 + case 2:
  4138 + if (!group_map[i_arr[j].prom_id]) {
  4139 + group_map[i_arr[j].prom_id] = {prom: i_arr[j].prom, num: i_arr[j].goods_num};
  4140 + } else {
  4141 + group_map[i_arr[j].prom_id].num += i_arr[j].goods_num;
  4142 + }
  4143 + break;
  4144 + }
  4145 + }
  4146 + }
  4147 + }
4082 4148  
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 + "秒杀活动的门店不可售");
  4149 + //判断flash_map是不是空,同时判断flash prom.buy_limit
  4150 + if(Object.keys(flash_map).length>0){
  4151 + for(let i in flash_map){
  4152 + if(flash_map[i].num>flash_map[i].prom.buy_limit && flash_map[i].prom.buy_limit>0){
  4153 + getApp().confirmBox(flash_map[i].prom.title + "秒杀活动的超出活动限购");
  4154 + th.clear_checkouting();
  4155 + return false;
  4156 + }
  4157 + let redis_num=0;
  4158 + //获取当前商品活动库存
  4159 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +oo.stoid + "/1/" + i, {
  4160 + 1: 1
  4161 + }).then(res => {
  4162 + redis_num = res.data.data;
  4163 + });
  4164 + if(flash_map[i].num>redis_num){
  4165 + getApp().confirmBox(flash_map[i].prom.title + "秒杀活动的超出活动数量");
  4166 + th.clear_checkouting();
  4167 + return false;
  4168 + }
  4169 + }
  4170 + }
  4171 + //group_map,同时判断group prom.buy_limit
  4172 + if(Object.keys(group_map).length>0){
  4173 + for(let jg in group_map){
  4174 + if(group_map[jg].num>group_map[jg].prom.buy_limit && group_map[jg].prom.buy_limit>0){
  4175 + getApp().confirmBox(group_map[jg].prom.title + "团购活动的超出活动限购");
  4176 + th.clear_checkouting();
  4177 + return false;
  4178 + }
  4179 + let redis_num=0;
  4180 + //获取当前商品活动库存
  4181 + await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +oo.stoid+ "/2/" + jg, {
  4182 + 1: 1
  4183 + }).then(res => {
  4184 + redis_num = res.data.data;
  4185 + });
  4186 + if(group_map[jg].num>redis_num){
  4187 + getApp().confirmBox(group_map[jg].prom.title + "团购活动的超出活动数量");
4090 4188 th.clear_checkouting();
4091 4189 return false;
4092 4190 }
4093   - }
4094 4191 }
4095 4192 }
4096 4193  
  4194 +
4097 4195 //排除失效服务结算
4098 4196 this.data.invalidList.map(item => {
4099 4197 if (item.selected && item.classType == 1) {
... ... @@ -5662,7 +5760,51 @@ Page({
5662 5760  
5663 5761  
5664 5762  
  5763 + },
  5764 +
  5765 + async go_card(e){
  5766 + var gid=e.currentTarget.dataset.gid;
  5767 + var rurl = '/api/weshop/activitylist/listGoodActInfo2New';
  5768 + var req_d = {
  5769 + "store_id": app.globalData.setting.stoid,
  5770 + "goods_id": gid,
  5771 + "user_id": getApp().globalData.user_id,
  5772 + "goods_type":1
  5773 + }
  5774 + var res= await getApp().request.promiseGet(rurl, {data: req_d});
  5775 +
  5776 + var url = "/packageA/pages/goodsInfo/goodsInfo?goods_id=" + gid;
  5777 + if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
  5778 + var arr = res.data.data;
  5779 + let times = new Date().getTime();
  5780 + //-- 预热也要计算 --
  5781 + var arr2 = arr.filter(function (e) {
  5782 + return e.s_time < ut.gettimestamp() || (e.warm_uptime && e.warm_uptime < ut.gettimestamp())
  5783 + })
  5784 + if(arr2.length==1) {
  5785 + switch(arr2[0].prom_type){
  5786 + case 1:
  5787 + url+="&prom_type=1&prom_id="+arr2[0].act_id;
  5788 + break;
  5789 + case 2:
  5790 + url="/packageG/pages/group_buy/goodsInfo/goodsInfo?goods_id="+gid+"&prom_id="+arr2[0].act_id;
  5791 + break;
  5792 + case 6:
  5793 + url = `/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?goods_id=${gid}&prom_type=${arr2[0].prom_type}&prom_id=${arr2[0].act_id}`;
  5794 + break;
  5795 + case 8:
  5796 + url = `/packageC/pages/presell/cardInfo/goodsInfo?goods_id=${gid}&prom_id=${arr2[0].act_id}`;
  5797 + break;
  5798 + }
  5799 + }
  5800 +
  5801 + }
  5802 +
  5803 +
  5804 + app.goto(url);
  5805 +
5665 5806 }
5666 5807  
5667 5808  
  5809 +
5668 5810 });
5669 5811 \ 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/user/index/index.js
... ... @@ -132,7 +132,7 @@ Page({
132 132 privacy_pop.check_pri_show();
133 133 }
134 134  
135   - getApp().check_can_share();
  135 + getApp().check_can_share(this);
136 136 //看一下小程序是不是过期了
137 137 getApp().getConfig2(function (config2) {
138 138 if (config2 && config2.is_overdue == 1) {
... ...