Commit e7943aec8f5d48c4e58081e6941bc5bbcd805f46

Authored by 后端研发-苏明海
2 parents 2e393095 123f736e

Merge branch 'dev' into 'test'

Dev

See merge request !842
Showing 49 changed files with 4036 additions and 257 deletions
app.json
... ... @@ -157,7 +157,8 @@
157 157 {
158 158 "root": "packageC/",
159 159 "name":"pack3",
160   - "pages": [
  160 + "pages": [
  161 + "pages/group_list/group_list",
161 162 "pages/presell/list/list",
162 163 "pages/presell/cart/cart",
163 164 "pages/presell/cart/cart2",
... ... @@ -165,7 +166,9 @@
165 166 "pages/presell/goodsInfo/goodsInfo",
166 167 "pages/goods/distributionCategoryList/index",
167 168 "pages/goods/goodsList/goodsList",
168   - "pages/payForAnother/payForAnother"
  169 + "pages/payForAnother/payForAnother",
  170 + "pages/luckyGo/luckyGo_list/luckyGo_list",
  171 + "pages/luckyGo/luckyGo_details/luckyGo_details"
169 172 ]
170 173 }
171 174  
... ...
app.wxss
... ... @@ -4,6 +4,9 @@
4 4 .pdt4 {
5 5 padding-top: 4rpx;
6 6 }
  7 +.pdt6 {
  8 + padding-top: 6rpx;
  9 +}
7 10 .pd10 {
8 11 padding: 10rpx;
9 12 }
... ... @@ -37,6 +40,9 @@
37 40 .pdt12 {
38 41 padding-top: 12rpx;
39 42 }
  43 +.pdt16 {
  44 + padding-top: 16rpx;
  45 +}
40 46 .pdb10 {
41 47 padding-bottom: 10rpx;
42 48 }
... ... @@ -140,9 +146,7 @@
140 146 color: #c7c7c7;
141 147 }
142 148  
143   -.c-7b {
144   - color: #7b7b7b;
145   -}
  149 +
146 150  
147 151 .c-d {
148 152 color: #ddd;
... ... @@ -711,9 +715,9 @@ background: #ffe3e2;
711 715 /* 图标字体(ty) */
712 716 @font-face {
713 717 font-family: 'iconfont'; /* Project id 2054717 */
714   - src: url('//at.alicdn.com/t/font_2054717_xyebdzzvo1i.woff2?t=1635153304877') format('woff2'),
715   - url('//at.alicdn.com/t/font_2054717_xyebdzzvo1i.woff?t=1635153304877') format('woff'),
716   - url('//at.alicdn.com/t/font_2054717_xyebdzzvo1i.ttf?t=1635153304877') format('truetype');
  718 + src: url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff2?t=1635844276600') format('woff2'),
  719 + url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.woff?t=1635844276600') format('woff'),
  720 + url('//at.alicdn.com/t/font_2054717_kwrwze5y6c.ttf?t=1635844276600') format('truetype');
717 721 }
718 722  
719 723 .iconfont {
... ... @@ -724,6 +728,14 @@ background: #ffe3e2;
724 728 -moz-osx-font-smoothing: grayscale;
725 729 }
726 730  
  731 +.icon-luck:before {
  732 + content: "\e621";
  733 +}
  734 +
  735 +.icon-shizhong:before {
  736 + content: "\e74f";
  737 +}
  738 +
727 739 .icon-dingwei:before {
728 740 content: "\e6b4";
729 741 }
... ...
components/diy_goodsGroup/diy_goodsGroup.js
... ... @@ -151,6 +151,9 @@ Component({
151 151 index = 0,
152 152 gdata = [];
153 153  
  154 + var user_id=getApp().globalData.user_id;
  155 + if(!user_id) user_id=0;
  156 +
154 157 //--初始化卡类--
155 158 th.card_init();
156 159 var os=getApp().globalData.setting;
... ... @@ -162,8 +165,10 @@ Component({
162 165 for (var i = 0; i < g_id.length; i++) {
163 166 str += g_id[i].goodsid + ",";
164 167 }
165   - str=str.substring(0, str.length - 1);
  168 + str=str.substring(0, str.length - 1);
  169 +
166 170 await app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, {
  171 + data:{user_id:user_id},
167 172 isShowLoading:false,
168 173 success: function(res) {
169 174 th.data.loading=0;
... ... @@ -218,6 +223,10 @@ Component({
218 223 if(th.data.is_hot) r_data.is_hot=th.data.is_hot;
219 224 if(th.data.is_new) r_data.is_new=th.data.is_new;
220 225  
  226 + var user_id=getApp().globalData.user_id;
  227 + if(!user_id) user_id=0;
  228 + r_data.user_id=user_id;
  229 +
221 230 await app.request.promiseGet("/api/weshop/goods/page", {
222 231 data:r_data
223 232 }).then(res => {
... ... @@ -245,6 +254,7 @@ Component({
245 254 isonsale: 1,
246 255 orderField: "sort",
247 256 orderType: 'asc',
  257 + user_id:user_id
248 258 }
249 259 }).then(res => {
250 260 th.data.loading=0;
... ...
components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -17,10 +17,18 @@
17 17 <view class='zs_goods {{g_filter.get_border_type(object.big_order_type)}}'>
18 18 <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
19 19 <view class='zs_top rel'>
20   - <image class='zs_t_img' src="{{item.goods_img}}"
21   - data-errorimg="goods_array[{{index}}].goods_img"
22   - binderror="bind_bnerr3" lazy-load="true"
23   - ></image>
  20 +
  21 + <block wx:if="{{object.big_order_type==3}}">
  22 + <view style="position: relative; width: 100%; height: 100%">
  23 + <image class='zs_t_img' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  24 + binderror="bind_bnerr3"></image>
  25 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>
  26 + </view>
  27 + </block>
  28 + <block wx:else>
  29 + <image class='zs_t_img' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img"
  30 + binderror="bind_bnerr3" lazy-load="true" ></image>
  31 + </block>
24 32  
25 33 <block wx:if="{{object.goodicon==3}}">
26 34 <image class='{{g_filter.get_class(object.column,object.position)}}' src='{{object.customicon}}'></image>
... ... @@ -166,8 +174,20 @@
166 174 <view class="zs_goods_ban">
167 175 <view class='zs_goods_2l'>
168 176 <view class='zs_top_2l rel'>
169   - <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  177 +
  178 + <block wx:if="{{object.big_order_type==3}}">
  179 + <view style="position: relative; width: 100%; height: 100%">
  180 + <image class='zs_t_img_2l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  181 + binderror="bind_bnerr3"></image>
  182 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  183 + binderror="bind_bnerr3"></image>
  184 + </view>
  185 + </block>
  186 + <block wx:else>
  187 + <image class='zs_t_img_2l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
170 188 binderror="bind_bnerr3"></image>
  189 + </block>
  190 +
171 191 <block wx:if="{{object.goodicon==3}}">
172 192 <image class='{{g_filter.get_class(object.column,object.position)}}'
173 193 src='{{object.customicon}}'></image>
... ... @@ -312,9 +332,20 @@
312 332 <view class="zs_goods_wai_san" >
313 333 <view class="zs_goods_san">
314 334 <view class='zs_goods_3l {{g_filter.get_border_type(object.big_order_type)}}'>
315   - <view class='zs_top_3l rel'>
316   - <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  335 + <view class='zs_top_3l rel'>
  336 + <block wx:if="{{object.big_order_type==3}}">
  337 + <view style="position: relative; width: 100%; height: 100%">
  338 + <image class='zs_t_img_3l' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  339 + binderror="bind_bnerr3"></image>
  340 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  341 + binderror="bind_bnerr3"></image>
  342 + </view>
  343 + </block>
  344 + <block wx:else>
  345 + <image class='zs_t_img_3l' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
317 346 binderror="bind_bnerr3"></image>
  347 + </block>
  348 +
318 349 <block wx:if="{{object.goodicon==3}}">
319 350 <image class='{{g_filter.get_class(object.column,object.position)}}'
320 351 src='{{object.customicon}}'></image>
... ... @@ -457,9 +488,18 @@
457 488 <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" class="s1_gk_a1">
458 489 <view class="{{object.noboder==0?'zs_goods_xiao_bottom':'zs_goods_xiao'}}" >
459 490 <view class='zs_top_x'>
460   - <!--<image class='zs_t_img_x'></image>-->
461   - <block>
462   - <image class='zs_t_img_x' src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  491 + <block wx:if="{{object.big_order_type==3}}">
  492 + <view style="position: relative; width: 100%; height: 100%">
  493 + <image class='zs_t_img_x' src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  494 + binderror="bind_bnerr3"></image>
  495 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
  496 + binderror="bind_bnerr3"></image>
  497 + </view>
  498 + </block>
  499 +
  500 + <block wx:else>
  501 + <image class="zs_t_img_x {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}}"
  502 + src="{{item.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true"
463 503 binderror="bind_bnerr3" mode="widthFix" style='max-height:290rpx'></image>
464 504 </block>
465 505  
... ... @@ -587,12 +627,8 @@
587 627 <view class='wz_red'>¥{{item.shop_price}}</view>
588 628 <view class='del'>¥{{item.market_price}}</view>
589 629 </block>
590   -
591   -
  630 +
592 631 </block>
593   -
594   -
595   -
596 632 </view>
597 633 <view class='zs_wz5_x' wx:if="{{object.goodsnum}}">销量:{{item.sales_sum}}件</view>
598 634 </view>
... ... @@ -622,17 +658,30 @@
622 658  
623 659  
624 660 <!--商品展示-->
625   - <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;">
  661 +<swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.column==5}}" style="height: {{swiper_hei}}rpx;">
626 662 <view class="sp">
627 663 <swiper-item class="s_it" wx:for="{{goods_array}}">
628 664 <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
629 665 <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" style="width: 32%" >
630   - <view class='one' style="margin-left: 10rpx">
  666 + <view class="one {{object.big_order_type==0?'zj':''}}{{object.big_order_type==1?'yj':''}} " style="margin-left: 10rpx">
631 667 <view class='sp_top'>
632 668 <view class='s_img' style="position: relative; width: 100%">
633   - <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"
  669 +
  670 + <block wx:if="{{object.big_order_type==3}}">
  671 + <view style="position: relative; width: 100%; height: 100%">
  672 + <image src="{{object.pic_back}}" data-errorimg="object.pic_back" lazy-load="true"
  673 + binderror="bind_bnerr3"></image>
  674 +
  675 + <image class="n_box" style="top: {{object.top}}%;left:{{object.left}}%;width: {{object.width}}%;height: {{object.width}}%" src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}].goods_img" lazy-load="true" binderror="bind_bnerr3"></image>
  676 + </view>
  677 + </block>
  678 +
  679 + <block wx:else>
  680 + <image src="{{aitem.goods_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].goods_img"
634 681 binderror="bind_bnerr3" lazy-load="true" style="width: 100%"></image>
635   -
  682 + </block>
  683 +
  684 +
636 685 <block wx:if="{{object.goodicon==3}}">
637 686 <image class='{{g_filter.get_class(object.column,object.position)}}'
638 687 src='{{object.customicon}}'></image>
... ...
components/diy_goodsGroup/diy_goodsGroup.wxss
... ... @@ -154,6 +154,10 @@
154 154 margin-left: 20rpx;
155 155 }
156 156  
  157 +.zs_t_img_x.zj{ border: 1rpx solid #eee;}
  158 +.zs_t_img_x.yj{ border: 1rpx solid #eee;border-radius: 18rpx;}
  159 +
  160 +
157 161 .zs_center_x {
158 162 width: 100%;
159 163 min-height: 200rpx;
... ... @@ -727,8 +731,13 @@ swiper {
727 731  
728 732 .one {
729 733 margin-left: 14rpx;
  734 + overflow: hidden;
730 735 }
731 736  
  737 +.one.zj{ border: 1rpx solid #eee;}
  738 +.one.yj{ border: 1rpx solid #eee; border-radius: 18rpx;}
  739 +
  740 +
732 741 .sp .sp_top .s_top1_kill {
733 742 position: absolute;
734 743 background-color: #c4182e;
... ... @@ -814,5 +823,6 @@ top: 10rpx;
814 823 position: absolute;
815 824 right: 0rpx;
816 825 bottom: 10rpx;
  826 +}
817 827  
818   -}
819 828 \ No newline at end of file
  829 +.n_box{ position: absolute !important;z-index: 10}
820 830 \ No newline at end of file
... ...
components/diy_seckill/diy_seckill.js
... ... @@ -76,9 +76,12 @@ Component({
76 76 })
77 77 goodsidlist = ut.sub_last(goodsidlist);
78 78  
  79 + var user_id=getApp().globalData.user_id;
  80 + if(!user_id){ user_id=0;}
  81 +
79 82 //--调用接口,读取秒杀--
80 83 app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
81   - + os.stoid + "&goodsidlist=" + goodsidlist, {}).then(res => {
  84 + + os.stoid + "&goodsidlist=" + goodsidlist+"&user_id"+user_id, {}).then(res => {
82 85 console.log(res);
83 86 //如果秒杀的数组为空的时候
84 87 var goodslist = res.data.data;
... ... @@ -118,6 +121,7 @@ Component({
118 121 g_id.forEach(function (val, ind) {
119 122 goodslist.forEach(function (vy, indy) {
120 123 if (val.goodsid == vy.goods_id) {
  124 + if(!vy.id) vy.id=vy.prom_id;
121 125 all_array.push(vy);
122 126 }
123 127 })
... ...
components/goods_list/goods_list.wxml
... ... @@ -4,15 +4,15 @@
4 4 <view class="collects">
5 5 <view class="hang ">
6 6 <!-- 商品详情 -->
7   - <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}">
8   - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}" hover-class="none">
  7 + <view class="collect ib" wx:for="{{recommend}}" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{item.goods_name}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
  8 + <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">
9 9 <!-- 商品图⽚ -->
10 10 <image class="sp" src="{{url+item.original_img}}" mode="aspectFill" binderror="bind_bnerr_xc" data-url="{{url+item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image>
11 11 <view class="bottom">
12 12 <!-- 商品名称 -->
13 13 <view class="goods_name ellipsis-2 fs28">{{item.goods_name}}</view>
14 14 <!-- 判断是否有活动价 -->
15   - <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}">
  15 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
16 16 <view class="pdt10">
17 17 <view class="money flex xc-wc" >
18 18 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -167,10 +167,22 @@ Page({
167 167 if(item){
168 168 var price = item.price;
169 169 if(!price) price=item.shop_price;
170   -
  170 + switch(th.data.currentIndex){
  171 + case 0: item.prom_type=1;break;
  172 + case 1: item.prom_type=6;break;
  173 + case 2:
  174 + if(th.data.currentIndex2==1) item.prom_type = 5;
  175 + if(th.data.currentIndex2==2) {
  176 + item.prom_type = 3;
  177 + item.id=item.prom_id;
  178 + }
  179 + break;
  180 + }
  181 + item.prom_id=item.id;
  182 +
171 183 var title= item.goods_name;
172 184 var img=this.data.url+item.original_img;
173   - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
  185 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_type="+item.prom_type+"&prom_id="+item.prom_id;
174 186 if(getApp().globalData.user_id){
175 187 url+="&first_leader="+getApp().globalData.user_id;
176 188 }
... ... @@ -547,7 +559,26 @@ Page({
547 559  
548 560 var app = getApp();
549 561 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
  562 +
  563 + var prom_type=0;
  564 + var prom_id=th.data.share_good.id;
  565 + switch(th.data.currentIndex){
  566 + case 0: prom_type=1;break;
  567 + case 1: prom_type=6;break;
  568 + case 2:
  569 + if(th.data.currentIndex2==1) prom_type = 5;
  570 + if(th.data.currentIndex2==2){
  571 + prom_type = 3;
  572 + prom_id=th.data.share_good.prom_id;
  573 + }
  574 + break;
  575 + }
  576 +
  577 +
  578 +
550 579 var scene = th.data.share_good.goods_id+"";
  580 + scene+="."+prom_type+"."+prom_id;
  581 +
551 582 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
552 583 if(user_id>0){
553 584 scene+="_"+user_id;
... ... @@ -1129,14 +1160,27 @@ Page({
1129 1160 this.data.currentPage=1;
1130 1161 this.requestGoodsList();
1131 1162 },
1132   -
1133   -
1134   - go_goods:function(e){
1135   - var index=e.currentTarget.dataset.index;
1136   - var item=this.data.list[index];
1137   - var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
1138   - getApp().goto(url);
1139   - },
  1163 +
  1164 +
  1165 + go_goods: function (e) {
  1166 + var index = e.currentTarget.dataset.index;
  1167 + var item = this.data.list[index];
  1168 + var url = "/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id;
  1169 +
  1170 + switch(this.data.currentIndex){
  1171 + case 0: item.prom_type = 1;break;
  1172 + case 1: item.prom_type = 6;break;
  1173 + case 2:
  1174 + if(th.data.currentIndex2==1) item.prom_type = 5;
  1175 + if(th.data.currentIndex2==2) item.prom_type = 3;
  1176 + break;
  1177 + }
  1178 +
  1179 + item.prom_id = item.id;
  1180 + url+="&prom_type="+item.prom_type+"&prom_id="+item.prom_id
  1181 +
  1182 + getApp().goto(url);
  1183 + },
1140 1184  
1141 1185 go_coll_good:function(e){
1142 1186 var gid=e.currentTarget.dataset.gid;
... ...
packageA/pages/distribution/goods/goods.wxml
... ... @@ -75,13 +75,13 @@
75 75  
76 76 </label> -->
77 77 <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" wx:if="{{!(options.index == 1 && currentTabIndex ==1)}}"/>
78   - <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  78 + <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
79 79 <view class="pdr20"><image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load/></view>
80 80 <view class="flex fdc jc_sb">
81 81 <view class="ellipsis-2">{{item.goods_name}}</view>
82 82 <view>
83 83 <!-- 判断是否有活动价 -->
84   - <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}">
  84 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
85 85 <view class="flex xc-wc ai-center" >
86 86 <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text>
87 87 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ... @@ -214,7 +214,7 @@
214 214 </checkbox-group>
215 215  
216 216 <checkbox-group class="fs26 flex pd16 wrap" catchchange="checkboxChange" wx:else>
217   - <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  217 + <view class="item2 bg-white" wx:for="{{list.pageData}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
218 218 <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" mode="aspectFit" lazy-load/>
219 219 <view class="pd20 fs26 flex jc_sb fdc f1">
220 220 <view class="ellipsis-2">{{item.goods_name}}</view>
... ... @@ -222,7 +222,7 @@
222 222 <checkbox value="{{item.goods_id}}" checked="{{item.checked}}" data-name="checkbox" wx:if="{{!(options.index == 1 && currentTabIndex ==1)}}"/>
223 223 <view>
224 224 <!-- 判断是否有活动价 -->
225   - <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}">
  225 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0 }}">
226 226 <view class="flex xc-wc ai-center" >
227 227 <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text>
228 228 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ...
packageA/pages/distribution/shop/shop.wxml
... ... @@ -69,14 +69,14 @@
69 69 <view class="content">
70 70 <view class="fs26" wx:if="{{isShowRow}}">
71 71 <view class="item bg-white flex ai-center pd20" wx:for="{{list}}">
72   - <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  72 + <view class="flex pdl10" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
73 73 <view class="img-container pdr20" data-txt="已售:{{item.sales_sum}}">
74 74 <image class="img" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load mode="aspectFit" />
75 75 </view>
76 76 <view class="flex fdc jc_sb">
77 77 <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view>
78 78 <!-- 判断是否有活动价 -->
79   - <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}">
  79 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
80 80 <view class="flex xc-wc pdt20">
81 81 <text wx:if="{{item.prom_integral}}">
82 82 <text class="fs30">{{item.prom_integral}}</text>
... ... @@ -213,14 +213,14 @@
213 213 </view>
214 214 </view>
215 215 <view class="fs26 flex pd20 wrap" wx:else>
216   - <view class="item2 bg-white" wx:for="{{list}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  216 + <view class="item2 bg-white" wx:for="{{list}}" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_type={{item.prom_type}}&prom_id={{item.prom_id}}">
217 217 <view class="img-container" data-txt="已售:{{item.sales_sum}}">
218 218 <image class="img2" src="{{imghost + (item.original_img ? item.original_img : default_img)}}" lazy-load="true" />
219 219 </view>
220 220 <view class="pd20 fs26">
221 221 <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view>
222 222 <!-- 判断是否有活动价 -->
223   - <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}">
  223 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
224 224 <view class="flex xc-wc">
225 225 <text wx:if="{{item.prom_integral}}">
226 226 <text class="fs30" style="font-weight: bold;">{{item.prom_integral}}</text>
... ...
packageA/pages/goods_share/goods_share.js
... ... @@ -292,6 +292,11 @@ Page({
292 292 orderField:this.data.orderField,
293 293 orderType:this.data.orderType,
294 294 }
  295 +
  296 + var user_id=getApp().globalData.user_id;
  297 + if(!user_id){ user_id=0;}
  298 + req_data.user_id=user_id;
  299 +
295 300 if(this.data.key_str && this.data.key_str.trim()){
296 301 var str=this.data.key_str.trim();
297 302 req_data.key_str=str;
... ...
packageB/pages/user/collect_list/collect_list.wxml
... ... @@ -22,7 +22,7 @@
22 22 <!-- 商品集合 -->
23 23 <view class="{{editEd?'collects_max colls_max':'collects_max'}}">
24 24 <navigator class="collect flex-vertical" bindtap="iconClick" data-index="{{index}}" wx:for="{{collects}}" wx:key="{{index}}"
25   - data-url="{{editEd==0?'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id:''}}">
  25 + data-url="{{editEd==0?'/pages/goods/goodsInfo/goodsInfo?goods_id='+item.goods_id+'&prom_type='+item.prom_type+'&prom_id='+item.prom_id:''}}">
26 26  
27 27 <view class="radioCheck iconClick" wx:if="{{editEd}}">
28 28 <radio color="rgb(214,1,33)" class="scale" checked="{{item.checked==true?true:false}}"></radio>
... ... @@ -46,7 +46,7 @@
46 46 <!-- 优惠价 -->
47 47 <view class="price flex xc-wc">
48 48 <view class="fs24">¥</view>
49   - <view class="fs40">{{item.shop_price}}</view>
  49 + <view class="fs40">{{item.prom_price?item.prom_price:item.final_price}}</view>
50 50 </view>
51 51 <!-- 原价 -->
52 52 <view class="flex fs24 line through xc-ash">
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -249,8 +249,7 @@ Page({
249 249 return false;
250 250 }
251 251  
252   - //获取购物车的内容
253   - th.get_cart_val(e);
  252 +
254 253  
255 254 var ee = JSON.parse(JSON.stringify(e));
256 255 var appd = getApp().globalData;
... ... @@ -342,8 +341,13 @@ Page({
342 341 });
343 342 }
344 343 }
  344 + //获取购物车的内容
  345 + th.get_cart_val(e);
345 346  
346 347 })
  348 + }else{
  349 + //获取购物车的内容
  350 + th.get_cart_val(e);
347 351 }
348 352 }, 1);
349 353  
... ...
packageC/pages/group_list/group_list.js 0 → 100644
  1 +var e = getApp(), i = e.request, a = e.globalData.setting,os=a,ut = require("../../../utils/util.js");
  2 +var regeneratorRuntime = require('../../../utils/runtime.js');
  3 +const app = getApp();
  4 +let self = null;
  5 +
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + // type:1,
  13 + // goodlist: null,
  14 +
  15 + isLogin: false,
  16 + list: null,
  17 + isLoading: false, // 检测是否已经发送请求,防止重复发送请求
  18 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
  19 + pageNum: 1, // 当前页数
  20 + },
  21 +
  22 + /**
  23 + * 生命周期函数--监听页面加载
  24 + */
  25 + onLoad: function (options) {
  26 + self = this;
  27 +
  28 + app.isLogin().then(function(data) {//进入页面前已经授权登录成功
  29 + self.setData({
  30 + userInfo: data,
  31 + });
  32 + });
  33 + },
  34 +
  35 + /**
  36 + * 生命周期函数--监听页面初次渲染完成
  37 + */
  38 + onReady: function () {
  39 +
  40 + },
  41 +
  42 + /**
  43 + * 生命周期函数--监听页面显示
  44 + */
  45 + onShow: function () {
  46 + if(app.globalData.userInfo) {
  47 + if(!this.data.isLogin) {
  48 + this.setData({
  49 + userInfo: app.globalData.userInfo,
  50 + imghost: app.globalData.setting.imghost,
  51 + isLogin: true,
  52 + });
  53 +
  54 +
  55 + let url = '/api/weshop/goods/groupBuy/page';
  56 + let data = {
  57 + store_id: app.globalData.setting.stoid,
  58 + is_show: 1,
  59 + is_end: 0,
  60 + timetype:1
  61 + };
  62 +
  63 + this.setData({
  64 + list: null,
  65 + pageNum: 1,
  66 + noMore: false,
  67 + });
  68 +
  69 + this.getData(true, url, data).then(function() {
  70 + self.setData({
  71 + currentData: data,
  72 + });
  73 + });
  74 +
  75 + this.data.is_timer=1;
  76 +
  77 + };
  78 +
  79 +
  80 + //设置全局定时器
  81 + this.data.timer = setInterval(function () {
  82 + self.countDown();
  83 + },1000);
  84 +
  85 +
  86 + };
  87 +
  88 + },
  89 +
  90 + /**
  91 + * 生命周期函数--监听页面隐藏
  92 + */
  93 + onHide: function () {
  94 + clearInterval(this.data.timer);
  95 + },
  96 +
  97 + /**
  98 + * 生命周期函数--监听页面卸载
  99 + */
  100 + onUnload: function () {
  101 +
  102 + },
  103 +
  104 + /**
  105 + * 页面相关事件处理函数--监听用户下拉动作
  106 + */
  107 + onPullDownRefresh: function () {
  108 +
  109 + },
  110 +
  111 + /**
  112 + * 页面上拉触底事件的处理函数
  113 + */
  114 + onReachBottom: function () {
  115 + let data = this.data.currentData;
  116 + this.scrollToLower('/api/weshop/goods/groupBuy/page', data);
  117 + },
  118 +
  119 + /**
  120 + * 用户点击右上角分享
  121 + */
  122 + onShareAppMessage: function () {
  123 +
  124 + },
  125 +
  126 +
  127 + /**
  128 + * 请求数据
  129 + */
  130 + getData: function(isInit, url, data) {
  131 + let p = app.request.promiseGet(url, {
  132 + data: data,
  133 + isShowLoading: true,
  134 + })
  135 + .then(function(res) {
  136 + if(res.data.code == 0) {
  137 +
  138 + self.setData({
  139 + isLoading: false
  140 + });
  141 +
  142 + if(isInit) {// 第一次加载
  143 + self.setData({
  144 + list: res.data.data
  145 + });
  146 + } else {
  147 + self.setData({
  148 + 'list.pageData': self.data.list.pageData.concat(res.data.data.pageData)
  149 + });
  150 + };
  151 +
  152 + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) {
  153 + self.setData({
  154 + noMore: true
  155 + });
  156 + };
  157 +
  158 + } else {
  159 + self.setData({
  160 + 'list.pageData': []
  161 + });
  162 + };
  163 +
  164 + });
  165 +
  166 + return p;
  167 + },
  168 +
  169 +
  170 + /**
  171 + * 上拉加载
  172 + */
  173 + scrollToLower(url, requestData) {
  174 + // 数据总量
  175 + let total = this.data.list.total;
  176 + // 单页最大数据量
  177 + let pageSize = this.data.list.pageSize;
  178 + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’
  179 + if((total != 0)&&(total <= pageSize)) {
  180 + this.setData({
  181 + noMore: true
  182 + });
  183 + };
  184 +
  185 + if(!this.data.isLoading && !this.data.noMore) {
  186 + this.setData({
  187 + isLoading: true,
  188 + pageNum: this.data.pageNum + 1
  189 + });
  190 + requestData.page = this.data.pageNum;
  191 + this.getData(false, url, requestData);
  192 + };
  193 + },
  194 +
  195 +
  196 + //---小于10的格式化函数----
  197 + timeFormat(param) {
  198 + return param < 10 ? '0' + param : param;
  199 + },
  200 +
  201 +
  202 + //----倒计时函数-----
  203 + countDown() {
  204 + if(!this.data.is_timer) return false;
  205 + var th=this;
  206 + // 获取当前时间,同时得到活动结束时间数组
  207 + let newTime = ut.gettimestamp();
  208 + var endTimeList = this.data.list.pageData;
  209 + if(endTimeList == null) return null;
  210 + // 对结束时间进行处理渲染到页面
  211 + for(var i = 0; i < endTimeList.length; i++) {
  212 + var o = endTimeList[i];
  213 + var endTime = o.end_time;
  214 + // if(th.data.type==0) endTime = o.start_time;
  215 + let obj = null;
  216 + // 如果活动未结束,对时间进行处理
  217 + if (endTime - newTime > 0) {
  218 + let time = (endTime - newTime);
  219 + // 获取天、时、分、秒
  220 + let day = parseInt(time / (60 * 60 * 24));
  221 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  222 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  223 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  224 + obj = {
  225 + day: this.timeFormat(day), hou: this.timeFormat(hou), min: this.timeFormat(min), sec: this.timeFormat(sec), hide: 1
  226 + }
  227 + } else {
  228 + //活动已结束,全部设置为'00'
  229 + obj = { day: '00', hou: '00', min: '00', sec: '00' }
  230 + }
  231 + var txt ="goodlist["+i+"].djs";
  232 + th.setData({ [txt]: obj});
  233 + }
  234 + },
  235 +
  236 +
  237 +
  238 + //图片失败,默认图片
  239 + bind_bnerr2: function (e) {
  240 + var _errImg = e.target.dataset.errorimg;
  241 + var val = e.target.dataset.val;
  242 + if(val!=undefined && val!=null && val!='null' ){
  243 + var _errObj = {};
  244 + _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
  245 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  246 + }
  247 + },
  248 +
  249 + goto(e) {
  250 + let url = e.target.dataset.url;
  251 + app.goto(url);
  252 + },
  253 +
  254 +
  255 +})
0 256 \ No newline at end of file
... ...
packageC/pages/group_list/group_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "团购",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "nodata": "/components/nodata/nodata"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageC/pages/group_list/group_list.wxml 0 → 100644
  1 +<view class="list">
  2 + <view class="list-item" wx:for="{{list.pageData}}">
  3 + <view class="img-container">
  4 + <image class="img-block" src="{{imghost + item.original_img}}" data-val="{{item.original_img}}"
  5 + data-errorimg="list.pageData[{{index}}].original_img" binderror="bind_bnerr2" lazy-load="true"></image>
  6 + </view>
  7 + <view class="mgl20 flex fdc f1 jc_sb">
  8 + <view>
  9 + <view class="fs30">{{item.title}}</view>
  10 + <view class="flex ai_c">
  11 + <view class="fs26 tag">{{item.rebate}}折</view>
  12 + <view class="rmb c-red fs30">{{item.price}}</view>
  13 + <view class="rmb del fs24 c-7b pdl10">{{item.market_price}}</view>
  14 + </view>
  15 + </view>
  16 + <view class="flex jc_sb ai-center c-7b">
  17 + <view class="fs24">
  18 + <view>已售{{item.buy_num}}件</view>
  19 + <view class=""><text class="iconfont icon-shizhong fs24"></text>{{goodlist[index].djs.day}}天{{goodlist[index].djs.hou}}时{{goodlist[index].djs.min}}分{{goodlist[index].djs.sec}}秒</view>
  20 + </view>
  21 + <view class="btn" bindtap="goto" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=2">去团购</view>
  22 + </view>
  23 + </view>
  24 + </view>
  25 +</view>
  26 +
  27 +<view class="no-more" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底啦 ——</view>
  28 +<nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
... ...
packageC/pages/group_list/group_list.wxss 0 → 100644
  1 +page {
  2 + background-color: #f2f2f2;
  3 +}
  4 +
  5 +.list {
  6 + padding-left: 20rpx;
  7 + padding-right: 20rpx;
  8 +}
  9 +
  10 +.list-item {
  11 + background-color: white;
  12 + border-radius: 12rpx;
  13 + margin-top: 20rpx;
  14 + padding: 20rpx;
  15 + display: flex;
  16 +}
  17 +
  18 +.tag {
  19 + background-color: #ff6768;
  20 + color: white;
  21 + font-size: 24rpx;
  22 + padding-left: 10rpx;
  23 + padding-right: 10rpx;
  24 +}
  25 +
  26 +.img-container {
  27 + width: 200rpx;
  28 + height: 200rpx;
  29 +}
  30 +
  31 +.btn {
  32 + background-color: #ff6768;
  33 + color: white;
  34 + padding: 10rpx 30rpx;
  35 + border-radius: 40rpx;
  36 + font-size: 26rpx;
  37 +}
  38 +
  39 +.rmb {
  40 + position: relative;
  41 +}
  42 +
  43 +.rmb::before {
  44 + content: '¥';
  45 + font-size: 24rpx;
  46 +}
  47 +
  48 +.del {
  49 + text-decoration: line-through;
  50 +}
  51 +
  52 +.no-more {
  53 + font-size: 24rpx;
  54 + line-height: 2;
  55 + text-align: center;
  56 + /* margin-top: 10rpx; */
  57 + color: #ccc;
  58 +}
0 59 \ No newline at end of file
... ...
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.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 + var regeneratorRuntime = require('../../../../utils/runtime.js');
  12 +
  13 +Page({
  14 + data: {
  15 + //activity_type:1,//活动类型 商家1 阶梯2 会员3
  16 + p_status:1,//会员团的详细情况 1是正在行 2是成功 3失败
  17 + sf_length: 1,//人数大于5
  18 +
  19 + erweima:false,
  20 + meng:false,
  21 + zk:true,
  22 + stoid: o.stoid,
  23 + hiddenName: true,
  24 + teamlist:null,
  25 + teamgroup:null,
  26 + goods:null,//商品数据
  27 + pindGoods: null,//拼单数据
  28 + imageurl: o.imghost,
  29 + pay_f:0,//支付是否成功
  30 + order_sn:"",//订单编号
  31 + canvasHidden:false, //画画版
  32 + screenWidth:0,
  33 +
  34 + pd_xx: 0, //弹框
  35 + max_num:0,//最低成团人数
  36 + min_price:0,//最低价格
  37 + is_show:0,//加载完才显示
  38 +
  39 + share_img_localpath:"", //分享图片的本地图片
  40 + share_ewm_localpath: "", //分享的二维码本地图片
  41 + share_head:"", //分享头像的本地图片
  42 +
  43 + iurl:os.imghost,
  44 + ct_price:0,//阶梯团成团价格
  45 + sf_arr:null,
  46 +
  47 + },
  48 + onLoad: function (t) {
  49 + // wx.setNavigationBarTitle({ title: "拼团订单",})
  50 +
  51 + var that=this;
  52 + var th=this;
  53 + //获取用户设备信息,屏幕宽度
  54 + wx.getSystemInfo({
  55 + success: res => {
  56 + that.setData({ screenWidth: res.screenWidth })
  57 + }
  58 + })
  59 + var pay_f = t.payf, order_sn = t.ordersn;
  60 + this.setData({ pay_f: pay_f, order_sn: order_sn});
  61 + this.init(order_sn);
  62 +
  63 + //-- 自定义海报 --
  64 + getApp().request.promiseGet("/api/weshop/goods/poster/page",{
  65 + data:{store_id:os.stoid, type:1, is_use:1 }
  66 + }).then(res=>{
  67 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData[0] ){
  68 +
  69 + var poster_data=res.data.data.pageData[0];
  70 + var json_str=poster_data.jsonStr;
  71 + if(json_str){
  72 + var json_data=JSON.parse(json_str);
  73 + if(json_data.bg_img){
  74 +
  75 + //-- 把图片那到本地 --
  76 + wx.getImageInfo({
  77 + src:json_data.bg_img,
  78 + success: function(res) {
  79 + var path= res.path;
  80 + th.setData({share_b_img:path})
  81 + },
  82 + fail: function(res) {}
  83 + });
  84 + }
  85 + th.setData({poster:json_data})
  86 + }
  87 + }
  88 + })
  89 + },
  90 + //关闭展开列表
  91 + click:function(e){
  92 + this.setData({
  93 + hiddenName: !this.data.hiddenName,
  94 + zk: !this.data.zk,
  95 + })
  96 + },
  97 + //打开收起拼团列表
  98 + czk:function(e){
  99 + this.setData({
  100 + zk:!this.data.zk,
  101 + hiddenName: !this.data.hiddenName,
  102 + })
  103 + },
  104 + //打开蒙板提示
  105 + cmeng:function(e){
  106 + this.setData({
  107 + meng:!this.data.meng,
  108 + })
  109 + },
  110 +
  111 + //关闭蒙板提示
  112 + cmc:function(e){
  113 + this.setData({
  114 + meng: !this.data.meng,
  115 + })
  116 + },
  117 +//打开二维码提示
  118 + cerweima:function(e){
  119 + this.setData({
  120 + meng: !this.data.meng,
  121 + erweima: !this.data.erweima,
  122 + })
  123 + },
  124 +
  125 + cerc:function(e){
  126 + this.setData({
  127 + erweima: !this.data.erweima,
  128 + meng: !this.data.meng,
  129 + })
  130 + },
  131 +
  132 + async init( order_sn) {
  133 +
  134 + wx.showLoading();
  135 +
  136 + var goods_id = 0,//商品ID,
  137 + pageteam=null,//
  138 + original_img=null ,//商品图片
  139 + order=null,//订单编号
  140 + id = 0,//团购id
  141 + pt_listno = "",//团编号
  142 + pt_prom_id = 0, //活动id
  143 + ee = this,
  144 + team_id = 0,//活动id
  145 + ordertx=[],//头像图片
  146 + share_img=null,//分享图片
  147 + teamlist=null,//活动表
  148 + goods=null,//商品
  149 + teamgroup=null,//活動从表
  150 + max_num=0,//最低价格时的成团人数
  151 + p_status=1;
  152 +
  153 + //--如果商家团的时候---
  154 + await getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", {
  155 + data: {orderSn:order_sn,storeId:os.stoid }
  156 + })
  157 +
  158 + //获取order信息根据订单编号order_sn
  159 + await getApp().request.promiseGet("/api/weshop/order/page", {
  160 + data: { store_id: o.stoid, order_sn: order_sn,}
  161 + }).then(res => {
  162 + order = res.data.data.pageData[0];
  163 + pt_prom_id = order.pt_prom_id;
  164 + pt_listno = order.pt_listno;
  165 + })
  166 +
  167 + if (this.data.payf || order.pt_status == 3) p_status = 3; //失败
  168 + if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5)
  169 + p_status = 2; //成功
  170 + if (order.pt_status < 2 && !this.data.payf)
  171 + p_status = 1; //正在进行
  172 + if ( order.pt_status == 6) p_status = 4; //支付尾款失败
  173 +
  174 + //多少人参团头像
  175 + await getApp().request.promiseGet("/api/weshop/order/pagePtList", {
  176 + data: { store_id: o.stoid, pt_listno: pt_listno, }
  177 + }).then(res => {
  178 + ordertx = res.data.data.pageData;
  179 + })
  180 +
  181 +
  182 + var min_price=0;
  183 + //获取活动表的信息根据活动pt_prom_id
  184 + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, {
  185 + data: { }
  186 + }).then(res => {
  187 + if (res.data.code==0){
  188 + teamlist = res.data.data;
  189 + this.setData({teamlist: teamlist});
  190 + //获取当前时间,并且判断剩余时间
  191 + var nt = ut.gettimestamp();
  192 + teamlist.status = 0;
  193 + if (nt >= teamlist.start_time) teamlist.status = 1;
  194 +
  195 + goods_id = res.data.data.goods_id;
  196 + id = res.data.data.id;
  197 + share_img = ee.data.imageurl + res.data.data.share_imgurl;
  198 +
  199 + //----------查看阶梯团------------
  200 + if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined){
  201 + var ct_rylist = JSON.parse(teamlist.ct_rylist);
  202 + var max=0; var pri=0;
  203 + ct_rylist.forEach(function (val,ind) {
  204 + if(val.rynum>max){
  205 + max=val.rynum;
  206 + pri = val.price;
  207 + }
  208 + })
  209 + max_num=max;
  210 + min_price=pri;
  211 +
  212 + }
  213 +
  214 +
  215 + //获取商品信息
  216 + getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + goods_id, {
  217 + }).then(res => {
  218 + //商品地址
  219 + original_img = ee.data.imageurl+ res.data.data.original_img,
  220 + goods = res.data.data
  221 +
  222 + ee.setData({goods: goods,image: original_img,})
  223 +
  224 + })
  225 +
  226 + }
  227 + })
  228 +
  229 +
  230 + //只装5个
  231 + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num;
  232 + if(max_num){
  233 + ct_nun=parseInt(max_num);
  234 + if (ct_nun < ordertx.length) ct_nun = ordertx.length;
  235 + }
  236 +
  237 + if(ct_nun>5) ct_nun=5;
  238 + for(var i=0;i<ct_nun;i++){
  239 + if (i >= ordertx.length) sf_num++
  240 + else
  241 + ordertx2.push(ordertx[i]);
  242 + }
  243 +
  244 + var sf_arr=[];
  245 + for (var i=0;i<sf_num;i++){
  246 + sf_arr.push(i);
  247 + }
  248 +
  249 +
  250 +
  251 +
  252 + //获取活动从表信息team_id:305暂时
  253 + await getApp().request.promiseGet("/api/weshop/teamgroup/page" , {
  254 + data: { store_id: os.stoid, listno: pt_listno, team_id: pt_prom_id }
  255 + }).then(res => {
  256 + teamgroup = res.data.data.pageData[0];
  257 + if (teamgroup){
  258 + var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
  259 + teamgroup.buy_start_date=buy_start_date;
  260 + }
  261 + })
  262 +
  263 +
  264 + var ct_price = 0,
  265 + num_0 = ordertx.length;
  266 + if (teamlist.kttype == 3){
  267 + var js_data = JSON.parse(teamlist.ct_rylist);
  268 + js_data.forEach(function (val,ind) {
  269 + if (num_0<=val.rynum && ct_price==0){
  270 + ct_price=val.price;
  271 + }
  272 + })
  273 + if(ct_price==0) ct_price=min_price;
  274 + }
  275 +
  276 + //获取大家都在团信息
  277 + getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1?store_id="+ os.stoid +"&is_end=0&is_show=1" , {
  278 + data:{page:1,pageSize:2}
  279 + }).then(res => {
  280 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  281 + pageteam = res.data.data.pageData;
  282 + ee.setData({pageteam: pageteam,})
  283 + }
  284 +
  285 + })
  286 +
  287 + //--当是成团的时候的操作--
  288 + if(order.pt_status==2 || order.pt_status==4 || order.pt_status==5){
  289 + //设置值
  290 +
  291 + ee.setData({
  292 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup, min_price: min_price,
  293 + order: order, share_img: share_img,max_num:max_num,
  294 + pindGoods: teamlist,is_show:1, zk:false,
  295 + hiddenName: false, ct_price:ct_price,p_status:p_status,sf_arr:sf_arr});
  296 +
  297 + //--是否支付了尾款--
  298 + if(order.pt_status==4 || order.pt_status==5){
  299 + ee.setData({is_pay_wk:1});
  300 + }
  301 + }else{
  302 + console.log("239什么鬼", teamlist);
  303 + //设置值
  304 + ee.setData({
  305 + ordertx2: ordertx2, ordertx: ordertx, teamlist: teamlist, teamgroup: teamgroup,
  306 + order: order, p_status: p_status, min_price:min_price,
  307 + share_img: share_img, max_num: max_num, pindGoods: teamlist, is_show: 1,
  308 + ct_price: ct_price, p_status: p_status,sf_arr:sf_arr});
  309 + }
  310 +
  311 + wx.hideLoading();
  312 +
  313 + wx.setNavigationBarTitle({
  314 + title: "拼团详情",
  315 + })
  316 +
  317 + ee.countDown2();
  318 +
  319 + //获取分享图片的本地地址
  320 + var path2 = os.imghost + teamlist.share_imgurl;
  321 + wx.getImageInfo({
  322 + src: path2,
  323 + success: function (res) {
  324 + //res.path是网络图片的本地地址
  325 + ee.data.share_img_localpath = res.path;
  326 + },
  327 + fail: function (res) {
  328 + //失败回调
  329 + }
  330 + });
  331 +
  332 +
  333 + },
  334 + //---小于10的格式化函数----
  335 + timeFormat(param) {
  336 + return param < 10 ? '0' + param : param;
  337 + },
  338 + countDown2() {
  339 + var th = this;
  340 + // 获取当前时间,同时得到活动结束时间数组
  341 + var newTime = ut.gettimestamp();
  342 + var o = this.data.teamgroup;
  343 + if(!o) return false;
  344 +
  345 + var endTime = o.kt_end_time;
  346 + if (o.status == 0) endTime = o.start_time;
  347 +
  348 + //看一下,是否要支付尾款
  349 + if(o.team_type==3 && th.data.order.pt_status==2){
  350 + endTime = o.wk_end_time;
  351 + }
  352 +
  353 + let obj = null;
  354 + // 如果活动未结束,对时间进行处理
  355 + if (endTime - newTime > 0) {
  356 + let time = (endTime - newTime);
  357 + // 获取天、时、分、秒
  358 + let day = parseInt(time / (60 * 60 * 24));
  359 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  360 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  361 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  362 + obj = {
  363 + day: this.timeFormat(day),
  364 + hou: this.timeFormat(hou),
  365 + min: this.timeFormat(min),
  366 + sec: this.timeFormat(sec)
  367 + }
  368 + } else {
  369 + //活动已结束,全部设置为'00'
  370 + obj = {
  371 + day: '00',
  372 + hou: '00',
  373 + min: '00',
  374 + sec: '00'
  375 + }
  376 + }
  377 + var txt = "pindGoods.djs";
  378 + th.setData({
  379 + obj: obj
  380 + });
  381 + setTimeout(th.countDown2, 1000);
  382 + },
  383 +
  384 + //--定义的保存图片方法,分享团---
  385 + saveImageToPhotosAlbum: function () {
  386 + //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团
  387 + var type=1;
  388 + if(this.data.teamlist.kttype==3) type=2;
  389 +
  390 + wx.showLoading({ title: '生成中...', })
  391 + var that = this, th = that;
  392 + //设置画板显示,才能开始绘图
  393 + that.setData({
  394 + canvasHidden: true,
  395 + })
  396 +
  397 + if(this.data.share_hidden) {
  398 + this.setData({
  399 + share_hidden: false,
  400 + });
  401 + };
  402 +
  403 + var app = getApp();
  404 + var unit = that.data.screenWidth / 750 * 1.35;
  405 + var scene=th.data.teamgroup.id;
  406 + var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
  407 + if(user_id>0){
  408 + scene+="_"+user_id;
  409 + }
  410 +
  411 + //二微码
  412 + var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+
  413 + os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show";
  414 +
  415 + //读取文件成功则OK--
  416 + wx.getImageInfo({
  417 + src: path3,
  418 + success:function (res) {
  419 + //回调写法
  420 + th.get_head_temp(th.get_goods_temp,function () {
  421 + var vpath = res.path;
  422 + var context = wx.createCanvasContext('share');
  423 +
  424 +
  425 + //先画背景
  426 + var pg_path = "../../../images/share/share_bg.png";
  427 + //-- 如果有自定义海报的时候,判断背景的图片 --
  428 + if(th.data.share_b_img){
  429 + pg_path=th.data.share_b_img;
  430 + }
  431 +
  432 + var share_title=th.data.teamlist.share_title;
  433 + if(!share_title)
  434 + share_title=th.data.teamlist.title;
  435 + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  436 +
  437 + //-- 是自定义海报的情况下 --
  438 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  439 + //在线上分享人的情况下
  440 + if(parseInt(th.data.poster.show_headpic)){
  441 + //获取坐标
  442 + var x=parseFloat(th.data.poster.head_x)*2;
  443 + var y=parseFloat(th.data.poster.head_y)*2;
  444 + var x1=(x+90) *unit;
  445 + var y1=(y+50) *unit;
  446 + //--昵称---
  447 + context.setFontSize(24 * unit)
  448 + context.setFillStyle("black")
  449 + context.fillText(app.globalData.userInfo.nickname, x1, y1);
  450 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
  451 + //强烈推荐 改许程
  452 + var tj_path = "../../../images/share/q_tj.png";
  453 + context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
  454 + context.setFontSize(16 * unit)
  455 + context.setLineJoin('round'); //交点设置成圆角
  456 + context.setFillStyle("white")
  457 + context.fillText('强烈推荐', x1 + width+8*unit, y1-1*unit);
  458 + }
  459 +
  460 + }else{
  461 + //--昵称---
  462 + context.setFontSize(24 * unit)
  463 + context.setFillStyle("black")
  464 + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
  465 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
  466 + //强烈推荐
  467 + var tj_path = "../../../images/share/q_tj.png";
  468 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit);
  469 + context.setFontSize(18 * unit)
  470 + context.setFillStyle("white")
  471 + context.fillText('强烈推荐', 152 * unit + width + 20 * unit, 76 * unit);
  472 + }
  473 +
  474 +
  475 + //---产品名称---
  476 + context.setFontSize(21.3 * unit);
  477 + context.setFillStyle("black");
  478 +
  479 +
  480 +
  481 +
  482 + th.draw_Text(context,share_title,
  483 + 38 * unit, 180 * unit, 200 * unit, 279 * unit, unit);
  484 + //------产品的价格-------
  485 + context.setFontSize(24 * unit)
  486 + context.setFillStyle("red")
  487 +
  488 + var pri0 = th.data.teamlist.price;
  489 + pri0=parseFloat(pri0).toFixed(2);
  490 + var wd1=th.data.screenWidth-ut.measureText(pri0, 31 * unit)-25;
  491 + context.fillText("¥", wd1-15, 180 * unit);
  492 + context.setFontSize(31 * unit)
  493 + context.fillText(pri0, wd1, 180 * unit);
  494 +
  495 + //---市场价划掉---
  496 + context.setFillStyle("gray")
  497 + context.setFontSize(22 * unit)
  498 + pri0= "¥" + parseFloat(th.data.goods.market_price).toFixed(2);
  499 + var wd2=th.data.screenWidth-ut.measureText(pri0, 22 * unit)-25;
  500 + context.fillText(pri0, wd2, 210 * unit);
  501 +
  502 + context.setStrokeStyle('gray')
  503 + context.setLineWidth(1 * unit)
  504 + context.moveTo(wd2-5, 204 * unit)
  505 + context.lineTo(wd2+ut.measureText(pri0, 22 * unit)+5, 204 * unit)
  506 + context.stroke();
  507 + console.log(th.data.share_img_localpath);
  508 +
  509 +
  510 + //---中间大图---
  511 + context.drawImage(th.data.share_img_localpath, 68 * unit, 242 * unit, 410 * unit, 410 * unit);
  512 +
  513 + var g_ct=th.data.teamlist.ct_num-th.data.ordertx.length;
  514 + var wz= "";
  515 + if(g_ct>0) wz="还差"+g_ct+"人成团,";
  516 + else{
  517 + g_ct= th.data.max_num -th.data.ordertx.length;
  518 + if(g_ct>0){
  519 + wz="还差"+g_ct+"人享最低优惠,";
  520 + }else{
  521 + wz="已享受最优惠,";
  522 + }
  523 + }
  524 +
  525 + //-------大图后面就不一样了-----------
  526 + switch (type) {
  527 + case 1://会员团和商家团的展示
  528 + //---画线---
  529 + context.setLineWidth(1 * unit)
  530 + context.moveTo(32 * unit, 670 * unit)
  531 + context.lineTo(520 * unit, 670 * unit)
  532 + context.stroke();
  533 +
  534 + //---文字---
  535 + context.setFontSize(22 * unit)
  536 + context.setFillStyle("black")
  537 + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit);
  538 +
  539 + //绘制成团图片
  540 + var ct_img ="../../../images/share/ct_num.png";
  541 + context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit);
  542 + var ct_num = th.data.teamlist.ct_num;
  543 + context.setFontSize(14 * unit)
  544 +
  545 + context.setFillStyle("red")
  546 + if(ct_num<10){
  547 + context.fillText(ct_num+"人拼团", 92 * unit, 760 * unit);
  548 + }else{
  549 + context.fillText(ct_num+"人拼团", 86 * unit, 760 * unit);
  550 + }
  551 + context.setFontSize(22 * unit)
  552 + context.fillText("已拼"+th.data.teamlist.buy_num+"份", 166 * unit, 763 * unit);
  553 + context.setFillStyle("gray")
  554 + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 826 * unit);
  555 + context.setFillStyle("black")
  556 +
  557 + context.setFontSize(22 * unit)
  558 + context.fillText("长按识别二维码,立即参团", 40 * unit, 856 * unit);
  559 + //---二维吗图---
  560 + //-- 自定义海报 --
  561 + if(th.data.poster){
  562 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  563 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  564 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  565 + }else{
  566 + //---二维吗图---
  567 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  568 + }
  569 + break
  570 + case 2://阶梯团的展示
  571 + //---画线---
  572 + context.setLineWidth(1 * unit)
  573 + context.moveTo(32 * unit, 670 * unit)
  574 + context.lineTo(520 * unit, 670 * unit)
  575 + context.stroke();
  576 + //---文字---
  577 + context.setFontSize(22 * unit)
  578 + context.setFillStyle("black")
  579 + context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit);
  580 + //---绘制中间阶梯的价格---
  581 + var list= JSON.parse(th.data.teamlist.ct_rylist);
  582 + for(var i=0; i<list.length;i++){
  583 + var item=list[i];
  584 + var wi=i*90*unit;
  585 + context.setFontSize(16 * unit)
  586 + context.setFillStyle("red")
  587 + context.fillText("¥", 40 * unit+wi, 756 * unit);
  588 + context.setFontSize(22 * unit)
  589 + var pri=parseFloat(item.price).toFixed(2);
  590 + context.fillText(pri, 56 * unit+wi, 756 * unit);
  591 + context.setFillStyle("gray")
  592 + context.fillText("满"+item.rynum+"人", 40 * unit+wi, 786 * unit);
  593 + }
  594 +
  595 + //----------------下面部分----------------
  596 + context.setFillStyle("gray")
  597 + context.fillText(wz+"快来和我一起拼团吧!", 40 * unit, 830 * unit);
  598 + context.setFillStyle("black")
  599 + context.setFontSize(22 * unit)
  600 +
  601 + context.fillText("长按识别二维码,立即参团", 40 * unit, 860 * unit);
  602 + //---二维吗图---
  603 + //-- 自定义海报 --
  604 + if(th.data.poster){
  605 + var erm_x= parseFloat(th.data.poster.ewm_x)*2;
  606 + var erm_y= parseFloat(th.data.poster.ewm_y)*2;
  607 + context.drawImage(vpath, erm_x * unit, erm_y * unit, 120 * unit, 120 * unit);
  608 + }else{
  609 + //---二维吗图---
  610 + context.drawImage(vpath, 420 * unit, 726 * unit, 120 * unit, 120 * unit);
  611 + }
  612 + break
  613 + }
  614 +
  615 + //--- 如果是自定义海报的时候 ---
  616 + if(th.data.poster && parseInt(th.data.poster.style)==2){
  617 +
  618 + //如果显示会员信息的话
  619 + if(parseInt(th.data.poster.show_headpic)){
  620 + //获取坐标
  621 + var x= parseFloat(th.data.poster.head_x)*2;
  622 + var y=parseFloat(th.data.poster.head_y)*2;
  623 + //---绘制圆形要放在最后----
  624 + context.save();
  625 + context.beginPath();
  626 + var h_x = x* unit;
  627 + var h_y = y * unit;
  628 + var h_r = 40 * unit;
  629 + var cx = h_x + h_r;
  630 + var cy = h_y + h_r;
  631 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  632 + context.closePath();
  633 + context.fill();
  634 + context.clip();
  635 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  636 + context.restore();
  637 + }
  638 +
  639 + }else{
  640 + //---绘制圆形要放在最后----
  641 + context.save();
  642 + context.beginPath();
  643 + var h_x = 60 * unit;
  644 + var h_y = 24 * unit;
  645 + var h_r = 40 * unit;
  646 + var cx = h_x + h_r;
  647 + var cy = h_y + h_r;
  648 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  649 + context.closePath();
  650 + context.fill();
  651 + context.clip();
  652 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  653 + context.restore();
  654 + }
  655 +
  656 + //把画板内容绘制成图片,并回调 画板图片路径
  657 + context.draw(false, function () {
  658 + setTimeout(function () {
  659 + wx.canvasToTempFilePath({
  660 + x: 0, y: 0,
  661 + width: 750,
  662 + height: 1217,
  663 + destWidth: 750 * 750 / that.data.screenWidth,
  664 + destHeight: 1217 * 750 / that.data.screenWidth,
  665 + canvasId: 'share',
  666 + success: function (res) {
  667 +
  668 + that.setData({
  669 + shareImgPath: res.tempFilePath, canvasHidden: false,
  670 + })
  671 + if (!res.tempFilePath) {
  672 + wx.showModal({
  673 + title: '提示',
  674 + content: '图片绘制中,请稍后重试',
  675 + showCancel: false
  676 + })
  677 + return false;
  678 + }
  679 +
  680 + // wx.previewImage({
  681 + // //将图片预览出来
  682 + // urls: [that.data.shareImgPath]
  683 + // });
  684 +
  685 + that.setData({
  686 + showPoster: true,
  687 + });
  688 +
  689 + wx.hideLoading();
  690 + }
  691 + })
  692 + },500)
  693 + });
  694 + });
  695 + }
  696 + });
  697 + },
  698 +
  699 +
  700 + //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
  701 + draw_Text: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, unit) {
  702 + var lineWidth = 0;
  703 + var lastSubStrIndex = 0; //每次开始截取的字符串的索引
  704 + var han = 0;
  705 + for (let i = 0; i < str.length; i++) {
  706 + if (han == 2) return;
  707 +
  708 + //lineWidth += ctx.measureText(str[i]).width;
  709 + lineWidth += ut.measureText(str[i], 21.3 * unit);
  710 +
  711 + if (lineWidth > canvasWidth) {
  712 + han++;
  713 + if (han == 2)
  714 + ctx.fillText(str.substring(lastSubStrIndex, i) + '...', leftWidth, initHeight); //绘制截取部分
  715 + else
  716 + ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight);
  717 +
  718 + initHeight += 22; //22为字体的高度
  719 + lineWidth = 0;
  720 + lastSubStrIndex = i;
  721 + titleHeight += 20;
  722 + }
  723 + if (i == str.length - 1) { //绘制剩余部分
  724 + ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight);
  725 + }
  726 + }
  727 + },
  728 +
  729 + //c点击打开拼团弹窗
  730 + cpd: function() {
  731 + console.log("heheh");
  732 + this.setData({ pd_xx: 1,})
  733 + },
  734 +
  735 + //点击关闭拼团弹窗
  736 + close_pt_xx: function() {
  737 + this.setData({ pd_xx: 0, })
  738 + },
  739 +
  740 + go_goodsinfo:function (e) {
  741 + var gid=e.currentTarget.dataset.gid;
  742 + var url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gid;
  743 + wx.navigateTo({ url: url, }) //跳到非tabbar页
  744 + },
  745 +
  746 + gohome:function () {
  747 + getApp().goto("/pages/index/index/index");
  748 + },
  749 +
  750 + //--获取头像的本地缓存,回调写法--
  751 + get_head_temp:function (tt,func) {
  752 + var ee=this;
  753 + if(ee.data.share_head){
  754 + tt(func);
  755 + return false;
  756 + }
  757 + //---获取分享图片的本地地址,头像和商品图片----
  758 + var path2 = getApp().globalData.userInfo.head_pic;
  759 + if(path2==""){
  760 + ee.data.share_head ="../../../images/share/hui_hear_pic.png";
  761 + tt(func);
  762 + }else {
  763 + path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn");
  764 + path2=path2.replace("https://thirdwx.qlogo.cn","https://wx.qlogo.cn");
  765 + wx.getImageInfo({
  766 + src: path2,
  767 + success: function (res) {
  768 + //res.path是网络图片的本地地址
  769 + ee.data.share_head = res.path;
  770 + tt(func);;
  771 + },
  772 + fail: function (res) {
  773 + ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
  774 + tt(func);
  775 + }
  776 + });
  777 + }
  778 + },
  779 +
  780 + //--获取商品图片的本地缓存,回调写法--
  781 + get_goods_temp:function (tt) {
  782 + var ee=this;
  783 + if(ee.data.share_img_localpath) {
  784 + tt();
  785 + return false;
  786 + }
  787 + var path2 = os.imghost + ee.data.teamlist.share_imgurl;
  788 + //获取商品是分享图信息
  789 + wx.getImageInfo({
  790 + src: path2,
  791 + success: function (res) {
  792 + //res.path是网络图片的本地地址
  793 + ee.data.share_img_localpath = res.path;
  794 + tt();
  795 + },
  796 + fail: function (res) {
  797 + ee.data.share_img_localpath= "../../../images/share/default_g_img.gif"; //分享的图片不能用网络的
  798 + tt();
  799 + }
  800 + });
  801 + },
  802 +
  803 + go_pay_wk:function(){
  804 + var url = "/pages/cart/cart_wk/cart_wk?order_id=" + this.data.order.order_id;
  805 + getApp().goto(url);
  806 + },
  807 +
  808 + img_show_err:function(e){
  809 + var err_img = e.currentTarget.dataset.err;
  810 + var ob={};
  811 + ob[err_img] = this.data.iurl + "/miniapp/images/default_g_img.gif";
  812 + this.setData(ob);
  813 +
  814 + },
  815 +
  816 + //------ 分享配置 --------
  817 + onShareAppMessage: function (e) {
  818 + var th=this;
  819 + var scene=this.data.teamgroup.id;
  820 + var url="/pages/team/team_show/team_show?tg_id="+scene;
  821 + //--分享图片--
  822 + var img=th.data.iurl+th.data.teamlist.share_imgurl;
  823 + //--把会员分享出去--
  824 + if(getApp().globalData.user_id){
  825 + if(url.indexOf("?")>0)
  826 + url+="&first_leader="+getApp().globalData.user_id;
  827 + else
  828 + url+="?first_leader="+getApp().globalData.user_id;
  829 + }
  830 + // console.log('url+++++>>>>>', url, th.data.teamlist.title);
  831 +
  832 + var share_title=th.data.teamlist.title;
  833 + if(th.data.teamlist.share_title){
  834 + share_title=th.data.teamlist.share_title;
  835 + }
  836 +
  837 + return {
  838 + path:url,
  839 + title: share_title,
  840 + imageUrl: img,
  841 + }
  842 + },
  843 +
  844 + clickShare() {
  845 + this.setData({
  846 + share_hidden: true,
  847 + });
  848 + },
  849 +
  850 + send() {
  851 + this.setData({
  852 + share_hidden:false,
  853 + });
  854 + },
  855 +
  856 + cancel() {
  857 + this.setData({
  858 + share_hidden:false,
  859 + });
  860 + },
  861 +
  862 +
  863 + closePoster() {
  864 + this.setData({
  865 + showPoster: false,
  866 + });
  867 + },
  868 +
  869 +
  870 + // 保存图片到手机
  871 + savePic() {
  872 + console.log('保存图片');
  873 + var self = this;
  874 + // 获取用户的当前设置,返回值中有小程序已经向用户请求过的权限
  875 + this.getSetting().then((res) => {
  876 + // 判断用户是否授权了保存到相册的权限,如果没有发起授权
  877 + if (!res.authSetting['scope.writePhotosAlbum']) {
  878 + this.authorize().then(() => {
  879 + // 同意授权后保存下载文件
  880 + this.saveImage(self.data.shareImgPath)
  881 + .then(() => {
  882 + self.setData({
  883 + showPoster: false
  884 + });
  885 + });
  886 + })
  887 + } else {
  888 + // 如果已经授权,保存下载文件
  889 + this.saveImage(self.data.shareImgPath)
  890 + .then(() => {
  891 + self.setData({
  892 + showPoster: false
  893 + });
  894 + });
  895 + }
  896 +
  897 + })
  898 + },
  899 +
  900 +
  901 + // 保存图片到系统相册
  902 + saveImage(saveUrl) {
  903 + var self = this;
  904 + return new Promise((resolve, reject) => {
  905 + wx.saveImageToPhotosAlbum({
  906 + filePath: saveUrl,
  907 + success: (res) => {
  908 + wx.showToast({
  909 + title: '保存成功',
  910 + duration: 1000,
  911 + });
  912 + self.setData({
  913 + showPlaybill: 'true'
  914 + });
  915 + resolve();
  916 + },
  917 + fail: () => {
  918 + wx.showToast({
  919 + title: '保存失败',
  920 + duration: 1000,
  921 + });
  922 + }
  923 + })
  924 + })
  925 + },
  926 +
  927 + // 获取用户已经授予了哪些权限
  928 + getSetting() {
  929 + return new Promise((resolve, reject) => {
  930 + wx.getSetting({
  931 + success: res => {
  932 + resolve(res)
  933 + }
  934 + })
  935 + })
  936 + },
  937 +
  938 + // 发起首次授权请求
  939 + authorize() {
  940 + // isFirst 用来记录是否为首次发起授权,
  941 + // 如果首次授权拒绝后,isFirst赋值为1
  942 + let isFirst = wx.getStorageSync('isFirst') || 0;
  943 + return new Promise((resolve, reject) => {
  944 + wx.authorize({
  945 + scope: 'scope.writePhotosAlbum',
  946 + // 同意授权
  947 + success: () => {
  948 + resolve();
  949 + },
  950 + // 拒绝授权,这里是用户拒绝授权后的回调
  951 + fail: res => {
  952 + if(isFirst === 0) {
  953 + wx.setStorageSync('isFirst', 1);
  954 + wx.showToast({
  955 + title: '保存失败',
  956 + icon: 'none',
  957 + duration: 1000
  958 + })
  959 + } else {
  960 + this.showModal();
  961 + }
  962 + console.log('拒绝授权');
  963 + reject();
  964 + }
  965 + })
  966 + })
  967 + },
  968 +
  969 +
  970 +
  971 +
  972 +})
  973 +
... ...
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.json 0 → 100644
  1 +{
  2 + "windom": {
  3 + "navigationBarTitleText": "参团详情",
  4 + "backgroundTextStyle": "light",
  5 + "navigationBarTextStyle": "white",
  6 + "navigationBarBackgroundColor": "#ffffff",
  7 + "backgroundColor": "#eeeeee"
  8 + },
  9 + "usingComponents": {
  10 + "share": "/components/share/share"
  11 + }
  12 +}
0 13 \ No newline at end of file
... ...
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml 0 → 100644
  1 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
  2 +<!---- //文字"-->
  3 +<view>
  4 +
  5 + <view class='center'>
  6 + <view class='cenleft'>
  7 + <image src='{{image}}' binderror='img_show_err' data-err="image"></image>
  8 + </view>
  9 + <view class='cenright'>
  10 + <!----//图片区域---->
  11 + <view class='cenrt'>
  12 + <view class='xc-goods-details ellipsis-2 fs30'>
  13 + {{goods.goods_name}}
  14 + </view>
  15 + </view>
  16 + <view class='cenrcen flex-vertical-between'>
  17 + <view>
  18 + <view class="fs40 xc-wc" style='font-size:40rpx'>
  19 + <span class="fs28 xc-rmbs" style="font-weight:500;">¥</span>{{teamlist.price}}</view>
  20 + <view class="fs22 word-line xc-wc" style="width:172rpx;">
  21 + 零售价¥{{goods.market_price}}
  22 + </view>
  23 + </view>
  24 + <view class="xc-wc fs24">
  25 + <view>
  26 + <view class="">已拼{{teamlist.buy_num}}件</view>
  27 + <view class="flex xc-valframe t-c">
  28 + <view class="xc-frame-img">
  29 + <image class="picture" src="{{iurl}}/miniapp/images/bai-ren.png"></image>
  30 + </view>
  31 + <view class="xc-people-val">
  32 + {{teamlist.ct_num}}人拼
  33 + </view>
  34 + </view>
  35 + </view>
  36 + </view>
  37 + </view>
  38 + </view>
  39 + <view class='clear'></view>
  40 + </view>
  41 + <!----以上商品显示完成---->
  42 +
  43 +
  44 + <view class='body'>
  45 + <!-- 阶梯团 -->
  46 + <view class='bodytop' wx:if="{{teamlist.kttype==3&& p_status==1}}">
  47 + 当前价格
  48 + <text class="xc-wc">¥{{ct_price}}</text>,
  49 + <block wx:if="{{max_num-ordertx.length>0}}">
  50 + <text class="xc-wc">还差{{max_num-ordertx.length}}</text>人享受最低价格<text class="xc-wc">¥{{min_price}}</text>
  51 + </block>
  52 + <block wx:else>
  53 + 该团已经拼购到最低价了哦~
  54 + </block>
  55 + </view>
  56 + <!-- 拼团成功 -->
  57 + <view class="xc-ptcomplete-ladder flex-level fs28" wx:if="{{teamlist.kttype==3&&p_status==2}}">
  58 + <view class="xc-wc">拼团成功</view>,当前价格
  59 + <text class="xc-wc">¥{{ct_price}}</text>
  60 + <view class="xc-img-frame oh">
  61 + <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image>
  62 + </view>
  63 + </view>
  64 +
  65 + <view style="height: 20rpx" wx:if="{{teamlist.kttype==3&&p_status==4}}"></view>
  66 +
  67 +
  68 + <!-- 阶梯团失败 -->
  69 + <view class=".xc-fail-ladder flex-level fs28" wx:if="{{pay_f==1 || order.pt_status==3}}">
  70 + <view class="xc-wc">拼团失败</view>
  71 + <view class="xc-img-frame oh" >
  72 + <image class="img" src="{{iurl}}/miniapp/images/xc-qtshibai.png"></image>
  73 + </view>
  74 + </view>
  75 +
  76 + <!-- 会员团和商家团 -->
  77 + <view class='bodytop' wx:if="{{(teamlist.kttype==2 || teamlist.kttype==1) && p_status==1}}">
  78 + 还差
  79 + <text class="xc-wc">{{teamlist.ct_num-ordertx.length}}</text>人成团,组团成功为您节省
  80 + <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元
  81 + </view>
  82 + <!-- 拼团成功 -->
  83 + <view class="xc-ptcomplete flex-level fs28" wx:if="{{p_status==2 && (teamlist.kttype==2||teamlist.kttype==1)}}">
  84 + <view class="xc-wc">拼团成功</view>,为您节省
  85 + <text class="xc-wc">{{filters.toFix(goods.market_price-teamlist.price,2)}}</text>元
  86 + <view class="xc-img-frame oh">
  87 + <image class="img" src="{{iurl}}/miniapp/images/xc_qtcg.png"></image>
  88 + </view>
  89 + </view>
  90 +
  91 + <!----//// //头像---->
  92 + <view class="flex_tou">
  93 + <view class='bodyimg flex-level'>
  94 + <view class='d' wx:for="{{ordertx2}}" wx:key>
  95 + <image src='{{item.head_pic}}'></image>
  96 + <span wx:if="{{item.is_pt_tz==1}}">团长</span>
  97 + </view>
  98 + <view class='d' wx:for="{{sf_arr}}" wx:if="{{p_status!=2}}">
  99 + <image src='{{iurl}}/miniapp/images/shafa.png'></image>
  100 + </view>
  101 +
  102 + <view class='xc-ellipsis-img flex-vertical' wx:if="{{ordertx.length>5}}">
  103 + <image class="pictures " src="{{iurl}}/miniapp/images/xc_ellipsis.png"></image>
  104 + </view>
  105 + </view>
  106 + </view>
  107 +
  108 + <view class='bodytime'>
  109 + <!----/ //旁边直线---->
  110 + <view class='bodytimeleft'>
  111 + <view class='xian'></view>
  112 + </view>
  113 +
  114 + <!-- 阶梯团 开始-->
  115 + <view class='bodytimecen' wx:if='{{p_status==1}}'>
  116 + 剩余
  117 +
  118 + <span>{{obj.hou}}</span>:
  119 + <span>{{obj.hou}}</span>:
  120 + <span>{{obj.min}}</span>:
  121 + <span>{{obj.sec}}</span>结束
  122 + </view>
  123 +
  124 + <!-- 阶梯团 成功-->
  125 + <view class='bodytimecen-success' wx:if='{{teamlist.kttype==3&&p_status==2 && is_pay_wk!=1}}'>
  126 + 剩余支付时间:
  127 +
  128 + <span>{{obj.hou}}</span>时
  129 + <span>{{obj.min}}</span>分
  130 + <span>{{obj.sec}}</span>秒
  131 + </view>
  132 +
  133 + <view class='bodytimecen-success' wx:if='{{teamlist.kttype==3&&p_status==4 }}'>
  134 + 拼团已结束
  135 + </view>
  136 +
  137 + <!-- </block> -->
  138 + <!-- 阶梯团失败 -->
  139 + <view class='bodytimecen' wx:if='{{p_status==3}}'>
  140 + 还差
  141 + <text class="xc-wc">{{teamlist.ct_num-ordertx.length}}</text>人参团, 拼团失败。
  142 + </view>
  143 + <!-- 会员团 -->
  144 + <view class='bodytimecen' wx:if='{{(teamlist.kttype==1 || teamlist.kttype==2) && p_status==2}}'>
  145 + 已经有
  146 + <text class="xc-wc">{{ordertx.length}}</text>人参团, 拼团成功。
  147 + </view>
  148 +
  149 + <!----//旁边直线---->
  150 + <view class='bodytimeright'>
  151 + <view class='xian'></view>
  152 + </view>
  153 + </view>
  154 +
  155 + <!-- 阶梯团 -->
  156 + <view class='fs30 xc-green' wx:if='{{teamlist.kttype==3&&p_status==2}}'>
  157 + 拼团成功, 规定时间内支付尾款即发货
  158 + </view>
  159 + <view class="xc-wc fs30 t-c xc-onclik" wx:if="{{p_status==1}}">
  160 + 点击下方按钮分享给小伙伴,可快速成团!
  161 + </view>
  162 +
  163 + <!-- <block wx:if="{{pay_f!=1 && order.pt_status<2}}"> -->
  164 + <!----/ // // // //按钮---->
  165 +
  166 + <view wx:if="{{teamlist.kttype==3}}" class='bodybutton'>
  167 + <!-- 阶梯团 -->
  168 + <button wx:if="{{p_status==1}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'>
  169 + <!-- <button wx:if="{{p_status==1}}" bindtap="clickShare" bindtap='cmeng' style='background-color:#fab55a; color:#fff'> -->
  170 + 邀请好友参团
  171 + </button>
  172 + <button bindtap="go_pay_wk" style='background-color:#42c780;' wx:if="{{order.pt_status==2 && order.is_zsorder==4 }}">
  173 + 支付尾款
  174 + </button>
  175 + </view>
  176 + <!-- <view wx:elif="{{teamlist.ct_num-ordertx.length>0}}" class='' bindtap='cmeng'> -->
  177 +
  178 + <!--会员团 商家团-->
  179 + <button class="bodybutton" style='background-color:#fab55a; color:#fff' bindtap='clickShare'
  180 + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团</button>
  181 +
  182 + <!-- </view> -->
  183 + <!-- </block> -->
  184 + <view class="xc-home-page-frame">
  185 + <button class="xc-home-page" bindtap='gohome'> 返回首页</button>
  186 + </view>
  187 +
  188 + <view class='zspan' hidden="{{hiddenName}}" bindtap='click'>查看拼团列表
  189 + <view class='down-arrow1'></view>
  190 + </view>
  191 +
  192 + </view>
  193 +
  194 + <!---/ // // // // //展开拼团列表---->
  195 + <view class='bodyfoot'>
  196 + <view class='bodyselect' wx:if="{{zk}}" bindtap='czk'>
  197 + <span>查看拼团列表
  198 + <view class='down-arrow'></view>
  199 + </span>
  200 + </view>
  201 +
  202 + <view class='zhangxi' hidden="{{hiddenName}}" wx:for="{{ordertx}}" wx:for-index="ky">
  203 + <view class='img rel'>
  204 + <view class="xc-list" wx:if="{{item.is_pt_tz}}">
  205 + <span>团长</span>
  206 + </view>
  207 + <image src='{{item.head_pic}}'></image>{{item.nickname}}
  208 + </view>
  209 + <!-- <view class='zssj' wx:if="{{teamlist.kttype==1}}">{{item.add_time_date}}参团</view> -->
  210 + <view class='zssj' wx:if="{{ky==0 &&teamlist.kttype!=1}}">{{item.add_time_date}}
  211 + <text>开团</text>
  212 + </view>
  213 + <view class='zssj' wx:else>{{item.add_time_date}} 参团</view>
  214 + <view class="clear"></view>
  215 + </view>
  216 +
  217 +
  218 + <view class='clear'></view>
  219 + </view>
  220 + <view class='clear'></view>
  221 +
  222 + <!----//大家都在团---->
  223 + <view class='goodslist'>
  224 + <view class='goodslisttop'>
  225 + <!-- <view class='goodslistspan fs24'>大家都在团</view> -->
  226 + <!-- 推荐商品 -->
  227 + <view class="flex-center rel xc-linellae-frame">
  228 + <view class="xc-linellae"></view>
  229 + <view class="abs flex-center xc-recommend-frame ">
  230 + <image class=" xc-recommend" src="{{iurl}}/miniapp/images/diamond.png">
  231 + </image>
  232 + <view class="xc-recommend-word">大家都在团</view>
  233 + </view>
  234 + </view>
  235 + <view class='goodslisttopright'></view>
  236 + </view>
  237 + <view class="changxin">
  238 + <view class='onegoods' wx:for="{{pageteam}}" wx:key="{{index}}" bindtap="go_goodsinfo" data-gid="{{item.goods_id}}">
  239 + <view class='onegoodsimg'>
  240 + <image src="{{imageurl+item.share_imgurl}}"></image>
  241 + </view>
  242 + <view class="xc-buttmo-frame">
  243 + <view class='onegoodsdesc '>
  244 +
  245 + <view class='price flex-vertical-between'>
  246 + <view class='jgleft fs32 flex-center xc-wc'>
  247 + <view class="xc-ping xc-wc fs26 t-c">拼</view>
  248 + <text class="fs20" style='height:39rpx;margin-right:5rpx;margin-left:15rpx;' >¥</text>11.00{{item.price}}
  249 + </view>
  250 + <view class='jgright'>{{item.ct_num}}2
  251 + <span>人参团</span>
  252 + </view>
  253 + </view>
  254 + </view>
  255 + <view class="xc-shuoming ellipsis-2 fs26">
  256 + <text>{{item.goods_name}}</text>
  257 + </view>
  258 + </view>
  259 + </view>
  260 + </view>
  261 + </view>
  262 +</view>
  263 +
  264 +
  265 +
  266 +
  267 +<!--二维码显示页面-->
  268 +<canvas canvas-id='share' style='width:750rpx;height:1217rpx;' wx:if='{{canvasHidden}}'></canvas>
  269 +<!--拼团玩法弹出框-->
  270 +<!----弹起的---->
  271 +<block wx:if="{{pd_xx}}">
  272 + <view class="bview"></view>
  273 + <view class="juzhong">
  274 + <view class="xq">
  275 + <view class="title" bindtap="close_pt_xx">拼团玩法介绍
  276 + <image src="{{iurl}}/miniapp/images/gbi.png" class="close"></image>
  277 + </view>
  278 + <view>1.开团:
  279 + <text class="hs1">选择心仪商品,点击“发起X人团”按钮,付款后即为开团成功;</text>
  280 + </view>
  281 + <view>2.参团:
  282 + <text class="hs1">进入朋友分享的页面,点击“立即参团”按钮,付款后即为参团成功,若多人同时支付,支付成功时间较早的人获得参团资格;</text>
  283 + </view>
  284 + <view>3.成团:
  285 + <text class="hs1">在开团或参团成功后,点击“邀请小伙伴参团”将页面分享给好友,在有效时间内凑齐人数即为成团,此时商家会开始发货;</text>
  286 + </view>
  287 + <view>4.组团失败:
  288 + <text class="hs1">在有效时间内未凑齐人数,即为组团失败,此时付款项会原路退回到支付账户;</text>
  289 + </view>
  290 + <view>5.
  291 + <text class="hs1">组团有效期间内,拼购商品订单不允许取消。 </text>
  292 + </view>
  293 + </view>
  294 + </view>
  295 +</block>
  296 +
  297 +<!-- 分享控件,底部弹出 -->
  298 +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
  299 +
  300 +
  301 +<view wx:if="{{showPoster}}">
  302 + <view class="mask" catchtap="closePoster"></view>
  303 + <view class="poster-container">
  304 + <view class="poster-wrapper">
  305 + <view class="poster">
  306 + <!-- <view class="poster" bindtap="previewImage"> -->
  307 + <image src="{{shareImgPath}}" class="poster-img" show-menu-by-longpress></image>
  308 + <view class="btn-close" catchtap="closePoster"><text class="iconfont icon-close"></text></view>
  309 + </view>
  310 + <view class="btn-container">
  311 + <!--<button class="btn-share" open-type="share" bindtap="">微信好友分享</button>-->
  312 + <button class="btn-share" bindtap="savePic">保存到相册</button>
  313 + </view>
  314 + </view>
  315 + </view>
  316 +</view>
  317 +
  318 +
  319 +
... ...
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxss 0 → 100644
  1 +page{
  2 + background-color:#eee;
  3 +}
  4 +.top{
  5 + background-color:rgb(216, 230, 220);
  6 + color: rgb(98, 155, 13);
  7 + text-align: center;
  8 + height:120rpx;
  9 + width: 100%;
  10 + padding-top:24rpx;
  11 +}
  12 +
  13 +.center{
  14 + height: 240rpx;
  15 + width: 100%;
  16 + position: relative;
  17 + background:#fff;
  18 +}
  19 +
  20 +.cenleft{
  21 + width: 240rpx;
  22 + height: 100%;
  23 +
  24 + float: left;
  25 + display:flex;
  26 + justify-content: center;
  27 + align-items: center;
  28 +}
  29 +
  30 +.cenleft image{
  31 + background-color:white ;
  32 + width: 200rpx;
  33 + height: 200rpx;
  34 +
  35 +}
  36 +
  37 +
  38 +.cenrt{
  39 + width: 460rpx; margin-top: 10rpx;
  40 +}
  41 +
  42 +.cenright{
  43 + height: 100%;
  44 + width: 460rpx;
  45 +
  46 + float: left;
  47 +}
  48 +
  49 +.cenrtop{
  50 + margin-top: 10rpx;
  51 + background-color: red;
  52 + color: white;
  53 + border-radius:10rpx;
  54 + padding-left: 16rpx;
  55 + width: 140rpx;
  56 + font-size: 32rpx;
  57 + float: left;
  58 + height: 40rpx;
  59 +}
  60 +
  61 +.cenrtoptitle{
  62 + float: left;
  63 + width: 295rpx;
  64 + height: 40rpx;
  65 + margin-left: 12rpx;
  66 + font-size: 28rpx;
  67 + margin-top:12rpx;
  68 +}
  69 +
  70 +.cenrtoptitle>span{
  71 + width: 100%;
  72 + display: inline-block;
  73 + overflow:hidden;
  74 + text-overflow:ellipsis;
  75 + white-space:nowrap
  76 +}
  77 +
  78 +.cenrcen{
  79 + height: 70rpx;
  80 + margin-top: 35rpx;
  81 + width:474rpx;
  82 +}
  83 +.jg{ font-size: 40rpx;
  84 + margin-right: 30rpx;}
  85 +.jgx{
  86 + font-size: 28rpx;
  87 + color: #777;
  88 + text-decoration:line-through;
  89 + margin-left: 20rpx;
  90 +}
  91 +
  92 +.cenrfoot{
  93 + align-content: center;
  94 + text-align: center;
  95 + border: 2rpx solid red;
  96 + border-radius:10rpx;
  97 + color: red;
  98 + float: left;
  99 + font-size: 24rpx;
  100 + padding: 4rpx 16rpx;
  101 +}
  102 +
  103 +.body{
  104 + background-color: white;
  105 + /* min-height:418rpx; */
  106 + width: 100%;
  107 + margin-top: 4rpx;
  108 + border-top:5rpx solid #eee;
  109 + height: auto;
  110 +}
  111 +
  112 +.bodytop{
  113 + background-color: white;
  114 + text-align: center;
  115 + font-size: 28rpx;
  116 + height:100rpx;
  117 + line-height:117rpx;
  118 +
  119 +}
  120 +
  121 +.bodytop span{
  122 + color: red;
  123 +}
  124 +
  125 +
  126 +.bodyimg{
  127 + height:140rpx;
  128 + width:590rpx;
  129 +
  130 +
  131 +
  132 +}
  133 +.bodyimg image{
  134 +
  135 +border-radius:50rpx;
  136 +height: 96rpx;
  137 +width: 96rpx;
  138 +background-color:burlywood;
  139 +margin-top: 30rpx;
  140 + position: absolute;
  141 +
  142 +}
  143 +
  144 +.d{
  145 +width:101rpx;
  146 + height:101rpx;
  147 + display: inline-block;
  148 + margin-right:15rpx;
  149 +
  150 +}
  151 +
  152 +.bodyimg span{
  153 + background-color:#e22b44;
  154 + color: white;
  155 + font-size: 24rpx;
  156 + border-radius:6rpx;
  157 + padding:2rpx 10rpx;
  158 + position: relative;
  159 + top: 0rpx;
  160 + left: 40rpx;
  161 +}
  162 +
  163 +
  164 +
  165 +.bodyspan{
  166 + color: red;
  167 + text-align: center;
  168 + font-size: 26rpx;
  169 +
  170 +}
  171 +
  172 +.bodyselect{
  173 + line-height: 47rpx;
  174 +}
  175 +
  176 +.bodytime{
  177 + height: 88rpx;
  178 + width: 100%;
  179 + display: flex;
  180 + flex-wrap: nowrap;
  181 + margin-left:40rpx;
  182 + align-items:center;
  183 +
  184 +}
  185 +
  186 +.bodytimeleft{
  187 + text-decoration:line-through;
  188 + flex-grow: 1.7;
  189 +}
  190 +
  191 +
  192 +.bodytimecen-success{
  193 + text-align: center;
  194 + flex-grow: 1;
  195 + line-height:75rpx;
  196 + font-size: 30rpx;
  197 + color: #000;
  198 +}
  199 +.bodytimecen-success span{
  200 +
  201 + color: #18ba5f;
  202 + border-radius:7rpx;
  203 + font-size: 30rpx;
  204 + margin: 0 auto;
  205 +
  206 +}
  207 +.bodytimecen{
  208 + text-align: center;
  209 + flex-grow: 1;
  210 +
  211 + font-size: 30rpx;
  212 + color: #000;
  213 +}
  214 +.bodytimecen span{
  215 + background-color: #333333;
  216 + color: white;
  217 + border-radius:7rpx;
  218 + padding-left: 10rpx;
  219 + font-size: 30rpx;
  220 + margin: 0 auto;
  221 + padding-right:10rpx;
  222 + margin-right:5px
  223 +}
  224 +
  225 +
  226 +.bodytimecen span:last-child{
  227 + margin-right: 10rpx;
  228 +}
  229 +
  230 +.bodytimeright{
  231 + flex-grow: 1.7;
  232 + margin-right:72rpx;
  233 +
  234 +}
  235 +
  236 +.bodybutton{
  237 + width: 90%;
  238 + margin: 0 auto;
  239 + text-align: center;
  240 + line-height: 60rpx;
  241 + border-radius:15rpx;
  242 + height: auto;
  243 +}
  244 +
  245 +.bodybutton button{
  246 + height:60rpx;
  247 + width: 100%;
  248 + background-color: #e4374d;
  249 + color: white;
  250 + font-size:26rpx;
  251 + border-radius:12rpx;
  252 +
  253 +}
  254 +
  255 +.bodyfoot{
  256 +
  257 + width: 100%;
  258 + text-align: center;
  259 +
  260 + font-size: 28rpx;
  261 + color: #000;
  262 + background-color: white;
  263 +}
  264 +
  265 +
  266 +
  267 +
  268 +
  269 +.pintuan{
  270 + width: 100%;
  271 + height: 84rpx;
  272 + background-color: white;
  273 + color: black;
  274 + text-align: center;
  275 + font-size:36rpx;
  276 + margin-top: 60rpx;
  277 +}
  278 +
  279 +.pintuanzhou{
  280 +float: left;
  281 +
  282 +line-height: 84rpx;
  283 +width: 220rpx;
  284 +}
  285 +
  286 +.pintuanyou{
  287 + float: right;
  288 + color: rgb(168, 167, 167);
  289 + line-height: 84rpx;
  290 + font-size: 28rpx;
  291 + margin-right: 20rpx;
  292 +}
  293 +
  294 +.onegoods{
  295 + background-color: white;
  296 + width: 345rpx;
  297 + min-height: 490rpx;
  298 + height:auto;
  299 +
  300 + border:2rpx solid #eee;
  301 +
  302 + float: left;
  303 + margin-right:17rpx;
  304 + border-radius:20rpx;
  305 +}
  306 +
  307 +.goodsl{
  308 + background-color: white;
  309 +}
  310 +
  311 +.onegoodsimg{
  312 + width: 100%;
  313 + height: 360rpx;
  314 +}
  315 +
  316 +.onegoodsimg image{
  317 + height: 100%;
  318 + width: 100%;
  319 + border-radius:20rpx 20rpx 0 0;
  320 +
  321 +}
  322 + .xc-buttmo-frame{
  323 + min-height: 103rpx;
  324 + height: auto;
  325 + padding-bottom:15rpx;
  326 +
  327 + }
  328 +.xc-buttmo-frame .onegoodsdesc {
  329 +
  330 + height: 80rpx;
  331 +}
  332 +
  333 +.xc-buttmo-frame .onegoodsdesc .price{
  334 +
  335 + padding-left:10rpx;
  336 + height:85rpx;
  337 +
  338 +}
  339 +.xc-ping{
  340 + border-radius: 50%;
  341 + background: #fff;
  342 + line-height:34rpx;
  343 +width:34rpx;
  344 +height:34rpx;
  345 +font-size:24rpx;
  346 +
  347 +}
  348 +.jgleft{
  349 +border-radius:36rpx;
  350 +height:45rpx;
  351 +line-height:50rpx;
  352 +color:#fff;
  353 +padding-left:7rpx;
  354 +padding-right:24rpx;
  355 +background:#e4374d;
  356 +}
  357 +
  358 +.jgright{
  359 + font-size: 26rpx;
  360 + height:16rpx;
  361 +padding-right:10rpx;
  362 +color:rgb(168, 167, 167);
  363 +}
  364 +
  365 +.jgright span{
  366 + color: rgb(168, 167, 167);
  367 +}
  368 +
  369 +.goodslisttop{
  370 + width: 100%;
  371 +}
  372 +
  373 +.goodslisttop{
  374 + width: 100%;
  375 + margin-top: 5rpx;
  376 + border-bottom: 4rpx solid #eee;
  377 + text-align: center;
  378 +}
  379 +
  380 +.goodslistspan{
  381 +
  382 + margin: 0 auto;
  383 + padding-top: 20rpx;
  384 +}
  385 +
  386 +.xian{
  387 + width: 100%;
  388 + border-bottom: 2rpx solid #eee;
  389 + float: left;
  390 +}
  391 +
  392 +.bodyselect{
  393 + height: 90rpx;
  394 + background-color: white;
  395 + width: 100%;
  396 + line-height:90rpx;
  397 +
  398 +}
  399 +
  400 +
  401 +.changxin{
  402 + overflow: hidden;
  403 + width: 100%;
  404 + padding-left:20rpx;
  405 +
  406 +}
  407 +
  408 +.zhangxi{
  409 + width: 100%;
  410 + background-color:white;
  411 + color: black;
  412 +}
  413 +
  414 +.img{
  415 + height: 100rpx;
  416 + margin-bottom: 0rpx;
  417 + float: left;
  418 + color: black;
  419 + line-height:100rpx;
  420 +display:flex;
  421 +align-items:center;
  422 +
  423 +}
  424 +
  425 +.zhangxi image{
  426 + border-radius:50rpx;
  427 + height: 60rpx;
  428 + width: 60rpx;
  429 + float: left;
  430 +
  431 + background-color: red;
  432 + margin-left: 40rpx;
  433 + margin-right:10rpx;
  434 +
  435 +}
  436 +
  437 +.zhangxi .zssj{
  438 + width: 413rpx;
  439 + margin-left: 28rpx;
  440 + float: right;
  441 + margin-top:32rpx;
  442 +}
  443 +
  444 +.zspan{
  445 + float: left;
  446 + text-align: center;
  447 + display: flex;
  448 + align-items: center;
  449 + justify-content: center;
  450 + height: 48rpx;
  451 + font-size: 28rpx;
  452 + color:#000;
  453 + margin-bottom: 10rpx;
  454 + padding-bottom: 10rpx;
  455 + width: 100%;
  456 + background: #fff;
  457 + border-bottom:3rpx solid #eee;
  458 + margin-top:20rpx;
  459 +
  460 +}
  461 +
  462 +
  463 +
  464 +.mtop{
  465 + text-align: center;
  466 + color: white;
  467 + background-color:rgba(0, 0, 0, .4);
  468 + width: 100%;
  469 + height: 100%;
  470 + position: fixed;
  471 + z-index: 5;top:0;left: 0;
  472 +
  473 +}
  474 +
  475 +.mt1{
  476 + margin-top: 200rpx;
  477 + margin-bottom: 20rpx;
  478 +}
  479 +
  480 +.mts{
  481 + color:#E1E10B;
  482 +}
  483 +
  484 +.mcou{
  485 + font-size: 48rpx;
  486 +
  487 +}
  488 +
  489 +.mfoot{
  490 + width: 100%;
  491 + margin-top: 700rpx;
  492 +}
  493 +
  494 +
  495 +.mbtn{
  496 + margin-top: 60rrpx;
  497 + width: 400rpx;
  498 + background: #666666;
  499 + color: #fff;
  500 + border-radius: 20rpx;
  501 + font-size: 32rpx;
  502 +}
  503 +
  504 +
  505 +
  506 +
  507 +
  508 +
  509 +
  510 +.etop{
  511 + padding-top: 200rpx;
  512 + width: 100%;
  513 + height: 100%;
  514 + position: fixed;
  515 + left: 0rpx;
  516 + top: 0rpx;
  517 + z-index: 12rpx;
  518 +background-color:rgba(0, 0, 0, .4);
  519 +
  520 +}
  521 +
  522 +.emyimage{
  523 + display:flex;
  524 + justify-content: center;
  525 + align-items: center;
  526 +}
  527 +
  528 +
  529 +.emyimage image{
  530 + background-color: red;
  531 + width: 300rpx;
  532 + height: 300rpx;
  533 + margin: 0 auto;
  534 +
  535 +}
  536 +
  537 +.espan{
  538 + font-size: 32rpx;
  539 + margin-top: 10rpx;
  540 +}
  541 +
  542 +.erweima{
  543 + margin-top: 10rpx;
  544 + display: flex;
  545 + width: 100%;
  546 +
  547 +}
  548 +
  549 +.erzhou{
  550 + width: 200rpx;
  551 +
  552 +
  553 + margin-right: 20rpx;
  554 +}
  555 +
  556 +.erzhou image{
  557 + background-color: blanchedalmond;
  558 + width: 200rpx;
  559 + height: 200rpx;
  560 +}
  561 +
  562 +
  563 +.eright{
  564 + width: 500rpx;
  565 + font-size: 32rpx;
  566 +
  567 +}
  568 +
  569 +
  570 +
  571 +.ecc{
  572 + float: right;
  573 + margin-right: 48rpx;
  574 +}
  575 +
  576 +
  577 +.eee{
  578 + padding-top:40rpx;
  579 +
  580 +width:90%;
  581 +height:70%;
  582 +
  583 +padding-left:32rpx;
  584 +margin-left:20rpx;
  585 +
  586 +background-color:white;
  587 +
  588 +}
  589 +
  590 +.clear{
  591 + clear: both;
  592 +}
  593 +
  594 +.down-arrow {
  595 + display: inline-block;
  596 + position: relative;
  597 + width: 40rpx;
  598 + height: 30rpx;
  599 + margin-right: 20rpx;
  600 +}
  601 +
  602 +.down-arrow::after {
  603 + display: inline-block;
  604 + content: " ";
  605 + height: 18rpx;
  606 + width: 18rpx;
  607 + border-width: 0 2rpx 2rpx 0;
  608 + border-color: #000;
  609 + border-style: solid;
  610 + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  611 + transform-origin: center;
  612 + transition: transform 0.3s;
  613 + position: absolute;
  614 + top: 50%;
  615 + right: 10rpx;
  616 + margin-top: -10rpx;
  617 +}
  618 +
  619 +.down-arrow1 {
  620 + display: inline-block;
  621 + position: relative;
  622 + width: 40rpx;
  623 + height: 30rpx;
  624 + margin-right: 20rpx;
  625 + margin-top: 12rpx;
  626 +}
  627 +
  628 +.down-arrow1::after {
  629 + display: inline-block;
  630 + content: " ";
  631 + height: 18rpx;
  632 + width: 18rpx;
  633 + border-width: 0 2rpx 2rpx 0;
  634 + border-color: #000;
  635 + border-style: solid;
  636 + transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  637 + transform-origin: center;
  638 + transition: transform 0.3s;
  639 + position: absolute;
  640 + top: 50%;
  641 + right: 10rpx;
  642 + margin-top: -10rpx;
  643 +}
  644 +
  645 +.down-arrow1::after {
  646 + transform-origin: center;
  647 + transform: rotate(-135deg);
  648 + transition: transform 0.3s;
  649 +}
  650 +
  651 +.bview {
  652 + position: fixed;
  653 + top: 0;
  654 + left: 0;
  655 + width: 100%;
  656 + height: 100%;
  657 + background-color: rgba(0, 0, 0, 0.5);
  658 +}
  659 +
  660 +.juzhong {
  661 + position: fixed;
  662 + top: 0;
  663 + left: 0;
  664 + width: 100%;
  665 + height: 100%;
  666 + display: flex;
  667 + flex-direction: row;
  668 + justify-content: center;
  669 + align-items: center;
  670 +}
  671 +
  672 +.juzhong .xq {
  673 + padding: 0 20rpx;
  674 + background: #fff;
  675 + font-size: 30rpx;
  676 + padding-bottom: 20rpx;
  677 +}
  678 +
  679 +.juzhong .xq .title {
  680 + text-align: center;
  681 + margin: 20rpx 0;
  682 + position: relative;
  683 + height: 50rpx;
  684 +}
  685 +
  686 +.juzhong .xq .hs1 {
  687 + font-size: 28rpx;
  688 + color: #ab8f9e;
  689 +}
  690 +
  691 +.juzhong .xq .title .close {
  692 + position: absolute;
  693 + top: 0;
  694 + right: 0;
  695 + width: 45rpx;
  696 + height: 45rpx;
  697 +}
  698 +
  699 +.pt_qd {
  700 + margin-top: 40rpx;
  701 + height: auto;
  702 +}
  703 +
  704 +.spec-cart-btn.w100 {
  705 + width: 100%;
  706 + margin-left: 0;
  707 + height: 80rpx;
  708 + line-height: 80rpx;
  709 +}
  710 +
  711 +.pt_status_set{
  712 + position: absolute; right: 10rpx; top:50rpx; width: 120rpx; height: 120rpx;
  713 +}
  714 +
  715 +
  716 +
  717 +.xc-goods-details{
  718 +width:479rpx;
  719 +margin-top:20rpx;
  720 +height:77rpx;
  721 +}
  722 +
  723 +.xc-valframe{
  724 + border-radius:7rpx;
  725 +border:1rpx solid;
  726 +margin-top:3rpx;
  727 +}
  728 +.xc-valframe .xc-frame-img{
  729 + width:30rpx;
  730 +height:100%;
  731 +background:#e22b44;
  732 +}
  733 +.xc-valframe .xc-frame-img .picture{
  734 + width:25rpx;
  735 +height:25rpx;
  736 +margin-top:4rpx;
  737 +
  738 +}
  739 +.xc-ellipsis-img{
  740 +width:56rpx;
  741 +height:96rpx;
  742 +
  743 +}
  744 +.xc-ellipsis-img .pictures{
  745 + width:56rpx;height:56rpx;
  746 +}
  747 +.flex_tou{ display: flex; justify-content: center; width: 100%;}
  748 +.xc-ptcomplete{
  749 + width:74%;
  750 +height:105rpx;
  751 +line-height:105rpx;
  752 +float:right;
  753 +
  754 +}
  755 +.xc-ptcomplete .xc-img-frame .img{
  756 + width: 105rpx;
  757 + height: 105rpx;
  758 + float: right;
  759 +}
  760 +.xc-ptcomplete-ladder .xc-img-frame{
  761 + width:201rpx;
  762 + height: 105rpx;
  763 + margin-top:20rpx;
  764 +}
  765 +.xc-ptcomplete-ladder .xc-img-frame .img{
  766 + width: 105rpx;
  767 + height: 105rpx;
  768 + float: right;
  769 + padding-right:6rpx;
  770 +}
  771 +.xc-ptcomplete .xc-img-frame{
  772 + width:190rpx;
  773 + height: 105rpx;
  774 + margin-top:20rpx;
  775 +}
  776 +.xc-ptcomplete .xc-end{
  777 + width:283rpx;
  778 +text-align:right;
  779 +}
  780 +.iw{
  781 +padding-right:33rpx;
  782 +}
  783 +.xc-ptcomplete .xc-img-frames{
  784 + width:360rpx;
  785 +height:105rpx;
  786 +margin-top:20rpx;
  787 +
  788 +}
  789 +.xc-ptcomplete .xc-img-frames .img{
  790 + width: 105rpx;
  791 + height: 105rpx;
  792 + float: right;
  793 + padding-right:6rpx;
  794 +}
  795 +.xc-home-page-frame{
  796 + padding-top:16rpx;
  797 +
  798 +}
  799 +.xc-home-page-frame .xc-home-page{
  800 + background-color: #e22b44;border-radius:15rpx;
  801 +width:90%;
  802 +color:#fff;
  803 +height:60rpx;
  804 +font-size:26rpx;
  805 +line-height:60rpx;
  806 +}
  807 +/* */
  808 +.xc-people-val{
  809 + padding-left:8rpx;
  810 +padding-right:8rpx;
  811 +}
  812 +.xc-onclik{
  813 + width:100%;
  814 +height:70rpx;
  815 +
  816 +}
  817 +.xc-green{
  818 + color: #18ba5f;
  819 + text-align:center;
  820 +flex-grow:1;
  821 +height:90rpx;
  822 +
  823 +
  824 +}
  825 +.xc-ptcomplete-ladder{
  826 + width:74%;
  827 +height:105rpx;
  828 +line-height:105rpx;
  829 +float:right;
  830 +}
  831 +.xc-fail-ladder{
  832 + width:61%;
  833 +height:105rpx;
  834 +line-height:105rpx;
  835 +float:right;
  836 +
  837 +}
  838 +.xc-fail-ladder .xc-img-frame{
  839 + width:61%;
  840 +height:105rpx;
  841 +margin-top:20rpx;
  842 +}
  843 +.xc-fail-ladder .xc-img-frame .img{
  844 + width: 105rpx;
  845 + height: 105rpx;
  846 + float: right;
  847 + padding-right:6rpx;
  848 +}
  849 +.xc-list{
  850 + background-color:#e22b44;
  851 +color:white;
  852 +font-size:17rpx;
  853 +border-radius:6rpx;
  854 +padding:0 5rpx;
  855 +position:absolute;
  856 +top:13rpx;
  857 +left:80rpx;
  858 +width:34rpx;
  859 +line-height:25rpx;
  860 +
  861 +}
  862 +
  863 +.xc-linellae-frame{
  864 + width: 100%;
  865 + height: 60rpx;
  866 + background: #eee;
  867 +}
  868 +.xc-linellae-frame .xc-linellae{
  869 + width: 425rpx;
  870 + height: 1rpx;
  871 + border-bottom: 1rpx solid #a5a5a5;
  872 +}
  873 +.xc-recommend-frame{
  874 +background:#eee;
  875 +width:200rpx;
  876 +height:100%;
  877 +
  878 +}
  879 +.xc-recommend-frame .xc-recommend{
  880 + width: 35rpx;
  881 + height: 27rpx;
  882 + margin-top:7rpx;
  883 +}
  884 +.xc-recommend-frame .xc-recommend-word{
  885 +font-size:26rpx;
  886 +color: #a9a9a9;
  887 +margin-left:5rpx;
  888 +}
  889 +.xc-rmbs{
  890 +
  891 +height:40rpx;
  892 +}
  893 +.xc-shuoming{
  894 + padding-left:10rpx;
  895 +}
  896 +
  897 +
  898 +.poster-container {
  899 + box-sizing: border-box;
  900 + position: fixed;
  901 + top: 50%;
  902 + left: 50%;
  903 + transform: translate(-50%, -50%);
  904 + width: calc(100% - 210rpx);
  905 + z-index: 1000;
  906 +}
  907 +.mask {
  908 + position: fixed;
  909 + top: 0;
  910 + left: 0;
  911 + width: 100%;
  912 + height: 100%;
  913 + z-index: 999;
  914 + background-color: rgba(0,0,0,.4);
  915 +}
  916 +.poster-wrapper {
  917 + width: 100%;
  918 +}
  919 +
  920 +.poster {
  921 + box-sizing: border-box;
  922 + width: 100%;
  923 + height: 905rpx;
  924 + border-radius: 20rpx;
  925 + /* box-shadow: 0 8px 12px #666; */
  926 + position: relative;
  927 + z-index: 999;
  928 + overflow: hidden;
  929 +}
  930 +.poster-img {
  931 + display: block;
  932 + width: 100%;
  933 + height: 100%;
  934 +}
  935 +.btn-container {
  936 + display: flex;
  937 + justify-content: space-around;
  938 +}
  939 +.btn-share {
  940 + display: block;
  941 + background-color: #FE6867;
  942 + color: white;
  943 + border-radius: 8rpx;
  944 + line-height: 80rpx;
  945 + margin-top: 28rpx;
  946 + padding: 0 60rpx;
  947 +}
  948 +
  949 +
  950 +.btn-close {
  951 + /* background-color: rgba(0,0,0,.5); */
  952 + color: #ccc;
  953 + width: 50rpx;
  954 + height: 50rpx;
  955 + line-height: 50rpx;
  956 + text-align: center;
  957 + border-radius: 50%;
  958 + position: absolute;
  959 + right: 20rpx;
  960 + top: 20rpx;
  961 +}
  962 +
  963 +.icon-close {
  964 + font-size: 48rpx;
  965 +}
0 966 \ No newline at end of file
... ...
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.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 +var regeneratorRuntime = require('../../../../utils/runtime.js');
  12 +var e = getApp(),oo = e.globalData.setting;
  13 +
  14 +Page({
  15 + data: {
  16 + wu:false,
  17 + imageurl: os.imghost,//有礼派图片地址,
  18 + iurl: os.imghost,//有礼派图片地址,
  19 + pt_state:0,
  20 + order : null,//订单数据
  21 + currentTab: 0,
  22 + current:0,
  23 + ordertx:[],//头像
  24 + baseUrl: "/api/weshop/order/page?1=1",
  25 + resourceUrl: e.globalData.setting.resourceUrl,
  26 + currentPage: 1,
  27 + requestData: null,
  28 + original_img:null,
  29 + timer:null,
  30 +
  31 +
  32 +
  33 +
  34 + tabArr: ['全部','参团中','已团中','未团中'],
  35 + currentTabIndex: 0,
  36 + },
  37 + onLoad: function () {
  38 + this.data.requestData=new Array();
  39 + this.init(0);
  40 + },
  41 + onShow:function(){
  42 + var th=this;
  43 + //设置全局定时器
  44 + th.data.timer=setInterval(function () {
  45 + th.countDown();
  46 + },1000);
  47 + },
  48 +
  49 +
  50 + clickTab(e) {
  51 + this.setData({
  52 + currentTabIndex: e.target.dataset.index,
  53 + });
  54 + },
  55 +
  56 +
  57 + /**
  58 + * 点击tab切换
  59 + */
  60 + swichNav: function (e) {
  61 + this.data.requestData=[];
  62 + this.data.currentPage=1;
  63 + var that = this;
  64 +
  65 + if (that.data.order == null){
  66 + that.setData({
  67 + wu:true
  68 + })
  69 + }
  70 +
  71 + if (this.data.currentTab === e.target.dataset.current) {
  72 + return false;
  73 + } else {
  74 + that.setData({
  75 + currentTab: e.target.dataset.current,
  76 + })
  77 + that.init(e.target.dataset.current);
  78 + }
  79 + },
  80 +
  81 + async init(current) {
  82 + var where="1=1";
  83 + var user_id = getApp().globalData.user_id;
  84 + switch (current){
  85 + case "1":
  86 + where+="&pt_status=1";
  87 + break;
  88 + case "2":
  89 + where += "&pt_ok=1";
  90 + break;
  91 + case "3":
  92 + where += "&pt_status=3";
  93 + break;
  94 + }
  95 +
  96 + var goods_id = 0,//商品ID,
  97 + original_img = [],//商品图片
  98 + ee = this,
  99 + ordertx=[],//头像
  100 + order = null,//订单数据
  101 + goods = null,//商品数据
  102 + users = null,//会员数据
  103 + order_goods=null;//订单商品表
  104 +
  105 + //获取订单表的信息根据活动user_id,pt_prom_id>0 AND pay_time>0
  106 + /*---
  107 + await getApp().request.promiseGet("/api/weshop/order/page?"+where, {
  108 + data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,}
  109 + }).then(res => {
  110 + order = res.data.data.pageData;
  111 + this.data.currentPage++;
  112 + })--*/
  113 +
  114 + await getApp().request.promiseGet("/api/weshop/order/pageTuan?"+where, {
  115 + data: { is_pt:1,store_id: os.stoid, user_id: user_id, pageSize: 6, page: this.data.currentPage,}
  116 + }).then(res => {
  117 + order = res.data.data.pageData;
  118 + this.data.currentPage++;
  119 + })
  120 +
  121 +
  122 + wx.showLoading({ title: "加载中"});
  123 + for (i = 0; i < order.length; i++) {
  124 + //获取订单从表信息
  125 + await getApp().request.promiseGet("/api/weshop/ordergoods/pageGoods", {
  126 + data: { store_id: os.stoid, order_id: order[i].order_id }
  127 + }).then(res => {
  128 + order_goods = res.data.data.pageData;
  129 + order[i].order_goods = order_goods;
  130 + order[i].gimage = ee.data.imageurl + order_goods[0].original_img;
  131 + })
  132 +
  133 +
  134 + //获取订单表信息根据上面查询的订单号order[i].pt_listno
  135 + await getApp().request.promiseGet("/api/weshop/order/pagePtList", {
  136 + data: { store_id: os.stoid, pt_listno: order[i].pt_listno,pageSize:60,page:1}
  137 + }).then(res => {
  138 + //console.log("ordertx");
  139 + ordertx = res.data.data.pageData;
  140 + //console.log(ordertx);
  141 + order[i].tx=ordertx;
  142 + })
  143 +
  144 +
  145 +
  146 + if (order[i].is_zsorder== 4) {
  147 + var num = 0;
  148 + var jt_data = JSON.parse(order[i].ct_rylist);
  149 + for (var m in jt_data) {
  150 + if (jt_data[m].rynum > num) num = jt_data[m].rynum;
  151 + }
  152 + order[i].max_ct_num = num;
  153 + }
  154 +
  155 + var sf_num = order[i].ct_num;
  156 + if (order[i].ct_num>=3){ sf_num=3;}
  157 + sf_num=sf_num-ordertx.length;
  158 + if(sf_num>0) {
  159 + var arr = [];
  160 + for(var j=0;j<sf_num;j++){
  161 + arr.push(j);
  162 + }
  163 + order[i].sf_num=arr;
  164 + }
  165 +
  166 + }
  167 + //设置值
  168 + for (var ii = 0; ii < order.length;ii++){
  169 + this.data.requestData.push(order[ii]);
  170 + }
  171 +
  172 + wx.hideLoading();
  173 + ee.setData({ order: this.data.requestData, ordertx: ordertx, isgo:1});
  174 + },
  175 +
  176 + //---滚动到底部加载更多---
  177 + onReachBottom: function () {
  178 + this.init(this.data.currentTab);
  179 + },
  180 +
  181 + resetData: function () {
  182 + n.resetConfig(), this.data.order = null, this.data.currentPage = 1;
  183 + },
  184 +
  185 + //----跳转到拼单success展示-----
  186 + go_team_success:function(e) {
  187 + var order_sn=e.currentTarget.dataset.ordsn;
  188 + wx.navigateTo({
  189 + url: "/pages/team/team_success/team_success?ordersn=" + order_sn,
  190 + });
  191 + },
  192 +
  193 + onHide:function(){
  194 + //--清理定时器--
  195 + clearInterval(this.timer);
  196 + },
  197 +
  198 + //----倒计时函数-----
  199 + countDown() {
  200 + var th=this;
  201 + // 获取当前时间,同时得到活动结束时间数组
  202 + let newTime =ut.gettimestamp();
  203 + var endTimeList = this.data.order;
  204 +
  205 + if(endTimeList==null) return null
  206 + // 对结束时间进行处理渲染到页面
  207 + for (var i = 0; i < endTimeList.length;i++){
  208 + var o = endTimeList[i];
  209 + if(o.kt_end_time==undefined) continue;
  210 + var endTime = o.kt_end_time;
  211 + let obj = null;
  212 + // 如果活动未结束,对时间进行处理
  213 + if (endTime - newTime > 0){
  214 + let time = (endTime - newTime);
  215 + // 获取天、时、分、秒
  216 + let day = parseInt(time / (60 * 60 * 24));
  217 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  218 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  219 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  220 + obj = {
  221 + day: this.timeFormat(day), hou: this.timeFormat(hou), min: this.timeFormat(min), sec: this.timeFormat(sec)
  222 + }
  223 + }else{
  224 + //活动已结束,全部设置为'00'
  225 + obj = { day: '00', hou: '00', min: '00', sec: '00' }
  226 + }
  227 +
  228 + var txt ="order["+i+"].djs";
  229 + th.setData({ [txt]: obj});
  230 + }
  231 + },
  232 + //---小于10的格式化函数----
  233 + timeFormat(param) {
  234 + return param < 10 ? '0' + param : param;
  235 + },
  236 +
  237 + images_err:function(e){
  238 + var txt = e.currentTarget.dataset.err;
  239 + var ob={};
  240 + ob[txt] = this.data.imageurl + "/miniapp/images/default_g_img.gif";
  241 + this.setData(ob);
  242 + }
  243 +
  244 +
  245 +})
  246 +
... ...
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "幸运购列表",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "nodata": "/components/nodata/nodata"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxml 0 → 100644
  1 +<view class="tab-hd" bindtap="clickTab">
  2 + <view class="tab-hd-item {{currentTabIndex == index ? 'active':''}}" wx:for="{{tabArr}}" data-index="{{index}}">{{item}}</view>
  3 +</view>
  4 +
  5 +<view class="tab-bd">
  6 + <view class="list">
  7 + <view class="list-item">
  8 + <view class="pd20">
  9 + <view class="pdr40 arrow">参团中,还差<text class="c-red">2</text>人</view>
  10 + </view>
  11 + <view class="flex pd20">
  12 + <view class="img-container"><image src="../../../../images/bk.png" class="img-block"></image></view>
  13 + <view>
  14 + <view class="title ellipsis-2">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view>
  15 + <view class="flex ai-center">
  16 + <text class="rmb fs40 c-red">15</text>
  17 + <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">25</text></view>
  18 + </view>
  19 + <view class="c-red fs24">未团中可获得XXXX帮团奖励</view>
  20 + </view>
  21 + </view>
  22 + <view class="flex ai-center pd20 bdt fs24 jc_sb">
  23 + <view>共1件,实付金额:<text class="rmb">15.00</text></view>
  24 + <view class="flex">
  25 + <view class="btn gray">查看订单</view>
  26 + <view class="btn c-red mgl20">邀请好友</view>
  27 + </view>
  28 + </view>
  29 + </view>
  30 +
  31 + <view class="list-item">
  32 + <view class="pd20">
  33 + <view class="pdr40 arrow">已团中,待发货</view>
  34 + </view>
  35 + <view class="flex pd20">
  36 + <view class="img-container"><image src="../../../../images/bk.png" class="img-block"></image></view>
  37 + <view>
  38 + <view class="title ellipsis-2">商品名称商品名称</view>
  39 + <view class="flex ai-center">
  40 + <text class="rmb fs40 c-red">15</text>
  41 + <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">25</text></view>
  42 + </view>
  43 + <view class="c-red fs24">未团中可获得XXXX帮团奖励</view>
  44 + </view>
  45 + </view>
  46 + <view class="flex ai-center pd20 bdt fs24 jc_sb">
  47 + <view>共1件,实付金额:<text class="rmb">15.00</text></view>
  48 + <view class="flex">
  49 + <view class="btn gray">查看订单</view>
  50 + <!-- <view class="btn c-red mgl20">邀请好友</view> -->
  51 + </view>
  52 + </view>
  53 + </view>
  54 +
  55 + <view class="list-item">
  56 + <view class="pd20">
  57 + <view class="pdr40 arrow">未团中,已退款</view>
  58 + </view>
  59 + <view class="flex pd20">
  60 + <view class="img-container"><image src="../../../../images/bk.png" class="img-block"></image></view>
  61 + <view>
  62 + <view class="title ellipsis-2">商品名称商品名称</view>
  63 + <view class="flex ai-center">
  64 + <text class="rmb fs40 c-red">15</text>
  65 + <view class="fs24 del pdl10 c-c7">零售价<text class="rmb">25</text></view>
  66 + </view>
  67 + <view class="c-red fs24">未团中可获得XXXX帮团奖励</view>
  68 + </view>
  69 + </view>
  70 + <view class="flex ai-center pd20 bdt fs24 jc_sb">
  71 + <view>共1件,实付金额:<text class="rmb">15.00</text></view>
  72 + <view class="flex">
  73 + <view class="btn gray">查看订单</view>
  74 + <view class="btn c-red mgl20">查看奖励</view>
  75 + </view>
  76 + </view>
  77 + </view>
  78 +
  79 + </view>
  80 +</view>
  81 +
  82 +
  83 +<view class="popup-container">
  84 + <view class="popup">
  85 + <view class="pd20 flex jc_sb">
  86 + <text class="c-red">帮团奖励</text>
  87 + <text class="iconfont icon-close fs32 c-7b"></text>
  88 + </view>
  89 + <view class="popup-list">
  90 + <view class="popup-list-item">
  91 + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view>
  92 + <view class="f1">
  93 + <view class="ellipsis-2 popup-title">我是名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称</view>
  94 + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">100</text></view>
  95 + </view>
  96 + </view>
  97 +
  98 + <view class="popup-list-item">
  99 + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view>
  100 + <view class="f1">
  101 + <view class="ellipsis-2 popup-title">我是名称</view>
  102 + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">11</text></view>
  103 + </view>
  104 + </view>
  105 +
  106 + <view class="popup-list-item">
  107 + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view>
  108 + <view class="f1">
  109 + <view class="ellipsis-2 popup-title">我是名称</view>
  110 + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">11</text></view>
  111 + </view>
  112 + </view>
  113 +
  114 + <view class="popup-list-item">
  115 + <view class="img-container"><image class="img-block" src="../../../../images/bk.png"></image></view>
  116 + <view class="f1">
  117 + <view class="ellipsis-2 popup-title">我是名称</view>
  118 + <view class="fs24 t-r pdt16 c-7b">数量:<text class="c-red">11</text></view>
  119 + </view>
  120 + </view>
  121 +
  122 + </view>
  123 + </view>
  124 +</view>
  125 +
  126 +
  127 +
  128 +<view class="no-more">—— 已经到底啦 ——</view>
  129 +<nodata nodataContainer="t-c"></nodata>
0 130 \ No newline at end of file
... ...
packageC/pages/luckyGo/luckyGo_list/luckyGo_list.wxss 0 → 100644
  1 +.bdt {
  2 + border-top: 2rpx solid #f5f5f5;
  3 +}
  4 +
  5 +page {
  6 + background-color: #f2f2f2;
  7 +}
  8 +
  9 +.btn {
  10 + border: 2rpx solid #ff6768;
  11 + padding: 10rpx 20rpx;
  12 + border-radius: 40rpx;
  13 +}
  14 +
  15 +.btn.gray {
  16 + border-color: #ccc;
  17 +}
  18 +
  19 +.tab-hd {
  20 + display: flex;
  21 + text-align: center;
  22 + font-size: 28rpx;
  23 + background-color: white;
  24 + position: sticky;
  25 + top: 0;
  26 + z-index: 2;
  27 +}
  28 +
  29 +.tab-hd-item {
  30 + flex-grow: 1;
  31 + padding: 20rpx;
  32 + position: relative;
  33 +}
  34 +
  35 +.tab-hd-item.active {
  36 + color: #ff6768;
  37 +}
  38 +
  39 +.tab-hd-item.active::after {
  40 + content: '';
  41 + position: absolute;
  42 + width: 30%;
  43 + height: 4rpx;
  44 + left: 0;
  45 + right: 0;
  46 + bottom: 0;
  47 + margin: 0 auto;
  48 + background-color: #ff6768;
  49 +}
  50 +
  51 +.title {
  52 + height: 88rpx;
  53 +}
  54 +
  55 +.tab-bd {
  56 + padding-left: 20rpx;
  57 + padding-right: 20rpx;
  58 +}
  59 +
  60 +.list {
  61 + overflow: hidden;
  62 +}
  63 +
  64 +.list-item {
  65 + background-color: white;
  66 + margin-top: 20rpx;
  67 + border-radius: 12rpx;
  68 + font-size: 28rpx;
  69 +}
  70 +
  71 +.arrow {
  72 + position: relative;
  73 +}
  74 +
  75 +.arrow::after {
  76 + font-family: iconfont;
  77 + content: '\e61f';
  78 + position: absolute;
  79 + right: 0;
  80 + color: #ccc;
  81 +}
  82 +
  83 +.img-container {
  84 + width: 200rpx;
  85 + height: 200rpx;
  86 + flex-shrink: 0;
  87 + padding-right: 20rpx;
  88 +}
  89 +
  90 +.rmb::before {
  91 + content: '¥';
  92 + font-size: 24rpx;
  93 +}
  94 +
  95 +.del {
  96 + text-decoration: line-through;
  97 +}
  98 +
  99 +.no-more {
  100 + font-size: 24rpx;
  101 + line-height: 2;
  102 + text-align: center;
  103 + margin-top: 10rpx;
  104 + color: #ccc;
  105 +}
  106 +
  107 +
  108 +.popup-container {
  109 + position: fixed;
  110 + top: 0;
  111 + bottom: 0;
  112 + left: 0;
  113 + right: 0;
  114 + background-color: rgba(0,0,0,.8);
  115 +}
  116 +
  117 +.popup {
  118 + background-color: #FFFAE7;
  119 + position: fixed;
  120 + left: 50%;
  121 + top: 50%;
  122 + transform: translate(-50%, -50%);
  123 + border-radius: 12rpx;
  124 + min-width: 600rpx;
  125 + color: #AF481D;
  126 +}
  127 +
  128 +
  129 +
  130 +.popup-list-item {
  131 + display: flex;
  132 + padding: 20rpx;
  133 +}
  134 +
  135 +.popup-list-item .img-container {
  136 + width: 140rpx;
  137 + height: 140rpx;
  138 +}
  139 +
  140 + .popup-title {
  141 + font-size: 28rpx;
  142 + height: 88rpx;
  143 + }
0 144 \ No newline at end of file
... ...
packageC/pages/presell/cart/cart.js
... ... @@ -656,7 +656,7 @@ Page({
656 656 })
657 657 }else{
658 658 th.setData({quan_price:0});
659   - if(th.data.using_quan[bn_pick].isby==1){
  659 + if(th.data.using_quan && th.data.using_quan[bn_pick] && th.data.using_quan[bn_pick].isby==1){
660 660 var txt="using_quan["+bn_pick+"]";
661 661 th.setData({[txt]:{}});
662 662 }
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -3936,7 +3936,7 @@ Page({
3936 3936 }
3937 3937  
3938 3938 var userInfo = getApp().globalData.userInfo;
3939   - var pre_data = {store_id: os.stoid, is_end: 0, timetype: 1, isuse: 1, prom_type: 8, prom_id: presell_id};
  3939 + var pre_data = {store_id: os.stoid, is_end: 0, timetype: 1, isuse: 1, prom_type: 8, prom_id: presell_id,pageSize:1000};
3940 3940 if (userInfo) {
3941 3941 pre_data.user_id = userInfo.user_id;
3942 3942 }
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -76,7 +76,7 @@ Page({
76 76 },
77 77 onHide:function(){
78 78 //--清理定时器--
79   - clearInterval(this.timer);
  79 + clearInterval(this.data.timer);
80 80 this.setData({isshow:0});
81 81 },
82 82 //---小于10的格式化函数----
... ...
pages/cart/cart/cart.js
... ... @@ -155,6 +155,7 @@ Page({
155 155 },
156 156 //-------------获取购物车列表,要安装门店进行分类订单-----------
157 157 getCardList: function() {
  158 +
158 159 var th = this;
159 160  
160 161 //要获取会员是不是等级会员
... ... @@ -190,6 +191,7 @@ Page({
190 191 th.get_cart();
191 192 th.get_ser_cart();
192 193 }
  194 +
193 195  
194 196 }
195 197 })
... ... @@ -219,6 +221,7 @@ Page({
219 221 state:0
220 222 },
221 223 success:async function(su) {
  224 + console.log(su,10000);
222 225 //按门店分类的数组
223 226 var arr = new Array(),
224 227 carr = su.data.data.pageData;
... ... @@ -385,9 +388,11 @@ Page({
385 388 if(!th.data.zuhe_map[item.prom_id]){
386 389 //如果有组合购
387 390 var isok = 1;
  391 + var is_flag=1;
388 392 var act=null;
389 393 var url="/api/weshop/prom/zhbuy/get/"+os.stoid+"/"+item.prom_id+"/"+getApp().globalData.userInfo.user_id;
390 394 await getApp().request.promiseGet(url, {}).then(res => {
  395 + console.log(res,1000);
391 396 if(res.data.code==0 && res.data.data){
392 397 if(res.data.data.is_show!=1){
393 398 isok=0;
... ... @@ -405,12 +410,11 @@ Page({
405 410 isok=0;
406 411 }
407 412 act=res.data.data;
408   -
  413 +
409 414 }else{
410   - //未找到商品的活动
411   - isok = 0;
412   - }
413   -
  415 + //未找到商品的活动
  416 + is_flag = 0;
  417 + }
414 418 })
415 419 if (!isok){
416 420 var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
... ... @@ -419,7 +423,6 @@ Page({
419 423 continue;
420 424 }
421 425 th.data.zuhe_map[item.prom_id]=act;
422   -
423 426 var url1 = "/api/weshop/prom/zhbuyGoods/page";
424 427 var req_data = {
425 428 page: 1,
... ... @@ -430,8 +433,17 @@ Page({
430 433 await getApp().request.promiseGet(url1, {
431 434 data: req_data
432 435 }).then(res => {
  436 + console.log(res,2000);
433 437 if (ut.ajax_ok(res)) {
434 438 var gdlist = res.data.data.pageData;
  439 + gdlist.forEach(i=>{
  440 + if(item.goods_id==i.goods_id&&!is_flag){
  441 + item.prom_type=0;
  442 + item.prom_type1=0;
  443 + item.prom_id=0;
  444 + item.prom_id1=0
  445 + }
  446 + })
435 447 th.data.zuhe_map_good[item.prom_id]=gdlist;
436 448 }
437 449 })
... ... @@ -451,12 +463,12 @@ Page({
451 463 item.buyqty=t_item.buyqty;
452 464 item.zh_b_num=promgoodsbuynum;
453 465 item.act=th.data.zuhe_map[item.prom_id];
454   - }else{
455   - var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
456   - getApp().request.delete(url, {});
457   - th.data.zuhe_map[item.prom_id]=-1;
458   - continue;
459   - }
  466 + }//else{
  467 + // var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
  468 + // getApp().request.delete(url, {});
  469 + // th.data.zuhe_map[item.prom_id]=-1;
  470 + // continue;
  471 + // }
460 472 }
461 473 else if(item.prom_type == 0) {
462 474 //如果有优惠活动,要更新活动
... ... @@ -563,7 +575,9 @@ Page({
563 575 }
564 576 }
565 577  
566   -
  578 + // console.log('AAAAAAAAAAAA', all_num);
  579 + // getApp().globalData.cartGoodsNum = all_num;
  580 +
567 581 th.setData({
568 582 requestData: arr,
569 583 all_num: all_num,
... ... @@ -662,7 +676,7 @@ Page({
662 676 }
663 677 }
664 678  
665   -
  679 + // console.log('BBBBBB', all_num);
666 680 th.setData({
667 681 service_data: arr,
668 682 all_num2: all_num,
... ... @@ -773,7 +787,8 @@ Page({
773 787 var a = t.currentTarget.dataset.item;
774 788 var b = t.currentTarget.dataset.pitems;
775 789 a = this.data.requestData[b].goods[a];
776   -
  790 +
  791 + console.log('add+');
777 792 if (a.goods_num<a.store_count) {
778 793 var e = {
779 794 goods_num: a.goods_num + 1,
... ... @@ -781,6 +796,7 @@ Page({
781 796 goods_id: a.goods_id,
782 797 store_id: oo.stoid
783 798 };
  799 + // console.log('goods_num', e.goods_num);
784 800 this.postCardList(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
785 801 } else {
786 802 wx.showModal({
... ... @@ -859,7 +875,7 @@ Page({
859 875 goods_id: a.goods_id,
860 876 store_id: oo.stoid
861 877 };
862   - this.postCardList_ser(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
  878 + // this.postCardList_ser(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems);
863 879  
864 880 },
865 881 //-------------减数量---------------------
... ... @@ -1393,6 +1409,9 @@ Page({
1393 1409 });
1394 1410 }
1395 1411 }
  1412 +
  1413 + // getApp().globalData.cartGoodsNum = all_num;
  1414 + // console.log('CCCCCCC', all_num, getApp().globalData.cartGoodsNum);
1396 1415  
1397 1416 this.setData({
1398 1417 checkAllToggle: ischeck,
... ... @@ -1407,14 +1426,14 @@ Page({
1407 1426  
1408 1427 var e = this,th=e;
1409 1428 var user_id = getApp().globalData.user_id;
1410   - console.log('update');
1411   - console.log(t);
  1429 + // console.log('update');
  1430 + // console.log('9995959595959',t);
1412 1431 rq.get("/api/weshop/goods/get/" + oo.stoid + "/" + t.goods_id, {
1413 1432 isShowLoading: 0,
1414 1433 async success(d) {
1415 1434 var limit = d.data.data.viplimited;
1416 1435 var store_count = d.data.data.store_count;
1417   - var wareIds=d.data.data.erpwareid;
  1436 + var wareIds = d.data.data.erpwareid;
1418 1437  
1419 1438 var goodsinfo = e.data.requestData[pitem].goods[item];
1420 1439 var promgoodsbuynum = 0;
... ... @@ -1437,8 +1456,12 @@ Page({
1437 1456 th.setData({[txt]:promgoodsbuynum});
1438 1457 }
1439 1458 goodsbuynum = buy_num_data.goodsbuynum;
  1459 +
  1460 +
  1461 + // console.log('goodsbuynum===========', goodsbuynum);
1440 1462 })
1441 1463  
  1464 +
1442 1465  
1443 1466 var buyed_mum2 = t.goods_num + goodsbuynum;
1444 1467 if (buyed_mum2 > limit && limit > 0) {
... ... @@ -2094,7 +2117,11 @@ Page({
2094 2117 var url = '/api/weshop/cart/delIds/' + oo.stoid + '/' + user_id + "/" + glist;
2095 2118 getApp().request.delete(url, {
2096 2119 success: function(t) {
  2120 + // console.log('del done1111111111');
2097 2121 th.getCardList();
  2122 + getApp().requestCardNum(th);
  2123 + // console.log('all================', th.data.all_num);
  2124 + // getApp().globalData.cartGoodsNum =
2098 2125 }
2099 2126 });
2100 2127 }
... ... @@ -2105,10 +2132,12 @@ Page({
2105 2132 getApp().request.delete(url, {
2106 2133 success: function(t) {
2107 2134 th.getCardList();
  2135 + getApp().requestCardNum(th);
  2136 + console.log('all2================', th.data.all_num);
2108 2137 }
2109 2138 });
2110 2139 }
2111   -
  2140 +
2112 2141 },
2113 2142 //跳到首页
2114 2143 goto: function(e) {
... ... @@ -2376,6 +2405,28 @@ Page({
2376 2405 go_url(e){
2377 2406 var url=e.currentTarget.dataset.url;
2378 2407 getApp().goto(url);
  2408 + },
  2409 +
  2410 + //跳转到商品
  2411 + go_gd:function (e) {
  2412 + var gd= e.currentTarget.dataset.gd;
  2413 + var good_url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gd;
  2414 + var url="/api/weshop/activitylist/getGoodActInfo";
  2415 + var req_data={
  2416 + store_id:os.stoid,goodsidlist:gd,is_detail:1
  2417 + };
  2418 + //获取秒杀的多规格
  2419 + getApp().request.promiseGet(url, {data:req_data}).then(res=>{
  2420 + if(res.data.code==0 && res.data.data){
  2421 + if(res.data.data.length==1){
  2422 + good_url+="&prom_type="+res.data.data[0].prom_type+"&prom_id="+res.data.data[0].act_id;
  2423 + }
  2424 + getApp().goto(good_url);
  2425 +
  2426 + }else{
  2427 + getApp().goto(good_url);
  2428 + }
  2429 + })
2379 2430 }
2380 2431  
2381 2432 });
2382 2433 \ No newline at end of file
... ...
pages/cart/cart/cart.wxml
... ... @@ -56,7 +56,6 @@
56 56 <view class="shmd_m">
57 57 <!-- 门店 -->
58 58 <!--<radio color="red" bindtap="check_th_all_item" class="order-raido flex-center" checked="{{checkAllToggle||item.selected}}" data-pitems="{{pidx}}"></radio>-->
59   -
60 59 <icon wx:if="{{checkAllToggle||item.selected}}" class="order-raido flex-center" bindtap="check_th_all_item" data-pitems="{{pidx}}"
61 60 color="red" size="20" type="success"></icon>
62 61 <view wx:else class="icon_no_sele2" bindtap="check_th_all_item" data-pitems="{{pidx}}"></view>
... ... @@ -77,7 +76,7 @@
77 76 </block>
78 77 <block wx:else><view class="order-raido flex-vertical " style="width: 45rpx"></view></block>
79 78  
80   - <navigator class="goods-img rel" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">
  79 + <navigator class="goods-img rel" bindtap="go_gd" data-gd="{{items.goods_id}}">
81 80 <image class="wh100" src="{{items.original_img}}" binderror="bind_bnerr2" data-errorimg="requestData[{{pidx}}].goods[{{idx}}].original_img" data-url="{{items.original_img}}"></image>
82 81 <block wx:if="{{items.is_gift}}">
83 82 <view style="background-color:red" class="abs flex-center fs26" wx:if="{{items.is_gift==1}}">赠品</view>
... ... @@ -102,7 +101,7 @@
102 101 </navigator>
103 102 <view class="goods-cont">
104 103 <view class="goods-name">
105   - <navigator class="ellipsis-2 fs30" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">{{items.goods_name}}</navigator>
  104 + <navigator bindtap="go_gd" class="ellipsis-2 fs30" data-gd="{{items.goods_id}}">{{items.goods_name}}</navigator>
106 105  
107 106 <view class="specifications ellipsis-1">
108 107 <view wx:if="{{items.goods_color || items.goods_spec}}">
... ...
pages/cart/cart2/cart2.js
... ... @@ -124,6 +124,7 @@ Page({
124 124 in_zhact_gdmap:{}, //不同门店参与同一活动的限购
125 125 hid_inp:1,
126 126 user_note:{},
  127 + zuhe_map_good:{},
127 128 },
128 129 onLoad: function (t) {
129 130 wx.setNavigationBarTitle({title: "填写订单",})
... ... @@ -289,7 +290,6 @@ Page({
289 290 }
290 291  
291 292 }, 1);
292   -
293 293 //值在这里换
294 294 getApp().globalData.plus_buy_back = 0;
295 295 },
... ... @@ -454,6 +454,7 @@ Page({
454 454 //要把组合购的东西拿出来算一下
455 455 if (item1.prom_type == 7) {
456 456 var isok = 1;
  457 + var is_flag=1;
457 458 //如果有组合购
458 459 var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + item1.prom_id+'/'+getApp().globalData.userInfo.user_id;
459 460 await getApp().request.promiseGet(url, {}).then(res => {
... ... @@ -465,25 +466,45 @@ Page({
465 466 if (ut.gettimestamp() > res.data.data.end_time) {
466 467 isok = 0;
467 468 }
  469 + item1.act = res.data.data;
468 470 } else {
469 471 //未找到商品的活动
470   - isok = 0;
  472 + is_flag = 0;
471 473 }
472   - item1.act = res.data.data;
473 474 })
474   -
475 475 if (!isok) {
476 476 getApp().my_warnning("组合购的活动已经过期", 0, th);
477 477 return false;
478 478 }
479   -
  479 + var url1 = "/api/weshop/prom/zhbuyGoods/page";
  480 + var req_data = {
  481 + page: 1,
  482 + pageSize: 2000,
  483 + store_id: os.stoid,
  484 + zh_id: item1.prom_id,
  485 + }
  486 + await getApp().request.promiseGet(url1, {
  487 + data: req_data
  488 + }).then(res => {
  489 + if (ut.ajax_ok(res)) {
  490 + var gdlist = res.data.data.pageData;
  491 + gdlist.forEach(i=>{
  492 + if(item1.goods_id==i.goods_id&&!is_flag){
  493 + item1.prom_type=0;
  494 + item1.prom_type1=0;
  495 + item1.prom_id=0;
  496 + item1.prom_id1=0
  497 + }
  498 + })
  499 + th.data.zuhe_map_good[item1.prom_id]=gdlist;
  500 + }
  501 + })
480 502 }
481 503 }
482 504  
483 505 //在分组的时候,就不要再调用接口,await
484 506 for (var i = 0; i < carr.length; i++) {
485 507 var item = carr[i];
486   -
487 508 //-- 如果是等级会员注册返回 --
488 509 if (is_card_back) {
489 510 th.data.card_name = th.data.userinfo.card_field;
... ... @@ -667,22 +688,26 @@ Page({
667 688 //存储不同活动的商品列表
668 689 u_item.zh_prom_goods = {};
669 690 for (let var1 in obj) {
670   - var h_item = obj[var1];
671   - var gdlist = null;
672   - var url1 = "/api/weshop/prom/zhbuyGoods/page";
673   - var req_data = {
674   - page: 1,
675   - pageSize: 2000,
676   - store_id: os.stoid,
677   - zh_id: h_item.prom_id,
678   - }
679   - await getApp().request.promiseGet(url1, {
680   - data: req_data
681   - }).then(res => {
682   - if (ut.ajax_ok(res)) {
683   - gdlist = res.data.data.pageData;
684   - }
685   - })
  691 + var h_item=obj[var1];
  692 + var gdlist= th.data.zuhe_map_good[h_item.prom_id];
  693 + //获取活动需要的商品列表
  694 + // u_item.zh_prom_goods[h_item.prom_id]=gdlist;
  695 + // var h_item = obj[var1];
  696 + // var gdlist = null;
  697 + // var url1 = "/api/weshop/prom/zhbuyGoods/page";
  698 + // var req_data = {
  699 + // page: 1,
  700 + // pageSize: 2000,
  701 + // store_id: os.stoid,
  702 + // zh_id: h_item.prom_id,
  703 + // }
  704 + // await getApp().request.promiseGet(url1, {
  705 + // data: req_data
  706 + // }).then(res => {
  707 + // if (ut.ajax_ok(res)) {
  708 + // gdlist = res.data.data.pageData;
  709 + // }
  710 + // })
686 711 //获取活动需要的商品列表
687 712 u_item.zh_prom_goods[h_item.prom_id] = {gdlist: gdlist, act: h_item.act};
688 713 }
... ... @@ -780,10 +805,10 @@ Page({
780 805 }
781 806 }
782 807  
783   - if(gg.prom_type){
  808 +
784 809 gd.prom_type=gg.prom_type;
785 810 gd.prom_id=gg.prom_id;
786   - }
  811 +
787 812 switch (gd.prom_type) {
788 813 case 0:
789 814 case 2:
... ... @@ -3815,6 +3840,11 @@ Page({
3815 3840 var index = e.currentTarget.dataset.index;
3816 3841 var txt = "cartlist[" + index + "].focus";
3817 3842 this.setData({[txt]:0})
  3843 + },
  3844 +
  3845 + go_url:function (e) {
  3846 + var url = e.currentTarget.dataset.url;
  3847 + getApp().goto(url);
3818 3848 }
3819 3849  
3820 3850  
... ...
pages/cart/cart2/cart2.wxml
... ... @@ -78,26 +78,21 @@
78 78 </view>
79 79 <view class="order-detail" wx:for="{{item.goods}}" wx:for-index="idx" wx:for-item="items">
80 80 <!----商品图片----->
81   - <view class="goods-img" style="position: relative">
  81 + <view class="goods-img" style="position: relative; overflow: hidden" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}&prom_type={{items.prom_type}}&prom_id={{items.prom_id}}">
82 82 <image wx:if="{{items.is_gift}}" src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>
  83 + <text class="zuhe" wx:if="{{items.prom_type==7}}">组合购</text>
83 84 <image class="wh100 bdr14" src="{{items.original_img}}" binderror='cart_set_err' data-err='cartlist[{{pidx}}].goods[{{idx}}].original_img'></image>
84 85 </view>
85 86 <!----商品名称规格---->
86   - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}">
  87 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{items.goods_id}}&prom_type={{items.prom_type}}&prom_id={{items.prom_id}}" >
87 88 <view class="goods-name ellipsis-2">{{items.goods_name}}</view>
88 89 <!-- 商品属性 -->
89 90 <view class="flex-vertical fs28 color-gray n_guige">
90 91 <view class="goods-color">
91 92 <block><text>{{filters.show_gui_ge(items.goods_spec,items.goods_color)}}</text></block>
92   - <!--<block wx:if="{{!items.goods_spec && !items.goods_color}}"><text>规格1</text></block>-->
93   - <!--<block wx:else>-->
94   - <!--<text wx:if="{{items.goods_spec!=''}}">{{items.goods_spec}}<text wx:if="{{items.goods_color}}">/</text></text>-->
95   - <!--<text wx:if="{{items.goods_color}}">{{items.goods_color}}</text>-->
96   - <!--</block>-->
97 93 </view>
98 94 </view>
99 95  
100   -
101 96 <!-----商品名称规格------>
102 97 <view class="order-num flex-space-between">
103 98 <view class="co-red">¥<text class="fs36">{{filters.toFix(items.goods_price,2)}}</text></view>
... ... @@ -255,10 +250,10 @@
255 250 <!-- <view>门店:{{bn_pickname}}</view> -->
256 251 </view>
257 252 <view class="order-detail">
258   - <view class="goods-img">
  253 + <view class="goods-img" bindtap="go_url" data-url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}&prom_type={{bn_goods.prom_type}}&prom_id={{bn_goods.prom_id}}">
259 254 <image class="wh100 bdr14" src="{{bn_goods.original_img}}" binderror='cart_set_err' data-err="bn_goods.original_img"></image>
260 255 </view>
261   - <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}">
  256 + <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{bn_goods.goods_id}}&prom_type={{items.prom_type}}&prom_id={{items.prom_id}}">
262 257 <view class="goods-name ellipsis-2">{{bn_goods.goods_name}}</view>
263 258 <!-- 商品属性 -->
264 259 <view class="flex-vertical fs28 xc-ash color-gray n_guige">
... ...
pages/cart/cart2/cart2.wxss
... ... @@ -19,9 +19,6 @@
19 19 box-shadow: 16rpx 0px 12px #e7e9eb;
20 20 }
21 21  
22   -
23   -
24   -
25 22 page {
26 23 /* background-color: #FAFAFA; */
27 24 background-color: #F0F0F0;
... ... @@ -995,3 +992,16 @@ margin-left: 20rpx;
995 992 top:36rpx
996 993 }
997 994  
  995 +.zuhe {
  996 + width: 140rpx;
  997 + text-align: center;
  998 + height:40rpx;
  999 + position: absolute;
  1000 + top: 15rpx;
  1001 + left: -37rpx;
  1002 + transform: rotate(-45deg);
  1003 + background-color: rgb(255,0,0);
  1004 + font-size:22rpx;
  1005 + color: #fff;
  1006 + line-height: 37rpx;
  1007 +}
... ...
pages/cart/cart2/zh_calculate.js
... ... @@ -193,6 +193,11 @@ module.exports = {
193 193 new_g.prom_type = 0;
194 194 new_g.prom_id = 0;
195 195 goods.push(new_g);
  196 +
  197 + //如果商品的数量已经为空了
  198 + if(goods[idx].goods_num<=0){
  199 + goods.splice(idx,1);
  200 + }
196 201 }
197 202 }
198 203  
... ...
pages/goods/categoryList/categoryList.js
... ... @@ -52,7 +52,7 @@ Page({
52 52 currentPage: 1,
53 53 allData: null,
54 54 openFilterModal: !1,
55   - baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=goods_id&orderType=desc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1",
  55 + baseUrl: "api/weshop/goods/page?1=1&cat_id=1&parent_id=0&orderField=sort&orderType=asc&page=1&is_mainshow=1&isonsale=1&store_id="+oo.stoid+"&is_recommend=1",
56 56 requestUrl: "",
57 57 tabname: "goods_id", //排序的字段
58 58 adname: "desc", //升降的字段
... ... @@ -791,7 +791,7 @@ Page({
791 791 var that = this;
792 792 that.data.requestUrl = t;
793 793 e.get("/api/weshop/goods/page?1=1", {
794   - data: { page: that.data.stylePage, cat_id: that.data.cat_id, parent_id: 0, orderField: 'goods_id', orderType: 'desc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 },
  794 + data: { page: that.data.stylePage, cat_id: that.data.cat_id, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 },
795 795 success: function (data) {
796 796 console.log(data.data.data.pageData)
797 797 that.setData({
... ... @@ -853,7 +853,7 @@ Page({
853 853 console.log("page:=" + page)
854 854 var s = this
855 855 e.get("/api/weshop/goods/page?1=1", {
856   - data: { page: page, cat_id: cid, parent_id: 0, orderField: 'goods_id', orderType: 'desc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 },
  856 + data: { page: page, cat_id: cid, parent_id: 0, orderField: 'sort', orderType: 'asc', is_mainshow: 1, isonsale: 1, store_id: oo.stoid, is_recommend: 1 },
857 857 success: function (e) {
858 858 console.log(e.data.data.pageData)
859 859 s.setData({
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -605,7 +605,7 @@ Page({
605 605 }).then(res => {
606 606 var t = res;
607 607 var data = t.data.data.pageData;
608   - if (data.length > 0) {
  608 + if (data && data.length > 0) {
609 609 //ee.setData({ is_collect: 1, collect_id: data[0].collect_id, });
610 610 is_collect = 1;
611 611 collect_id = data[0].collect_id;
... ... @@ -1399,7 +1399,7 @@ Page({
1399 1399 add_cart_next(e, t, a, o, newd, CanOutQty) {
1400 1400 var th = this, i = getApp().request;
1401 1401 //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------
1402   - if (o.prom_type != 1 && ((o.prom_type != 6 && o.prom_type != 4) || th.data.is_normal)) {
  1402 + if ((o.prom_type != 1 || o.prom_id<=0) && ((o.prom_type != 6 && o.prom_type != 4) || th.data.is_normal)) {
1403 1403 var conf = th.data.bconfig;
1404 1404 if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) {
1405 1405 var s_list = JSON.parse(conf.switch_list);
... ... @@ -2135,7 +2135,7 @@ Page({
2135 2135  
2136 2136  
2137 2137 var url = "/pages/goods/goodsInfo/goodsInfo?goods_id="
2138   - + th.data.sele_g.gid+"&prom_type="+th.data.sele_g.prom_type+"&prom_id="+th.data.sele_g.prom_id;
  2138 + + th.data.sele_g.goods_id+"&prom_type="+th.data.sele_g.prom_type+"&prom_id="+th.data.sele_g.prom_id;
2139 2139 if (getApp().globalData.user_id) {
2140 2140 url += "&first_leader=" + getApp().globalData.user_id;
2141 2141 }
... ... @@ -3529,6 +3529,12 @@ Page({
3529 3529 success: function (t) {
3530 3530 if (t.data.code == 0) {
3531 3531 var g_buy_num = t.data.data.goodsbuynum;
  3532 +
  3533 + //如果是秒杀的时候
  3534 + if(th.data.prom_type==0 && gd.prom_type == 1 ){
  3535 + gd.prom_type= 0;
  3536 + }
  3537 +
3532 3538 if (gd.prom_type == 1 || gd.prom_type == 2 || gd.prom_type == 4 || gd.prom_type == 6) {
3533 3539 //----获取活动购买数----
3534 3540 getApp().request.get("/api/weshop/ordergoods/getUserBuyGoodsNum", {
... ... @@ -4191,6 +4197,95 @@ Page({
4191 4197 }
4192 4198 })
4193 4199 },
  4200 +
  4201 +
  4202 + drawPoster(context, unit, img, vpath) {
  4203 + // 1.灰色背景
  4204 + context.setFillStyle('#f2f1f6');
  4205 + context.rect(0,0,554*unit,899*unit);
  4206 + context.fill();
  4207 + // 2.商城名称
  4208 + let shopName = this.data.sto_sele_name_1;
  4209 + // let shopNameLen = context.measureText(shopName);
  4210 + // let x_shopNameLen = (554 - shopNameLen.width)/2*unit;
  4211 + // console.log('11111111111111',shopNameLen,x_shopNameLen);
  4212 + context.setTextAlign('center');
  4213 + context.setFontSize(26*unit);
  4214 + context.setFillStyle('black');
  4215 + context.fillText(shopName, 277*unit, 60*unit);
  4216 + // // 3.推荐来源
  4217 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  4218 + // let fromTextLen = context.measureText(fromText);
  4219 + // let x_fromText = (375 - fromTextLen.width)/2;
  4220 + // console.log('222222',fromTextLen,x_fromText);
  4221 + context.setTextAlign('center');
  4222 + context.setFontSize(22*unit);
  4223 + context.setFillStyle('#96959a');
  4224 + context.fillText(fromText, 277*unit, 105*unit);
  4225 + // 4.海报背景
  4226 + // context.beginPath();
  4227 + // context.setStrokeStyle('#f2f1f6');
  4228 + context.setFillStyle('white');
  4229 + context.fillRect(37*unit, 157*unit, 480*unit, 673*unit);
  4230 + // context.stroke();
  4231 + // context.fill();
  4232 + // 5.商品图片
  4233 + // 图片的x坐标
  4234 + let bg_x = 37*unit
  4235 + // 图片的y坐标
  4236 + let bg_y = 157*unit
  4237 + // 图片宽度
  4238 + let bg_w = 480*unit
  4239 + // 图片高度
  4240 + let bg_h = 474*unit
  4241 + // 图片圆角
  4242 + let bg_r = 4
  4243 + // 绘制海报背景图片圆角
  4244 + context.save()
  4245 + context.beginPath()
  4246 + context.arc(bg_x + bg_r, bg_y + bg_r, bg_r, Math.PI, Math.PI*1.5)
  4247 + context.arc(bg_x + bg_w - bg_r, bg_y + bg_r, bg_r, Math.PI * 1.5, Math.PI * 2)
  4248 + context.arc(bg_x + bg_w, bg_y + bg_h, bg_r, 0, Math.PI * 0.5)
  4249 + context.arc(bg_x, bg_y + bg_h, 0, Math.PI * 0.5, Math.PI)
  4250 + context.clip()
  4251 + context.drawImage(img, bg_x, bg_y, bg_w, bg_h);
  4252 + context.restore()
  4253 + // 6.强烈推荐
  4254 + // context.beginPath();
  4255 + let tj_path = "../../../images/share/q_tj.png";
  4256 + context.beginPath()
  4257 + context.drawImage(tj_path, 54*unit, 648*unit, 85*unit, 30*unit);
  4258 + context.setFontSize(16*unit)
  4259 + context.setLineJoin('round'); //交点设置成圆角
  4260 + context.setFillStyle("white")
  4261 + context.setTextAlign('left');
  4262 + context.fillText('强烈推荐', 64*unit, 672*unit);
  4263 + // 7.商品价格
  4264 + let price = '¥' + this.data.data.shop_price;
  4265 + // if (th.data.prom_act)
  4266 + // pri0 = th.data.prom_act.price;
  4267 + context.setFontSize(32*unit);
  4268 + context.setFillStyle('#DE1117');
  4269 + context.fillText(price, 54*unit, 730*unit);
  4270 + // 8.商品标题
  4271 + context.setFontSize(20*unit);
  4272 + context.setFillStyle('#898989');
  4273 + this.draw_Text(context, this.data.data.goods_name,
  4274 + 54*unit, 770*unit, 240*unit, 240*unit, unit);
  4275 + // 9.小程序码
  4276 + context.drawImage(vpath, 375*unit, 660*unit, 120*unit, 120*unit);
  4277 + context.setFontSize(16*unit);
  4278 + context.setFillStyle('#777');
  4279 + context.fillText('长按识别二维码', 378*unit, 810*unit);
  4280 + // 10.竖线
  4281 + context.beginPath();
  4282 + context.setFillStyle('#eee');
  4283 + context.rect(354*unit, 670*unit, 1*unit, 130*unit);
  4284 + context.fill();
  4285 +
  4286 + },
  4287 +
  4288 +
4194 4289  
4195 4290 //--定义的保存图片方法,分享团---
4196 4291 saveImageToPhotosAlbum: function () {
... ... @@ -4222,10 +4317,8 @@ Page({
4222 4317 var unit = that.data.screenWidth / 750 * 1.35; //基础单位,
4223 4318 var path2 = that.data.data.original_img;
4224 4319 var scene = th.data.gid + "";
  4320 + scene+="."+th.data.sele_g.prom_type+"."+th.data.sele_g.prom_id;
4225 4321  
4226   - if(th.data.sele_g.prom_type==1){
4227   - scene+="."+th.data.sele_g.prom_type+"."+th.data.sele_g.prom_id;
4228   - }
4229 4322 var user_id = getApp().globalData.user_id ? getApp().globalData.user_id : 0;
4230 4323 if (user_id > 0) {
4231 4324 scene += "_" + user_id;
... ... @@ -4241,67 +4334,90 @@ Page({
4241 4334 os.stoid + "?sceneValue=" + scene + "&pageValue=pages/goods/goodsInfo/goodsInfo";
4242 4335  
4243 4336 console.log(path3);
  4337 +
4244 4338  
4245   - //读取文件成功则OK--
  4339 + // 读取文件成功则OK--
4246 4340 wx.getImageInfo({
4247 4341 src: path3,
4248 4342 success: function (res) {
4249   - //回调写法
  4343 + // 回调写法
4250 4344 th.get_head_temp(th.get_goods_temp, function () {
4251 4345 var vpath = res.path;
4252 4346 var context = wx.createCanvasContext('share');
4253   - //先画背景
  4347 + // 先画背景
4254 4348 var pg_path = "../../../images/share/share_bg.png";
4255 4349  
4256 4350 // context.fillStyle="#FFFFFF";
4257 4351 // context.fillRect(0,0,554 * unit, 899 * unit);
  4352 +
  4353 + // if(type == 0) {
  4354 + // this.drawPoster(context);
  4355 + // return false;
  4356 + // };
  4357 +
4258 4358  
4259 4359 //-- 如果有自定义海报的时候,判断背景的图片 --
4260 4360 if (th.data.share_b_img) {
4261 4361 pg_path = th.data.share_b_img;
4262 4362 }
4263   - context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  4363 + // context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  4364 +
  4365 +
  4366 + if(type == 0) { // 如果是普通商品,绘制新海报
  4367 + th.drawPoster(context, unit, th.data.share_goods_img, vpath);
  4368 + } else {
  4369 + context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  4370 + };
  4371 +
  4372 + // th.drawPoster(context, unit, th.data.share_goods_img, vpath);
  4373 +
4264 4374  
4265 4375 //-- 是自定义海报的情况下 --
4266   - if (th.data.poster && parseInt(th.data.poster.style) == 2) {
4267   - //在线上分享人的情况下
4268   - if (parseInt(th.data.poster.show_headpic)) {
4269   - //获取坐标
4270   - var x = parseFloat(th.data.poster.head_x) * 2;
4271   - var y = parseFloat(th.data.poster.head_y) * 2;
4272   - var x1 = (x + 90) * unit;
4273   - var y1 = (y + 50) * unit;
4274   - //--昵称---
4275   - context.setFontSize(24 * unit)
4276   - context.setFillStyle("black")
4277   - context.fillText(app.globalData.userInfo.nickname, x1, y1);
4278   - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
4279   - //强烈推荐 改许程
4280   - var tj_path = "../../../images/share/q_tj.png";
4281   - context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
4282   - context.setFontSize(16 * unit)
4283   - context.setLineJoin('round'); //交点设置成圆角
4284   - context.setFillStyle("white")
4285   - context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit);
4286   -
4287   - //context.setFillStyle("black")
4288   - //context.setFontSize(24 * unit)
4289   - //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit);
4290   - }
4291   - } else {
4292   - //--昵称---
4293   - context.setFontSize(24 * unit)
4294   - context.setFillStyle("black")
4295   - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
4296   - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
4297   - //强烈推荐 改许程
4298   - var tj_path = "../../../images/share/q_tj.png";
4299   - context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
4300   - context.setFontSize(16 * unit);
4301   - context.setLineJoin('round'); //交点设置成圆角
4302   - context.setFillStyle("white");
4303   - context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
4304   - }
  4376 + if(type != 0) {
  4377 +
  4378 + if (th.data.poster && parseInt(th.data.poster.style) == 2) {
  4379 + //在线上分享人的情况下
  4380 + if (parseInt(th.data.poster.show_headpic)) {
  4381 + //获取坐标
  4382 + var x = parseFloat(th.data.poster.head_x) * 2;
  4383 + var y = parseFloat(th.data.poster.head_y) * 2;
  4384 + var x1 = (x + 90) * unit;
  4385 + var y1 = (y + 50) * unit;
  4386 + //--昵称---
  4387 + context.setFontSize(24 * unit)
  4388 + context.setFillStyle("black")
  4389 + context.fillText(app.globalData.userInfo.nickname, x1, y1);
  4390 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
  4391 + //强烈推荐 改许程
  4392 + var tj_path = "../../../images/share/q_tj.png";
  4393 + context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
  4394 + context.setFontSize(16 * unit);
  4395 + context.setLineJoin('round'); //交点设置成圆角
  4396 + context.setFillStyle("white");
  4397 + context.fillText('强烈推荐', x1 + width + 8 * unit, y1 - 1 * unit);
  4398 +
  4399 + //context.setFillStyle("black")
  4400 + //context.setFontSize(24 * unit)
  4401 + //context.fillText(getApp().globalData.config.store_name, 40 * unit, 130 * unit);
  4402 + }
  4403 + } else {
  4404 + //--昵称---
  4405 + context.setFontSize(24 * unit);
  4406 + context.setFillStyle("black");
  4407 + context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
  4408 + var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
  4409 + //强烈推荐 改许程
  4410 + var tj_path = "../../../images/share/q_tj.png";
  4411 + context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
  4412 + context.setFontSize(16 * unit);
  4413 + context.setLineJoin('round'); //交点设置成圆角
  4414 + context.setFillStyle("white");
  4415 + context.fillText('强烈推荐', 149 * unit + width + 15 * unit, 75 * unit);
  4416 + }
  4417 +
  4418 + };
  4419 +
  4420 +
4305 4421  
4306 4422 var share_title = th.data.data.goods_name;
4307 4423 if (th.data.prom_type == 1 || th.data.prom_type == 6 || th.data.prom_type == 4) {
... ... @@ -4312,7 +4428,7 @@ Page({
4312 4428  
4313 4429 //---产品名称---
4314 4430 //文本换行 参数:1、canvas对象,2、文本 3、距离左侧的距离 4、距离顶部的距离 5、6、文本的宽度
4315   - if (type != 4) {
  4431 + if (type != 4 && type != 0) {
4316 4432 context.setFillStyle("black");
4317 4433 context.setFontSize(21.3 * unit)
4318 4434 th.draw_Text(context, share_title,
... ... @@ -4345,7 +4461,7 @@ Page({
4345 4461 context.lineTo(wd2 + ut.measureText(pri0, 22 * unit) + 5, 206 * unit);
4346 4462 context.stroke();
4347 4463  
4348   - } else {
  4464 + } else if(type == 4 && type != 0) {
4349 4465 context.setFillStyle("black");
4350 4466 context.setFontSize(21.3 * unit)
4351 4467 th.draw_Text(context, share_title,
... ... @@ -4365,10 +4481,15 @@ Page({
4365 4481 }
4366 4482  
4367 4483 //---中间大图---
4368   - context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
  4484 + if(type != 0) {
  4485 + context.drawImage(th.data.share_goods_img, 70 * unit, 250 * unit, 408 * unit, 408 * unit);
  4486 + };
  4487 +
  4488 +
  4489 +
4369 4490 //-------大图后面就不一样了-----------
4370 4491 switch (type) {
4371   - case 0: //普通商品的展示
  4492 + case 0: break;//普通商品的展示
4372 4493 case 4:
4373 4494 //中间的几个字
4374 4495 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
... ... @@ -4435,7 +4556,6 @@ Page({
4435 4556 context.fillText("长按识别二维码", 40 * unit, 806 * unit);
4436 4557 context.fillText("立即开始兑换", 40 * unit, 846 * unit);
4437 4558  
4438   -
4439 4559 }
4440 4560  
4441 4561 //---二维吗图---
... ... @@ -4447,7 +4567,7 @@ Page({
4447 4567 } else {
4448 4568 //---二维吗图---
4449 4569 context.drawImage(vpath, 390 * unit, 726 * unit, 136 * unit, 136 * unit);
4450   - }
  4570 + };
4451 4571  
4452 4572 break;
4453 4573 case 1: //秒杀商品的展示
... ... @@ -4490,7 +4610,6 @@ Page({
4490 4610 context.lineTo(520 * unit, 670 * unit)
4491 4611 context.stroke();
4492 4612 //---文字---
4493   -
4494 4613 context.setFillStyle("black")
4495 4614 context.setFontSize(24 * unit)
4496 4615 context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit);
... ... @@ -4536,7 +4655,6 @@ Page({
4536 4655 context.lineTo(520 * unit, 670 * unit)
4537 4656 context.stroke();
4538 4657 //---文字---
4539   -
4540 4658 context.setFillStyle("black")
4541 4659 context.setFontSize(24 * unit)
4542 4660 context.fillText(th.data.sto_sele_name_1, 40 * unit, 720 * unit);
... ... @@ -4587,45 +4705,50 @@ Page({
4587 4705  
4588 4706  
4589 4707 //--- 如果是自定义海报的时候 ---
4590   - if (th.data.poster && parseInt(th.data.poster.style) == 2) {
4591   -
4592   - //如果显示会员信息的话
4593   - if (parseInt(th.data.poster.show_headpic)) {
4594   - //获取坐标
4595   - var x = parseFloat(th.data.poster.head_x) * 2;
4596   - var y = parseFloat(th.data.poster.head_y) * 2;
4597   - //---绘制圆形要放在最后----
4598   - context.save();
4599   - context.beginPath();
4600   - var h_x = x * unit;
4601   - var h_y = y * unit;
4602   - var h_r = 40 * unit;
4603   - var cx = h_x + h_r;
4604   - var cy = h_y + h_r;
4605   - context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
4606   - context.closePath();
4607   - context.fill();
4608   - context.clip();
4609   - context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
4610   - context.restore();
4611   - }
4612   -
4613   - } else {
4614   - //---绘制圆形要放在最后----
4615   - context.save();
4616   - context.beginPath();
4617   - var h_x = 60 * unit;
4618   - var h_y = 24 * unit;
4619   - var h_r = 40 * unit;
4620   - var cx = h_x + h_r;
4621   - var cy = h_y + h_r;
4622   - context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
4623   - context.closePath();
4624   - context.fill();
4625   - context.clip();
4626   - context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
4627   - context.restore();
4628   - }
  4708 + if(type != 0) {
  4709 +
  4710 + if (th.data.poster && parseInt(th.data.poster.style) == 2) {
  4711 +
  4712 + //如果显示会员信息的话
  4713 + if (parseInt(th.data.poster.show_headpic)) {
  4714 + //获取坐标
  4715 + var x = parseFloat(th.data.poster.head_x) * 2;
  4716 + var y = parseFloat(th.data.poster.head_y) * 2;
  4717 + //---绘制圆形要放在最后----
  4718 + context.save();
  4719 + context.beginPath();
  4720 + var h_x = x * unit;
  4721 + var h_y = y * unit;
  4722 + var h_r = 40 * unit;
  4723 + var cx = h_x + h_r;
  4724 + var cy = h_y + h_r;
  4725 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  4726 + context.closePath();
  4727 + context.fill();
  4728 + context.clip();
  4729 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  4730 + context.restore();
  4731 + }
  4732 +
  4733 + } else {
  4734 + //---绘制圆形要放在最后----
  4735 + context.save();
  4736 + context.beginPath();
  4737 + var h_x = 60 * unit;
  4738 + var h_y = 24 * unit;
  4739 + var h_r = 40 * unit;
  4740 + var cx = h_x + h_r;
  4741 + var cy = h_y + h_r;
  4742 + context.arc(cx, cy, h_r, 0, Math.PI * 2, false);
  4743 + context.closePath();
  4744 + context.fill();
  4745 + context.clip();
  4746 + context.drawImage(th.data.share_head, h_x, h_y, h_r * 2, h_r * 2);
  4747 + context.restore();
  4748 + }
  4749 +
  4750 + };
  4751 +
4629 4752  
4630 4753  
4631 4754 //把画板内容绘制成图片,并回调 画板图片路径
... ... @@ -5748,7 +5871,7 @@ Page({
5748 5871 };
5749 5872 //获取秒杀的多规格
5750 5873 getApp().request.promiseGet(url, {data:req_data}).then(res=>{
5751   - if(res.data.code==0 && res.data.data){
  5874 + if(res.data.code==0 && res.data.data && res.data.data.length){
5752 5875 th.setData({more_flash:res.data.data});
5753 5876 }else{
5754 5877 func(false);
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -87,7 +87,8 @@
87 87 零售价¥{{filters.toFix(data.market_price,2)}}
88 88 </view>
89 89 </view>
90   - <view class="abs white xc-nanber">
  90 +
  91 + <!-- <view class="abs white xc-nanber">
91 92 <text class="fs22">已拼{{prom_act.buy_num}}件</text>
92 93 <view class="flex" style='margin-top:-34rpx'>
93 94 <view class="xc-people-img">
... ... @@ -95,7 +96,19 @@
95 96 </view>
96 97 <view class="t-s fs20 xc-people-val">{{prom_act.ct_num}}人拼</view>
97 98 </view>
98   - </view>
  99 + </view> -->
  100 +
  101 + <!-- 幸运购 -->
  102 + <view class="abs white xc-nanber" wx:if="{{false}}">
  103 + <text class="fs22">已成团{{prom_act.buy_num}}期</text>
  104 + <view class="flex" style='margin-top:-34rpx'>
  105 + <view class="xc-people-img">
  106 + <image class="imgs" src="{{prom_st==1? iurl+'/miniapp/images/r_logo_red.png':iurl+'/miniapp/images/r_logo.png'}}"></image>
  107 + </view>
  108 + <view class="t-s fs20 xc-people-val">{{prom_act.ct_num}}人团</view>
  109 + </view>
  110 + </view>
  111 +
99 112 <view class="hy-stop word-color fs26 abs" wx:if="{{prom_st==1}}">距活动结束还有</view>
100 113 <view class="hy-stop word-color-lan fs26 abs" wx:if="{{prom_st==0}}">距活动开始还有</view>
101 114 <view class="secview flex abs fs24 " style="color: black;right: 3px; top:46rpx;">
... ... @@ -204,6 +217,72 @@
204 217 </view>
205 218 </view>
206 219 </view>
  220 +
  221 + <!-- 幸运购 -->
  222 + <view class="pt_fir se2 bdt16" wx:if="{{teamgroup}}" hidden="{{true}}">
  223 + <view class="xc-partner-frame">
  224 + <view class="zzk-1 flex jc_sb" bindtap="go_t_more">
  225 + <view class="pdl10">已参团4人,还差<text class="c-red">1</text>人成团</view>
  226 + <view class="ckgd flex ai_c">
  227 + 查看奖励
  228 + <view class="bg_right arrow-one"></view>
  229 + </view>
  230 + </view>
  231 + </view>
  232 + <view class='group'>
  233 + <view class='group-list luck' bindtap="go_cj_team" data-ind="{{t_ind}}">
  234 + <!-- <view class="flex ai_c"> -->
  235 + <!-- //选项框头像 -->
  236 + <view class='gtou' wx:for="{{teamgroup}}" wx:for-index="t_ind" wx:key="teamgroup">
  237 + <image src='{{item.user.head_pic}}'></image>
  238 + </view>
  239 + <view class='gtou more'>
  240 + <text class="iconfont icon-sandian"></text>
  241 + </view>
  242 + <!-- <view class='gtou'>
  243 + <image src='{{item.user.head_pic}}'></image>
  244 + </view> -->
  245 + <!-- //等你来拼 -->
  246 + <!-- <view class='gdn ellipsis-1'>{{item.user.nickname}}</view> -->
  247 + <!-- </view> -->
  248 + <!-- //还差几人,剩余时间 -->
  249 + <!-- <view class="rel">
  250 + <view class='ghaicha ellipsis-2'>
  251 + <text class='gred' wx:if="{{prom_act.max_ct_num >0}}">
  252 + <text class="flex" wx:if="{{prom_act.max_ct_num - item.open_num>0}}">
  253 + 还差
  254 + <text class="word-color">{{prom_act.max_ct_num - item.open_num}}</text>
  255 + 人享最低优惠
  256 + </text>
  257 + <text wx:else>您已经享最低优惠</text>
  258 + </text>
  259 + <text class='gred' wx:else>
  260 + 还差
  261 + <text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>
  262 + 人成团
  263 + </text>
  264 + <view class="t_show">
  265 + 剩余
  266 + <text wx:if="{{timer[t_ind].day}}">{{timer[t_ind].day}}天:</text>
  267 + <text>{{timer[t_ind].hou}}</text>
  268 + :
  269 + <text>{{timer[t_ind].min}}</text>
  270 + :
  271 + <text>{{timer[t_ind].sec}}</text>
  272 + </view>
  273 + </view>
  274 + </view> -->
  275 + <!-- //参加团 -->
  276 + <!-- <view class='cjt t-c'>去参团</view> -->
  277 + <!-- <view class="clear"></view> -->
  278 + </view>
  279 +
  280 + <view class="fs24 pdh20 pdt20">*<text class="c-red">5</text>人成团,<text class="c-red">5</text>人得商品,<text class="c-red">5</text>人全额退款并获得<text class="c-red">惊喜礼品</text>!</view>
  281 + </view>
  282 + </view>
  283 +
  284 +
  285 +
207 286 </view>
208 287 <!-- 积分购 -->
209 288 <view wx:if="{{prom_type==4}}">
... ... @@ -246,6 +325,9 @@
246 325 </view>
247 326 <!-- 不是拼团,不是积分购 -->
248 327 <block wx:if="{{prom_type!=6 && prom_type!=4}}">
  328 +
  329 +
  330 +
249 331 <view class="goods-price">
250 332 <view class="flex jc_sb">
251 333 <view class="co-red" style="" wx:if="{{prom_type==0 || prom_type==3}}">
... ... @@ -281,7 +363,8 @@
281 363 </view>
282 364 <!-- 不是秒杀 -->
283 365 <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 -->
284   - <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && card_list && card_list.length>0}}">
  366 + <view class="flex ai_and" wx:if="{{!card_field && g_filters.is_has_rank(rank_switch,data) && prom_type!=1 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}">
  367 +
285 368 <view class="flex ai-center grade-card-frame card-frame">
286 369 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
287 370 <view class="fs24 white view card-name ellipsis-1">
... ... @@ -289,14 +372,13 @@
289 372 </view>
290 373 </view>
291 374 <view class="fs32 xc-black3 ai_and carde_frame">
292   - <text class="fs26">¥</text>
293   - {{g_filters.get_card_price(data,card_list,0)}}
  375 + <text class="fs26">¥</text>{{g_filters.get_card_price(data,card_list,0)}}
294 376 </view>
295 377 </view>
296 378 <!-- 等级卡的显示,购买, 等级卡近30天要显示续费 -->
297 379 <block wx:if="{{g_filters.is_has_rank(rank_switch,data)}}">
298 380 <!-- 不是秒杀,且会员不是等级会员 -->
299   - <view wx:if="{{!card_field && prom_type!=1 && card_list && card_list.length>0}}">
  381 + <view wx:if="{{!card_field && prom_type!=1 && card_list && card_list.length>0 && g_filters.get_card_price(data,card_list,1)!=''}}">
300 382 <view class="beauty-makeup-frame flex ai-center">
301 383 <view class="left flex ai-center jc_sa">
302 384 <view class="flex ai-center grade-card-frame card-frame advert-card">
... ... @@ -308,10 +390,7 @@
308 390 <view class="card-effect">
309 391 <view class="fs24 xc-black3">
310 392 成为{{g_filters.get_card_price(data,card_list,1)}}立
311   - <text class="co-red">
312   - 省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}
313   - </text>
314   - 元
  393 + <text class="co-red">省{{filters.toFix(data.shop_price-g_filters.get_card_price(data,card_list,0),2)}}</text>元
315 394 </view>
316 395 <view class="fs22 xc-ash">开通会员 尽享更多优惠</view>
317 396 </view>
... ... @@ -355,8 +434,8 @@
355 434 </view>
356 435 </view>
357 436 <view class="goods-num" wx:if="{{prom_type!=1}}">
358   - <view class="sales">销量:{{sele_g.sales_sum}}件</view>
359   - <view class="stock">折扣:{{sele_g.disc}}折</view>
  437 + <view class="sales">销量:{{data.sales_sum}}件</view>
  438 + <view class="stock">折扣:{{data.disc}}折</view>
360 439 <view class="stock">{{categories3[0].num}}人评价</view>
361 440 </view>
362 441 <view wx:if="{{prom_type==1}}">
... ... @@ -420,10 +499,7 @@
420 499 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
421 500 <view class="fs30" style="color:black;">选择门店</view>
422 501 </view>
423   - <view class="red_bb fs26">
424   - 更多门店
425   - <text class="bg_jj"></text>
426   - </view>
  502 + <view class="red_bb fs26">更多门店<text class="bg_jj"></text></view>
427 503 </view>
428 504 <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
429 505 <view class="flex-space-between address ai_end pdv10">
... ... @@ -498,6 +574,7 @@
498 574 </view>
499 575 </view>
500 576 </block>
  577 +
501 578 <!-- 要判断是不是有订单优惠 -->
502 579 <block wx:if="{{order_prom}}">
503 580 <view class="cx-frame flex" style="position: relative; height: auto">
... ... @@ -1113,10 +1190,7 @@
1113 1190 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
1114 1191 <view class="fs30" style="color:black;">选择门店</view>
1115 1192 </view>
1116   - <view class="red-co fs28" bindtap="choice_store">
1117   - 更多门店
1118   - <text class="right-arrow"></text>
1119   - </view>
  1193 + <view class="red-co fs28" bindtap="choice_store">更多门店<text class="right-arrow"></text></view>
1120 1194 </view>
1121 1195 <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
1122 1196 <block wx:else>
... ... @@ -1384,10 +1458,7 @@
1384 1458 <icon bindtap="close_popup" class="modal-closes" color="black" size="22" type="cancel"></icon>
1385 1459 </view>
1386 1460 <view class="felx choose_more" bindtap="more_store">
1387   - <text class="fs26 red-co" wx:if="{{is_show_sto_cat}}">
1388   - {{choice_sort_store==0?'更多门店':'返回'}}
1389   - </text>
1390   - <view class="bg_rights" wx:if="{{is_show_sto_cat}}"></view>
  1461 + <text class="fs26 red-co" wx:if="{{is_show_sto_cat}}">{{choice_sort_store==0?'更多门店':'返回'}}</text> <view class="bg_rights" wx:if="{{is_show_sto_cat}}"></view>
1391 1462 </view>
1392 1463 </view>
1393 1464 </view>
... ...
pages/goods/goodsInfo/goodsInfo.wxss
... ... @@ -2690,7 +2690,7 @@ border-radius: 55rpx;
2690 2690 }
2691 2691 .carde_frame{
2692 2692 height: 50rpx;
2693   - line-height: 18rpx
  2693 + /* line-height: 18rpx */
2694 2694 }
2695 2695  
2696 2696 button.custom-service { line-height: normal; border: 0;}
... ... @@ -2858,4 +2858,21 @@ button.custom-service::after{
2858 2858 color: #fff;
2859 2859 }
2860 2860  
2861   -.mt20{ margin-top: 20rpx}
2862 2861 \ No newline at end of file
  2862 +.mt20{ margin-top: 20rpx}
  2863 +
  2864 +.group .group-list.luck {
  2865 + padding: 0 20rpx;
  2866 + justify-content: flex-start;
  2867 +}
  2868 +
  2869 +.group-list.luck .gtou ~ .gtou {
  2870 + margin-left: -16rpx;
  2871 +}
  2872 +
  2873 +.gtou.more {
  2874 + background-color: #ddd;
  2875 + text-align: center;
  2876 + line-height: 70rpx;
  2877 + border-radius: 50%;
  2878 + color: #aaa;
  2879 +}
2863 2880 \ No newline at end of file
... ...
pages/goods/goodsList/goodsList.wxml
... ... @@ -177,7 +177,7 @@
177 177 <view class="item-cont">
178 178 <view class="title ellipsis-2">{{item.goods_name}}</view>
179 179 <!-- 判断是否有活动价 -->
180   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2}}">
  180 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
181 181 <view class="flex on">
182 182 <!-- 活动价 -->
183 183 <view class="price">
... ...
pages/goods/search/search.wxml
... ... @@ -35,7 +35,7 @@
35 35 <view class="item-cont">
36 36 <view class="title ellipsis-2">{{item.goods_name}}</view>
37 37 <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
38   - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_type!=2}}">
  38 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_type!=2 && item.prom_id>0}}">
39 39 <!-- 活动价 -->
40 40 <view class="price">
41 41 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
... ...
pages/index/index/index.wxml
... ... @@ -215,7 +215,52 @@
215 215 </swiper-item>
216 216 </swiper>
217 217 </view>
218   - </view>
  218 + </view>
  219 +
  220 +
  221 +
  222 + <!--幸运购-->
  223 + <view class="seckill" wx:if="{{false}}">
  224 + <navigator bindtap="go_pre" data-url="/packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList" hover-class="none">
  225 + <view class="seckill-time">
  226 + <view class="classname flex ai_c">
  227 + <i class="iconfont icon-luck"></i>
  228 + <text class="bold fs30">幸运购</text>
  229 + </view>
  230 + <view class="flex ai_c seckill-list">
  231 + <text class="fs24 xc-marfin-right">查看全部</text>
  232 + <image class="arrow-right" src="{{url}}/miniapp/images/icon-arrowdown.png"></image>
  233 + </view>
  234 + </view>
  235 + </navigator>
  236 + <view class="seckill-list luck">
  237 + <view class="list-item" wx:for="{{3}}">
  238 + <view class="flex ai-center">
  239 + <view class="img-container"><image class="img-block" src="../../../images/bk.png"></image></view>
  240 + <view class="pdl20 flex fdc jc_sb f1">
  241 +
  242 + <view class="ellipsis-2 name fs28">我是商品</view>
  243 + <view>
  244 + <view class="flex ai-center">
  245 + <text class="rmb c-red">189.00</text>
  246 + <view class="del fs22 c-a pdl10">零售价:<text class="rmb">155</text></view>
  247 + </view>
  248 + <view class="flex jc_sb">
  249 + <progress class="pdr20 f1 progress" percent="50" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="1人已参团"></progress>
  250 + <view class="btn fs26">去参团</view>
  251 + </view>
  252 + </view>
  253 +
  254 + </view>
  255 + </view>
  256 + <view class="fs24 pdt10 c-7b">*<text class="c-red">5</text>人成团,<text class="c-red">5</text>人得商品,<text class="c-red">5</text>人全额退款并得<text class="c-red">惊喜礼品</text>!</view>
  257 + </view>
  258 + </view>
  259 + </view>
  260 +
  261 +
  262 +
  263 +
219 264  
220 265  
221 266  
... ...
pages/index/index/index.wxss
... ... @@ -2,7 +2,8 @@
2 2 background: #ff7295;
3 3 }
4 4  
5   -.icon-presell {
  5 +.icon-presell,
  6 +.icon-luck {
6 7 color: #ED6064;
7 8 font-size: 18px;
8 9 margin-right: 4rpx;
... ... @@ -1115,3 +1116,82 @@ page {
1115 1116 margin-right: 10rpx;
1116 1117 }
1117 1118  
  1119 +
  1120 +
  1121 +/* .luck {
  1122 + padding-left: 20rpx;
  1123 + padding-right: 20rpx;
  1124 +} */
  1125 +
  1126 +.luck .list-item {
  1127 + background-color: white;
  1128 + padding: 20rpx;
  1129 + border-radius: 12rpx;
  1130 +}
  1131 +
  1132 +.luck .img-container {
  1133 + width: 200rpx;
  1134 + height: 200rpx;
  1135 + border-radius: 14rpx;
  1136 + overflow: hidden;
  1137 + flex-shrink: 0;
  1138 + position: relative;
  1139 +}
  1140 +
  1141 +.luck .img-container::before {
  1142 + content: '幸运购';
  1143 + position: absolute;
  1144 + left: 0;
  1145 + top: 0;
  1146 + padding: 4rpx;
  1147 + background-color: rgba(255,103,103,.7);
  1148 + color: white;
  1149 + font-size: 22rpx;
  1150 + border-radius: 0 0 14rpx 0;
  1151 +}
  1152 +
  1153 +.luck .name::before {
  1154 + content: '5人团';
  1155 + background-color: #FF6768;
  1156 + color: white;
  1157 + font-size: 26rpx;
  1158 + padding-left: 10rpx;
  1159 + padding-right: 10rpx;
  1160 + border-radius: 20rpx;
  1161 + margin-right: 10rpx;
  1162 +}
  1163 +
  1164 +.rmb::before {
  1165 + content: '¥';
  1166 + font-size: 24rpx;
  1167 +}
  1168 +
  1169 +.del {
  1170 + text-decoration: line-through;
  1171 +}
  1172 +
  1173 +.luck .btn {
  1174 + background-color: #FF6768;
  1175 + border-radius: 20rpx;
  1176 + padding-left:20rpx;
  1177 + padding-right: 20rpx;
  1178 + color: white;
  1179 +}
  1180 +
  1181 +.luck .name {
  1182 + height: 88rpx;
  1183 +}
  1184 +
  1185 +
  1186 +.luck .progress {
  1187 + position: relative;
  1188 +}
  1189 +.luck .progress::before {
  1190 + position: absolute;
  1191 + width: 100%;
  1192 + content: attr(data-content);
  1193 + font-size: 20rpx;
  1194 + color: white;
  1195 + text-align: center;
  1196 +}
  1197 +
... ...
pages/togoin/togoin.js
... ... @@ -64,6 +64,14 @@ Page({
64 64  
65 65 //-- 会员授权 --
66 66 bindGetUserInfo: function(ee) {
  67 +
  68 + if(!this.data.isAgree) {
  69 + wx.showToast({
  70 + title: '请您先阅读和勾选指定的内容',
  71 + icon: 'none',
  72 + });
  73 + return false;
  74 + }
67 75 var that = this;
68 76 //-- 点击授权 --
69 77 that.getUserProfile(function(res){
... ... @@ -286,7 +294,30 @@ Page({
286 294 close_pop_back:function(){
287 295 this.close_pop();
288 296 wx.navigateBack({ delta: 1})
289   - }
  297 + },
  298 +
  299 +
  300 + // 是否同意协议
  301 + isAgree(e) {
  302 + let isAgree = null;
  303 + if(e.detail.value[0]) {
  304 + isAgree = true;
  305 + } else {
  306 + isAgree = false;
  307 + };
  308 + // this.data.isAgree = isAgree;
  309 + this.setData({
  310 + isAgree,
  311 + });
  312 + },
  313 +
  314 +
  315 + //通过路径跳转到其他页面
  316 + goto: function(e) {
  317 + console.log('xxxx', e);
  318 + var url = e.currentTarget.dataset.url;
  319 + getApp().goto(url);
  320 + },
290 321  
291 322  
292 323  
... ...
pages/togoin/togoin.wxml
... ... @@ -2,7 +2,7 @@
2 2  
3 3 <!-- 登录图 -->
4 4 <view >
5   - <view class="logins flex-center2 ali-c flex" style="position: relative;top: 120rpx;">
  5 + <view class="logins flex-center2 ali-c flex" style="padding-top: 120rpx;">
6 6 <image mode="widthFix" bindtap="go_index" class="login_img_back" src="{{imghots}}/miniapp/images/loginbg.jpg"></image>
7 7 <view class="middle_view">
8 8 <image bindtap="go_index" class="login_img" src="{{store_logo}}" binderror="bind_bnerr" lazy-load="true" data-errorimg="store_logo"></image>
... ... @@ -14,6 +14,13 @@
14 14 <!-- 登录按钮 -->
15 15 <view>
16 16 <view class="phones">
  17 +
  18 + <view bindtap="" class="user-name flex-vertical fs24 jc-center">
  19 + <checkbox-group bindchange="isAgree">
  20 + <checkbox value="true"/>
  21 + </checkbox-group>
  22 + <view class="user-name-txt">我已阅读同意 <text class="gray" bindtap="goto" data-url="/packageA/pages/parseHtml/parseHtml?t=0">《用户使用协议》</text>与<text class="gray" bindtap="goto" data-url="/packageA/pages/parseHtml/parseHtml?t=1">《隐私政策》</text></view>
  23 + </view>
17 24  
18 25 <!-- 授权获取基础信息 -->
19 26 <block wx:if="{{canIUseGetUserProfile}}">
... ...
pages/togoin/togoin.wxss
... ... @@ -4,7 +4,7 @@ page{
4 4 }
5 5 .logins {
6 6 width: 100%;
7   - padding-bottom: 130rpx;
  7 + /* padding-bottom: 130rpx; */
8 8 background-position: center;
9 9 background-repeat: no-repeat;
10 10 background-size: cover
... ... @@ -26,7 +26,7 @@ page{
26 26 border-radius: 48rpx;
27 27 color: rgb(255,255,255);
28 28 font-size: 32rpx;
29   - margin-top:150rpx;
  29 + margin-top: 40rpx;
30 30 }
31 31 .we_chat{
32 32 width: 55rpx;
... ... @@ -65,3 +65,13 @@ button{
65 65 .middle_view{
66 66 position: absolute; left: 0; width: 100%; text-align: center;
67 67 }
  68 +
  69 +/*checkbox 选项框大小 */
  70 +checkbox .wx-checkbox-input {
  71 + width: 30rpx;
  72 + height: 30rpx;
  73 +}
  74 +
  75 +.gray {
  76 + color: #767f8e;
  77 +}
... ...
pages/user/index/index.js
... ... @@ -67,7 +67,7 @@ Page({
67 67 getApp().promiseGet("/api/weshop/storeDistribut/get/"+os.stoid,{}).then(rs=>{
68 68 var dis=rs.data.data;
69 69 for(var i in d_list){
70   - if(d_list[i].name=='我的分销' && dis && dis.switch==0){
  70 + if(d_list[i].name=='我的分销' && (!dis || dis.switch==0)){
71 71 d_list.splice(i,1);
72 72 }
73 73 }
... ...
pages/user/order_detail/order_detail.js
... ... @@ -1441,6 +1441,28 @@ Page({
1441 1441 corpId: id,
1442 1442 success(res) {}
1443 1443 })
  1444 + },
  1445 +
  1446 + //跳转到商品
  1447 + go_gd:function (e) {
  1448 + var gd= e.currentTarget.dataset.gd;
  1449 + var good_url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gd;
  1450 + var url="/api/weshop/activitylist/getGoodActInfo";
  1451 + var req_data={
  1452 + store_id:os.stoid,goodsidlist:gd,is_detail:1
  1453 + };
  1454 + //获取秒杀的多规格
  1455 + getApp().request.promiseGet(url, {data:req_data}).then(res=>{
  1456 + if(res.data.code==0 && res.data.data){
  1457 + if(res.data.data.length==1){
  1458 + good_url+="&prom_type="+res.data.data[0].prom_type+"&prom_id="+res.data.data[0].act_id;
  1459 + }
  1460 + getApp().goto(good_url);
  1461 +
  1462 + }else{
  1463 + getApp().goto(good_url);
  1464 + }
  1465 + })
1444 1466 }
1445 1467  
1446 1468  
... ...
pages/user/order_detail/order_detail.wxml
... ... @@ -20,12 +20,12 @@
20 20 </view>
21 21 <!--wx:if="{{item.return_btn!=4}}" -->
22 22 <view class="order-detail" wx:for="{{order.order_goods}}" wx:key="{{index}}" >
23   - <view class="goods-img">
  23 + <view class="goods-img" bindtap="go_gd" data-gd="{{item.goods_id}}">
24 24 <image class="wh100" src="{{resourceUrl+item.original_img}}" binderror="bind_bnerr" lazy-load="true"
25 25 data-errorimg="order.order_goods[{{index}}].original_img"></image>
26 26 </view>
27   -
28   - <navigator class="order-cont" openType="navigate" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  27 + <!-- 跳转到商品 -->
  28 + <navigator class="order-cont" bindtap="go_gd" data-gd="{{item.goods_id}}">
29 29 <view class="goods-name">{{item.goods_name}}</view>
30 30 <!--<view class="goods-color">{{item.goods_spec}} {{item.goods_color}}</view>-->
31 31 <view class="goods-color">{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</view>
... ...
pages/user/order_list/order_list.js
... ... @@ -1205,7 +1205,7 @@ Page({
1205 1205 b_item.prom_type = 7;
1206 1206 b_item.prom_id = res.data.data.id;
1207 1207 good.prom_type = 7;
1208   - good.prom_id = prom.b_item.prom_id;
  1208 + good.prom_id = b_item.prom_id;
1209 1209  
1210 1210 }
1211 1211 }
... ...