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


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants
















Too many changes.

To preserve performance only 100 of 112 files are displayed.

app.js
... ... @@ -72,7 +72,7 @@ App({
72 72  
73 73 room_id:null, //直播间分享的房间ID
74 74 room_goods_id:null, //直播间分享的商品ID
75   -
  75 +
76 76 },
77 77 auth: o,
78 78 request: a,
... ... @@ -106,7 +106,12 @@ App({
106 106 app.globalData.user_id= user.user_id;
107 107 }
108 108 wx.setStorageSync("userinfo",user);
109   - }
  109 + }else{
  110 + user=null;
  111 + app.globalData.userInfo=null;
  112 + app.globalData.user_id= 0;
  113 + wx.setStorageSync("userinfo",null);
  114 + }
110 115 })
111 116 }
112 117 }
... ... @@ -246,6 +251,7 @@ App({
246 251  
247 252 //----------------获取商家开启的物流--------------------
248 253 getwuliu: function (t, o){
  254 + this.globalData.wuliu=null;
249 255 var th = this, st = this.globalData.setting;
250 256 this.globalData.wuliu && !o ?
251 257 "function" == typeof t && t(this.globalData.wuliu) : a.get("/api/weshop/storeshipping/list", {
... ... @@ -612,9 +618,7 @@ App({
612 618 this.globalData.config2=null; //清除config2的缓存
613 619 this.globalData.config=null; //清除config的缓存
614 620 this.globalData.gr_index=0; //商品分组的序列
615   - for(var i = 1; i < 50; i++) {
616   - clearInterval(i);
617   - }
  621 +
618 622 },
619 623  
620 624 clear_word:function (word) {
... ... @@ -716,7 +720,7 @@ App({
716 720 });
717 721 },
718 722  
719   -
  723 +
720 724  
721 725  
722 726 });
... ...
app.json
... ... @@ -154,7 +154,11 @@
154 154 "pages/user/view_comment/view_comment",
155 155 "pages/user/add_comment/add_comment",
156 156 "pages/user/user_coupon/user_coupon",
157   - "pages/user/buyDetails/buyDetails"
  157 + "pages/user/buyDetails/buyDetails",
  158 + "pages/evaluate/evaluate",
  159 + "pages/evaluate_list/evaluate_list",
  160 + "pages/luckactivity/luckinfo/luckinfo",
  161 + "pages/luckactivity/index/index"
158 162 ]
159 163  
160 164 }
... ...
app.wxss
... ... @@ -25,6 +25,9 @@
25 25 .pdt10 {
26 26 padding-top: 10rpx;
27 27 }
  28 +.pdt12 {
  29 + padding-top: 12rpx;
  30 +}
28 31 .pdb10 {
29 32 padding-bottom: 10rpx;
30 33 }
... ... @@ -84,6 +87,11 @@
84 87 padding-right: 40rpx;
85 88 }
86 89  
  90 +.w20 {
  91 + width: 20%;
  92 + box-sizing: border-box;
  93 +}
  94 +
87 95 .w25 {
88 96 width: 25%;
89 97 box-sizing: border-box;
... ... @@ -117,6 +125,10 @@
117 125 color: #c7c7c7;
118 126 }
119 127  
  128 +.c-7b {
  129 + color: #7b7b7b;
  130 +}
  131 +
120 132 .c-d {
121 133 color: #ddd;
122 134 }
... ... @@ -129,7 +141,7 @@
129 141 color: #555;
130 142 }
131 143  
132   -.c7b {
  144 +.c-7b {
133 145 color: #7b7b7b;
134 146 }
135 147  
... ... @@ -165,6 +177,7 @@
165 177 margin-left: 20rpx;
166 178 }
167 179  
  180 +
168 181 .mgb20 {
169 182 margin-bottom: 20rpx;
170 183 }
... ... @@ -179,6 +192,10 @@
179 192 margin-right: 20rpx;
180 193 }
181 194  
  195 +.mgt30 {
  196 + margin-top: 30rpx;
  197 +}
  198 +
182 199 .h68 {
183 200 height: 68rpx;
184 201 }
... ... @@ -561,9 +578,7 @@ background: #b9b9b9;
561 578 color: #333;
562 579 }
563 580  
564   -.xc-black3{
565   -color: #333;
566   -}
  581 +
567 582  
568 583 .xc-fixed{
569 584 position: fixed;
... ... @@ -627,6 +642,9 @@ background: #ffe3e2;
627 642 .fs40 {
628 643 font-size: 40rpx !important;
629 644 }
  645 +.fs50 {
  646 + font-size: 50rpx !important;
  647 +}
630 648 .ai_c {
631 649 align-items: center;
632 650 }
... ... @@ -671,9 +689,9 @@ background: #ffe3e2;
671 689 /* 图标字体(ty) */
672 690 @font-face {
673 691 font-family: 'iconfont'; /* Project id 2054717 */
674   - src: url('//at.alicdn.com/t/font_2054717_vx6pr6zmhth.woff2?t=1623117016358') format('woff2'),
675   - url('//at.alicdn.com/t/font_2054717_vx6pr6zmhth.woff?t=1623117016358') format('woff'),
676   - url('//at.alicdn.com/t/font_2054717_vx6pr6zmhth.ttf?t=1623117016358') format('truetype');
  692 + src: url('//at.alicdn.com/t/font_2054717_l5nx11noek8.woff2?t=1626055955086') format('woff2'),
  693 + url('//at.alicdn.com/t/font_2054717_l5nx11noek8.woff?t=1626055955086') format('woff'),
  694 + url('//at.alicdn.com/t/font_2054717_l5nx11noek8.ttf?t=1626055955086') format('truetype');
677 695 }
678 696  
679 697 .iconfont {
... ... @@ -684,6 +702,26 @@ background: #ffe3e2;
684 702 -moz-osx-font-smoothing: grayscale;
685 703 }
686 704  
  705 +.icon-zhuanpan:before {
  706 + content: "\e642";
  707 +}
  708 +
  709 +.icon-tel:before {
  710 + content: "\e610";
  711 +}
  712 +
  713 +.icon-liwu:before {
  714 + content: "\e64e";
  715 +}
  716 +
  717 +.icon-share:before {
  718 + content: "\e785";
  719 +}
  720 +
  721 +.icon-shuangjiantouxia:before {
  722 + content: "\e660";
  723 +}
  724 +
687 725 .icon-plyy:before {
688 726 content: "\e729";
689 727 }
... ...
components/diy_store_select/diy_store_select.wxss
1   -.store_sele{width: 100%;z-index: 8; height: 88rpx; padding: 0 15rpx;position: fixed; color: white;
2   - top: 0; left: 0; background-color: #ff7295; font-size: 30rpx; }
3   -
4   - .store_sele1{ height: 100rpx; padding: 0 15rpx; color: #666;background-color: #fff; font-size: 32rpx;}
5   -
6   -
7   -.logo_box{ width: 64rpx; height:64rpx;margin-right: 15rpx; }
  1 +.store_sele {
  2 + width: 100%;
  3 + z-index: 8;
  4 + height: 60rpx;
  5 + padding: 0 15rpx;
  6 + /* position: fixed; */
  7 + color: white;
  8 + /* top: 0;
  9 + left: 0; */
  10 + background-color: #ff7295;
  11 + font-size: 26rpx;
  12 + box-sizing: border-box;
  13 +}
  14 +
  15 +.store_sele1 {
  16 + height: 100rpx;
  17 + padding: 0 15rpx;
  18 + color: #666;
  19 + background-color: #fff;
  20 + font-size: 32rpx;
  21 +}
  22 +
  23 +
  24 +.logo_box {
  25 + width: 48rpx;
  26 + height: 48rpx;
  27 + margin-right: 10rpx;
  28 +}
  29 +
8 30 .pd-view {
9   - height: 80rpx;
  31 + /* height: 80rpx; */
  32 +}
  33 +
  34 +.circle {
  35 + border-radius: 50%;
10 36 }
11 37  
12   -.circle{ border-radius: 50%;}
13 38 /*-- 门店选择 --*/
14 39 /* 选择门店的弹窗 */
15   -.mongolia-layer{
16   -position: fixed;
17   -left: 0;
18   -top: 0;
19   -right: 0;
20   -bottom: 0;
21   -z-index: 11;
22   -background: rgba(0,0,0,0.4);
23   -width: 100%;
24   -height: 91.9%;
25   -
26   -}
27   -
28   -.popup-frame{
29   -position: fixed;
30   -bottom:110rpx;
31   -z-index: 20;
32   -background: white;
33   -width: 100%;
34   -border-radius: 20rpx 20rpx 0 0;
35   -height: 72%;
36   -
37   -}
38   -.popup-top{
39   - border-bottom: 1rpx solid #eee;
40   - height: 155rpx;
41   - width: 95%;
42   - margin: auto;
43   - line-height: 155rpx;
44   -
45   -}
46   -.bg_rights{
47   - border-top: 2rpx solid ;
48   - border-right: 2rpx solid ;
49   - transform: rotate(45deg);
50   - display:inline-block;
51   - width:15rpx;height:15rpx;
52   - border-color:#da0b31;
  40 +.mongolia-layer {
  41 + position: fixed;
  42 + left: 0;
  43 + top: 0;
  44 + right: 0;
  45 + bottom: 0;
  46 + z-index: 11;
  47 + background: rgba(0, 0, 0, 0.4);
  48 + width: 100%;
  49 + height: 91.9%;
  50 +
  51 +}
  52 +
  53 +.popup-frame {
  54 + position: fixed;
  55 + bottom: 110rpx;
  56 + z-index: 20;
  57 + background: white;
  58 + width: 100%;
  59 + border-radius: 20rpx 20rpx 0 0;
  60 + height: 72%;
  61 +
  62 +}
  63 +
  64 +.popup-top {
  65 + border-bottom: 1rpx solid #eee;
  66 + height: 155rpx;
  67 + width: 95%;
  68 + margin: auto;
  69 + line-height: 155rpx;
  70 +
  71 +}
  72 +
  73 +.bg_rights {
  74 + border-top: 2rpx solid;
  75 + border-right: 2rpx solid;
  76 + transform: rotate(45deg);
  77 + display: inline-block;
  78 + width: 15rpx;
  79 + height: 15rpx;
  80 + border-color: #da0b31;
53 81 }
  82 +
54 83 .modal-closes {
55   - position: absolute;
56   - right: 30rpx;
57   - top: -15rpx;
58   - height: 25rpx;
59   -
60   -}
61   -.choose_more{
62   - margin-top: 40rpx;
63   - margin-right: 20rpx;
64   -
65   -}
66   -.choose_mores{
67   - margin-top: 30rpx;
68   - margin-right: 15rpx;
69   -
70   -}
71   -.store-list{
72   - width: 95%;
73   - height: 72%;
74   - overflow-y: scroll;
75   - margin: auto;
76   -}
77   -.store-list .store_choose{
78   - width: 100%;
79   - height: 120rpx;
80   - line-height: 125rpx;
81   - border-bottom: 1rpx solid #eee;
82   -
83   -}
84   -.store-list .store_choose .store{
85   -width: 100%;
86   -margin: auto;
87   -line-height: 37rpx;
88   -padding-left: 20rpx;
89   -
90   -}
91   -.xc-hook{
92   - width: 35rpx;
93   - height: 35rpx;
94   - transform: rotate(-145deg);
95   -line-height: 37rpx;
96   -text-align: center;
97   -}
98   - .xc-hooks{
99   - width: 30rpx;
100   - height: 30rpx;
101   - border: 1rpx solid #999;
102   - }
103   - .address-frame{
104   - width: 93%;
105   -margin-left: 7rpx;
106   -
107   - }
108   - .nearby_store{
109   -margin-left: 17rpx;
110   - }
111   - .address_name{
112   - margin-right: 10rpx;
113   -
114   - }
115   - .address-val{
116   - height: 38rpx;
117   -line-height: 38rpx;
118   -
119   - }
120   - .store-bottom{
121   - width: 85%;
122   - margin: auto;
123   - height: 70rpx;
124   - }
125   - .determine{
126   - width: 260rpx;
127   - height: 55rpx;
128   - border-radius: 50rpx;
129   - line-height: 55rpx;
130   - }
131   - .default{
132   - width: 260rpx;
133   - height: 55rpx;
134   - border:3rpx solid #c8c8c8;
135   - border-radius: 50rpx;
136   - line-height: 55rpx;
137   - }
138   - .store-bottom-frame{
139   - width: 95%;
140   - margin: auto;
141   - }
142   -
143   -
144   - /* 门店分类列表 */
145   - .sort_store_list{
146   - height: 82%;
147   - overflow: hidden;
148   - overflow-y: scroll;
149   - width: 95%;
150   - margin: auto;
151   - }
152   - .sort_store_list .sort-store-frame{
153   - width: 100%;
154   - height: 100rpx;
155   - line-height:100rpx;
156   - border-bottom: 1rpx solid #eee;
157   -
158   - }
159   - .sort_store_list .sort-store-frame .sort-store{
160   - width: 94.5%;
161   - margin: auto;
162   - }
163   - .ai_center{ align-items: center;}
164 84 \ No newline at end of file
  85 + position: absolute;
  86 + right: 30rpx;
  87 + top: -15rpx;
  88 + height: 25rpx;
  89 +
  90 +}
  91 +
  92 +.choose_more {
  93 + margin-top: 40rpx;
  94 + margin-right: 20rpx;
  95 +
  96 +}
  97 +
  98 +.choose_mores {
  99 + margin-top: 30rpx;
  100 + margin-right: 15rpx;
  101 +
  102 +}
  103 +
  104 +.store-list {
  105 + width: 95%;
  106 + height: 72%;
  107 + overflow-y: scroll;
  108 + margin: auto;
  109 +}
  110 +
  111 +.store-list .store_choose {
  112 + width: 100%;
  113 + height: 120rpx;
  114 + line-height: 125rpx;
  115 + border-bottom: 1rpx solid #eee;
  116 +
  117 +}
  118 +
  119 +.store-list .store_choose .store {
  120 + width: 100%;
  121 + margin: auto;
  122 + line-height: 37rpx;
  123 + padding-left: 20rpx;
  124 +
  125 +}
  126 +
  127 +.xc-hook {
  128 + width: 35rpx;
  129 + height: 35rpx;
  130 + transform: rotate(-145deg);
  131 + line-height: 37rpx;
  132 + text-align: center;
  133 +}
  134 +
  135 +.xc-hooks {
  136 + width: 30rpx;
  137 + height: 30rpx;
  138 + border: 1rpx solid #999;
  139 +}
  140 +
  141 +.address-frame {
  142 + width: 93%;
  143 + margin-left: 7rpx;
  144 +
  145 +}
  146 +
  147 +.nearby_store {
  148 + margin-left: 17rpx;
  149 +}
  150 +
  151 +.address_name {
  152 + margin-right: 10rpx;
  153 +
  154 +}
  155 +
  156 +.address-val {
  157 + height: 38rpx;
  158 + line-height: 38rpx;
  159 +
  160 +}
  161 +
  162 +.store-bottom {
  163 + width: 85%;
  164 + margin: auto;
  165 + height: 70rpx;
  166 +}
  167 +
  168 +.determine {
  169 + width: 260rpx;
  170 + height: 55rpx;
  171 + border-radius: 50rpx;
  172 + line-height: 55rpx;
  173 +}
  174 +
  175 +.default {
  176 + width: 260rpx;
  177 + height: 55rpx;
  178 + border: 3rpx solid #c8c8c8;
  179 + border-radius: 50rpx;
  180 + line-height: 55rpx;
  181 +}
  182 +
  183 +.store-bottom-frame {
  184 + width: 95%;
  185 + margin: auto;
  186 +}
  187 +
  188 +
  189 +/* 门店分类列表 */
  190 +.sort_store_list {
  191 + height: 82%;
  192 + overflow: hidden;
  193 + overflow-y: scroll;
  194 + width: 95%;
  195 + margin: auto;
  196 +}
  197 +
  198 +.sort_store_list .sort-store-frame {
  199 + width: 100%;
  200 + height: 100rpx;
  201 + line-height: 100rpx;
  202 + border-bottom: 1rpx solid #eee;
  203 +
  204 +}
  205 +
  206 +.sort_store_list .sort-store-frame .sort-store {
  207 + width: 94.5%;
  208 + margin: auto;
  209 +}
  210 +
  211 +.ai_center {
  212 + align-items: center;
  213 +}
... ...
components/goods_list/goods_list.wxml
... ... @@ -4,31 +4,34 @@
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}}">
8   - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  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">
9 9 <!-- 商品图⽚ -->
10   - <image class="sp" src="{{url+item.original_img}}" mode="scaleToFill" binderror="bind_bnerr_xc" data-url="{{url+item.original_img}}" data-errorimg="recommend[{{index}}].original_img"></image>
  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 15 <block wx:if="{{item.prom_price>0 || item.prom_integral>0}}">
16   - <view class="money flex xc-wc" >
17   - <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
18   - <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
19   - <!-- 活动价 -->
20   - <view class="flex xc-wc" wx:if="{{item.prom_price}}">
21   - <view class="fs24">¥</view>
22   - <view class="fs35">{{item.prom_price}}</view>
23   - </view>
24   - </view>
25   - <view class="flex" style="line-height: 28rpx;">
26   - <!-- 原价 -->
27   - <view class="price flex xc-ash line_th">
28   - <view class="fs22">¥</view>
29   - <view class="fs22">{{item.market_price}}</view>
30   - </view>
31   - </view>
  16 + <view class="pdt10">
  17 + <view class="money flex xc-wc" >
  18 + <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
  19 + <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
  20 + <!-- 活动价 -->
  21 + <view class="flex xc-wc" wx:if="{{item.prom_price}}">
  22 + <view class="fs24">¥</view>
  23 + <view class="fs35">{{item.prom_price}}</view>
  24 + </view>
  25 + </view>
  26 + <view class="flex">
  27 + <!-- 原价 -->
  28 + <view class="price flex xc-ash line_th">
  29 + <view class="fs22">¥</view>
  30 + <view class="fs22">{{item.market_price}}</view>
  31 + </view>
  32 + </view>
  33 + </view>
  34 +
32 35 </block>
33 36 <block wx:else>
34 37 <!-- 商品价格,先判断下是后⼜等级价-->
... ... @@ -48,7 +51,7 @@
48 51 </view>
49 52 </view>
50 53 </view>
51   - <view class="flex" style="line-height: 28rpx;">
  54 + <view class="flex">
52 55 <!-- 原价 -->
53 56 <view class="price flex xc-ash line_th">
54 57 <view class="fs22">¥</view>
... ... @@ -64,7 +67,7 @@
64 67 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
65 68 </view>
66 69 </view>
67   - <view class="flex" style="line-height: 28rpx;">
  70 + <view class="flex">
68 71 <!-- 原价 -->
69 72 <view class="price flex xc-ash line_th">
70 73 <view class="fs22">¥</view>
... ... @@ -108,7 +111,7 @@
108 111 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
109 112 </view>
110 113 </view>
111   - <view class="flex" style="line-height: 28rpx;">
  114 + <view class="flex">
112 115 <!-- 原价 -->
113 116 <view class="price flex xc-ash line_th">
114 117 <view class="fs22">¥</view>
... ... @@ -119,7 +122,7 @@
119 122 </block>
120 123 </block>
121 124 <!-- 商品压根就没有等级价 -->
122   - <block wx:else>
  125 + <view class="pdt10" wx:else>
123 126 <view class="money flex">
124 127 <!-- 办卡价 -->
125 128 <view class="flex xc-wc">
... ... @@ -127,14 +130,14 @@
127 130 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
128 131 </view>
129 132 </view>
130   - <view class="flex" style="line-height: 28rpx;">
  133 + <view class="flex" style="">
131 134 <!-- 原价 -->
132 135 <view class="price flex xc-ash line_th">
133 136 <view class="fs22">¥</view>
134 137 <view class="fs22">{{item.market_price}}</view>
135 138 </view>
136 139 </view>
137   - </block>
  140 + </view>
138 141 </block>
139 142 </view>
140 143 </navigator>
... ...
components/goods_list/goods_list.wxss
1 1 .collects {
2   - margin-top: 40rpx;
3   - margin-bottom: 40rpx;
  2 + /* margin-top: 40rpx; */
  3 + /* margin-bottom: 40rpx; */
  4 +}
  5 +
  6 +.pdt10 {
  7 + padding-top: 10rpx;
4 8 }
5 9  
6 10 .ai-center{
... ... @@ -82,40 +86,53 @@
82 86  
83 87 .goods_name {
84 88 height: 62rpx;
85   - margin-top: 6rpx;
  89 + /* margin-top: 6rpx; */
86 90 line-height: 30rpx;
87 91 }
88 92  
89 93 .hang {
90   - width: 100%;
91   - margin: auto;
92   - padding-left: 21rpx;
  94 + /* width: 100%; */
  95 + /* margin: auto;
  96 + padding-left: 21rpx; */
  97 + display: flex;
  98 + flex-wrap: wrap;
  99 + /* margin: 0 auto; */
  100 + padding: 0 20rpx;
  101 + box-sizing: border-box;
  102 + /* justify-content: space-evenly; */
93 103 }
94 104  
95 105 .hang .collect {
96   - width: 347rpx;
97   - height: 520rpx;
  106 + width: calc((100% - 20rpx) / 2);
  107 + /* height: 520rpx; */
98 108 border-radius: 25rpx;
99   - border: 1rpx solid rgb(214, 214, 214);
  109 + border: 2rpx solid #ebedf0;
100 110 overflow: hidden;
101   - margin-right: 14rpx;
102   - margin-bottom: 5rpx;
  111 + box-sizing: border-box;
  112 + margin-top: 20rpx;
  113 + /* margin-right: 14rpx;
  114 + margin-bottom: 5rpx; */
  115 +}
  116 +
  117 +.hang .collect:nth-child(2n+1) {
  118 + margin-right: 20rpx;
103 119 }
104 120  
105 121 .collect .bottom {
106   - padding: 0rpx 20rpx;
  122 + padding: 20rpx;
107 123 }
108 124  
109 125 .collect .sp {
110 126 width: 100%;
111   - height: 326rpx;
  127 + height: 340rpx;
  128 + display: block;
112 129 }
113 130  
114 131 .collect .money {
115   - margin-top: 28rpx;
  132 + /* margin-top: 28rpx;
116 133 margin-bottom: 8rpx;
117 134 line-height: 28rpx;
118   - align-items: baseline;
  135 + align-items: baseline; */
119 136 }
120 137  
121 138 .collect .money view {
... ... @@ -177,7 +194,7 @@
177 194 .nothing .Foil {
178 195 width: 80rpx;
179 196 height: 2rpx;
180   - background-color: rgb(138, 138, 138);
  197 + background-color: #ebedf0;
181 198 }
182 199  
183 200 .line_th {
... ...
components/my-qrcode/my-qrcode.js 0 → 100644
  1 +// pages/user/yhq/qr_code/qr_code.js
  2 +const {
  3 + barcode,
  4 + qrcode
  5 +} = require('../../utils/index.js')
  6 +
  7 +Component({
  8 + data: {
  9 + q_show:0,
  10 + object:null,
  11 + index:0,
  12 + is_fw:0,
  13 +
  14 + barcode_canvas:null,
  15 + qrcode_canvas:null,
  16 + },
  17 + properties: {
  18 + // 这里定义了innerText属性,属性值可以在组件使用时指定
  19 + },
  20 + ready: function () {
  21 + },
  22 +
  23 + methods: {
  24 + //关闭
  25 + close: function (e) {
  26 + this.setData({q_show: 0,barcode_canvas:null,qrcode_canvas:null });
  27 + this.triggerEvent('close',{},{bubbles: true});
  28 + },
  29 +
  30 + //打开
  31 + open:function (e) {
  32 + this.data.index++;
  33 + var list=[{index:this.data.index }];
  34 +
  35 + this.setData({q_show: 1,object:e,barcode_canvas:list,qrcode_canvas:list,is_fw:e.is_fw });
  36 + var val=e.val;
  37 +
  38 + // barcode('barcode'+this.data.index,val, 620, 160,this);
  39 + qrcode('qrcode'+this.data.index, val, 520, 520,this);
  40 + }
  41 + },
  42 +
  43 +
  44 +
  45 +
  46 +})
0 47 \ No newline at end of file
... ...
components/full_screen/full_screen.json renamed to components/my-qrcode/my-qrcode.json
1 1 {
2   - "component": true,
3   - "usingComponents": {}
  2 + "component": true,
  3 + "usingComponents": {}
4 4 }
5 5 \ No newline at end of file
... ...
components/my-qrcode/my-qrcode.wxml 0 → 100644
  1 +<view class="xc-pop-up" wx:if="{{q_show}}" catchtouchmove='true'>
  2 + <view class="shut"><text class="iconfont icon-close" bindtap="close"></text></view>
  3 + <view class="barqrcode">
  4 + <canvas class="qrcode" canvas-id="qrcode{{item.index}}" wx:for="{{barcode_canvas}}"/>
  5 + <view class="q_code fs28">兑换码:{{object.val}}</view>
  6 + <view class="c-9 pdt10">请向店员出示二维码核销兑换</view>
  7 + <!-- <view class="c-9 fs28">有效期:{{object.now}} 至 {{object.validay}}</view> -->
  8 + </view>
  9 +</view>
  10 +
... ...
components/my-qrcode/my-qrcode.wxss 0 → 100644
  1 +@import '../../app.wxss';
  2 +
  3 +.xc-pop-up{
  4 + position:fixed;
  5 + z-index:5;
  6 + top: 50%;
  7 + left: 50%;
  8 + transform: translate(-50%, -50%);
  9 +}
  10 +
  11 +
  12 +.xc-obscuration{
  13 + position: fixed;
  14 + left: 0;
  15 + top: 0;
  16 + right: 0;
  17 + bottom: 0;
  18 + z-index: 11;
  19 + background: rgba(0,0,0,0.4);
  20 + width: 100%;
  21 + height: 100%;
  22 +
  23 +
  24 +
  25 +}
  26 +
  27 + /* Y */
  28 +.xc-qr-frame{
  29 + /* width:90%;
  30 + min-height: 696rpx;
  31 + background: #fff;
  32 + z-index: 55;
  33 + position: fixed;
  34 + top:180rpx; */
  35 + /* height: auto; */
  36 + /* padding-bottom:20rpx; */
  37 + /* left:35rpx; */
  38 + /* overflow: hidden;
  39 + border-radius: 16rpx; */
  40 +}
  41 +
  42 +/* 二维码和条形码的边框Y */
  43 +.barqrcode{
  44 + background-color: white;
  45 + border-radius: 16rpx;
  46 + padding: 0 40rpx 40rpx;
  47 + text-align: center;
  48 +}
  49 +/* 点击条形Y */
  50 +.barcode {
  51 + /* background-color: white;
  52 + border-radius: 12rpx; */
  53 +}
  54 +canvas{
  55 + width:100%;
  56 + height:55px;
  57 +display:block;
  58 +
  59 +}
  60 +.q_code{
  61 + color: #333;
  62 +}
  63 +
  64 +
  65 +/* 二维码边框Y*/
  66 +.qrcode_rim {
  67 + width: 550rpx;
  68 + height:544rpx;
  69 +display:flex;
  70 +flex-direction:column;
  71 +position: absolute;
  72 +left: 75rpx;
  73 +top: 5rpx;
  74 +
  75 +}
  76 +.qrcode{
  77 + width: 520rpx;
  78 + height: 520rpx;
  79 +}
  80 +.r-code{
  81 + /* font-size:28rpx;
  82 + padding-left: 25rpx; */
  83 + /* margin-top: -5.5rpx; */
  84 +
  85 +}
  86 +
  87 +.shut{
  88 + color: white;
  89 + text-align: right;
  90 + padding-bottom: 30rpx;
  91 + position: relative;
  92 +}
  93 +
  94 +
  95 +.icon-close {
  96 + font-size: 48rpx;
  97 +}
  98 +
  99 +.shut::after {
  100 + content: '';
  101 + width: 2rpx;
  102 + height: 32rpx;
  103 + background-color: white;
  104 + position: absolute;
  105 + bottom: 0;
  106 + right: 24rpx;
  107 +}
  108 +
  109 +.mt{ margin-top:130rpx}
  110 +.mts{ margin-top:70rpx}
  111 +.flex{
  112 + display: flex;
  113 + justify-content:center;
  114 +}
  115 +
  116 +.code_show{
  117 + text-align: center;position: relative; left: -20rpx;
  118 +}
  119 +
  120 +.c-9 {
  121 + color: #999;
  122 +}
0 123 \ No newline at end of file
... ...
components/share/share.js
... ... @@ -12,7 +12,10 @@ Component({
12 12 },
13 13 set_type(type){
14 14 this.setData({type:type})
15   - }
  15 + },
  16 + send() {
  17 + this.triggerEvent('send',{},{bubbles: true});
  18 + },
16 19  
17 20 }
18 21 })
19 22 \ No newline at end of file
... ...
components/share/share.wxml
... ... @@ -2,7 +2,7 @@
2 2 <view class="container-wrap animated slideInUp">
3 3 <view class="flex">
4 4 <block wx:if="{{type==0}}">
5   - <button open-type="share" class="btn">
  5 + <button open-type="share" class="btn" bindtap="send">
6 6 <view class="icon-container bg-green"><view class="iconfont icon-weixin"></view></view>
7 7 <view class="title">发送给好友</view>
8 8 </button>
... ...
custom-tab-bar/index.wxss
1   -.main_bar{
2   - width:100%; border-top: 1rpx solid #ebebeb; position: fixed; bottom: 0; left: 0; z-index: 10000;
3   - display: flex; justify-content: space-around;
  1 +.main_bar {
  2 + width: 100%;
  3 + border-top: 1rpx solid #ebebeb;
  4 + position: fixed;
  5 + bottom: 0;
  6 + left: 0;
  7 + z-index: 10000;
  8 + display: flex;
  9 + justify-content: space-around;
4 10 }
5   -.tabbar_item{
6   - position:relative;height:100%;float:left;text-align:center;padding:0px 0;
  11 +
  12 +.tabbar_item {
  13 + position: relative;
  14 + height: 100%;
  15 + float: left;
  16 + text-align: center;
  17 + padding: 0px 0;
7 18 }
8   -.tab_img{display: flex; justify-content: center;align-items: center}
9   -.nav_imgage{
10   - height: 58rpx; width: 58rpx;background-position: center;background-repeat: no-repeat;background-size: auto 92%;
  19 +
  20 +.tab_img {
  21 + display: flex;
  22 + justify-content: center;
  23 + align-items: center
  24 +}
  25 +
  26 +.nav_imgage {
  27 + height: 52rpx;
  28 + width: 52rpx;
  29 + background-position: center;
  30 + background-repeat: no-repeat;
  31 + background-size: 100%;
  32 +}
  33 +
  34 +.cart_num {
  35 + top: 0;
  36 + background-color: red;
  37 + color: #fff;
  38 + font-size: 20rpx;
  39 + border-radius: 50%;
  40 + width: 40rpx;
  41 + line-height: 40rpx;
  42 + height: 40rpx;
  43 + position: absolute;
  44 + z-index: 100;
  45 + right: 30rpx;
11 46 }
12   -.cart_num{
13   - top:0;background-color: red;color: #fff;font-size: 20rpx;border-radius: 50%;width: 40rpx;line-height:40rpx;height: 40rpx;position: absolute;z-index: 100;right:30rpx;
14   -}
15 47 \ No newline at end of file
... ...
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -199,8 +199,10 @@ Page({
199 199 //------初始化加载----------
200 200 onLoad: function(t) {
201 201  
202   - console.log("--服务卡项--");
203   - console.log(t);
  202 + // console.log("--服务卡项--");
  203 + // console.log('fdsfasfasf111111111111111====================',t);
  204 +
  205 +
204 206  
205 207 var ee = this,
206 208 that = ee,
... ... @@ -320,7 +322,7 @@ Page({
320 322 //如果有开启近距离的话,同时距离优不一样了
321 323 if (that.data.lat != null) {
322 324 //如果经纬度有变化的话
323   - if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  325 + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
324 326 that.data.fir_def_store=e;
325 327 that.setData({
326 328 def_pick_store: e,
... ... @@ -884,7 +886,7 @@ Page({
884 886 data: dd,
885 887 }).then(res => {
886 888 var e = res;
887   - if (e.data.code == 0) {
  889 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
888 890 //--普通门店排版--
889 891 setTimeout(function(){
890 892 var sto_list=th.data.data.storageId;
... ... @@ -1078,12 +1080,16 @@ Page({
1078 1080 });
1079 1081 //-----如果没有默认门店,要取第一个门店作为默认店------
1080 1082 if (!th.data.def_pick_store && th.data.bconfig && th.data.bconfig.is_sort_storage) {
1081   - th.setData({
1082   - def_pick_store:e.data.data.pageData[0],
1083   - sto_sele_name: e.data.data.pageData[0].pickup_name,
1084   - sto_sele_id: e.data.data.pageData[0].pickup_id,
1085   - sto_sele_distr: e.data.data.pageData[0].distr_type
1086   - })
  1083 +
  1084 + if(e.data.data && e.data.data.pageData && e.data.data.pageData.length>0){
  1085 + th.setData({
  1086 + def_pick_store:e.data.data.pageData[0],
  1087 + sto_sele_name: e.data.data.pageData[0].pickup_name,
  1088 + sto_sele_id: e.data.data.pageData[0].pickup_id,
  1089 + sto_sele_distr: e.data.data.pageData[0].distr_type
  1090 + })
  1091 + }
  1092 +
1087 1093 }
1088 1094 }
1089 1095 },
... ... @@ -1857,7 +1863,8 @@ Page({
1857 1863 });
1858 1864 return false;
1859 1865 }
1860   -
  1866 +
  1867 + if(!item) return false;
1861 1868  
1862 1869 th.setData({
1863 1870 def_pick_store: item,
... ... @@ -1961,6 +1968,9 @@ Page({
1961 1968 }
1962 1969 });
1963 1970  
  1971 +
  1972 + if(!item) return false;
  1973 +
1964 1974 th.setData({
1965 1975 def_pick_store: item,
1966 1976 sto_sele_name: item.pickup_name,
... ... @@ -2175,6 +2185,14 @@ Page({
2175 2185 imageUrl:this.data.gallery[0].image_url,
2176 2186 }
2177 2187 },
  2188 +
  2189 +
  2190 +
  2191 + clickCollapse() {
  2192 + this.setData({
  2193 + flag: !this.data.flag,
  2194 + })
  2195 + },
2178 2196  
2179 2197  
2180 2198  
... ...
packageA/pages/goodsInfo/goodsInfo.wxml
... ... @@ -39,7 +39,7 @@
39 39 <view class="goods-title"> <view class="goods-name elli">{{data.goods_name}}</view></view>
40 40 </view>
41 41  
42   - <view class="goods-num" style="margin-bottom: 10rpx;">
  42 + <view class="goods-num">
43 43 <view class="sales">销量:{{data.sales_sum}}</view>
44 44 <view class="sales">有效天数:{{data.validDays?data.validDays:'不限'}}</view>
45 45 </view>
... ... @@ -55,7 +55,7 @@
55 55 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
56 56 <view class="fs30" style="color:black;">选择门店</view>
57 57 </view>
58   - <view class="red_bb fs30">
  58 + <view class="red_bb fs26">
59 59 更多门店
60 60 <text class="bg_jj"></text>
61 61 </view>
... ... @@ -86,28 +86,42 @@
86 86  
87 87 </view>
88 88  
89   - <view class="bz_view flex ai-center bdt16" wx:if="{{store_config}}" style="line-height: 36rpx">
90   - <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
91   - <view class="bz-content">{{store_config.service_bz}}</view>
92   - </view>
  89 + <view class="bz_view flex bdt16" wx:if="{{store_config}}">
  90 + <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
  91 + <view class="flex f1 ai_c rel">
  92 + <view class="bz-content {{flag ? '':'ellipsis-1'}} f1">{{store_config.service_bz}}</view>
  93 + <view bindtap="clickCollapse" class="cx-obtain-coupon wsize arrow">
  94 + <text class="bg_jj {{flag?'down1':''}}"></text>
  95 + </view>
  96 + <!-- <text class="bg_jj" bindtap="clickCollapse"></text> -->
  97 + <!-- <text class="iconfont icon-shuangjiantouxia c-db"></text> -->
  98 + </view>
  99 + </view>
  100 +
  101 +
  102 +
  103 +
  104 +
  105 +
  106 +
93 107 <!-- 图文详情 -->
94   - <view>
95   - <view class="tuwen_title">
  108 + <view class="pd20">
  109 + <!-- <view class="tuwen_title">
96 110 <view class="g_line"></view>
97 111 <view class="center_s">
98 112 <image src="{{iurl}}/miniapp/images/tuwen_c.png"></image><text>详情</text>
99 113 </view>
100   - </view>
  114 + </view> -->
101 115  
102 116 <view wx:if="{{service_list}}">
103   - <view class="goods-num" style="font-size: 26rpx; background-color: #f6f5f4;">
  117 + <view class="goods-num pdv20 t-c" style="font-size: 26rpx; background-color: #f6f5f4;">
104 118 <view class="stock">项目名称</view>
105 119 <view class="stock">耗时(分)</view>
106 120 <view class="stock">手工费</view>
107 121 <view class="stock">次数</view>
108 122 </view>
109 123 <block wx:for="{{service_list}}">
110   - <view class="goods-num" style="margin-bottom: 10rpx;font-size: 22rpx;">
  124 + <view class="goods-num pdv20 t-c" style="margin-bottom: 10rpx;font-size: 22rpx;">
111 125 <view class="stock">{{item.projectName}}</view>
112 126 <view class="stock">{{item.timeConsuming}}</view>
113 127 <view class="stock">{{item.money}}</view>
... ... @@ -143,29 +157,33 @@
143 157 </view>
144 158  
145 159 <!-- 底部按钮 -->
146   - <view class="join-cart">
147   - <!-- bindtap="contactService" -->
148   - <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
149   - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
150   - <view>客服</view>
151   - </button>
152   - <view wx:else class="custom-service cart-ico new_split" bindtap="contactService">
153   - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
154   - <view>客服</view>
155   - </view>
156   -
157   - <view class="shopping-cart cart-ico new_split">
158   - <navigator open-type="switchTab" url="/pages/cart/cart/cart">
159   - <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image>
160   - <view class="cart-num ellipsis-1"> {{cartGoodsNum}} </view>
161   - <view>购物车</view>
162   - </navigator>
163   - </view>
  160 + <view class="join-cart jc_sb">
  161 + <!-- bindtap="contactService" -->
  162 + <view class="flex">
  163 + <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">
  164 + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
  165 + <view>客服</view>
  166 + </button>
  167 + <view wx:else class="custom-service cart-ico new_split" bindtap="contactService">
  168 + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
  169 + <view>客服</view>
  170 + </view>
  171 +
  172 + <view class="shopping-cart cart-ico new_split">
  173 + <navigator open-type="switchTab" url="/pages/cart/cart/cart">
  174 + <image class="sc-img" src="{{iurl}}/miniapp/images/shopping-cart.png"></image>
  175 + <view class="cart-num ellipsis-1"> {{cartGoodsNum}} </view>
  176 + <view>购物车</view>
  177 + </navigator>
  178 + </view>
  179 + </view>
  180 +
164 181  
165   - <block>
166   - <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn">加入购物车</view>
167   - <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn">立即购买</view>
168   - </block>
  182 + <view class="flex f1 pdh20">
  183 +
  184 + <view bindtap="openSpecModel" data-ind="1" class="join-btn cart-btn f1">加入购物车</view>
  185 + <view bindtap="openSpecModel" data-ind="2" class="buy-btn cart-btn f1">立即购买</view>
  186 + </view>
169 187  
170 188 </view>
171 189  
... ... @@ -227,7 +245,7 @@
227 245 <view class="b_num">
228 246 <view>购买数量</view>
229 247 <view class="count">
230   - <view bindtap="subCartNum" class="sub">-</view>
  248 + <view bindtap="subCartNum" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
231 249 <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
232 250 <view bindtap="addCartNum" class="add">+</view>
233 251 </view>
... ...
packageA/pages/goodsInfo/goodsInfo.wxss
... ... @@ -9,15 +9,19 @@ image {
9 9 display: flex;
10 10 justify-content: center;
11 11 width: 100%;
  12 + position: fixed;
  13 + top: 0;
  14 + z-index: 999;
12 15 /* height: 80rpx; */
13 16 /* margin-bottom: 20rpx; */
14 17 background-color: #fff;
  18 + border-top: 2rpx solid #ebedf0;
15 19 /* border-bottom: 1rpx #fafafa solid; */
16 20 }
17 21 .type-box {
18 22 width: 25%;
19 23 box-sizing: border-box;
20   - font-size: 28rpx;
  24 + font-size: 32rpx;
21 25 line-height: 76rpx;
22 26 padding: 0 20rpx;
23 27 text-align: center;
... ... @@ -29,12 +33,14 @@ image {
29 33 display: flex;
30 34 justify-content: center;
31 35 width: 100%;
  36 + font-size: 26rpx;
32 37 }
33 38 .type-item-on {
34 39 color: #F95D74;
35 40 font-weight: bold;
36 41 /* border-bottom: 4rpx solid #F95D74; */
37 42 position: relative;
  43 + font-size: 30rpx;
38 44 }
39 45 .type-item-on:after {
40 46 content: '';
... ... @@ -53,19 +59,21 @@ image {
53 59 }
54 60 .goods-title {
55 61 display: flex;
56   - justify-content: space-between; overflow: hidden;
  62 + justify-content: space-between;
  63 + /* overflow: hidden; */
57 64 /* height: 108rpx; */
58 65 }
59 66 .goods-name {
60   - width: 560rpx;
61   - line-height: 46rpx;
  67 + /* width: 560rpx; */
  68 + /* line-height: 46rpx; */
62 69 font-size: 32rpx;
63 70 font-weight: bold;
64 71 color: #333;
65   - margin-top: 30rpx;
66   - margin-bottom:30rpx;
  72 + /* margin-top: 30rpx;
  73 + margin-bottom:30rpx; */
67 74 flex: 1;
68 75 text-align: justify;
  76 + margin: 10rpx 0 20rpx;
69 77 }
70 78  
71 79 .goods-collect {
... ... @@ -89,13 +97,13 @@ image {
89 97 .goods-price {
90 98 font-size: 60rpx;
91 99 /* padding: 20rpx 34rpx; */
92   - padding:0rpx 34rpx;
  100 + /* padding:0rpx 34rpx; */
93 101 /* line-height: 60rpx; */
94 102 color: #999;
95   -
  103 + padding: 20rpx;
96 104 /* margin-top: 46rpx; */
97   - margin-top:26rpx;
98   - padding-bottom:20rpx;
  105 + /* margin-top:26rpx;
  106 + padding-bottom:20rpx; */
99 107 }
100 108  
101 109 .prom-info {
... ... @@ -111,13 +119,13 @@ image {
111 119 border-radius: 4rpx;
112 120 }
113 121 .market-price {
114   - display: flex;
115   - margin-left: -5rpx;
  122 + /* display: flex;
  123 + margin-left: -5rpx; */
116 124 }
117 125  
118 126 .market-price .yuan{
119   - top:24rpx;
120   - font-size: 36rpx
  127 + /* top:24rpx; */
  128 + font-size: 30rpx
121 129 }
122 130  
123 131 .market-price>view>text {
... ... @@ -125,7 +133,8 @@ image {
125 133 }
126 134  
127 135 .market-price>.yj{
128   - color: #999999; font-size: 26rpx;margin-left: 16rpx;position: relative;top:30rpx;
  136 + color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */
  137 + display: inline-block;
129 138 }
130 139  
131 140 .goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;}
... ... @@ -134,6 +143,7 @@ image {
134 143 display: flex;
135 144 font-size: 24rpx;
136 145 justify-content: space-between;
  146 +
137 147 }
138 148  
139 149 .goods-detail .twen{
... ... @@ -348,11 +358,11 @@ image {
348 358 }
349 359  
350 360 .join-cart>view {
351   - width: 32%;
  361 + width: 29%;
352 362 }
353 363  
354 364 .join-cart>.new_split {
355   - width: 17%;
  365 + width: 13%;
356 366 text-align: center;
357 367 padding: 0;
358 368 margin: 0;
... ... @@ -551,29 +561,28 @@ border-radius: 0 56rpx 55rpx 0;
551 561 /* padding: 0 30rpx; */
552 562 font-size: 32rpx;
553 563 box-sizing: border-box;
554   - border-radius: 20rpx;
  564 + border-radius: 20rpx 20rpx 0 0;
555 565 /* height: 72%; */
556 566 }
557 567  
558   -.spec-model .pding{padding: 0 30rpx;}
  568 +.spec-model .pding{padding: 0 20rpx;}
559 569  
560 570 .spec-goods {
561 571 padding: 30rpx 0 20rpx;
562 572 /* float: left; */
563   - display: flex;
564 573 width: 100%;
565   - border-bottom:2rpx solid #eee;
  574 + /* border-bottom:2rpx solid #eee; */
566 575 }
567 576  
568 577 .spec-img {
569   - /* float: left; */
  578 + float: left;
570 579 height: 186rpx;
571 580 width: 186rpx;
572 581 border: 4rpx solid #eee
573 582 }
574 583  
575 584 .spec-goods-info {
576   - /* float: left; */
  585 + float: left;
577 586 padding: 0 25rpx;
578 587 width: 400rpx;
579 588 }
... ... @@ -608,17 +617,17 @@ border-radius: 0 56rpx 55rpx 0;
608 617  
609 618 .quhuo{font-size: 30rpx; color: #000}
610 619 .b_num{
611   - display: flex;
612   - font-size: 30rpx;
613   - color: #333;
  620 + display: flex;font-size: 30rpx; color: #333;
  621 + justify-content: space-between;
  622 + align-items: center;
614 623 padding: 20rpx;
615 624 }
616 625  
617 626 .count {
618   - position: fixed;
  627 + /* position: fixed; */
619 628 display: flex;
620 629 height: 50rpx;
621   - border: 1rpx solid #000;
  630 + /* border: 1rpx solid #000; */
622 631 font-size: 28rpx;
623 632 right: 30rpx;
624 633 }
... ... @@ -636,11 +645,29 @@ border-radius: 0 56rpx 55rpx 0;
636 645 }
637 646 .spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;}
638 647 .sub {
639   - border-right: 1px solid #000;
  648 + /* border-right: 1px solid #000; */
  649 +}
  650 +.sub.active {
  651 + /* background-color: #ddd; */
  652 + color: #ccc;
  653 +}
  654 +
  655 +.sub, .add, .count>input {
  656 + /* border-right: 1px solid #000; */
  657 + background-color: #f8f8f8;
  658 + border-radius: 8rpx;
  659 +}
  660 +.sub.active {
  661 + /* background-color: #ddd; */
  662 + color: #ccc;
  663 +}
  664 +.count>input {
  665 + margin: 0 10rpx;
  666 + line-height: normal;
640 667 }
641 668  
642 669 .add {
643   - border-left: 1px solid #000;
  670 + /* border-left: 1px solid #000; */
644 671 }
645 672  
646 673 .spec-btn {
... ... @@ -662,14 +689,15 @@ border-radius: 0 56rpx 55rpx 0;
662 689 }
663 690  
664 691 .spec-cart-btns {
665   - width: 92%;
  692 + /* width: 92%; */
666 693 line-height: 70rpx;
667   - margin: 20rpx auto;
668   - /* margin-top: 160rpx; */
669   - border-radius: 20rpx;
670   -/* position: fixed;
671   -bottom: 50rpx;
672   -left: 4%; */
  694 + /* margin: 0rpx auto;
  695 + margin-top: 160rpx; */
  696 + /* border-radius: 20rpx; */
  697 +/* position: fixed; */
  698 +/* bottom: 50rpx; */
  699 +/* left: 4%; */
  700 + padding: 20rpx;
673 701 }
674 702  
675 703 .spec-cart-btn {
... ... @@ -763,8 +791,8 @@ left:31rpx;}
763 791 /*------拼单------*/
764 792 .pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx}
765 793 .pt_view .secondkill-img{width: 100%;height: 100%;}
766   -.pt_fir{ background: #fff;margin-bottom: 10rpx; }
767   -.pt_fir .pt_fir_title{display: flex; align-items: center; margin-left: 10rpx; margin-top: 20rpx; font-size: 28rpx; position: relative;}
  794 +.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */}
  795 +.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;}
768 796 .pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx;
769 797 height: 40rpx; font-size: 24rpx; text-align: center;}
770 798 .pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;}
... ... @@ -786,7 +814,7 @@ left:31rpx;}
786 814 .t_gz{padding: 10rpx 20rpx; font-size:28rpx }
787 815  
788 816 .pt_fir.se1{height: auto; margin: 0}
789   -.pt_fir.se2{height: auto; margin: 0;border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee;}
  817 +.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */}
790 818  
791 819 .pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx;
792 820 border-bottom: 1rpx solid #E5E5E5 }
... ... @@ -808,14 +836,14 @@ left:31rpx;}
808 836 .pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx}
809 837 .pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid}
810 838  
811   -.jie_price{padding: 10rpx 30rpx;}
  839 +.jie_price{/* padding: 10rpx 30rpx; */}
812 840 .jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx}
813 841 .price_list{display: flex; width: 100%;}
814 842 .price_item{width: 25%;font-size: 28rpx; color: #4c336c}
815 843  
816   -.pt_fir.se2 .zzk-1{margin-top: 23rpx; font-size: 30rpx;position: relative; margin-bottom: 30rpx; border-left:4rpx solid red;margin-left:14rpx;height:30rpx;line-height:30rpx;padding-left:5rpx;}
817   -.ckgd{position: absolute;top:0;right:57rpx; color:#d70025; font-size: 32rpx;}
818   -.ckgd .arrow-one{width:18rpx;height:18rpx;border-color:#da0b31;margin-top:5rpx;}
  844 +.pt_fir.se2 .zzk-1{/* margin-top: 23rpx; */ font-size: 30rpx;position: relative; /* margin-bottom: 30rpx; */ border-left:4rpx solid red;/* margin-left:14rpx; */height:30rpx;line-height:30rpx;/* padding-left:5rpx; */}
  845 +.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;}
  846 +.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;}
819 847 .bview{
820 848 position: fixed; top:0; left:0; width: 100%; height: 100%;
821 849 background-color: rgba(0, 0, 0, 0.5);
... ... @@ -842,65 +870,71 @@ left:31rpx;}
842 870  
843 871 /*---多少人参加团--*/
844 872 .group {
845   - padding-top:25rpx;
846   - width: 91%;
847   - min-height: 92rpx;
848   - border-bottom:2rpx solid #eee;
849   - padding-bottom:25rpx;
  873 + padding-top:20rpx;
  874 + padding-bottom:20rpx;
  875 + width: 100%;
  876 + /* min-height: 92rpx; */
  877 + border-bottom: 2rpx solid #ebedf0;
850 878  
851 879 }
852 880  
853 881 .group .group-list {
854   -
855   - height: 90rpx;
856   - padding: 0 130rpx 0 100rpx;
857   - width: 470rpx;
  882 + display: flex;
  883 + align-items: center;
  884 + justify-content: space-around;
  885 + /* height: 90rpx; */
  886 + /* padding: 0 130rpx 0 100rpx; */
  887 + /* width: 470rpx;
858 888  
859   - position: absolute;
  889 + position: absolute; */
860 890 }
861 891  
862 892 .group .group-list .gtou {
863   - width: 80rpx;
864   - height: 80rpx;
865   - float: left;
  893 + width: 70rpx;
  894 + height: 70rpx;
  895 + /* float: left;
866 896 position: relative;
867 897 top: 6rpx;
868   - left: -96rpx;
  898 + left: -96rpx; */
869 899 }
870 900  
871 901 .group .group-list .gtou image {
872   - width: 80rpx;
873   - height: 80rpx;
874   - border-radius: 200rpx;
875   - background-color: green;
  902 + display: block;
  903 + width: 100%;
  904 + height: 100%;
  905 + border-radius: 50%;
  906 + background-color: #f0f0f0;
876 907 }
877 908  
878 909 .group .group-list .gdn {
879   - float: left;
  910 + width: 140rpx;
  911 + text-align: center;
  912 + /* float: left; */
880 913 font-size: 26rpx;
881   - line-height: 48rpx;
  914 + /* padding-left: 20rpx; */
  915 + /* line-height: 48rpx;
882 916 height: 48rpx;
883 917 width: 168rpx;
884 918 position: relative;
885 919 left: -80rpx;
886   - top:20rpx;
887   - font-weight:600;
  920 + top:20rpx; */
  921 + font-weight:bold;
888 922 }
889 923  
890 924 .group .group-list .ghaicha {
891   - width:300rpx;
  925 + /* width:300rpx; */
892 926 font-size: 27rpx;
893   - margin-left:180rpx;
  927 + /* margin-left:180rpx;
894 928 top:13rpx;
895   - left:-3rpx;
896   - font-weight:600;
  929 + left:-3rpx; */
  930 + font-weight: bold;
897 931  
898 932  
899 933 }
900 934  
901 935 .group .group-list .ghaicha .gred {
902   - height: 48rpx;
903   - width: 300rpx;
  936 + /* height: 48rpx;
  937 + width: 300rpx; */
904 938 }
905 939  
906 940 .gsj {
... ... @@ -911,9 +945,9 @@ left:31rpx;}
911 945 .group .group-list .cjt {
912 946 height:42rpx;
913 947 width: 137rpx;
914   - position: absolute;
  948 + /* position: absolute;
915 949 right: 4rpx;
916   - top:25rpx;
  950 + top:25rpx; */
917 951 line-height: 42rpx;
918 952 font-size: 24rpx;
919 953 color: #fff;
... ... @@ -926,7 +960,7 @@ left:31rpx;}
926 960 .gbody {
927 961 background-color: white;
928 962 }
929   -.t_show{overflow: hidden; display: flex; width: 300rpx; color: #292929; line-height: 36rpx;font-size:26rpx;
  963 +.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx;
930 964 }
931 965 .join-cart>view.set_width {
932 966 width:58%;
... ... @@ -955,8 +989,8 @@ left:31rpx;}
955 989 white-space:nowrap;
956 990 }
957 991  
958   -.tuwen_title{ height: 86rpx; background-color:#eeeeee; margin-bottom: 32rpx; position: relative;
959   - display: flex; justify-content: center;align-items: center; }
  992 +.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative;
  993 + display: flex; justify-content: center;align-items: center; padding: 20rpx;}
960 994  
961 995 .tuwen_title .g_line{
962 996 width:496rpx;
... ... @@ -968,27 +1002,28 @@ left:31rpx;}
968 1002 overflow: hidden; justify-content: center;align-items: center;
969 1003 }
970 1004 .tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx}
971   -.t_g_info{ margin: 0 34rpx;margin-bottom: 20rpx; display: flex; align-items: center }
  1005 +.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; }
972 1006 .red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; }
973 1007  
974   -.tb-l{ line-height: 96rpx;}
975   -.table_s{ border:#e4e4e4 1rpx solid; width: 682rpx; margin: 0 34rpx;font-size: 30rpx;}
976   -.tb_item{display: flex; height: 96rpx; border-bottom: 1rpx solid #e4e4e4 }
977   -.item_left{width: 214rpx; height: 100%; background: #f9f9f9 ;border-right:1rpx solid #e4e4e4} .item_left text{ margin-left: 44rpx;}
978   -.item_right{width: 468rpx; height: 100%; overflow : hidden;white-space:nowrap;
979   - text-overflow: ellipsis;}
980   -.item_right text{ margin-left: 66rpx;}
  1008 +.tb-l{ /* line-height: 96rpx; */}
  1009 +.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;}
  1010 +.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 }
  1011 +.item_left{width: 210rpx; height: 100%; box-sizing:border-box; text-align: center;padding: 20rpx; background: #f9f9f9 ;border-right:2rpx solid #e4e4e4} .item_left text{ /* margin-left: 44rpx; */}
  1012 +.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;}
  1013 +.item_right text{ /* margin-left: 66rpx; */}
981 1014  
982   -.bzfu_img{ width: 164rpx; height:34rpx; margin-right: 18rpx; margin-left: 12rpx }
983   - .bz_view{ height:100rpx; padding: 0 34rpx 0 13rpx; color: #333; font-size: 28rpx;
  1015 +.table_s .tb-l:last-child {border-bottom: none;}
  1016 +
  1017 +.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ }
  1018 + .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx;
984 1019 /* border-bottom: 3rpx solid #eee; */
985 1020 /* border-top: 3rpx solid #eee; */}
986   - .bz_view view{ width: 460rpx; max-height: 70rpx; overflow: hidden;}
  1021 + .bz_view view{ width: 460rpx; /* max-height: 70rpx; */ /* overflow: hidden; */}
987 1022  
988   -.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 0 34rpx; color: #333;
989   - font-size: 30rpx; height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx }
990   -.red_bb{ color: #d70026; min-width:158rpx;width: auto;}
991   -.bg_jj{ width: 18rpx; height:18rpx;
  1023 +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333;
  1024 + font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ }
  1025 +.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */}
  1026 +.bg_jj{ width: 14rpx; height:14rpx;
992 1027 border-top: 2rpx solid #d70026;
993 1028 border-right: 2rpx solid #d70026;
994 1029 transform: rotate(45deg);display:inline-block;
... ... @@ -999,6 +1034,7 @@ left:31rpx;}
999 1034 .bz-content {
1000 1035 flex-grow: 1;
1001 1036 text-align: justify;
  1037 + padding: 0 30rpx 0 20rpx;
1002 1038 }
1003 1039  
1004 1040 /* 顶部边框 */
... ... @@ -1199,20 +1235,23 @@ left:31rpx;}
1199 1235  
1200 1236 .xc_comment{
1201 1237 display: flex;
  1238 + justify-content: space-around;
1202 1239 width: 100%;
1203   - height: 42rpx;
1204   - padding-left: 34rpx;
  1240 + box-sizing: border-box;
  1241 + padding: 10rpx 20rpx;
  1242 + /* height: 42rpx;
  1243 + padding-left: 34rpx; */
1205 1244 color: #333;
1206 1245  
1207 1246 }
1208 1247 .xc_comment-have-pictures{
1209 1248 width: 153rpx;
1210   - height: 42rpx;
  1249 + /* height: 42rpx; */
1211 1250 line-height: 42rpx;
1212 1251 text-align: center;
1213 1252 background: #ffe3e2;
1214 1253 color: 28rpx;
1215   - border-radius:20rpx;
  1254 + border-radius:21rpx;
1216 1255 font-size: 24rpx;
1217 1256 }
1218 1257 .xc_comment-discuss{
... ... @@ -1229,22 +1268,25 @@ left:31rpx;}
1229 1268  
1230 1269 .xc_comment-detail{
1231 1270 display: flex;
1232   - margin-top: 40rpx;
1233   - width: 524rpx;
1234   - margin-left: 34rpx;
1235   - border-radius: 25rpx;
1236   - border: 2rpx solid #d6d4d5;
1237   - overflow: hidden;
  1271 + /* margin-top: 40rpx; */
  1272 + /* width: 524rpx; */
  1273 + /* margin-left: 34rpx; */
  1274 + border-radius: 24rpx;
  1275 + border: 2rpx solid #ebedf0;
  1276 + margin-left: 20rpx;
  1277 + box-sizing: border-box;
  1278 + /* overflow: hidden; */
1238 1279 }
1239 1280  
1240 1281 .xc_user-img{
1241   - border-radius:50%;
  1282 + border-radius:50%;
  1283 + margin: auto 0;
1242 1284 }
1243 1285  
1244 1286 .xc_comment-user{
1245 1287 display: flex;
1246   - margin-top: 22rpx;
1247   - margin-left: 22rpx;
  1288 + /* margin-top: 22rpx;
  1289 + margin-left: 22rpx; */
1248 1290 }
1249 1291 .xc_user{
1250 1292 width: 170rpx;
... ... @@ -1252,34 +1294,34 @@ left:31rpx;}
1252 1294 margin-left: 6rpx;
1253 1295 overflow: hidden;
1254 1296 }
1255   -.xc_user-name{ height: 25rpx;}
  1297 +.xc_user-name{ /* height: 25rpx; */}
1256 1298 .xc_comment-img{
1257 1299 width: 22rpx;
1258 1300 height: 22rpx;
1259   - margin-top: 14rpx;
  1301 + /* margin-top: 14rpx; */
1260 1302 margin-right: 5rpx
1261 1303 }
1262 1304 .xc_comment-font{
1263   - height: 75rpx;
1264   - margin-left: 22rpx;
  1305 + /* height: 75rpx; */
  1306 + /* margin-left: 22rpx; */
1265 1307 white-space:normal;
1266 1308 overflow: hidden;
1267   - margin-top: 8rpx;
1268   - line-height: 38rpx;
  1309 + /* margin-top: 8rpx;
  1310 + line-height: 38rpx; */
1269 1311  
1270 1312 }
1271 1313 .xc_comment-val{
1272   - width: 88%;
  1314 + /* width: 88%;
1273 1315 height: 30rpx;
1274 1316 margin-left: 22rpx;
1275 1317 display: flex;
1276 1318 margin-top: 15rpx;
1277   - margin-bottom:15rpx;
  1319 + margin-bottom:15rpx; */
1278 1320 }
1279 1321  
1280 1322 .xc_comment-time{
1281   - height: 30rpx;
1282   - font-size: 24rpx;
  1323 + /* height: 30rpx; */
  1324 + font-size: 22rpx;
1283 1325 color: #a5a5a5;
1284 1326 overflow: hidden;
1285 1327 }
... ... @@ -1290,14 +1332,17 @@ left:31rpx;}
1290 1332 .xc_comment-left{
1291 1333 display:inline-block;
1292 1334 width: 312rpx;
  1335 + padding: 20rpx;
1293 1336 }
1294 1337 .xc_goods-img-frame{
1295   - display:inline-block;
1296   - width: 40%;
  1338 + border-radius: 0 22rpx 22rpx 0;
  1339 + overflow: hidden;
  1340 + /* display:inline-block; */
  1341 + /* width: 40%;
1297 1342 height: 90%;
1298 1343 text-align: center;
1299 1344 padding-top: 30rpx;
1300   - vertical-align: top;
  1345 + vertical-align: top; */
1301 1346 }
1302 1347 .xc_imgs{
1303 1348 width: 50rpx;
... ... @@ -1308,11 +1353,13 @@ left:31rpx;}
1308 1353  
1309 1354 .pj_word_size{ font-size: 28rpx}
1310 1355 .pj_scroll{
1311   - white-space: nowrap;
  1356 + /* white-space: nowrap; */
1312 1357 /* height: 324rpx; */
1313   - margin-bottom: 50rpx;
  1358 + /* margin-bottom: 50rpx; */
1314 1359 display: flex;
1315 1360 align-items: center;
  1361 + padding: 20rpx 0;
  1362 + /* box-sizing: border-box; */
1316 1363 /* box-shadow: 0 8px 12px #e7e9eb; */
1317 1364 }
1318 1365  
... ... @@ -1326,57 +1373,61 @@ left:31rpx;}
1326 1373 }
1327 1374 .cx-frame{
1328 1375 /* border-top:3rpx solid #eee; */
1329   - width:99%;
  1376 + /* width:99%;
1330 1377 height: 95rpx;
1331 1378 line-height: 95rpx;
1332   - padding-left:24rpx;
1333   -
1334   -
  1379 + padding-left:24rpx; */
  1380 + padding: 20rpx;
1335 1381 }
1336 1382 .cx-frame .cx-sizs{
1337   - width: 68rpx;
1338   - height: 100%;
1339   - line-height: 100rpx;
1340   - overflow: hidden;
1341   - margin-left: 10rpx;
  1383 + /* width: 68rpx; */
  1384 + /* height: 100%; */
  1385 + /* line-height: 100rpx; */
  1386 + /* overflow: hidden; */
  1387 + /* margin-left: 10rpx; */
1342 1388 }
1343 1389 .xc-coupon-fram{
1344 1390 position: relative;
1345   - width:200rpx;
1346   - padding-top:30rpx;
  1391 + margin-right: 16rpx;
  1392 + /* width:200rpx; */
  1393 + /* padding-top:30rpx; */
1347 1394  
1348 1395 }
1349 1396 .xc-coupon-fram .xc-coupon{
1350   - width:175rpx ;
  1397 + /* width:175rpx ;
1351 1398 height: 40rpx;
1352   - line-height: 40rpx;
  1399 + line-height: 40rpx; */
1353 1400 background-color:#d60021 ;
1354   - margin:0 auto;
  1401 + /* margin:0 auto; */
1355 1402 color:#fff;
1356   -
  1403 + padding: 6rpx 20rpx;
1357 1404  
1358 1405 }
1359 1406 .xc-coupon-fram .xc-circular{
1360   - width: 22rpx;
1361   - height:22rpx;
1362   - background-color:#fff;
  1407 + width: 16rpx;
  1408 + height:16rpx;
  1409 + background-color: white;
1363 1410 position:absolute;
1364   - top: 40rpx;
  1411 + top: 50%;
  1412 + /* left: -10rpx; */
  1413 + transform: translateY(-50%);
1365 1414 }
1366 1415 .xc-coupon-fram .xc-one{
1367   - left:3rpx;
  1416 + left: -8rpx;
1368 1417 }
1369 1418 .xc-coupon-fram .xc-two{
1370   - left: 178rpx;
  1419 + right: -8rpx;
1371 1420 }
1372 1421  
1373 1422 .cx-obtain-coupon{
1374   - width: 65rpx;
  1423 + /* width: 65rpx;
1375 1424 height: 100%;
1376   - padding-left:15rpx;
  1425 + padding-left:15rpx; */
1377 1426 color: #d70025;
1378   - position: absolute;
1379   - right: 5rpx;
  1427 + display: flex;
  1428 + align-items: center;
  1429 + /* position: absolute;
  1430 + right: 5rpx; */
1380 1431 }
1381 1432  
1382 1433 /* 自定义弹出窗口 */
... ... @@ -1391,18 +1442,20 @@ left:31rpx;}
1391 1442 }
1392 1443  
1393 1444 .cx-popup .top{
1394   - width: 90%;
1395   - height:85rpx;
1396   - border-bottom: 4rpx solid #d5d5d5;
1397   - padding-top: 50rpx;
1398   - font-weight:600;
  1445 + /* width: 90%;
  1446 + height:85rpx; */
  1447 + font-size: 32rpx;
  1448 + padding: 20rpx 0;
  1449 + border-bottom: 2rpx solid #ebedf0;
  1450 + /* padding-top: 50rpx;
  1451 + font-weight:600; */
1399 1452  
1400 1453 }
1401 1454 .cx-popup .top-frame{
1402   - width: 100%;
  1455 + /* width: 100%;
1403 1456 display: flex;
1404 1457 justify-content: center;
1405   - overflow: hidden;
  1458 + overflow: hidden; */
1406 1459 }
1407 1460 .xc-valid-coupon{
1408 1461 width: 90%;
... ... @@ -1413,41 +1466,52 @@ left:31rpx;}
1413 1466 .xc-frame{
1414 1467 position: relative;
1415 1468 }
1416   -.xc-coupon-frame{
1417   - width: 90%;
  1469 +.xc-coupon-frame {
  1470 + width: 100%;
1418 1471 max-height: 560rpx;
1419 1472 overflow: auto;
1420 1473  
1421 1474 }
1422   -.xc-coupon-frame .coupon{
1423   - width:99%;
  1475 +.xc-coupon-frame .rel:not(:first-child) {
  1476 + margin-top: 20rpx;
  1477 +}
  1478 +.xc-coupon-frame .coupon {
  1479 + width:100%;
1424 1480 height: 168rpx;
1425 1481 border-radius: 25rpx;
1426   - border:3rpx solid #ffdcdc;
  1482 + border:2rpx solid #ffdcdc;
1427 1483 overflow: hidden;
1428   - margin-top:16rpx;
  1484 + /* margin-top:16rpx; */
  1485 + box-sizing: border-box;
1429 1486  
1430 1487 }
  1488 +/* .xc-coupon-frame .coupon ~ .coupon {
  1489 + margin-top:16rpx;
  1490 +} */
1431 1491 .xc-coupon-left{
1432 1492 width: 216rpx;
1433   - height: 100%;
  1493 + /* height: 100%; */
1434 1494 background-color: #ffeeef;
1435 1495 border-right: 4rpx dashed #ffdbd9;
1436 1496 overflow: hidden;
1437   - line-height: 100%;
1438   -
  1497 + /* line-height: 100%; */
  1498 + display: flex;
  1499 + flex-direction: column;
  1500 + justify-content: center;
  1501 + align-items: center;
  1502 + flex-shrink: 0;
1439 1503 }
1440 1504 .xc-money{
1441 1505 color: #f30026;
1442 1506 text-align:center;
1443 1507 }
1444 1508 .xc-rmb{
1445   - width:44rpx;
1446   - padding-top:7rpx;
  1509 + /* width:44rpx;
  1510 + padding-top:7rpx; */
1447 1511 }
1448 1512 .xc-money-frame{
1449   - margin-left:35rpx;
1450   - margin-top:48rpx;
  1513 + /* margin-left:35rpx;
  1514 + margin-top:48rpx; */
1451 1515  
1452 1516 }
1453 1517 .xc-spacing{
... ... @@ -1455,45 +1519,52 @@ left:31rpx;}
1455 1519 }
1456 1520 .xc-circular-one{
1457 1521 position: absolute;
1458   - top:-8rpx;
1459   - left:208rpx;
1460   - width: 27rpx;
  1522 + top:-15rpx;
  1523 + left:205rpx;
  1524 + width: 30rpx;
1461 1525 height: 30rpx;
1462 1526 background: #fff;
1463 1527 overflow: hidden;
1464 1528 }
1465 1529 .xc-circular-two{
1466 1530 position: absolute;
1467   - top:150rpx;
1468   - left:207rpx;
1469   - width: 27rpx;
  1531 + bottom: -15rpx;
  1532 + /* top:150rpx; */
  1533 + left:205rpx;
  1534 + width: 30rpx;
1470 1535 height:30rpx;
1471 1536 background: #fff;
1472 1537 }
1473 1538 .xc-detail-coupon{
1474   - margin-left: 22rpx;
  1539 + /* margin-left: 22rpx;
1475 1540 overflow: hidden;
1476   - padding-top: 43rpx;
1477   -
  1541 + padding-top: 43rpx; */
  1542 + /* display: flex;
  1543 + align-items: center; */
1478 1544 }
1479 1545 .xc-coupon-right{
1480   - width: 455rpx;
1481   - height: 100%;
  1546 + /* width: 455rpx;
  1547 + height: 100%; */
1482 1548 background: #fffaf9;
  1549 + padding: 20rpx;
  1550 + box-sizing: border-box;
  1551 + width: 100%;
  1552 + justify-content: space-between;
  1553 + align-items: center;
1483 1554 }
1484 1555 .xc-below{
1485   - margin-top:22rpx;
  1556 + margin-top:20rpx;
1486 1557  
1487 1558 }
1488 1559 .xc-get{
1489 1560  
1490   - width: 132rpx;
1491   - height: 48rpx;
  1561 + width: 140rpx;
  1562 + /* height: 48rpx; */
1492 1563 color: #fff;
1493 1564 text-align: center;
1494   - border-radius:20rpx;
1495   - line-height:48rpx;
1496   - margin-left:20rpx;
  1565 + border-radius:27rpx;
  1566 + line-height:54rpx;
  1567 + /* margin-left:20rpx; */
1497 1568 }
1498 1569  
1499 1570 .background{
... ... @@ -1511,16 +1582,19 @@ left:31rpx;}
1511 1582  
1512 1583 .cx-confirm{
1513 1584 width: 100%;
1514   - height: 160rpx;
  1585 + padding: 20rpx;
  1586 + box-sizing: border-box;
  1587 + /* height: 160rpx; */
1515 1588  
1516 1589 }
1517 1590 .cx-confirm .confirm{
1518   - width: 372rpx;
1519   - height: 60rpx;
1520   - background: #f40026;
  1591 + /* width: 372rpx;
  1592 + height: 60rpx; */
  1593 + background-color: #f40026;
1521 1594 color: #fff;
1522   - border-radius:20rpx;
1523   - line-height:60rpx;
  1595 + border-radius:10rpx;
  1596 + line-height: 80rpx;
  1597 + font-size: 28rpx;
1524 1598  
1525 1599 }
1526 1600  
... ... @@ -1531,17 +1605,21 @@ left:31rpx;}
1531 1605  
1532 1606  
1533 1607 /* 分享 */
  1608 +.icon-share {
  1609 + font-size: 46rpx;
  1610 + color: #d60021;
  1611 +}
1534 1612 .xc-share-frame{
1535   - width: 129rpx;
  1613 + /* width: 129rpx;
1536 1614 height: 48rpx;
1537 1615 border-top-left-radius: 18rpx;
1538   - border-bottom-left-radius: 18rpx;
1539   - background: #d60021;
1540   - position:absolute;
  1616 + border-bottom-left-radius: 18rpx; */
  1617 + /* background: #d60021; */
  1618 + /* position:absolute;
1541 1619 left:622rpx;
1542 1620 top:-37rpx;
1543 1621 line-height:50rpx;
1544   - margin-top:52rpx;
  1622 + margin-top:52rpx; */
1545 1623 }
1546 1624 .xc-share-frame-jieti{
1547 1625 width: 129rpx;
... ... @@ -1559,6 +1637,7 @@ left:31rpx;}
1559 1637  
1560 1638 }
1561 1639  
  1640 +
1562 1641 .xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{
1563 1642 width: 30rpx;
1564 1643 height: 30rpx;
... ... @@ -1779,10 +1858,10 @@ xc-ensure-div{
1779 1858 padding-top: 24rpx;
1780 1859 overflow: hidden;
1781 1860 }
1782   -.xc-frame{
1783   - width: 100%;
1784   - margin-top:20rpx;
1785   -
  1861 +.xc-frame {
  1862 + /* width: 100%;
  1863 + margin-top:20rpx; */
  1864 + padding: 20rpx;
1786 1865 }
1787 1866  
1788 1867 .xc-frame .list-frame{
... ... @@ -1817,7 +1896,7 @@ xc-ensure-div{
1817 1896 }
1818 1897  
1819 1898 .xc-money-frame{
1820   - margin-left:35rpx;
  1899 + /* margin-left:35rpx; */
1821 1900  
1822 1901 }
1823 1902 .xc-coupon-effect{
... ... @@ -1952,11 +2031,11 @@ xc-ensure-div{
1952 2031 }
1953 2032  
1954 2033 .xc-video{
1955   - width:100rpx;
1956   - height: 50rpx;
1957   - line-height: 50rpx;
  2034 + /* width:100rpx; */
  2035 + /* height: 50rpx;
  2036 + line-height: 50rpx; */
1958 2037 text-align: center;
1959   - margin-left:-30rpx;
  2038 + /* margin-left:-30rpx; */
1960 2039  
1961 2040  
1962 2041 }
... ... @@ -2030,7 +2109,7 @@ xc-ensure-div{
2030 2109  
2031 2110  
2032 2111 .wsize{font-size: 32rpx}
2033   -.five-level-word{font-size: 28rpx;}
  2112 +.five-level-word{font-size: 24rpx;}
2034 2113  
2035 2114  
2036 2115 /*-- 推荐商品 --*/
... ... @@ -2103,13 +2182,13 @@ padding-left:24rpx;
2103 2182  
2104 2183 .xc-linellae-frame{
2105 2184 width: 100%;
2106   - height: 60rpx;
  2185 + height: 80rpx;
2107 2186 background: #f2f2f2;
2108 2187 }
2109 2188 .xc-linellae-frame .xc-linellae{
2110 2189 width: 386rpx;
2111 2190 height: 1rpx;
2112   - border-bottom: 1rpx solid #a5a5a5;
  2191 + border-bottom: 1rpx solid #ebedf0;
2113 2192 }
2114 2193 .xc-recommend-frame{
2115 2194 background:#f2f2f2;
... ... @@ -2132,7 +2211,8 @@ margin-top: 1rpx;
2132 2211 }
2133 2212 .xc-price-frame{
2134 2213 color: #ec0022;
2135   -height:44rpx;
  2214 + align-items: baseline;
  2215 +/* height:44rpx; */
2136 2216 }
2137 2217 .xc-price-frame .sign{
2138 2218 margin-top:19rpx;
... ... @@ -2163,6 +2243,9 @@ padding-left:-4rpx;
2163 2243 .xc-explain{
2164 2244 color:#292929;
2165 2245 width:542rpx;
  2246 + margin: 10rpx 0 20rpx;
  2247 + width: 100%;
  2248 + font-weight: bold;
2166 2249 }
2167 2250 .xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;}
2168 2251 .xc-item .yuan{
... ... @@ -2268,15 +2351,16 @@ margin-top:5rpx;
2268 2351 }
2269 2352 .xc-goods-explain{
2270 2353 width:100%;
2271   - padding-left:30rpx;
  2354 + /* padding-left:30rpx;
2272 2355 margin-left:-9rpx;
2273   - height: 150rpx
  2356 + height: 150rpx */
2274 2357 }
2275 2358 .xc-partner-frame{
2276 2359 border-bottom:2rpx solid #eee;
2277 2360 width:100%;
2278   -padding:0 20rpx;
2279   -height:56rpx;
  2361 +padding:20rpx;
  2362 +/* height:56rpx; */
  2363 +box-sizing: border-box;
2280 2364 }
2281 2365 .xc-person-number{
2282 2366 width:120rpx;
... ... @@ -2298,41 +2382,43 @@ right:17rpx; top:55rpx;
2298 2382 /* border-top:1rpx solid #eee; */
2299 2383 width: 100%;
2300 2384 height: auto;
  2385 + padding: 20rpx;
  2386 + box-sizing: border-box;
2301 2387 }
2302 2388 .on_height{
2303 2389 height: 90rpx;
2304 2390 }
2305 2391 .sn_height{
2306   - min-height: 170rpx; height: auto;padding: 10rpx 0;
  2392 + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */
2307 2393 }
2308 2394 .xc-address_frame .address_frame{
2309   - width: 92%;
2310   -padding-left: 10rpx;
2311   -margin: auto;
  2395 + width: 100%;
  2396 +/* padding-left: 10rpx;
  2397 +margin: auto; */
2312 2398  
2313 2399 }
2314 2400 .shop_name{
2315 2401  
2316 2402 }
2317 2403 .stores-img{
2318   -width: 40rpx;
2319   - height: 35rpx;
  2404 + width: 28rpx;
  2405 + height: 28rpx;
2320 2406 margin-right: 10rpx;
2321 2407 }
2322 2408 .shop_name{
2323 2409 margin-right: 10rpx;
2324 2410 }
2325 2411 .address{
2326   - width: 87%;
  2412 + /* width: 100%;
2327 2413 margin-top: 5rpx;
2328   - margin-bottom: 5rpx;
  2414 + margin-bottom: 5rpx; */
2329 2415 }
2330 2416 .distance{
2331   - padding-left: 15rpx;
2332   - padding-right: 15rpx;
  2417 + padding-left: 20rpx;
  2418 + padding-right: 20rpx;
2333 2419 background: #eee;
2334 2420 border-radius: 20rpx;
2335   - margin-right: 5rpx;
  2421 + /* margin-right: 5rpx; */
2336 2422 color: #999;
2337 2423 height: 38rpx;
2338 2424 line-height: 38rpx;
... ... @@ -2518,8 +2604,8 @@ margin-top: 10rpx;
2518 2604 }
2519 2605 .xc-goods-attribute{
2520 2606 border-bottom: 1px solid #eee;
2521   -padding-bottom: 15px;
2522   -margin-bottom:40rpx;
  2607 +padding-bottom: 20rpx;
  2608 +/* margin-bottom:40rpx; */
2523 2609 }
2524 2610 .xc-val-fream{
2525 2611 width: 105rpx;
... ... @@ -2546,11 +2632,11 @@ border-radius: 55rpx;
2546 2632 .s_btn{ margin-top: 25rpx; }
2547 2633 /* 美妆价的样式 */
2548 2634 .beauty-makeup-frame{
2549   - width: 101.5%;
2550   - margin: auto;
  2635 + /* width: 101.5%;
  2636 + margin: auto; */
2551 2637 height: 120rpx;
2552 2638 border-radius: 15rpx;
2553   - margin-top: 18px;
  2639 + margin-top: 10px;
2554 2640  
2555 2641 }
2556 2642 .beauty-makeup-frame .left{
... ... @@ -2558,11 +2644,12 @@ border-radius: 55rpx;
2558 2644 height: 100%;
2559 2645 background:#f7f7f7;
2560 2646 border-radius: 20rpx 0rpx 0rpx 20rpx;
2561   - padding-left: 20rpx;
  2647 + /* padding: 0 10rpx; */
2562 2648 }
2563 2649 .card-frame{
2564   - margin-top: 0rpx; padding-right: 23rpx;
2565   - margin-right: 15rpx;
  2650 + margin-top: 0rpx;
  2651 + /* padding-right: 23rpx;
  2652 + margin-right: 15rpx; */
2566 2653 }
2567 2654 .advert-card{
2568 2655 margin-top: 0rpx!important;
... ... @@ -2576,13 +2663,13 @@ border-radius: 55rpx;
2576 2663 }
2577 2664 .grade-card-frame{
2578 2665  
2579   - height:45rpx ;
  2666 + /* height:45rpx ; */
2580 2667 background: #3c300a;
2581 2668 border-radius: 20rpx;
2582   - margin-top: 10px;
2583   - margin-left: 7rpx;
  2669 + /* margin-top: 10px;
  2670 + margin-left: 7rpx; */
2584 2671 justify-content: center;
2585   - padding: 0 15rpx;
  2672 + padding: 4rpx 12rpx;
2586 2673 }
2587 2674 .grade-card-frame .img{
2588 2675 width: 24rpx;
... ... @@ -2596,7 +2683,7 @@ border-radius: 55rpx;
2596 2683 max-width: 165rpx;
2597 2684 }
2598 2685 .card-effect{
2599   - margin-left: 15rpx;
  2686 + /* margin-left: 15rpx; */
2600 2687 }
2601 2688 .at_once_carde{
2602 2689 width:65rpx;
... ... @@ -2620,22 +2707,23 @@ button.custom-service::after{
2620 2707 border: 0;
2621 2708 }
2622 2709 .no_store{color:#d60021; font-size: 26rpx;}
2623   -.cx_show_view{ width: 580rpx; line-height: 30rpx; margin-bottom: 6rpx; }
  2710 +.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ }
2624 2711 .cx_show_view .word{ width: 400rpx}
2625 2712 .prom_condition {
2626 2713 color: #d60021;
2627   - width: 180rpx;
2628   - height: 30rpx;
  2714 + /* width: 180rpx; */
  2715 + /* height: 30rpx; */
2629 2716 font-size: 20rpx;
2630   - padding-top: 0.01rpx;
2631   - display: flex;
  2717 + /* padding-top: 0.01rpx; */
  2718 + /* display: flex;
2632 2719 justify-content: center;
2633   - align-items: center;
2634   - border: #d60021 solid 1rpx;
  2720 + align-items: center; */
  2721 + border: 2rpx solid #d60021;
2635 2722 border-radius: 10rpx;
2636 2723 margin-right:10rpx ;
2637   - margin-left: 10rpx;
2638   -
  2724 + /* margin-left: 10rpx; */
  2725 + font-size: 24rpx;
  2726 + padding: 0 10rpx;
2639 2727 }
2640 2728 .hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx}
2641 2729 .order_hui{color: #444; width: 420rpx}
... ... @@ -2733,4 +2821,25 @@ button.custom-service::after{
2733 2821 .quan_price{
2734 2822 background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx;
2735 2823 }
2736   -.stock{ width: 25%; height: 60rpx; border: 1rpx solid #eee; text-align: center; line-height: 60rpx;}
2737 2824 \ No newline at end of file
  2825 +
  2826 +/*--闪白屏--*/
  2827 +.g_img_box{
  2828 + background-position: center center;
  2829 + background-repeat: no-repeat;
  2830 + -webkit-background-size: cover;
  2831 + -moz-background-size: cover;
  2832 + background-size: cover;
  2833 +}
  2834 +
  2835 +
  2836 +
  2837 +.arrow {
  2838 + width: auto !important;
  2839 + position: absolute;
  2840 + right: 0;
  2841 + top: 10rpx;
  2842 +}
  2843 +
  2844 +.stock {
  2845 + flex: 1;
  2846 +}
2738 2847 \ No newline at end of file
... ...
packageA/pages/jfbuy/jfbuy.wxml
... ... @@ -51,8 +51,8 @@
51 51 <text>{{item.integral}}积分 + ¥{{item.addmoney}}</text>
52 52 </view>
53 53 <view class="pdt14 fs22 gray flex jc_sb">
54   - <view>零售价:¥{{item.shop_price}}</view>
55   - <view>销量:{{item.sales_sum}}</view>
  54 + <view>零售价:¥{{item.market_price}}</view>
  55 + <view>销量:{{item.buy_num}}</view>
56 56 </view>
57 57 </view>
58 58 </view>
... ...
packageA/pages/my_service2/appment_main.js
... ... @@ -3,6 +3,8 @@ var e = getApp(),
3 3 os = a,
4 4 t = e.request,
5 5 d = e.globalData;
  6 + var ut = require("../../../utils/util.js");
  7 +
6 8 Page({
7 9 /**
8 10 * 页面的初始数据
... ... @@ -11,21 +13,17 @@ Page({
11 13 inurl: a.url, //接口网址
12 14 iurl: a.imghost, //服务器网址
13 15 store: 0, //是否显示服务门店列表
14   - beautician: 0, //是否显示美容师列表
15   - beautician_name: "", //选中的美容师名称
16   - beauticianID: "", //美容师id
17   - bea_index: "", //美容师列表下标
  16 +
18 17 placeholder: "填写备注", //备注为空的placeholder
19 18 store_list: [], //门店列表
20   - beautician_list: [], //美容师列表
21   - store_name: "", //选择的服务门店
  19 +
  20 + store_name: "", //选择的服务门店
22 21 fir_pick_index: 0, //选择的门店下标
23 22 curpage: 1, //当前分页数
24 23 pageSize: 8, //页大小
25 24 total: 0,
26 25 ismore: 0, //是否加载完毕
27   - itemId: "", //服务id
28   - project_id: "", //项目id
  26 +
29 27 isScroll: true, //scroll-y是否可以滑动
30 28 key_word: "", //是否按门店文字查询
31 29 is_service_read: 0, //是否调用过门店接口
... ... @@ -34,8 +32,7 @@ Page({
34 32 remarks: "", //备注
35 33 storageId: "", //线下门店id
36 34 url: "/packageA/pages/my_service/appment_main", //本页面地址路径用于选择时间页面跳转回来
37   - buyType: "", //项目类型
38   - time: "", //选择预约时间
  35 +
39 36 tment_count: "", //可预约人数
40 37 lat: "", //纬度坐标
41 38 lon: "", //经度坐标
... ... @@ -44,19 +41,22 @@ Page({
44 41 is_sub: 0, //判断是否重复提交
45 42 is_textea: 1, //备注是否是可输入
46 43  
47   - // 拖拽参数
48   - writePosition: [], //默认定位参数
49   - writesize: [0, 0],// X Y 定位
50   - window: [0, 0], //屏幕尺寸
51   - write: [0, 0], //定位参数
52   - scrolltop: 0,//据顶部距离
53   - v:{},
54   -
55   - project: ['项目1', '项目2', '项目3', '项目4', '项目5', '项目6', '项目7'],
56   - md: [{name:'美导1',time:'08:30-22:00'},{name:'美导2',time:'09:30-18:00'},],
57   - timeList: [],
58   - deltaX: 0,
59   - col_arr:[],
  44 + write: [0, 0], //定位参数
  45 + scrolltop: 0,//据顶部距离
  46 + v:{},
  47 +
  48 + //project: ['项目1', '项目2', '项目3', '项目4', '项目5', '项目6', '项目7'],
  49 + //md: [{name:'美导1',time:'08:30-22:00'},{name:'美导2',time:'09:30-18:00'},],
  50 + timeList: [],
  51 + deltaX: 0,
  52 + col_arr:[],
  53 + wp:[],
  54 + datet:null,
  55 + s_top:0,
  56 +
  57 + cur_sele_i:-1,
  58 + cur_sele_j:-1
  59 +
60 60 },
61 61 //控制备注输入
62 62 check_text: function() {
... ... @@ -67,6 +67,7 @@ Page({
67 67 beautician: 0
68 68 })
69 69 },
  70 +
70 71 onclickstore: function() {
71 72 var th = this;
72 73 var store = th.data.store;
... ... @@ -85,6 +86,8 @@ Page({
85 86 wx.showLoading({
86 87 title: '加载中',
87 88 })
  89 +
  90 + //获取门店
88 91 th.query_store();
89 92 }
90 93 }
... ... @@ -96,104 +99,82 @@ Page({
96 99 remarks: remarks
97 100 })
98 101 },
99   - //提交成功及发送模版代码
  102 +
  103 +
  104 + //单个预约的提交成功及发送模版代码
100 105 success: function() {
  106 + var user_id=getApp().globalData.userInfo.user_id;
  107 + wx.showLoading({ title: '加载中', });
101 108 var th = this;
102 109 var store = th.data.store_name; //门店名称
103   - var bea_name = th.data.beautician_name; //美容师名称
104   - var time = th.data.time; //预约时间
105   - var is_sub = th.data.is_sub; //是否重复提交
106   - var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/insert"; //接口路径
107   - var serviceId = th.data.itemId; //服务id
108   - var beauticianID = th.data.beauticianID; //美容师id
109   - var buyType = th.data.buyType; //服务项目类型
110   - var storeId = a.stoid; //商家id
111   - var storageId = th.data.storageId; //门店id
112   - var userId = th.data.options.userid; //用户id
113   - var remarks = th.data.remarks; //用户备注
114   - var project_id = th.data.project_id; //项目id
115   - var validay = th.data.validay;
116   - var json = {
117   - "arrangeTime": time + ":00",
118   - "beauticianId": beauticianID,
119   - "buyType": buyType,
120   - "effectiveDay": "",
121   - "number": "",
122   - "projectId": project_id,
123   - "remark": remarks,
124   - "serviceId": serviceId,
125   - "states": 0,
126   - "storageId": storageId,
127   - "storeId": storeId,
128   - "userId": userId,
129   - "validay": validay,
130   - "isxz": 1
131   -
132   - }
133   - var data = JSON.stringify(json);
  110 + var datet = th.data.datet; //预约时间
  111 + //接口路径
  112 + var url = th.data.inurl + "/api/weshop/marketing/reservation/reservation/batchinsert";
  113 + var req_arr={
  114 + "storageId": th.data.storageId,
  115 + "storeId": a.stoid,
  116 + "userId": user_id,
  117 + "remark": '',
  118 + "isxz": 1,
  119 + "states": 0,
  120 + "list":[]
  121 + };
  122 + for(var i in this.data.v){
  123 + for(var j in this.data.v[i]){
  124 + var item=this.data.v[i][j];
  125 + var md=this.data.md[i];
  126 + var tn=this.data.timeArr[j];
  127 + var json = {
  128 + "arrangeTime":datet+' '+ tn + ":00",
  129 + "beauticianId":encodeURIComponent(md.staffid) ,
  130 + "buyType": item.BuyType,
  131 + //"effectiveDay": "",
  132 + //"number": "",
  133 + "projectId": item.ProjectID,
  134 + "serviceId": item.ServiceID,
  135 + "validay": item.Validay,
  136 + }
  137 + req_arr.list.push(json);
  138 + }
  139 + }
  140 + console.log(req_arr);
  141 + //return false;
  142 + var js_data = JSON.stringify(req_arr);
134 143 wx.request({
135 144 url: url,
136   - data: json,
  145 + data: js_data,
137 146 method: 'post',
138 147 header: {
139 148 'content-type': 'application/json'
140 149 }, // 设置请求的 header
141 150 success: function(res) {
142   - th.setData({
143   - is_sub: 0
144   - })
  151 + th.setData({ is_sub: 0})
145 152 wx.hideLoading();
146 153 if (res.data.code == 0) {
147   - getApp().my_warnning("预约成功", 1, th);
148   - // var store_name = th.data.store_name; //预约门店
149   - var number = res.data.data.Number;
150   - // var temp_url = "/api/wx/open/app/user/sendSubscribeMsg"; //模版接口
151   - //var userinfo = getApp().globalData.userInfo;
152   - //var name = d.userInfo.nickname;
153   - // var json = {
154   - // // "formId": formid,
155   - // "keyWord": [{
156   - // "keyword": res.data.data.ServiceName
157   - // },
158   - // {
159   - // "keyword": time.substring(0, 16)
160   - // }, {
161   - // "keyword": res.data.data.BeauticianName
162   - // }, {
163   - // "keyword": res.data.data.StorageName
164   - // }, {
165   - // "keyword": res.data.data.Address
166   - // }
167   - // ],
168   - // "page": "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid,
169   - // "storeId": a.stoid,
170   - // "typeId": "1011",
171   - // "userId": th.data.options.userid
172   - // };
173   - // var data = JSON.stringify(json);
174   - // //调用发送预约成功模版接口
175   - // wx.request({
176   - // url: th.data.inurl + temp_url,
177   - // data: data,
178   - // method: 'post',
179   - // header: {
180   - // 'content-type': 'application/json'
181   - // }, // 设置请求的 header
182   - // success: function(data) {}
183   - // })
184   -
185   - wx.redirectTo({
186   - url: "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+th.data.options.userid,
187   - });
188   -
  154 + getApp().my_warnning("预约成功", 1, th);
  155 +
  156 + if(res.data.data.length>1){
  157 + var number = res.data.data[0].Number;
  158 + wx.redirectTo({
  159 + url: "/packageA/pages/my_service/tment_order_list?number=" + number+"&userid="+user_id,
  160 + });
  161 +
  162 + }else{
  163 + var number = res.data.data[0].Number;
  164 + wx.redirectTo({
  165 + url: "/packageA/pages/my_service/tment_details?number=" + number+"&userid="+user_id,
  166 + });
  167 + }
  168 +
189 169 } else {
190 170 getApp().my_warnning(res.data.msg, 0, th);
191 171 th.settime();
192 172 }
193 173 }
194 174 })
195   -
196 175 },
  176 +
  177 +
197 178 //定时显示texteat
198 179 settime: function() {
199 180 var th = this;
... ... @@ -203,141 +184,59 @@ Page({
203 184 })
204 185 }, 2000);
205 186 },
206   - //提交预约
  187 +
  188 +
  189 + //-- 提交预约 --
207 190 sub_success: function(e) {
208 191 var th = this;
209   - var temp_url = th.data.inurl + "/api/wx/weappSendlist/page";
  192 + //和推送消息有关系
  193 + var temp_url = th.data.inurl + "/api/wx/weappSendlist/page";
210 194 var template_id = "";
211   - if (th.data.is_sub == 1) {
212   - return false;
213   - }
214   - var store = th.data.store_name; //门店名称
215   - var bea_name = th.data.beautician_name; //美容师名称
216   - var time = th.data.time; //预约时间
217   - var is_sub = th.data.is_sub; //是否重复提交
218   - th.setData({
219   - is_textea: 0,
220   - is_sub: 1
221   - })
  195 +
  196 + //门店名称
  197 + var store = th.data.store_name;
222 198 //提交预约前的判断
223 199 if (store == "") {
224   - getApp().my_warnning("请选择服务门店", 0, th);
225   - th.setData({
226   - is_sub: 0
227   - })
228   - th.settime();
229   - return false;
230   - } else if (bea_name == "") {
231   - getApp().my_warnning("请选择美容师", 0, th);
232   - th.setData({
233   - is_sub: 0
234   - })
235   - th.settime();
236   - return false;
237   - } else if (time == undefined || time == '') {
238   - getApp().my_warnning("请选择预约时间", 0, th);
239   - th.setData({
240   - is_sub: 0
241   - })
242   - th.settime();
243   - return false;
244   - } else {
245   - var version ="";
246   - //判断微信版本是否达到预约成功订阅的要求
247   - wx.getSystemInfo({
248   - success(res) {
249   - version = res.version;
250   - }
251   - })
252   - wx.showLoading({
253   - title: '加载中',
254   - })
255   -
256   - th.success();
257   - // if (th.ver(version, '7.0.4') >= 0) {
258   - // //获取模版id
259   - // getApp().request.promiseGet(temp_url, {
260   - // data: {
261   - // store_id: a.stoid,
262   - // typeid: "1011"
263   - // }
264   - // }).then(res => {
265   - // if (res.data.code == 0 && res.data.data.pageData.length > 0) {
266   - // template_id = res.data.data.pageData[0].template_id;
267   - // // //授权订阅
268   - // wx.requestSubscribeMessage({
269   - // tmplIds: [template_id],
270   - // success(res) {
271   - // th.success();
272   - // },
273   - // fail(res) {
274   - // th.success();
275   - // }
276   - // })
277   - // } else {
278   - // th.success();
279   - // }
280   - // })
281   - // } else {
282   - // // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
283   - // wx.showModal({
284   - // title: '提示',
285   - // content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
286   - // })
287   - // th.setData({
288   - // is_sub: 0
289   - // })
290   - // }
291   -
292   - }
293   - },
294   - //版本判断
295   - ver:function(v1,v2){
296   - v1 = v1.split('.')
297   - v2 = v2.split('.')
298   - var num1 = "" ;
299   - var num2 = "";
300   - var len = Math.max(v1.length, v2.length)
301   -
302   - while (v1.length < len) {
303   - v1.push('0')
304   - }
305   - while (v2.length < len) {
306   - v2.push('0')
307   - }
308   -
309   - for (let i = 0; i < len; i++) {
310   - num1 = parseInt(v1[i])
311   - num2 = parseInt(v2[i])
312   -
313   - if (num1 > num2) {
314   - return 1
315   - } else if (num1 < num2) {
316   - return -1
317   - }
318   - }
319   - return 0
320   - },
321   - goto: function(e) {
322   - var th = this;
323   - th.setData({
324   - beautician: 0,
325   - is_textea: 0
326   - })
327   - if (th.data.store_name == "") {
328   - getApp().my_warnning("请选择服务门店", 0, th);
329   - th.settime();
330   - } else if (th.data.beautician_name == "") {
331   - getApp().my_warnning("请选择美容师", 0, th);
332   - th.settime();
333   - } else {
334   - th.setData({
335   - is_textea: 1
336   - })
337   - var url = e.currentTarget.dataset.url;
338   - getApp().goto(url);
339   - }
  200 + getApp().my_warnning("请选择服务门店", 0, th);
  201 + return false;
  202 + }
  203 +
  204 + if(Object.keys(th.data.v).length === 0){
  205 + getApp().my_warnning("请选择美导和预约时间", 0, th);
  206 + return false;
  207 + }
  208 +
  209 + if(th.data.is_sub) return false;
  210 + th.setData({ is_sub: 1});
  211 +
  212 +
  213 + //获取模版id
  214 + getApp().request.get(temp_url, {
  215 + data: {
  216 + store_id: a.stoid,
  217 + typeid: "1011"
  218 + },
  219 + success:function(res){
  220 + if (res.data.code == 0 && res.data.data.pageData.length > 0) {
  221 + template_id = res.data.data.pageData[0].template_id;
  222 + // //授权订阅
  223 + wx.requestSubscribeMessage({
  224 + tmplIds: [template_id],
  225 + success(res) {
  226 + th.success();
  227 + },
  228 + fail(res) {
  229 + th.success();
  230 + }
  231 + })
  232 + } else {
  233 + th.success();
  234 + }
  235 + }
  236 + })
  237 +
340 238 },
  239 +
341 240 //点击选择门店
342 241 choose_for_store: function(e) {
343 242 var th = this;
... ... @@ -355,6 +254,7 @@ Page({
355 254 })
356 255 }
357 256 },
  257 +
358 258 //确认选择门店
359 259 choice_store: function() {
360 260 var th = this;
... ... @@ -367,8 +267,51 @@ Page({
367 267 storageId: Id,
368 268 is_textea: 1
369 269 })
  270 +
  271 + th.get_project_guide();
  272 +
370 273 },
371   - onReachBottom: function() {
  274 +
  275 + //获取美导和项目
  276 + get_project_guide(){
  277 + var th=this,user=getApp().globalData.userInfo;
  278 + var req={
  279 + storeId:os.stoid,
  280 + userId:user.user_id,
  281 + StorageId:encodeURIComponent(this.data.storageId),
  282 + }
  283 + getApp().request.get("/api/weshop/marketing/reservation/sm/pageNew",{
  284 + data:req,
  285 + success:function(res){
  286 + if(ut.ajax_ok(res)){
  287 + th.setData({project:res.data.data.pageData})
  288 + }
  289 + }
  290 + })
  291 +
  292 + req.SeekTime=this.data.datet;
  293 + getApp().request.get("/api/weshop/marketing/reservation/listStaffAndTime",{
  294 + data:req,
  295 + success:function(res){
  296 + if(ut.ajax_ok2(res)){
  297 + th.setData({v:{},col_arr:[]})
  298 + //-- 有些时间是全部没有的 --
  299 + th.setTimeShow(res.data.data)
  300 + }else{
  301 + th.setData({md:[]});
  302 + }
  303 + }
  304 + })
  305 +
  306 + //获取第一个元素的位置
  307 + setTimeout(function(){
  308 + th.queryMultipleNodes();
  309 + },1000)
  310 +
  311 + },
  312 +
  313 +
  314 + onGetBottom: function() {
372 315 var th = this;
373 316 if (this.data.total <= th.data.pageSize) return;
374 317 if (this.data.ismore) return;
... ... @@ -378,6 +321,7 @@ Page({
378 321 })
379 322 th.query_store();
380 323 },
  324 +
381 325 //分页查询门店信息
382 326 query_store: function() {
383 327 var th = this;
... ... @@ -385,14 +329,13 @@ Page({
385 329 is_textea: 0
386 330 })
387 331 var itemId = th.data.itemId; //服务id
388   - var url = "/api/weshop/marketing/reservation/storage/pagenew";
  332 + var url = "/api/weshop/marketing/reservation/storage/pageAll";
389 333 var key_word = th.data.key_word;
390 334 key_word = key_word.replace(/\s+/g, "");
391 335 getApp().request.promiseGet(url, {
392 336 data: {
393   - userId: th.data.options.userid,
  337 + userId: getApp().globalData.user_id,
394 338 storeId: a.stoid,
395   - serviceId: itemId,
396 339 latitude: th.data.lat,
397 340 longitude: th.data.lon,
398 341 page: th.data.curpage,
... ... @@ -534,8 +477,9 @@ Page({
534 477 th.setData({
535 478 is_textea: 1
536 479 })
537   - console.log('optionsxxx===>', this.data.options);
538   - // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id);
  480 +
  481 + console.log('optionsxxx===>', this.data.options);
  482 + // console.log('1-->', "/pages/user/my_service/cosmetology_list?userid=" + th.data.options.userid + 'storageId=' + storageId + '&' + 'itemId=' + itemId + '&' + "projectId=" + project_id);
539 483 wx.navigateTo({
540 484 url: "/packageA/pages/my_service/cosmetology_list?userid=" + this.data.options.userid + '&storageId=' + storageId + '&itemId=' + itemId + "&projectId=" + project_id
541 485 });
... ... @@ -546,15 +490,30 @@ Page({
546 490 * 生命周期函数--监听页面加载
547 491 */
548 492 onLoad: function(options) {
  493 +
  494 +
  495 + // 如果数值位数为1,则补0
  496 + function appendZero(obj) {
  497 + if (obj < 10) {
  498 + return "0" + "" + obj;
  499 + } else {
  500 + return obj;
  501 + }
  502 + };
549 503  
550 504 this.getTimeList(23, 30);
551 505 var th = this;
  506 + var now_date = new Date();
  507 + var md = now_date.getFullYear()+"-"+appendZero(now_date.getMonth() + 1) + "-" + appendZero(now_date.getDate());
  508 +
552 509 th.setData({
553   - options,
  510 + options,
554 511 itemId: options.service_id,
555 512 buyType: options.BuyType,
556 513 project_id: options.ProjectID,
557   - validay: options.Validay
  514 + validay: options.Validay,
  515 + datet:md,
  516 + nowDate:md
558 517 });
559 518 wx.getLocation({
560 519 type: 'gcj02',
... ... @@ -584,87 +543,30 @@ Page({
584 543 th.data.is_get_local_ok = 1;
585 544 }
586 545 });
587   -
588   - // 获取当前默认导购信息及归属门店信息
589   - if(options.firstleader) {
590   - getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+a.stoid+"/"+options.firstleader,{}).then(res=>{
591   - if(res.data.code==0){
592   - getApp().globalData.guide_id=res.data.data.id;
593   -
594   - getApp().request.promiseGet('/api/weshop/shoppingGuide/geIdStaffInfo', {
595   - data: {
596   - store_id: a.stoid,
597   - guide_id: e.globalData.guide_id,
598   - UserCode: th.data.options.usercode,
599   - }
600   - }).then(res => {
601   - console.log('res==>', a.stoid, e.globalData.guide_id, th.data.options.usercode);
602   - if(res.data.data.Tech) {
603   -
604   - var data={
605   - store_name: res.data.data.StorageName,
606   - beautician_name: res.data.data.StaffName,
607   - beauticianID: res.data.data.StaffId,
608   - StorageId: res.data.data.StorageId,
609   - }
610   - th.check_firleader(data);
611   - }
612   - });
613   -
614   -
615   - };
616   - });
617   - };
618   -
619   -
  546 +
  547 + //--先判断会员状态--
  548 + var user_info = getApp().globalData.userInfo;
  549 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  550 + wx.navigateTo({
  551 + url: '/pages/togoin/togoin',
  552 + })
  553 + return false;
  554 + }
620 555 },
621   - //查询剩下可预约人数
622   - query_more: function() {
623   - var th = this;
624   - var url = "/api/weshop/marketing/reservation/can/reservation/countnew";
625   - var beauticianID = th.data.beauticianID; //美容师id
626   - var projectID = th.data.itemId; //服务id
627   - var seekTime = th.data.time; //预约日期
628   - var storageId = th.data.storageId; //门店id
629   - var storeId = a.stoid; //商家id
630   - getApp().request.promiseGet(url, {
631   - data: {
632   - beauticianId: beauticianID,
633   - seekTime: seekTime,
634   - serviceId: projectID,
635   - storageId: storageId,
636   - storeId: storeId
637   - }
638   - }).then(res => {
639   - if (res.data.code == 0) {
640   - var tment_count = res.data.data.CanReservation;
641   - th.setData({
642   - tment_count: tment_count
643   - })
644   - } else {
645   - getApp().my_warnning(res.data.msg, 0, th);
646   - th.settime();
647   - }
648   - })
  556 +
649 557  
650   - },
651 558 /**
652 559 * 生命周期函数--监听页面显示
653 560 */
654 561 onShow: function() {
655 562 var th = this;
656   - var seekTime = th.data.time; //预约日期
657   - if (seekTime != "") {
658   - th.query_more();
659   - }
660 563 th.setData({
661   - time: th.data.time.substring(0, 16),
662 564 is_textea: 1
663 565 })
664   - th.query_project();
665   -
666   - th.queryMultipleNodes();
  566 +
667 567 },
  568 +
  569 +
668 570 //获取单个服务项目信息
669 571 query_project: function() {
670 572 var th = this;
... ... @@ -687,81 +589,17 @@ Page({
687 589 }
688 590 })
689 591 },
690   - //关闭导航
691   - // close: function() {
692   - // var th = this;
693   - // var nav_b = th.selectComponent("#nav_b"); //组件的id
694   - // nav_b.close_box();
695   - // }
696   -
697   - //判断分享的导购是不是有门店,是不是该门店下又该会员
698   - check_firleader(data){
699   - var th=this;
700   - var itemId = this.data.itemId; //服务id
701   - var url = "/api/weshop/marketing/reservation/storage/pagenew";
702   - var key_word = data.store_name;
703   - key_word = key_word.replace(/\s+/g, "");
704   - getApp().request.promiseGet(url, {
705   - data: {
706   - userId: th.data.options.userid,
707   - storeId: os.stoid,
708   - serviceId: itemId,
709   - latitude: th.data.lat,
710   - longitude: th.data.lon,
711   - page: 1,
712   - pageSize: 1000,
713   - keyWord: key_word
714   - }
715   - }).then(res => {
716   - //-- 如果是门店的话 --
717   - if (res.data.code == 0 && res.data.data && res.data.data.pageData) {
718   - var store_data=null;
719   - for(var i in res.data.data.pageData){
720   - var it=res.data.data.pageData[i];
721   - if(it.Id==data.StorageId){
722   - store_data={
723   - store_name: data.store_name,
724   - StorageId: data.StorageId,
725   - };
726   - break;
727   - }
728   - }
729   - if(!store_data) return false;
730   - th.setData(store_data)
731   -
732   - }else{
733   - return false;
734   - }
735   -
736   - //导购接口地址
737   - var url = "/api/weshop/marketing/reservation/staff/pagenew";
738   - return getApp().request.promiseGet(url, {
739   - isShowLoading:1,
740   - data: {
741   - storeId: os.stoid,
742   - userId: th.data.options.userid,
743   - serviceId: itemId,
744   - storageId: data.StorageId
745   - }
746   - })
747   - }).then(res=>{
748   - if (res && res.data && res.data.code == 0) {
749   - var beautician_list=res.data.data;
750   - for(var i in beautician_list){
751   - var item=beautician_list[i];
752   - if(item.staffid==data.beauticianID){
753   - th.setData({
754   - beautician_name:data.beautician_name,
755   - beauticianID:data.beauticianID,
756   - })
757   - break;
758   - }
759   - }
760   -
761   - }
762   - })
763   - },
  592 +
764 593  
  594 +
  595 + //开始拖拽项目列表
  596 + touchmove1: function (e) {
  597 + var that = this;
  598 + var position = [e.touches[0].pageX-15, e.touches[0].pageY-that.data.s_top];
  599 + that.setData({
  600 + wp: position
  601 + });
  602 + },
765 603  
766 604 //开始拖拽
767 605 touchmove: function (e) {
... ... @@ -772,59 +610,233 @@ Page({
772 610 write: position
773 611 });
774 612 },
775   - touchend:function(e){
776   - var that = this,th=that;
777   - if(!that.data.copy_btn) return false;
778   - var position =th.data.write;
779   - var arr=th.data.col_arr;
780   - for(var i=0;i<this.data.md.length;i++){//i是列
781   - var item=this.data.md[i];
782   - var nd=new Date();
783   - var d_str=nd.getFullYear()+"-"+(nd.getMonth()+1)+"-"+nd.getDate()+" ";
784   - var d_arr=item.time.split("-");
785   - var t1=new Date(d_str+d_arr[0])
786   - var t2=d_arr.length>1?new Date(d_str+d_arr[1]):0;
787   -
788   - for(var j=0; j<this.data.timeArr.length;j++){//j是行
789   - if(arr.indexOf(j)!=-1) continue;
790   - var tn=new Date(d_str+this.data.timeArr[j]);
791   - //小于开始时间
792   - if(tn<t1) continue;
793   - //大于结束时间
794   - if(tn>t2 && t2>0) continue;
795   - //如果坐标在网格内
796   - if( position[0]>th.data.f_x+i*th.data.f_width && position[0]<th.data.f_x+ (i+1)*th.data.f_width &&
797   - position[1]>th.data.f_y +j*th.data.f_hei && position[1]<th.data.f_y+(j+1)*th.data.f_hei){
798   -
799   - var txt="v["+i+"]["+j+"]";
  613 +
  614 + //-- 点击空格选择 --
  615 + sele_tab:function(e){
  616 + if(!this.data.sele_project){
  617 + wx.showToast({
  618 + title: "请选择要预约的项目",
  619 + icon: 'none',
  620 + duration: 2000
  621 + })
  622 + return false;
  623 + }
  624 +
  625 + var th=this;
  626 + var arr=this.data.col_arr;
  627 + var i=e.currentTarget.dataset.index;
  628 + var j=e.currentTarget.dataset.subindex;
  629 +
  630 + var item=this.data.md[i]; //获得美导
  631 + var tn=this.data.timeArr[j]; //获得时间
  632 +
  633 + //查看时间段能不能预约
  634 + if(!item.listtime[j].iskyy){
  635 + wx.showToast({
  636 + title: "该时间不可以预约",
  637 + icon: 'none',
  638 + duration: 2000
  639 + })
  640 + return false;
  641 + }
  642 + //查看时间有没有被预约了
  643 + if(this.data.v && this.data.v[i] && this.data.v[i][j]){
  644 + wx.showToast({
  645 + title: "该时间已被预约",
  646 + icon: 'none',
  647 + duration: 2000
  648 + })
  649 + return false;
  650 + }
  651 +
  652 + if(!item.listtime[j].itemids){
  653 + wx.showToast({
  654 + title: "该时间不可预约该项目",
  655 + icon: 'none',
  656 + duration: 1500
  657 + })
  658 + return false;
  659 + }
  660 +
  661 + var project_arr=item.listtime[j].itemids.split(',');
  662 +
  663 + if(project_arr.indexOf(this.data.sele_project.ServiceID)==-1){
  664 + wx.showToast({
  665 + title: "该时间不可预约该项目",
  666 + icon: 'none',
  667 + duration: 1500
  668 + })
  669 + return false;
  670 + }
  671 +
  672 + //同一美导同一项目,能选择两次,只要时间段不重复
  673 + if(this.data.v[i] && Object.keys(this.data.v[i]).length){
  674 + for(var sj in this.data.v[i]){
  675 + if(this.data.v[i][sj] && this.data.v[i][sj].ProjectID==this.data.sele_project.ProjectID){
  676 + th.checK_is_can_yy(item,tn,function(res){
  677 + if(res){
  678 + if(res>1){
  679 + wx.showToast({
  680 + title: '当前项目预约次数已超出项目剩余数,请先修改', icon: 'none', duration: 2000
  681 + });
  682 + return false;
  683 + }
  684 + wx.showModal({
  685 + title: "当前项目已有预约是否修改?",
  686 + success: function (res) {
  687 + if(res.confirm){
  688 + delete th.data.v[i][sj];
  689 + if(!th.data.v[i])
  690 + th.data.v[i]={}
  691 + th.data.v[i][j]=th.data.sele_project;
  692 + var ind=arr.indexOf(sj);
  693 + arr.splice(ind, 1);
  694 + arr.push(j);
  695 + th.setData({
  696 + v: th.data.v,col_arr:arr
  697 + });
  698 +
  699 + }
  700 + }
  701 + })
  702 + return false;
  703 + }else{
  704 + var txt="v["+i+"]["+j+"]";
800 705 arr.push(j);
801 706 th.setData({
802   - [txt]: th.data.projectName,
  707 + [txt]: th.data.sele_project,
803 708 col_arr:arr
804   - });
805   - break;
806   - }
  709 + });
  710 + return false;
  711 + }
  712 + })
  713 +
  714 + }
  715 + }
  716 +
  717 + }
  718 +
  719 + th.checK_is_can_yy(item,tn,function(res){
  720 + if(res){
  721 + if(res>1){
  722 + wx.showToast({
  723 + title: '当前项目预约次数已超出项目剩余数,请先修改', icon: 'none', duration: 2000
  724 + });
  725 + return false;
  726 + }
  727 +
  728 + wx.showModal({
  729 + title: "当前项目已有预约是否修改?",
  730 + success: function (res) {
  731 + if(res.confirm){
  732 +
  733 + var ii=th.data.cur_sele_i;
  734 + var jj=th.data.cur_sele_j;
  735 + delete th.data.v[ii][jj];
  736 + if(!th.data.v[i])
  737 + th.data.v[i]={}
  738 + th.data.v[i][j]=th.data.sele_project;
  739 + var ind=arr.indexOf(jj);
  740 + arr.splice(ind, 1);
  741 + arr.push(j);
  742 + th.setData({
  743 + v: th.data.v,col_arr:arr
  744 + });
  745 + }
  746 + }
  747 + })
  748 +
  749 + }else{
  750 + var txt="v["+i+"]["+j+"]";
  751 + arr.push(j);
  752 + th.setData({
  753 + [txt]: th.data.sele_project,
  754 + col_arr:arr
  755 + });
  756 + }
  757 +
807 758  
808   - }
809   - }
810   - th.setData({copy_btn:0})
  759 +
  760 + });
811 761 },
812 762  
813 763  
  764 +
  765 +
  766 +
  767 + //删除响应的预约
814 768 close_this:function (e){
815 769 var txt=e.currentTarget.dataset.txt;
816 770 var sindex=parseInt(e.currentTarget.dataset.sindex);
817   - var arr=this.data.col_arr;
818   - var ind=arr.indexOf(sindex);
  771 + var arr=this.data.col_arr;
  772 + var ind=arr.indexOf(sindex);
819 773 arr.splice(ind,1)
820 774 this.setData({[txt]:null,col_arr:arr})
821 775 },
822 776  
823   - onPageScroll(e) {
824   - // console.log('滚动距离', e);
825   - this.data.scrolltop = e.scrollTop;
826   - },
  777 + //计算滚蛋的距离
  778 + onPageScroll(e) { this.data.scrolltop = e.scrollTop;},
  779 +
  780 + //确认有没有预约
  781 + checK_is_can_yy(item, tn, back) {
  782 + var th = this;
  783 + var req = {
  784 + beauticianId: encodeURIComponent(item.staffid),
  785 + seekTime: this.data.datet + " " + tn + ":00",
  786 + serviceId: encodeURIComponent(this.data.sele_project.ServiceID),
  787 + storageId: encodeURIComponent(this.data.storageId),
  788 + storeId: os.stoid
  789 + }
  790 + getApp().request.get("/api/weshop/marketing/reservation/can/reservation/countnew", {
  791 + data: req,
  792 + success: function (res) {
  793 + th.setData({ copy_btn: 0 });
  794 + if (res.data.code == 0) {
  795 + if (!res.data.data.CanReservation && parseInt(res.data.data.canReservation) <= 0) {
  796 + wx.showToast({
  797 + title: '该项目不可以预约', icon: 'none', duration: 2000
  798 + });
  799 + return false;
  800 + }
  801 +
  802 + if (!th.data.v) { back(); return false; }
  803 +
  804 + var arr = Object.keys(th.data.v);
  805 + if (arr.length == 0) { back(); return false; }
  806 +
  807 + var num = 0;
  808 + var sele_arr=[];
  809 + for (var i in th.data.v) {
  810 + if (!th.data.v[i]) continue;
  811 + for (var j in th.data.v[i]) {
  812 + if (th.data.v[i][j] && th.data.v[i][j].ServiceID == th.data.sele_project.ServiceID) {
  813 + num++;
  814 + th.data.cur_sele_i=i;
  815 + th.data.cur_sele_j=j;
  816 + }
  817 + }
  818 + }
  819 +
  820 + if (!num) { back(); return false; }
827 821  
  822 + //如果已经超出次数的时候,就不能预约了
  823 + if (num >= parseInt(res.data.data.CanReservation)) {
  824 +
  825 + back(num);
  826 + return false;
  827 + }
  828 + back();
  829 +
  830 + } else {
  831 + wx.showToast({
  832 + title: res.data.msg,
  833 + icon: 'none',
  834 + duration: 2000
  835 + })
  836 + }
  837 + }
  838 + })
  839 + },
828 840  
829 841 //声明节点查询的方法
830 842 queryMultipleNodes: function() {
... ... @@ -833,16 +845,24 @@ Page({
833 845 query.select('.content_view').boundingClientRect() // 这段代码的意思是选择Id=productServe的节点,获取节点位置信息的查询请求
834 846 query.selectViewport().scrollOffset() // 这段代码的意思是获取页面滑动位置的查询请求
835 847 query.exec(res => {
  848 + if(!res || res.length==0) return false;
  849 + if(!res[0]) return false;
  850 +
836 851 console.log(res);
837 852 th.data.f_x=res[0].left;
838 853 th.data.f_y=res[0].top;
839 854 th.data.f_hei=res[0].height;
840 855 th.data.f_width=res[0].width;
841   -
842 856 })
  857 +
843 858 },
844 859  
  860 + /*--
845 861 getcopy(e) {
  862 +
  863 + },--*/
  864 + //项目元素点击后的效果
  865 + getName(e) {
846 866 var that=this;
847 867 console.log('e', e);
848 868 var x=e.currentTarget.dataset.offsetLeft;
... ... @@ -850,52 +870,74 @@ Page({
850 870 var position = [x, y];
851 871 that.setData({
852 872 write: position,copy_btn:1
853   - });
854   -
855   - },
856   -
857   - getName(e) {
858   - // console.log('e1', e);
859   - let name = e.currentTarget.dataset.name;
  873 + });
  874 + // console.log('e1', e);
  875 + let index = e.currentTarget.dataset.index;
  876 + let name = this.data.project[index];
  877 +
  878 +
860 879 this.setData({
861   - projectName: name,
  880 + sele_project: name,prj_index:index
862 881 });
  882 +
  883 + },
  884 +
  885 + //-- 项目列表长按 --
  886 + setmove1(){
  887 + this.setData({move1:1});
863 888 },
864 889  
865   -
866   - // 生成时间段
867   - getTimeList(hours,step) {
868   - var minutes=60;
  890 + //-- 生成时间段 --
  891 + getTimeList(hours,step) {
  892 + var minutes=60;
869 893 var timeArr = [];
870 894 hours = hours;
871 895 step = step;
  896 +
  897 + // 如果数值位数为1,则补0
  898 + function appendZero(obj) {
  899 + if (obj < 10) {
  900 + return "0" + "" + obj;
  901 + } else {
  902 + return obj;
  903 + }
  904 + };
  905 +
  906 + var now_date=new Date();
  907 + var md = now_date.getFullYear()+"-"+appendZero(now_date.getMonth() + 1) + "-" + appendZero(now_date.getDate());
872 908  
873   - for(var i = 8; i < hours; i++){
874   - var str = '';
875   - if(i < 10) {
876   - str = 0 + '' + i;
877   - } else {
878   - str = '' + i;
879   - };
880   -
881   - for(var j = 0; j < minutes; j++) {
882   - if(j % step == 0){
883   - var s = j < 10 ? ':' + 0 + '' + j : ':' + j;
884   - s = str + s;
885   - timeArr.push(s);
886   - };
887   - };
888   - };
889   -
890   - // console.log('timeArr', timeArr);
891   - this.setData({
892   - timeArr,
893   - });
  909 + for(var i = 8; i < hours; i++){
  910 + var str = '';
  911 + if(i < 10) {
  912 + str = 0 + '' + i;
  913 + } else {
  914 + str = '' + i;
  915 + };
  916 +
  917 + for(var j = 0; j < minutes; j++) {
  918 + if(j % step == 0){
  919 + var s = ':' + appendZero(j);
  920 + s = str + s;
  921 + //-- 不是当天 --
  922 + if(this.data.datet && this.data.datet!=md){
  923 + timeArr.push(s);
  924 + }else{
  925 + var d1=md+" "+s;
  926 + var date1=new Date(d1);
  927 + //必须是大于
  928 + if(date1.getTime()>now_date.getTime()){
  929 + timeArr.push(s);
  930 + }
  931 + }
  932 +
  933 + };
  934 + };
  935 + };
  936 +
  937 + this.setData({timeArr,});
894 938  
895 939 },
896   -
897   -
898   -
  940 +
899 941 scroll(e) {
900 942 // console.log('e', e.detail.deltaX);
901 943 let deltaX = e.detail.deltaX;
... ... @@ -904,8 +946,104 @@ Page({
904 946 // };
905 947 this.data.deltaX = -deltaX;
906 948 },
907   -
  949 +
  950 + pickerTap:function() {
  951 + var date = new Date();
  952 + var monthDay = ['今天','明天'];
  953 + // 月-日
  954 + for (var i = 2; i <= 14; i++) {
  955 + var date1 = new Date(date);
  956 + date1.setDate(date.getDate() + i);
  957 + var md = (date1.getFullYear()+"-"+date1.getMonth() + 1) + "-" + date1.getDate();
  958 + monthDay.push(md);
  959 + }
  960 + this.setData(monthDay);
  961 + },
  962 +
  963 +
  964 + //-- 选择时间的时候 --
  965 + bindDateChenge: function(e) {
  966 + var th=this;
  967 + var nd=new Date(this.data.nowDate);
  968 + var nd1=new Date(e.detail.value);
  969 + if(nd1.getTime()<nd.getTime()){
  970 + wx.showToast({
  971 + title: "选择的日期不能小于今天",
  972 + icon: 'none',
  973 + duration: 2000
  974 + })
  975 + return false;
  976 + }
  977 +
  978 + this.setData({
  979 + datet: e.detail.value
  980 + });
  981 + this.getTimeList(23, 30);
  982 + //当时间变化的时候
  983 + if(this.data.storageId){
  984 + var req={
  985 + storeId:os.stoid,
  986 + userId:getApp().globalData.userInfo.user_id,
  987 + StorageId:encodeURIComponent(this.data.storageId),
  988 + }
  989 + req.SeekTime=this.data.datet;
  990 + getApp().request.get("/api/weshop/marketing/reservation/listStaffAndTime",{
  991 + data:req,
  992 + success:function(res){
  993 + if(ut.ajax_ok2(res)){
  994 + th.setData({v:{},col_arr:[]})
  995 + //-- 有些时间是全部没有的 --
  996 + th.setTimeShow(res.data.data)
  997 + }else{
  998 + th.setData({md:[]});
  999 + }
  1000 + }
  1001 + })
  1002 + }
  1003 + },
908 1004  
909   -
910   -
  1005 + onPageScroll: function(e) {
  1006 + this.data.s_top=e.scrollTop;
  1007 + },
  1008 +
  1009 + //-- 时间段有些不显示,出来的时间和显示的对应 --
  1010 + setTimeShow:function(data){
  1011 + // 如果数值位数为1,则补0
  1012 + function appendZero(obj) {
  1013 + if (obj < 10) {
  1014 + return "0" + "" + obj;
  1015 + } else {
  1016 + return obj;
  1017 + }
  1018 + };
  1019 +
  1020 + var now_date=new Date();
  1021 + var md = now_date.getFullYear()+"-"+appendZero(now_date.getMonth() + 1)+ "-" + appendZero(now_date.getDate());
  1022 +
  1023 + if(this.data.datet && this.data.datet!=md){
  1024 + this.setData({md:data});
  1025 + return false;
  1026 + }
  1027 +
  1028 + for (var i in data) {
  1029 + var ti_time_arr = data[i].listtime;
  1030 + var arr = [];
  1031 + for (var j in ti_time_arr) {
  1032 + var d1 = md + " " + ti_time_arr[j].stime;
  1033 + var date1 = new Date(d1);
  1034 + //必须是大于
  1035 + if (date1.getTime() > now_date.getTime()) {
  1036 + arr.push(ti_time_arr[j]);
  1037 + }
  1038 + }
  1039 + data[i].listtime = arr;
  1040 + }
  1041 + this.setData({md:data});
  1042 +
  1043 +
  1044 +
  1045 + },
  1046 +
  1047 +
  1048 +
911 1049 })
912 1050 \ No newline at end of file
... ...
packageA/pages/my_service2/appment_main.json
... ... @@ -3,6 +3,8 @@
3 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5 5 "warn": "/components/long_warn/long_warn",
6   - "nav_b": "/components/nav_b/nav_b"
  6 + "nav_b": "/components/nav_b/nav_b",
  7 + "nodata": "/components/nodata/nodata"
  8 +
7 9 }
8 10 }
9 11 \ No newline at end of file
... ...
packageA/pages/my_service2/appment_main.wxml
1 1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2 2 <wxs module="fil" src="g_filter.wxs"></wxs>
3 3  
4   -<!-- <view class="btn-container">
5   - <navigator class="btn" url="/pages/user/my_service/tment_order_list">
6   - <view>我的预约</view>
7   - </navigator>
8   - <form report-submit='true' bindtap="sub_success">
9   - <button form-type="submit" class="btn">
10   - <view>提交预约</view>
11   - </button>
12   - </form>
13   - </view> -->
14   -
15   -<view class="card" bindlongtap="getcopy">
16   - <view class="t-c c-c7">
17   - <text class="iconfont icon-sandian"></text>
  4 +
  5 +<!-- 项目的拖动 -->
  6 +<view wx:if="{{!store && project && md && md.length>0}}" class="card" catchtouchmove='true' style="left:{{wp[0]}}px;top:{{wp[1]}}px;">
  7 + <view class="cp_btn t-c c-c7" bindtouchend="touchend1" bindtouchmove="touchmove1" catch:touchmove1 style="padding: 15rpx 0;" >
  8 + <text class="iconfont icon-sandian" style="font-size: 40rpx;"></text>
18 9 </view>
19   - <block wx:for="{{project}}">
20   - <view class="t-c pd20" hover-class="hover" bindtouchmove="touchmove" bindtouchend="touchend" catch:touchmove data-name="{{item}}" bindlongtap="getName">
21   - <text class="iconfont icon-meirong fs40"></text>
22   - <view class="fs24">{{item}}</view>
23   - </view>
  10 + <view style="overflow-y: auto; max-height:600rpx;">
  11 + <block wx:for="{{project}}">
  12 + <view class="t-c pd20 {{prj_index==index?'hover':''}}" data-index="{{index}}" catchtap="getName">
  13 + <text class="iconfont icon-meirong fs40"></text>
  14 + <view class="fs24">{{item.ServiceName}}</view>
  15 + </view>
  16 +
24 17 </block>
  18 + </view>
25 19 </view>
26 20  
27 21 <image class="main" src="{{iurl}}/miniapp/images/yyservice/main.png"></image>
28   -
29 22 <view class="pdb100">
30   - <!-- 选择门店 -->
  23 +
  24 + <!-- 选择日期 -->
  25 + <picker class='pi' mode="date" value='{{datet}}' start="2019-1-1" bindchange='bindDateChenge'>
  26 + <view class="flex-vertical pdv20 jc-center">
  27 + <!-- 门店 -->
  28 + <view class="flex-vertical-between head fs30">
  29 + <view>日</view>
  30 + <view>期</view>
  31 + </view>
  32 +
  33 + <view class="flex-vertical-between fs26 select">
  34 + <view class="{{datet==''?'color':''}} value ellipsis-1">{{datet==""?'选择日期':datet}}</view>
  35 + <view class="angle">∟</view>
  36 + </view>
  37 +
  38 + </view>
  39 + </picker>
  40 + <!-- 选择门店 -->
31 41 <view class="flex-vertical pdv20 jc-center">
32 42 <!-- 门店 -->
33 43 <view class="flex-vertical-between head fs30">
... ... @@ -40,8 +50,11 @@
40 50 <view class="{{store_name==''?'color':''}} value ellipsis-1">{{store_name==""?'选择服务门店':store_name}}</view>
41 51 <view class="angle">∟</view>
42 52 </view>
43   - </view>
44   - <view class="table flex fs26" style="width: 100%;height: 100%;">
  53 + </view>
  54 +
  55 +
  56 + <!-- 拖入的田框,主内容 -->
  57 + <view wx:if="{{md && md.length>0}}" class="table flex fs26" style="width: 100%;height: auto; overflow: hidden; margin-bottom: 10rpx;">
45 58 <view class="left t-c">
46 59 <view class="td pr" style="width: 120rpx">
47 60 <view class="time-box" bindtap="pickTime"><view class="time">时间</view></view>
... ... @@ -56,89 +69,21 @@
56 69 <view class="td" wx:for="{{timeArr.length}}"></view>
57 70 </view> -->
58 71 <view wx:for="{{md}}">
59   - <view class="td bg-pink">{{item.name}}</view>
  72 + <view class="td bg-pink">{{item.StaffName}}</view>
60 73 <!-- <view class="td content_view {{v[0][0]?'121':''}}">{{v[0][0]}}</view> -->
61 74 <block wx:for="{{timeArr.length}}" wx:for-item="subitem" wx:for-index="subindex">
62   - <view class="td content_view {{v[index][subindex] && v[index][subindex]? 'active':''}} {{filters.in_arr(subindex,col_arr) || fil.is_no_time(item,subindex,timeArr) ?'notactive':''}}">
63   - {{v[index][subindex]?v[index][subindex]:''}}
64   - <text wx:if="{{v[index][subindex]}}" catchtap="close_this" data-txt="v[{{index}}][{{subindex}}]" data-sindex="{{subindex}}" class="close_this">×</text>
  75 + <view bindtap="sele_tab" data-index="{{index}}" data-subindex="{{subindex}}"
  76 + class="td content_view {{v[index][subindex] && v[index][subindex]? 'active':''}} {{fil.is_no_time(item,subindex,timeArr,sele_project) ?'notactive':''}}">
  77 + <!-- 当项目是当前选中的项目的时候 -->
  78 + <block wx:if="{{v[index][subindex] && v[index][subindex].ProjectID==sele_project.ProjectID}}">
  79 + <text>{{v[index][subindex]?v[index][subindex].ServiceName:''}}</text>
  80 + <text catchtap="close_this" data-txt="v[{{index}}][{{subindex}}]" data-sindex="{{subindex}}" class="close_this">×</text>
  81 + </block>
65 82 </view>
66 83 </block>
67 84 </view>
68 85 </view>
69   - </scroll-view>
70   -
71   -
72   -
73   -
74   -
75   - <!-- 选择美容师 -->
76   - <!-- <view class="flex-vertical mabot"> -->
77   - <!-- 门店 -->
78   - <!-- <view class="flex-vertical-between head fs30">
79   - <view>美</view>
80   - <view>容</view>
81   - <view>师</view>
82   - </view> -->
83   -
84   - <!-- 选择美容师 -->
85   - <!-- <view class="rel fs26"> -->
86   - <!-- <view class="flex-vertical-between Cosmetology" bindtap="query_beautician">
87   - <view class="{{beautician_name==''?'color':''}} value ellipsis-1">{{beautician_name==''?'选择美容师':beautician_name}}</view>
88   - <view class="angle">∟</view>
89   - </view> -->
90   - <!-- 美容师下拉列表 -->
91   - <!-- <view class="beauticians abs" wx:if="{{beautician}}"> -->
92   - <!-- 到时候要做判断如果是index==循环的最后一个则把下边线去掉:(beaclone去掉的css) -->
93   - <!-- <view class="beautician flex-vertical fs26" wx:for="{{beautician_list}}" bindtap="choice_beautician" data-baaindex="{{key}}" wx:for-index="key">
94   - <view class="StaffName ellipsis-1">{{item.StaffName}}</view>
95   - </view>
96   - <view>
97   - </view>
98   - </view> -->
99   - <!-- </view> -->
100   - <!-- <view class="flex-center users" bindtap="nav_bea">
101   - <image class="user" src="{{iurl}}/miniapp/images/yyservice/user.png"></image>
102   - </view> -->
103   - <!-- </view> -->
104   -
105   - <!-- 选择时间 -->
106   - <!-- <view class="flex-vertical mabot"> -->
107   - <!-- 门店 -->
108   - <!-- <view class="head fs30">
109   - <view>预约时间</view>
110   - </view> -->
111   -
112   - <!-- 选择时间 -->
113   - <!-- <view class="flex-vertical-between fs26 select" data-url="/packageA/pages/my_service/beauty_deta?url={{url}}&StorageId={{StorageId}}&BeauticianID={{beauticianID}}&itemId={{itemId}}&modify=0&projectId={{project_id}}" bindtap="goto">
114   - <view class="{{time==''?'color':''}}">{{time==""?'选择时间':time}}</view>
115   - <view class="angle angler">∟</view>
116   - </view> -->
117   - <!-- </view> -->
118   -
119   - <!-- 备注 -->
120   - <!-- <view class="flex Remarks"> -->
121   - <!-- 门店 -->
122   - <!-- <view class="flex-space-between head fs30">
123   - <view>备</view>
124   - <view>注</view>
125   - </view>
126   - <view class="flex fs26">
127   - <block wx:if="{{is_textea==1}}">
128   - <textarea class="textarea" placeholder="{{remarks==''?'填写备注':remarks}}" placeholder-class="fs26 color" value="{{remarks}}" bindinput="input_remarks" maxlength="100">
129   - </textarea>
130   - </block>
131   - <block wx:else>
132   - <view class="textarea {{remarks==''?'color':''}}" bindtap="check_text">{{remarks==''?'填写备注':remarks}}
133   - </view>
134   - </block>
135   - </view> -->
136   - <!-- </view>
137   - <view wx:if="{{tment_count!=''}}" class="notes flex-level-right fs24 color">
138   - <view>注:剩余可预约人数{{tment_count}}人</view>
139   - </view> -->
140   -
141   -
  86 + </scroll-view>
142 87 </view>
143 88 </view>
144 89  
... ... @@ -146,9 +91,10 @@
146 91 <navigator class="appment flex-center" url="/pages/user/my_service/tment_order_list">
147 92 <view>我的预约</view>
148 93 </navigator>
149   - <form report-submit='true' bindtap="sub_success">
150   - <button form-type="submit" class="sub_appment flex-center">帮你预约</button>
151   - </form>
  94 + <form report-submit='true' bindtap="sub_success">
  95 + <button wx:if="{{is_sub}}" class="sub_appment flex-center">预约中..</button>
  96 + <button wx:else form-type="submit" class="sub_appment flex-center">提交预约</button>
  97 + </form>
152 98 </view>
153 99  
154 100  
... ... @@ -165,7 +111,7 @@
165 111 </view>
166 112 </view>
167 113 <!-- 选择门店 -->
168   - <scroll-view class="stores" scroll-y="{{isScroll}}" enable-back-to-top="true" bindscrolltolower="onReachBottom">
  114 + <scroll-view class="stores" scroll-y="{{isScroll}}" enable-back-to-top="true" bindscrolltolower="onGetBottom">
169 115 <view class="store flex-vertical" wx:for="{{store_list}}" bindtap="choose_for_store" data-ind="{{index}}">
170 116 <block wx:if="{{index==fir_pick_index}}">
171 117 <icon class="icon" type="success" color="red" size="20"></icon>
... ... @@ -206,8 +152,11 @@
206 152  
207 153 <!-- 制作一个圆球导航 -->
208 154 <!-- <nav_b id="nav_b"></nav_b> -->
209   -
  155 +<!--
210 156 <view class="copy" wx:if="{{copy_btn}}" style="position:absolute;left:{{write[0]}}px;top:{{write[1]}}px;">
211 157 <text class="iconfont icon-meirong fs40"></text>
212   - <view class="fs24">{{projectName}}</view>
  158 + <view class="fs24">{{sele_project.ServiceName}}</view>
  159 +</view>-->
  160 +<view class="flex ai-center jc-center">
  161 + <nodata wx:if="{{md && md.length==0}}" />
213 162 </view>
214 163 \ No newline at end of file
... ...
packageA/pages/my_service2/appment_main.wxss
1 1 page,
2 2 .area {
3 3 width: 100%;
4   - height: 100%;
  4 + height: 100%;
  5 + position: relative;
5 6 }
6 7  
7   -
8   -
9   -
10 8 /* .container {
11 9 border-top: 7rpx solid rgb(245, 245, 245);
12 10 justify-content: baseline;
... ... @@ -188,7 +186,7 @@ button {
188 186 }
189 187  
190 188 .storeList {
191   - z-index: 5;
  189 + z-index: 1500;
192 190 left: 0rpx;
193 191 border-top-left-radius: 25rpx;
194 192 border-top-right-radius: 25rpx;
... ... @@ -301,7 +299,8 @@ button {
301 299 .table {
302 300 background-color: white;
303 301 /* border-top: 2rpx solid rgba(218, 217, 217, 1);
304   - border-left: 2rpx solid rgba(218, 217, 217, 1); */
  302 + border-left: 2rpx solid rgba(218, 217, 217, 1); */
  303 + width: 100%;height: auto; overflow: hidden; margin-bottom: 20rpx;
305 304 }
306 305 .blue {
307 306 background: rgba(241, 252, 255, 1);
... ... @@ -339,17 +338,17 @@ button {
339 338  
340 339 .card {
341 340 position: fixed;
342   - width: 110rpx;
343   - top: 50%;
  341 + width: 130rpx;
  342 + /* top: 50%; */
344 343 right: 0;
345 344 /* min-height: 400rpx; */
346   - max-height: 700rpx;
347   - overflow-y: auto;
348   - transform: translateY(-50%);
  345 + /* max-height: 700rpx; */
  346 + /* transform: translateY(-50%); */
349 347 background-color: white;
350 348 border-radius: 10rpx;
351 349 box-shadow: -2px 0px 6px #aaa;
352   - z-index: 1000;
  350 + z-index: 1000;
  351 + top:160rpx
353 352 }
354 353  
355 354 .icon-meirong {
... ... @@ -443,3 +442,6 @@ button {
443 442 }
444 443  
445 444  
  445 +
  446 +
  447 +
... ...
packageA/pages/my_service2/g_filter.wxs
1 1 var g_filters = {
2   - is_no_time:function(item,subindex,timeArr){
  2 + is_no_time:function(item,subindex,timeArr,sele_project){
  3 + if(!sele_project || !sele_project.ServiceID) return false;
3 4 var t_time=timeArr[subindex];
4   - var time_arr=item.time.split("-");
5   -
6   - var t_date=getDate();
7   - var t_date_str=t_date.getFullYear()+"-"+(t_date.getMonth() + 1)+"-"+t_date.getDate()+" "
8   -
9   - var this_time =t_date_str+t_time.substring(0, 19);
10   - var reg = getRegExp("-", "g");
11   - this_time = this_time.replace(reg, '/');
12   - var t1 = getDate(this_time);
13   -
14   - var fmt1 =t_date_str+time_arr[0].substring(0, 19);
15   - var reg = getRegExp("-", "g");
16   - var fmt2 = fmt1.replace(reg, '/');
17   - var t2 = getDate(fmt2);
18   -
19   - if(t1<t2) return true;
20   - if(time_arr.length>1){
21   - var ft1 =t_date_str+time_arr[1].substring(0, 19);
22   - var reg = getRegExp("-", "g");
23   - var ft2 = ft1.replace(reg, '/');
24   - var t3 = getDate(ft2);
25   - if(t1>t3) return true;
26   - }
27   - return false;
  5 + var time_arr=item.listtime;
  6 +
  7 + for(var i=0;i<time_arr.length;i++){
  8 + if(t_time==time_arr[i].stime && time_arr[i].iskyy==true){
  9 + //如果没有项目的话
  10 + if(time_arr[i].itemids){
  11 + var project_arr=time_arr[i].itemids.split(',');
  12 + //如果没有相应的项目的话
  13 + if(project_arr && project_arr.indexOf(sele_project.ServiceID)!=-1) return false;
  14 +
  15 + }
  16 + }
  17 + }
  18 +
  19 + return true;
28 20 },
29 21  
30 22 }
... ...
packageA/pages/profile/profile.js
... ... @@ -169,6 +169,8 @@ Page({
169 169 var index = th.data.sec_pick_index;
170 170 item = th.data.sec_sto.s_arr[index];
171 171 }
  172 +
  173 + if(!item) return false;
172 174 th.setData({
173 175 def_pick_store: item,
174 176 stoname: item.pickup_name,
... ... @@ -255,7 +257,7 @@ Page({
255 257 data: dd,
256 258 success:function(res){
257 259 var e = res;
258   - if (e.data.code == 0) {
  260 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
259 261 //-- 如果有默认选择门店的时候,要把默认门店放在第一位 --
260 262 if (th.data.def_pick_store) {
261 263 for (var k = 0; k < e.data.data.pageData.length; k++) {
... ...
packageA/pages/prom_list/prom_list.js
... ... @@ -722,7 +722,9 @@ Page({
722 722 get_sto(e) {
723 723 var th = this,that=this;
724 724 var timer_get = setInterval(function() {
725   - if (th.data.is_get_local_ok == 0) return false;
  725 + if (th.data.is_get_local_ok == 0) return false;
  726 + if(!th.data.data) return false;
  727 +
726 728 var dd = null,
727 729 c_list=th.data.collocationList,
728 730 i = getApp().request;
... ...
packageA/pages/prom_list/prom_list.wxml
... ... @@ -137,7 +137,7 @@
137 137 <view class="b_num">
138 138 <view>购买数量</view>
139 139 <view class="count">
140   - <view bindtap="subCartNum" class="sub">-</view>
  140 + <view bindtap="subCartNum" class="sub {{goodsInputNum<=1?'gray':''}}">-</view>
141 141 <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
142 142 <view bindtap="addCartNum" class="add">+</view>
143 143 </view>
... ...
packageA/pages/prom_list/prom_list.wxss
... ... @@ -30,7 +30,6 @@
30 30 font-size: 32rpx;
31 31 box-sizing: border-box;
32 32 border-radius: 20rpx;
33   - height: 72%;
34 33 }
35 34  
36 35 .spec-model .pding{padding: 0 30rpx;}
... ... @@ -138,12 +137,10 @@
138 137 .spec-cart-btns {
139 138 width: 92%;
140 139 line-height: 70rpx;
141   - margin: 0rpx auto;
142   - margin-top: 160rpx;
  140 + margin-top: 40rpx;
  141 + margin-bottom: 20rpx;
143 142 border-radius: 20rpx;
144   - position: fixed;
145   - bottom: 50rpx;
146   - left: 4%;
  143 + margin-left: 4%;
147 144 }
148 145  
149 146 .spec-cart-btn {
... ... @@ -362,4 +359,5 @@
362 359 .join-cart>view.no_store {
363 360 width: 58%; background-color: #adadad;
364 361 }
365   -.no_store{color:#d60021; font-size: 26rpx;}
366 362 \ No newline at end of file
  363 +.no_store{color:#d60021; font-size: 26rpx;}
  364 +.gray{color: #ccc;}
367 365 \ No newline at end of file
... ...
packageB/images/luckDraw/badge.png 0 → 100644

2.86 KB

packageB/images/luckDraw/bg.png 0 → 100644

739 KB

packageB/images/luckDraw/coupon.png 0 → 100644

4.83 KB

packageB/images/luckDraw/czz.png 0 → 100644

7.21 KB

packageB/images/luckDraw/gift.png 0 → 100644

14.1 KB

packageB/images/luckDraw/jf.png 0 → 100644

23.8 KB

packageB/images/luckDraw/lb.png 0 → 100644

60 KB

packageB/images/luckDraw/logo.png 0 → 100644

1.51 KB

packageB/images/luckDraw/money.png 0 → 100644

6.63 KB

packageB/images/luckDraw/mr.png 0 → 100644

27.7 KB

packageB/images/luckDraw/mr1.png 0 → 100644

18.5 KB

packageB/images/luckDraw/pointer.png 0 → 100644

23.3 KB

packageB/images/luckDraw/weel.png 0 → 100644

69.5 KB

packageB/images/luckDraw/yhq.png 0 → 100644

19.1 KB

packageB/images/luckDraw/zp.png 0 → 100644

33.2 KB

packageB/miniprogram_npm/lucky-canvas/index.js 0 → 100644
  1 +module.exports = (function() {
  2 +var __MODS__ = {};
  3 +var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
  4 +var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
  5 +var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
  6 +var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
  7 +__DEFINE__(1625793648862, function(require, module, exports) {
  8 +module.exports = require('./dist/lucky-canvas.cjs.min.js')
  9 +
  10 +}, function(modId) {var map = {"./dist/lucky-canvas.cjs.min.js":1625793648863}; return __REQUIRE__(map[modId], modId); })
  11 +__DEFINE__(1625793648863, function(require, module, exports) {
  12 +Object.defineProperty(exports,"__esModule",{value:!0});
  13 +/*! *****************************************************************************
  14 +Copyright (c) Microsoft Corporation.
  15 +
  16 +Permission to use, copy, modify, and/or distribute this software for any
  17 +purpose with or without fee is hereby granted.
  18 +
  19 +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  20 +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  21 +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  22 +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  23 +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  24 +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  25 +PERFORMANCE OF THIS SOFTWARE.
  26 +***************************************************************************** */
  27 +var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function n(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function o(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t}String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var o=e[r];if(t.call(n,o,r,e))return o;r++}}});var s=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.some((function(e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}))},a=function(t){return[].filter.call(t,(function(t){return"\n"!==t})).join("")},u=function(t){if("string"!=typeof t)return!1;if("transparent"===(t=t.toLocaleLowerCase().trim()))return!1;if(/^rgba/.test(t)){var e=/([^\s,]+)\)$/.exec(t);if(0===(null===(i=e)?0:"object"==typeof i?NaN:"number"==typeof i?i:"string"==typeof i?"%"===i[i.length-1]?Number(i.slice(0,-1))/100:Number(i):NaN))return!1}var i;return!0},h=function(){function t(){this.subs=[]}return t.prototype.addSub=function(t){this.subs.includes(t)||this.subs.push(t)},t.prototype.notify=function(){this.subs.forEach((function(t){t.update()}))},t}(),c="__proto__"in{};function l(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}var f=Array.prototype,d=Object.create(f);["push","pop","shift","unshift","sort","splice","reverse"].forEach((function(t){d[t]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=f[t].apply(this,e),r=this.__luckyOb__;return["push","unshift","splice"].includes(t)&&r.walk(this),r.dep.notify(),n}}));var p=function(){function t(t){this.dep=new h,l(t,"__luckyOb__",this),Array.isArray(t)&&(c?t.__proto__=d:Object.getOwnPropertyNames(d).forEach((function(e){l(t,e,d[e])}))),this.walk(t)}return t.prototype.walk=function(t){Object.keys(t).forEach((function(e){m(t,e,t[e])}))},t}();function g(t){if(t&&"object"==typeof t)return"__luckyOb__"in t?t.__luckyOb__:new p(t)}function m(t,e,i){var n=new h,r=Object.getOwnPropertyDescriptor(t,e);if(!r||!1!==r.configurable){var o=r&&r.get,s=r&&r.set;o&&!s||2!==arguments.length||(i=t[e]);var a=g(i);Object.defineProperty(t,e,{get:function(){var e=o?o.call(t):i;return h.target&&(n.addSub(h.target),a&&a.dep.addSub(h.target)),e},set:function(e){e!==i&&(i=e,o&&!s||(s?s.call(t,e):i=e,a=g(e),n.notify()))}})}}var v=0,b=function(){function t(t,e,i,n){void 0===n&&(n={}),this.id=v++,this.$lucky=t,this.expr=e,this.deep=!!n.deep,this.getter="function"==typeof e?e:function(t){t+=".";for(var e=[],i="",n=0;n<t.length;n++){var r=t[n];if(/\[|\./.test(r))e.push(i),i="";else{if(/\W/.test(r))continue;i+=r}}return function(t){return e.reduce((function(t,e){return t[e]}),t)}}(e),this.cb=i,this.value=this.get()}return t.prototype.get=function(){h.target=this;var t=this.getter.call(this.$lucky,this.$lucky);return this.deep&&function(t){var e=function(t){s(t,"array","object")&&Object.keys(t).forEach((function(i){var n=t[i];e(n)}))};e(t)}(t),h.target=null,t},t.prototype.update=function(){var t=this.get(),e=this.value;this.value=t,this.cb.call(this.$lucky,t,e)},t}(),y=function(){function t(t){var e=this;this.htmlFontSize=16,this.rAF=function(){},this.boxWidth=0,this.boxHeight=0,this.setHTMLFontSize(),"string"==typeof t?t={el:t}:1===t.nodeType&&(t={el:"",divElement:t}),t=t,this.config=t,this.setDpr(),this.initWindowFunction(),t.flag||(t.flag="WEB"),Object.prototype.hasOwnProperty.call(t,"ob")||(t.ob=!0),t.el&&(t.divElement=document.querySelector(t.el)),t.divElement&&(t.canvasElement=document.createElement("canvas"),t.divElement.appendChild(t.canvasElement)),this.resetWidthAndHeight(),t.canvasElement&&(t.ctx=t.canvasElement.getContext("2d"),t.canvasElement.setAttribute("package","lucky-canvas@1.5.4"),t.canvasElement.addEventListener("click",(function(t){return e.handleClick(t)})),t.canvasElement.addEventListener("mousemove",(function(t){return e.handleMouseMove(t)})),t.canvasElement.addEventListener("mousedown",(function(t){return e.handleMouseDown(t)})),t.canvasElement.addEventListener("mouseup",(function(t){return e.handleMouseUp(t)}))),this.ctx=t.ctx,t.ctx?this.boxWidth&&this.boxHeight||console.error("无法获取到宽度或高度"):console.error("无法获取到 CanvasContext2D")}return t.prototype.init=function(t){this.setDpr(),this.setHTMLFontSize(),this.resetWidthAndHeight(),this.zoomCanvas()},t.prototype.handleClick=function(t){},t.prototype.handleMouseDown=function(t){},t.prototype.handleMouseUp=function(t){},t.prototype.handleMouseMove=function(t){},t.prototype.conversionAxis=function(t,e){return[0,0]},t.prototype.setDpr=function(){var t=this.config;t.dpr||(window?window.dpr=t.dpr=window.devicePixelRatio||1:t.dpr||console.error(t,"未传入 dpr 可能会导致绘制异常"))},t.prototype.setHTMLFontSize=function(){window&&(this.htmlFontSize=+window.getComputedStyle(document.documentElement).fontSize.slice(0,-2))},t.prototype.resetWidthAndHeight=function(){var t=this.config,e=0,i=0;t.divElement&&(e=t.divElement.offsetWidth,i=t.divElement.offsetHeight),this.boxWidth=this.getLength(t.width)||e,this.boxHeight=this.getLength(t.height)||i,t.divElement&&(t.divElement.style.overflow="hidden",t.divElement.style.width=this.boxWidth+"px",t.divElement.style.height=this.boxHeight+"px")},t.prototype.initWindowFunction=function(){var t=this.config;if(window)return this.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.setTimeout=window.setTimeout,t.setInterval=window.setInterval,t.clearTimeout=window.clearTimeout,void(t.clearInterval=window.clearInterval);if(t.rAF)this.rAF=t.rAF;else if(t.setTimeout){var e=t.setTimeout;this.rAF=function(t){return e(t,16.7)}}else this.rAF=function(t){return setTimeout(t,16.7)}},t.prototype.zoomCanvas=function(){var t=this.config,e=this.ctx,i=t.canvasElement,n=t.dpr,r=[this.boxWidth*n,this.boxHeight*n],o=r[0],s=r[1],a=function(t){return(t*n-t)/(t*n)*(n/2)*100};i&&(i.width=o,i.height=s,i.style.width=o+"px",i.style.height=s+"px",i.style.transform="scale("+1/n+") translate("+-a(o)+"%, "+-a(s)+"%)",e.scale(n,n))},t.prototype.loadImg=function(t,e,i){var n=this;return void 0===i&&(i="$resolve"),new Promise((function(r,o){if(t||o("=> '"+e.src+"' 不能为空或不合法"),"WEB"===n.config.flag){var s=new Image;s.src=t,s.onload=function(){return r(s)},s.onerror=function(){return o("=> '"+e.src+"' 图片加载失败")}}else e[i]=r}))},t.prototype.drawImage=function(t,e,i,n,r){var o,s=this.config,a=this.ctx;return["WEB","MP-WX"].includes(s.flag)?o=t:["UNI-H5","UNI-MP","TARO-H5","TARO-MP"].includes(s.flag)&&(o=t.path),a.drawImage(o,e,i,n,r)},t.prototype.getLength=function(t){return s(t,"number")?t:s(t,"string")?this.changeUnits(t):0},t.prototype.changeUnits=function(t,e){var i=this;return void 0===e&&(e=1),Number(t.replace(/^([-]*[0-9.]*)([a-z%]*)$/,(function(t,n,r){var o={"%":function(t){return t*(e/100)},px:function(t){return 1*t},rem:function(t){return t*i.htmlFontSize}}[r];if(o)return o(n);var s=i.config.unitFunc;return s?s(n,r):n})))},t.prototype.$set=function(t,e,i){t&&"object"==typeof t&&m(t,e,i)},t.prototype.$computed=function(t,e,i){var n=this;Object.defineProperty(t,e,{get:function(){return i.call(n)}})},t.prototype.$watch=function(t,e,i){void 0===i&&(i={}),"object"==typeof e&&(e=(i=e).handler);var n=new b(this,t,e,i);return i.immediate&&e.call(this,n.value),function(){}},t}(),w=function(t){return Math.PI/180*t},x=function(t,e){return[+(Math.cos(t)*e).toFixed(8),+(Math.sin(t)*e).toFixed(8)]},z=function(t,e){var i=-t/e;return[i,-i*t+e]},I=function(t,e,i,n,r,o){var s;if(void 0===o&&(o=!0),Math.abs(r-n).toFixed(8)>=w(180).toFixed(8)){var a=(r+n)/2;return o?(I(t,e,i,n,a,o),I(t,e,i,a,r,o)):(I(t,e,i,a,r,o),I(t,e,i,n,a,o)),!1}o||(n=(s=[r,n])[0],r=s[1]);var u=x(n,i),h=u[0],c=u[1],l=x(r,i),f=l[0],d=l[1],p=z(h,c),g=p[0],m=p[1],v=z(f,d),b=v[0],y=v[1],k=(y-m)/(g-b),S=(b*m-g*y)/(b-g);isNaN(k)&&(Math.abs(h)===+i.toFixed(8)&&(k=h),Math.abs(f)===+i.toFixed(8)&&(k=f)),g===1/0||g===-1/0?S=b*k+y:b!==1/0&&b!==-1/0||(S=g*k+m),e.lineTo(h,c),t.indexOf("MP")>0?e.quadraticCurveTo(k,S,f,d):e.arcTo(k,S,f,d,i)},k=function(t,e,i,n,r,o,s,a){i||(i=s);var u=w(90/Math.PI/n*s),h=w(90/Math.PI/i*s),c=r+u,l=o-u,f=r+h,d=o-h;e.beginPath(),e.fillStyle=a,e.moveTo.apply(e,x(c,n)),I(t,e,n,c,l,!0),d>f?I(t,e,i,f,d,!1):e.lineTo.apply(e,x((r+o)/2,s/2/Math.abs(Math.sin((r-o)/2)))),e.closePath(),e.fill()},S=function(t,e,i,n,r,o,s){var a=Math.min(n,r);o>a/2&&(o=a/2),t.beginPath(),t.fillStyle=s,t.moveTo(e+o,i),t.lineTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath(),t.fill()},C={easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*(t/=n)*(t-2)+e}},T={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sin(t/n*(Math.PI/2))+e}},W={easeIn:function(t,e,i,n){return t>=n&&(t=n),0==t?e:i*Math.pow(2,10*(t/n-1))+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),t==n?e+i:i*(1-Math.pow(2,-10*t/n))+e}},O={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sqrt(1-(t=t/n-1)*t)+e}},_=Object.freeze({__proto__:null,quad:C,cubic:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t+1)+e}},quart:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*((t=t/n-1)*t*t*t-1)+e}},quint:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t*t*t+1)+e}},sine:T,expo:W,circ:O}),E=function(t){function o(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;return r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:.8},r.defaultStyle={},r._defaultStyle={fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",lineHeight:"",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},r.Radius=0,r.prizeRadius=0,r.prizeDeg=0,r.prizeRadian=0,r.rotateDeg=0,r.maxBtnRadius=0,r.startTime=0,r.endTime=0,r.stopDeg=0,r.endDeg=0,r.FPS=16.6,r.blockImgs=[[]],r.prizeImgs=[[]],r.btnImgs=[[]],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:r.buttons.map((function(t){return t.imgs}))}),r}return e(o,t),o.prototype.initData=function(t){this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},o.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){return i({gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:.8},t.defaultConfig)})),this.$computed(this,"_defaultStyle",(function(){return i({fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)}))},o.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){return t.init({btnImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},o.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this.config,s=this.ctx;this.Radius=Math.min(this.boxWidth,this.boxHeight)/2,null===(i=o.beforeInit)||void 0===i||i.call(this),s.translate(this.Radius,this.Radius),this.draw(),this.draw(),Object.keys(e).forEach((function(t){var i=t,n={blockImgs:"blocks",prizeImgs:"prizes",btnImgs:"buttons"}[i],o=e[i];o&&o.forEach((function(t,e){t&&t.forEach((function(t,o){r.loadAndCacheImg(n,e,i,o,(function(){r.draw()}))}))}))})),null===(n=o.afterInit)||void 0===n||n.call(this)},o.prototype.handleClick=function(t){var e,i=this.ctx;i.beginPath(),i.arc(0,0,this.maxBtnRadius,0,2*Math.PI,!1),i.isPointInPath(t.offsetX,t.offsetY)&&(this.startTime||null===(e=this.startCallback)||void 0===e||e.call(this,t))},o.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u=this;return r(this,(function(r){return(n=this[t][e])&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),this.loadImg(a.src,a).then((function(t){u[i][e][o]=t,s.call(u)})).catch((function(i){console.error(t+"["+e+"].imgs["+o+"] "+i)})),[2]):[2]}))}))},o.prototype.computedWidthAndHeight=function(t,e,i,n){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var r=this.getWidth(e.width,i);return[r,t.height*(r/t.width)]}if(!e.width&&e.height){var o=this.getHeight(e.height,n);return[t.width*(o/t.height),o]}return[this.getWidth(e.width,i),this.getHeight(e.height,n)]},o.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,o=n.ctx,s=n._defaultConfig,h=n._defaultStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(-this.Radius,-this.Radius,2*this.Radius,2*this.Radius),this.prizeRadius=this.blocks.reduce((function(t,e,n){return u(e.background)&&(o.beginPath(),o.fillStyle=e.background,o.arc(0,0,t,0,2*Math.PI,!1),o.fill()),e.imgs&&e.imgs.forEach((function(e,r){if(i.blockImgs[n]){var s=i.blockImgs[n][r];if(s){var a=i.computedWidthAndHeight(s,e,2*t,2*t),u=a[0],h=a[1],c=[i.getOffsetX(u),i.getHeight(e.top,2*t)-t],l=c[0],f=c[1];o.save(),e.rotate&&o.rotate(w(i.rotateDeg)),i.drawImage(s,l,f,u,h),o.restore()}}})),t-i.getLength(e.padding&&e.padding.split(" ")[0])}),this.Radius),this.prizeDeg=360/this.prizes.length,this.prizeRadian=w(this.prizeDeg);var c=w(-90+this.rotateDeg+s.offsetDegree),l=function(t){return i.getOffsetX(o.measureText(t).width)},f=function(t,e,n){var r=t.lineHeight||h.lineHeight||t.fontSize||h.fontSize;return i.getHeight(t.top,e)+(n+1)*i.getLength(r)};o.save(),this.prizes.forEach((function(t,e){var n=c+e*i.prizeRadian,d=i.prizeRadius-i.maxBtnRadius,p=t.background||h.background;u(p)&&function(t,e,i,n,r,o,s,a){s?k(t,e,i,n,r,o,s,a):(e.beginPath(),e.fillStyle=a,e.moveTo(0,0),e.arc(0,0,n,r,o,!1),e.closePath(),e.fill())}(r.flag,o,i.maxBtnRadius,i.prizeRadius,n-i.prizeRadian/2,n+i.prizeRadian/2,i.getLength(s.gutter),p);var g=Math.cos(n)*i.prizeRadius,m=Math.sin(n)*i.prizeRadius;o.translate(g,m),o.rotate(n+w(90)),t.imgs&&t.imgs.forEach((function(t,n){if(i.prizeImgs[e]){var r=i.prizeImgs[e][n];if(r){var o=i.computedWidthAndHeight(r,t,i.prizeRadian*i.prizeRadius,d),s=o[0],a=o[1],u=[i.getOffsetX(s),i.getHeight(t.top,d)],h=u[0],c=u[1];i.drawImage(r,h,c,s,a)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,n=t.fontWeight||h.fontWeight,r=i.getLength(t.fontSize||h.fontSize),u=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=n+" "+(r>>0)+"px "+u;var c=[],p=String(t.text);if(Object.prototype.hasOwnProperty.call(t,"wordWrap")?t.wordWrap:h.wordWrap){p=a(p);for(var g="",m=0;m<p.length;m++){g+=p[m];var v=o.measureText(g).width,b=(i.prizeRadius-f(t,d,c.length))*Math.tan(i.prizeRadian/2)*2-i.getLength(s.gutter);v>i.getWidth(t.lengthLimit||h.lengthLimit,b)&&(c.push(g.slice(0,-1)),g=p[m])}g&&c.push(g),c.length||c.push(p)}else c=p.split("\n");c.filter((function(t){return!!t})).forEach((function(e,i){o.fillText(e,l(e),f(t,d,i))}))})),o.rotate(w(360)-n-w(90)),o.translate(-g,-m)})),o.restore(),this.buttons.forEach((function(t,e){var n=i.getHeight(t.radius);i.maxBtnRadius=Math.max(i.maxBtnRadius,n),u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.arc(0,0,n,0,2*Math.PI,!1),o.fill()),t.pointer&&u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.moveTo(-n,0),o.lineTo(n,0),o.lineTo(0,2*-n),o.closePath(),o.fill()),t.imgs&&t.imgs.forEach((function(t,r){if(i.btnImgs[e]){var o=i.btnImgs[e][r];if(o){var s=i.computedWidthAndHeight(o,t,2*n,2*n),a=s[0],u=s[1],h=[i.getOffsetX(a),i.getHeight(t.top,n)],c=h[0],l=h[1];i.drawImage(o,c,l,a,u)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,r=t.fontWeight||h.fontWeight,s=i.getLength(t.fontSize||h.fontSize),a=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=r+" "+(s>>0)+"px "+a,String(t.text).split("\n").forEach((function(e,i){o.fillText(e,l(e),f(t,n,i))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,o)},o.prototype.play=function(){this.startTime||(this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},o.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.rotateDeg=this.prizeDeg/2-this._defaultConfig.offsetDegree,this.draw())},o.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.prizeFlag,r=e.prizeDeg,o=e.rotateDeg,s=e._defaultConfig,a=Date.now()-this.startTime;if(a>=s.accelerationTime&&void 0!==n){this.FPS=a/t,this.endTime=Date.now(),this.stopDeg=o;for(var u=(Math.random()*r-r/2)*this.getLength(s.stopRange),h=0;++h;){var c=360*h-n*r-o-s.offsetDegree+u;if(_[s.speedFunction].easeOut(this.FPS,this.stopDeg,c,s.decelerationTime)-this.stopDeg>s.speed){this.endDeg=c;break}}return this.slowDown()}this.rotateDeg=(o+_[s.speedFunction].easeIn(a,0,s.speed,s.accelerationTime))%360,this.draw(),i(this.run.bind(this,t+1))},o.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopDeg,a=e.endDeg,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>=u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.rotateDeg=_[u.speedFunction].easeOut(h,s,a,u.decelerationTime)%360,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},o.prototype.getWidth=function(t,e){return void 0===e&&(e=this.prizeRadian*this.prizeRadius),s(t,"number")?t:s(t,"string")?this.changeUnits(t,e):0},o.prototype.getHeight=function(t,e){return void 0===e&&(e=this.prizeRadius),s(t,"number")?t:s(t,"string")?this.changeUnits(t,e):0},o.prototype.getOffsetX=function(t){return-t/2},o.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr-this.Radius,e/i.dpr-this.Radius]},o}(y),P=function(t){function h(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;r.rows=3,r.cols=3,r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},r.defaultStyle={},r._defaultStyle={borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",lineHeight:"",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},r.activeStyle={},r._activeStyle={background:"#ffce98",shadow:"",fontStyle:"",fontWeight:"",fontSize:"",lineHeight:"",fontColor:""},r.cellWidth=0,r.cellHeight=0,r.startTime=0,r.endTime=0,r.currIndex=0,r.stopIndex=0,r.endIndex=0,r.demo=!1,r.timer=0,r.FPS=16.6,r.prizeFlag=-1,r.cells=[],r.blockImgs=[[]],r.btnImgs=[[]],r.prizeImgs=[],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r);var o=r.buttons.map((function(t){return t.imgs}));return r.button&&o.push(r.button.imgs),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:o}),r}return e(h,t),h.prototype.initData=function(t){this.$set(this,"rows",Number(t.rows)||3),this.$set(this,"cols",Number(t.cols)||3),this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"button",t.button),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"activeStyle",t.activeStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},h.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){var e=i({gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},t.defaultConfig);return e.gutter=t.getLength(e.gutter),e.speed=e.speed/40,e})),this.$computed(this,"_defaultStyle",(function(){return i({borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)})),this.$computed(this,"_activeStyle",(function(){return i({background:"#ffce98",shadow:""},t.activeStyle)}))},h.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){var i=e.map((function(t){return t.imgs}));return t.button&&i.push(t.button.imgs),t.init({btnImgs:i})}),{deep:!0}),this.$watch("button",(function(){var e=t.buttons.map((function(t){return t.imgs}));return t.button&&e.push(t.button.imgs),t.init({btnImgs:e})}),{deep:!0}),this.$watch("rows",(function(){return t.init({})})),this.$watch("cols",(function(){return t.init({})})),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("activeStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},h.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this,s=o.config;o.ctx,o.button,null===(i=s.beforeInit)||void 0===i||i.call(this),this.draw(),Object.keys(e).forEach((function(t){var i=t,n=e[i],o={blockImgs:"blocks",prizeImgs:"prizes",btnImgs:"buttons"}[i];n&&n.forEach((function(t,e){t&&t.forEach((function(t,n){r.loadAndCacheImg(o,e,i,n,(function(){r.draw()}))}))}))})),null===(n=s.afterInit)||void 0===n||n.call(this)},h.prototype.handleClick=function(t){var e=this,i=this.ctx;o(o([],this.buttons),[this.button]).forEach((function(n){var r;if(n){var o=e.getGeometricProperty([n.x,n.y,n.col||1,n.row||1]),s=o[0],a=o[1],u=o[2],h=o[3];i.beginPath(),i.rect(s,a,u,h),i.isPointInPath(t.offsetX,t.offsetY)&&(e.startTime||("function"==typeof n.callback&&n.callback.call(e,n),null===(r=e.startCallback)||void 0===r||r.call(e,t,n)))}}))},h.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u,h=this;return r(this,(function(r){return n=this[t][e],"buttons"===t&&!this.buttons.length&&this.button&&(n=this.button),n&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),u=[this.loadImg(a.src,a),a.activeSrc&&this.loadImg(a.activeSrc,a,"$activeResolve")],Promise.all(u).then((function(t){var n=t[0],r=t[1];h[i][e][o]={defaultImg:n,activeImg:r},s.call(h)})).catch((function(i){console.error(t+"["+e+"].imgs["+o+"] "+i)})),[2]):[2]}))}))},h.prototype.computedWidthAndHeight=function(t,e,i){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var n=this.getWidth(e.width,i.col);return[n,t.height*(n/t.width)]}if(!e.width&&e.height){var r=this.getHeight(e.height,i.row);return[t.width*(r/t.height),r]}return[this.getWidth(e.width,i.col),this.getHeight(e.height,i.row)]},h.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,h=n.ctx,c=n._defaultConfig,l=n._defaultStyle,f=n._activeStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,h),h.clearRect(0,0,this.boxWidth,this.boxHeight),this.cells=o(o([],this.prizes),this.buttons),this.button&&this.cells.push(this.button),this.cells.forEach((function(t){t.col=t.col||1,t.row=t.row||1})),this.prizeArea=this.blocks.reduce((function(t,e){var n=t.x,r=t.y,o=t.w,a=t.h,c=function(t){var e,i=(null===(e=t.padding)||void 0===e?void 0:e.replace(/px/g,"").split(" ").map((function(t){return~~t})))||[0],n=0,r=0,o=0,a=0;switch(i.length){case 1:n=r=o=a=i[0];break;case 2:n=r=i[0],o=a=i[1];break;case 3:n=i[0],o=a=i[1],r=i[2];break;default:n=i[0],r=i[1],o=i[2],a=i[3]}var u={paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:a};for(var h in u)u[h]=Object.prototype.hasOwnProperty.call(t,h)&&s(t[h],"string","number")?~~String(t[h]).replace(/px/g,""):u[h];return[n,r,o,a]}(e),f=c[0],d=c[1],p=c[2],g=c[3],m=e.borderRadius?i.getLength(e.borderRadius):0,v=e.background||l.background;return u(v)&&S(h,n,r,o,a,m,i.handleBackground(n,r,o,a,v)),{x:n+p,y:r+f,w:o-p-g,h:a-f-d}}),{x:0,y:0,w:this.boxWidth,h:this.boxHeight}),this.cellWidth=(this.prizeArea.w-c.gutter*(this.cols-1))/this.cols,this.cellHeight=(this.prizeArea.h-c.gutter*(this.rows-1))/this.rows,this.cells.forEach((function(t,e){var n=i.getGeometricProperty([t.x,t.y,t.col,t.row]),o=n[0],s=n[1],c=n[2],d=n[3],p=!1;(void 0===i.prizeFlag||i.prizeFlag>-1)&&(p=e===i.currIndex%i.prizes.length>>0);var g=p?f.background:t.background||l.background;if(u(g)){var m=(p?f.shadow:t.shadow||l.shadow).replace(/px/g,"").split(",")[0].split(" ").map((function(t,e){return e<3?Number(t):t}));4===m.length&&(h.shadowColor=m[3],h.shadowOffsetX=m[0]*r.dpr,h.shadowOffsetY=m[1]*r.dpr,h.shadowBlur=m[2],m[0]>0?c-=m[0]:(c+=m[0],o-=m[0]),m[1]>0?d-=m[1]:(d+=m[1],s-=m[1])),S(h,o,s,c,d,i.getLength(t.borderRadius?t.borderRadius:l.borderRadius),i.handleBackground(o,s,c,d,g)),h.shadowColor="rgba(0, 0, 0, 0)",h.shadowOffsetX=0,h.shadowOffsetY=0,h.shadowBlur=0}var v="prizeImgs";e>=i.prizes.length&&(v="btnImgs",e-=i.prizes.length),t.imgs&&t.imgs.forEach((function(n,r){if(i[v][e]){var a=i[v][e][r];if(a){var u=p&&a.activeImg||a.defaultImg;if(u){var h=i.computedWidthAndHeight(u,n,t),c=h[0],l=h[1],f=[o+i.getOffsetX(c,t.col),s+i.getHeight(n.top,t.row)],d=f[0],g=f[1];i.drawImage(u,d,g,c,l)}}}})),t.fonts&&t.fonts.forEach((function(e){var n=p&&f.fontStyle?f.fontStyle:e.fontStyle||l.fontStyle,r=p&&f.fontWeight?f.fontWeight:e.fontWeight||l.fontWeight,u=p&&f.fontSize?i.getLength(f.fontSize):i.getLength(e.fontSize||l.fontSize),c=p&&f.lineHeight?f.lineHeight:e.lineHeight||l.lineHeight||e.fontSize||l.fontSize;h.font=r+" "+(u>>0)+"px "+n,h.fillStyle=p&&f.fontColor?f.fontColor:e.fontColor||l.fontColor;var d=[],g=String(e.text);if(Object.prototype.hasOwnProperty.call(e,"wordWrap")?e.wordWrap:l.wordWrap){g=a(g);for(var m="",v=0;v<g.length;v++){m+=g[v],h.measureText(m).width>i.getWidth(e.lengthLimit||l.lengthLimit,t.col)&&(d.push(m.slice(0,-1)),m=g[v])}m&&d.push(m),d.length||d.push(g)}else d=g.split("\n");d.forEach((function(n,r){h.fillText(n,o+i.getOffsetX(h.measureText(n).width,t.col),s+i.getHeight(e.top,t.row)+(r+1)*i.getLength(c))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,h)},h.prototype.handleBackground=function(t,e,i,n,r){var o=this.ctx;return r.includes("linear-gradient")&&(r=function(t,e,i,n,r,o){var s=/linear-gradient\((.+)\)/.exec(o)[1].split(",").map((function(t){return t.trim()})),a=s.shift(),u=[0,0,0,0];if(a.includes("deg")){var h=function(t){return Math.tan(t/180*Math.PI)};(a=a.slice(0,-3)%360)>=0&&a<45?u=[e,i+r,e+n,i+r-n*h(a-0)]:a>=45&&a<90?u=[e,i+r,e+n-r*h(a-45),i]:a>=90&&a<135?u=[e+n,i+r,e+n-r*h(a-90),i]:a>=135&&a<180?u=[e+n,i+r,e,i+n*h(a-135)]:a>=180&&a<225?u=[e+n,i,e,i+n*h(a-180)]:a>=225&&a<270?u=[e+n,i,e+r*h(a-225),i+r]:a>=270&&a<315?u=[e,i,e+r*h(a-270),i+r]:a>=315&&a<360&&(u=[e,i,e+n,i+r-n*h(a-315)])}else a.includes("top")?u=[e,i+r,e,i]:a.includes("bottom")?u=[e,i,e,i+r]:a.includes("left")?u=[e+n,i,e,i]:a.includes("right")&&(u=[e,i,e+n,i]);var c=t.createLinearGradient.apply(t,u.map((function(t){return t>>0})));return s.reduce((function(t,e,i){var n=e.split(" ");return 1===n.length?t.addColorStop(i,n[0]):2===n.length&&t.addColorStop.apply(t,n),t}),c)}(o,t,e,i,n,r)),r},h.prototype.play=function(){var t=this.config.clearInterval;this.startTime||(t(this.timer),this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},h.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.currIndex=0,this.draw())},h.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.currIndex,r=e.prizes,o=e.prizeFlag,s=e.startTime,a=e._defaultConfig,u=Date.now()-s;if(u>=a.accelerationTime&&void 0!==o){this.FPS=u/t,this.endTime=Date.now(),this.stopIndex=n;for(var h=0;++h;){var c=r.length*h+o-(n>>0);if(C.easeOut(this.FPS,this.stopIndex,c,a.decelerationTime)-this.stopIndex>a.speed){this.endIndex=c;break}}return this.slowDown()}this.currIndex=(n+C.easeIn(u,.1,a.speed,a.accelerationTime))%r.length,this.draw(),i(this.run.bind(this,t+1))},h.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopIndex,a=e.endIndex,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.currIndex=C.easeOut(h,s,a,u.decelerationTime)%r.length,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},h.prototype.walk=function(){var t=this,e=this.config,i=e.setInterval;(0,e.clearInterval)(this.timer),this.timer=i((function(){t.currIndex+=1,t.draw()}),1300)},h.prototype.getGeometricProperty=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=this.cellWidth,s=this.cellHeight,a=this._defaultConfig.gutter,u=[this.prizeArea.x+(o+a)*e,this.prizeArea.y+(s+a)*i];return n&&r&&u.push(o*n+a*(n-1),s*r+a*(r-1)),u},h.prototype.getWidth=function(t,e){return void 0===e&&(e=1),s(t,"number")?t:s(t,"string")?this.changeUnits(t,this.cellWidth*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getHeight=function(t,e){return void 0===e&&(e=1),s(t,"number")?t:s(t,"string")?this.changeUnits(t,this.cellHeight*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getOffsetX=function(t,e){return void 0===e&&(e=1),(this.cellWidth*e+this._defaultConfig.gutter*(e-1)-t)/2},h.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr,e/i.dpr]},h}(y);exports.LuckyGrid=P,exports.LuckyWheel=E;
  28 +
  29 +}, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  30 +return __REQUIRE__(1625793648862);
  31 +})()
  32 +//miniprogram-npm-outsideDeps=[]
  33 +//# sourceMappingURL=index.js.map
0 34 \ No newline at end of file
... ...
packageB/miniprogram_npm/lucky-canvas/index.js.map 0 → 100644
  1 +{"version":3,"sources":["index.js","dist/lucky-canvas.cjs.min.js"],"names":[],"mappings":";;;;;;;AAAA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.js","sourcesContent":["module.exports = require('./dist/lucky-canvas.cjs.min.js')\r\n","Object.defineProperty(exports,\"__esModule\",{value:!0});\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nvar t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Class extends value \"+String(i)+\" is not a constructor or null\");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function n(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function o(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t}String.prototype.includes||(String.prototype.includes=function(t,e){return\"number\"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.find||Object.defineProperty(Array.prototype,\"find\",{value:function(t){if(null==this)throw new TypeError('\"this\" is null or not defined');var e=Object(this),i=e.length>>>0;if(\"function\"!=typeof t)throw new TypeError(\"predicate must be a function\");for(var n=arguments[1],r=0;r<i;){var o=e[r];if(t.call(n,o,r,e))return o;r++}}});var s=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.some((function(e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}))},a=function(t){return[].filter.call(t,(function(t){return\"\\n\"!==t})).join(\"\")},u=function(t){if(\"string\"!=typeof t)return!1;if(\"transparent\"===(t=t.toLocaleLowerCase().trim()))return!1;if(/^rgba/.test(t)){var e=/([^\\s,]+)\\)$/.exec(t);if(0===(null===(i=e)?0:\"object\"==typeof i?NaN:\"number\"==typeof i?i:\"string\"==typeof i?\"%\"===i[i.length-1]?Number(i.slice(0,-1))/100:Number(i):NaN))return!1}var i;return!0},h=function(){function t(){this.subs=[]}return t.prototype.addSub=function(t){this.subs.includes(t)||this.subs.push(t)},t.prototype.notify=function(){this.subs.forEach((function(t){t.update()}))},t}(),c=\"__proto__\"in{};function l(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}var f=Array.prototype,d=Object.create(f);[\"push\",\"pop\",\"shift\",\"unshift\",\"sort\",\"splice\",\"reverse\"].forEach((function(t){d[t]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=f[t].apply(this,e),r=this.__luckyOb__;return[\"push\",\"unshift\",\"splice\"].includes(t)&&r.walk(this),r.dep.notify(),n}}));var p=function(){function t(t){this.dep=new h,l(t,\"__luckyOb__\",this),Array.isArray(t)&&(c?t.__proto__=d:Object.getOwnPropertyNames(d).forEach((function(e){l(t,e,d[e])}))),this.walk(t)}return t.prototype.walk=function(t){Object.keys(t).forEach((function(e){m(t,e,t[e])}))},t}();function g(t){if(t&&\"object\"==typeof t)return\"__luckyOb__\"in t?t.__luckyOb__:new p(t)}function m(t,e,i){var n=new h,r=Object.getOwnPropertyDescriptor(t,e);if(!r||!1!==r.configurable){var o=r&&r.get,s=r&&r.set;o&&!s||2!==arguments.length||(i=t[e]);var a=g(i);Object.defineProperty(t,e,{get:function(){var e=o?o.call(t):i;return h.target&&(n.addSub(h.target),a&&a.dep.addSub(h.target)),e},set:function(e){e!==i&&(i=e,o&&!s||(s?s.call(t,e):i=e,a=g(e),n.notify()))}})}}var v=0,b=function(){function t(t,e,i,n){void 0===n&&(n={}),this.id=v++,this.$lucky=t,this.expr=e,this.deep=!!n.deep,this.getter=\"function\"==typeof e?e:function(t){t+=\".\";for(var e=[],i=\"\",n=0;n<t.length;n++){var r=t[n];if(/\\[|\\./.test(r))e.push(i),i=\"\";else{if(/\\W/.test(r))continue;i+=r}}return function(t){return e.reduce((function(t,e){return t[e]}),t)}}(e),this.cb=i,this.value=this.get()}return t.prototype.get=function(){h.target=this;var t=this.getter.call(this.$lucky,this.$lucky);return this.deep&&function(t){var e=function(t){s(t,\"array\",\"object\")&&Object.keys(t).forEach((function(i){var n=t[i];e(n)}))};e(t)}(t),h.target=null,t},t.prototype.update=function(){var t=this.get(),e=this.value;this.value=t,this.cb.call(this.$lucky,t,e)},t}(),y=function(){function t(t){var e=this;this.htmlFontSize=16,this.rAF=function(){},this.boxWidth=0,this.boxHeight=0,this.setHTMLFontSize(),\"string\"==typeof t?t={el:t}:1===t.nodeType&&(t={el:\"\",divElement:t}),t=t,this.config=t,this.setDpr(),this.initWindowFunction(),t.flag||(t.flag=\"WEB\"),Object.prototype.hasOwnProperty.call(t,\"ob\")||(t.ob=!0),t.el&&(t.divElement=document.querySelector(t.el)),t.divElement&&(t.canvasElement=document.createElement(\"canvas\"),t.divElement.appendChild(t.canvasElement)),this.resetWidthAndHeight(),t.canvasElement&&(t.ctx=t.canvasElement.getContext(\"2d\"),t.canvasElement.setAttribute(\"package\",\"lucky-canvas@1.5.4\"),t.canvasElement.addEventListener(\"click\",(function(t){return e.handleClick(t)})),t.canvasElement.addEventListener(\"mousemove\",(function(t){return e.handleMouseMove(t)})),t.canvasElement.addEventListener(\"mousedown\",(function(t){return e.handleMouseDown(t)})),t.canvasElement.addEventListener(\"mouseup\",(function(t){return e.handleMouseUp(t)}))),this.ctx=t.ctx,t.ctx?this.boxWidth&&this.boxHeight||console.error(\"无法获取到宽度或高度\"):console.error(\"无法获取到 CanvasContext2D\")}return t.prototype.init=function(t){this.setDpr(),this.setHTMLFontSize(),this.resetWidthAndHeight(),this.zoomCanvas()},t.prototype.handleClick=function(t){},t.prototype.handleMouseDown=function(t){},t.prototype.handleMouseUp=function(t){},t.prototype.handleMouseMove=function(t){},t.prototype.conversionAxis=function(t,e){return[0,0]},t.prototype.setDpr=function(){var t=this.config;t.dpr||(window?window.dpr=t.dpr=window.devicePixelRatio||1:t.dpr||console.error(t,\"未传入 dpr 可能会导致绘制异常\"))},t.prototype.setHTMLFontSize=function(){window&&(this.htmlFontSize=+window.getComputedStyle(document.documentElement).fontSize.slice(0,-2))},t.prototype.resetWidthAndHeight=function(){var t=this.config,e=0,i=0;t.divElement&&(e=t.divElement.offsetWidth,i=t.divElement.offsetHeight),this.boxWidth=this.getLength(t.width)||e,this.boxHeight=this.getLength(t.height)||i,t.divElement&&(t.divElement.style.overflow=\"hidden\",t.divElement.style.width=this.boxWidth+\"px\",t.divElement.style.height=this.boxHeight+\"px\")},t.prototype.initWindowFunction=function(){var t=this.config;if(window)return this.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.setTimeout=window.setTimeout,t.setInterval=window.setInterval,t.clearTimeout=window.clearTimeout,void(t.clearInterval=window.clearInterval);if(t.rAF)this.rAF=t.rAF;else if(t.setTimeout){var e=t.setTimeout;this.rAF=function(t){return e(t,16.7)}}else this.rAF=function(t){return setTimeout(t,16.7)}},t.prototype.zoomCanvas=function(){var t=this.config,e=this.ctx,i=t.canvasElement,n=t.dpr,r=[this.boxWidth*n,this.boxHeight*n],o=r[0],s=r[1],a=function(t){return(t*n-t)/(t*n)*(n/2)*100};i&&(i.width=o,i.height=s,i.style.width=o+\"px\",i.style.height=s+\"px\",i.style.transform=\"scale(\"+1/n+\") translate(\"+-a(o)+\"%, \"+-a(s)+\"%)\",e.scale(n,n))},t.prototype.loadImg=function(t,e,i){var n=this;return void 0===i&&(i=\"$resolve\"),new Promise((function(r,o){if(t||o(\"=> '\"+e.src+\"' 不能为空或不合法\"),\"WEB\"===n.config.flag){var s=new Image;s.src=t,s.onload=function(){return r(s)},s.onerror=function(){return o(\"=> '\"+e.src+\"' 图片加载失败\")}}else e[i]=r}))},t.prototype.drawImage=function(t,e,i,n,r){var o,s=this.config,a=this.ctx;return[\"WEB\",\"MP-WX\"].includes(s.flag)?o=t:[\"UNI-H5\",\"UNI-MP\",\"TARO-H5\",\"TARO-MP\"].includes(s.flag)&&(o=t.path),a.drawImage(o,e,i,n,r)},t.prototype.getLength=function(t){return s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t):0},t.prototype.changeUnits=function(t,e){var i=this;return void 0===e&&(e=1),Number(t.replace(/^([-]*[0-9.]*)([a-z%]*)$/,(function(t,n,r){var o={\"%\":function(t){return t*(e/100)},px:function(t){return 1*t},rem:function(t){return t*i.htmlFontSize}}[r];if(o)return o(n);var s=i.config.unitFunc;return s?s(n,r):n})))},t.prototype.$set=function(t,e,i){t&&\"object\"==typeof t&&m(t,e,i)},t.prototype.$computed=function(t,e,i){var n=this;Object.defineProperty(t,e,{get:function(){return i.call(n)}})},t.prototype.$watch=function(t,e,i){void 0===i&&(i={}),\"object\"==typeof e&&(e=(i=e).handler);var n=new b(this,t,e,i);return i.immediate&&e.call(this,n.value),function(){}},t}(),w=function(t){return Math.PI/180*t},x=function(t,e){return[+(Math.cos(t)*e).toFixed(8),+(Math.sin(t)*e).toFixed(8)]},z=function(t,e){var i=-t/e;return[i,-i*t+e]},I=function(t,e,i,n,r,o){var s;if(void 0===o&&(o=!0),Math.abs(r-n).toFixed(8)>=w(180).toFixed(8)){var a=(r+n)/2;return o?(I(t,e,i,n,a,o),I(t,e,i,a,r,o)):(I(t,e,i,a,r,o),I(t,e,i,n,a,o)),!1}o||(n=(s=[r,n])[0],r=s[1]);var u=x(n,i),h=u[0],c=u[1],l=x(r,i),f=l[0],d=l[1],p=z(h,c),g=p[0],m=p[1],v=z(f,d),b=v[0],y=v[1],k=(y-m)/(g-b),S=(b*m-g*y)/(b-g);isNaN(k)&&(Math.abs(h)===+i.toFixed(8)&&(k=h),Math.abs(f)===+i.toFixed(8)&&(k=f)),g===1/0||g===-1/0?S=b*k+y:b!==1/0&&b!==-1/0||(S=g*k+m),e.lineTo(h,c),t.indexOf(\"MP\")>0?e.quadraticCurveTo(k,S,f,d):e.arcTo(k,S,f,d,i)},k=function(t,e,i,n,r,o,s,a){i||(i=s);var u=w(90/Math.PI/n*s),h=w(90/Math.PI/i*s),c=r+u,l=o-u,f=r+h,d=o-h;e.beginPath(),e.fillStyle=a,e.moveTo.apply(e,x(c,n)),I(t,e,n,c,l,!0),d>f?I(t,e,i,f,d,!1):e.lineTo.apply(e,x((r+o)/2,s/2/Math.abs(Math.sin((r-o)/2)))),e.closePath(),e.fill()},S=function(t,e,i,n,r,o,s){var a=Math.min(n,r);o>a/2&&(o=a/2),t.beginPath(),t.fillStyle=s,t.moveTo(e+o,i),t.lineTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath(),t.fill()},C={easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*(t/=n)*(t-2)+e}},T={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sin(t/n*(Math.PI/2))+e}},W={easeIn:function(t,e,i,n){return t>=n&&(t=n),0==t?e:i*Math.pow(2,10*(t/n-1))+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),t==n?e+i:i*(1-Math.pow(2,-10*t/n))+e}},O={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sqrt(1-(t=t/n-1)*t)+e}},_=Object.freeze({__proto__:null,quad:C,cubic:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t+1)+e}},quart:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*((t=t/n-1)*t*t*t-1)+e}},quint:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t*t*t+1)+e}},sine:T,expo:W,circ:O}),E=function(t){function o(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;return r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:\"0px\",offsetDegree:0,speed:20,speedFunction:\"quad\",accelerationTime:2500,decelerationTime:2500,stopRange:.8},r.defaultStyle={},r._defaultStyle={fontSize:\"18px\",fontColor:\"#000\",fontStyle:\"sans-serif\",fontWeight:\"400\",lineHeight:\"\",background:\"rgba(0,0,0,0)\",wordWrap:!0,lengthLimit:\"90%\"},r.Radius=0,r.prizeRadius=0,r.prizeDeg=0,r.prizeRadian=0,r.rotateDeg=0,r.maxBtnRadius=0,r.startTime=0,r.endTime=0,r.stopDeg=0,r.endDeg=0,r.FPS=16.6,r.blockImgs=[[]],r.prizeImgs=[[]],r.btnImgs=[[]],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:r.buttons.map((function(t){return t.imgs}))}),r}return e(o,t),o.prototype.initData=function(t){this.$set(this,\"blocks\",t.blocks||[]),this.$set(this,\"prizes\",t.prizes||[]),this.$set(this,\"buttons\",t.buttons||[]),this.$set(this,\"defaultConfig\",t.defaultConfig||{}),this.$set(this,\"defaultStyle\",t.defaultStyle||{}),this.$set(this,\"startCallback\",t.start),this.$set(this,\"endCallback\",t.end)},o.prototype.initComputed=function(){var t=this;this.$computed(this,\"_defaultConfig\",(function(){return i({gutter:\"0px\",offsetDegree:0,speed:20,speedFunction:\"quad\",accelerationTime:2500,decelerationTime:2500,stopRange:.8},t.defaultConfig)})),this.$computed(this,\"_defaultStyle\",(function(){return i({fontSize:\"18px\",fontColor:\"#000\",fontStyle:\"sans-serif\",fontWeight:\"400\",background:\"rgba(0,0,0,0)\",wordWrap:!0,lengthLimit:\"90%\"},t.defaultStyle)}))},o.prototype.initWatch=function(){var t=this;this.$watch(\"blocks\",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"prizes\",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"buttons\",(function(e){return t.init({btnImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"defaultConfig\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"defaultStyle\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"startCallback\",(function(){return t.init({})})),this.$watch(\"endCallback\",(function(){return t.init({})}))},o.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this.config,s=this.ctx;this.Radius=Math.min(this.boxWidth,this.boxHeight)/2,null===(i=o.beforeInit)||void 0===i||i.call(this),s.translate(this.Radius,this.Radius),this.draw(),this.draw(),Object.keys(e).forEach((function(t){var i=t,n={blockImgs:\"blocks\",prizeImgs:\"prizes\",btnImgs:\"buttons\"}[i],o=e[i];o&&o.forEach((function(t,e){t&&t.forEach((function(t,o){r.loadAndCacheImg(n,e,i,o,(function(){r.draw()}))}))}))})),null===(n=o.afterInit)||void 0===n||n.call(this)},o.prototype.handleClick=function(t){var e,i=this.ctx;i.beginPath(),i.arc(0,0,this.maxBtnRadius,0,2*Math.PI,!1),i.isPointInPath(t.offsetX,t.offsetY)&&(this.startTime||null===(e=this.startCallback)||void 0===e||e.call(this,t))},o.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u=this;return r(this,(function(r){return(n=this[t][e])&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),this.loadImg(a.src,a).then((function(t){u[i][e][o]=t,s.call(u)})).catch((function(i){console.error(t+\"[\"+e+\"].imgs[\"+o+\"] \"+i)})),[2]):[2]}))}))},o.prototype.computedWidthAndHeight=function(t,e,i,n){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var r=this.getWidth(e.width,i);return[r,t.height*(r/t.width)]}if(!e.width&&e.height){var o=this.getHeight(e.height,n);return[t.width*(o/t.height),o]}return[this.getWidth(e.width,i),this.getHeight(e.height,n)]},o.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,o=n.ctx,s=n._defaultConfig,h=n._defaultStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(-this.Radius,-this.Radius,2*this.Radius,2*this.Radius),this.prizeRadius=this.blocks.reduce((function(t,e,n){return u(e.background)&&(o.beginPath(),o.fillStyle=e.background,o.arc(0,0,t,0,2*Math.PI,!1),o.fill()),e.imgs&&e.imgs.forEach((function(e,r){if(i.blockImgs[n]){var s=i.blockImgs[n][r];if(s){var a=i.computedWidthAndHeight(s,e,2*t,2*t),u=a[0],h=a[1],c=[i.getOffsetX(u),i.getHeight(e.top,2*t)-t],l=c[0],f=c[1];o.save(),e.rotate&&o.rotate(w(i.rotateDeg)),i.drawImage(s,l,f,u,h),o.restore()}}})),t-i.getLength(e.padding&&e.padding.split(\" \")[0])}),this.Radius),this.prizeDeg=360/this.prizes.length,this.prizeRadian=w(this.prizeDeg);var c=w(-90+this.rotateDeg+s.offsetDegree),l=function(t){return i.getOffsetX(o.measureText(t).width)},f=function(t,e,n){var r=t.lineHeight||h.lineHeight||t.fontSize||h.fontSize;return i.getHeight(t.top,e)+(n+1)*i.getLength(r)};o.save(),this.prizes.forEach((function(t,e){var n=c+e*i.prizeRadian,d=i.prizeRadius-i.maxBtnRadius,p=t.background||h.background;u(p)&&function(t,e,i,n,r,o,s,a){s?k(t,e,i,n,r,o,s,a):(e.beginPath(),e.fillStyle=a,e.moveTo(0,0),e.arc(0,0,n,r,o,!1),e.closePath(),e.fill())}(r.flag,o,i.maxBtnRadius,i.prizeRadius,n-i.prizeRadian/2,n+i.prizeRadian/2,i.getLength(s.gutter),p);var g=Math.cos(n)*i.prizeRadius,m=Math.sin(n)*i.prizeRadius;o.translate(g,m),o.rotate(n+w(90)),t.imgs&&t.imgs.forEach((function(t,n){if(i.prizeImgs[e]){var r=i.prizeImgs[e][n];if(r){var o=i.computedWidthAndHeight(r,t,i.prizeRadian*i.prizeRadius,d),s=o[0],a=o[1],u=[i.getOffsetX(s),i.getHeight(t.top,d)],h=u[0],c=u[1];i.drawImage(r,h,c,s,a)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,n=t.fontWeight||h.fontWeight,r=i.getLength(t.fontSize||h.fontSize),u=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=n+\" \"+(r>>0)+\"px \"+u;var c=[],p=String(t.text);if(Object.prototype.hasOwnProperty.call(t,\"wordWrap\")?t.wordWrap:h.wordWrap){p=a(p);for(var g=\"\",m=0;m<p.length;m++){g+=p[m];var v=o.measureText(g).width,b=(i.prizeRadius-f(t,d,c.length))*Math.tan(i.prizeRadian/2)*2-i.getLength(s.gutter);v>i.getWidth(t.lengthLimit||h.lengthLimit,b)&&(c.push(g.slice(0,-1)),g=p[m])}g&&c.push(g),c.length||c.push(p)}else c=p.split(\"\\n\");c.filter((function(t){return!!t})).forEach((function(e,i){o.fillText(e,l(e),f(t,d,i))}))})),o.rotate(w(360)-n-w(90)),o.translate(-g,-m)})),o.restore(),this.buttons.forEach((function(t,e){var n=i.getHeight(t.radius);i.maxBtnRadius=Math.max(i.maxBtnRadius,n),u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.arc(0,0,n,0,2*Math.PI,!1),o.fill()),t.pointer&&u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.moveTo(-n,0),o.lineTo(n,0),o.lineTo(0,2*-n),o.closePath(),o.fill()),t.imgs&&t.imgs.forEach((function(t,r){if(i.btnImgs[e]){var o=i.btnImgs[e][r];if(o){var s=i.computedWidthAndHeight(o,t,2*n,2*n),a=s[0],u=s[1],h=[i.getOffsetX(a),i.getHeight(t.top,n)],c=h[0],l=h[1];i.drawImage(o,c,l,a,u)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,r=t.fontWeight||h.fontWeight,s=i.getLength(t.fontSize||h.fontSize),a=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=r+\" \"+(s>>0)+\"px \"+a,String(t.text).split(\"\\n\").forEach((function(e,i){o.fillText(e,l(e),f(t,n,i))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,o)},o.prototype.play=function(){this.startTime||(this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},o.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.rotateDeg=this.prizeDeg/2-this._defaultConfig.offsetDegree,this.draw())},o.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.prizeFlag,r=e.prizeDeg,o=e.rotateDeg,s=e._defaultConfig,a=Date.now()-this.startTime;if(a>=s.accelerationTime&&void 0!==n){this.FPS=a/t,this.endTime=Date.now(),this.stopDeg=o;for(var u=(Math.random()*r-r/2)*this.getLength(s.stopRange),h=0;++h;){var c=360*h-n*r-o-s.offsetDegree+u;if(_[s.speedFunction].easeOut(this.FPS,this.stopDeg,c,s.decelerationTime)-this.stopDeg>s.speed){this.endDeg=c;break}}return this.slowDown()}this.rotateDeg=(o+_[s.speedFunction].easeIn(a,0,s.speed,s.accelerationTime))%360,this.draw(),i(this.run.bind(this,t+1))},o.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopDeg,a=e.endDeg,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>=u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.rotateDeg=_[u.speedFunction].easeOut(h,s,a,u.decelerationTime)%360,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},o.prototype.getWidth=function(t,e){return void 0===e&&(e=this.prizeRadian*this.prizeRadius),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,e):0},o.prototype.getHeight=function(t,e){return void 0===e&&(e=this.prizeRadius),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,e):0},o.prototype.getOffsetX=function(t){return-t/2},o.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr-this.Radius,e/i.dpr-this.Radius]},o}(y),P=function(t){function h(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;r.rows=3,r.cols=3,r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},r.defaultStyle={},r._defaultStyle={borderRadius:20,fontColor:\"#000\",fontSize:\"18px\",fontStyle:\"sans-serif\",fontWeight:\"400\",lineHeight:\"\",background:\"rgba(0,0,0,0)\",shadow:\"\",wordWrap:!0,lengthLimit:\"90%\"},r.activeStyle={},r._activeStyle={background:\"#ffce98\",shadow:\"\",fontStyle:\"\",fontWeight:\"\",fontSize:\"\",lineHeight:\"\",fontColor:\"\"},r.cellWidth=0,r.cellHeight=0,r.startTime=0,r.endTime=0,r.currIndex=0,r.stopIndex=0,r.endIndex=0,r.demo=!1,r.timer=0,r.FPS=16.6,r.prizeFlag=-1,r.cells=[],r.blockImgs=[[]],r.btnImgs=[[]],r.prizeImgs=[],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r);var o=r.buttons.map((function(t){return t.imgs}));return r.button&&o.push(r.button.imgs),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:o}),r}return e(h,t),h.prototype.initData=function(t){this.$set(this,\"rows\",Number(t.rows)||3),this.$set(this,\"cols\",Number(t.cols)||3),this.$set(this,\"blocks\",t.blocks||[]),this.$set(this,\"prizes\",t.prizes||[]),this.$set(this,\"buttons\",t.buttons||[]),this.$set(this,\"button\",t.button),this.$set(this,\"defaultConfig\",t.defaultConfig||{}),this.$set(this,\"defaultStyle\",t.defaultStyle||{}),this.$set(this,\"activeStyle\",t.activeStyle||{}),this.$set(this,\"startCallback\",t.start),this.$set(this,\"endCallback\",t.end)},h.prototype.initComputed=function(){var t=this;this.$computed(this,\"_defaultConfig\",(function(){var e=i({gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},t.defaultConfig);return e.gutter=t.getLength(e.gutter),e.speed=e.speed/40,e})),this.$computed(this,\"_defaultStyle\",(function(){return i({borderRadius:20,fontColor:\"#000\",fontSize:\"18px\",fontStyle:\"sans-serif\",fontWeight:\"400\",background:\"rgba(0,0,0,0)\",shadow:\"\",wordWrap:!0,lengthLimit:\"90%\"},t.defaultStyle)})),this.$computed(this,\"_activeStyle\",(function(){return i({background:\"#ffce98\",shadow:\"\"},t.activeStyle)}))},h.prototype.initWatch=function(){var t=this;this.$watch(\"blocks\",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"prizes\",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"buttons\",(function(e){var i=e.map((function(t){return t.imgs}));return t.button&&i.push(t.button.imgs),t.init({btnImgs:i})}),{deep:!0}),this.$watch(\"button\",(function(){var e=t.buttons.map((function(t){return t.imgs}));return t.button&&e.push(t.button.imgs),t.init({btnImgs:e})}),{deep:!0}),this.$watch(\"rows\",(function(){return t.init({})})),this.$watch(\"cols\",(function(){return t.init({})})),this.$watch(\"defaultConfig\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"defaultStyle\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"activeStyle\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"startCallback\",(function(){return t.init({})})),this.$watch(\"endCallback\",(function(){return t.init({})}))},h.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this,s=o.config;o.ctx,o.button,null===(i=s.beforeInit)||void 0===i||i.call(this),this.draw(),Object.keys(e).forEach((function(t){var i=t,n=e[i],o={blockImgs:\"blocks\",prizeImgs:\"prizes\",btnImgs:\"buttons\"}[i];n&&n.forEach((function(t,e){t&&t.forEach((function(t,n){r.loadAndCacheImg(o,e,i,n,(function(){r.draw()}))}))}))})),null===(n=s.afterInit)||void 0===n||n.call(this)},h.prototype.handleClick=function(t){var e=this,i=this.ctx;o(o([],this.buttons),[this.button]).forEach((function(n){var r;if(n){var o=e.getGeometricProperty([n.x,n.y,n.col||1,n.row||1]),s=o[0],a=o[1],u=o[2],h=o[3];i.beginPath(),i.rect(s,a,u,h),i.isPointInPath(t.offsetX,t.offsetY)&&(e.startTime||(\"function\"==typeof n.callback&&n.callback.call(e,n),null===(r=e.startCallback)||void 0===r||r.call(e,t,n)))}}))},h.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u,h=this;return r(this,(function(r){return n=this[t][e],\"buttons\"===t&&!this.buttons.length&&this.button&&(n=this.button),n&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),u=[this.loadImg(a.src,a),a.activeSrc&&this.loadImg(a.activeSrc,a,\"$activeResolve\")],Promise.all(u).then((function(t){var n=t[0],r=t[1];h[i][e][o]={defaultImg:n,activeImg:r},s.call(h)})).catch((function(i){console.error(t+\"[\"+e+\"].imgs[\"+o+\"] \"+i)})),[2]):[2]}))}))},h.prototype.computedWidthAndHeight=function(t,e,i){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var n=this.getWidth(e.width,i.col);return[n,t.height*(n/t.width)]}if(!e.width&&e.height){var r=this.getHeight(e.height,i.row);return[t.width*(r/t.height),r]}return[this.getWidth(e.width,i.col),this.getHeight(e.height,i.row)]},h.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,h=n.ctx,c=n._defaultConfig,l=n._defaultStyle,f=n._activeStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,h),h.clearRect(0,0,this.boxWidth,this.boxHeight),this.cells=o(o([],this.prizes),this.buttons),this.button&&this.cells.push(this.button),this.cells.forEach((function(t){t.col=t.col||1,t.row=t.row||1})),this.prizeArea=this.blocks.reduce((function(t,e){var n=t.x,r=t.y,o=t.w,a=t.h,c=function(t){var e,i=(null===(e=t.padding)||void 0===e?void 0:e.replace(/px/g,\"\").split(\" \").map((function(t){return~~t})))||[0],n=0,r=0,o=0,a=0;switch(i.length){case 1:n=r=o=a=i[0];break;case 2:n=r=i[0],o=a=i[1];break;case 3:n=i[0],o=a=i[1],r=i[2];break;default:n=i[0],r=i[1],o=i[2],a=i[3]}var u={paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:a};for(var h in u)u[h]=Object.prototype.hasOwnProperty.call(t,h)&&s(t[h],\"string\",\"number\")?~~String(t[h]).replace(/px/g,\"\"):u[h];return[n,r,o,a]}(e),f=c[0],d=c[1],p=c[2],g=c[3],m=e.borderRadius?i.getLength(e.borderRadius):0,v=e.background||l.background;return u(v)&&S(h,n,r,o,a,m,i.handleBackground(n,r,o,a,v)),{x:n+p,y:r+f,w:o-p-g,h:a-f-d}}),{x:0,y:0,w:this.boxWidth,h:this.boxHeight}),this.cellWidth=(this.prizeArea.w-c.gutter*(this.cols-1))/this.cols,this.cellHeight=(this.prizeArea.h-c.gutter*(this.rows-1))/this.rows,this.cells.forEach((function(t,e){var n=i.getGeometricProperty([t.x,t.y,t.col,t.row]),o=n[0],s=n[1],c=n[2],d=n[3],p=!1;(void 0===i.prizeFlag||i.prizeFlag>-1)&&(p=e===i.currIndex%i.prizes.length>>0);var g=p?f.background:t.background||l.background;if(u(g)){var m=(p?f.shadow:t.shadow||l.shadow).replace(/px/g,\"\").split(\",\")[0].split(\" \").map((function(t,e){return e<3?Number(t):t}));4===m.length&&(h.shadowColor=m[3],h.shadowOffsetX=m[0]*r.dpr,h.shadowOffsetY=m[1]*r.dpr,h.shadowBlur=m[2],m[0]>0?c-=m[0]:(c+=m[0],o-=m[0]),m[1]>0?d-=m[1]:(d+=m[1],s-=m[1])),S(h,o,s,c,d,i.getLength(t.borderRadius?t.borderRadius:l.borderRadius),i.handleBackground(o,s,c,d,g)),h.shadowColor=\"rgba(0, 0, 0, 0)\",h.shadowOffsetX=0,h.shadowOffsetY=0,h.shadowBlur=0}var v=\"prizeImgs\";e>=i.prizes.length&&(v=\"btnImgs\",e-=i.prizes.length),t.imgs&&t.imgs.forEach((function(n,r){if(i[v][e]){var a=i[v][e][r];if(a){var u=p&&a.activeImg||a.defaultImg;if(u){var h=i.computedWidthAndHeight(u,n,t),c=h[0],l=h[1],f=[o+i.getOffsetX(c,t.col),s+i.getHeight(n.top,t.row)],d=f[0],g=f[1];i.drawImage(u,d,g,c,l)}}}})),t.fonts&&t.fonts.forEach((function(e){var n=p&&f.fontStyle?f.fontStyle:e.fontStyle||l.fontStyle,r=p&&f.fontWeight?f.fontWeight:e.fontWeight||l.fontWeight,u=p&&f.fontSize?i.getLength(f.fontSize):i.getLength(e.fontSize||l.fontSize),c=p&&f.lineHeight?f.lineHeight:e.lineHeight||l.lineHeight||e.fontSize||l.fontSize;h.font=r+\" \"+(u>>0)+\"px \"+n,h.fillStyle=p&&f.fontColor?f.fontColor:e.fontColor||l.fontColor;var d=[],g=String(e.text);if(Object.prototype.hasOwnProperty.call(e,\"wordWrap\")?e.wordWrap:l.wordWrap){g=a(g);for(var m=\"\",v=0;v<g.length;v++){m+=g[v],h.measureText(m).width>i.getWidth(e.lengthLimit||l.lengthLimit,t.col)&&(d.push(m.slice(0,-1)),m=g[v])}m&&d.push(m),d.length||d.push(g)}else d=g.split(\"\\n\");d.forEach((function(n,r){h.fillText(n,o+i.getOffsetX(h.measureText(n).width,t.col),s+i.getHeight(e.top,t.row)+(r+1)*i.getLength(c))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,h)},h.prototype.handleBackground=function(t,e,i,n,r){var o=this.ctx;return r.includes(\"linear-gradient\")&&(r=function(t,e,i,n,r,o){var s=/linear-gradient\\((.+)\\)/.exec(o)[1].split(\",\").map((function(t){return t.trim()})),a=s.shift(),u=[0,0,0,0];if(a.includes(\"deg\")){var h=function(t){return Math.tan(t/180*Math.PI)};(a=a.slice(0,-3)%360)>=0&&a<45?u=[e,i+r,e+n,i+r-n*h(a-0)]:a>=45&&a<90?u=[e,i+r,e+n-r*h(a-45),i]:a>=90&&a<135?u=[e+n,i+r,e+n-r*h(a-90),i]:a>=135&&a<180?u=[e+n,i+r,e,i+n*h(a-135)]:a>=180&&a<225?u=[e+n,i,e,i+n*h(a-180)]:a>=225&&a<270?u=[e+n,i,e+r*h(a-225),i+r]:a>=270&&a<315?u=[e,i,e+r*h(a-270),i+r]:a>=315&&a<360&&(u=[e,i,e+n,i+r-n*h(a-315)])}else a.includes(\"top\")?u=[e,i+r,e,i]:a.includes(\"bottom\")?u=[e,i,e,i+r]:a.includes(\"left\")?u=[e+n,i,e,i]:a.includes(\"right\")&&(u=[e,i,e+n,i]);var c=t.createLinearGradient.apply(t,u.map((function(t){return t>>0})));return s.reduce((function(t,e,i){var n=e.split(\" \");return 1===n.length?t.addColorStop(i,n[0]):2===n.length&&t.addColorStop.apply(t,n),t}),c)}(o,t,e,i,n,r)),r},h.prototype.play=function(){var t=this.config.clearInterval;this.startTime||(t(this.timer),this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},h.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.currIndex=0,this.draw())},h.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.currIndex,r=e.prizes,o=e.prizeFlag,s=e.startTime,a=e._defaultConfig,u=Date.now()-s;if(u>=a.accelerationTime&&void 0!==o){this.FPS=u/t,this.endTime=Date.now(),this.stopIndex=n;for(var h=0;++h;){var c=r.length*h+o-(n>>0);if(C.easeOut(this.FPS,this.stopIndex,c,a.decelerationTime)-this.stopIndex>a.speed){this.endIndex=c;break}}return this.slowDown()}this.currIndex=(n+C.easeIn(u,.1,a.speed,a.accelerationTime))%r.length,this.draw(),i(this.run.bind(this,t+1))},h.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopIndex,a=e.endIndex,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.currIndex=C.easeOut(h,s,a,u.decelerationTime)%r.length,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},h.prototype.walk=function(){var t=this,e=this.config,i=e.setInterval;(0,e.clearInterval)(this.timer),this.timer=i((function(){t.currIndex+=1,t.draw()}),1300)},h.prototype.getGeometricProperty=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=this.cellWidth,s=this.cellHeight,a=this._defaultConfig.gutter,u=[this.prizeArea.x+(o+a)*e,this.prizeArea.y+(s+a)*i];return n&&r&&u.push(o*n+a*(n-1),s*r+a*(r-1)),u},h.prototype.getWidth=function(t,e){return void 0===e&&(e=1),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,this.cellWidth*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getHeight=function(t,e){return void 0===e&&(e=1),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,this.cellHeight*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getOffsetX=function(t,e){return void 0===e&&(e=1),(this.cellWidth*e+this._defaultConfig.gutter*(e-1)-t)/2},h.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr,e/i.dpr]},h}(y);exports.LuckyGrid=P,exports.LuckyWheel=E;\n"]}
0 2 \ No newline at end of file
... ...
packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js 0 → 100644
  1 +module.exports =
  2 +/******/ (function(modules) { // webpackBootstrap
  3 +/******/ // The module cache
  4 +/******/ var installedModules = {};
  5 +/******/
  6 +/******/ // The require function
  7 +/******/ function __webpack_require__(moduleId) {
  8 +/******/
  9 +/******/ // Check if module is in cache
  10 +/******/ if(installedModules[moduleId]) {
  11 +/******/ return installedModules[moduleId].exports;
  12 +/******/ }
  13 +/******/ // Create a new module (and put it into the cache)
  14 +/******/ var module = installedModules[moduleId] = {
  15 +/******/ i: moduleId,
  16 +/******/ l: false,
  17 +/******/ exports: {}
  18 +/******/ };
  19 +/******/
  20 +/******/ // Execute the module function
  21 +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22 +/******/
  23 +/******/ // Flag the module as loaded
  24 +/******/ module.l = true;
  25 +/******/
  26 +/******/ // Return the exports of the module
  27 +/******/ return module.exports;
  28 +/******/ }
  29 +/******/
  30 +/******/
  31 +/******/ // expose the modules object (__webpack_modules__)
  32 +/******/ __webpack_require__.m = modules;
  33 +/******/
  34 +/******/ // expose the module cache
  35 +/******/ __webpack_require__.c = installedModules;
  36 +/******/
  37 +/******/ // define getter function for harmony exports
  38 +/******/ __webpack_require__.d = function(exports, name, getter) {
  39 +/******/ if(!__webpack_require__.o(exports, name)) {
  40 +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41 +/******/ }
  42 +/******/ };
  43 +/******/
  44 +/******/ // define __esModule on exports
  45 +/******/ __webpack_require__.r = function(exports) {
  46 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47 +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48 +/******/ }
  49 +/******/ Object.defineProperty(exports, '__esModule', { value: true });
  50 +/******/ };
  51 +/******/
  52 +/******/ // create a fake namespace object
  53 +/******/ // mode & 1: value is a module id, require it
  54 +/******/ // mode & 2: merge all properties of value into the ns
  55 +/******/ // mode & 4: return value when already ns object
  56 +/******/ // mode & 8|1: behave like require
  57 +/******/ __webpack_require__.t = function(value, mode) {
  58 +/******/ if(mode & 1) value = __webpack_require__(value);
  59 +/******/ if(mode & 8) return value;
  60 +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61 +/******/ var ns = Object.create(null);
  62 +/******/ __webpack_require__.r(ns);
  63 +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64 +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65 +/******/ return ns;
  66 +/******/ };
  67 +/******/
  68 +/******/ // getDefaultExport function for compatibility with non-harmony modules
  69 +/******/ __webpack_require__.n = function(module) {
  70 +/******/ var getter = module && module.__esModule ?
  71 +/******/ function getDefault() { return module['default']; } :
  72 +/******/ function getModuleExports() { return module; };
  73 +/******/ __webpack_require__.d(getter, 'a', getter);
  74 +/******/ return getter;
  75 +/******/ };
  76 +/******/
  77 +/******/ // Object.prototype.hasOwnProperty.call
  78 +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79 +/******/
  80 +/******/ // __webpack_public_path__
  81 +/******/ __webpack_require__.p = "";
  82 +/******/
  83 +/******/
  84 +/******/ // Load entry module and return exports
  85 +/******/ return __webpack_require__(__webpack_require__.s = 2);
  86 +/******/ })
  87 +/************************************************************************/
  88 +/******/ ([
  89 +/* 0 */
  90 +/***/ (function(module, exports, __webpack_require__) {
  91 +
  92 +"use strict";
  93 +Object.defineProperty(exports,"__esModule",{value:!0});
  94 +/*! *****************************************************************************
  95 +Copyright (c) Microsoft Corporation.
  96 +
  97 +Permission to use, copy, modify, and/or distribute this software for any
  98 +purpose with or without fee is hereby granted.
  99 +
  100 +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  101 +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  102 +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  103 +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  104 +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  105 +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  106 +PERFORMANCE OF THIS SOFTWARE.
  107 +***************************************************************************** */
  108 +var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function n(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function o(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t}String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var o=e[r];if(t.call(n,o,r,e))return o;r++}}});var s=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.some((function(e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}))},a=function(t){return[].filter.call(t,(function(t){return"\n"!==t})).join("")},u=function(t){if("string"!=typeof t)return!1;if("transparent"===(t=t.toLocaleLowerCase().trim()))return!1;if(/^rgba/.test(t)){var e=/([^\s,]+)\)$/.exec(t);if(0===(null===(i=e)?0:"object"==typeof i?NaN:"number"==typeof i?i:"string"==typeof i?"%"===i[i.length-1]?Number(i.slice(0,-1))/100:Number(i):NaN))return!1}var i;return!0},h=function(){function t(){this.subs=[]}return t.prototype.addSub=function(t){this.subs.includes(t)||this.subs.push(t)},t.prototype.notify=function(){this.subs.forEach((function(t){t.update()}))},t}(),c="__proto__"in{};function l(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}var f=Array.prototype,d=Object.create(f);["push","pop","shift","unshift","sort","splice","reverse"].forEach((function(t){d[t]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=f[t].apply(this,e),r=this.__luckyOb__;return["push","unshift","splice"].includes(t)&&r.walk(this),r.dep.notify(),n}}));var p=function(){function t(t){this.dep=new h,l(t,"__luckyOb__",this),Array.isArray(t)&&(c?t.__proto__=d:Object.getOwnPropertyNames(d).forEach((function(e){l(t,e,d[e])}))),this.walk(t)}return t.prototype.walk=function(t){Object.keys(t).forEach((function(e){m(t,e,t[e])}))},t}();function g(t){if(t&&"object"==typeof t)return"__luckyOb__"in t?t.__luckyOb__:new p(t)}function m(t,e,i){var n=new h,r=Object.getOwnPropertyDescriptor(t,e);if(!r||!1!==r.configurable){var o=r&&r.get,s=r&&r.set;o&&!s||2!==arguments.length||(i=t[e]);var a=g(i);Object.defineProperty(t,e,{get:function(){var e=o?o.call(t):i;return h.target&&(n.addSub(h.target),a&&a.dep.addSub(h.target)),e},set:function(e){e!==i&&(i=e,o&&!s||(s?s.call(t,e):i=e,a=g(e),n.notify()))}})}}var v=0,b=function(){function t(t,e,i,n){void 0===n&&(n={}),this.id=v++,this.$lucky=t,this.expr=e,this.deep=!!n.deep,this.getter="function"==typeof e?e:function(t){t+=".";for(var e=[],i="",n=0;n<t.length;n++){var r=t[n];if(/\[|\./.test(r))e.push(i),i="";else{if(/\W/.test(r))continue;i+=r}}return function(t){return e.reduce((function(t,e){return t[e]}),t)}}(e),this.cb=i,this.value=this.get()}return t.prototype.get=function(){h.target=this;var t=this.getter.call(this.$lucky,this.$lucky);return this.deep&&function(t){var e=function(t){s(t,"array","object")&&Object.keys(t).forEach((function(i){var n=t[i];e(n)}))};e(t)}(t),h.target=null,t},t.prototype.update=function(){var t=this.get(),e=this.value;this.value=t,this.cb.call(this.$lucky,t,e)},t}(),y=function(){function t(t){var e=this;this.htmlFontSize=16,this.rAF=function(){},this.boxWidth=0,this.boxHeight=0,this.setHTMLFontSize(),"string"==typeof t?t={el:t}:1===t.nodeType&&(t={el:"",divElement:t}),t=t,this.config=t,this.setDpr(),this.initWindowFunction(),t.flag||(t.flag="WEB"),Object.prototype.hasOwnProperty.call(t,"ob")||(t.ob=!0),t.el&&(t.divElement=document.querySelector(t.el)),t.divElement&&(t.canvasElement=document.createElement("canvas"),t.divElement.appendChild(t.canvasElement)),this.resetWidthAndHeight(),t.canvasElement&&(t.ctx=t.canvasElement.getContext("2d"),t.canvasElement.setAttribute("package","lucky-canvas@1.5.4"),t.canvasElement.addEventListener("click",(function(t){return e.handleClick(t)})),t.canvasElement.addEventListener("mousemove",(function(t){return e.handleMouseMove(t)})),t.canvasElement.addEventListener("mousedown",(function(t){return e.handleMouseDown(t)})),t.canvasElement.addEventListener("mouseup",(function(t){return e.handleMouseUp(t)}))),this.ctx=t.ctx,t.ctx?this.boxWidth&&this.boxHeight||console.error("无法获取到宽度或高度"):console.error("无法获取到 CanvasContext2D")}return t.prototype.init=function(t){this.setDpr(),this.setHTMLFontSize(),this.resetWidthAndHeight(),this.zoomCanvas()},t.prototype.handleClick=function(t){},t.prototype.handleMouseDown=function(t){},t.prototype.handleMouseUp=function(t){},t.prototype.handleMouseMove=function(t){},t.prototype.conversionAxis=function(t,e){return[0,0]},t.prototype.setDpr=function(){var t=this.config;t.dpr||(window?window.dpr=t.dpr=window.devicePixelRatio||1:t.dpr||console.error(t,"未传入 dpr 可能会导致绘制异常"))},t.prototype.setHTMLFontSize=function(){window&&(this.htmlFontSize=+window.getComputedStyle(document.documentElement).fontSize.slice(0,-2))},t.prototype.resetWidthAndHeight=function(){var t=this.config,e=0,i=0;t.divElement&&(e=t.divElement.offsetWidth,i=t.divElement.offsetHeight),this.boxWidth=this.getLength(t.width)||e,this.boxHeight=this.getLength(t.height)||i,t.divElement&&(t.divElement.style.overflow="hidden",t.divElement.style.width=this.boxWidth+"px",t.divElement.style.height=this.boxHeight+"px")},t.prototype.initWindowFunction=function(){var t=this.config;if(window)return this.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.setTimeout=window.setTimeout,t.setInterval=window.setInterval,t.clearTimeout=window.clearTimeout,void(t.clearInterval=window.clearInterval);if(t.rAF)this.rAF=t.rAF;else if(t.setTimeout){var e=t.setTimeout;this.rAF=function(t){return e(t,16.7)}}else this.rAF=function(t){return setTimeout(t,16.7)}},t.prototype.zoomCanvas=function(){var t=this.config,e=this.ctx,i=t.canvasElement,n=t.dpr,r=[this.boxWidth*n,this.boxHeight*n],o=r[0],s=r[1],a=function(t){return(t*n-t)/(t*n)*(n/2)*100};i&&(i.width=o,i.height=s,i.style.width=o+"px",i.style.height=s+"px",i.style.transform="scale("+1/n+") translate("+-a(o)+"%, "+-a(s)+"%)",e.scale(n,n))},t.prototype.loadImg=function(t,e,i){var n=this;return void 0===i&&(i="$resolve"),new Promise((function(r,o){if(t||o("=> '"+e.src+"' 不能为空或不合法"),"WEB"===n.config.flag){var s=new Image;s.src=t,s.onload=function(){return r(s)},s.onerror=function(){return o("=> '"+e.src+"' 图片加载失败")}}else e[i]=r}))},t.prototype.drawImage=function(t,e,i,n,r){var o,s=this.config,a=this.ctx;return["WEB","MP-WX"].includes(s.flag)?o=t:["UNI-H5","UNI-MP","TARO-H5","TARO-MP"].includes(s.flag)&&(o=t.path),a.drawImage(o,e,i,n,r)},t.prototype.getLength=function(t){return s(t,"number")?t:s(t,"string")?this.changeUnits(t):0},t.prototype.changeUnits=function(t,e){var i=this;return void 0===e&&(e=1),Number(t.replace(/^([-]*[0-9.]*)([a-z%]*)$/,(function(t,n,r){var o={"%":function(t){return t*(e/100)},px:function(t){return 1*t},rem:function(t){return t*i.htmlFontSize}}[r];if(o)return o(n);var s=i.config.unitFunc;return s?s(n,r):n})))},t.prototype.$set=function(t,e,i){t&&"object"==typeof t&&m(t,e,i)},t.prototype.$computed=function(t,e,i){var n=this;Object.defineProperty(t,e,{get:function(){return i.call(n)}})},t.prototype.$watch=function(t,e,i){void 0===i&&(i={}),"object"==typeof e&&(e=(i=e).handler);var n=new b(this,t,e,i);return i.immediate&&e.call(this,n.value),function(){}},t}(),w=function(t){return Math.PI/180*t},x=function(t,e){return[+(Math.cos(t)*e).toFixed(8),+(Math.sin(t)*e).toFixed(8)]},z=function(t,e){var i=-t/e;return[i,-i*t+e]},I=function(t,e,i,n,r,o){var s;if(void 0===o&&(o=!0),Math.abs(r-n).toFixed(8)>=w(180).toFixed(8)){var a=(r+n)/2;return o?(I(t,e,i,n,a,o),I(t,e,i,a,r,o)):(I(t,e,i,a,r,o),I(t,e,i,n,a,o)),!1}o||(n=(s=[r,n])[0],r=s[1]);var u=x(n,i),h=u[0],c=u[1],l=x(r,i),f=l[0],d=l[1],p=z(h,c),g=p[0],m=p[1],v=z(f,d),b=v[0],y=v[1],k=(y-m)/(g-b),S=(b*m-g*y)/(b-g);isNaN(k)&&(Math.abs(h)===+i.toFixed(8)&&(k=h),Math.abs(f)===+i.toFixed(8)&&(k=f)),g===1/0||g===-1/0?S=b*k+y:b!==1/0&&b!==-1/0||(S=g*k+m),e.lineTo(h,c),t.indexOf("MP")>0?e.quadraticCurveTo(k,S,f,d):e.arcTo(k,S,f,d,i)},k=function(t,e,i,n,r,o,s,a){i||(i=s);var u=w(90/Math.PI/n*s),h=w(90/Math.PI/i*s),c=r+u,l=o-u,f=r+h,d=o-h;e.beginPath(),e.fillStyle=a,e.moveTo.apply(e,x(c,n)),I(t,e,n,c,l,!0),d>f?I(t,e,i,f,d,!1):e.lineTo.apply(e,x((r+o)/2,s/2/Math.abs(Math.sin((r-o)/2)))),e.closePath(),e.fill()},S=function(t,e,i,n,r,o,s){var a=Math.min(n,r);o>a/2&&(o=a/2),t.beginPath(),t.fillStyle=s,t.moveTo(e+o,i),t.lineTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath(),t.fill()},C={easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*(t/=n)*(t-2)+e}},T={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sin(t/n*(Math.PI/2))+e}},W={easeIn:function(t,e,i,n){return t>=n&&(t=n),0==t?e:i*Math.pow(2,10*(t/n-1))+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),t==n?e+i:i*(1-Math.pow(2,-10*t/n))+e}},O={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sqrt(1-(t=t/n-1)*t)+e}},_=Object.freeze({__proto__:null,quad:C,cubic:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t+1)+e}},quart:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*((t=t/n-1)*t*t*t-1)+e}},quint:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t*t*t+1)+e}},sine:T,expo:W,circ:O}),E=function(t){function o(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;return r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:.8},r.defaultStyle={},r._defaultStyle={fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",lineHeight:"",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},r.Radius=0,r.prizeRadius=0,r.prizeDeg=0,r.prizeRadian=0,r.rotateDeg=0,r.maxBtnRadius=0,r.startTime=0,r.endTime=0,r.stopDeg=0,r.endDeg=0,r.FPS=16.6,r.blockImgs=[[]],r.prizeImgs=[[]],r.btnImgs=[[]],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:r.buttons.map((function(t){return t.imgs}))}),r}return e(o,t),o.prototype.initData=function(t){this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},o.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){return i({gutter:"0px",offsetDegree:0,speed:20,speedFunction:"quad",accelerationTime:2500,decelerationTime:2500,stopRange:.8},t.defaultConfig)})),this.$computed(this,"_defaultStyle",(function(){return i({fontSize:"18px",fontColor:"#000",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)}))},o.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){return t.init({btnImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},o.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this.config,s=this.ctx;this.Radius=Math.min(this.boxWidth,this.boxHeight)/2,null===(i=o.beforeInit)||void 0===i||i.call(this),s.translate(this.Radius,this.Radius),this.draw(),this.draw(),Object.keys(e).forEach((function(t){var i=t,n={blockImgs:"blocks",prizeImgs:"prizes",btnImgs:"buttons"}[i],o=e[i];o&&o.forEach((function(t,e){t&&t.forEach((function(t,o){r.loadAndCacheImg(n,e,i,o,(function(){r.draw()}))}))}))})),null===(n=o.afterInit)||void 0===n||n.call(this)},o.prototype.handleClick=function(t){var e,i=this.ctx;i.beginPath(),i.arc(0,0,this.maxBtnRadius,0,2*Math.PI,!1),i.isPointInPath(t.offsetX,t.offsetY)&&(this.startTime||null===(e=this.startCallback)||void 0===e||e.call(this,t))},o.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u=this;return r(this,(function(r){return(n=this[t][e])&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),this.loadImg(a.src,a).then((function(t){u[i][e][o]=t,s.call(u)})).catch((function(i){console.error(t+"["+e+"].imgs["+o+"] "+i)})),[2]):[2]}))}))},o.prototype.computedWidthAndHeight=function(t,e,i,n){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var r=this.getWidth(e.width,i);return[r,t.height*(r/t.width)]}if(!e.width&&e.height){var o=this.getHeight(e.height,n);return[t.width*(o/t.height),o]}return[this.getWidth(e.width,i),this.getHeight(e.height,n)]},o.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,o=n.ctx,s=n._defaultConfig,h=n._defaultStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(-this.Radius,-this.Radius,2*this.Radius,2*this.Radius),this.prizeRadius=this.blocks.reduce((function(t,e,n){return u(e.background)&&(o.beginPath(),o.fillStyle=e.background,o.arc(0,0,t,0,2*Math.PI,!1),o.fill()),e.imgs&&e.imgs.forEach((function(e,r){if(i.blockImgs[n]){var s=i.blockImgs[n][r];if(s){var a=i.computedWidthAndHeight(s,e,2*t,2*t),u=a[0],h=a[1],c=[i.getOffsetX(u),i.getHeight(e.top,2*t)-t],l=c[0],f=c[1];o.save(),e.rotate&&o.rotate(w(i.rotateDeg)),i.drawImage(s,l,f,u,h),o.restore()}}})),t-i.getLength(e.padding&&e.padding.split(" ")[0])}),this.Radius),this.prizeDeg=360/this.prizes.length,this.prizeRadian=w(this.prizeDeg);var c=w(-90+this.rotateDeg+s.offsetDegree),l=function(t){return i.getOffsetX(o.measureText(t).width)},f=function(t,e,n){var r=t.lineHeight||h.lineHeight||t.fontSize||h.fontSize;return i.getHeight(t.top,e)+(n+1)*i.getLength(r)};o.save(),this.prizes.forEach((function(t,e){var n=c+e*i.prizeRadian,d=i.prizeRadius-i.maxBtnRadius,p=t.background||h.background;u(p)&&function(t,e,i,n,r,o,s,a){s?k(t,e,i,n,r,o,s,a):(e.beginPath(),e.fillStyle=a,e.moveTo(0,0),e.arc(0,0,n,r,o,!1),e.closePath(),e.fill())}(r.flag,o,i.maxBtnRadius,i.prizeRadius,n-i.prizeRadian/2,n+i.prizeRadian/2,i.getLength(s.gutter),p);var g=Math.cos(n)*i.prizeRadius,m=Math.sin(n)*i.prizeRadius;o.translate(g,m),o.rotate(n+w(90)),t.imgs&&t.imgs.forEach((function(t,n){if(i.prizeImgs[e]){var r=i.prizeImgs[e][n];if(r){var o=i.computedWidthAndHeight(r,t,i.prizeRadian*i.prizeRadius,d),s=o[0],a=o[1],u=[i.getOffsetX(s),i.getHeight(t.top,d)],h=u[0],c=u[1];i.drawImage(r,h,c,s,a)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,n=t.fontWeight||h.fontWeight,r=i.getLength(t.fontSize||h.fontSize),u=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=n+" "+(r>>0)+"px "+u;var c=[],p=String(t.text);if(Object.prototype.hasOwnProperty.call(t,"wordWrap")?t.wordWrap:h.wordWrap){p=a(p);for(var g="",m=0;m<p.length;m++){g+=p[m];var v=o.measureText(g).width,b=(i.prizeRadius-f(t,d,c.length))*Math.tan(i.prizeRadian/2)*2-i.getLength(s.gutter);v>i.getWidth(t.lengthLimit||h.lengthLimit,b)&&(c.push(g.slice(0,-1)),g=p[m])}g&&c.push(g),c.length||c.push(p)}else c=p.split("\n");c.filter((function(t){return!!t})).forEach((function(e,i){o.fillText(e,l(e),f(t,d,i))}))})),o.rotate(w(360)-n-w(90)),o.translate(-g,-m)})),o.restore(),this.buttons.forEach((function(t,e){var n=i.getHeight(t.radius);i.maxBtnRadius=Math.max(i.maxBtnRadius,n),u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.arc(0,0,n,0,2*Math.PI,!1),o.fill()),t.pointer&&u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.moveTo(-n,0),o.lineTo(n,0),o.lineTo(0,2*-n),o.closePath(),o.fill()),t.imgs&&t.imgs.forEach((function(t,r){if(i.btnImgs[e]){var o=i.btnImgs[e][r];if(o){var s=i.computedWidthAndHeight(o,t,2*n,2*n),a=s[0],u=s[1],h=[i.getOffsetX(a),i.getHeight(t.top,n)],c=h[0],l=h[1];i.drawImage(o,c,l,a,u)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,r=t.fontWeight||h.fontWeight,s=i.getLength(t.fontSize||h.fontSize),a=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=r+" "+(s>>0)+"px "+a,String(t.text).split("\n").forEach((function(e,i){o.fillText(e,l(e),f(t,n,i))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,o)},o.prototype.play=function(){this.startTime||(this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},o.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.rotateDeg=this.prizeDeg/2-this._defaultConfig.offsetDegree,this.draw())},o.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.prizeFlag,r=e.prizeDeg,o=e.rotateDeg,s=e._defaultConfig,a=Date.now()-this.startTime;if(a>=s.accelerationTime&&void 0!==n){this.FPS=a/t,this.endTime=Date.now(),this.stopDeg=o;for(var u=(Math.random()*r-r/2)*this.getLength(s.stopRange),h=0;++h;){var c=360*h-n*r-o-s.offsetDegree+u;if(_[s.speedFunction].easeOut(this.FPS,this.stopDeg,c,s.decelerationTime)-this.stopDeg>s.speed){this.endDeg=c;break}}return this.slowDown()}this.rotateDeg=(o+_[s.speedFunction].easeIn(a,0,s.speed,s.accelerationTime))%360,this.draw(),i(this.run.bind(this,t+1))},o.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopDeg,a=e.endDeg,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>=u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.rotateDeg=_[u.speedFunction].easeOut(h,s,a,u.decelerationTime)%360,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},o.prototype.getWidth=function(t,e){return void 0===e&&(e=this.prizeRadian*this.prizeRadius),s(t,"number")?t:s(t,"string")?this.changeUnits(t,e):0},o.prototype.getHeight=function(t,e){return void 0===e&&(e=this.prizeRadius),s(t,"number")?t:s(t,"string")?this.changeUnits(t,e):0},o.prototype.getOffsetX=function(t){return-t/2},o.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr-this.Radius,e/i.dpr-this.Radius]},o}(y),P=function(t){function h(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;r.rows=3,r.cols=3,r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},r.defaultStyle={},r._defaultStyle={borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",lineHeight:"",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},r.activeStyle={},r._activeStyle={background:"#ffce98",shadow:"",fontStyle:"",fontWeight:"",fontSize:"",lineHeight:"",fontColor:""},r.cellWidth=0,r.cellHeight=0,r.startTime=0,r.endTime=0,r.currIndex=0,r.stopIndex=0,r.endIndex=0,r.demo=!1,r.timer=0,r.FPS=16.6,r.prizeFlag=-1,r.cells=[],r.blockImgs=[[]],r.btnImgs=[[]],r.prizeImgs=[],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r);var o=r.buttons.map((function(t){return t.imgs}));return r.button&&o.push(r.button.imgs),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:o}),r}return e(h,t),h.prototype.initData=function(t){this.$set(this,"rows",Number(t.rows)||3),this.$set(this,"cols",Number(t.cols)||3),this.$set(this,"blocks",t.blocks||[]),this.$set(this,"prizes",t.prizes||[]),this.$set(this,"buttons",t.buttons||[]),this.$set(this,"button",t.button),this.$set(this,"defaultConfig",t.defaultConfig||{}),this.$set(this,"defaultStyle",t.defaultStyle||{}),this.$set(this,"activeStyle",t.activeStyle||{}),this.$set(this,"startCallback",t.start),this.$set(this,"endCallback",t.end)},h.prototype.initComputed=function(){var t=this;this.$computed(this,"_defaultConfig",(function(){var e=i({gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},t.defaultConfig);return e.gutter=t.getLength(e.gutter),e.speed=e.speed/40,e})),this.$computed(this,"_defaultStyle",(function(){return i({borderRadius:20,fontColor:"#000",fontSize:"18px",fontStyle:"sans-serif",fontWeight:"400",background:"rgba(0,0,0,0)",shadow:"",wordWrap:!0,lengthLimit:"90%"},t.defaultStyle)})),this.$computed(this,"_activeStyle",(function(){return i({background:"#ffce98",shadow:""},t.activeStyle)}))},h.prototype.initWatch=function(){var t=this;this.$watch("blocks",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("prizes",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch("buttons",(function(e){var i=e.map((function(t){return t.imgs}));return t.button&&i.push(t.button.imgs),t.init({btnImgs:i})}),{deep:!0}),this.$watch("button",(function(){var e=t.buttons.map((function(t){return t.imgs}));return t.button&&e.push(t.button.imgs),t.init({btnImgs:e})}),{deep:!0}),this.$watch("rows",(function(){return t.init({})})),this.$watch("cols",(function(){return t.init({})})),this.$watch("defaultConfig",(function(){return t.draw()}),{deep:!0}),this.$watch("defaultStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("activeStyle",(function(){return t.draw()}),{deep:!0}),this.$watch("startCallback",(function(){return t.init({})})),this.$watch("endCallback",(function(){return t.init({})}))},h.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this,s=o.config;o.ctx,o.button,null===(i=s.beforeInit)||void 0===i||i.call(this),this.draw(),Object.keys(e).forEach((function(t){var i=t,n=e[i],o={blockImgs:"blocks",prizeImgs:"prizes",btnImgs:"buttons"}[i];n&&n.forEach((function(t,e){t&&t.forEach((function(t,n){r.loadAndCacheImg(o,e,i,n,(function(){r.draw()}))}))}))})),null===(n=s.afterInit)||void 0===n||n.call(this)},h.prototype.handleClick=function(t){var e=this,i=this.ctx;o(o([],this.buttons),[this.button]).forEach((function(n){var r;if(n){var o=e.getGeometricProperty([n.x,n.y,n.col||1,n.row||1]),s=o[0],a=o[1],u=o[2],h=o[3];i.beginPath(),i.rect(s,a,u,h),i.isPointInPath(t.offsetX,t.offsetY)&&(e.startTime||("function"==typeof n.callback&&n.callback.call(e,n),null===(r=e.startCallback)||void 0===r||r.call(e,t,n)))}}))},h.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u,h=this;return r(this,(function(r){return n=this[t][e],"buttons"===t&&!this.buttons.length&&this.button&&(n=this.button),n&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),u=[this.loadImg(a.src,a),a.activeSrc&&this.loadImg(a.activeSrc,a,"$activeResolve")],Promise.all(u).then((function(t){var n=t[0],r=t[1];h[i][e][o]={defaultImg:n,activeImg:r},s.call(h)})).catch((function(i){console.error(t+"["+e+"].imgs["+o+"] "+i)})),[2]):[2]}))}))},h.prototype.computedWidthAndHeight=function(t,e,i){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var n=this.getWidth(e.width,i.col);return[n,t.height*(n/t.width)]}if(!e.width&&e.height){var r=this.getHeight(e.height,i.row);return[t.width*(r/t.height),r]}return[this.getWidth(e.width,i.col),this.getHeight(e.height,i.row)]},h.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,h=n.ctx,c=n._defaultConfig,l=n._defaultStyle,f=n._activeStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,h),h.clearRect(0,0,this.boxWidth,this.boxHeight),this.cells=o(o([],this.prizes),this.buttons),this.button&&this.cells.push(this.button),this.cells.forEach((function(t){t.col=t.col||1,t.row=t.row||1})),this.prizeArea=this.blocks.reduce((function(t,e){var n=t.x,r=t.y,o=t.w,a=t.h,c=function(t){var e,i=(null===(e=t.padding)||void 0===e?void 0:e.replace(/px/g,"").split(" ").map((function(t){return~~t})))||[0],n=0,r=0,o=0,a=0;switch(i.length){case 1:n=r=o=a=i[0];break;case 2:n=r=i[0],o=a=i[1];break;case 3:n=i[0],o=a=i[1],r=i[2];break;default:n=i[0],r=i[1],o=i[2],a=i[3]}var u={paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:a};for(var h in u)u[h]=Object.prototype.hasOwnProperty.call(t,h)&&s(t[h],"string","number")?~~String(t[h]).replace(/px/g,""):u[h];return[n,r,o,a]}(e),f=c[0],d=c[1],p=c[2],g=c[3],m=e.borderRadius?i.getLength(e.borderRadius):0,v=e.background||l.background;return u(v)&&S(h,n,r,o,a,m,i.handleBackground(n,r,o,a,v)),{x:n+p,y:r+f,w:o-p-g,h:a-f-d}}),{x:0,y:0,w:this.boxWidth,h:this.boxHeight}),this.cellWidth=(this.prizeArea.w-c.gutter*(this.cols-1))/this.cols,this.cellHeight=(this.prizeArea.h-c.gutter*(this.rows-1))/this.rows,this.cells.forEach((function(t,e){var n=i.getGeometricProperty([t.x,t.y,t.col,t.row]),o=n[0],s=n[1],c=n[2],d=n[3],p=!1;(void 0===i.prizeFlag||i.prizeFlag>-1)&&(p=e===i.currIndex%i.prizes.length>>0);var g=p?f.background:t.background||l.background;if(u(g)){var m=(p?f.shadow:t.shadow||l.shadow).replace(/px/g,"").split(",")[0].split(" ").map((function(t,e){return e<3?Number(t):t}));4===m.length&&(h.shadowColor=m[3],h.shadowOffsetX=m[0]*r.dpr,h.shadowOffsetY=m[1]*r.dpr,h.shadowBlur=m[2],m[0]>0?c-=m[0]:(c+=m[0],o-=m[0]),m[1]>0?d-=m[1]:(d+=m[1],s-=m[1])),S(h,o,s,c,d,i.getLength(t.borderRadius?t.borderRadius:l.borderRadius),i.handleBackground(o,s,c,d,g)),h.shadowColor="rgba(0, 0, 0, 0)",h.shadowOffsetX=0,h.shadowOffsetY=0,h.shadowBlur=0}var v="prizeImgs";e>=i.prizes.length&&(v="btnImgs",e-=i.prizes.length),t.imgs&&t.imgs.forEach((function(n,r){if(i[v][e]){var a=i[v][e][r];if(a){var u=p&&a.activeImg||a.defaultImg;if(u){var h=i.computedWidthAndHeight(u,n,t),c=h[0],l=h[1],f=[o+i.getOffsetX(c,t.col),s+i.getHeight(n.top,t.row)],d=f[0],g=f[1];i.drawImage(u,d,g,c,l)}}}})),t.fonts&&t.fonts.forEach((function(e){var n=p&&f.fontStyle?f.fontStyle:e.fontStyle||l.fontStyle,r=p&&f.fontWeight?f.fontWeight:e.fontWeight||l.fontWeight,u=p&&f.fontSize?i.getLength(f.fontSize):i.getLength(e.fontSize||l.fontSize),c=p&&f.lineHeight?f.lineHeight:e.lineHeight||l.lineHeight||e.fontSize||l.fontSize;h.font=r+" "+(u>>0)+"px "+n,h.fillStyle=p&&f.fontColor?f.fontColor:e.fontColor||l.fontColor;var d=[],g=String(e.text);if(Object.prototype.hasOwnProperty.call(e,"wordWrap")?e.wordWrap:l.wordWrap){g=a(g);for(var m="",v=0;v<g.length;v++){m+=g[v],h.measureText(m).width>i.getWidth(e.lengthLimit||l.lengthLimit,t.col)&&(d.push(m.slice(0,-1)),m=g[v])}m&&d.push(m),d.length||d.push(g)}else d=g.split("\n");d.forEach((function(n,r){h.fillText(n,o+i.getOffsetX(h.measureText(n).width,t.col),s+i.getHeight(e.top,t.row)+(r+1)*i.getLength(c))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,h)},h.prototype.handleBackground=function(t,e,i,n,r){var o=this.ctx;return r.includes("linear-gradient")&&(r=function(t,e,i,n,r,o){var s=/linear-gradient\((.+)\)/.exec(o)[1].split(",").map((function(t){return t.trim()})),a=s.shift(),u=[0,0,0,0];if(a.includes("deg")){var h=function(t){return Math.tan(t/180*Math.PI)};(a=a.slice(0,-3)%360)>=0&&a<45?u=[e,i+r,e+n,i+r-n*h(a-0)]:a>=45&&a<90?u=[e,i+r,e+n-r*h(a-45),i]:a>=90&&a<135?u=[e+n,i+r,e+n-r*h(a-90),i]:a>=135&&a<180?u=[e+n,i+r,e,i+n*h(a-135)]:a>=180&&a<225?u=[e+n,i,e,i+n*h(a-180)]:a>=225&&a<270?u=[e+n,i,e+r*h(a-225),i+r]:a>=270&&a<315?u=[e,i,e+r*h(a-270),i+r]:a>=315&&a<360&&(u=[e,i,e+n,i+r-n*h(a-315)])}else a.includes("top")?u=[e,i+r,e,i]:a.includes("bottom")?u=[e,i,e,i+r]:a.includes("left")?u=[e+n,i,e,i]:a.includes("right")&&(u=[e,i,e+n,i]);var c=t.createLinearGradient.apply(t,u.map((function(t){return t>>0})));return s.reduce((function(t,e,i){var n=e.split(" ");return 1===n.length?t.addColorStop(i,n[0]):2===n.length&&t.addColorStop.apply(t,n),t}),c)}(o,t,e,i,n,r)),r},h.prototype.play=function(){var t=this.config.clearInterval;this.startTime||(t(this.timer),this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},h.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.currIndex=0,this.draw())},h.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.currIndex,r=e.prizes,o=e.prizeFlag,s=e.startTime,a=e._defaultConfig,u=Date.now()-s;if(u>=a.accelerationTime&&void 0!==o){this.FPS=u/t,this.endTime=Date.now(),this.stopIndex=n;for(var h=0;++h;){var c=r.length*h+o-(n>>0);if(C.easeOut(this.FPS,this.stopIndex,c,a.decelerationTime)-this.stopIndex>a.speed){this.endIndex=c;break}}return this.slowDown()}this.currIndex=(n+C.easeIn(u,.1,a.speed,a.accelerationTime))%r.length,this.draw(),i(this.run.bind(this,t+1))},h.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopIndex,a=e.endIndex,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.currIndex=C.easeOut(h,s,a,u.decelerationTime)%r.length,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},h.prototype.walk=function(){var t=this,e=this.config,i=e.setInterval;(0,e.clearInterval)(this.timer),this.timer=i((function(){t.currIndex+=1,t.draw()}),1300)},h.prototype.getGeometricProperty=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=this.cellWidth,s=this.cellHeight,a=this._defaultConfig.gutter,u=[this.prizeArea.x+(o+a)*e,this.prizeArea.y+(s+a)*i];return n&&r&&u.push(o*n+a*(n-1),s*r+a*(r-1)),u},h.prototype.getWidth=function(t,e){return void 0===e&&(e=1),s(t,"number")?t:s(t,"string")?this.changeUnits(t,this.cellWidth*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getHeight=function(t,e){return void 0===e&&(e=1),s(t,"number")?t:s(t,"string")?this.changeUnits(t,this.cellHeight*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getOffsetX=function(t,e){return void 0===e&&(e=1),(this.cellWidth*e+this._defaultConfig.gutter*(e-1)-t)/2},h.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr,e/i.dpr]},h}(y);exports.LuckyGrid=P,exports.LuckyWheel=E;
  109 +
  110 +
  111 +/***/ }),
  112 +/* 1 */
  113 +/***/ (function(module, exports, __webpack_require__) {
  114 +
  115 +"use strict";
  116 +
  117 +
  118 +exports.__esModule = true;
  119 +exports.getImage = getImage;
  120 +var windowWidth = wx.getSystemInfoSync().windowWidth;
  121 +
  122 +var rpx2px = exports.rpx2px = function rpx2px(value) {
  123 + if (typeof value === 'string') value = Number(value.replace(/[a-z]*/g, ''));
  124 + return windowWidth / 750 * value;
  125 +};
  126 +
  127 +var changeUnits = exports.changeUnits = function changeUnits(value) {
  128 + return Number(value.replace(/^(\-*[0-9.]*)([a-z%]*)$/, function (value, num, unit) {
  129 + switch (unit) {
  130 + case 'px':
  131 + num *= 1;
  132 + break;
  133 + case 'rpx':
  134 + num = rpx2px(num);
  135 + break;
  136 + default:
  137 + num *= 1;
  138 + break;
  139 + }
  140 + return num;
  141 + }));
  142 +};
  143 +
  144 +var resolveImage = exports.resolveImage = function resolveImage(e, img, canvas) {
  145 + var srcName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'src';
  146 + var resolveName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '$resolve';
  147 +
  148 + var imgObj = canvas.createImage();
  149 + imgObj.onload = function () {
  150 + img[resolveName](imgObj);
  151 + };
  152 + imgObj.src = img[srcName];
  153 +};
  154 +
  155 +function getImage() {
  156 + var _this = this;
  157 +
  158 + return new Promise(function (resolve, reject) {
  159 + wx.canvasToTempFilePath({
  160 + canvas: _this.canvas,
  161 + success: function success(res) {
  162 + return resolve(res);
  163 + },
  164 + fail: function fail(err) {
  165 + return reject(err);
  166 + }
  167 + });
  168 + });
  169 +}
  170 +
  171 +/***/ }),
  172 +/* 2 */
  173 +/***/ (function(module, exports, __webpack_require__) {
  174 +
  175 +"use strict";
  176 +
  177 +
  178 +var _luckyCanvasCjs = __webpack_require__(0);
  179 +
  180 +var _utils = __webpack_require__(1);
  181 +
  182 +Component({
  183 + properties: {
  184 + hiddenCanvas: { type: Boolean, value: false},
  185 + width: { type: String, value: '600rpx' },
  186 + height: { type: String, value: '600rpx' },
  187 + blocks: { type: Array, value: [] },
  188 + prizes: { type: Array, value: [] },
  189 + buttons: { type: Array, value: [] },
  190 + defaultConfig: { type: Object, value: {} },
  191 + defaultStyle: { type: Object, value: {} },
  192 + start: { type: Function, value: function value() {} },
  193 + end: { type: Function, value: function value() {} }
  194 + },
  195 + data: {
  196 + isShow: false,
  197 + luckyImg: '',
  198 + showCanvas: true
  199 + },
  200 + observers: {
  201 + 'blocks.**': function blocks(newData, oldData) {
  202 + this.$lucky && (this.$lucky.blocks = newData);
  203 + },
  204 + 'prizes.**': function prizes(newData, oldData) {
  205 + this.$lucky && (this.$lucky.prizes = newData);
  206 + },
  207 + 'buttons.**': function buttons(newData, oldData) {
  208 + this.$lucky && (this.$lucky.buttons = newData);
  209 + }
  210 + },
  211 + ready: function ready() {
  212 + var _this = this;
  213 +
  214 + wx.createSelectorQuery().in(this).select('#lucky-wheel').fields({
  215 + node: true, size: true
  216 + }).exec(function (res) {
  217 + if (!res[0] || !res[0].node) {
  218 + return console.error('lucky-canvas 获取不到 canvas 标签');
  219 + }
  220 + var canvas = _this.canvas = res[0].node;
  221 + var dpr = _this.dpr = wx.getSystemInfoSync().pixelRatio;
  222 + var ctx = _this.ctx = canvas.getContext('2d');
  223 + var data = _this.data;
  224 + canvas.width = res[0].width * dpr;
  225 + canvas.height = res[0].height * dpr;
  226 + ctx.scale(dpr, dpr);
  227 + _this.$lucky = new _luckyCanvasCjs.LuckyWheel({
  228 + flag: 'MP-WX',
  229 + ctx: ctx,
  230 + dpr: dpr,
  231 + width: res[0].width,
  232 + height: res[0].height,
  233 + // rAF: canvas.requestAnimationFrame, // 帧动画真机调试会报错!
  234 + setTimeout: setTimeout,
  235 + clearTimeout: clearTimeout,
  236 + setInterval: setInterval,
  237 + clearInterval: clearInterval,
  238 + beforeCreate: function beforeCreate() {
  239 + var Radius = Math.min(this.config.width, this.config.height) / 2;
  240 + // 设置坐标轴
  241 + ctx.translate(Radius, Radius);
  242 + },
  243 + beforeInit: function beforeInit() {
  244 + // 重置坐标轴
  245 + ctx.translate(-this.Radius, -this.Radius);
  246 + },
  247 + unitFunc: function unitFunc(num, unit) {
  248 + return (0, _utils.changeUnits)(num + unit);
  249 + }
  250 + }, {
  251 + blocks: data.blocks,
  252 + prizes: data.prizes,
  253 + buttons: data.buttons,
  254 + defaultConfig: data.defaultConfig,
  255 + defaultStyle: data.defaultStyle,
  256 + start: function start() {
  257 + for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
  258 + rest[_key] = arguments[_key];
  259 + }
  260 +
  261 + _this.triggerEvent.apply(_this, ['start'].concat(rest));
  262 + },
  263 + end: function end() {
  264 + for (var _len2 = arguments.length, rest = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  265 + rest[_key2] = arguments[_key2];
  266 + }
  267 +
  268 + _this.triggerEvent.apply(_this, ['end'].concat(rest));
  269 + _utils.getImage.call(_this).then(function (res) {
  270 + _this.setData({ luckyImg: res.tempFilePath });
  271 + });
  272 + }
  273 + });
  274 + // 为了保证 onload 回调准确
  275 + _this.setData({ isShow: true });
  276 + });
  277 + },
  278 +
  279 + methods: {
  280 + imgBindload: function imgBindload(e) {
  281 + var _e$currentTarget$data = e.currentTarget.dataset,
  282 + name = _e$currentTarget$data.name,
  283 + index = _e$currentTarget$data.index,
  284 + i = _e$currentTarget$data.i;
  285 +
  286 + var img = this.data[name][index].imgs[i];
  287 + (0, _utils.resolveImage)(e, img, this.canvas);
  288 + },
  289 + luckyImgLoad: function luckyImgLoad() {
  290 + this.showCanvas = false;
  291 + },
  292 + handleClickOfImg: function handleClickOfImg(e) {
  293 + var _this2 = this;
  294 +
  295 + var _e$changedTouches$ = e.changedTouches[0],
  296 + x = _e$changedTouches$.clientX,
  297 + y = _e$changedTouches$.clientY;
  298 +
  299 + wx.createSelectorQuery().in(this).select('.lucky-img').fields({
  300 + rect: true
  301 + }).exec(function (res) {
  302 + var _res$ = res[0],
  303 + left = _res$.left,
  304 + top = _res$.top;
  305 +
  306 + _this2.toPlay(x - left, y - top);
  307 + });
  308 + },
  309 + handleClickOfCanvas: function handleClickOfCanvas(e) {
  310 + var _e$changedTouches$2 = e.changedTouches[0],
  311 + x = _e$changedTouches$2.x,
  312 + y = _e$changedTouches$2.y;
  313 +
  314 + this.toPlay(x, y);
  315 + },
  316 + toPlay: function toPlay(x, y) {
  317 + var ctx = this.ctx;
  318 + ctx.beginPath();
  319 + ctx.arc(0, 0, this.$lucky.maxBtnRadius, 0, Math.PI * 2, false);
  320 + if (!ctx.isPointInPath(x * this.dpr, y * this.dpr)) return;
  321 + // 隐藏图片并显示canvas
  322 + this.showCanvas = true;
  323 + this.setData({ luckyImg: '' });
  324 + // 触发 lucky-canvas 的抽奖逻辑
  325 + this.$lucky.startCallback();
  326 + },
  327 + play: function play() {
  328 + var _$lucky;
  329 +
  330 + (_$lucky = this.$lucky).play.apply(_$lucky, arguments);
  331 + },
  332 + stop: function stop() {
  333 + var _$lucky2;
  334 +
  335 + (_$lucky2 = this.$lucky).stop.apply(_$lucky2, arguments);
  336 + }
  337 + }
  338 +});
  339 +
  340 +/***/ })
  341 +/******/ ]);
  342 +//# sourceMappingURL=index.js.map
0 343 \ No newline at end of file
... ...
packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.js.map 0 → 100644
  1 +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/lucky-canvas/dist/lucky-canvas.cjs.min.js","webpack:///./src/utils.js","webpack:///./src/lucky-wheel/index.js"],"names":["getImage","windowWidth","wx","getSystemInfoSync","rpx2px","value","Number","replace","changeUnits","num","unit","resolveImage","e","img","canvas","srcName","resolveName","imgObj","createImage","onload","src","Promise","resolve","reject","canvasToTempFilePath","success","res","fail","err","Component","properties","width","type","String","height","blocks","Array","prizes","buttons","defaultConfig","Object","defaultStyle","start","Function","end","data","isShow","luckyImg","showCanvas","observers","newData","oldData","$lucky","ready","createSelectorQuery","in","select","fields","node","size","exec","console","error","dpr","pixelRatio","ctx","getContext","scale","LuckyWheel","flag","setTimeout","clearTimeout","setInterval","clearInterval","beforeCreate","Radius","Math","min","config","translate","beforeInit","unitFunc","rest","triggerEvent","call","then","setData","tempFilePath","methods","imgBindload","currentTarget","dataset","name","index","i","imgs","luckyImgLoad","handleClickOfImg","changedTouches","x","clientX","y","clientY","rect","left","top","toPlay","handleClickOfCanvas","beginPath","arc","maxBtnRadius","PI","isPointInPath","startCallback","play","stop"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa,4CAA4C,SAAS;AAClE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iCAAiC,aAAa,gCAAgC,cAAc,gBAAgB,sEAAsE,QAAQ,gBAAgB,wHAAwH,aAAa,mBAAmB,6EAA6E,iBAAiB,oCAAoC,iCAAiC,IAAI,uFAAuF,SAAS,yBAAyB,oBAAoB,0CAA0C,cAAc,IAAI,aAAa,SAAS,MAAM,cAAc,IAAI,cAAc,SAAS,MAAM,cAAc,MAAM,iEAAiE,KAAK,cAAc,+BAA+B,GAAG,gBAAgB,eAAe,wBAAwB,qBAAqB,YAAY,iBAAiB,UAAU,iCAAiC,2DAA2D,YAAY,IAAI,cAAc,mBAAmB,mBAAmB,4DAA4D,KAAK,EAAE,KAAK,kHAAkH,yCAAyC,kBAAkB,MAAM,yBAAyB,oBAAoB,8BAA8B,SAAS,kCAAkC,SAAS,0EAA0E,IAAI,SAAS,yCAAyC,aAAa,MAAM,2BAA2B,iBAAiB,MAAM,oBAAoB,2BAA2B,MAAM,+BAA+B,SAAS,cAAc,SAAS,YAAY,QAAQ,MAAM,qBAAqB,OAAO,gCAAgC,UAAU,gBAAgB,kCAAkC,IAAI,kBAAkB,SAAS,oEAAoE,kFAAkF,sEAAsE,kBAAkB,mEAAmE,kCAAkC,4EAA4E,2BAA2B,IAAI,EAAE,WAAW,4BAA4B,MAAM,EAAE,kBAAkB,iBAAiB,mBAAmB,wBAAwB,2BAA2B,uEAAuE,GAAG,eAAe,oCAAoC,eAAe,YAAY,eAAe,+BAA+B,6DAA6D,oBAAoB,6BAA6B,4JAA4J,MAAM,SAAS,cAAc,aAAa,aAAa,sCAAsC,yCAAyC,+BAA+B,+BAA+B,WAAW,GAAG,GAAG,qBAAqB,oBAAoB,2BAA2B,mDAAmD,EAAE,yCAAyC,gFAAgF,gBAAgB,iBAAiB,mBAAmB,sBAAsB,4CAA4C,8EAA8E,GAAG,iBAAiB,cAAc,6HAA6H,YAAY,iBAAiB,oCAAoC,oCAAoC,YAAY,GAAG,GAAG,GAAG,cAAc,wEAAwE,kBAAkB,mDAAmD,4BAA4B,0BAA0B,sCAAsC,WAAW,2BAA2B,eAAe,oBAAoB,kEAAkE,iBAAiB,2DAA2D,GAAG,qBAAqB,oBAAoB,iBAAiB,0GAA0G,OAAO,sBAAsB,WAAW,KAAK,WAAW,kCAAkC,KAAK,yBAAyB,MAAM,mBAAmB,+BAA+B,YAAY,MAAM,oCAAoC,kCAAkC,cAAc,gDAAgD,8BAA8B,kBAAkB,2DAA2D,WAAW,KAAK,IAAI,KAAK,oBAAoB,+BAA+B,8BAA8B,2CAA2C,GAAG,gBAAgB,cAAc,WAAW,0CAA0C,+EAA+E,KAAK,qBAAqB,mBAAmB,+eAA+e,wBAAwB,6DAA6D,4BAA4B,6DAA6D,4BAA4B,2DAA2D,0BAA0B,2HAA2H,oCAAoC,kFAAkF,sCAAsC,0CAA0C,wCAAwC,0CAA0C,0CAA0C,YAAY,+BAA+B,kBAAkB,wGAAwG,wCAAwC,oGAAoG,4CAA4C,0BAA0B,0SAA0S,2CAA2C,kBAAkB,yIAAyI,4BAA4B,+IAA+I,wBAAwB,sBAAsB,mBAAmB,qBAAqB,kBAAkB,0BAA0B,2BAA2B,mCAAmC,wHAAwH,+BAA+B,uJAAuJ,qCAAqC,WAAW,6DAA6D,0DAA0D,gBAAgB,4BAA4B,YAAY,sBAAsB,mCAAmC,YAAY,GAAG,2CAA2C,+BAA+B,uIAAuI,mCAAmC,2DAA2D,uCAAuC,WAAW,sFAAsF,OAAO,gBAAgB,iBAAiB,gBAAgB,WAAW,iBAAiB,yBAAyB,IAAI,iBAAiB,wBAAwB,kBAAkB,IAAI,kCAAkC,gCAAgC,uCAAuC,WAAW,2BAA2B,eAAe,kBAAkB,EAAE,oCAAoC,iBAAiB,wCAAwC,wBAAwB,sDAAsD,GAAG,iBAAiB,qBAAqB,iBAAiB,gEAAgE,iBAAiB,WAAW,iBAAiB,yBAAyB,MAAM,mEAAmE,cAAc,4EAA4E,2BAA2B,gIAAgI,wNAAwN,6BAA6B,SAAS,oEAAoE,6KAA6K,2BAA2B,oBAAoB,kTAAkT,IAAI,yBAAyB,gCAAgC,2BAA2B,sCAAsC,IAAI,yBAAyB,oDAAoD,2BAA2B,kDAAkD,IAAI,yBAAyB,qDAAqD,2BAA2B,yDAAyD,IAAI,yBAAyB,kDAAkD,2BAA2B,iDAAiD,kBAAkB,6BAA6B,yBAAyB,kCAAkC,2BAA2B,0CAA0C,QAAQ,yBAAyB,oCAAoC,2BAA2B,6CAA6C,QAAQ,yBAAyB,sCAAsC,2BAA2B,8CAA8C,sBAAsB,gBAAgB,gBAAgB,MAAM,iBAAiB,EAAE,2BAA2B,8DAA8D,mBAAmB,mHAAmH,kBAAkB,kBAAkB,gJAAgJ,mTAAmT,oCAAoC,cAAc,uCAAuC,cAAc,sCAAsC,cAAc,GAAG,IAAI,+CAA+C,sKAAsK,kDAAkD,8EAA8E,qCAAqC,WAAW,iDAAiD,UAAU,mHAAmH,kBAAkB,mDAAmD,UAAU,kIAAkI,iBAAiB,GAAG,kCAAkC,WAAW,kCAAkC,eAAe,6BAA6B,cAAc,GAAG,EAAE,GAAG,QAAQ,oCAAoC,eAAe,6BAA6B,cAAc,GAAG,EAAE,GAAG,QAAQ,qCAAqC,eAAe,2BAA2B,cAAc,GAAG,EAAE,GAAG,QAAQ,0CAA0C,gBAAgB,GAAG,QAAQ,yCAAyC,gBAAgB,GAAG,QAAQ,0CAA0C,gBAAgB,EAAE,yCAAyC,gBAAgB,EAAE,GAAG,8BAA8B,eAAe,4BAA4B,6BAA6B,wMAAwM,WAAW,wDAAwD,WAAW,4BAA4B,4BAA4B,sCAAsC,SAAS,GAAG,GAAG,GAAG,oDAAoD,qCAAqC,iBAAiB,4KAA4K,iDAAiD,wCAAwC,eAAe,2BAA2B,iHAAiH,uBAAuB,sBAAsB,0CAA0C,YAAY,GAAG,GAAG,sDAAsD,gDAAgD,uBAAuB,+BAA+B,+BAA+B,uBAAuB,iCAAiC,+BAA+B,4DAA4D,6BAA6B,8EAA8E,4KAA4K,4IAA4I,mBAAmB,wBAAwB,MAAM,qHAAqH,iFAAiF,qDAAqD,sFAAsF,yDAAyD,4CAA4C,mBAAmB,yDAAyD,kDAAkD,4CAA4C,oFAAoF,gCAAgC,4GAA4G,oGAAoG,4DAA4D,yEAAyE,mBAAmB,wBAAwB,MAAM,uIAAuI,yBAAyB,yCAAyC,6HAA6H,0CAA0C,0BAA0B,6EAA6E,OAAO,iBAAiB,WAAW,KAAK,QAAQ,iHAAiH,6EAA6E,iCAAiC,qBAAqB,sBAAsB,UAAU,0BAA0B,4BAA4B,GAAG,+CAA+C,mDAAmD,4BAA4B,yTAAyT,iBAAiB,sBAAsB,MAAM,iHAAiH,yBAAyB,yCAAyC,6HAA6H,4FAA4F,4BAA4B,GAAG,GAAG,sDAAsD,6BAA6B,6EAA6E,8BAA8B,8IAA8I,6BAA6B,kBAAkB,2GAA2G,sCAAsC,oDAAoD,gEAAgE,IAAI,EAAE,mCAAmC,gGAAgG,cAAc,OAAO,uBAAuB,wHAAwH,iCAAiC,kHAAkH,WAAW,+GAA+G,uBAAuB,aAAa,MAAM,gHAAgH,sBAAsB,oCAAoC,+GAA+G,qCAAqC,8FAA8F,oCAAoC,WAAW,0CAA0C,kBAAkB,gDAAgD,GAAG,kBAAkB,gBAAgB,MAAM,iBAAiB,EAAE,2BAA2B,yEAAyE,mBAAmB,8DAA8D,kBAAkB,kBAAkB,0KAA0K,iBAAiB,iBAAiB,iGAAiG,+SAA+S,iCAAiC,cAAc,GAAG,+CAA+C,oCAAoC,cAAc,uCAAuC,cAAc,aAAa,IAAI,+CAA+C,0RAA0R,kDAAkD,gDAAgD,8EAA8E,qCAAqC,WAAW,iDAAiD,SAAS,8DAA8D,kBAAkB,2DAA2D,mDAAmD,UAAU,4JAA4J,iBAAiB,kDAAkD,UAAU,+BAA+B,gBAAgB,GAAG,kCAAkC,WAAW,kCAAkC,eAAe,6BAA6B,cAAc,GAAG,EAAE,GAAG,QAAQ,oCAAoC,eAAe,6BAA6B,cAAc,GAAG,EAAE,GAAG,QAAQ,qCAAqC,yBAAyB,cAAc,GAAG,+CAA+C,UAAU,EAAE,GAAG,QAAQ,mCAAmC,iCAAiC,cAAc,GAAG,+CAA+C,UAAU,EAAE,GAAG,QAAQ,iCAAiC,gBAAgB,EAAE,kCAAkC,gBAAgB,EAAE,2CAA2C,gBAAgB,GAAG,QAAQ,yCAAyC,gBAAgB,GAAG,QAAQ,wCAAwC,gBAAgB,GAAG,QAAQ,0CAA0C,gBAAgB,EAAE,yCAAyC,gBAAgB,EAAE,GAAG,8BAA8B,eAAe,4BAA4B,sBAAsB,iHAAiH,kBAAkB,wDAAwD,IAAI,4BAA4B,4BAA4B,sCAAsC,SAAS,GAAG,GAAG,GAAG,oDAAoD,qCAAqC,sBAAsB,yDAAyD,MAAM,MAAM,sFAAsF,gMAAgM,GAAG,iDAAiD,wCAAwC,iBAAiB,2BAA2B,iQAAiQ,kBAAkB,YAAY,yBAAyB,WAAW,sBAAsB,0CAA0C,YAAY,GAAG,GAAG,oDAAoD,gDAAgD,uBAAuB,mCAAmC,+BAA+B,uBAAuB,qCAAqC,+BAA+B,oEAAoE,6BAA6B,+FAA+F,yNAAyN,8BAA8B,oDAAoD,0CAA0C,iGAAiG,UAAU,yBAAyB,iBAAiB,oBAAoB,MAAM,yBAAyB,MAAM,8BAA8B,MAAM,oCAAoC,OAAO,2DAA2D,+HAA+H,gBAAgB,4GAA4G,2DAA2D,6BAA6B,GAAG,yCAAyC,2KAA2K,qFAAqF,+EAA+E,gDAAgD,SAAS,oGAAoG,uBAAuB,GAAG,sWAAsW,kBAAkB,2FAA2F,YAAY,iBAAiB,MAAM,mCAAmC,MAAM,yHAAyH,0BAA0B,yCAAyC,kRAAkR,4FAA4F,0BAA0B,6EAA6E,OAAO,iBAAiB,WAAW,KAAK,8GAA8G,iCAAiC,qBAAqB,yBAAyB,2GAA2G,GAAG,GAAG,sDAAsD,kDAAkD,eAAe,+DAA+D,uEAAuE,gBAAgB,2BAA2B,sBAAsB,kBAAkB,gCAAgC,qVAAqV,8IAA8I,wDAAwD,YAAY,IAAI,iCAAiC,mBAAmB,qFAAqF,KAAK,iBAAiB,6BAA6B,gCAAgC,2FAA2F,8BAA8B,+FAA+F,6BAA6B,kBAAkB,0GAA0G,sCAAsC,sDAAsD,YAAY,IAAI,EAAE,0BAA0B,mFAAmF,gBAAgB,OAAO,uBAAuB,6GAA6G,iCAAiC,sHAAsH,WAAW,8GAA8G,uBAAuB,aAAa,MAAM,oGAAoG,sBAAsB,6BAA6B,yCAAyC,yDAAyD,wBAAwB,QAAQ,8CAA8C,sJAAsJ,+CAA+C,oCAAoC,+HAA+H,qCAAqC,gIAAgI,sCAAsC,iFAAiF,0CAA0C,kBAAkB,wBAAwB,GAAG,IAAI;;;;;;;;;;;QCiBpo/BA,Q,GAAAA,Q;AAhChB,IAAMC,cAAcC,GAAGC,iBAAH,GAAuBF,WAA3C;;AAEO,IAAMG,0BAAS,SAATA,MAAS,CAACC,KAAD,EAAW;AAC/B,MAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+BA,QAAQC,OAAOD,MAAME,OAAN,CAAc,SAAd,EAAyB,EAAzB,CAAP,CAAR;AAC/B,SAAON,cAAc,GAAd,GAAoBI,KAA3B;AACD,CAHM;;AAKA,IAAMG,oCAAc,SAAdA,WAAc,CAACH,KAAD,EAAW;AACpC,SAAOC,OAAOD,MAAME,OAAN,CAAc,yBAAd,EAAyC,UAACF,KAAD,EAAQI,GAAR,EAAaC,IAAb,EAAsB;AAC3E,YAAQA,IAAR;AACE,WAAK,IAAL;AACED,eAAO,CAAP;AACA;AACF,WAAK,KAAL;AACEA,cAAML,OAAOK,GAAP,CAAN;AACA;AACF;AACEA,eAAO,CAAP;AACA;AATJ;AAWA,WAAOA,GAAP;AACD,GAba,CAAP,CAAP;AAcD,CAfM;;AAiBA,IAAME,sCAAe,SAAfA,YAAe,CAACC,CAAD,EAAIC,GAAJ,EAASC,MAAT,EAA+D;AAAA,MAA9CC,OAA8C,uEAApC,KAAoC;AAAA,MAA7BC,WAA6B,uEAAf,UAAe;;AACzF,MAAIC,SAASH,OAAOI,WAAP,EAAb;AACAD,SAAOE,MAAP,GAAgB,YAAM;AACpBN,QAAIG,WAAJ,EAAiBC,MAAjB;AACD,GAFD;AAGAA,SAAOG,GAAP,GAAaP,IAAIE,OAAJ,CAAb;AACD,CANM;;AAQA,SAASf,QAAT,GAAqB;AAAA;;AAC1B,SAAO,IAAIqB,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AACtCrB,OAAGsB,oBAAH,CAAwB;AACtBV,cAAQ,MAAKA,MADS;AAEtBW,eAAS;AAAA,eAAOH,QAAQI,GAAR,CAAP;AAAA,OAFa;AAGtBC,YAAM;AAAA,eAAOJ,OAAOK,GAAP,CAAP;AAAA;AAHgB,KAAxB;AAKD,GANM,CAAP;AAOD,C;;;;;;;;;ACxCD;;AACA;;AAEAC,UAAU;AACRC,cAAY;AACVC,WAAO,EAAEC,MAAMC,MAAR,EAAgB5B,OAAO,QAAvB,EADG;AAEV6B,YAAQ,EAAEF,MAAMC,MAAR,EAAgB5B,OAAO,QAAvB,EAFE;AAGV8B,YAAQ,EAAEH,MAAMI,KAAR,EAAe/B,OAAO,EAAtB,EAHE;AAIVgC,YAAQ,EAAEL,MAAMI,KAAR,EAAe/B,OAAO,EAAtB,EAJE;AAKViC,aAAS,EAAEN,MAAMI,KAAR,EAAe/B,OAAO,EAAtB,EALC;AAMVkC,mBAAe,EAAEP,MAAMQ,MAAR,EAAgBnC,OAAO,EAAvB,EANL;AAOVoC,kBAAc,EAAET,MAAMQ,MAAR,EAAgBnC,OAAO,EAAvB,EAPJ;AAQVqC,WAAO,EAAEV,MAAMW,QAAR,EAAkBtC,OAAO,iBAAM,CAAE,CAAjC,EARG;AASVuC,SAAK,EAAEZ,MAAMW,QAAR,EAAkBtC,OAAO,iBAAM,CAAE,CAAjC;AATK,GADJ;AAYRwC,QAAM;AACJC,YAAQ,KADJ;AAEJC,cAAU,EAFN;AAGJC,gBAAY;AAHR,GAZE;AAiBRC,aAAW;AACT,iBAAa,gBAASC,OAAT,EAAkBC,OAAlB,EAA2B;AACtC,WAAKC,MAAL,KAAgB,KAAKA,MAAL,CAAYjB,MAAZ,GAAqBe,OAArC;AACD,KAHQ;AAIT,iBAAa,gBAASA,OAAT,EAAkBC,OAAlB,EAA2B;AACtC,WAAKC,MAAL,KAAgB,KAAKA,MAAL,CAAYf,MAAZ,GAAqBa,OAArC;AACD,KANQ;AAOT,kBAAc,iBAASA,OAAT,EAAkBC,OAAlB,EAA2B;AACvC,WAAKC,MAAL,KAAgB,KAAKA,MAAL,CAAYd,OAAZ,GAAsBY,OAAtC;AACD;AATQ,GAjBH;AA4BRG,OA5BQ,mBA4BA;AAAA;;AACNnD,OAAGoD,mBAAH,GAAyBC,EAAzB,CAA4B,IAA5B,EAAkCC,MAAlC,CAAyC,cAAzC,EAAyDC,MAAzD,CAAgE;AAC9DC,YAAM,IADwD,EAClDC,MAAM;AAD4C,KAAhE,EAEGC,IAFH,CAEQ,UAAClC,GAAD,EAAS;AACf,UAAI,CAACA,IAAI,CAAJ,CAAD,IAAW,CAACA,IAAI,CAAJ,EAAOgC,IAAvB,EAA6B;AAC3B,eAAOG,QAAQC,KAAR,CAAc,6BAAd,CAAP;AACD;AACD,UAAMhD,SAAS,MAAKA,MAAL,GAAcY,IAAI,CAAJ,EAAOgC,IAApC;AACA,UAAMK,MAAM,MAAKA,GAAL,GAAW7D,GAAGC,iBAAH,GAAuB6D,UAA9C;AACA,UAAMC,MAAM,MAAKA,GAAL,GAAWnD,OAAOoD,UAAP,CAAkB,IAAlB,CAAvB;AACA,UAAMrB,OAAO,MAAKA,IAAlB;AACA/B,aAAOiB,KAAP,GAAeL,IAAI,CAAJ,EAAOK,KAAP,GAAegC,GAA9B;AACAjD,aAAOoB,MAAP,GAAgBR,IAAI,CAAJ,EAAOQ,MAAP,GAAgB6B,GAAhC;AACAE,UAAIE,KAAJ,CAAUJ,GAAV,EAAeA,GAAf;AACA,YAAKX,MAAL,GAAc,IAAIgB,0BAAJ,CAAe;AAC3BC,cAAM,OADqB;AAE3BJ,gBAF2B;AAG3BF,gBAH2B;AAI3BhC,eAAOL,IAAI,CAAJ,EAAOK,KAJa;AAK3BG,gBAAQR,IAAI,CAAJ,EAAOQ,MALY;AAM3B;AACAoC,8BAP2B;AAQ3BC,kCAR2B;AAS3BC,gCAT2B;AAU3BC,oCAV2B;AAW3BC,sBAAc,wBAAY;AACxB,cAAMC,SAASC,KAAKC,GAAL,CAAS,KAAKC,MAAL,CAAY/C,KAArB,EAA4B,KAAK+C,MAAL,CAAY5C,MAAxC,IAAkD,CAAjE;AACA;AACA+B,cAAIc,SAAJ,CAAcJ,MAAd,EAAsBA,MAAtB;AACD,SAf0B;AAgB3BK,oBAAY,sBAAY;AACtB;AACAf,cAAIc,SAAJ,CAAc,CAAC,KAAKJ,MAApB,EAA4B,CAAC,KAAKA,MAAlC;AACD,SAnB0B;AAoB3BM,kBAAU,kBAACxE,GAAD,EAAMC,IAAN;AAAA,iBAAe,wBAAYD,MAAMC,IAAlB,CAAf;AAAA;AApBiB,OAAf,EAqBX;AACDyB,gBAAQU,KAAKV,MADZ;AAEDE,gBAAQQ,KAAKR,MAFZ;AAGDC,iBAASO,KAAKP,OAHb;AAIDC,uBAAeM,KAAKN,aAJnB;AAKDE,sBAAcI,KAAKJ,YALlB;AAMDC,eAAO,iBAAa;AAAA,4CAATwC,IAAS;AAATA,gBAAS;AAAA;;AAClB,gBAAKC,YAAL,eAAkB,OAAlB,SAA8BD,IAA9B;AACD,SARA;AASDtC,aAAK,eAAa;AAAA,6CAATsC,IAAS;AAATA,gBAAS;AAAA;;AAChB,gBAAKC,YAAL,eAAkB,KAAlB,SAA4BD,IAA5B;AACAlF,0BAASoF,IAAT,CAAc,KAAd,EAAoBC,IAApB,CAAyB,eAAO;AAC9B,kBAAKC,OAAL,CAAa,EAAEvC,UAAUrB,IAAI6D,YAAhB,EAAb;AACD,WAFD;AAGD;AAdA,OArBW,CAAd;AAqCA;AACA,YAAKD,OAAL,CAAa,EAAExC,QAAQ,IAAV,EAAb;AACD,KApDD;AAqDD,GAlFO;;AAmFR0C,WAAS;AACPC,eADO,uBACM7E,CADN,EACS;AAAA,kCACaA,EAAE8E,aAAF,CAAgBC,OAD7B;AAAA,UACNC,IADM,yBACNA,IADM;AAAA,UACAC,KADA,yBACAA,KADA;AAAA,UACOC,CADP,yBACOA,CADP;;AAEd,UAAMjF,MAAM,KAAKgC,IAAL,CAAU+C,IAAV,EAAgBC,KAAhB,EAAuBE,IAAvB,CAA4BD,CAA5B,CAAZ;AACA,+BAAalF,CAAb,EAAgBC,GAAhB,EAAqB,KAAKC,MAA1B;AACD,KALM;AAMPkF,gBANO,0BAMS;AACd,WAAKhD,UAAL,GAAkB,KAAlB;AACD,KARM;AASPiD,oBATO,4BASWrF,CATX,EASc;AAAA;;AAAA,+BACgBA,EAAEsF,cAAF,CAAiB,CAAjB,CADhB;AAAA,UACFC,CADE,sBACXC,OADW;AAAA,UACUC,CADV,sBACCC,OADD;;AAEnBpG,SAAGoD,mBAAH,GAAyBC,EAAzB,CAA4B,IAA5B,EAAkCC,MAAlC,CAAyC,YAAzC,EAAuDC,MAAvD,CAA8D;AAC5D8C,cAAM;AADsD,OAA9D,EAEG3C,IAFH,CAEQ,UAAClC,GAAD,EAAS;AAAA,oBACOA,IAAI,CAAJ,CADP;AAAA,YACP8E,IADO,SACPA,IADO;AAAA,YACDC,GADC,SACDA,GADC;;AAEf,eAAKC,MAAL,CAAYP,IAAIK,IAAhB,EAAsBH,IAAII,GAA1B;AACD,OALD;AAMD,KAjBM;AAkBPE,uBAlBO,+BAkBc/F,CAlBd,EAkBiB;AAAA,gCACLA,EAAEsF,cAAF,CAAiB,CAAjB,CADK;AAAA,UACdC,CADc,uBACdA,CADc;AAAA,UACXE,CADW,uBACXA,CADW;;AAEtB,WAAKK,MAAL,CAAYP,CAAZ,EAAeE,CAAf;AACD,KArBM;AAsBPK,UAtBO,kBAsBCP,CAtBD,EAsBIE,CAtBJ,EAsBO;AACZ,UAAMpC,MAAM,KAAKA,GAAjB;AACAA,UAAI2C,SAAJ;AACA3C,UAAI4C,GAAJ,CAAQ,CAAR,EAAW,CAAX,EAAc,KAAKzD,MAAL,CAAY0D,YAA1B,EAAwC,CAAxC,EAA2ClC,KAAKmC,EAAL,GAAU,CAArD,EAAwD,KAAxD;AACA,UAAI,CAAC9C,IAAI+C,aAAJ,CAAkBb,IAAI,KAAKpC,GAA3B,EAAgCsC,IAAI,KAAKtC,GAAzC,CAAL,EAAoD;AACpD;AACA,WAAKf,UAAL,GAAkB,IAAlB;AACA,WAAKsC,OAAL,CAAa,EAAEvC,UAAU,EAAZ,EAAb;AACA;AACA,WAAKK,MAAL,CAAY6D,aAAZ;AACD,KAhCM;AAiCPC,QAjCO,kBAiCO;AAAA;;AACZ,sBAAK9D,MAAL,EAAY8D,IAAZ;AACD,KAnCM;AAoCPC,QApCO,kBAoCO;AAAA;;AACZ,uBAAK/D,MAAL,EAAY+D,IAAZ;AACD;AAtCM;AAnFD,CAAV,E","file":"lucky-wheel\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nvar t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){if(\"function\"!=typeof i&&null!==i)throw new TypeError(\"Class extends value \"+String(i)+\" is not a constructor or null\");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function n(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function r(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function o(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t}String.prototype.includes||(String.prototype.includes=function(t,e){return\"number\"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),Array.prototype.find||Object.defineProperty(Array.prototype,\"find\",{value:function(t){if(null==this)throw new TypeError('\"this\" is null or not defined');var e=Object(this),i=e.length>>>0;if(\"function\"!=typeof t)throw new TypeError(\"predicate must be a function\");for(var n=arguments[1],r=0;r<i;){var o=e[r];if(t.call(n,o,r,e))return o;r++}}});var s=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.some((function(e){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()===e}))},a=function(t){return[].filter.call(t,(function(t){return\"\\n\"!==t})).join(\"\")},u=function(t){if(\"string\"!=typeof t)return!1;if(\"transparent\"===(t=t.toLocaleLowerCase().trim()))return!1;if(/^rgba/.test(t)){var e=/([^\\s,]+)\\)$/.exec(t);if(0===(null===(i=e)?0:\"object\"==typeof i?NaN:\"number\"==typeof i?i:\"string\"==typeof i?\"%\"===i[i.length-1]?Number(i.slice(0,-1))/100:Number(i):NaN))return!1}var i;return!0},h=function(){function t(){this.subs=[]}return t.prototype.addSub=function(t){this.subs.includes(t)||this.subs.push(t)},t.prototype.notify=function(){this.subs.forEach((function(t){t.update()}))},t}(),c=\"__proto__\"in{};function l(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}var f=Array.prototype,d=Object.create(f);[\"push\",\"pop\",\"shift\",\"unshift\",\"sort\",\"splice\",\"reverse\"].forEach((function(t){d[t]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=f[t].apply(this,e),r=this.__luckyOb__;return[\"push\",\"unshift\",\"splice\"].includes(t)&&r.walk(this),r.dep.notify(),n}}));var p=function(){function t(t){this.dep=new h,l(t,\"__luckyOb__\",this),Array.isArray(t)&&(c?t.__proto__=d:Object.getOwnPropertyNames(d).forEach((function(e){l(t,e,d[e])}))),this.walk(t)}return t.prototype.walk=function(t){Object.keys(t).forEach((function(e){m(t,e,t[e])}))},t}();function g(t){if(t&&\"object\"==typeof t)return\"__luckyOb__\"in t?t.__luckyOb__:new p(t)}function m(t,e,i){var n=new h,r=Object.getOwnPropertyDescriptor(t,e);if(!r||!1!==r.configurable){var o=r&&r.get,s=r&&r.set;o&&!s||2!==arguments.length||(i=t[e]);var a=g(i);Object.defineProperty(t,e,{get:function(){var e=o?o.call(t):i;return h.target&&(n.addSub(h.target),a&&a.dep.addSub(h.target)),e},set:function(e){e!==i&&(i=e,o&&!s||(s?s.call(t,e):i=e,a=g(e),n.notify()))}})}}var v=0,b=function(){function t(t,e,i,n){void 0===n&&(n={}),this.id=v++,this.$lucky=t,this.expr=e,this.deep=!!n.deep,this.getter=\"function\"==typeof e?e:function(t){t+=\".\";for(var e=[],i=\"\",n=0;n<t.length;n++){var r=t[n];if(/\\[|\\./.test(r))e.push(i),i=\"\";else{if(/\\W/.test(r))continue;i+=r}}return function(t){return e.reduce((function(t,e){return t[e]}),t)}}(e),this.cb=i,this.value=this.get()}return t.prototype.get=function(){h.target=this;var t=this.getter.call(this.$lucky,this.$lucky);return this.deep&&function(t){var e=function(t){s(t,\"array\",\"object\")&&Object.keys(t).forEach((function(i){var n=t[i];e(n)}))};e(t)}(t),h.target=null,t},t.prototype.update=function(){var t=this.get(),e=this.value;this.value=t,this.cb.call(this.$lucky,t,e)},t}(),y=function(){function t(t){var e=this;this.htmlFontSize=16,this.rAF=function(){},this.boxWidth=0,this.boxHeight=0,this.setHTMLFontSize(),\"string\"==typeof t?t={el:t}:1===t.nodeType&&(t={el:\"\",divElement:t}),t=t,this.config=t,this.setDpr(),this.initWindowFunction(),t.flag||(t.flag=\"WEB\"),Object.prototype.hasOwnProperty.call(t,\"ob\")||(t.ob=!0),t.el&&(t.divElement=document.querySelector(t.el)),t.divElement&&(t.canvasElement=document.createElement(\"canvas\"),t.divElement.appendChild(t.canvasElement)),this.resetWidthAndHeight(),t.canvasElement&&(t.ctx=t.canvasElement.getContext(\"2d\"),t.canvasElement.setAttribute(\"package\",\"lucky-canvas@1.5.4\"),t.canvasElement.addEventListener(\"click\",(function(t){return e.handleClick(t)})),t.canvasElement.addEventListener(\"mousemove\",(function(t){return e.handleMouseMove(t)})),t.canvasElement.addEventListener(\"mousedown\",(function(t){return e.handleMouseDown(t)})),t.canvasElement.addEventListener(\"mouseup\",(function(t){return e.handleMouseUp(t)}))),this.ctx=t.ctx,t.ctx?this.boxWidth&&this.boxHeight||console.error(\"无法获取到宽度或高度\"):console.error(\"无法获取到 CanvasContext2D\")}return t.prototype.init=function(t){this.setDpr(),this.setHTMLFontSize(),this.resetWidthAndHeight(),this.zoomCanvas()},t.prototype.handleClick=function(t){},t.prototype.handleMouseDown=function(t){},t.prototype.handleMouseUp=function(t){},t.prototype.handleMouseMove=function(t){},t.prototype.conversionAxis=function(t,e){return[0,0]},t.prototype.setDpr=function(){var t=this.config;t.dpr||(window?window.dpr=t.dpr=window.devicePixelRatio||1:t.dpr||console.error(t,\"未传入 dpr 可能会导致绘制异常\"))},t.prototype.setHTMLFontSize=function(){window&&(this.htmlFontSize=+window.getComputedStyle(document.documentElement).fontSize.slice(0,-2))},t.prototype.resetWidthAndHeight=function(){var t=this.config,e=0,i=0;t.divElement&&(e=t.divElement.offsetWidth,i=t.divElement.offsetHeight),this.boxWidth=this.getLength(t.width)||e,this.boxHeight=this.getLength(t.height)||i,t.divElement&&(t.divElement.style.overflow=\"hidden\",t.divElement.style.width=this.boxWidth+\"px\",t.divElement.style.height=this.boxHeight+\"px\")},t.prototype.initWindowFunction=function(){var t=this.config;if(window)return this.rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},t.setTimeout=window.setTimeout,t.setInterval=window.setInterval,t.clearTimeout=window.clearTimeout,void(t.clearInterval=window.clearInterval);if(t.rAF)this.rAF=t.rAF;else if(t.setTimeout){var e=t.setTimeout;this.rAF=function(t){return e(t,16.7)}}else this.rAF=function(t){return setTimeout(t,16.7)}},t.prototype.zoomCanvas=function(){var t=this.config,e=this.ctx,i=t.canvasElement,n=t.dpr,r=[this.boxWidth*n,this.boxHeight*n],o=r[0],s=r[1],a=function(t){return(t*n-t)/(t*n)*(n/2)*100};i&&(i.width=o,i.height=s,i.style.width=o+\"px\",i.style.height=s+\"px\",i.style.transform=\"scale(\"+1/n+\") translate(\"+-a(o)+\"%, \"+-a(s)+\"%)\",e.scale(n,n))},t.prototype.loadImg=function(t,e,i){var n=this;return void 0===i&&(i=\"$resolve\"),new Promise((function(r,o){if(t||o(\"=> '\"+e.src+\"' 不能为空或不合法\"),\"WEB\"===n.config.flag){var s=new Image;s.src=t,s.onload=function(){return r(s)},s.onerror=function(){return o(\"=> '\"+e.src+\"' 图片加载失败\")}}else e[i]=r}))},t.prototype.drawImage=function(t,e,i,n,r){var o,s=this.config,a=this.ctx;return[\"WEB\",\"MP-WX\"].includes(s.flag)?o=t:[\"UNI-H5\",\"UNI-MP\",\"TARO-H5\",\"TARO-MP\"].includes(s.flag)&&(o=t.path),a.drawImage(o,e,i,n,r)},t.prototype.getLength=function(t){return s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t):0},t.prototype.changeUnits=function(t,e){var i=this;return void 0===e&&(e=1),Number(t.replace(/^([-]*[0-9.]*)([a-z%]*)$/,(function(t,n,r){var o={\"%\":function(t){return t*(e/100)},px:function(t){return 1*t},rem:function(t){return t*i.htmlFontSize}}[r];if(o)return o(n);var s=i.config.unitFunc;return s?s(n,r):n})))},t.prototype.$set=function(t,e,i){t&&\"object\"==typeof t&&m(t,e,i)},t.prototype.$computed=function(t,e,i){var n=this;Object.defineProperty(t,e,{get:function(){return i.call(n)}})},t.prototype.$watch=function(t,e,i){void 0===i&&(i={}),\"object\"==typeof e&&(e=(i=e).handler);var n=new b(this,t,e,i);return i.immediate&&e.call(this,n.value),function(){}},t}(),w=function(t){return Math.PI/180*t},x=function(t,e){return[+(Math.cos(t)*e).toFixed(8),+(Math.sin(t)*e).toFixed(8)]},z=function(t,e){var i=-t/e;return[i,-i*t+e]},I=function(t,e,i,n,r,o){var s;if(void 0===o&&(o=!0),Math.abs(r-n).toFixed(8)>=w(180).toFixed(8)){var a=(r+n)/2;return o?(I(t,e,i,n,a,o),I(t,e,i,a,r,o)):(I(t,e,i,a,r,o),I(t,e,i,n,a,o)),!1}o||(n=(s=[r,n])[0],r=s[1]);var u=x(n,i),h=u[0],c=u[1],l=x(r,i),f=l[0],d=l[1],p=z(h,c),g=p[0],m=p[1],v=z(f,d),b=v[0],y=v[1],k=(y-m)/(g-b),S=(b*m-g*y)/(b-g);isNaN(k)&&(Math.abs(h)===+i.toFixed(8)&&(k=h),Math.abs(f)===+i.toFixed(8)&&(k=f)),g===1/0||g===-1/0?S=b*k+y:b!==1/0&&b!==-1/0||(S=g*k+m),e.lineTo(h,c),t.indexOf(\"MP\")>0?e.quadraticCurveTo(k,S,f,d):e.arcTo(k,S,f,d,i)},k=function(t,e,i,n,r,o,s,a){i||(i=s);var u=w(90/Math.PI/n*s),h=w(90/Math.PI/i*s),c=r+u,l=o-u,f=r+h,d=o-h;e.beginPath(),e.fillStyle=a,e.moveTo.apply(e,x(c,n)),I(t,e,n,c,l,!0),d>f?I(t,e,i,f,d,!1):e.lineTo.apply(e,x((r+o)/2,s/2/Math.abs(Math.sin((r-o)/2)))),e.closePath(),e.fill()},S=function(t,e,i,n,r,o,s){var a=Math.min(n,r);o>a/2&&(o=a/2),t.beginPath(),t.fillStyle=s,t.moveTo(e+o,i),t.lineTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+o),t.lineTo(e+n,i+r-o),t.quadraticCurveTo(e+n,i+r,e+n-o,i+r),t.lineTo(e+o,i+r),t.quadraticCurveTo(e,i+r,e,i+r-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath(),t.fill()},C={easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*(t/=n)*(t-2)+e}},T={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*Math.cos(t/n*(Math.PI/2))+i+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sin(t/n*(Math.PI/2))+e}},W={easeIn:function(t,e,i,n){return t>=n&&(t=n),0==t?e:i*Math.pow(2,10*(t/n-1))+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),t==n?e+i:i*(1-Math.pow(2,-10*t/n))+e}},O={easeIn:function(t,e,i,n){return t>=n&&(t=n),-i*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*Math.sqrt(1-(t=t/n-1)*t)+e}},_=Object.freeze({__proto__:null,quad:C,cubic:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t+1)+e}},quart:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),-i*((t=t/n-1)*t*t*t-1)+e}},quint:{easeIn:function(t,e,i,n){return t>=n&&(t=n),i*(t/=n)*t*t*t*t+e},easeOut:function(t,e,i,n){return t>=n&&(t=n),i*((t=t/n-1)*t*t*t*t+1)+e}},sine:T,expo:W,circ:O}),E=function(t){function o(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;return r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:\"0px\",offsetDegree:0,speed:20,speedFunction:\"quad\",accelerationTime:2500,decelerationTime:2500,stopRange:.8},r.defaultStyle={},r._defaultStyle={fontSize:\"18px\",fontColor:\"#000\",fontStyle:\"sans-serif\",fontWeight:\"400\",lineHeight:\"\",background:\"rgba(0,0,0,0)\",wordWrap:!0,lengthLimit:\"90%\"},r.Radius=0,r.prizeRadius=0,r.prizeDeg=0,r.prizeRadian=0,r.rotateDeg=0,r.maxBtnRadius=0,r.startTime=0,r.endTime=0,r.stopDeg=0,r.endDeg=0,r.FPS=16.6,r.blockImgs=[[]],r.prizeImgs=[[]],r.btnImgs=[[]],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:r.buttons.map((function(t){return t.imgs}))}),r}return e(o,t),o.prototype.initData=function(t){this.$set(this,\"blocks\",t.blocks||[]),this.$set(this,\"prizes\",t.prizes||[]),this.$set(this,\"buttons\",t.buttons||[]),this.$set(this,\"defaultConfig\",t.defaultConfig||{}),this.$set(this,\"defaultStyle\",t.defaultStyle||{}),this.$set(this,\"startCallback\",t.start),this.$set(this,\"endCallback\",t.end)},o.prototype.initComputed=function(){var t=this;this.$computed(this,\"_defaultConfig\",(function(){return i({gutter:\"0px\",offsetDegree:0,speed:20,speedFunction:\"quad\",accelerationTime:2500,decelerationTime:2500,stopRange:.8},t.defaultConfig)})),this.$computed(this,\"_defaultStyle\",(function(){return i({fontSize:\"18px\",fontColor:\"#000\",fontStyle:\"sans-serif\",fontWeight:\"400\",background:\"rgba(0,0,0,0)\",wordWrap:!0,lengthLimit:\"90%\"},t.defaultStyle)}))},o.prototype.initWatch=function(){var t=this;this.$watch(\"blocks\",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"prizes\",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"buttons\",(function(e){return t.init({btnImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"defaultConfig\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"defaultStyle\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"startCallback\",(function(){return t.init({})})),this.$watch(\"endCallback\",(function(){return t.init({})}))},o.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this.config,s=this.ctx;this.Radius=Math.min(this.boxWidth,this.boxHeight)/2,null===(i=o.beforeInit)||void 0===i||i.call(this),s.translate(this.Radius,this.Radius),this.draw(),this.draw(),Object.keys(e).forEach((function(t){var i=t,n={blockImgs:\"blocks\",prizeImgs:\"prizes\",btnImgs:\"buttons\"}[i],o=e[i];o&&o.forEach((function(t,e){t&&t.forEach((function(t,o){r.loadAndCacheImg(n,e,i,o,(function(){r.draw()}))}))}))})),null===(n=o.afterInit)||void 0===n||n.call(this)},o.prototype.handleClick=function(t){var e,i=this.ctx;i.beginPath(),i.arc(0,0,this.maxBtnRadius,0,2*Math.PI,!1),i.isPointInPath(t.offsetX,t.offsetY)&&(this.startTime||null===(e=this.startCallback)||void 0===e||e.call(this,t))},o.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u=this;return r(this,(function(r){return(n=this[t][e])&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),this.loadImg(a.src,a).then((function(t){u[i][e][o]=t,s.call(u)})).catch((function(i){console.error(t+\"[\"+e+\"].imgs[\"+o+\"] \"+i)})),[2]):[2]}))}))},o.prototype.computedWidthAndHeight=function(t,e,i,n){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var r=this.getWidth(e.width,i);return[r,t.height*(r/t.width)]}if(!e.width&&e.height){var o=this.getHeight(e.height,n);return[t.width*(o/t.height),o]}return[this.getWidth(e.width,i),this.getHeight(e.height,n)]},o.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,o=n.ctx,s=n._defaultConfig,h=n._defaultStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,o),o.clearRect(-this.Radius,-this.Radius,2*this.Radius,2*this.Radius),this.prizeRadius=this.blocks.reduce((function(t,e,n){return u(e.background)&&(o.beginPath(),o.fillStyle=e.background,o.arc(0,0,t,0,2*Math.PI,!1),o.fill()),e.imgs&&e.imgs.forEach((function(e,r){if(i.blockImgs[n]){var s=i.blockImgs[n][r];if(s){var a=i.computedWidthAndHeight(s,e,2*t,2*t),u=a[0],h=a[1],c=[i.getOffsetX(u),i.getHeight(e.top,2*t)-t],l=c[0],f=c[1];o.save(),e.rotate&&o.rotate(w(i.rotateDeg)),i.drawImage(s,l,f,u,h),o.restore()}}})),t-i.getLength(e.padding&&e.padding.split(\" \")[0])}),this.Radius),this.prizeDeg=360/this.prizes.length,this.prizeRadian=w(this.prizeDeg);var c=w(-90+this.rotateDeg+s.offsetDegree),l=function(t){return i.getOffsetX(o.measureText(t).width)},f=function(t,e,n){var r=t.lineHeight||h.lineHeight||t.fontSize||h.fontSize;return i.getHeight(t.top,e)+(n+1)*i.getLength(r)};o.save(),this.prizes.forEach((function(t,e){var n=c+e*i.prizeRadian,d=i.prizeRadius-i.maxBtnRadius,p=t.background||h.background;u(p)&&function(t,e,i,n,r,o,s,a){s?k(t,e,i,n,r,o,s,a):(e.beginPath(),e.fillStyle=a,e.moveTo(0,0),e.arc(0,0,n,r,o,!1),e.closePath(),e.fill())}(r.flag,o,i.maxBtnRadius,i.prizeRadius,n-i.prizeRadian/2,n+i.prizeRadian/2,i.getLength(s.gutter),p);var g=Math.cos(n)*i.prizeRadius,m=Math.sin(n)*i.prizeRadius;o.translate(g,m),o.rotate(n+w(90)),t.imgs&&t.imgs.forEach((function(t,n){if(i.prizeImgs[e]){var r=i.prizeImgs[e][n];if(r){var o=i.computedWidthAndHeight(r,t,i.prizeRadian*i.prizeRadius,d),s=o[0],a=o[1],u=[i.getOffsetX(s),i.getHeight(t.top,d)],h=u[0],c=u[1];i.drawImage(r,h,c,s,a)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,n=t.fontWeight||h.fontWeight,r=i.getLength(t.fontSize||h.fontSize),u=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=n+\" \"+(r>>0)+\"px \"+u;var c=[],p=String(t.text);if(Object.prototype.hasOwnProperty.call(t,\"wordWrap\")?t.wordWrap:h.wordWrap){p=a(p);for(var g=\"\",m=0;m<p.length;m++){g+=p[m];var v=o.measureText(g).width,b=(i.prizeRadius-f(t,d,c.length))*Math.tan(i.prizeRadian/2)*2-i.getLength(s.gutter);v>i.getWidth(t.lengthLimit||h.lengthLimit,b)&&(c.push(g.slice(0,-1)),g=p[m])}g&&c.push(g),c.length||c.push(p)}else c=p.split(\"\\n\");c.filter((function(t){return!!t})).forEach((function(e,i){o.fillText(e,l(e),f(t,d,i))}))})),o.rotate(w(360)-n-w(90)),o.translate(-g,-m)})),o.restore(),this.buttons.forEach((function(t,e){var n=i.getHeight(t.radius);i.maxBtnRadius=Math.max(i.maxBtnRadius,n),u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.arc(0,0,n,0,2*Math.PI,!1),o.fill()),t.pointer&&u(t.background)&&(o.beginPath(),o.fillStyle=t.background,o.moveTo(-n,0),o.lineTo(n,0),o.lineTo(0,2*-n),o.closePath(),o.fill()),t.imgs&&t.imgs.forEach((function(t,r){if(i.btnImgs[e]){var o=i.btnImgs[e][r];if(o){var s=i.computedWidthAndHeight(o,t,2*n,2*n),a=s[0],u=s[1],h=[i.getOffsetX(a),i.getHeight(t.top,n)],c=h[0],l=h[1];i.drawImage(o,c,l,a,u)}}})),t.fonts&&t.fonts.forEach((function(t){var e=t.fontColor||h.fontColor,r=t.fontWeight||h.fontWeight,s=i.getLength(t.fontSize||h.fontSize),a=t.fontStyle||h.fontStyle;o.fillStyle=e,o.font=r+\" \"+(s>>0)+\"px \"+a,String(t.text).split(\"\\n\").forEach((function(e,i){o.fillText(e,l(e),f(t,n,i))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,o)},o.prototype.play=function(){this.startTime||(this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},o.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.rotateDeg=this.prizeDeg/2-this._defaultConfig.offsetDegree,this.draw())},o.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.prizeFlag,r=e.prizeDeg,o=e.rotateDeg,s=e._defaultConfig,a=Date.now()-this.startTime;if(a>=s.accelerationTime&&void 0!==n){this.FPS=a/t,this.endTime=Date.now(),this.stopDeg=o;for(var u=(Math.random()*r-r/2)*this.getLength(s.stopRange),h=0;++h;){var c=360*h-n*r-o-s.offsetDegree+u;if(_[s.speedFunction].easeOut(this.FPS,this.stopDeg,c,s.decelerationTime)-this.stopDeg>s.speed){this.endDeg=c;break}}return this.slowDown()}this.rotateDeg=(o+_[s.speedFunction].easeIn(a,0,s.speed,s.accelerationTime))%360,this.draw(),i(this.run.bind(this,t+1))},o.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopDeg,a=e.endDeg,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>=u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.rotateDeg=_[u.speedFunction].easeOut(h,s,a,u.decelerationTime)%360,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},o.prototype.getWidth=function(t,e){return void 0===e&&(e=this.prizeRadian*this.prizeRadius),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,e):0},o.prototype.getHeight=function(t,e){return void 0===e&&(e=this.prizeRadius),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,e):0},o.prototype.getOffsetX=function(t){return-t/2},o.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr-this.Radius,e/i.dpr-this.Radius]},o}(y),P=function(t){function h(e,i){var n;void 0===i&&(i={});var r=t.call(this,e)||this;r.rows=3,r.cols=3,r.blocks=[],r.prizes=[],r.buttons=[],r.defaultConfig={},r._defaultConfig={gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},r.defaultStyle={},r._defaultStyle={borderRadius:20,fontColor:\"#000\",fontSize:\"18px\",fontStyle:\"sans-serif\",fontWeight:\"400\",lineHeight:\"\",background:\"rgba(0,0,0,0)\",shadow:\"\",wordWrap:!0,lengthLimit:\"90%\"},r.activeStyle={},r._activeStyle={background:\"#ffce98\",shadow:\"\",fontStyle:\"\",fontWeight:\"\",fontSize:\"\",lineHeight:\"\",fontColor:\"\"},r.cellWidth=0,r.cellHeight=0,r.startTime=0,r.endTime=0,r.currIndex=0,r.stopIndex=0,r.endIndex=0,r.demo=!1,r.timer=0,r.FPS=16.6,r.prizeFlag=-1,r.cells=[],r.blockImgs=[[]],r.btnImgs=[[]],r.prizeImgs=[],e.ob&&(r.initData(i),r.initWatch()),r.initComputed(),null===(n=e.beforeCreate)||void 0===n||n.call(r);var o=r.buttons.map((function(t){return t.imgs}));return r.button&&o.push(r.button.imgs),r.init({blockImgs:r.blocks.map((function(t){return t.imgs})),prizeImgs:r.prizes.map((function(t){return t.imgs})),btnImgs:o}),r}return e(h,t),h.prototype.initData=function(t){this.$set(this,\"rows\",Number(t.rows)||3),this.$set(this,\"cols\",Number(t.cols)||3),this.$set(this,\"blocks\",t.blocks||[]),this.$set(this,\"prizes\",t.prizes||[]),this.$set(this,\"buttons\",t.buttons||[]),this.$set(this,\"button\",t.button),this.$set(this,\"defaultConfig\",t.defaultConfig||{}),this.$set(this,\"defaultStyle\",t.defaultStyle||{}),this.$set(this,\"activeStyle\",t.activeStyle||{}),this.$set(this,\"startCallback\",t.start),this.$set(this,\"endCallback\",t.end)},h.prototype.initComputed=function(){var t=this;this.$computed(this,\"_defaultConfig\",(function(){var e=i({gutter:5,speed:20,accelerationTime:2500,decelerationTime:2500},t.defaultConfig);return e.gutter=t.getLength(e.gutter),e.speed=e.speed/40,e})),this.$computed(this,\"_defaultStyle\",(function(){return i({borderRadius:20,fontColor:\"#000\",fontSize:\"18px\",fontStyle:\"sans-serif\",fontWeight:\"400\",background:\"rgba(0,0,0,0)\",shadow:\"\",wordWrap:!0,lengthLimit:\"90%\"},t.defaultStyle)})),this.$computed(this,\"_activeStyle\",(function(){return i({background:\"#ffce98\",shadow:\"\"},t.activeStyle)}))},h.prototype.initWatch=function(){var t=this;this.$watch(\"blocks\",(function(e){return t.init({blockImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"prizes\",(function(e){return t.init({prizeImgs:e.map((function(t){return t.imgs}))})}),{deep:!0}),this.$watch(\"buttons\",(function(e){var i=e.map((function(t){return t.imgs}));return t.button&&i.push(t.button.imgs),t.init({btnImgs:i})}),{deep:!0}),this.$watch(\"button\",(function(){var e=t.buttons.map((function(t){return t.imgs}));return t.button&&e.push(t.button.imgs),t.init({btnImgs:e})}),{deep:!0}),this.$watch(\"rows\",(function(){return t.init({})})),this.$watch(\"cols\",(function(){return t.init({})})),this.$watch(\"defaultConfig\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"defaultStyle\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"activeStyle\",(function(){return t.draw()}),{deep:!0}),this.$watch(\"startCallback\",(function(){return t.init({})})),this.$watch(\"endCallback\",(function(){return t.init({})}))},h.prototype.init=function(e){var i,n,r=this;t.prototype.init.call(this);var o=this,s=o.config;o.ctx,o.button,null===(i=s.beforeInit)||void 0===i||i.call(this),this.draw(),Object.keys(e).forEach((function(t){var i=t,n=e[i],o={blockImgs:\"blocks\",prizeImgs:\"prizes\",btnImgs:\"buttons\"}[i];n&&n.forEach((function(t,e){t&&t.forEach((function(t,n){r.loadAndCacheImg(o,e,i,n,(function(){r.draw()}))}))}))})),null===(n=s.afterInit)||void 0===n||n.call(this)},h.prototype.handleClick=function(t){var e=this,i=this.ctx;o(o([],this.buttons),[this.button]).forEach((function(n){var r;if(n){var o=e.getGeometricProperty([n.x,n.y,n.col||1,n.row||1]),s=o[0],a=o[1],u=o[2],h=o[3];i.beginPath(),i.rect(s,a,u,h),i.isPointInPath(t.offsetX,t.offsetY)&&(e.startTime||(\"function\"==typeof n.callback&&n.callback.call(e,n),null===(r=e.startCallback)||void 0===r||r.call(e,t,n)))}}))},h.prototype.loadAndCacheImg=function(t,e,i,o,s){return n(this,void 0,void 0,(function(){var n,a,u,h=this;return r(this,(function(r){return n=this[t][e],\"buttons\"===t&&!this.buttons.length&&this.button&&(n=this.button),n&&n.imgs&&(a=n.imgs[o])?(this[i][e]||(this[i][e]=[]),u=[this.loadImg(a.src,a),a.activeSrc&&this.loadImg(a.activeSrc,a,\"$activeResolve\")],Promise.all(u).then((function(t){var n=t[0],r=t[1];h[i][e][o]={defaultImg:n,activeImg:r},s.call(h)})).catch((function(i){console.error(t+\"[\"+e+\"].imgs[\"+o+\"] \"+i)})),[2]):[2]}))}))},h.prototype.computedWidthAndHeight=function(t,e,i){if(!e.width&&!e.height)return[t.width,t.height];if(e.width&&!e.height){var n=this.getWidth(e.width,i.col);return[n,t.height*(n/t.width)]}if(!e.width&&e.height){var r=this.getHeight(e.height,i.row);return[t.width*(r/t.height),r]}return[this.getWidth(e.width,i.col),this.getHeight(e.height,i.row)]},h.prototype.draw=function(){var t,e,i=this,n=this,r=n.config,h=n.ctx,c=n._defaultConfig,l=n._defaultStyle,f=n._activeStyle;null===(t=r.beforeDraw)||void 0===t||t.call(this,h),h.clearRect(0,0,this.boxWidth,this.boxHeight),this.cells=o(o([],this.prizes),this.buttons),this.button&&this.cells.push(this.button),this.cells.forEach((function(t){t.col=t.col||1,t.row=t.row||1})),this.prizeArea=this.blocks.reduce((function(t,e){var n=t.x,r=t.y,o=t.w,a=t.h,c=function(t){var e,i=(null===(e=t.padding)||void 0===e?void 0:e.replace(/px/g,\"\").split(\" \").map((function(t){return~~t})))||[0],n=0,r=0,o=0,a=0;switch(i.length){case 1:n=r=o=a=i[0];break;case 2:n=r=i[0],o=a=i[1];break;case 3:n=i[0],o=a=i[1],r=i[2];break;default:n=i[0],r=i[1],o=i[2],a=i[3]}var u={paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:a};for(var h in u)u[h]=Object.prototype.hasOwnProperty.call(t,h)&&s(t[h],\"string\",\"number\")?~~String(t[h]).replace(/px/g,\"\"):u[h];return[n,r,o,a]}(e),f=c[0],d=c[1],p=c[2],g=c[3],m=e.borderRadius?i.getLength(e.borderRadius):0,v=e.background||l.background;return u(v)&&S(h,n,r,o,a,m,i.handleBackground(n,r,o,a,v)),{x:n+p,y:r+f,w:o-p-g,h:a-f-d}}),{x:0,y:0,w:this.boxWidth,h:this.boxHeight}),this.cellWidth=(this.prizeArea.w-c.gutter*(this.cols-1))/this.cols,this.cellHeight=(this.prizeArea.h-c.gutter*(this.rows-1))/this.rows,this.cells.forEach((function(t,e){var n=i.getGeometricProperty([t.x,t.y,t.col,t.row]),o=n[0],s=n[1],c=n[2],d=n[3],p=!1;(void 0===i.prizeFlag||i.prizeFlag>-1)&&(p=e===i.currIndex%i.prizes.length>>0);var g=p?f.background:t.background||l.background;if(u(g)){var m=(p?f.shadow:t.shadow||l.shadow).replace(/px/g,\"\").split(\",\")[0].split(\" \").map((function(t,e){return e<3?Number(t):t}));4===m.length&&(h.shadowColor=m[3],h.shadowOffsetX=m[0]*r.dpr,h.shadowOffsetY=m[1]*r.dpr,h.shadowBlur=m[2],m[0]>0?c-=m[0]:(c+=m[0],o-=m[0]),m[1]>0?d-=m[1]:(d+=m[1],s-=m[1])),S(h,o,s,c,d,i.getLength(t.borderRadius?t.borderRadius:l.borderRadius),i.handleBackground(o,s,c,d,g)),h.shadowColor=\"rgba(0, 0, 0, 0)\",h.shadowOffsetX=0,h.shadowOffsetY=0,h.shadowBlur=0}var v=\"prizeImgs\";e>=i.prizes.length&&(v=\"btnImgs\",e-=i.prizes.length),t.imgs&&t.imgs.forEach((function(n,r){if(i[v][e]){var a=i[v][e][r];if(a){var u=p&&a.activeImg||a.defaultImg;if(u){var h=i.computedWidthAndHeight(u,n,t),c=h[0],l=h[1],f=[o+i.getOffsetX(c,t.col),s+i.getHeight(n.top,t.row)],d=f[0],g=f[1];i.drawImage(u,d,g,c,l)}}}})),t.fonts&&t.fonts.forEach((function(e){var n=p&&f.fontStyle?f.fontStyle:e.fontStyle||l.fontStyle,r=p&&f.fontWeight?f.fontWeight:e.fontWeight||l.fontWeight,u=p&&f.fontSize?i.getLength(f.fontSize):i.getLength(e.fontSize||l.fontSize),c=p&&f.lineHeight?f.lineHeight:e.lineHeight||l.lineHeight||e.fontSize||l.fontSize;h.font=r+\" \"+(u>>0)+\"px \"+n,h.fillStyle=p&&f.fontColor?f.fontColor:e.fontColor||l.fontColor;var d=[],g=String(e.text);if(Object.prototype.hasOwnProperty.call(e,\"wordWrap\")?e.wordWrap:l.wordWrap){g=a(g);for(var m=\"\",v=0;v<g.length;v++){m+=g[v],h.measureText(m).width>i.getWidth(e.lengthLimit||l.lengthLimit,t.col)&&(d.push(m.slice(0,-1)),m=g[v])}m&&d.push(m),d.length||d.push(g)}else d=g.split(\"\\n\");d.forEach((function(n,r){h.fillText(n,o+i.getOffsetX(h.measureText(n).width,t.col),s+i.getHeight(e.top,t.row)+(r+1)*i.getLength(c))}))}))})),null===(e=r.afterDraw)||void 0===e||e.call(this,h)},h.prototype.handleBackground=function(t,e,i,n,r){var o=this.ctx;return r.includes(\"linear-gradient\")&&(r=function(t,e,i,n,r,o){var s=/linear-gradient\\((.+)\\)/.exec(o)[1].split(\",\").map((function(t){return t.trim()})),a=s.shift(),u=[0,0,0,0];if(a.includes(\"deg\")){var h=function(t){return Math.tan(t/180*Math.PI)};(a=a.slice(0,-3)%360)>=0&&a<45?u=[e,i+r,e+n,i+r-n*h(a-0)]:a>=45&&a<90?u=[e,i+r,e+n-r*h(a-45),i]:a>=90&&a<135?u=[e+n,i+r,e+n-r*h(a-90),i]:a>=135&&a<180?u=[e+n,i+r,e,i+n*h(a-135)]:a>=180&&a<225?u=[e+n,i,e,i+n*h(a-180)]:a>=225&&a<270?u=[e+n,i,e+r*h(a-225),i+r]:a>=270&&a<315?u=[e,i,e+r*h(a-270),i+r]:a>=315&&a<360&&(u=[e,i,e+n,i+r-n*h(a-315)])}else a.includes(\"top\")?u=[e,i+r,e,i]:a.includes(\"bottom\")?u=[e,i,e,i+r]:a.includes(\"left\")?u=[e+n,i,e,i]:a.includes(\"right\")&&(u=[e,i,e+n,i]);var c=t.createLinearGradient.apply(t,u.map((function(t){return t>>0})));return s.reduce((function(t,e,i){var n=e.split(\" \");return 1===n.length?t.addColorStop(i,n[0]):2===n.length&&t.addColorStop.apply(t,n),t}),c)}(o,t,e,i,n,r)),r},h.prototype.play=function(){var t=this.config.clearInterval;this.startTime||(t(this.timer),this.startTime=Date.now(),this.prizeFlag=void 0,this.run())},h.prototype.stop=function(t){this.prizeFlag=t<0?-1:t%this.prizes.length,-1===this.prizeFlag&&(this.currIndex=0,this.draw())},h.prototype.run=function(t){void 0===t&&(t=0);var e=this,i=e.rAF,n=e.currIndex,r=e.prizes,o=e.prizeFlag,s=e.startTime,a=e._defaultConfig,u=Date.now()-s;if(u>=a.accelerationTime&&void 0!==o){this.FPS=u/t,this.endTime=Date.now(),this.stopIndex=n;for(var h=0;++h;){var c=r.length*h+o-(n>>0);if(C.easeOut(this.FPS,this.stopIndex,c,a.decelerationTime)-this.stopIndex>a.speed){this.endIndex=c;break}}return this.slowDown()}this.currIndex=(n+C.easeIn(u,.1,a.speed,a.accelerationTime))%r.length,this.draw(),i(this.run.bind(this,t+1))},h.prototype.slowDown=function(){var t,e=this,n=e.rAF,r=e.prizes,o=e.prizeFlag,s=e.stopIndex,a=e.endIndex,u=e._defaultConfig,h=Date.now()-this.endTime;if(-1!==o){if(h>u.decelerationTime)return this.startTime=0,void(null===(t=this.endCallback)||void 0===t||t.call(this,i({},r.find((function(t,e){return e===o})))));this.currIndex=C.easeOut(h,s,a,u.decelerationTime)%r.length,this.draw(),n(this.slowDown.bind(this))}else this.startTime=0},h.prototype.walk=function(){var t=this,e=this.config,i=e.setInterval;(0,e.clearInterval)(this.timer),this.timer=i((function(){t.currIndex+=1,t.draw()}),1300)},h.prototype.getGeometricProperty=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=this.cellWidth,s=this.cellHeight,a=this._defaultConfig.gutter,u=[this.prizeArea.x+(o+a)*e,this.prizeArea.y+(s+a)*i];return n&&r&&u.push(o*n+a*(n-1),s*r+a*(r-1)),u},h.prototype.getWidth=function(t,e){return void 0===e&&(e=1),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,this.cellWidth*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getHeight=function(t,e){return void 0===e&&(e=1),s(t,\"number\")?t:s(t,\"string\")?this.changeUnits(t,this.cellHeight*e+this._defaultConfig.gutter*(e-1)):0},h.prototype.getOffsetX=function(t,e){return void 0===e&&(e=1),(this.cellWidth*e+this._defaultConfig.gutter*(e-1)-t)/2},h.prototype.conversionAxis=function(t,e){var i=this.config;return[t/i.dpr,e/i.dpr]},h}(y);exports.LuckyGrid=P,exports.LuckyWheel=E;\n","const windowWidth = wx.getSystemInfoSync().windowWidth\r\n\r\nexport const rpx2px = (value) => {\r\n if (typeof value === 'string') value = Number(value.replace(/[a-z]*/g, ''))\r\n return windowWidth / 750 * value\r\n}\r\n\r\nexport const changeUnits = (value) => {\r\n return Number(value.replace(/^(\\-*[0-9.]*)([a-z%]*)$/, (value, num, unit) => {\r\n switch (unit) {\r\n case 'px':\r\n num *= 1\r\n break\r\n case 'rpx':\r\n num = rpx2px(num)\r\n break\r\n default:\r\n num *= 1\r\n break\r\n }\r\n return num\r\n }))\r\n}\r\n\r\nexport const resolveImage = (e, img, canvas, srcName = 'src', resolveName = '$resolve') => {\r\n let imgObj = canvas.createImage()\r\n imgObj.onload = () => {\r\n img[resolveName](imgObj)\r\n }\r\n imgObj.src = img[srcName]\r\n}\r\n\r\nexport function getImage () {\r\n return new Promise((resolve, reject) => {\r\n wx.canvasToTempFilePath({\r\n canvas: this.canvas,\r\n success: res => resolve(res),\r\n fail: err => reject(err)\r\n });\r\n })\r\n}\r\n","import { LuckyWheel } from '../../node_modules/lucky-canvas/dist/lucky-canvas.cjs.min'\r\nimport { changeUnits, resolveImage, getImage } from '../utils'\r\n\r\nComponent({\r\n properties: {\r\n width: { type: String, value: '600rpx' },\r\n height: { type: String, value: '600rpx' },\r\n blocks: { type: Array, value: [] },\r\n prizes: { type: Array, value: [] },\r\n buttons: { type: Array, value: [] },\r\n defaultConfig: { type: Object, value: {} },\r\n defaultStyle: { type: Object, value: {} },\r\n start: { type: Function, value: () => {} },\r\n end: { type: Function, value: () => {} },\r\n },\r\n data: {\r\n isShow: false,\r\n luckyImg: '',\r\n showCanvas: true,\r\n },\r\n observers: {\r\n 'blocks.**': function(newData, oldData) {\r\n this.$lucky && (this.$lucky.blocks = newData)\r\n },\r\n 'prizes.**': function(newData, oldData) {\r\n this.$lucky && (this.$lucky.prizes = newData)\r\n },\r\n 'buttons.**': function(newData, oldData) {\r\n this.$lucky && (this.$lucky.buttons = newData)\r\n },\r\n },\r\n ready() {\r\n wx.createSelectorQuery().in(this).select('#lucky-wheel').fields({\r\n node: true, size: true\r\n }).exec((res) => {\r\n if (!res[0] || !res[0].node) {\r\n return console.error('lucky-canvas 获取不到 canvas 标签')\r\n }\r\n const canvas = this.canvas = res[0].node\r\n const dpr = this.dpr = wx.getSystemInfoSync().pixelRatio\r\n const ctx = this.ctx = canvas.getContext('2d')\r\n const data = this.data\r\n canvas.width = res[0].width * dpr\r\n canvas.height = res[0].height * dpr\r\n ctx.scale(dpr, dpr)\r\n this.$lucky = new LuckyWheel({\r\n flag: 'MP-WX',\r\n ctx,\r\n dpr,\r\n width: res[0].width,\r\n height: res[0].height,\r\n // rAF: canvas.requestAnimationFrame, // 帧动画真机调试会报错!\r\n setTimeout,\r\n clearTimeout,\r\n setInterval,\r\n clearInterval,\r\n beforeCreate: function () {\r\n const Radius = Math.min(this.config.width, this.config.height) / 2\r\n // 设置坐标轴\r\n ctx.translate(Radius, Radius)\r\n },\r\n beforeInit: function () {\r\n // 重置坐标轴\r\n ctx.translate(-this.Radius, -this.Radius)\r\n },\r\n unitFunc: (num, unit) => changeUnits(num + unit),\r\n }, {\r\n blocks: data.blocks,\r\n prizes: data.prizes,\r\n buttons: data.buttons,\r\n defaultConfig: data.defaultConfig,\r\n defaultStyle: data.defaultStyle,\r\n start: (...rest) => {\r\n this.triggerEvent('start', ...rest)\r\n },\r\n end: (...rest) => {\r\n this.triggerEvent('end', ...rest)\r\n getImage.call(this).then(res => {\r\n this.setData({ luckyImg: res.tempFilePath })\r\n })\r\n },\r\n })\r\n // 为了保证 onload 回调准确\r\n this.setData({ isShow: true })\r\n })\r\n },\r\n methods: {\r\n imgBindload (e) {\r\n const { name, index, i } = e.currentTarget.dataset\r\n const img = this.data[name][index].imgs[i]\r\n resolveImage(e, img, this.canvas)\r\n },\r\n luckyImgLoad () {\r\n this.showCanvas = false\r\n },\r\n handleClickOfImg (e) {\r\n const { clientX: x, clientY: y } = e.changedTouches[0]\r\n wx.createSelectorQuery().in(this).select('.lucky-img').fields({\r\n rect: true\r\n }).exec((res) => {\r\n const { left, top } = res[0]\r\n this.toPlay(x - left, y - top)\r\n })\r\n },\r\n handleClickOfCanvas (e) {\r\n const { x, y } = e.changedTouches[0]\r\n this.toPlay(x, y)\r\n },\r\n toPlay (x, y) {\r\n const ctx = this.ctx\r\n ctx.beginPath()\r\n ctx.arc(0, 0, this.$lucky.maxBtnRadius, 0, Math.PI * 2, false)\r\n if (!ctx.isPointInPath(x * this.dpr, y * this.dpr)) return\r\n // 隐藏图片并显示canvas\r\n this.showCanvas = true\r\n this.setData({ luckyImg: '' })\r\n // 触发 lucky-canvas 的抽奖逻辑\r\n this.$lucky.startCallback()\r\n },\r\n play(...rest) {\r\n this.$lucky.play(...rest)\r\n },\r\n stop(...rest) {\r\n this.$lucky.stop(...rest)\r\n },\r\n },\r\n})\r\n"],"sourceRoot":""}
0 2 \ No newline at end of file
... ...
packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 5 \ No newline at end of file
... ...
packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.wxml 0 → 100644
  1 +<view class="lucky-box" style="width: {{width}}; height: {{height}}">
  2 +
  3 + <canvas
  4 + hidden="{{hiddenCanvas}}"
  5 + type="2d"
  6 + id="lucky-wheel"
  7 + canvas-id="lucky-wheel"
  8 + bindtouchstart="handleClickOfCanvas"
  9 + style="width: {{width}}; height: {{height}}; visibility: {{showCanvas ? 'visible' : 'hidden'}}; "
  10 + ></canvas>
  11 + <image
  12 + wx:if="{{luckyImg}}"
  13 + src="{{luckyImg}}"
  14 + class="lucky-img"
  15 + mode="scaleToFill"
  16 + bindload="luckyImgLoad"
  17 + bindtouchstart="handleClickOfImg"
  18 + style="width: {{width}}; height: {{height}}"
  19 + ></image>
  20 +
  21 +
  22 + <view>
  23 + <view wx:if="{{isShow}}" wx:for="{{blocks}}" wx:key="index" wx:for-index="index" wx:for-item="block" style="visibility: hidden; height: 0">
  24 + <view wx:for="{{block.imgs}}" wx:key="i" wx:for-index="i" wx:for-item="img">
  25 + <image src="{{img.src}}" data-name="blocks" data-index="{{index}}" data-i="{{i}}" bindload="imgBindload"></image>
  26 + </view>
  27 + </view>
  28 + </view>
  29 + <view>
  30 + <view wx:if="{{isShow}}" wx:for="{{prizes}}" wx:key="index" wx:for-index="index" wx:for-item="prize" style="visibility: hidden; height: 0">
  31 + <view wx:for="{{prize.imgs}}" wx:key="i" wx:for-index="i" wx:for-item="img">
  32 + <image src="{{img.src}}" data-name="prizes" data-index="{{index}}" data-i="{{i}}" bindload="imgBindload"></image>
  33 + </view>
  34 + </view>
  35 + </view>
  36 + <view>
  37 + <view wx:if="{{isShow}}" wx:for="{{buttons}}" wx:key="index" wx:for-index="index" wx:for-item="button" style="visibility: hidden; height: 0">
  38 + <view wx:for="{{button.imgs}}" wx:key="i" wx:for-index="i" wx:for-item="img">
  39 + <image src="{{img.src}}" data-name="buttons" data-index="{{index}}" data-i="{{i}}" bindload="imgBindload"></image>
  40 + </view>
  41 + </view>
  42 + </view>
  43 +</view>
... ...
packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index.wxss 0 → 100644
  1 +/* mini-luck-draw/lucky-wheel/index.wxss */
  2 +.lucky-box {
  3 + position: relative;
  4 + /* overflow: hidden; */
  5 + margin: 0 auto;
  6 +}
  7 +.lucky-img {
  8 + position: absolute;
  9 + left: 0;
  10 + top: 0;
  11 + z-index: 0;
  12 +}
  13 +#lucky-wheel {
  14 + /* position: relative;
  15 + z-index: 99; */
  16 +}
... ...
packageB/pages/evaluate/evaluate.js 0 → 100644
  1 + var e = getApp(),
  2 + a = e.globalData.setting,
  3 + os = a,
  4 + t = e.request,
  5 + d = e.globalData;
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + url: a.url, //接口网址
  13 + iurl: a.imghost,
  14 + defimgurl: "/miniapp/images/no-head.jpg",
  15 + stars_index: -1, //当前点击的星星下标
  16 + labels: [], //星级标签数组
  17 + sub_evaluate: 0, //是否评价成功
  18 + proposal: "", //用户输入的建议
  19 + proposal_size: 100, //评价意见和建议限定字数
  20 + number: "", //订单单号
  21 + beautician: "", //美容师信息
  22 + fromType: "服务评价", //评价来源
  23 + arrangeTime: "", //服务日期
  24 + is_evaluate: 0, //是否评价
  25 + EvaluateDatetime: "", //评价时间
  26 + is_act:0, //是否能购获取图片
  27 + actId:0, //活动ID
  28 + giftBagId:0, //礼包ID
  29 +
  30 + },
  31 + //点击星级
  32 + check_stars: function(e) {
  33 + var th = this;
  34 + var is_evaluate = th.data.is_evaluate; //0可点击
  35 + if (is_evaluate == 0) {
  36 + var index = e.currentTarget.dataset.index;
  37 + var stars_index = th.data.stars_index;
  38 + if (index != stars_index) {
  39 + var url = "/api/weshop/marketing/reservation/star/label/list";
  40 + getApp().request.promiseGet(url, {
  41 + data: {
  42 + Star: index + 1,
  43 + storeId: a.stoid
  44 + }
  45 + }).then(res => {
  46 + if (res.data.code == 0) {
  47 + th.setData({
  48 + labels: res.data.data
  49 + })
  50 + } else {
  51 + getApp().my_warnning(res.data.msg, 0, th);
  52 + return;
  53 + }
  54 + })
  55 + th.setData({
  56 + stars_index: index
  57 + })
  58 + }
  59 + }
  60 + },
  61 + //输入评价意见和建议
  62 + input_proposal: function(e) {
  63 + var th = this;
  64 + var value = e.detail.value;
  65 + th.setData({
  66 + proposal: value
  67 + })
  68 + },
  69 + //图片失败,默认图片
  70 + bind_bnerr1: function (e) {
  71 + var th = this;
  72 + var _errImg = e.target.dataset.errorimg;
  73 + var _Img = e.target.dataset.img;
  74 + if (_Img != undefined) {
  75 + var _errObj = {};
  76 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  77 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  78 + }
  79 + },
  80 + //选择标签
  81 + check_label: function(e) {
  82 + var th = this;
  83 + var evaluate = th.data.is_evaluate; //0为未评价,未评价才可点击标签
  84 + if (evaluate == 0) {
  85 + var index = e.currentTarget.dataset.index;
  86 + var label_id = th.data.labels[index].check;
  87 + var labels = 'labels[' + index + '].check';
  88 + if (label_id) {
  89 + label_id = 0
  90 + } else {
  91 + label_id = 1
  92 + }
  93 + th.setData({
  94 + [labels]: label_id
  95 + })
  96 + }
  97 + },
  98 +
  99 + //查询美导信息
  100 + query_bea: function() {
  101 + var th = this;
  102 + var url = "/api/weshop/order/pagePosOrder";
  103 + var number = th.data.number; //订单编号
  104 + getApp().request.promiseGet(url, {
  105 + data: {
  106 + store_id: a.stoid,
  107 + user_id: d.user_id,
  108 + No: number
  109 + }
  110 + }).then(res => {
  111 + if (res.data.code == 0) {
  112 + var data = res.data.data.pageData;
  113 + var arrangeTime = data[0].ArrangeTime;
  114 + th.setData({
  115 + beautician: data,
  116 + arrangeTime: arrangeTime
  117 + })
  118 + } else {
  119 + getApp().my_warnning(res.data.msg, 0, th);
  120 + }
  121 + })
  122 + },
  123 +
  124 + //获取预约评价
  125 + evaluate_get: function() {
  126 + var th = this;
  127 + var url = "/api/weshop/evaluation/evaluate/get";
  128 + getApp().request.promiseGet(url, {
  129 + data: {
  130 + number: th.data.number,
  131 + storeId: a.stoid
  132 + }
  133 + }).then(res => {
  134 + if (res.data.code == 0) {
  135 + var list=[];
  136 + res.data.data.BillDate=res.data.data.BillDate.replace(".0",'');
  137 + list.push(res.data.data);
  138 +
  139 + th.setData({
  140 + stars_index: res.data.data.Star-1,
  141 + labels: res.data.data.EvaluationList,
  142 + proposal: res.data.data.Remark,
  143 + EvaluateDatetime: res.data.data.EvaluateDatetime.substring(0, 19),
  144 + beautician:list,
  145 + })
  146 + } else {
  147 + getApp().my_warnning(res.data.msg, 0, th);
  148 + }
  149 + })
  150 + },
  151 + //提交评价
  152 + evaluate_save: function() {
  153 + var th = this;
  154 + var stars = th.data.stars_index; //评价星级
  155 + var proposal = th.data.proposal;
  156 + //判断是否评级
  157 + if (stars < 0) {
  158 + getApp().my_warnning("请进行评分", 0, th);
  159 + return false;
  160 + } else if (proposal == "") {
  161 + getApp().my_warnning("给点建议呗", 0, th);
  162 + return false;
  163 + }
  164 + wx.showLoading({
  165 + title: '加载中',
  166 + })
  167 + var labels = th.data.labels; //星级标签数组
  168 + var evaLabList = []; //用户选择的评价标签
  169 + // 查询评价标签
  170 + for (var i = 0; i < labels.length; i++) {
  171 + if (labels[i].check) {
  172 + evaLabList.push(labels[i].LabelName);
  173 + }
  174 + }
  175 + var url = th.data.url + "/api/weshop/evaluation/evaluate/insert";
  176 + var posNo = th.data.number; //收银单号
  177 + var proposal = th.data.proposal; //用户建议内容
  178 + var fromType = th.data.fromType; //评价来源
  179 + var json = {
  180 + "evaLabList": evaLabList,
  181 + "fromType": 1,
  182 + "number": posNo,
  183 + "remark": proposal,
  184 + "star": stars + 1,
  185 + "storeId": a.stoid
  186 + };
  187 + var data = JSON.stringify(json); //转换成json格式
  188 + wx.request({
  189 + url: url,
  190 + data: data,
  191 + method: 'POST',
  192 + header: {
  193 + 'content-type': 'application/json'
  194 + }, // 设置请求的 header
  195 + success: function(res) {
  196 + wx.hideLoading();
  197 + if (res.data.code == 0) {
  198 + getApp().my_warnning("评价成功", 1, th);
  199 + var namber=th.data.number;
  200 + setTimeout(function() {
  201 + wx.redirectTo({
  202 + url: "/packageB/pages/evaluate_list/evaluate_list?IsEvaluate=1"
  203 + });
  204 + }, 2000);
  205 + } else {
  206 + getApp().my_warnning(res.data.msg, 0, th);
  207 + }
  208 + }
  209 + })
  210 + },
  211 +
  212 + /**
  213 + * 生命周期函数--监听页面加载
  214 + */
  215 + onLoad: function(options) {
  216 + var th = this;
  217 + th.setData({
  218 + number: options.number,
  219 + //is_evaluate: options.evaluate
  220 + })
  221 + //th.query_bea();
  222 + //th.judge_act();
  223 + var userinfo=getApp().globalData.userInfo;
  224 + console.log("userinfo",userinfo)
  225 +
  226 + if(!userinfo){
  227 + getApp().goto("/pages/togoin/togoin");
  228 + }
  229 +
  230 +
  231 + },
  232 +
  233 + /**
  234 + * 生命周期函数--监听页面显示
  235 + */
  236 + onShow: function() {
  237 + //var th = this;
  238 + //var is_evaluate = th.data.is_evaluate;
  239 + //if (is_evaluate == 1) {
  240 + // th.evaluate_get();
  241 + //}
  242 + //判断有没有评价
  243 + this.check_is_pj();
  244 + },
  245 +
  246 +
  247 + //评价其他跳转
  248 + evaluate_qt:function(e){
  249 + var status=e.currentTarget.dataset.status;
  250 + if(!status) status=0;
  251 + wx.redirectTo({
  252 + url: "/packageB/pages/evaluate_list/evaluate_list?IsEvaluate="+status
  253 + });
  254 + },
  255 +
  256 +
  257 +
  258 + //点击领取礼包
  259 + clike_lb:function(){
  260 +
  261 + var id=this.data.actId;
  262 + var gifbagid = this.data.gifbagid;
  263 + console.log(id,"订单", this.data.number),
  264 + wx.redirectTo({
  265 + url: "/pages/giftpack/evaluategift/evaluategift?actId="+id+ "&orderType=2&orderNumber="+this.data.number
  266 + });
  267 +
  268 + },
  269 +
  270 + //--评价有礼判断---
  271 + judge_act: function () {
  272 + var th = this;
  273 + var url = "/api/weshop/marketing/comment/act/judge";
  274 + getApp().request.promiseGet(url, {
  275 + data: {
  276 + orderNumber: th.data.number,
  277 + orderType: 2,
  278 + storeId: a.stoid,
  279 + userId: d.user_id
  280 + }
  281 + }).then(res => {
  282 + if (res.data.code == 0) {
  283 + var id = res.data.data.id;
  284 + var giftbagid = res.data.data.giftbagid;
  285 + th.setData({
  286 + is_act: 1,
  287 + actId: id,
  288 + giftBagId: giftbagid
  289 + })
  290 + } else{
  291 + th.setData({
  292 + is_act:0
  293 + })
  294 + }
  295 + })
  296 + },
  297 +
  298 + //判断是不是已经评价了
  299 + check_is_pj:function(){
  300 + var th=this;
  301 + var chekc_data={};
  302 + chekc_data['storeId'] = a.stoid;
  303 + chekc_data['number'] =this.data.number;
  304 + getApp().request.get("/api/weshop/evaluation/evaluate/check",{
  305 + data:chekc_data,
  306 + success:function(res){
  307 + if(res.data.code==0){
  308 + //没有评价的情况下
  309 + if(res.data.data==='0'){
  310 + th.query_bea();
  311 + th.setData({is_get:1})
  312 + }else if(res.data.data==="1"){
  313 + th.evaluate_get();
  314 + th.setData({is_evaluate:1,is_get:1})
  315 + }
  316 + }else{
  317 + getApp().my_warnning(res.data.msg, 0, th);
  318 + }
  319 + }
  320 + })
  321 +
  322 + },
  323 +
  324 + //跳转到链接地址
  325 + goto:function(e){
  326 + var url=e.currentTarget.dataset.url;
  327 + getApp().goto(url);
  328 + },
  329 +
  330 + //弹出显示商品
  331 + show_goods:function(e){
  332 + var index=e.currentTarget.dataset.index;
  333 + var item=this.data.beautician[index];
  334 + var show_goods_list=item.list;
  335 + this.setData({
  336 + show_goods_list:show_goods_list,
  337 + sh_pop:1
  338 + })
  339 + },
  340 +
  341 + //关闭弹出
  342 + close_pop:function(){
  343 + this.setData({
  344 + show_goods_list:null,sh_pop:0
  345 + })
  346 + }
  347 +
  348 +})
0 349 \ No newline at end of file
... ...
packageB/pages/evaluate/evaluate.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "导购评价",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageB/pages/evaluate/evaluate.wxml 0 → 100644
  1 +<view class="container" wx:for="{{beautician}}" wx:if="{{index<1}}" wx:for-item="it">
  2 + <!-- 头像 -->
  3 + <view class="flex-center head">
  4 + <image class="headimg" src="{{!it.PhotoUrl || it.PhotoUrl==''?iurl+defimgurl:it.PhotoUrl}}" lazy-load="true"
  5 + data-errorimg="beautician[{{index}}].PhotoUrl"
  6 + binderror="bind_bnerr1" data-img="beautician[{{index}}].PhotoUrl"></image>
  7 + </view>
  8 +
  9 + <!-- 姓名 -->
  10 + <view class="flex-level item">
  11 + <view class="itemlf flex-level-right">
  12 + <view class="fs32">导购名称:</view>
  13 + </view>
  14 + <view class="itemlr fs30 ellipsis-1">{{it.StaffName?it.StaffName:'无'}}</view>
  15 + </view>
  16 +
  17 + <!-- 项目 -->
  18 + <view class="flex-center item" bindtap="show_goods" data-index="{{index}}">
  19 + <view class="itemlf fs32 flex-level-right">购买商品:</view>
  20 + <view class="itemlr fs30 ellipsis-1 go_right">{{it.list[0].WareName}}</view>
  21 + </view>
  22 +
  23 + <!-- 时间 -->
  24 + <view class="flex-center item">
  25 + <view class="itemlf fs32 flex-level-right">购买时间:</view>
  26 + <view class="itemlr fs30">{{it.BillDate}}</view>
  27 + </view>
  28 +
  29 + <!-- 评价时间 -->
  30 + <view class="flex-center" wx:if="{{is_evaluate==1}}">
  31 + <view class="itemlf fs32 flex-level-right">评价时间:</view>
  32 + <view class="itemlr fs30">{{EvaluateDatetime}}</view>
  33 + </view>
  34 +
  35 + <!-- 设置虚线 -->
  36 + <view class="flex-center">
  37 + <view class="starss">
  38 + <image class="stars" src="{{iurl}}{{key<=stars_index?'/miniapp/images/StarsredCk.png':'/miniapp/images/StarswhiteUnCk.png'}}" wx:for="{{5}}" bindtap="check_stars" data-index="{{key}}" wx:for-index="key"></image>
  39 + </view>
  40 + </view>
  41 + <view class="tea_labs">
  42 + <view class="flex-center fs26">
  43 + <block wx:if="{{is_evaluate==0}}">
  44 + <textarea class="rel textarea" placeholder="写其他意见和建议" placeholder-class="fs24" maxlength="{{proposal_size}}" bindinput="input_proposal" value="{{proposal}}">
  45 + <!-- 提示已输入多少数字 -->
  46 + <view if="{{is_evaluate==0}}" class="proposal abs">{{proposal.length}}/{{proposal_size}}</view>
  47 + </textarea>
  48 + </block>
  49 + <block wx:else>
  50 + <view wx:if="{{proposal!=''}}" class="textarea">
  51 + {{proposal}}
  52 + </view>
  53 + </block>
  54 + </view>
  55 +
  56 + <view wx:if="{{labels.length>0 && is_evaluate==0}}" class="labels flex fs24 ellipsis-3">
  57 + <view class="label {{item.check==1?'checklabel':''}} flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  58 + <view class="ellipsis-1">{{item.LabelName}}</view>
  59 + </view>
  60 +
  61 + </view>
  62 + <view wx:if="{{labels.length>0 && is_evaluate==1}}" class="{{labels.length==1 || labels.length==2?'flex-center':''}}" style="width:100%;">
  63 + <view class="labels flex fs24 ellipsis-3">
  64 + <view class="label checklabel flex-center" wx:for="{{labels}}" bindtap="check_label" data-index="{{key}}" wx:for-index="key">
  65 + <view class="ellipsis-1">{{item.LabelName}}</view>
  66 + </view>
  67 +
  68 + </view>
  69 + </view>
  70 +
  71 + </view>
  72 +
  73 + <view wx:if="{{is_evaluate==0}}" class="feedback flex-center fs28">
  74 + <view>满意的话请打五星噢,谢谢您的支持!</view>
  75 + </view>
  76 +
  77 + <block wx:if="{{sub_evaluate}}">
  78 + <view class="subSuccess">
  79 + <view class="flex-center">
  80 + <image class="Success" src="{{iurl}}/miniapp/images/yyservice/Success.png"></image>
  81 + </view>
  82 + <view class="fs36 flex-center">
  83 + <view>评价成功</view>
  84 + </view>
  85 + </view>
  86 + </block>
  87 +</view>
  88 +
  89 +<block wx:if="{{is_get}}">
  90 +<navigator wx:if="{{is_evaluate==0}}" class="Subs fs32 flex-center">
  91 + <view class="Submission flex-center" bindtap="evaluate_save">
  92 + <view>确认提交</view>
  93 + </view>
  94 +</navigator>
  95 +<view wx:else>
  96 +
  97 +
  98 + <view style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center" bindtap="evaluate_qt">
  99 + <view>评价其他</view>
  100 + </view>
  101 + <view style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center" bindtap="evaluate_qt" data-status="1">
  102 + <view>查看已评价的订单</view>
  103 + </view>
  104 +
  105 + <!-- 显示来个图标 -->
  106 + <view class="show_icon" style="margin-top: 60rpx;">
  107 + <view class="icon_item" bindtap="goto" data-url="/pages/index/index/index">
  108 + <view>
  109 + <image style="width: 60rpx; height: 50rpx;" src="{{iurl}}/miniapp/images/evaluate/store.png"></image>
  110 + <view>溜街</view>
  111 + </view>
  112 + </view>
  113 + <view class="icon_item" bindtap="goto" data-url="/packageA/pages/quan_list/quan_list">
  114 + <view>
  115 + <image style="width: 70rpx; height: 50rpx;" src="{{iurl}}/miniapp/images/evaluate/lq.png"></image>
  116 + <view>领券</view>
  117 + </view>
  118 + </view>
  119 + </view>
  120 +
  121 + <view style="height: 60rpx;"></view>
  122 + <view wx:if="{{is_act==1}}" style="margin: auto;margin-bottom: 30rpx;" class="Submission flex-center yellow-b" bindtap="clike_lb">
  123 + <view>点击领取礼品</view>
  124 + </view>
  125 + </view>
  126 +<warn id="warn"></warn>
  127 +</block>
  128 +
  129 +
  130 +<view hidden="{{!sh_pop}}">
  131 + <view class="cover-layer" bindtap="close_pop"></view>
  132 + <view class="show_pop_div">
  133 + <view class="title">商品详情</view>
  134 + <view style="padding: 0 20rpx;">
  135 + <view class="flex jc_sb fs30" style="margin-top: 20rpx;" wx:for="{{show_goods_list}}">
  136 + <view>{{item.WareName}}</view>
  137 + <view>{{item.Qty}}</view>
  138 + </view>
  139 + </view>
  140 + </view>
  141 +</view>
  142 +
... ...
packageB/pages/evaluate/evaluate.wxss 0 → 100644
  1 +.container {
  2 + border-top: 7rpx solid rgb(245, 245, 245);
  3 + padding-bottom: 100rpx;
  4 + background-color: rgb(255, 255, 255);
  5 +}
  6 +
  7 +.head {
  8 + height: 270rpx;
  9 +}
  10 +
  11 +.headimg {
  12 + width: 190rpx;
  13 + height: 190rpx;
  14 + border-radius: 50%;
  15 +}
  16 +
  17 +.item {
  18 + margin-bottom: 20rpx;
  19 +}
  20 +
  21 +.itemlf {
  22 + width: 195rpx;
  23 +}
  24 +
  25 +.itemlr {
  26 + width: 360rpx;
  27 +}
  28 +
  29 +.starss {
  30 + margin-top: 15rpx;
  31 + border-top: 3rpx dashed rgb(203, 203, 203);
  32 + padding-top: 25rpx;
  33 + padding-left: 15rpx;
  34 +}
  35 +
  36 +.stars {
  37 + width: 50rpx;
  38 + height: 50rpx;
  39 + margin-right: 20rpx;
  40 +}
  41 +
  42 +.datetime {
  43 + width: 190rpx;
  44 +}
  45 +
  46 +.tea_labs {
  47 + padding: 0rpx 56rpx;
  48 + margin-top: 20rpx;
  49 +}
  50 +
  51 +.proposal {
  52 + right: 20rpx;
  53 + bottom: 20rpx;
  54 + color: rgb(152, 152, 152);
  55 +}
  56 +
  57 +.textarea {
  58 + width: 100%;
  59 + height: 200rpx;
  60 + margin-top: 70rpx;
  61 + border: 2rpx solid rgb(203, 203, 203);
  62 + border-radius: 13rpx;
  63 + padding-top: 25rpx;
  64 + padding-left: 30rpx;
  65 + margin-bottom: 30rpx;
  66 + padding-right: 15rpx;
  67 + padding-bottom: 20rpx;
  68 +}
  69 +
  70 +.labels {
  71 + display: inline-block;
  72 + max-height: 240rxp;
  73 + line-height: 50rpx;
  74 + padding-left: 15rpx;
  75 +}
  76 +
  77 +.label {
  78 + padding: 0rpx 10rpx;
  79 + height: 48rpx;
  80 + line-height: 48rpx;
  81 + border: 2rpx solid rgb(218, 218, 218);
  82 + color: rgb(152, 152, 152);
  83 + border-radius: 5rpx;
  84 + margin-right: 20rpx;
  85 + width: 165rpx;
  86 + display: inline-block;
  87 + text-align: center;
  88 + margin-bottom: 10rpx;
  89 +}
  90 +
  91 +/* 选择标签的样式 */
  92 +
  93 +.checklabel {
  94 + border: 2rpx solid rgb(214, 1, 33);
  95 + background-color: rgb(255, 231, 235);
  96 + color: rgb(214, 1, 33);
  97 +}
  98 +
  99 +.feedback {
  100 + color: rgb(152, 152, 152);
  101 + margin-bottom: 70rpx;
  102 +}
  103 +
  104 +.Subs {
  105 + background-color: rgb(255, 255, 255);
  106 + position: fixed;
  107 + width: 100%;
  108 + bottom: 40rpx;
  109 +}
  110 +
  111 +.Submission {
  112 + width: 400rpx;
  113 + height: 65rpx;
  114 + border-radius: 60rpx;
  115 + background-color: rgb(214, 1, 33);
  116 + color: rgb(255, 255, 255);
  117 +}
  118 +.Submission.yellow-b{
  119 + background-color: #ffb03f;
  120 +
  121 +}
  122 +
  123 +.clonri {
  124 + margin: 0rpx;
  125 +}
  126 +
  127 +.subSuccess {
  128 + position: fixed;
  129 + z-index: 3;
  130 + top: 435rpx;
  131 + left: 66rpx;
  132 + background-color: #a6a6a6a4;
  133 + width: 615rpx;
  134 + height: 315rpx;
  135 + border-radius: 20rpx;
  136 + color: rgb(255, 255, 255);
  137 +}
  138 +
  139 +.Success {
  140 + width: 110rpx;
  141 + height: 110rpx;
  142 + margin-top: 50rpx;
  143 + margin-bottom: 45rpx;
  144 +}
  145 +
  146 +.show_icon{
  147 + width: 50%;
  148 + margin: 0 auto;
  149 + display: flex; justify-content: space-between;
  150 +}
  151 +
  152 +.icon_item{
  153 + display: flex;align-items: center; justify-content: center; font-size: 26rpx; text-align: center;
  154 + width: 140rpx; height: 140rpx; border: 1rpx solid #eee; border-radius: 50%; line-height: 34rpx;
  155 +}
  156 +
  157 +.go_right::after{
  158 + content: '';
  159 + display: inline-block;
  160 + width: 20rpx;
  161 + height: 20rpx;
  162 + border-top:1rpx solid #999 ;
  163 + border-right: 1rpx solid #999;
  164 + transform: rotate(45deg);
  165 +}
  166 +
  167 +.show_pop_div{
  168 + position: fixed; max-height:50%; left: 0;top:50%; transform: translateY(-50%); overflow-y: auto;
  169 + background-color: #fff; text-align: center; z-index: 100000; width: 100%; min-height: 300rpx;
  170 +}
  171 +
  172 +.show_pop_div .title{
  173 + height: 100rpx; line-height: 100rpx; border-bottom: 1rpx solid #eee; font-size: 34rpx;
  174 +}
... ...
packageB/pages/evaluate_list/evaluate_list.js 0 → 100644
  1 + var e = getApp(),
  2 + os = e.globalData.setting,
  3 + t = e.request,
  4 + d = e.globalData;
  5 +Page({
  6 + /**
  7 + * 页面的初始数据
  8 + */
  9 + data: {
  10 + url: os.url, //接口网址
  11 + iurl: os.imghost,
  12 + defimgurl: "/miniapp/images/no-head.jpg",
  13 + list:[],
  14 + },
  15 +
  16 + //图片失败,默认图片
  17 + bind_bnerr1: function (e) {
  18 + var th = this;
  19 + var _errImg = e.target.dataset.errorimg;
  20 + var _Img = e.target.dataset.img;
  21 + if (_Img != undefined) {
  22 + var _errObj = {};
  23 + _errObj[_errImg] = "/miniapp/images/no-head.jpg";
  24 + th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  25 + }
  26 + },
  27 +
  28 + /**
  29 + * 生命周期函数--监听页面加载
  30 + */
  31 + onLoad: function(options) {
  32 + var th=this;
  33 + getApp().getConfig(function(e){
  34 + th.setData({img:e.store_logo});
  35 + })
  36 +
  37 + var IsEvaluate=options.IsEvaluate?options.IsEvaluate:0;
  38 + this.setData({IsEvaluate:parseInt(IsEvaluate) });
  39 + this.get_list();
  40 + },
  41 +
  42 + /**
  43 + * 生命周期函数--监听页面显示
  44 + */
  45 + onShow: function() {
  46 +
  47 + },
  48 +
  49 + get_list:function(){
  50 + var th=this;
  51 + var req={
  52 + storeId:os.stoid,
  53 + VIPId:getApp().globalData.userInfo.erpvipid,
  54 + IsEvaluate:0
  55 + }
  56 + if(parseInt(this.data.IsEvaluate)){
  57 + req.IsEvaluate=1;
  58 + }
  59 +
  60 + var url="/api/weshop/evaluation/FormListNew/page"; //获取评价列表
  61 + getApp().request.get(url,{
  62 + data:req,
  63 + success:function(res){
  64 + console.log(res);
  65 + th.setData({is_get:1});
  66 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  67 + th.setData({list:res.data.data.pageData});
  68 + }
  69 + },
  70 + })
  71 + },
  72 +
  73 + go_evaluate(e){
  74 + var idx=e.currentTarget.dataset.index;
  75 + var item=this.data.list[idx];
  76 + var posno=item.PosNo;
  77 + getApp().goto("/packageB/pages/evaluate/evaluate?number="+posno);
  78 + },
  79 +
  80 + //弹出显示商品详情
  81 + show_pop:function(e){
  82 + var idx=e.currentTarget.dataset.index;
  83 + var item=this.data.list[idx];
  84 + var posno=item.PosNo;
  85 + var th=this;
  86 + //获取商品详情
  87 + var url="/api/weshop/evaluation/Evaluatewares/page";
  88 + getApp().request.get(url,{
  89 + isShowLoading:true,
  90 + data:{storeId:os.stoid,POSNo:posno},
  91 + success:function(res){
  92 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  93 + th.setData({show_goods_list:res.data.data.pageData,sh_pop:1});
  94 + }
  95 + }
  96 + })
  97 + },
  98 +
  99 + //关闭弹出
  100 + close_pop:function(){
  101 + this.setData({
  102 + show_goods_list:null,sh_pop:0
  103 + })
  104 + }
  105 +
  106 +
  107 +
  108 +
  109 +
  110 +})
0 111 \ No newline at end of file
... ...
packageB/pages/evaluate_list/evaluate_list.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "评价列表",
  3 + "usingComponents": {
  4 + "qr_code": "/components/qr_code/qr_code",
  5 + "warn": "/components/long_warn/long_warn"
  6 + }
  7 +}
0 8 \ No newline at end of file
... ...
packageB/pages/evaluate_list/evaluate_list.wxml 0 → 100644
  1 +
  2 +<block wx:if="{{list.length==0 && is_get}}">
  3 + <view class="fs30" style="text-align: center;">
  4 + <image mode="widthFix" style="width: 360rpx;" src="{{iurl}}/miniapp/images/user/nodistribut.png"></image>
  5 + <view style="margin-top: 30rpx;">暂无订单或未设置评价信息</view>
  6 + </view>
  7 +</block>
  8 +<block wx:else>
  9 + <view class="item flex fs26 ai-center" style="line-height: 34rpx;" wx:for="{{list}}">
  10 + <view class="show_img" style="width: 26%; text-align: center;">
  11 + <image class="logo" mode="aspectFit" src="{{iurl+img}}"></image>
  12 + </view>
  13 + <view style="width: 74%; padding-right: 6rpx;padding-left: 18rpx;">
  14 + <view>
  15 + <view class="line_item flex ai-center fs28">
  16 + <image style="width: 60rpx;" mode="widthFix" src="{{iurl}}/miniapp/images/evaluate/idcard.png"></image>
  17 + <image style="width: 30rpx; height: 30rpx; margin-left: 20rpx; margin-right: 10rpx;" src="{{iurl}}/miniapp/images/evaluate/starlit.png"></image>4.9
  18 + </view>
  19 + <view class="line_item flex jc_sb ai-center" style="margin-top: 18rpx;">
  20 + <view class="ellipsis-1" style="max-width: 90%;">{{item.WareName}}</view>
  21 + <view bindtap="show_pop" data-index="{{index}}" class="go_right"></view>
  22 + </view>
  23 + <view class="line_item flex jc_sb ai-center" style="margin-top: 14rpx;">
  24 + <view class="fs24" style="color: #999;">消费时间:{{item.BillDate}}</view>
  25 + <view bindtap="go_evaluate" data-index="{{index}}" wx:if="{{IsEvaluate}}" class="btn">查看评价</view>
  26 + <view bindtap="go_evaluate" data-index="{{index}}" wx:else class="btn">去评价</view>
  27 + </view>
  28 +
  29 + </view>
  30 + </view>
  31 + </view>
  32 +
  33 +
  34 +</block>
  35 +
  36 +
  37 +<warn id="warn"></warn>
  38 +<!-- 显示商品列表 -->
  39 +<view hidden="{{!sh_pop}}">
  40 + <view class="cover-layer" bindtap="close_pop"></view>
  41 + <view class="show_pop_div">
  42 + <view class="title">商品详情</view>
  43 + <view style="padding: 0 20rpx;">
  44 + <view class="flex jc_sb fs30" style="margin-top: 20rpx;" wx:for="{{show_goods_list}}">
  45 + <view>{{item.WareName}}</view>
  46 + <view>{{item.Qty}}</view>
  47 + </view>
  48 + </view>
  49 + </view>
  50 +</view>
  51 +
... ...
packageB/pages/evaluate_list/evaluate_list.wxss 0 → 100644
  1 +.item{ padding:10rpx 20rpx; border-bottom: 20rpx solid #ebeced}
  2 +.line_item{ height: 36rpx;}
  3 +.logo{
  4 + width: 160rpx; height: 160rpx; border-radius: 50%; border: 1rpx solid #eee;
  5 +}
  6 +.go_right{position: relative;top:-10rpx;right: 10rpx;}
  7 +.go_right::after{
  8 + content: '';
  9 + display: inline-block;
  10 + width: 20rpx;
  11 + height: 20rpx;
  12 + border-top:1rpx solid #333 ;
  13 + border-right: 1rpx solid #333;
  14 + transform: rotate(45deg);
  15 +}
  16 +.btn{
  17 + padding: 10rpx 16rpx; border: 1rpx solid #c4182e; color: #c4182e; border-radius: 8rpx;
  18 +}
  19 +
  20 +
  21 +.show_pop_div{
  22 + width: 96%; margin-left: 2%; position: fixed; max-height:50%; left: 0;top:50%; transform: translateY(-50%); overflow-y: auto;
  23 + background-color: #fff; text-align: center; z-index: 100000; min-height: 300rpx;
  24 +}
  25 +
  26 +.show_pop_div .title{
  27 + height: 100rpx; line-height: 100rpx; border-bottom: 1rpx solid #eee; font-size: 34rpx;
  28 +}
... ...
packageB/pages/luckactivity/index/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + has_char:function(url,key){
  3 + if(!url) return -1;
  4 + return url.indexOf(key);
  5 + },
  6 + beg_time:function(beg_date){
  7 + var fmt1 = beg_date.substring(0, 19);
  8 + var reg = getRegExp("-", "g");
  9 + var fmt2 = fmt1.replace(reg, '/');
  10 + var t1 = getDate(fmt2);
  11 + var tnow=getDate();
  12 + if(t1<=tnow) return 1;
  13 + return 0;
  14 + },
  15 + end_time:function(end_date){
  16 + var fmt1 = end_date.substring(0, 19);
  17 + var reg = getRegExp("-", "g");
  18 + var fmt2 = fmt1.replace(reg, '/');
  19 + var t1 = getDate(fmt2);
  20 + var tnow=getDate();
  21 + if(t1>=tnow) return 1;
  22 + return 0;
  23 + }
  24 +}
  25 +module.exports = {
  26 + has_char: g_filters.has_char,
  27 + beg_time: g_filters.beg_time,
  28 + end_time: g_filters.end_time,
  29 +}
0 30 \ No newline at end of file
... ...
packageB/pages/luckactivity/index/index.js 0 → 100644
  1 +// packageA//pages/myGift/myGift.js
  2 +const app = getApp();
  3 +let self = null;
  4 +var os = app.globalData.setting;
  5 +
  6 +Page({
  7 +
  8 + /**
  9 + * 页面的初始数据
  10 + */
  11 + data: {
  12 + tabArr: ['抽奖列表', '历史抽奖'],
  13 + currentIndex: 0,
  14 +
  15 + list: null,
  16 + isLoading: false, // 检测是否已经发送请求,防止重复发送请求
  17 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
  18 + pageNum: 1, // 当前页数
  19 + },
  20 +
  21 + clickTab(e) {
  22 + let index = e.target.dataset.index;
  23 + let url = '/api/weshop/marketing/marketingLuckForm/page';
  24 + let data = {
  25 + store_id: app.globalData.setting.stoid,
  26 + };
  27 +
  28 + this.setData({
  29 + list: null,
  30 + pageNum: 1,
  31 + noMore: false,
  32 + currentIndex: index,
  33 + });
  34 +
  35 + if(index == 0) {
  36 + data.is_end = 0;
  37 + } else if(index == 1) {
  38 + data.is_end = 1;
  39 + };
  40 +
  41 + this.getData(true, url, data).then(function() {
  42 + self.setData({
  43 + currentData: data,
  44 + });
  45 + });
  46 + },
  47 +
  48 + /**
  49 + * 生命周期函数--监听页面加载
  50 + */
  51 + onLoad: function (options) {
  52 + self = this;
  53 +
  54 + app.isLogin().then(function(data) {//进入页面前已经授权登录成功
  55 + self.setData({
  56 + userInfo: data,
  57 + });
  58 + });
  59 + },
  60 +
  61 + /**
  62 + * 生命周期函数--监听页面初次渲染完成
  63 + */
  64 + onReady: function () {},
  65 +
  66 + /**
  67 + * 生命周期函数--监听页面显示
  68 + */
  69 + onShow: function () {
  70 + if(app.globalData.userInfo) {
  71 + if(!this.data.isLogin) {
  72 + this.setData({
  73 + userInfo: app.globalData.userInfo,
  74 + imghost: app.globalData.setting.imghost,
  75 + isLogin: true,
  76 + });
  77 +
  78 +
  79 + let url = '/api/weshop/marketing/marketingLuckForm/page';
  80 + let data = {
  81 + store_id: app.globalData.setting.stoid,
  82 + is_end: 0,
  83 + };
  84 +
  85 + this.setData({
  86 + list: null,
  87 + pageNum: 1,
  88 + noMore: false,
  89 + });
  90 +
  91 + this.getData(true, url, data).then(function() {
  92 + self.setData({
  93 + currentData: data,
  94 + });
  95 + });
  96 +
  97 + // 获取广告
  98 + app.request.promiseGet("/api/weshop/ad/page", {
  99 + data: {
  100 + pid: 1201,
  101 + store_id: app.globalData.setting.stoid,
  102 + enabled: 1
  103 + }
  104 + }).then(res => {
  105 + if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
  106 + var a = res.data.data.pageData;
  107 + var narr=[];
  108 + for(var i in a){
  109 + var tt = {
  110 + 'ad_code': os.imghost + a[i].ad_code,
  111 + 'media_link': '',
  112 + 'ad_weapplink':a[i].ad_weapplink
  113 + };
  114 + narr.push(tt);
  115 + }
  116 +
  117 + self.setData({
  118 + ad_data: narr,
  119 + });
  120 + }
  121 + })
  122 +
  123 +
  124 + };
  125 + };
  126 +
  127 +
  128 +
  129 +
  130 + },
  131 +
  132 + /**
  133 + * 生命周期函数--监听页面隐藏
  134 + */
  135 + onHide: function () {
  136 +
  137 + },
  138 +
  139 + /**
  140 + * 生命周期函数--监听页面卸载
  141 + */
  142 + onUnload: function () {
  143 +
  144 + },
  145 +
  146 + /**
  147 + * 页面相关事件处理函数--监听用户下拉动作
  148 + */
  149 + onPullDownRefresh: function () {
  150 +
  151 + },
  152 +
  153 + /**
  154 + * 页面上拉触底事件的处理函数
  155 + */
  156 + onReachBottom: function () {
  157 + let data = this.data.currentData;
  158 + console.log('触底!', data);
  159 + this.scrollToLower('/api/weshop/marketing/marketingLuckForm/page', data);
  160 + },
  161 +
  162 + /**
  163 + * 用户点击右上角分享
  164 + */
  165 + onShareAppMessage: function () {
  166 +
  167 + },
  168 +
  169 + /**
  170 + * 请求数据
  171 + */
  172 + getData: function(isInit, url, data) {
  173 + let p = app.request.promiseGet(url, {
  174 + data: data,
  175 + isShowLoading: true,
  176 + })
  177 + .then(function(res) {
  178 + if(res.data.code == 0) {
  179 +
  180 + self.setData({
  181 + isLoading: false
  182 + });
  183 +
  184 + if(isInit) {// 第一次加载
  185 + self.setData({
  186 + list: res.data.data
  187 + });
  188 + } else {
  189 + self.setData({
  190 + 'list.pageData': self.data.list.pageData.concat(res.data.data.pageData)
  191 + });
  192 + };
  193 +
  194 + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) {
  195 + self.setData({
  196 + noMore: true
  197 + });
  198 + };
  199 +
  200 + } else {
  201 + self.setData({
  202 + 'list.pageData': []
  203 + });
  204 + };
  205 +
  206 + });
  207 +
  208 + return p;
  209 + },
  210 +
  211 +
  212 + /**
  213 + * 上拉加载
  214 + */
  215 + scrollToLower(url, requestData) {
  216 + // 数据总量
  217 + let total = this.data.list.total;
  218 + // 单页最大数据量
  219 + let pageSize = this.data.list.pageSize;
  220 + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’
  221 + if((total != 0)&&(total <= pageSize)) {
  222 + this.setData({
  223 + noMore: true
  224 + });
  225 + };
  226 +
  227 + if(!this.data.isLoading && !this.data.noMore) {
  228 + this.setData({
  229 + isLoading: true,
  230 + pageNum: this.data.pageNum + 1
  231 + });
  232 + requestData.page = this.data.pageNum;
  233 + this.getData(false, url, requestData);
  234 + };
  235 + },
  236 +
  237 + /**
  238 + * 点击跳转
  239 + */
  240 + goto(e) {
  241 + // let url = '';
  242 + // if(e.target.dataset.url) {
  243 + // url = e.target.dataset.url;
  244 + // } else {
  245 + // url = e.currentTarget.dataset.url;
  246 + // }
  247 + let id = e.currentTarget.dataset.id;
  248 + let title = e.currentTarget.dataset.title;
  249 + let url = `/packageB/pages/luckactivity/luckinfo/luckinfo?id=${id}&title=${title}`;
  250 + app.goto(url);
  251 + },
  252 +
  253 +
  254 +
  255 +})
0 256 \ No newline at end of file
... ...
packageB/pages/luckactivity/index/index.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "幸运大转盘",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn",
  6 + "nav_b": "/components/nav_b/nav_b",
  7 + "my_confirm": "/components/my_confirm/my_confirm",
  8 + "nodata": "/components/nodata/nodata"
  9 + }
  10 +}
0 11 \ No newline at end of file
... ...
packageB/pages/luckactivity/index/index.wxml 0 → 100644
  1 +<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
  2 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
  3 +<view>
  4 + <swiper class="swiper" circular="true" autoplay="true" indicator-dots="true" interval="2500" wx:if="{{ad_data}}" indicator-active-color="rgba(255,255,255,.8)">
  5 + <!-- <swiper class="swiper" circular="true" autoplay="true" indicator-dots="true" interval="2500"> -->
  6 + <block wx:for="{{ad_data}}">
  7 + <swiper-item>
  8 + <!-- <navigator url="{{item.ad_weapplink}}" class="s1_gk_a1" wx:if="{{g_filter.has_char(item.ad_weapplink,'plugin')>=0}}"> -->
  9 + <navigator url="{{item.ad_weapplink}}" style="height: 100%;" hover-class="none" open-type="reLaunch">
  10 + <image src="{{item.ad_code}}" class="img" bindload="imageLoad" data-index="{{index}}" mode="scaleToFill" lazy-load="true"/>
  11 + </navigator>
  12 + </swiper-item>
  13 + </block>
  14 + </swiper>
  15 + <view class="tab-title" bindtap="clickTab">
  16 + <view class="tab-title-item {{currentIndex == index ? 'active':''}}" wx:for="{{tabArr}}" data-index="{{index}}">{{item}}</view>
  17 + </view>
  18 + <view class="tab-content">
  19 +
  20 + <block wx:for="{{list.pageData}}">
  21 + <view class="tab-item" bindtap="goto" data-id="{{item.id}}" data-title="{{item.act_name}}">
  22 + <text class="iconfont icon-zhuanpan"></text>
  23 + <view class="desc-container">
  24 + <view class="">
  25 + <!-- 标题 -->
  26 + <view class="ellipsis-1x taj">{{item.act_name}}</view>
  27 + <!-- 时间 -->
  28 + <view class="date pdt10 pdb20" wx:if="{{currentIndex == 0}}">活动时间:{{filter.format_time(item.begindate) + ' 至 ' + filter.format_time(item.enddate)}}</view>
  29 + <view class="date pdt10 pdb20" wx:else>兑换时间:{{filter.format_time(item.begindate) + ' 至 ' + filter.format_time(item.enddate)}}</view>
  30 + </view>
  31 + <!-- 按钮 -->
  32 + <view class="btn-container">
  33 + <view class="btn red" wx:if="{{currentIndex == 0}}">立即参与</view>
  34 + <view class="btn red" wx:else>去兑换</view>
  35 + </view>
  36 + </view>
  37 + </view>
  38 + </block>
  39 +
  40 +
  41 +
  42 + <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
  43 + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底了 ——</view>
  44 + </view>
  45 +</view>
  46 +
  47 +<!-- 引入提示组件 -->
  48 +<warn id="warn"></warn>
  49 +<my_confirm id="my_confirm"></my_confirm>
... ...
packageB/pages/luckactivity/index/index.wxss 0 → 100644
  1 +@charset "utf-8";
  2 +
  3 +.c-a4 {
  4 + color: #a4a4a4;
  5 +}
  6 +
  7 +.c-red {
  8 + color: #FF6768;
  9 +}
  10 +
  11 +.h88 {
  12 + height: 88rpx;
  13 +}
  14 +
  15 +
  16 +page {
  17 + background-color: #f0f0f0;
  18 +}
  19 +
  20 +.tab-title {
  21 + display: flex;
  22 + position: sticky;
  23 + background-color: white;
  24 + top: 0;
  25 + font-size: 30rpx;
  26 + z-index: 999;
  27 +}
  28 +
  29 +.tab-title::after {
  30 + position: absolute;
  31 + content: '';
  32 + width: 2rpx;
  33 + height: 40%;
  34 + background-color: #f0f0f0;
  35 + top: 0;
  36 + bottom: 0;
  37 + left: 0;
  38 + right: 0;
  39 + margin: auto;
  40 +}
  41 +
  42 +.tab-title-item {
  43 + flex: 1;
  44 + text-align: center;
  45 + padding-top: 20rpx;
  46 + padding-bottom: 20rpx;
  47 + position: relative;
  48 +}
  49 +
  50 +.tab-title-item.active {
  51 + color: #FF6768;
  52 + font-weight: bold;
  53 +
  54 +}
  55 +
  56 +.tab-title-item::after {
  57 + position: absolute;
  58 + content: '';
  59 + left: 100%;
  60 + bottom: 0;
  61 + width: 0;
  62 + border-bottom: 2rpx solid #FF6768;
  63 + /* height: 3rpx; */
  64 + transition: 0.2s all linear;
  65 +}
  66 +
  67 +.tab-title-item.active::after {
  68 + /* left: 100%; */
  69 + width: 100%;
  70 + left: 0;
  71 + /* background-color: #FF6768; */
  72 + /* transition-delay: 0.1s; */
  73 +}
  74 +
  75 +.tab-title-item.active ~ .tab-title-item::after {
  76 + /* width: 100%; */
  77 + left: 0;
  78 +}
  79 +
  80 +.tab-content {
  81 + padding-top: 20rpx;
  82 + padding-left: 20rpx;
  83 + padding-right: 20rpx;
  84 +}
  85 +
  86 +.tab-item {
  87 + padding: 20rpx;
  88 + background-color: white;
  89 + border-radius: 10rpx;
  90 + overflow: hidden;
  91 + display: flex;
  92 + align-items: center;
  93 +}
  94 +
  95 +.tab-item ~ .tab-item {
  96 + margin-top: 20rpx;
  97 +}
  98 +
  99 +.icon-zhuanpan {
  100 + font-size: 120rpx;
  101 + color: #FF6768;
  102 +}
  103 +
  104 +.img-container {
  105 + /* background-color: #dedede; */
  106 + /* height: 300rpx; */
  107 + width: 100%;
  108 + height: 200rpx;
  109 +}
  110 +
  111 +.img-container2 {
  112 + width: 200rpx;
  113 + height: 200rpx;
  114 + background-color: #dedede;
  115 + margin-right: 20rpx;
  116 + flex-shrink: 0;
  117 + display: flex;
  118 + align-items: center;
  119 + position: relative;
  120 +}
  121 +
  122 +.img-container2.error::before {
  123 + font-family: iconfont;
  124 + position: absolute;
  125 + content: '\e8c1';
  126 +}
  127 +
  128 +.img {
  129 + display: block;
  130 + width: 100%;
  131 + height: 100%;
  132 +}
  133 +
  134 +.desc-container {
  135 + /* padding: 20rpx; */
  136 + padding-left: 20rpx;
  137 + flex: 1;
  138 +}
  139 +
  140 +
  141 +
  142 +.rmb::before {
  143 + content: '¥';
  144 +}
  145 +
  146 +.date {
  147 + color: #a4a4a4;
  148 + font-size: 24rpx;
  149 +}
  150 +
  151 +.btn-container {
  152 + display: flex;
  153 + justify-content: flex-end;
  154 + font-size: 26rpx;
  155 +}
  156 +
  157 +.btn {
  158 + font-size: 28rpx;
  159 + padding: 12rpx 30rpx;
  160 + border-radius: 8rpx;
  161 + text-align: center;
  162 + display: inline-block;
  163 + text-align: right;
  164 +}
  165 +
  166 +.btn.red {
  167 + background-color: #FF6768;
  168 + color: white;
  169 +}
  170 +
  171 +.btn.pink {
  172 + background-color: #FACAD6;
  173 + color: #FF6768;
  174 +}
  175 +
  176 +.noMore {
  177 + padding: 20rpx;
  178 + color: #bbb;
  179 + text-align: center;
  180 + font-size: 22rpx;
  181 +}
0 182 \ No newline at end of file
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.js 0 → 100644
  1 +const app = getApp();
  2 +let imghost = app.globalData.setting.imghost;
  3 +let self = null;
  4 +
  5 +Page({
  6 + data: {
  7 + start: false,
  8 + list: null,
  9 + isLoading: false, // 检测是否已经发送请求,防止重复发送请求
  10 + noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
  11 + pageNum: 1, // 当前页数
  12 + imghost: imghost,
  13 +
  14 + prizes: [],
  15 + defaultConfig: {
  16 + offsetDegree: 22.5,
  17 + },
  18 + // defaultStyle: {
  19 + // fontColor: '#d64737',
  20 + // fontSize: '14px'
  21 + // },
  22 + blocks: [ //背景图
  23 + // { padding: '13px', background: '#d64737', top: '20rpx' }
  24 + {
  25 + padding: '76rpx',
  26 + // background: 'pink',
  27 + imgs: [{
  28 + src: imghost + 'miniapp/images/luckDraw/weel.png',
  29 + width: '700rpx',
  30 + height: '700rpx',
  31 + rotate: true,
  32 + }]
  33 + }
  34 + ],
  35 + buttons: [
  36 + // { radius: '50px', background: '#d64737' },
  37 + // { radius: '45px', background: '#fff' },
  38 + // { radius: '41px', background: '#f6c66f', pointer: true },
  39 + // {
  40 + // radius: '35px', background: '#ffdea0',
  41 + // fonts: [{ text: '开始\n抽奖', fontSize: '18px', top: -18 }]
  42 + // }
  43 + {
  44 + radius: '60rpx',
  45 + // background: 'black',
  46 + // pointer: true,
  47 + imgs: [{
  48 + src: imghost + 'miniapp/images/luckDraw/pointer.png',
  49 + width: '188rpx',
  50 + height: '230rpx',
  51 + top: '-130rpx',
  52 + }],
  53 + }
  54 + ],
  55 + },
  56 +
  57 + onLoad(options) {
  58 + console.log('imghost+++++', imghost);
  59 + self = this;
  60 + this.data.options = options;
  61 + // this.setData({
  62 + // options,
  63 + // imghost,
  64 + // });
  65 + console.log('this data', this.data.imghost);
  66 + wx.setNavigationBarTitle({
  67 + title: options.title,
  68 + });
  69 + app.isLogin().then(function(data) {//进入页面前已经授权登录成功
  70 + self.setData({
  71 + userInfo: data,
  72 + // imghost,
  73 + });
  74 + });
  75 + },
  76 +
  77 + onShow() {
  78 + if(app.globalData.userInfo) {
  79 + if(!this.data.isLogin) {
  80 +
  81 + this.setData({
  82 + userInfo: app.globalData.userInfo,
  83 + isLogin: true,
  84 + });
  85 +
  86 + // console.log('imghost', this.data.imghost);
  87 + let user_id = app.globalData.userInfo.user_id;
  88 + let store_id = app.globalData.setting.stoid;
  89 + let id = this.data.options.id;
  90 + let url = `/api/weshop/marketing/marketingLuckForm/getLuckInfo/${store_id}/${id}/${user_id}`;
  91 +
  92 +
  93 + app.request.get(url, {
  94 + success: function(res) {
  95 + if(res.data.code == 0) {
  96 + self.setData({
  97 + luckInfo: res.data.data,
  98 + });
  99 + } else {
  100 + wx.showToast({
  101 + title: res.data.msg,
  102 + icon: 'none',
  103 + });
  104 + self.data.msg = res.data.msg;
  105 + };
  106 +
  107 + // console.log('luckInfo', res.data.data);
  108 + let luckInfo = res.data.data;
  109 +
  110 + if(luckInfo && luckInfo.template_type != null && luckInfo.template_type == 1) { //获取模板
  111 + let url = `/api/weshop/marketing/marketingLuckTemplate/get/${store_id}/${luckInfo.template_id}`;
  112 + app.request.get(url, {
  113 + success: function(res) {
  114 + // console.log('prizes//////', res.data.data);
  115 + self.setData({
  116 + template: res.data.data,
  117 + bannerUrl: imghost + (res.data.data.bannerUrl ? res.data.data.bannerUrl:'miniapp/images/luckDraw/bg.png'), //背景图
  118 + 'blocks[0].imgs[0].src': imghost + (res.data.data.wheelBaseUrl ? res.data.data.wheelBaseUrl:'miniapp/images/luckDraw/weel.png'), //转盘
  119 + 'buttons[0].imgs[0].src': imghost + (res.data.data.wheelPointerUrl ? res.data.data.wheelPointerUrl:'miniapp/images/luckDraw/pointer.png'), //指针
  120 + });
  121 + },
  122 + });
  123 + } else {
  124 + if(luckInfo && luckInfo.store_bannerUrl) {
  125 + self.setData({
  126 + bannerUrl: imghost + luckInfo.store_bannerUrl,
  127 + });
  128 + };
  129 +
  130 + };
  131 +
  132 + },
  133 + });
  134 +
  135 + // 获取奖品展示的奖品
  136 + app.request.get('/api/weshop/marketing/marketingLuckList/page', {
  137 + data: {
  138 + store_id,
  139 + luck_formid: id,
  140 + },
  141 + success: function(res) {
  142 +
  143 + let award = res.data.data.pageData;
  144 + self.setData({
  145 + award,
  146 + });
  147 + console.log('award', award);
  148 + self.prizeLayout(award);
  149 +
  150 + },
  151 + });
  152 +
  153 +
  154 + //获取兑奖记录
  155 + app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {
  156 + isShowLoading: false,
  157 + data: {
  158 + store_id: app.globalData.setting.stoid,
  159 + user_id: app.globalData.userInfo.user_id,
  160 + luck_formid: this.data.options.id,
  161 + luck_state: 1
  162 + },
  163 + success: function(res) {
  164 + if(res.data.code == 0) {
  165 + self.setData({
  166 + record: res.data.data.pageData,
  167 + });
  168 + };
  169 + },
  170 + });
  171 +
  172 +
  173 + //获取中奖人员名单
  174 + app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {
  175 + isShowLoading: false,
  176 + data: {
  177 + store_id: app.globalData.setting.stoid,
  178 + luck_formid: this.data.options.id,
  179 + luck_state: 1,
  180 + pageSize: 20,
  181 + },
  182 + success: function(res) {
  183 + if(res.data.code == 0) {
  184 + self.setData({
  185 + nameList: res.data.data.pageData,
  186 + });
  187 + };
  188 + },
  189 + });
  190 +
  191 + };
  192 + };
  193 + },
  194 +
  195 + // 设置转盘奖品布局
  196 + prizeLayout(award) {
  197 + let prizes = [];
  198 + let length = award.length;
  199 + let thx = {fonts: [{ text: '谢谢\n参与', top: '18%', wordWrap:false, fontColor: 'rgba(255,255,255,.6)'}]};
  200 +
  201 + if(length == 1) {
  202 + [0,2,4,6].map(function(item, index) {
  203 + prizes[item] = {
  204 + id: award[0].id,
  205 + lbtype: award[0].lbtype,
  206 + fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  207 + imgs: [
  208 + {
  209 + src: self.prizeSrc(award[0].lbtype) ? self.prizeSrc(award[0].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  210 + width: '135rpx',
  211 + height: '107rpx',
  212 + top: '12%',
  213 + }
  214 + ],
  215 + };
  216 + });
  217 +
  218 + [1,3,5,7].map(function(item, index) {
  219 + prizes[item] = thx;
  220 + });
  221 +
  222 + this.data.thxIndexArr = [1,3,5,7];
  223 + };
  224 +
  225 + if(length == 2) {
  226 + [0,4].map(function(item, index) {
  227 + prizes[item] = {
  228 + id: award[0].id,
  229 + lbtype: award[0].lbtype,
  230 + fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  231 + imgs: [
  232 + {
  233 + src: self.prizeSrc(award[0].lbtype) ? self.prizeSrc(award[0].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  234 + width: '135rpx',
  235 + height: '107rpx',
  236 + top: '12%',
  237 + }
  238 + ],
  239 + };
  240 + });
  241 +
  242 + [2,6].map(function(item, index) {
  243 + prizes[item] = {
  244 + id: award[1].id,
  245 + lbtype: award[1].lbtype,
  246 + fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  247 + imgs: [
  248 + {
  249 + src: self.prizeSrc(award[1].lbtype) ? self.prizeSrc(award[1].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  250 + width: '135rpx',
  251 + height: '107rpx',
  252 + top: '12%',
  253 + }
  254 + ],
  255 + };
  256 + });
  257 +
  258 + [1,3,5,7].map(function(item, index) {
  259 + prizes[item] = thx;
  260 + });
  261 + this.data.thxIndexArr = [1,3,5,7];
  262 + };
  263 +
  264 +
  265 + if(length == 3) {
  266 + [0,4].map(function(item, index) {
  267 + prizes[item] = {
  268 + id: award[0].id,
  269 + lbtype: award[0].lbtype,
  270 + fonts: [{ text: award[0].luck_goods_name + ' x' + award[0].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  271 + imgs: [
  272 + {
  273 + src: self.prizeSrc(award[0].lbtype) ? self.prizeSrc(award[0].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  274 + width: '135rpx',
  275 + height: '107rpx',
  276 + top: '12%',
  277 + }
  278 + ],
  279 + };
  280 + });
  281 +
  282 + [1,5].map(function(item, index) {
  283 + prizes[item] = {
  284 + id: award[1].id,
  285 + lbtype: award[1].lbtype,
  286 + fonts: [{ text: award[1].luck_goods_name + ' x' + award[1].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  287 + imgs: [
  288 + {
  289 + src: self.prizeSrc(award[1].lbtype) ? self.prizeSrc(award[1].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  290 + width: '135rpx',
  291 + height: '107rpx',
  292 + top: '12%',
  293 + }
  294 + ],
  295 + };
  296 + });
  297 +
  298 + [2,6].map(function(item, index) {
  299 + prizes[item] = {
  300 + id: award[2].id,
  301 + lbtype: award[2].lbtype,
  302 + fonts: [{ text: award[2].luck_goods_name + ' x' + award[2].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  303 + imgs: [
  304 + {
  305 + src: self.prizeSrc(award[2].lbtype) ? self.prizeSrc(award[2].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  306 + width: '135rpx',
  307 + height: '107rpx',
  308 + top: '12%',
  309 + }
  310 + ],
  311 + };
  312 + });
  313 +
  314 + [3,7].map(function(item, index) {
  315 + prizes[item] = thx;
  316 + });
  317 +
  318 + this.data.thxIndexArr = [3,7];
  319 + };
  320 +
  321 +
  322 + if(length == 4) {
  323 + [0,2,4,6].map(function(item, index) {
  324 + prizes[item] = {
  325 + id: award[index].id,
  326 + lbtype: award[index].lbtype,
  327 + fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  328 + imgs: [
  329 + {
  330 + src: self.prizeSrc(award[index].lbtype) ? self.prizeSrc(award[index].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  331 + width: '135rpx',
  332 + height: '107rpx',
  333 + top: '12%',
  334 + }
  335 + ],
  336 + };
  337 + });
  338 +
  339 + [1,3,5,7].map(function(item, index) {
  340 + prizes[item] = thx;
  341 + });
  342 +
  343 + this.data.thxIndexArr = [1,3,5,7];
  344 + };
  345 +
  346 + if(length == 5) {
  347 + [0,2,3,5,6].map(function(item, index) {
  348 + prizes[item] = {
  349 + id: award[index].id,
  350 + lbtype: award[index].lbtype,
  351 + fonts: [{ text: award[index].luck_goods_name + ' x' + award[index].num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  352 + imgs: [
  353 + {
  354 + src: self.prizeSrc(award[index].lbtype) ? self.prizeSrc(award[index].lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  355 + width: '135rpx',
  356 + height: '107rpx',
  357 + top: '12%',
  358 + }
  359 + ],
  360 + };
  361 + });
  362 +
  363 + [1,4,7].map(function(item, index) {
  364 + prizes[item] = thx;
  365 + });
  366 +
  367 + this.data.thxIndexArr = [1,4,7];
  368 + };
  369 +
  370 + if(length == 6) {
  371 + prizes = award.map(function(item, index) {
  372 + return {
  373 + id: item.id,
  374 + lbtype: item.lbtype,
  375 + fonts: [{ text: item.luck_goods_name + ' x' + item.num, top: '18%', wordWrap:false, fontColor: 'transparent'}],
  376 + imgs: [
  377 + {
  378 + src: self.prizeSrc(item.lbtype) ? self.prizeSrc(item.lbtype): (imghost + 'miniapp/images/luckDraw/lb.png'),
  379 + width: '135rpx',
  380 + height: '107rpx',
  381 + top: '12%',
  382 + }
  383 + ],
  384 + };
  385 + });
  386 +
  387 + prizes.push(thx);
  388 + prizes.splice(3, 0, thx);
  389 +
  390 + this.data.thxIndexArr = [3,7];
  391 + };
  392 +
  393 + // console.log('prizes', prizes);
  394 +
  395 + this.setData({
  396 + prizes,
  397 + });
  398 + },
  399 +
  400 + // 根据lbtype指定奖品类别图标
  401 + prizeSrc(lbtype) {
  402 + let src = '';
  403 + // let imghost = this.data.imghost;
  404 + switch(lbtype) {
  405 + case 1: { //积分
  406 + src = imghost + 'miniapp/images/luckDraw/jf.png';
  407 + break;
  408 + };
  409 + case 2: { //成长值
  410 + src = imghost + 'miniapp/images/luckDraw/czz.png';
  411 + break;
  412 + };
  413 + case 3: { //优惠券
  414 + src = imghost + 'miniapp/images/luckDraw/yhq.png';
  415 + break;
  416 + };
  417 + case 4: { //服务项目
  418 + src = imghost + 'miniapp/images/luckDraw/fw.png';
  419 + break;
  420 + };
  421 + case 5: { //赠品
  422 + src = imghost + 'miniapp/images/luckDraw/zp.png';
  423 + break;
  424 + };
  425 + case 6: { //礼包
  426 + src = imghost + 'miniapp/images/luckDraw/lb.png';
  427 + break;
  428 + };
  429 + };
  430 + return src;
  431 + },
  432 +
  433 + // 获取抽奖结果匹配对应奖品在奖品列表里的所有索引号
  434 + luckyIndex(arr, target) {
  435 + var results=[],
  436 + len = arr.length,
  437 + pos = 0;
  438 + while(pos < len){
  439 + // pos = arr[pos].indexOf(target, pos);
  440 + if(arr[pos].id == target) {
  441 + results.push(pos);//找到就存储索引
  442 +
  443 + };
  444 + pos+=1;//并从下个位置开始搜索
  445 + // if(pos === -1){//未找到就退出循环完成搜索
  446 + // break;
  447 + // };
  448 +
  449 + }
  450 + // console.log('当前奖品列表', this.data.prizes);
  451 + // console.log('中奖结果在当前奖品列表中的索引', results);
  452 +
  453 + return results;
  454 + },
  455 +
  456 + start () {
  457 + if(!this.data.luckInfo) {
  458 + wx.showToast({
  459 + title: this.data.msg,
  460 + icon: 'none',
  461 + });
  462 + return;
  463 + };
  464 +
  465 + if(this.data.luckInfo.user_LuckNumDay != 0) {
  466 + // console.log('start choujiang');
  467 + // let start = false;
  468 + if(!this.data.start) {
  469 + this.data.start = true;
  470 + // 获取抽奖组件实例
  471 + const $lucky = this.selectComponent('#myLucky');
  472 + // 调用play方法开始旋转
  473 + $lucky.play();
  474 +
  475 + // 获取抽奖结果
  476 + app.request.post('/api/weshop/marketing/marketingLuckForm/startLuck', {
  477 + isShowLoading: false,
  478 + data: {
  479 + storeId: app.globalData.setting.stoid,
  480 + userId: app.globalData.userInfo.user_id,
  481 + LuckId: this.data.options.id,
  482 + },
  483 + success: function(res) {
  484 +
  485 + if(res.data.code == 0) {
  486 + console.log('开始摇奖', res.data.data);
  487 + self.setData({
  488 + 'luckInfo.user_LuckNumDay': self.data.luckInfo.user_LuckNumDay - 1
  489 + });
  490 + // console.log('请求成功', res.data.data);
  491 + let luckyId = res.data.data.id;
  492 + let indexArr = self.luckyIndex(self.data.prizes, luckyId);
  493 + // console.log('抽奖奖品id', luckyId);
  494 + // console.log('奖品列表', self.data.prizes);
  495 + // console.log('奖品对应的索引数组', indexArr);
  496 + let random = Math.random() * indexArr.length >> 0;
  497 + // console.log('random', random);
  498 + let index = indexArr[random];
  499 + setTimeout(() => {
  500 + $lucky.stop(index);
  501 + self.data.start = false;
  502 + }, 3000);
  503 +
  504 +
  505 + } else {
  506 + // console.log('请求出错');
  507 + let thxIndexArr = self.data.thxIndexArr;
  508 + const random = Math.random() * thxIndexArr.length >> 0;
  509 + const index = thxIndexArr[random];
  510 + // console.log('谢谢参与数组', thxIndexArr);
  511 + // console.log('请求出错产生谢谢参与的随机数', index);
  512 + setTimeout(() => {
  513 + $lucky.stop(index);
  514 + self.data.start = false;
  515 + }, 3000);
  516 + };
  517 + },
  518 +
  519 + fail: function() {
  520 + // console.log('出错');
  521 + let thxIndexArr = self.data.thxIndexArr;
  522 + const random = Math.random() * thxIndexArr.length >> 0;
  523 + const index = thxIndexArr[random];
  524 + setTimeout(() => {
  525 + $lucky.stop(index);
  526 + self.data.start = false;
  527 + }, 3000);
  528 + },
  529 +
  530 + });
  531 +
  532 + }
  533 +
  534 +
  535 + } else {
  536 + wx.showToast({
  537 + title: '你今天的抽奖次数已用完啦!~',
  538 + icon: 'none',
  539 + });
  540 + };
  541 +
  542 + },
  543 + end (event) {
  544 + // 中奖奖品详情
  545 + // console.log('zjiangla~~',event.detail.lbtype);
  546 + let lbtype;
  547 + let resultTitle = event.detail.fonts[0].text.replace('\n','');
  548 + if(event.detail.lbtype == 5) {
  549 + lbtype = 5;
  550 + } else {
  551 + lbtype = -1;
  552 + };
  553 + this.setData({
  554 + hiddenCanvas: true,
  555 + showResult: true,
  556 + showMask: true,
  557 + resultTitle,
  558 + currentLbtype: lbtype,
  559 + });
  560 + },
  561 +
  562 + showPopup() {
  563 + this.setData({
  564 + list: null,
  565 + pageNum: 1,
  566 + noMore: false,
  567 + });
  568 + this.getData(true, '/api/weshop/marketing/marketingLuckRecord/page', {
  569 + store_id: app.globalData.setting.stoid,
  570 + user_id: app.globalData.userInfo.user_id,
  571 + luck_formid: this.data.options.id,
  572 + luck_state: 1,
  573 + pageSize: 50,
  574 + }).then(function(res) {
  575 + self.setData({
  576 + showPopup: true,
  577 + showMask: true,
  578 + hiddenCanvas: true,
  579 + // record: self.data.list.pageData,
  580 + });
  581 + });
  582 + // app.request.get('/api/weshop/marketing/marketingLuckRecord/page', {
  583 + // // isShowLoading: false,
  584 + // data: {
  585 + // store_id: app.globalData.setting.stoid,
  586 + // user_id: app.globalData.userInfo.user_id,
  587 + // luck_formid: this.data.options.id,
  588 + // luck_state: 1
  589 + // },
  590 + // success: function(res) {
  591 + // // console.log('中奖记录', res.data.data);
  592 + // if(res.data.code == 0) {
  593 + // self.setData({
  594 + // showPopup: true,
  595 + // showMask: true,
  596 + // hiddenCanvas: true,
  597 + // record: self.data.list.pageData,
  598 + // });
  599 +
  600 +
  601 + // };
  602 + // },
  603 +
  604 + // });
  605 +
  606 + },
  607 +
  608 + closePopup() {
  609 + this.setData({
  610 + showPopup: false,
  611 + showMask: false,
  612 + hiddenCanvas: false,
  613 + });
  614 + },
  615 +
  616 + closeResult() {
  617 + this.setData({
  618 + showResult: false,
  619 + showMask: false,
  620 + hiddenCanvas: false,
  621 + });
  622 + },
  623 +
  624 + loadmore() {
  625 + this.scrollToLower('/api/weshop/marketing/marketingLuckRecord/page', {
  626 + store_id: app.globalData.setting.stoid,
  627 + user_id: app.globalData.userInfo.user_id,
  628 + luck_formid: this.data.options.id,
  629 + luck_state: 1,
  630 + pageSize: 50,
  631 + });
  632 + },
  633 +
  634 +
  635 + /**
  636 + * 请求数据
  637 + */
  638 + getData: function(isInit, url, data) {
  639 + let p = app.request.promiseGet(url, {
  640 + data: data,
  641 + isShowLoading: true,
  642 + })
  643 + .then(function(res) {
  644 + if(res.data.code == 0) {
  645 +
  646 + self.setData({
  647 + isLoading: false
  648 + });
  649 +
  650 + if(isInit) {// 第一次加载
  651 + self.setData({
  652 + list: res.data.data
  653 + });
  654 + } else {
  655 + self.setData({
  656 + 'list.pageData': self.data.list.pageData.concat(res.data.data.pageData)
  657 + });
  658 + };
  659 +
  660 + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) {
  661 + self.setData({
  662 + noMore: true
  663 + });
  664 + };
  665 +
  666 + } else {
  667 + self.setData({
  668 + 'list.pageData': []
  669 + });
  670 + };
  671 +
  672 + });
  673 +
  674 + return p;
  675 + },
  676 +
  677 +
  678 + /**
  679 + * 上拉加载
  680 + */
  681 + scrollToLower(url, requestData) {
  682 + // 数据总量
  683 + let total = this.data.list.total;
  684 + // 单页最大数据量
  685 + let pageSize = this.data.list.pageSize;
  686 + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’
  687 + if((total != 0)&&(total <= pageSize)) {
  688 + this.setData({
  689 + noMore: true
  690 + });
  691 + };
  692 +
  693 + if(!this.data.isLoading && !this.data.noMore) {
  694 + this.setData({
  695 + isLoading: true,
  696 + pageNum: this.data.pageNum + 1
  697 + });
  698 + requestData.page = this.data.pageNum;
  699 + this.getData(false, url, requestData);
  700 + };
  701 + },
  702 +
  703 +
  704 + goto(e) {
  705 + let url = '';
  706 + let type = e.currentTarget.dataset.type;
  707 + switch(type) {
  708 + case 1: {
  709 + url = '/pages/user/integral/integral';
  710 + break;
  711 + };
  712 + case 2: {
  713 + url = '/pages/user/grow_value/grow_value';
  714 + break;
  715 + };
  716 + case 3: {
  717 + url = '/pages/user/coupons/coupons';
  718 + break;
  719 + };
  720 + case 4: {
  721 + url = '/pages/user/my_service/i_service';
  722 + break;
  723 + };
  724 + case 6: {
  725 + url = '/packageA/pages/myGift/myGift';
  726 + break;
  727 + };
  728 + };
  729 + app.goto(url);
  730 + },
  731 +
  732 + showQr(e) {
  733 + let store_id = app.globalData.setting.stoid;
  734 + let id = e.currentTarget.dataset.id;
  735 + let url = `/api/weshop/marketing/marketingLuckList/updateGoodsVerifyCode/${store_id}/${id}`;
  736 + app.request.put(url, {
  737 + success: function(res) {
  738 + if(res.data.code == 0) {
  739 + let data = res.data.data;
  740 + console.log('data!!!!', data);
  741 + let barcode = self.selectComponent("#qrcode");
  742 + barcode.open({val: data});
  743 + self.setData({
  744 + hiddenCanvas: true,
  745 + showPopup: false,
  746 + });
  747 + };
  748 + },
  749 +
  750 + });
  751 + },
  752 +
  753 + closeQr() {
  754 + this.setData({
  755 + hiddenCanvas: false,
  756 + showMask: false,
  757 + });
  758 + },
  759 +
  760 + clickReceive() {
  761 + this.setData({
  762 + showResult: false,
  763 + });
  764 + this.showPopup();
  765 + },
  766 +})
0 767 \ No newline at end of file
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.json 0 → 100644
  1 +{
  2 + "usingComponents": {
  3 + "lucky-wheel":"/packageB/miniprogram_npm/mini-luck-draw/lucky-wheel/index",
  4 + "qrcode": "/components/my-qrcode/my-qrcode",
  5 + "nodata": "/components/nodata/nodata"
  6 + },
  7 + "enablePullDownRefresh": false,
  8 + "navigationBarTitleText": "幸运大转盘"
  9 +}
0 10 \ No newline at end of file
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxml 0 → 100644
  1 +<wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
  2 +<wxs module="tool" src="./tool.wxs"></wxs>
  3 +<view class="luck-container" style="background: {{template.colorCode ? template.colorCode:'#8102FD'}} url({{bannerUrl ? bannerUrl:(imghost + 'miniapp/images/luckDraw/bg.png')}}) no-repeat;">
  4 +<!-- <view class="luck-container" style="background: url({{ bannerUrl}}) no-repeat;"> -->
  5 + <!-- 中奖人员 -->
  6 + <view class="swiper-container" wx:if="{{nameList && nameList.length != 0}}">
  7 + <swiper class="swiper" autoplay="true" circular="true" vertical="true" interval="3000">
  8 + <swiper-item class="swiper-item" wx:for="{{nameList}}">
  9 + <view class="item">
  10 + <view class="avatar-container">
  11 + <image src="{{item.head_pic}}" class="img-block"></image>
  12 + </view>
  13 + <view class="flex ai_c pdr10">
  14 + <view class="nickname ellipsis-1x">{{item.nickname}}</view>
  15 + <view style="flex-shrink: 0;">获得了"{{item.luck_goods_name}}"</view>
  16 + </view>
  17 + </view>
  18 + </swiper-item>
  19 + </swiper>
  20 + </view>
  21 + <!-- 大转盘 -->
  22 + <view class="weel-container">
  23 + <view>
  24 + <lucky-wheel
  25 + class="myLucky"
  26 + id="myLucky"
  27 + width="700rpx"
  28 + height="700rpx"
  29 + blocks="{{blocks}}"
  30 + prizes="{{prizes}}"
  31 + buttons="{{buttons}}"
  32 + defaultConfig="{{defaultConfig}}"
  33 + defaultStyle="{{defaultStyle}}"
  34 + bindstart="start"
  35 + bindend="end"
  36 + hiddenCanvas="{{hiddenCanvas}}"
  37 + />
  38 + </view>
  39 +
  40 + <view class="fs28 white t-c pdt10">今天你还有 <text class="fs50 c-yellow">{{filter.show_default(luckInfo.user_LuckNumDay, '0')}}</text> 次抽奖机会</view>
  41 + <view class="tip-to-down expand-transition">
  42 + <text></text>
  43 + <text></text>
  44 + </view>
  45 + </view>
  46 + <!-- 奖品展示 -->
  47 + <view>
  48 + <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge prizes" lazy-load></image></view>
  49 + <view class="list br12 bg-white">
  50 + <view class="list-item" wx:for="{{award}}">
  51 + <view class="img-container">
  52 + <image wx:if="{{item.luck_goods_img}}" src="{{item.luck_goods_img}}" class="img" mode="aspectFit"></image>
  53 + <image src="{{imghost + tool.showDefaultImg(item.lbtype)}}" class="img" mode="aspectFit" wx:else></image>
  54 + </view>
  55 + <view class="item-r">
  56 + <view class="fs28">{{item.luck_goods_name}}</view>
  57 + <view class="flex jc_sb fs26 c9">
  58 + <view>价值:<text class="rmb">{{item.luck_goods_price}}</text></view>
  59 + <view>数量:{{item.luck_goods_qty}}</view>
  60 + </view>
  61 + </view>
  62 + </view>
  63 + </view>
  64 + </view>
  65 + <!-- 活动展示 -->
  66 + <view wx:if="{{luckInfo.remark}}">
  67 + <view class="badge-container"><image src="{{imghost + 'miniapp/images/luckDraw/badge.png'}}" class="badge activity" lazy-load></image></view>
  68 + <view class="bg-white br12 pd20">
  69 + {{luckInfo.remark}}
  70 + <!-- 时间 -->
  71 + <!-- <view class="bdb">
  72 + <view class="">
  73 + <view class="txt-red">活动时间:</view>
  74 + <view class="fs28 pdv20">187606546456</view>
  75 + </view>
  76 + <view>
  77 + <view class="txt-red">兑换时间:</view>
  78 + <view class="fs28 pdv20">-</view>
  79 + </view>
  80 + </view> -->
  81 + <!-- 规则 -->
  82 + <!-- <view class="bdb">
  83 + <view class="txt-red pdt20">活动规则:</view>
  84 + <view class="fs28 pdv20">-</view>
  85 + </view> -->
  86 + <!-- 电话 -->
  87 + <!-- <view class="bdb">
  88 + <view class="txt-red pdt20">联系电话:</view>
  89 + <view class="fs28 pdv20">-</view>
  90 + </view> -->
  91 + <!-- 地址 -->
  92 + <!-- <view>
  93 + <view class="txt-red pdv20">门店兑换地址:</view>
  94 + <view class="pdv20">
  95 + <view class="fs28">化妆门店2(芊婕化妆品)</view>
  96 + <view class="pdt10 fs24">福建泉州市田安北路明鑫花苑110号</view>
  97 + <view class="tel pdt10">
  98 + <text class="iconfont icon-tel"></text>
  99 + <text class="text-underline">1380000000</text>
  100 + </view>
  101 + </view>
  102 + <view class="pdv20">
  103 + <view class="fs28">化妆门店2(芊婕化妆品)</view>
  104 + <view class="pdt10 fs24">福建泉州市田安北路明鑫花苑110号</view>
  105 + <view class="tel pdt10">
  106 + <text class="iconfont icon-tel"></text>
  107 + <text class="text-underline">1380000000</text>
  108 + </view>
  109 + </view>
  110 + </view> -->
  111 + </view>
  112 + </view>
  113 + <!-- 二维码 -->
  114 + <!-- <view class="qrcode-container">
  115 + <image src="../../../images/luckDraw/badge.png" class="qrcode"></image>
  116 + <view class="pdt20 fs24 c-7b">
  117 + <view>长按二维码关注我们订阅更多优惠</view>
  118 + <view>信息更多优惠等你来拿哦</view>
  119 + </view>
  120 + </view> -->
  121 + <!-- 技术支持 -->
  122 + <view class="t-c">
  123 + <!-- <view class="pdt20 fs26 text-underline">帮美店免费开通这个玩法</view> -->
  124 + <view class="flex ai_c fs24 jc-center pdv20 white"><image src="{{imghost + 'miniapp/images/luckDraw/logo.png'}}" class="logo" lazy-load></image>提供技术支持</view>
  125 + </view>
  126 +</view>
  127 +
  128 +<!-- 悬浮按钮 -->
  129 +<view class="gift-container {{record && record.length != 0 ? 'active':''}}" bindtap="showPopup"><text class="iconfont icon-liwu"></text></view>
  130 +
  131 +<!-- 弹窗 -->
  132 +<view class="popup-container" wx:if="{{showPopup}}">
  133 + <scroll-view class="popup-list" scroll-y bindscrolltolower="loadmore">
  134 + <view class="popup-item" wx:for="{{list.pageData}}">
  135 + <view class="img-container">
  136 + <image wx:if="{{item.luck_goods_img}}" src="{{item.luck_goods_img}}" class="img" mode="aspectFit"></image>
  137 + <image wx:else src="{{imghost + tool.showDefaultImg(item.luck_type)}}" class="img" mode="aspectFit"></image>
  138 + </view>
  139 + <view class="flex fdc f1">
  140 + <view class="ellipsis-2">{{item.luck_name}}</view>
  141 + <view class="pdt20">
  142 + <view class="fs26 xc-black3">价值:<text class="rmb">{{item.luck_goods_price}}</text></view>
  143 + <view class="flex ai_c jc_sb fs26 xc-black3 ">
  144 + <view style="visibility: {{item.luck_type == 5 ? 'visible':'hidden'}};">兑换状态:{{item.state == 0 ? '未兑换':'已兑换'}}</view>
  145 + <view class="btn" bindtap="{{item.luck_type == 5 ? (item.state == 0 ? 'showQr':''):'goto'}}" data-type="{{item.luck_type}}" data-id="{{item.id}}">{{((item.luck_type == 5)&&(item.state == 1)) ? '已兑换':'兑换'}}</view>
  146 + </view>
  147 + </view>
  148 + </view>
  149 + </view>
  150 + <nodata nodataContainer="t-c" wx:if="{{list.pageData.length == 0}}"></nodata>
  151 + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">—— 已经到底了 ——</view>
  152 + </scroll-view>
  153 + <view class="close-container" bindtap="closePopup"><text class="iconfont icon-close"></text></view>
  154 +</view>
  155 +
  156 +
  157 +<view class="popup-container2" wx:if="{{showResult}}">
  158 + <view class="t-r"><text class="iconfont icon-close white" bindtap="closeResult"></text></view>
  159 + <view class="popup">
  160 + <view class="t-c">
  161 + <block wx:if="{{resultTitle == '谢谢参与'}}">
  162 + <view class="bold c-tb fs40">{{resultTitle}}</view>
  163 + <view class="pdt10">继续加油噢~</view>
  164 + </block>
  165 + <block wx:else>
  166 + <view class="bold c-tb fs40">恭喜你获得</view>
  167 + <view class="pdt10">{{resultTitle}} </view>
  168 + </block>
  169 + </view>
  170 + <view class="img-container2"><image src="{{imghost + 'miniapp/images/luckDraw/gift.png'}}" class="img"></image></view>
  171 + <view class="pdt40" wx:if="{{currentLbtype == 5}}">
  172 + <view class="btn btn2" bindtap="clickReceive">立即领取</view>
  173 + </view>
  174 + <!-- <view class="note">注:未领取就关闭弹窗视为主动放弃奖品。</view> -->
  175 + </view>
  176 +</view>
  177 +
  178 +
  179 +<!-- 遮罩层 -->
  180 +<view class="mask" wx:if="{{showMask}}"></view>
  181 +
  182 +<qrcode id="qrcode" bind:close="closeQr"></qrcode>
0 183 \ No newline at end of file
... ...
packageB/pages/luckactivity/luckinfo/luckinfo.wxss 0 → 100644
  1 +/* packageB//pages/luckactivity/index/index.wxss */
  2 +
  3 +page {
  4 + /* background-color: rgb(129, 2, 253); */
  5 +}
  6 +
  7 +page,
  8 +.luck-container {
  9 + /* height: 100%; */
  10 +}
  11 +
  12 +
  13 +
  14 +.luck-container {
  15 + background-size: 100% auto !important;
  16 + padding: 50% 20rpx 0;
  17 +}
  18 +
  19 +.weel-container {
  20 + padding-bottom: 80rpx;
  21 +}
  22 +
  23 +.badge {
  24 + display: block;
  25 + width: 362rpx;
  26 + height: 57rpx;
  27 + margin: 30rpx auto;
  28 + position: relative;
  29 + font-size: 26rpx;
  30 + color: white;
  31 +}
  32 +
  33 +.badge::before {
  34 + position: absolute;
  35 + top: 50%;
  36 + left: 50%;
  37 + transform: translate(-50%, -50%);
  38 +}
  39 +
  40 +.badge.prizes::before {
  41 + content: '奖品展示';
  42 +}
  43 +
  44 +.badge.activity::before {
  45 + content: '活动展示';
  46 +}
  47 +
  48 +.prize-container {
  49 + width: 62rpx;
  50 + height: 64rpx;
  51 + border: 2rpx solid #eeedf0;
  52 +}
  53 +
  54 +.list {
  55 + /* padding: 0 20rpx; */
  56 +}
  57 +
  58 +.list-item {
  59 + display: flex;
  60 + padding: 20rpx;
  61 +}
  62 +
  63 +.list-item ~ .list-item {
  64 + border-top: 2rpx solid #ebedf0;
  65 +}
  66 +
  67 +.img-container {
  68 + width: 140rpx;
  69 + height: 140rpx;
  70 + margin-right: 20rpx;
  71 + /* background-color: gray; */
  72 +}
  73 +
  74 +.img {
  75 + display: block;
  76 + width: 100%;
  77 + height: 100%;
  78 +}
  79 +
  80 +.item-r {
  81 + display: flex;
  82 + flex-direction: column;
  83 + justify-content: space-between;
  84 + flex: 1;
  85 +}
  86 +
  87 +.tel {
  88 + display: flex;
  89 + align-items: center;
  90 + color: #00a0e0;
  91 + font-size: 28rpx;
  92 +}
  93 +.icon-tel {
  94 + font-size: 28rpx;
  95 + margin-right: 6rpx;
  96 +}
  97 +
  98 +.qrcode-container {
  99 + background-color: white;
  100 + border-radius: 12rpx;
  101 + margin-top: 40rpx;
  102 + padding: 20rpx;
  103 + text-align: center;
  104 + /* display: block;
  105 + width: 100%;
  106 + height: 100%; */
  107 +}
  108 +
  109 +.qrcode {
  110 + width: 200rpx;
  111 + height: 200rpx;
  112 + background-color: gray;
  113 +}
  114 +
  115 +.logo {
  116 + width: 120rpx;
  117 + height: 40rpx;
  118 + margin-right: 10rpx;
  119 +}
  120 +
  121 +.gift-container {
  122 + background-color: rgba(44, 44, 44, 0.2);
  123 + width: 100rpx;
  124 + height: 100rpx;
  125 + border-radius: 50%;
  126 + color: white;
  127 + position: fixed;
  128 + right: 20rpx;
  129 + bottom: 20rpx;
  130 + display: flex;
  131 + justify-content: center;
  132 + align-items: center;
  133 + z-index: 1;
  134 +}
  135 +
  136 +.gift-container.active::after {
  137 + content: '';
  138 + position: absolute;
  139 + width: 14rpx;
  140 + height: 14rpx;
  141 + background-color: #f74c31;
  142 + border: 2rpx solid #fff;
  143 + border-radius: 50%;
  144 + top: 6rpx;
  145 + right: 10rpx;
  146 +}
  147 +
  148 +.icon-liwu {
  149 + font-size: 40rpx;
  150 +}
  151 +
  152 +
  153 +
  154 +
  155 +.tip-to-down {
  156 + position: relative;
  157 + /* display: block;
  158 + text-align: center;
  159 + margin: auto;
  160 + margin-top: .4rem;
  161 + width: 6rem;
  162 + z-index: 2;
  163 + -webkit-transform: translate(0, -50%); */
  164 + transform: translate(0, -50%);
  165 + /* color: #fff;
  166 + font: normal 400 20px/1 'Josefin Sans', sans-serif;
  167 + letter-spacing: .1em;
  168 + text-decoration: none;
  169 + -webkit-transition: opacity .3s; */
  170 + transition: opacity .3s;
  171 +}
  172 +.tip-to-down text {
  173 + position: absolute;
  174 + top: 0;
  175 + left: 50%;
  176 + width: 1rem;
  177 + height: 1rem;
  178 + margin-left: -12px;
  179 + border-left: 1px solid #fff;
  180 + border-bottom: 1px solid #fff;
  181 + -webkit-transform: rotate(-45deg);
  182 + transform: rotate(-45deg);
  183 + -webkit-animation: sdb07 2s infinite;
  184 + animation: sdb07 2s infinite;
  185 + opacity: 0;
  186 + box-sizing: border-box;
  187 +}
  188 +.tip-to-down text:nth-of-type(1) {
  189 + -webkit-animation-delay: 0s;
  190 + animation-delay: 0s;
  191 +}
  192 +.tip-to-down text:nth-of-type(2) {
  193 + top: 16px;
  194 + -webkit-animation-delay: .15s;
  195 + animation-delay: .15s;
  196 +}
  197 +
  198 +@-webkit-keyframes sdb07 {
  199 + 0% {
  200 + opacity: 0;
  201 + }
  202 + 50% {
  203 + opacity: 1;
  204 + }
  205 + 100% {
  206 + opacity: 0;
  207 + }
  208 +}
  209 +@keyframes sdb07 {
  210 + 0% {
  211 + opacity: 0;
  212 + }
  213 + 50% {
  214 + opacity: 1;
  215 + }
  216 + 100% {
  217 + opacity: 0;
  218 + }
  219 +}
  220 +
  221 +
  222 +.popup-container {
  223 + position: fixed;
  224 + width: 100%;
  225 + bottom: 0;
  226 + background-color: white;
  227 + z-index: 1;
  228 + padding: 0 20rpx;
  229 + box-sizing: border-box;
  230 + z-index: 998;
  231 +}
  232 +
  233 +.popup-container .img-container {
  234 + width: 140rpx;
  235 + height: 140rpx;
  236 + flex-shrink: 0;
  237 +}
  238 +
  239 +.popup-list {
  240 + max-height: 79vh;
  241 + overflow: auto;
  242 +}
  243 +
  244 +.popup-item {
  245 + padding: 20rpx 0;
  246 + display: flex;
  247 + align-items: center;
  248 + /* flex: 1; */
  249 +}
  250 +
  251 +.popup-item ~ .popup-item {
  252 + border-top: 2rpx solid #ebedf0;
  253 +}
  254 +
  255 +.rmb::before {
  256 + content: '¥';
  257 + font-size: 24rpx;
  258 +}
  259 +
  260 +.btn {
  261 + color: #ff2d4b;
  262 + border: 2rpx solid #ff2d4b;
  263 + border-radius: 8rpx;
  264 + padding: 6rpx 20rpx;
  265 +}
  266 +
  267 +.btn2 {
  268 + font-size: 26rpx;
  269 + color: white;
  270 + background-color: #ff2d4b;
  271 + padding: 20rpx 40rpx;
  272 + text-align: center;
  273 +}
  274 +
  275 +.close-container {
  276 + color: white;
  277 + position: absolute;
  278 + right: 20rpx;
  279 + top: -80rpx;
  280 +}
  281 +.icon-close {
  282 + font-size: 40rpx;
  283 +}
  284 +
  285 +.close-container::after {
  286 + content: '';
  287 + position: absolute;
  288 + width: 2rpx;
  289 + height: 40rpx;
  290 + background-color: white;
  291 + left: 50%;
  292 + top: 42rpx;
  293 + transform: translateX(-50%);
  294 +}
  295 +
  296 +
  297 +
  298 +
  299 +
  300 +
  301 +
  302 +.br12 {
  303 + border-radius: 12rpx;
  304 +}
  305 +
  306 +.text-underline {
  307 + text-decoration:underline;
  308 +}
  309 +
  310 +.txt-red {
  311 + color: #ff2d4b;
  312 +}
  313 +
  314 +.bdb {
  315 + border-bottom: 2rpx solid #ebedf0;
  316 +}
  317 +
  318 +.c-yellow {
  319 + color: yellow;
  320 +}
  321 +
  322 +
  323 +
  324 +
  325 +.mask {
  326 + position: fixed;
  327 + width: 100%;
  328 + height: 100%;
  329 + top: 0;
  330 + background-color: rgba(0,0,0,.5);
  331 + z-index: 1;
  332 +}
  333 +
  334 +
  335 +.popup-container2 {
  336 + position: fixed;
  337 + top: 50%;
  338 + left: 50%;
  339 + transform: translate(-50%, -50%);
  340 + z-index: 999;
  341 + width: 85%;
  342 +}
  343 +
  344 +.popup {
  345 + background-color: white;
  346 + border-radius: 12rpx;
  347 + padding: 60rpx;
  348 + margin-top: 20rpx;
  349 +}
  350 +
  351 +.block {
  352 + display: block;
  353 +}
  354 +
  355 +.img-container2 {
  356 + width: 300rpx;
  357 + height: 200rpx;
  358 + margin: 60rpx auto 0;
  359 +}
  360 +
  361 +.note {
  362 + font-size: 24rpx;
  363 + white-space: nowrap;
  364 + color: #7b7b7b;
  365 +}
  366 +
  367 +.c-tb {
  368 + color: #ff6200;
  369 +}
  370 +
  371 +.noMore {
  372 + padding: 20rpx;
  373 + color: #bbb;
  374 + text-align: center;
  375 + font-size: 22rpx;
  376 +}
  377 +
  378 +.my-qrcode {
  379 + /* background-color: red; */
  380 +}
  381 +
  382 +.swiper-container {
  383 + position: absolute;
  384 + top: 0;
  385 + left: 0;
  386 + padding: 20rpx 10rpx;
  387 + width: 100%;
  388 + box-sizing: border-box;
  389 +}
  390 +
  391 +.swiper {
  392 + height: 60rpx;
  393 + color: white;
  394 + font-size: 26rpx;
  395 +}
  396 +
  397 +.swiper-item {
  398 + /* width: auto !important;
  399 + background-color: rgba(0,0,0,.4);
  400 + border-radius: 60rpx; */
  401 + position: relative;
  402 +}
  403 +
  404 +.item {
  405 + position: absolute;
  406 + display: flex;
  407 + align-items: center;
  408 + border-radius: 60rpx;
  409 + background-color: rgba(0,0,0,.4);
  410 +}
  411 +
  412 +.avatar-container {
  413 + width: 60rpx;
  414 + height: 60rpx;
  415 + border-radius: 50%;
  416 + overflow: hidden;
  417 + flex-shrink: 0;
  418 +}
  419 +
  420 +.img-block {
  421 + width: 100%;
  422 + height: 100%;
  423 + display: block;
  424 +}
  425 +
  426 +.nickname {
  427 + color: #FFE12F;
  428 + padding: 0 10rpx;
  429 +}
  430 +
... ...
packageB/pages/luckactivity/luckinfo/tool.wxs 0 → 100644
  1 +var tools = {
  2 + showDefaultImg: function(type) {
  3 + var src = '';
  4 + switch(type) {
  5 + case 1: { //积分
  6 + src = 'miniapp/images/luckDraw/jf.png';
  7 + break;
  8 + };
  9 + case 2: { //成长值
  10 + src = 'miniapp/images/luckDraw/czz.png';
  11 + break;
  12 + };
  13 + case 3: { //优惠券
  14 + src = 'miniapp/images/luckDraw/yhq.png';
  15 + break;
  16 + };
  17 + case 4: { //服务项目
  18 + src = 'miniapp/images/luckDraw/fw.png';
  19 + break;
  20 + };
  21 + case 5: { //赠品
  22 + src = 'miniapp/images/luckDraw/zp.png';
  23 + break;
  24 + };
  25 + case 6: { //礼包
  26 + src = 'miniapp/images/luckDraw/lb.png';
  27 + break;
  28 + };
  29 + };
  30 + return src;
  31 + },
  32 +};
  33 +
  34 +module.exports = {
  35 + showDefaultImg: tools.showDefaultImg,
  36 +}
0 37 \ No newline at end of file
... ...
pages/cart/cart/cart.wxml
... ... @@ -114,7 +114,7 @@
114 114  
115 115 </view>
116 116 <view class="count">
117   - <view bindtap="subNum" class="sub fs28" data-pitems="{{pidx}}" data-item="{{idx}}">一</view>
  117 + <view bindtap="{{items.goods_num <= 1 ? '':'subNum'}}" class="sub fs28 {{items.goods_num <= 1 ? 'active':''}}" data-pitems="{{pidx}}" data-item="{{idx}}">一</view>
118 118 <input class="goodadd" bindblur="valueToNum" data-pitems="{{pidx}}" data-item="{{idx}}"
119 119 bindinput="refresh_input"
120 120 type="number" value="{{items.goods_num}}"></input>
... ...
pages/cart/cart/cart.wxss
... ... @@ -104,7 +104,7 @@ radio {
104 104 .count {
105 105 display: flex;
106 106 bottom: 5rpx;
107   - border: 2rpx solid rgb(236, 236, 236);
  107 + /* border: 2rpx solid rgb(236, 236, 236); */
108 108 margin-bottom: 3rpx;
109 109 }
110 110  
... ... @@ -129,12 +129,23 @@ radio {
129 129 font-size: 32rpx;
130 130 }
131 131  
132   -.sub {
133   - border-right: 2rpx solid rgb(236, 236, 236);
  132 +.sub, .add, .count>input {
  133 + /* border-right: 1px solid #000; */
  134 + background-color: #f8f8f8;
  135 + border-radius: 8rpx;
  136 +}
  137 +.sub.active {
  138 + /* background-color: #ddd; */
  139 + color: #ccc;
  140 +}
  141 +.count>input {
  142 + margin: 0 10rpx;
  143 + line-height: normal;
134 144 }
135 145  
136 146 .add {
137   - border-left: 2rpx solid rgb(236, 236, 236);
  147 + /* background-color: #f8f8f8; */
  148 + /* border-left: 1px solid #000; */
138 149 }
139 150  
140 151 .pay-for {
... ... @@ -362,3 +373,8 @@ page {
362 373 padding: 0;
363 374 vertical-align: top;
364 375 }
  376 +
  377 +.sub.active {
  378 + /* background-color: #ddd; */
  379 + color: #ccc;
  380 +}
... ...
pages/cart/cart2/c_filter.wxs
1 1 var filters = {
2 2 toFix:function(val,count){
  3 + if(!val) return parseFloat(0).toFixed(count);
3 4 return val.toFixed(count)
4 5 },
5 6 format_time:function(ts,isFull) {
... ...
pages/cart/cart2/cart2.js
... ... @@ -108,14 +108,17 @@ Page({
108 108 order_prom_list_cart:null,
109 109  
110 110 ispt_goods:0, //是否平摊至单品,0要平摊 1不平摊
111   - rank_switch:0, //是不是开同等级卡
112   - show_card:null, //显示的等级卡
113   - card_name:'', //显示的卡的名称
114   - card_cut_price:null,//减价多少钱
115   -
116   - show_submit:0, //提交按钮变正常显示
117   - is_get_offline:1,
  111 +
  112 + rank_switch:0, //是不是开同等级卡
  113 + show_card:null, //显示的等级卡
  114 + card_name:'', //显示的卡的名称
  115 + card_cut_price:null,//减价多少钱
  116 +
  117 + show_submit:0, //提交按钮变正常显示
  118 + is_get_offline:1,
118 119  
  120 + tabs: ['门店自提','快递邮寄'],
  121 + currentTabIndex: 1,
119 122 },
120 123 onLoad: function(t) {
121 124 wx.setNavigationBarTitle({ title: "填写订单",})
... ... @@ -223,8 +226,10 @@ Page({
223 226 getApp().getConfig2(function (ee) {
224 227 var json_d = JSON.parse(ee.switch_list);
225 228 th.data.json_d=json_d;
226   - th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
227   - th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
  229 + th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
  230 + var is_default_logistics=json_d.is_default_logistics;
  231 +
  232 + th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch,is_default_logistics:is_default_logistics});
228 233  
229 234 var rank_switch=json_d.rank_switch;
230 235 var max_price=-1;
... ... @@ -276,8 +281,15 @@ Page({
276 281 //-------------------获取物流---------------
277 282 get_wuliu(func) {
278 283 var th = this;
279   - to.getwuliu(function (e) {
280   - th.setData({ wu_arr: e })
  284 + to.getwuliu(function (e) {
  285 + //系统是是否开启了默认的物流
  286 + if(th.data.is_default_logistics){
  287 + //如果第一个不是开启默认,说明要让用户自己选
  288 + if(!e[0].is_default){
  289 + th.setData({is_default_logistics:0});
  290 + }
  291 + }
  292 + th.setData({ wu_arr: e })
281 293 typeof func == "function" && func();
282 294 })
283 295 },
... ... @@ -489,9 +501,9 @@ Page({
489 501  
490 502 var narr = new Array(); narr.push(item);
491 503  
492   - //-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号-----------------
  504 + //-----------拼装购物车结算的数组,如果有默认物流时要用默认物流编号,计算默认的物流,不管是不是自提都算一下-----------------
493 505 var m_wind=0,def_exp_code=getApp().globalData.userInfo.def_exp_code;
494   - if(e_t==0 && def_exp_code){
  506 + if(def_exp_code){
495 507 for(var k=0;k<th.data.wu_arr.length;k++){
496 508 var item=th.data.wu_arr[k]; if(def_exp_code==item.code){ m_wind=k; }
497 509 }
... ... @@ -571,6 +583,8 @@ Page({
571 583 a.get("/api/weshop/goods/get/" + oo.stoid+"/"+e, {
572 584 success:async function (t) {
573 585 var gd = t.data.data;
  586 + if(!gd) return false;
  587 +
574 588 t.data.data.original_img = oo.imghost + t.data.data.original_img;
575 589 t.data.data['buynum'] = gg.goods_num;
576 590 var distr_t=0,et=0
... ... @@ -734,7 +748,13 @@ Page({
734 748 distr_t=dis_t;
735 749 }
736 750 }
737   -
  751 +
  752 + //自选的时候,系统配置了默认的配送方式是物流的时候
  753 + if(distr_t==0 && th.data.json_d.pickupway && th.data.json_d.pickupway==1 ){
  754 + et=0;
  755 + }
  756 +
  757 +
738 758 var ie = {
739 759 pickup_id: gg.pick_id, pname: gg.pick_name, goods: narr, exp_type: et, wind: m_wind, distr_t: distr_t,bn_t_exp_t: distr_t,
740 760 goods_price: 0, shipping_price: 0, user_money: 0, total_amount: 0, order_amount: 0, user_note:0};
... ... @@ -1624,6 +1644,10 @@ Page({
1624 1644  
1625 1645 total_m= parseFloat( total_m)+ parseFloat( th.data.formData.shipping_price);
1626 1646 order_m = parseFloat(order_m)+ parseFloat( th.data.formData.shipping_price);
  1647 +
  1648 + total_m=total_m.toFixed(2);
  1649 + order_m=order_m.toFixed(2);
  1650 +
1627 1651 var atxt= "formData.total_amount";
1628 1652 th.setData({ [atxt]: total_m, })
1629 1653  
... ... @@ -1634,10 +1658,10 @@ Page({
1634 1658 //--------------如果使用余额---------------------
1635 1659 if (th.data.bn_use_money == 1) {
1636 1660 if (amoney> order_m) {
1637   - order_m = order_m.toFixed(2);
  1661 + order_m = parseFloat(order_m).toFixed(2);
1638 1662 th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 })
1639 1663 }else{
1640   - order_m =parseFloat(order_m - amoney);
  1664 + order_m =parseFloat(order_m) - parseFloat(amoney);
1641 1665 order_m = order_m.toFixed(2);
1642 1666 th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 })
1643 1667 }
... ... @@ -1672,6 +1696,10 @@ Page({
1672 1696 total_m= parseFloat( total_m)+ parseFloat( th.data.formData.shipping_price);
1673 1697 order_m = parseFloat(order_m)+ parseFloat( th.data.formData.shipping_price);
1674 1698 var atxt= "formData.total_amount";
  1699 +
  1700 + total_m=total_m.toFixed(2);
  1701 + order_m=order_m.toFixed(2);
  1702 +
1675 1703 th.setData({ [atxt]: total_m, })
1676 1704  
1677 1705 var txt = "formData.user_money";
... ... @@ -1681,10 +1709,10 @@ Page({
1681 1709 //--------------如果使用余额---------------------
1682 1710 if (th.data.bn_use_money == 1) {
1683 1711 if (amoney> order_m) {
1684   - order_m = order_m.toFixed(2);
  1712 + order_m = parseFloat(order_m).toFixed(2);
1685 1713 th.setData({ [txt]: order_m, [txt2]:0,[txt3]:coupon_price,show_submit:1 })
1686 1714 }else{
1687   - order_m =parseFloat(order_m - amoney);
  1715 + order_m =parseFloat(order_m) - parseFloat(amoney);
1688 1716 order_m = order_m.toFixed(2);
1689 1717 th.setData({ [txt]: amoney, [txt2]: order_m,[txt3]:coupon_price,show_submit:1 })
1690 1718 }
... ... @@ -1868,7 +1896,10 @@ Page({
1868 1896  
1869 1897 //积分购,先要带is_integral_normal=1
1870 1898 if(gg.is_integral_normal) goods.is_integral_normal=1;
1871   -
  1899 +
  1900 + //先要带is_pd_normal=1
  1901 + if(gg.is_pd_normal) goods.is_pd_normal=1;
  1902 +
1872 1903 //如果不立即购买或者秒杀,如果是线下库存购买的时候
1873 1904 if(goods.prom_type!=1 && goods.prom_type!=6 && th.data.sales_rules==2){
1874 1905 var isok=1;
... ... @@ -3423,7 +3454,9 @@ Page({
3423 3454 //是不是线下
3424 3455 var is_get_offline=item.is_offline;
3425 3456 this.setData({pop_offline_index:index,is_offline_show:1,show_off_price:off_price.toFixed(2),is_get_offline:is_get_offline});
3426   - }
  3457 + },
  3458 +
  3459 +
3427 3460  
3428 3461  
3429 3462  
... ...
pages/cart/cart2/cart2.wxml
... ... @@ -4,18 +4,52 @@
4 4  
5 5 <form bindsubmit="submitForm">
6 6 <view class="container">
  7 +
  8 + <!-- 立即购买的时候 -->
  9 + <block wx:if="{{is_b_now==1}}">
  10 + <view class="tab-container">
  11 + <view class="tab-wrapper">
  12 + <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"
  13 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view>
  14 +
  15 + <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}"
  16 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
  17 +
  18 + </view>
  19 + </view>
  20 + </block>
  21 + <!-- 购物购买只有一单的时候 -->
  22 + <block wx:if="{{is_b_now==0 && cartlist.length==1}}">
  23 + <view class="tab-container">
  24 + <view class="tab-wrapper">
  25 + <view hidden="{{cartlist[0].distr_t==2}}" bindtap='setexptype_w' data-ind="0" data-t='1' class="tab {{cartlist[0].exp_type == 1? 'active':''}}"
  26 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view>
  27 +
  28 + <view hidden="{{cartlist[0].distr_t==1}}" bindtap='setexptype_w' data-ind="0" data-t='0' class="tab {{cartlist[0].exp_type== 0 ? 'active':''}}"
  29 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
  30 +
  31 + </view>
  32 + </view>
  33 + </block>
  34 +
  35 +
7 36 <!--要进行判断地址是否显示---->
8 37 <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'>
9 38 <!---默认地址显示------>
10 39 <block wx:if="{{user_addr!=null}}">
11 40  
12 41 <view class="user-contact">
13   - <text>收货人:</text>{{user_addr.consignee}}{{'  '}}{{user_addr.mobile}}</view>
  42 + <text class="bold fs36 pdr20">{{user_addr.consignee}}</text>
  43 + <text class="fs28">{{user_addr.mobile}}</text>
  44 + </view>
14 45 <view class="location">
15   - <view class="address">{{user_addr.more_address}}{{' '}}{{user_addr.address}}</view>
16   - <view class="pos-icon">
17   - <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image>
  46 + <view class="address fs26 pdt20">
  47 + <view class="pos-icon">
  48 + <image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/goodscategory/new_position.png"></image>
  49 + </view>
  50 + {{user_addr.more_address}}{{' '}}{{user_addr.address}}
18 51 </view>
  52 +
19 53 </view>
20 54 <view class="update-logistics">
21 55 <!-- <image class="arrow-rigth" src="{{imgUrl}}/miniapp/images/new_position.png"></image> -->
... ... @@ -33,7 +67,7 @@
33 67 </view> -->
34 68 </view>
35 69  
36   - <!---------------------购物车进来,有可能多单---------------------->
  70 + <!-- -------------------购物车进来,有可能多单-------------------- -->
37 71 <block wx:if="{{is_b_now==0}}">
38 72 <!-- <view class="xc-border main-top"></view> -->
39 73 <view wx:for="{{cartlist}}" wx:for-index="pidx">
... ... @@ -112,13 +146,14 @@
112 146 <icon color="#f23030" size="16" type="info"></icon>
113 147 {{order.store_prom}}
114 148 </view>
115   - <view class="use-item flex-space-between">
116   - <view class="flex-vertical">
117   - <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};">
  149 +
  150 + <!-- 当是物流很多单的时候 -->
  151 + <view class="use-item flex-space-between" wx:if="{{cartlist.length>1}}">
  152 + <view class="flex-vertical" >
  153 + <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type'
  154 + style="padding-right:26rpx;display:{{item.distr_t==2?'none':'flex;align-items: center'}};">
118 155 <!-- <icon bindtap='setexptype_w' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==1?'red':'gray'}}" size="16" type="success"></icon> -->
119   -
120   -
121   -
  156 +
122 157 <block wx:if="{{item.exp_type==1}}">
123 158 <!-- <view class="circle white xc-hookt fs20 red-b sn"><text>Γ</text></view> -->
124 159 <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>
... ... @@ -128,7 +163,7 @@
128 163 </block>
129 164 <view bindtap='setexptype_w' data-ind="{{pidx}}" data-t='1' data-txt='cartlist[{{pidx}}].exp_type' class="yu_er">门店自提</view>
130 165 </view>
131   -
  166 +
132 167 <view data-t='0' data-txt='cartlist[{{pidx}}].exp_type' data-ind="{{pidx}}" bindtap="setexptype_w" style="display:{{item.distr_t==1?'none':'flex;align-items: center'}};">
133 168 <!-- <icon bindtap='setexptype_w' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="{{item.exp_type==0?'red':'gray'}}" size="16" type="success"></icon> -->
134 169 <block wx:if="{{item.exp_type==0}}">
... ... @@ -138,26 +173,35 @@
138 173 <block wx:else>
139 174 <view class="circle xc-hookts on"></view>
140 175 </block>
141   -
  176 +
142 177 <view bindtap='setexptype_w' data-t='0' data-ind="{{pidx}}" data-txt='cartlist[{{pidx}}].exp_type' data-wl_txt='cartlist[{{pidx}}].wind'
143 178 class="yu_er">快递邮寄</view>
144 179 </view>
145 180 </view>
146   - <block wx:if="{{item.exp_type==0}}">
147   - <!-- 点击显示物流选择 -->
  181 +
  182 +
  183 + <!-- 点击显示物流选择,如果是默认使用的情况不成立 -->
  184 + <view wx:if="{{!is_default_logistics && item.exp_type!=1}}" class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;">
  185 + <view>{{wu_arr[item.wind].name}}</view>
  186 + <view class="xc-right"></view>
  187 + </view>
  188 +
  189 + </view>
  190 +
  191 + <!-- 当是物流,只有一单的时候 -->
  192 + <block wx:else >
  193 + <view class="use-item flex-space-between" wx:if="{{item.exp_type==0 && !is_default_logistics}}">
  194 + <view class="flex jc_sb" style="width: 100%; padding: 0 13rpx;">
  195 + <view>选择物流</view>
148 196 <view class="flex-vertical" bindtap="show_wu_arr" data-txt='cartlist[{{pidx}}].wind' data-w_sele_index="{{pidx}}" style="padding-right:6rpx;">
149 197 <view>{{wu_arr[item.wind].name}}</view>
150 198 <view class="xc-right"></view>
151 199 </view>
152   - </block>
153   - </view>
154   -
155   - <!-- <view bindtap="express_name" class="use-item" hidden='{{item.exp_type==1}}'>
156   - <view>选择物流:</view> -->
157   - <!-- <picker bindchange="bindPickerChange_w" data-txt='cartlist[{{pidx}}].wind' value="{{item.wind}}" range="{{wu_arr}}" range-key="name">
158   - <view >{{wu_arr[item.wind].name}}</view>
159   - </picker> -->
160   - <!-- </view> -->
  200 + </view>
  201 + </view>
  202 + </block>
  203 +
  204 +
161 205 </view>
162 206  
163 207 <!-- 留言 -->
... ... @@ -188,7 +232,7 @@
188 232  
189 233 </view>
190 234  
191   - <!-----使用余额------>
  235 + <!-- ---使用余额---- -->
192 236 <view class="set-mes bdr_t-14" wx:if="{{yuer>0}}">
193 237 <view class="use-item" bindtap='set_js_useyuer'>
194 238 <icon color="{{js_use_money?'red':'gray'}}" size="16" type="success"></icon>
... ... @@ -198,7 +242,7 @@
198 242  
199 243 </block>
200 244  
201   - <!------立即购买-------->
  245 + <!-- ----立即购买------ -->
202 246 <!-- <view class="xc-border xc-border"></view> -->
203 247 <block wx:if="{{is_b_now==1}}">
204 248 <view class="use-item bfff bdr_t-14 mgt20">
... ... @@ -224,7 +268,7 @@
224 268 </view>
225 269 </view>
226 270  
227   - <!-----商品名称规格------>
  271 + <!-- ---商品名称规格---- -->
228 272 <view class="order-num flex-space-between">
229 273 <view class="co-red">¥<text class="fs36">{{filters.toFix(bn_goods.shop_price,2)}}</text></view>
230 274 <view class="goods-num">x{{bn_goods.buynum}}</view>
... ... @@ -247,7 +291,7 @@
247 291 <block><text>{{filters.show_gui_ge(buy_now_gift_goods.goods_spec,buy_now_gift_goods.goods_color)}}</text></block>
248 292 </view>
249 293 </view>
250   - <!-----商品名称规格------>
  294 + <!-- ---商品名称规格---- -->
251 295 <view class="order-num flex-space-between">
252 296 <view class="co-red">¥<text class="fs36">0</text></view>
253 297 <view class="goods-num">x{{buy_now_gift_goods.buynum}}</view>
... ... @@ -270,7 +314,7 @@
270 314 <block><text>{{filters.show_gui_ge(item.goods_spec,item.goods_color)}}</text></block>
271 315 </view>
272 316 </view>
273   - <!-----商品名称规格------>
  317 + <!-- ---商品名称规格---- -->
274 318 <view class="order-num flex-space-between">
275 319 <view class="co-red">¥<text class="fs36">{{item.price}}</text></view>
276 320 <view class="goods-num">x{{item.goods_num}}</view>
... ... @@ -319,23 +363,14 @@
319 363 </view>
320 364 </view>
321 365  
322   - <view class="use-item flex-space-between">
323   - <view class="flex">
324   - <view bindtap='setexptype' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};">
325   - <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon>
326   - <view class="yu_er">门店自提</view>
327   - </view>
328   - <view bindtap='setexptype' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};">
329   - <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon>
330   - <view class="yu_er">快递邮寄</view>
331   - </view>
332   - </view>
333   - <block wx:if="{{bn_exp_type==0}}">
334   - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'>
335   - <view class="logistics-name">{{wu_arr[index].name}}</view>
336   - <view class="xc-right"></view>
  366 + <view class="xc-coupon-frame" wx:if="{{bn_exp_type==0 && !is_default_logistics}}">
  367 + <view class="flex-space-between" style="padding: 20rpx 25rpx; font-size: 30rpx;">
  368 + <view>选择物流</view>
  369 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 12rpx;">
  370 + <view class="logistics-name">{{wu_arr[index].name}}</view>
  371 + <view class="xc-right"></view>
337 372 </view>
338   - </block>
  373 + </view>
339 374 </view>
340 375 </view>
341 376 <!-- 留言 -->
... ... @@ -406,7 +441,7 @@
406 441  
407 442 <view class="btn-wrap shadow-1" wx:if="{{show_submit}}">
408 443 <view class="pay-amount">
409   - <view class="payable">应付金额:<text class="co-red">{{formData.order_amount}}</text></view>
  444 + <view class="payable">应付金额:<text class="co-red"><text class="fs24">¥</text>{{formData.order_amount}}</text></view>
410 445 <!-- <view class="co-red big"></view> -->
411 446 </view>
412 447 <button class="tips-btn" formType="submit" id="submitOrder">提交订单</button>
... ...
pages/cart/cart2/cart2.wxss
... ... @@ -20,6 +20,8 @@
20 20 }
21 21  
22 22  
  23 +
  24 +
23 25 page {
24 26 /* background-color: #FAFAFA; */
25 27 background-color: #F0F0F0;
... ... @@ -31,6 +33,32 @@ page {
31 33 /* padding-top: 28rpx; */
32 34 padding-bottom: 120rpx;
33 35 }
  36 +
  37 +.tab-container {
  38 + font-size: 28rpx;
  39 + margin-top: 20rpx;
  40 + display: flex;
  41 +}
  42 +
  43 +.tab-wrapper {
  44 + background-color: #ccc;
  45 + display: flex;
  46 + border-radius: 40rpx;
  47 + overflow: hidden;
  48 +}
  49 +
  50 +.tab {
  51 + padding: 20rpx 30rpx;
  52 +
  53 +}
  54 +
  55 +
  56 +.tab.active {
  57 + background-color: white;
  58 + border-radius: 40rpx;
  59 +}
  60 +
  61 +
34 62 .user-mes {
35 63 position: relative;
36 64 background-color: #fff;
... ... @@ -38,23 +66,25 @@ page {
38 66 color: #444;
39 67 /* margin-top: 28rpx; */
40 68 border-radius: 14rpx;
  69 + padding: 20rpx 70rpx 20rpx 20rpx;
41 70 }
42 71 .user-contact {
43   - padding: 24rpx 26rpx;
44   - font-weight: 600;
  72 + /* padding: 24rpx 26rpx;
  73 + font-weight: 600; */
45 74 }
46 75  
47 76 .location {
48 77 position: relative;
49   - padding: 0 70rpx 24rpx;
  78 + /* padding: 0 70rpx 24rpx; */
50 79 }
51 80  
52 81 .pos-icon {
53   - position: absolute;
54   - left: 28rpx;
55   - top: 6rpx;
56   - width: 30rpx;
57   - height: 36rpx;
  82 + /* position: absolute; */
  83 + /* left: 28rpx;
  84 + top: 6rpx; */
  85 + width: 20rpx;
  86 + height: 24rpx;
  87 + display: inline-block;
58 88 }
59 89  
60 90 .border-img {
... ... @@ -132,12 +162,12 @@ page {
132 162 .use-item{
133 163 display: flex;
134 164 align-items: center;
135   - height: 80rpx;
  165 + /* height: 80rpx; */
136 166 /* border-bottom: 1px solid #ddd; */
137   - font-size: 30rpx;
  167 + font-size: 26rpx;
138 168 /* width:95%;
139 169 margin:auto; */
140   - padding: 0 26rpx;
  170 + padding: 20rpx;
141 171 }
142 172 .use-item>view{
143 173 display: flex;
... ... @@ -148,9 +178,9 @@ margin:auto; */
148 178 }
149 179 .use-item .dp{
150 180 display: block;
151   - width: 50rpx;
152   - height: 50rpx;
153   - margin-left: -6rpx;
  181 + width: 40rpx;
  182 + height: 40rpx;
  183 + /* margin-left: -6rpx; */
154 184 }
155 185  
156 186 .set-item {
... ... @@ -182,11 +212,11 @@ margin:auto; */
182 212  
183 213 .coupon-mes {
184 214 /* box-sizing: border-box; */
185   - height:95rpx;
186   - padding: 0 26rpx;
  215 + /* height:95rpx; */
  216 + padding: 20rpx;
187 217 background-color: #fff;
188 218 font-size: 30rpx;
189   - color: #444;
  219 + /* color: #444; */
190 220 /* width: 100%; */
191 221 border-radius: 14rpx;
192 222 margin-top: 20rpx;
... ... @@ -225,9 +255,9 @@ margin:auto; */
225 255 .word-box {
226 256 font-size: 26rpx;
227 257 /* width: 600rpx; */
228   - padding: 10rpx;
  258 + /* padding: 10rpx;
229 259 height: 28rpx;
230   - line-height: 40rpx;
  260 + line-height: 40rpx; */
231 261 }
232 262  
233 263 .max-word {
... ... @@ -237,7 +267,7 @@ margin:auto; */
237 267 }
238 268  
239 269 .information {
240   - padding: 0 26rpx;
  270 + /* padding: 20rpx; */
241 271 background-color: #fff;
242 272 /* margin-bottom: 120rpx; */
243 273 }
... ... @@ -245,10 +275,11 @@ margin:auto; */
245 275 .information .item {
246 276 display: flex;
247 277 justify-content: space-between;
248   - height: 60rpx;
249   - line-height: 60rpx;
250   - font-size: 26rpx;
251   - color: #777;
  278 + /* height: 60rpx;
  279 + line-height: 60rpx; */
  280 + font-size: 24rpx;
  281 + /* color: #333; */
  282 + padding: 20rpx;
252 283 }
253 284  
254 285 .btn-wrap {
... ... @@ -364,12 +395,13 @@ margin:auto; */
364 395 background-color: white;
365 396 }
366 397 .xc-right{
367   - width:20rpx;
368   - height:20rpx;
  398 + width:12rpx;
  399 + height:12rpx;
369 400 border-top:2rpx solid #000;
370 401 border-right:2rpx solid #000;
371 402 transform:rotate(45deg);
372 403 display:inline-block;
  404 + margin-left: 10rpx;
373 405 }
374 406  
375 407 .xc-coupon-frame .work-frame .work{ font-size: 30rpx; line-height: 92rpx; }
... ... @@ -904,7 +936,7 @@ margin-left: 20rpx;
904 936 .plus_buy{
905 937 background-color: #fff;
906 938 margin:15rpx 0;
907   - padding: 20rpx 10rpx;
  939 + padding: 20rpx;
908 940 position: relative;
909 941 }
910 942  
... ...
pages/cart/cart2_inte/cart2_inte.js
... ... @@ -93,8 +93,9 @@ Page({
93 93 getApp().getConfig2(function (ee) {
94 94 var json_d = JSON.parse(ee.switch_list);
95 95 th.data.json_d=json_d;
96   - th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
97   - th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
  96 + th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
  97 + var is_default_logistics=json_d.is_default_logistics;
  98 + th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch,is_default_logistics:is_default_logistics});
98 99  
99 100 var rank_switch=json_d.rank_switch;
100 101 var max_price=-1;
... ... @@ -204,8 +205,14 @@ Page({
204 205 get_wuliu(func) {
205 206 var th = this;
206 207 to.getwuliu(function (e) {
207   - th.setData({ wu_arr: e })
208   - typeof func == "function" && func();
  208 + if(th.data.is_default_logistics){
  209 + //如果第一个不是开启默认,说明要让用户自己选
  210 + if(!e[0].is_default){
  211 + th.setData({is_default_logistics:0});
  212 + }
  213 + }
  214 + th.setData({ wu_arr: e })
  215 + typeof func == "function" && func();
209 216 })
210 217 },
211 218 //------获取会员信息-----先获取用户信息,在进行下一步---
... ... @@ -294,6 +301,8 @@ Page({
294 301 a.get("/api/weshop/goods/get/" + oo.stoid+"/"+e, {
295 302 success:async function (t) {
296 303 var gd = t.data.data;
  304 + if(!gd) return false;
  305 +
297 306 t.data.data.original_img = oo.imghost + t.data.data.original_img;
298 307 t.data.data['buynum'] = gg.goods_num;
299 308 var distr_t=0,et=0
... ... @@ -1030,9 +1039,10 @@ Page({
1030 1039 if (rse.data.code==0){
1031 1040 getApp().globalData.userInfo.def_exp_code=is_shipping_code;
1032 1041 th.setData({ open_express: 0 });
1033   - //----计算此时购物车的价格----
1034   - if(th.data.is_b_now==1) th.calculatePrice2();
1035   - else th.calculatePrice();
  1042 + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19--------
  1043 + //if(th.data.is_b_now==1) th.calculatePrice2();
  1044 + //else th.calculatePrice();
  1045 + th.calculatePrice2();
1036 1046 }
1037 1047 }
1038 1048 })
... ...
pages/cart/cart2_inte/cart2_inte.wxml
... ... @@ -4,6 +4,19 @@
4 4  
5 5 <form bindsubmit="submitForm">
6 6 <view class="container">
  7 +
  8 + <view class="tab-container">
  9 + <view class="tab-wrapper">
  10 + <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"
  11 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view>
  12 +
  13 + <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}"
  14 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
  15 +
  16 + </view>
  17 + </view>
  18 +
  19 +
7 20 <!--要进行判断地址是否显示---->
8 21 <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{(bn_exp_type==1 && is_b_now==1) || (is_all_zt==1 && is_b_now==0)}}'>
9 22 <!---默认地址显示------>
... ... @@ -90,24 +103,18 @@
90 103 </view>
91 104 </view>
92 105  
93   - <view class="use-item flex-space-between">
94   - <view class="flex">
95   - <view bindtap='setexptype' data-t='1' data-txt='cartlist[{{pidx}}].exp_type' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}};">
96   - <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon>
97   - <view class="yu_er">门店自提</view>
98   - </view>
99   - <view bindtap='setexptype' data-t='0' data-txt='cartlist[{{pidx}}].exp_type' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}};">
100   - <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon>
101   - <view class="yu_er">快递邮寄</view>
102   - </view>
103   - </view>
104   - <block wx:if="{{bn_exp_type==0}}">
105   - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'>
106   - <view class="logistics-name">{{wu_arr[index].name}}</view>
107   - <view class="xc-right"></view>
  106 +
  107 +
  108 + <block wx:if="{{bn_exp_type==0 && !is_default_logistics}}">
  109 + <view class="use-item flex-space-between">
  110 + <view>选择物流</view>
  111 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;">
  112 + <view class="logistics-name">{{wu_arr[index].name}}</view>
  113 + <view class="xc-right"></view>
  114 + </view>
108 115 </view>
109 116 </block>
110   - </view>
  117 +
111 118 </view>
112 119  
113 120 <view class="coupon-mes flex-vertical">
... ...
pages/cart/cart2_inte/cart2_inte.wxss
... ... @@ -252,7 +252,7 @@ margin:auto; */
252 252 }
253 253  
254 254 .btn-wrap {
255   - height: 94rpx;
  255 + height: 100rpx;
256 256 box-sizing: border-box;
257 257 display: flex;
258 258 justify-content: space-between;
... ... @@ -262,7 +262,8 @@ margin:auto; */
262 262 bottom: 0;
263 263 left: 0;
264 264 width: 100%;
265   - padding: 0 30rpx;
  265 + padding: 0 30rpx;
  266 + font-size: 30rpx;
266 267 }
267 268  
268 269 .tips-btn {
... ... @@ -958,3 +959,28 @@ margin-left: 20rpx;
958 959 top:36rpx
959 960 }
960 961  
  962 +
  963 +.tab-container {
  964 + font-size: 28rpx;
  965 + margin-top: 20rpx;
  966 + display: flex;
  967 +}
  968 +
  969 +.tab-wrapper {
  970 + background-color: #ccc;
  971 + display: flex;
  972 + border-radius: 40rpx;
  973 + overflow: hidden;
  974 +}
  975 +
  976 +.tab {
  977 + padding: 20rpx 30rpx;
  978 +
  979 +}
  980 +
  981 +
  982 +.tab.active {
  983 + background-color: white;
  984 + border-radius: 40rpx;
  985 +}
  986 +
... ...
pages/cart/cart2_pt/cart2_pt.js
... ... @@ -95,8 +95,12 @@ Page({
95 95 var th = this;
96 96 console.log("getwuliu4545");
97 97 to.getwuliu(function (e) {
98   - console.log("ws");
99   - console.log(e);
  98 + if (th.data.is_default_logistics) {
  99 + //如果第一个不是开启默认,说明要让用户自己选
  100 + if (!e[0].is_default) {
  101 + th.setData({ is_default_logistics: 0 });
  102 + }
  103 + }
100 104 th.setData({ wu_arr: e })
101 105 typeof func == "function" && func();
102 106 })
... ... @@ -165,6 +169,8 @@ Page({
165 169 a.get("/api/weshop/goods/get/" + oo.stoid+"/"+gg.goods_id, {
166 170 success: function (t) {
167 171 var gd = t.data.data;
  172 + if(!gd) return false;
  173 +
168 174 t.data.data.original_img = oo.imghost + t.data.data.original_img;
169 175 t.data.data['buynum'] = gg.goods_num;
170 176 console.log(t.data.data);
... ... @@ -277,80 +283,81 @@ Page({
277 283 },
278 284  
279 285 //----------子页返回父页触发----------
280   - onShow: function() {
281   - var th=this;
282   - if (th.data.isclose==0){
283   - wx.navigateTo({
284   - url: "/pages/index/index/index"
285   - })
286   - }else{
287   - this.getuser_addr(function(ie){
288   - //更换地址回来要重新调用计算价钱的接口
289   - th.setData({user_addr: ie });
290   - if(!th.data.user_addr || th.data.user_addr.address_id!=ie.address_id){
291   - th.setData({add_back:1});
292   - if(this.data.bn_goods) th.calculatePrice2();
293   - }
294   - })
295   - //--更新默认地址--,看一下是不是跳到地址页面
296   - if(!getApp().globalData.is_cart_old){
297   - this.update_code();
298   - }else{
299   - getApp().globalData.is_cart_old=0;
300   - }
301   - }
302   -
303   -
304   - //先获取是否有关闭使用优惠券
305   - getApp().getConfig2(function (ee) {
306   - var json_d = JSON.parse(ee.switch_list);
307   - th.data.json_d=json_d;
308   - th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
309   - th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
310   -
311   - var rank_switch=json_d.rank_switch;
312   - var max_price=-1;
313   - var show_card=null;
314   - var name="";
315   - //如果有开等级卡的时候,
316   - //因为都是调接口,要返回在计算
317   - if(rank_switch==2){
318   - //-- 获取所有的等级卡, --
319   - getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
320   - {}).then(res => {
321   - if(res.data.code==0){
322   - var plusCard = res.data.data;
323   - //-- 循环判断,拿到最贵的那张卡 --
324   - for(var ih in plusCard){
325   - if(plusCard[ih].IsStopBuy == true){ continue; }
326   - if(max_price<0){
327   - max_price=plusCard[ih].CardFee;
328   - name='card'+plusCard[ih]['CorrPrice'];
329   - show_card=plusCard[ih];
330   - }else{
331   - if(max_price<plusCard[ih].CardFee){
332   - max_price=plusCard[ih].CardFee;
333   - name='card'+plusCard[ih]['CorrPrice'];
334   - show_card=plusCard[ih];
335   - }
336   - }
337   - }
338   -
339   - if(show_card){
340   - name=name.toLowerCase();
341   - th.setData({card_name:name,show_card:show_card})
342   - }
343   - }
344   - //-----先获取物流,再获取用户信息,再展示页面-----
345   - th.get_wuliu(th.get_info(th.show_page));
346   - })
347   - }else{
348   - //-----先获取物流,再获取用户信息,再展示页面-----
349   - th.get_wuliu(th.get_info(th.show_page));
350   - }
351   - },1)
352   -
353   -
  286 + onShow: function () {
  287 + var th = this;
  288 + if (th.data.isclose == 0) {
  289 + wx.navigateTo({
  290 + url: "/pages/index/index/index"
  291 + })
  292 + } else {
  293 + this.getuser_addr(function (ie) {
  294 + //更换地址回来要重新调用计算价钱的接口
  295 + th.setData({ user_addr: ie });
  296 + if (!th.data.user_addr || th.data.user_addr.address_id != ie.address_id) {
  297 + th.setData({ add_back: 1 });
  298 + if (this.data.bn_goods) th.calculatePrice2();
  299 + }
  300 + })
  301 + //--更新默认地址--,看一下是不是跳到地址页面
  302 + if (!getApp().globalData.is_cart_old) {
  303 + this.update_code();
  304 + } else {
  305 + getApp().globalData.is_cart_old = 0;
  306 + }
  307 + }
  308 +
  309 +
  310 + //先获取是否有关闭使用优惠券
  311 + getApp().getConfig2(function (ee) {
  312 + var json_d = JSON.parse(ee.switch_list);
  313 + th.data.json_d = json_d;
  314 + th.data.ispt_goods = json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
  315 + var is_default_logistics = json_d.is_default_logistics;
  316 +
  317 + th.setData({ is_close_quan: json_d.is_close_quan, sales_rules: ee.sales_rules, rank_switch: json_d.rank_switch, is_default_logistics: is_default_logistics });
  318 +
  319 + var rank_switch = json_d.rank_switch;
  320 + var max_price = -1;
  321 + var show_card = null;
  322 + var name = "";
  323 + //如果有开等级卡的时候,
  324 + //因为都是调接口,要返回在计算
  325 + if (rank_switch == 2) {
  326 + //-- 获取所有的等级卡, --
  327 + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?storeId=" + os.stoid,
  328 + {}).then(res => {
  329 + if (res.data.code == 0) {
  330 + var plusCard = res.data.data;
  331 + //-- 循环判断,拿到最贵的那张卡 --
  332 + for (var ih in plusCard) {
  333 + if (plusCard[ih].IsStopBuy == true) { continue; }
  334 + if (max_price < 0) {
  335 + max_price = plusCard[ih].CardFee;
  336 + name = 'card' + plusCard[ih]['CorrPrice'];
  337 + show_card = plusCard[ih];
  338 + } else {
  339 + if (max_price < plusCard[ih].CardFee) {
  340 + max_price = plusCard[ih].CardFee;
  341 + name = 'card' + plusCard[ih]['CorrPrice'];
  342 + show_card = plusCard[ih];
  343 + }
  344 + }
  345 + }
  346 +
  347 + if (show_card) {
  348 + name = name.toLowerCase();
  349 + th.setData({ card_name: name, show_card: show_card })
  350 + }
  351 + }
  352 + //-----先获取物流,再获取用户信息,再展示页面-----
  353 + th.get_wuliu(th.get_info(th.show_page));
  354 + })
  355 + } else {
  356 + //-----先获取物流,再获取用户信息,再展示页面-----
  357 + th.get_wuliu(th.get_info(th.show_page));
  358 + }
  359 + }, 1)
  360 +
354 361 },
355 362 //---------------检查是否有收货地址-------------------
356 363 checkAddressList: function() {
... ... @@ -448,7 +455,7 @@ Page({
448 455 if ( parseFloat(th.data.yuer) > total_m) {
449 456 th.setData({ [txt]: total_m, [txt2]:0 })
450 457 }else{
451   - order_m = order_m - parseFloat(th.data.yuer);
  458 + order_m = parseFloat(order_m) - parseFloat(th.data.yuer);
452 459 order_m = order_m.toFixed(2);
453 460 th.setData({ [txt]: th.data.userinfo.yuer, [txt2]: order_m })
454 461 }
... ... @@ -783,6 +790,7 @@ Page({
783 790 if (item == null) return o_shipping_price;
784 791 var fw_price = 0, fp_price=0;
785 792 item=item.config;
  793 + if (item == null) return o_shipping_price;
786 794 //------按重量----------
787 795 if (goods_weight>0) {
788 796 fw_price =parseFloat(item['money']);
... ... @@ -894,9 +902,10 @@ Page({
894 902 if (rse.data.code==0){
895 903 getApp().globalData.userInfo.def_exp_code=is_shipping_code;
896 904 th.setData({ open_express: 0 });
897   - //----计算此时购物车的价格----
898   - if(th.data.is_b_now==1) th.calculatePrice2();
899   - else th.calculatePrice();
  905 + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19----
  906 + //if(th.data.is_b_now==1) th.calculatePrice2();
  907 + //else th.calculatePrice();
  908 + th.calculatePrice2();
900 909 }
901 910 }
902 911 })
... ...
pages/cart/cart2_pt/cart2_pt.wxml
1 1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
2 2 <form bindsubmit="submitForm">
3 3 <view class="container">
  4 +
  5 + <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}">
  6 + <view class="tab-wrapper">
  7 + <view hidden="{{bn_t_exp_t==2}}" bindtap='setexptype' data-t='1' class="tab {{bn_exp_type == 1? 'active':''}}"
  8 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view>
  9 +
  10 + <view hidden="{{bn_t_exp_t==1}}" bindtap='setexptype' data-t='0' class="tab {{bn_exp_type== 0 ? 'active':''}}"
  11 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
  12 +
  13 + </view>
  14 + </view>
  15 +
  16 +
4 17 <!--要进行判断地址是否显示---->
5 18 <view bindtap="enterAddressPage" class="user-mes mgt20" hidden='{{bn_exp_type==1 || kt_type==3}}'>
6 19 <!---默认地址显示------>
... ... @@ -79,35 +92,14 @@
79 92 </view>
80 93  
81 94 <!--阶梯团是不显示的-->
82   - <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}">
83   - <view class="flex-vertical">
84   - <view bindtap='setexptype' data-t='1' style="padding-right:26rpx;display:{{bn_t_exp_t==2?'none':'flex;align-items:center;'}}">
85   - <!-- <icon color="{{bn_exp_type==1?'red':'gray'}}" size="16" type="success"></icon> -->
86   - <block wx:if="{{bn_exp_type==1}}">
87   -
88   - <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>
89   - </block>
90   - <block wx:else>
91   - <view class="circle xc-hookts on"></view>
92   - </block>
93   - <view class="yu_er">门店自提</view>
94   - </view>
95   - <view class="{{bn_t_exp_t==2?'':'xc-left'}}" bindtap='setexptype' data-t='0' style="display:{{bn_t_exp_t==1?'none':'flex;align-items:center;'}}">
96   - <!-- <icon color="{{bn_exp_type==0?'red':'gray'}}" size="16" type="success"></icon> -->
97   - <block wx:if="{{bn_exp_type==0}}">
98   -
99   - <icon data-t='0' data-txt='cartlist[{{pidx}}].exp_type' color="red" size="16" type="success"></icon>
100   - </block>
101   - <block wx:else>
102   - <view class="circle xc-hookts on"></view>
103   - </block>
104   - <view class="yu_er">快递邮寄</view>
105   - </view>
106   - </view>
107   - <block wx:if="{{bn_exp_type==0}}">
108   - <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index'><view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view></view>
109   - </block>
110   - </view>
  95 + <block wx:if="{{bn_exp_type==0 && !is_default_logistics}}">
  96 + <view class="use-item flex-space-between" wx:if="{{kt_type!=3 || is_normal==1}}">
  97 + <view>选择物流</view>
  98 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;">
  99 + <view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view>
  100 + </view>
  101 + </view>
  102 + </block>
111 103  
112 104 <!--阶梯团是不显示的
113 105 <block wx:if="{{kt_type!=3 || is_normal==1 }}">
... ...
pages/cart/cart2_pt/cart2_pt.wxss
... ... @@ -957,3 +957,27 @@ margin-left: 20rpx;
957 957 top:36rpx
958 958 }
959 959  
  960 +
  961 +.tab-container {
  962 + font-size: 28rpx;
  963 + margin-top: 20rpx;
  964 + display: flex;
  965 +}
  966 +
  967 +.tab-wrapper {
  968 + background-color: #ccc;
  969 + display: flex;
  970 + border-radius: 40rpx;
  971 + overflow: hidden;
  972 +}
  973 +
  974 +.tab {
  975 + padding: 20rpx 30rpx;
  976 +
  977 +}
  978 +
  979 +
  980 +.tab.active {
  981 + background-color: white;
  982 + border-radius: 40rpx;
  983 +}
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -13,12 +13,13 @@ Page({
13 13 order: null, //订单所有字段
14 14 user_addr: null, //会员地址
15 15 pickup: null, //门店
16   - goods:null, //商品
  16 + goods: null, //商品
17 17 /*------------------------*/
18 18 userinfo: null, //获取会员
19 19 /*----------物流选择--------*/
20 20 wu_arr: null,
21 21 index: 0,
  22 + is_express:0,
22 23 //申请提现的金额
23 24 txmon: 0,
24 25 yuer: 0,
... ... @@ -33,8 +34,8 @@ Page({
33 34 exp_price: 0,
34 35 enterAddressPage: 0, //进入地址页面
35 36  
36   - allpice:0,
37   - show_pay_type:0,
  37 + allpice: 0,
  38 + show_pay_type: 0,
38 39  
39 40 teamgroup: null,
40 41 },
... ... @@ -42,11 +43,11 @@ Page({
42 43 /**
43 44 * 生命周期函数--监听页面加载
44 45 */
45   - onLoad: function(options) {
  46 + onLoad: function (options) {
46 47  
47 48 //清空is_pick_up
48 49 getApp().request.put("/api/weshop/useraddress/updatePickUp", {
49   - data: {user_id: getApp().globalData.user_id, is_pickup: 0},
  50 + data: { user_id: getApp().globalData.user_id, is_pickup: 0 },
50 51 success: function (s) {
51 52 }
52 53 });
... ... @@ -54,105 +55,111 @@ Page({
54 55 var th = this;
55 56 this.data.order_id = options.order_id;
56 57 //--初始化--
57   - getApp().getConfig2(function (e){
  58 + getApp().getConfig2(function (e) {
58 59 var json_d = JSON.parse(e.switch_list);
59   - th.data.json_d=json_d;
  60 + th.data.json_d = json_d;
  61 + var is_default_logistics = json_d.is_default_logistics;
  62 + th.setData({is_default_logistics:is_default_logistics});
  63 +
60 64 th.get_wuliu(th.get_info(th.show_page));
61   - },1)
  65 + }, 1)
62 66  
63 67 },
64 68 /**
65 69 * 生命周期函数--监听页面显示
66 70 */
67   - onShow: function() {
  71 + onShow: function () {
68 72 var th = this;
69 73 if (th.data.isclose == 0) {
70 74 wx.navigateTo({
71 75 url: "/pages/index/index/index"
72 76 })
73   - }
74   - th.getuser_addr(function(addr) {
75   - if(addr==null || addr==undefined || addr.length==0) {
76   - th.setData({ user_addr: null, enterAddressPage: 1,});
77   - }else {
  77 + }
  78 + th.getuser_addr(function (addr) {
  79 + if (addr == null || addr == undefined || addr.length == 0) {
  80 + th.setData({ user_addr: null, enterAddressPage: 1, });
  81 + } else {
78 82 th.setData({
79 83 user_addr: addr, enterAddressPage: 0,
80 84 });
81 85 }
82 86  
83   - if (th.data.exp_type == 0 && th.data.goods){
84   - th.calculate_wuliu();
85   - }
86   - })
87   -
  87 + if (th.data.exp_type == 0 && th.data.goods) {
  88 + th.calculate_wuliu();
  89 + }
  90 + })
  91 +
88 92 },
89 93 /**
90 94 * 用户点击右上角分享
91 95 */
92   - onShareAppMessage: function() {},
  96 + onShareAppMessage: function () { },
93 97 //---------------获取物流---------------
94 98 get_wuliu(func) {
95 99 var th = this,
96   - to = getApp();
97   - to.getwuliu(function(e) {
98   - th.setData({
99   - wu_arr: e
100   - })
  100 + to = getApp();
  101 + to.getwuliu(function (e) {
  102 + //如果第一个不是开启默认,说明要让用户自己选
  103 + if (!e[0].is_default) {
  104 + th.setData({ is_default_logistics: 0 });
  105 + }
  106 +
  107 + th.setData({ wu_arr: e })
101 108 typeof func == "function" && func();
102 109 })
103 110 },
104 111 //------获取会员信息-----先获取用户信息,在进行下一步---
105   - get_info: function(func) {
106   - var user_id = t.globalData.user_id,
  112 + get_info: function (func) {
  113 + var user_id = t.globalData.user_id,
107 114 to = getApp();
108   - to.auth.get_u(func);
  115 + to.auth.get_u(func);
109 116 },
110 117  
111 118 //------获取会员收货地址-----
112   - getuser_addr: function(func) {
113   - var to = getApp(),
  119 + getuser_addr: function (func) {
  120 + var to = getApp(),
114 121 a = to.request;
115 122  
116   - a.get("/api/weshop/useraddress/page", {
117   - data: {
118   - user_id: to.globalData.user_id,
119   - store_id: oo.stoid,
120   - pageSize: 600
121   - },
122   - success: function(su) {
123   - var user_addr = su.data.data.pageData;
124   - var item = null;
125   - var def_item = null;
126   - for (var i = 0; i < user_addr.length; i++) {
127   - if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; }
128   - if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; }
129   - }
130   -
131   - if (item == null) item = def_item;
132   - if (item == null) item = user_addr[0];
133   - if (item == undefined) item = null;
134   - func(item);
  123 + a.get("/api/weshop/useraddress/page", {
  124 + data: {
  125 + user_id: to.globalData.user_id,
  126 + store_id: oo.stoid,
  127 + pageSize: 600
  128 + },
  129 + success: function (su) {
  130 + var user_addr = su.data.data.pageData;
  131 + var item = null;
  132 + var def_item = null;
  133 + for (var i = 0; i < user_addr.length; i++) {
  134 + if (user_addr[i]['is_default'] == 1) { def_item = user_addr[i]; }
  135 + if (user_addr[i]['is_pickup'] == 1) { item = user_addr[i]; }
135 136 }
136   - });
137   -
  137 +
  138 + if (item == null) item = def_item;
  139 + if (item == null) item = user_addr[0];
  140 + if (item == undefined) item = null;
  141 + func(item);
  142 + }
  143 + });
  144 +
138 145 },
139 146  
140 147 //----------------展示页面,是再获取用户信息之后--------------
141   - show_page: function() {
  148 + show_page: function () {
142 149 var th = this,
143 150 to = getApp();
144 151 th.setData({
145 152 userinfo: to.globalData.userInfo,
146 153 });
147 154 //选获取地址
148   - th.getuser_addr(function(addr) {
  155 + th.getuser_addr(function (addr) {
149 156  
150   - if(addr==null || addr==undefined || addr.length==0) {
151   - th.setData({
  157 + if (addr == null || addr == undefined || addr.length == 0) {
  158 + th.setData({
152 159 enterAddressPage: 1,
153 160 });
154 161  
155   - }else {
  162 + } else {
156 163 th.setData({
157 164 user_addr: addr, enterAddressPage: 0,
158 165 });
... ... @@ -167,7 +174,7 @@ Page({
167 174 store_id: oo.stoid,
168 175 status: 0
169 176 },
170   - success: function(su) {
  177 + success: function (su) {
171 178 console.log("withdrawals");
172 179 if (su.data.code == 0) {
173 180 var yuer = parseFloat(th.data.userinfo.user_money -
... ... @@ -189,8 +196,8 @@ Page({
189 196 pickup = null,
190 197 distr_type = 0,
191 198 exp_type = 0,
192   - teamgroup=null,
193   - th=this;
  199 + teamgroup = null,
  200 + th = this;
194 201 //---获取订单---
195 202 await getApp().request.promiseGet("/api/weshop/order/get/" + oo.stoid + "/" + ord, {}).then(res => {
196 203 order = res.data.data;
... ... @@ -219,23 +226,24 @@ Page({
219 226  
220 227 //---获取尾款价格---
221 228 await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
222   - data:{store_id:oo.stoid,team_id:order.pt_prom_id,listno:order.pt_listno}
  229 + data: { store_id: oo.stoid, team_id: order.pt_prom_id, listno: order.pt_listno }
223 230 }).then(res => {
224 231 teamgroup = res.data.data.pageData[0];
225 232 });
226 233  
227   - var jsarr=JSON.parse(teamgroup.jt_json);
228   - var count=teamgroup.jt_ct_num;
  234 + var jsarr = JSON.parse(teamgroup.jt_json);
  235 + var count = teamgroup.jt_ct_num;
229 236 //要计算尾款的价钱
230   - var price=0;
231   - jsarr.forEach(function(value,index){
232   - if(count>=value['rynum']) price=value['price'];
  237 + var price = 0;
  238 + jsarr.forEach(function (value, index) {
  239 + if (count >= value['rynum']) price = value['price'];
233 240 })
234   - var tail_money =(price*order_goods.goods_num-order['order_amount']-order['user_money']).toFixed(2);
  241 + var tail_money = (price * order_goods.goods_num - order['order_amount'] - order['user_money']).toFixed(2);
235 242  
236 243 tail_money = parseFloat(tail_money);
237   - order.tail_money=tail_money;
  244 + order.tail_money = tail_money;
238 245  
  246 + if(!goods) return false;
239 247 //--判断物流--
240 248 if (goods.distr_type)
241 249 distr_type = goods.distr_type;
... ... @@ -246,7 +254,7 @@ Page({
246 254 case 0:
247 255 exp_type = 1;
248 256 //-- 系统后台有设置要默认的 --
249   - if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) exp_type=0;
  257 + if (th.data.json_d.pickupway && th.data.json_d.pickupway == 1) exp_type = 0;
250 258 break; //自选
251 259 case 1:
252 260 exp_type = 1;
... ... @@ -263,14 +271,14 @@ Page({
263 271 distr_type: distr_type,
264 272 pickup: pickup,
265 273 exp_type: exp_type,
266   - goods:goods,
267   - teamgroup:teamgroup
  274 + goods: goods,
  275 + teamgroup: teamgroup
268 276 });
269 277  
270 278 //--计算物流--
271   - if(exp_type==0){
  279 + if (exp_type == 0) {
272 280 th.calculate_wuliu();
273   - }else{
  281 + } else {
274 282 var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money;
275 283 allpice = allpice.toFixed(2);
276 284 th.setData({ exp_price: 0, allpice: allpice })
... ... @@ -278,17 +286,17 @@ Page({
278 286 },
279 287  
280 288 //--图片失败,默认图片--
281   - bind_bnerr: function(e) {
  289 + bind_bnerr: function (e) {
282 290 var _errImg = e.target.dataset.errorimg;
283 291 var _errObj = {};
284   - _errObj[_errImg] = this.data.imgUrl+ "/miniapp/images/del/logo.jpg";
  292 + _errObj[_errImg] = this.data.imgUrl + "/miniapp/images/del/logo.jpg";
285 293 this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
286 294 },
287 295  
288 296 //-------------------获取物流---------------
289 297 get_wuliu(func) {
290   - var th = this,to = getApp();
291   - to.getwuliu(function(e) {
  298 + var th = this, to = getApp();
  299 + to.getwuliu(function (e) {
292 300 th.setData({
293 301 wu_arr: e
294 302 })
... ... @@ -297,8 +305,8 @@ Page({
297 305 },
298 306  
299 307 //--------点击选择----------
300   - set_wuliu: function(e) {
301   - var type = e.currentTarget.dataset.type,th=this;
  308 + set_wuliu: function (e) {
  309 + var type = e.currentTarget.dataset.type, th = this;
302 310 this.setData({
303 311 exp_type: type
304 312 });
... ... @@ -307,12 +315,12 @@ Page({
307 315  
308 316 //--计算物流的值--
309 317 if (type == 0) {
310   - th.calculate_wuliu();
311   - }else{
312   - var allpice= parseFloat(th.data.order.order_amount)
313   - + parseFloat(th.data.order.user_money)
314   - +parseFloat(th.data.order.tail_money);
315   - allpice=allpice.toFixed(2);
  318 + th.calculate_wuliu();
  319 + } else {
  320 + var allpice = parseFloat(th.data.order.order_amount)
  321 + + parseFloat(th.data.order.user_money)
  322 + + parseFloat(th.data.order.tail_money);
  323 + allpice = allpice.toFixed(2);
316 324 this.setData({
317 325 allpice: allpice, exp_price: 0,
318 326 });
... ... @@ -320,104 +328,104 @@ Page({
320 328 },
321 329  
322 330 //关闭支付
323   - close_show_pay:function(){
324   - this.setData({show_pay_type:0});
  331 + close_show_pay: function () {
  332 + this.setData({ show_pay_type: 0 });
325 333 },
326 334 //--弹起支付框--
327   - to_pay(){
328   - //--物流支付时要有地址--
329   - if (this.data.exp_type == 0 && this.data.user_addr == null) {
330   - return getApp().my_warnning("请选择收货地址", 0, this);
331   - }
  335 + to_pay() {
  336 + //--物流支付时要有地址--
  337 + if (this.data.exp_type == 0 && this.data.user_addr == null) {
  338 + return getApp().my_warnning("请选择收货地址", 0, this);
  339 + }
332 340  
333   - this.setData({show_pay_type:1});
  341 + this.setData({ show_pay_type: 1 });
334 342 },
335 343  
336 344 //选择支付方式
337   - set_pay_type:function(e){
338   - var type=e.currentTarget.dataset.type;
339   - this.to_pay_type(type);
  345 + set_pay_type: function (e) {
  346 + var type = e.currentTarget.dataset.type;
  347 + this.to_pay_type(type);
340 348 },
341 349  
342 350 //--立即支付--
343   - to_pay_type: function(ind) {
344   - var th=this;
  351 + to_pay_type: function (ind) {
  352 + var th = this;
345 353  
346   - //--物流支付时要有地址--
347   - if (th.data.exp_type == 0 && th.data.user_addr==null){
348   - return getApp().my_warnning("请选择收货地址",0,th);
349   - }
  354 + //--物流支付时要有地址--
  355 + if (th.data.exp_type == 0 && th.data.user_addr == null) {
  356 + return getApp().my_warnning("请选择收货地址", 0, th);
  357 + }
350 358  
351   - //---支付参数--
352   - var dd = {
353   - order_sn: th.data.order.order_sn,
354   - order_id: th.data.order.order_id,
355   - store_id: oo.stoid,
356   - exp_type:th.data.exp_type,
357   - user_id:t.globalData.user_id,
358   - listno:th.data.order.pt_listno,
359   - prom_id:th.data.order.pt_prom_id,
360   - tail_pay_type:ind,//0微信支付 1余额支付
361   - };
362   -
363   - if(th.data.exp_type==0){
364   - var index=th.data.index;
365   - dd.shipping_code=th.data.wu_arr[index].code;
366   - dd.shipping_name=th.data.wu_arr[index].name;
367   - dd.shipping_price=parseFloat(th.data.exp_price);
368   - dd.addressid=th.data.user_addr.address_id;
369   - }
  359 + //---支付参数--
  360 + var dd = {
  361 + order_sn: th.data.order.order_sn,
  362 + order_id: th.data.order.order_id,
  363 + store_id: oo.stoid,
  364 + exp_type: th.data.exp_type,
  365 + user_id: t.globalData.user_id,
  366 + listno: th.data.order.pt_listno,
  367 + prom_id: th.data.order.pt_prom_id,
  368 + tail_pay_type: ind,//0微信支付 1余额支付
  369 + };
  370 +
  371 + if (th.data.exp_type == 0) {
  372 + var index = th.data.index;
  373 + dd.shipping_code = th.data.wu_arr[index].code;
  374 + dd.shipping_name = th.data.wu_arr[index].name;
  375 + dd.shipping_price = parseFloat(th.data.exp_price);
  376 + dd.addressid = th.data.user_addr.address_id;
  377 + }
370 378  
371   - var arr=[];
372   - arr.push(dd);
373   - console.log(JSON.stringify(arr));
374   - wx.request({
375   - url: oo.url + '/api/weshop/order/pay/payTuanWk',
376   - data: JSON.stringify(arr),
377   - method: 'POST',
378   - header: {
379   - 'content-type': 'application/json'
380   - },// 设置请求的 header
381   - success: function (t) {
382   -
383   - //---用微信支付---
384   - if(dd.tail_pay_type==0){
385   - var n=t.data.data;
386   - th.weixinPay(n,
387   - function () {
388   - var allmoney=th.data.allpice;
389   - th.jumpPaymentPage(th.data.order.order_sn,allmoney);
390   - },function () {
391   - getApp().my_warnning("支付失败",0,th);
  379 + var arr = [];
  380 + arr.push(dd);
  381 + console.log(JSON.stringify(arr));
  382 + wx.request({
  383 + url: oo.url + '/api/weshop/order/pay/payTuanWk',
  384 + data: JSON.stringify(arr),
  385 + method: 'POST',
  386 + header: {
  387 + 'content-type': 'application/json'
  388 + },// 设置请求的 header
  389 + success: function (t) {
  390 +
  391 + //---用微信支付---
  392 + if (dd.tail_pay_type == 0) {
  393 + var n = t.data.data;
  394 + th.weixinPay(n,
  395 + function () {
  396 + var allmoney = th.data.allpice;
  397 + th.jumpPaymentPage(th.data.order.order_sn, allmoney);
  398 + }, function () {
  399 + getApp().my_warnning("支付失败", 0, th);
  400 + })
  401 + } else {
  402 + if (t.data.code == 0) {
  403 + //---用余额支付---
  404 + getApp().my_warnning("支付成功", 1, th);
  405 + setTimeout(function () {
  406 + th.setData({ isclose: 0 });
  407 + wx.redirectTo({
  408 + url: "/pages/user/order_list/order_list"
392 409 })
393   - }else {
394   - if(t.data.code==0){
395   - //---用余额支付---
396   - getApp().my_warnning("支付成功",1,th);
397   - setTimeout(function () {
398   - th.setData({ isclose: 0 });
399   - wx.redirectTo({
400   - url: "/pages/user/order_list/order_list"
401   - })
402   - }, 1000)
403   - }else{
404   - getApp().my_warnning(t.data.msg,1,th);
405   - }
  410 + }, 1000)
  411 + } else {
  412 + getApp().my_warnning(t.data.msg, 1, th);
406 413 }
407 414 }
408   - });
  415 + }
  416 + });
409 417 },
410 418  
411 419 //----计算物流的钱----
412 420 calculate_wuliu() {
413   - var to=getApp(),th=this;
414   - to.getConfig2(function(ee) {
415   - to.getwuliuprice(function(rs) {
  421 + var to = getApp(), th = this;
  422 + to.getConfig2(function (ee) {
  423 + to.getwuliuprice(function (rs) {
416 424 var o_shipping_price = 0,
417 425 goods_weight = -1,
418 426 goods_piece = -1,
419   - good=th.data.goods;
420   - //-----------当地址不为空,且是物流时,计算物流费用----------
  427 + good = th.data.goods;
  428 + //-----------当地址不为空,且是物流时,计算物流费用----------
421 429 if (th.data.user_addr != null && th.data.exp_type == 0 && good.is_free_shipping == 0) {
422 430 switch (good['exp_sum_type']) {
423 431 case 1:
... ... @@ -435,52 +443,53 @@ Page({
435 443 goods_piece += th.data.order.order_goods['goods_num'];
436 444 break;
437 445 }
438   - var code = th.data.wu_arr[th.data.index].code;
439   - var freight_free = ee.freight_free; //全场满多少包邮
440   - //--全部金额--
441   - var allpice=th.data.order.order_amount+th.data.order.user_money+th.data.order.pt_tail_money;
442   - var shipping_price =
443   - th.calculatewuliu(code, o_shipping_price, goods_weight,
  446 + var code = th.data.wu_arr[th.data.index].code;
  447 + var freight_free = ee.freight_free; //全场满多少包邮
  448 + //--全部金额--
  449 + var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.pt_tail_money;
  450 + var shipping_price =
  451 + th.calculatewuliu(code, o_shipping_price, goods_weight,
444 452 goods_piece, th.data.user_addr, freight_free, allpice, rs);
445   - var exp_price = parseFloat(shipping_price).toFixed(2);
446   - allpice=parseFloat(exp_price)+parseFloat(allpice);
447   - allpice=allpice.toFixed(2);
448   -
449   - exp_price = parseFloat(exp_price);
450   - th.setData({ exp_price: exp_price,allpice:allpice })
451   - }else {
452   - var allpice=th.data.order.order_amount+th.data.order.user_money+th.data.order.tail_money;
453   - allpice=allpice.toFixed(2);
454   - th.setData({ exp_price: 0,allpice:allpice })
  453 + var exp_price = parseFloat(shipping_price).toFixed(2);
  454 + allpice = parseFloat(exp_price) + parseFloat(allpice);
  455 + allpice = allpice.toFixed(2);
  456 +
  457 + exp_price = parseFloat(exp_price);
  458 + th.setData({ exp_price: exp_price, allpice: allpice })
  459 + } else {
  460 + var allpice = th.data.order.order_amount + th.data.order.user_money + th.data.order.tail_money;
  461 + allpice = allpice.toFixed(2);
  462 + th.setData({ exp_price: 0, allpice: allpice })
455 463 }
456 464 });
457 465 });
458 466 },
459 467  
460 468 //----------------计算物流---------------
461   - calculatewuliu:function(code, o_shipping_price, goods_weight,
462   - goods_piece,user_addr, freight_free, o_price, rs){
463   - var price =0,th=this;
464   - price +=parseFloat(o_shipping_price);
  469 + calculatewuliu: function (code, o_shipping_price, goods_weight,
  470 + goods_piece, user_addr, freight_free, o_price, rs) {
  471 + var price = 0, th = this;
  472 + price += parseFloat(o_shipping_price);
465 473 //如果是包邮
466   - if (freight_free > 0 && o_price > freight_free){ return 0;}
467   - if (user_addr==null) { return 0; }
  474 + if (freight_free > 0 && o_price > freight_free) { return 0; }
  475 + if (user_addr == null) { return 0; }
468 476 //计算物流的config item;
469   - var item=null;
  477 + var item = null;
470 478 //先根据 镇 县 区找计算的config
471   - item = th.get_wuliu_config(user_addr.district,code,rs);
472   - if (item==null) item = th.get_wuliu_config(user_addr.city, code, rs);
473   - if (item==null) item = th.get_wuliu_config(user_addr.province, code, rs);
474   - if (item == null) item = th.get_wuliu_default(code,rs);
  479 + item = th.get_wuliu_config(user_addr.district, code, rs);
  480 + if (item == null) item = th.get_wuliu_config(user_addr.city, code, rs);
  481 + if (item == null) item = th.get_wuliu_config(user_addr.province, code, rs);
  482 + if (item == null) item = th.get_wuliu_default(code, rs);
  483 + if (item == null) return o_shipping_price;
  484 + var fw_price = 0, fp_price = 0;
  485 + item = item.config;
475 486 if (item == null) return o_shipping_price;
476   - var fw_price = 0, fp_price=0;
477   - item=item.config;
478 487 //------按重量----------
479   - if (goods_weight>0) {
480   - fw_price =parseFloat(item['money']);
481   - if (goods_weight > item['first_weight']){
  488 + if (goods_weight > 0) {
  489 + fw_price = parseFloat(item['money']);
  490 + if (goods_weight > item['first_weight']) {
482 491 var fw = goods_weight - item['first_weight'];
483   - var n = Math.ceil(fw/item['second_weight'])
  492 + var n = Math.ceil(fw / item['second_weight'])
484 493 fw_price = fw_price + n * parseFloat(item['add_money']);
485 494 }
486 495 }
... ... @@ -493,89 +502,131 @@ Page({
493 502 fp_price = fp_price + m * parseFloat(item['add_piecemoney']);
494 503 }
495 504 }
496   - var rspice =parseFloat(price + fw_price + fp_price);
  505 + var rspice = parseFloat(price + fw_price + fp_price);
497 506 return rspice;
498 507 },
499 508 //------------循环获取config-----------
500   - get_wuliu_config:function(region_id,code,rs){
501   - var item=null,rslist = rs.pageData;
502   - for (var i = 0; i < rslist.length;i++){
503   - if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i];}
  509 + get_wuliu_config: function (region_id, code, rs) {
  510 + var item = null, rslist = rs.pageData;
  511 + for (var i = 0; i < rslist.length; i++) {
  512 + if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i]; }
504 513 }
505 514 return item;
506 515 },
507 516  
508 517 //---------------检查是否有收货地址-------------------
509   - checkAddressList: function() {
  518 + checkAddressList: function () {
510 519 var t = this;
511 520 return !(!this.data.order || null == this.data.order.userAddress) || (wx.showModal({
512 521 title: "请先填写或选择收货地址~",
513   - success: function(a) {
  522 + success: function (a) {
514 523 a.confirm ? t.enterAddressPage() : wx.navigateBack();
515 524 },
516   - fail: function() {
  525 + fail: function () {
517 526 wx.navigateBack();
518 527 }
519 528 }), !1);
520 529 },
521 530  
522 531 //--进入收货地址的编辑页面--
523   - enterAddressPage: function() {
524   - getApp().globalData.is_cart_old=1;
525   - this.data.enterAddressPage =1, wx.navigateTo({
  532 + enterAddressPage: function () {
  533 + getApp().globalData.is_cart_old = 1;
  534 + this.data.enterAddressPage = 1, wx.navigateTo({
526 535 url: "/pages/user/address_list/address_list?is_back=1"
527 536 });
528 537 },
529   -
  538 +
530 539 //------------循环获取config-----------
531   - get_wuliu_config:function(region_id,code,rs){
532   - var item=null,rslist = rs.pageData;
533   - for (var i = 0; i < rslist.length;i++){
534   - if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i];}
  540 + get_wuliu_config: function (region_id, code, rs) {
  541 + var item = null, rslist = rs.pageData;
  542 + for (var i = 0; i < rslist.length; i++) {
  543 + if (rslist[i].code == code && rslist[i].region_id == region_id) { item = rslist[i]; }
535 544 }
536 545 return item;
537 546 },
538 547 //-------循环获取config,code default-------
539 548 get_wuliu_default: function (code, rs) {
540   - var item = null, rslist=rs.pageData;
  549 + var item = null, rslist = rs.pageData;
541 550 for (var i = 0; i < rslist.length; i++) {
542 551 if (rslist[i].shipping_code == code && rslist[i].is_default == 1) { item = rslist[i]; }
543 552 }
544 553 return item;
545 554 },
546   -
  555 +
547 556 //-------获取物流选项-------
548   - bindPickerChange:function(e){
549   - var ind = e.detail.value;
550   - this.setData({ index: ind });
  557 + bindPickerChange: function (e) {
  558 + var ind = e.detail.value;
  559 + this.setData({ index: ind });
551 560 },
552 561  
553 562 //------支付成功页面--------
554   - jumpPaymentPage: function(order_sn,order_amount) {
  563 + jumpPaymentPage: function (order_sn, order_amount) {
555 564 wx.setStorageSync("order:order_list:update", !0), wx.redirectTo({
556 565 url: "/pages/payment/pay_success/pay_success?order_sn=" + order_sn + "&type=1",
557 566 });
558 567 },
559 568  
560 569 //------调起支付框--------
561   - weixinPay: function(n, success,fail) {
562   - if(!n) return false;
563   - var th=this;
  570 + weixinPay: function (n, success, fail) {
  571 + if (!n) return false;
  572 + var th = this;
564 573 wx.requestPayment({
565 574 timeStamp: String(n.timeStamp),
566 575 nonceStr: n.nonceStr,
567 576 package: n.packageValue,
568 577 signType: n.signType,
569 578 paySign: n.paySign,
570   - success: function(n) {
571   - console.log(n), getApp().showSuccess("支付成功!");
572   - "function" == typeof success && success();
  579 + success: function (n) {
  580 + console.log(n), getApp().showSuccess("支付成功!");
  581 + "function" == typeof success && success();
573 582 },
574   - fail: function(n) {
575   - console.log(n), "requestPayment:fail" == n.errMsg ? getApp().my_warnning("支付失败",0,th) : "requestPayment:fail cancel" == n.errMsg ? getApp().my_warnning("您已取消支付",0,th) : getApp().my_warnning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length),0,th),
576   - "function" == typeof fail && fail();
  583 + fail: function (n) {
  584 + console.log(n), "requestPayment:fail" == n.errMsg ? getApp().my_warnning("支付失败", 0, th) : "requestPayment:fail cancel" == n.errMsg ? getApp().my_warnning("您已取消支付", 0, th) : getApp().my_warnning("支付失败:" + n.errMsg.substr("requestPayment:fail ".length), 0, th),
  585 + "function" == typeof fail && fail();
577 586 }
578 587 });
579   - }
  588 + },
  589 +
  590 +
  591 + //// 开启物流的弹窗
  592 + show_wu_arr: function (e) {
  593 + this.setData({ open_express: 1 });
  594 + },
  595 +
  596 + // 关闭物流的弹窗
  597 + close_express: function () {
  598 + this.setData({ open_express: 0 });
  599 + },
  600 + // 选择物流
  601 + click_express_name: function (e) {
  602 + var express_name = e.currentTarget.dataset.name, shippingcode = e.currentTarget.dataset.shippingcode;
  603 + var index = e.currentTarget.dataset.idxe;
  604 + var ob = { is_express: index, is_shipping_code: shippingcode, index: index };
  605 + this.setData(ob);
  606 + },
  607 +
  608 + //点击确定物流
  609 + determine_expres: function (e) {
  610 + this.setData({ open_express: 0 });
  611 + this.calculatePrice2();
  612 + },
  613 + //设置默认物流
  614 + select_default_logistics: function () {
  615 + var th = this;
  616 + var is_shipping_code = this.data.is_shipping_code
  617 + getApp().request.put("/api/weshop/users/update", {
  618 + data: { user_id: getApp().globalData.user_id, store_id: oo.stoid, def_exp_code: is_shipping_code },
  619 + success: function (rse) {
  620 + if (rse.data.code == 0) {
  621 + getApp().globalData.userInfo.def_exp_code = is_shipping_code;
  622 + th.setData({ open_express: 0 });
  623 + //----计算此时购物车的价格,这个页面没有calculatePrice(),2021.7.19----
  624 + //if (th.data.is_b_now == 1) th.calculatePrice2();
  625 + //else th.calculatePrice();
  626 + th.calculatePrice2();
  627 + }
  628 + }
  629 + })
  630 + },
580 631  
581 632 })
582 633 \ No newline at end of file
... ...
pages/cart/cart_wk/cart_wk.wxml
1 1 <wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  2 +
  3 + <!-- 先选择配送方式,2021.7修改 -->
  4 + <view class="tab-container" wx:if="{{kt_type!=3 || is_normal==1}}">
  5 + <view class="tab-wrapper">
  6 + <view hidden="{{distr_type==2}}" bindtap='set_wuliu' data-type='1' class="tab {{exp_type == 1? 'active':''}}"
  7 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >门店自提</view>
  8 +
  9 + <view hidden="{{distr_type==1}}" bindtap='set_wuliu' data-type='0' class="tab {{exp_type== 0 ? 'active':''}}"
  10 + data-txt='cartlist[0].exp_type' data-wl_txt='cartlist[0].wind' data-index="{{index}}" >快递邮寄</view>
  11 +
  12 + </view>
  13 + </view>
  14 +
  15 +
2 16 <!----要进行判断地址是否显示---->
3 17 <view bindtap="enterAddressPage" class="user-mes mgt20"
4 18 hidden='{{exp_type==1 }}'>
... ... @@ -24,10 +38,10 @@
24 38 <!-- <view class="border-img"><image class="wh100 bdr14" src="{{imgUrl}}/miniapp/images/tt.png"></image></view> -->
25 39 </view>
26 40  
27   -<!--头部-->
  41 +<!--头部门店显示-->
28 42 <view class='top bdr_t-14 flex'>
29 43 <image class="t_img" src='{{imgUrl}}/miniapp/images/goodscategory/new_store.png'></image>
30   - <view class='t_wz'>美得得超市{{pickup.pickup_name}}</view>
  44 + <view class='t_wz'>{{pickup.pickup_name}}</view>
31 45 </view>
32 46  
33 47 <!--商品图片显示-->
... ... @@ -49,8 +63,7 @@
49 63  
50 64 <!--取货方式-->
51 65  
52   -<view class='quhou bdr_b-14'>
53   -
  66 +<!-- <view class='quhou bdr_b-14'>
54 67 <view bindtap="set_wuliu" data-type="1" class='qu_fs' wx:if="{{distr_type==0 || distr_type==1}}">
55 68 <image wx:if="{{exp_type==0}}" src='{{imgUrl}}/miniapp/images/kon.png'></image>
56 69 <image wx:if="{{exp_type==1}}" src='{{imgUrl}}/miniapp/images/dd.png'></image>
... ... @@ -62,13 +75,13 @@
62 75 <image wx:if="{{exp_type==1}}" src='{{imgUrl}}/miniapp/images/kon.png'></image>
63 76 <text class='qu_wz'>快递邮寄</text>
64 77 </view>
  78 +</view> -->
65 79  
66   -</view>
67   -<view class="use-item bdr_b-14" wx:if='{{exp_type==0}}'>
68   - <view>使用物流:</view>
69   - <picker bindchange="bindPickerChange" value="{{index}}" range="{{wu_arr}}" range-key="name">
70   - <view >{{wu_arr[index].name}}</view>
71   - </picker>
  80 +<view class="use-item bdr_b-14 jc_sb" wx:if='{{exp_type==0 && !is_default_logistics}}'>
  81 + <view>选择物流:</view>
  82 + <view class="flex-vertical" bindtap="show_wu_arr" data-txt='index' style="margin-right: 8rpx;">
  83 + <view class="logistics-name">{{wu_arr[index].name}}</view><view class="xc-right"></view>
  84 + </view>
72 85 </view>
73 86  
74 87 <!--成团人数-->
... ... @@ -125,4 +138,49 @@
125 138 </view>
126 139 </block>
127 140  
128   -<warn id="warn"></warn>
129 141 \ No newline at end of file
  142 +<warn id="warn"></warn>
  143 +
  144 +<!----弹起选择物流名的列表---->
  145 +<view wx:if='{{open_express==1}}' >
  146 + <view class="cover-layer flex-center " bindtap='close_express'>
  147 + </view>
  148 +
  149 + <view class="cx-popup radius {{open_express==1?'up' : 'down'}}" >
  150 + <view class="tops flex">
  151 + <view class="top-content fs32">
  152 + <view>
  153 + 选择物流名字
  154 + </view>
  155 + </view>
  156 + <view class="close-frame" bindtap='close_express' >
  157 + <view class="xc-close-express">×</view>
  158 + </view>
  159 + </view>
  160 + <view class="express_list">
  161 + <view wx:for="{{wu_arr}}" wx:for-item="express_list" wx:for-index="idx">
  162 + <view class="express_list_frame" bindtap="click_express_name"
  163 + data-shippingcode="{{express_list.shipping_code}}"
  164 + data-name="{{express_list.name}}" data-idxe="{{idx}}">
  165 +
  166 + <block wx:if="{{is_express==idx}}">
  167 + <view class="circle white xc-hook fs20 red-b"><text>Γ</text></view>
  168 + </block>
  169 + <block wx:else>
  170 + <view class="circle xc-hooks"></view>
  171 + </block>
  172 + <view class="fs30">{{express_list.name}}</view>
  173 +
  174 + </view>
  175 + </view>
  176 + </view>
  177 + <view class="flex click-buttem" >
  178 + <view class="xc-determine flex-center" bindtap="determine_expres">
  179 + <view class="flex-vertical t-c">确定</view>
  180 + </view>
  181 + <view class="xc-confirms flex-center" bindtap="select_default_logistics">
  182 + <view class="flex-vertical t-c">设为默认</view>
  183 + </view>
  184 + </view>
  185 +
  186 + </view >
  187 +</view>
... ...
pages/cart/cart_wk/cart_wk.wxss
  1 +page{ color: #333;}
1 2 .bdr_t-14 {
2 3 border-top-left-radius: 14rpx;
3 4 border-top-right-radius: 14rpx;
... ... @@ -329,5 +330,184 @@ page {
329 330 .anniu_view>view{width: 50%; border-right:1rpx solid #ededed;}
330 331  
331 332  
  333 +.tab-container {
  334 + font-size: 28rpx;
  335 + margin-top: 20rpx;
  336 + display: flex;
  337 +}
  338 +
  339 +.tab-wrapper {
  340 + background-color: #ccc;
  341 + display: flex;
  342 + border-radius: 40rpx;
  343 + overflow: hidden;
  344 +}
  345 +
  346 +.tab {
  347 + padding: 20rpx 30rpx;
  348 +
  349 +}
  350 +
  351 +
  352 +.tab.active {
  353 + background-color: white;
  354 + border-radius: 40rpx;
  355 +}
  356 +
  357 +.xc-right{
  358 + width:20rpx;
  359 + height:20rpx;
  360 + border-top:2rpx solid #666;
  361 + border-right:2rpx solid #666;
  362 + transform:rotate(45deg);
  363 + display:inline-block;
  364 +}
  365 +
  366 +
  367 +/* 自定义弹出窗口 */
  368 +.cx-popup{
  369 + width:100%;
  370 + height:880rpx;
  371 + background: #fff;
  372 + z-index: 35;
  373 + border-top-left-radius: 20rpx;
  374 + border-top-right-radius: 20rpx;
  375 + position:fixed;
  376 + bottom:0;
  377 + left: 0;
  378 + /* padding-bottom: 25rpx; */
  379 +}
  380 +
  381 +.cx-popup .top{
  382 + width:95%;
  383 + height:100rpx;
  384 + border-bottom:3rpx solid #ddd;
  385 + margin: auto;
  386 + margin-top: 30rpx;
  387 +
  388 +}
  389 +.xc-top-content{
  390 + width: 93%;
  391 + height:85rpx;
  392 + padding-top: 30rpx;
  393 + font-size: 34rpx;
  394 + font-weight: 600;
  395 +
  396 +}
  397 +
  398 +.xc-close{
  399 + width: 37rpx;
  400 +height: 37rpx;
  401 +border-radius: 50%;
  402 +border: 3rpx solid #333;
  403 +text-align: center;
  404 +line-height: 34rpx;
  405 +font-size: 29rpx;
  406 +color: #333;
  407 +
  408 +}
  409 +
  410 +.xc-confirm {
  411 + width: 50%;
  412 + border-radius: 50rpx;
  413 + height: 80rpx;
  414 + margin:0 auto;
  415 + background:#d60021;
  416 + color:#fff;
  417 + font-size:28rpx;
  418 + margin-top: 28rpx;
  419 +}
  420 +
  421 +.up{ animation: up .7s; }
  422 +.down{ animation: down 1s; }
  423 +@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } }
  424 +@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } }
  425 +
  426 +
  427 +.xc-close-express{
  428 + width: 40rpx;
  429 +height: 40rpx;
  430 +border-radius: 50%;
  431 +border: 3rpx solid #333;
  432 +text-align: center;
  433 +font-size:32rpx;
  434 +line-height: 38rpx;
  435 +color: #333;
  436 +margin-top: 5rpx;
  437 +}
  438 +.cx-popup .tops{
  439 + width: 100%;
  440 +height: 145rpx;
  441 +border-bottom: 3rpx solid #eee;
  442 +
  443 +}
  444 +.top-content {
  445 + width: 82%;
  446 +padding-top: 33px;
  447 +height: 100%;
  448 +padding-left: 40rpx;
  449 +}
  450 +.close-frame{
  451 + margin-top: 30rpx;
  452 +
  453 +}
  454 +
  455 +.xc-hook {
  456 +width: 33rpx;
  457 +height: 33rpx;
  458 +transform: rotate(-135deg);
  459 +line-height: 35rpx;
  460 +text-align: center;
  461 +margin-right: 20rpx
  462 +
  463 +
  464 +}
  465 +.xc-hooks {
  466 +width: 30rpx;
  467 +height: 30rpx;
  468 +border: 1rpx solid #999;
  469 +margin-right: 20rpx;
  470 +}
  471 +.express_list_frame{
  472 + display: flex;
  473 +height: 80rpx;
  474 +align-items: center;
  475 +padding-left: 40rpx;
  476 +border-bottom: 1rpx solid #eee;
  477 +
  478 +}
  479 +.express_list{
  480 + width: 100%;
  481 + height: 65%;
  482 + overflow-y: auto;
  483 + margin-bottom: 40rpx;
  484 +
  485 +}
  486 +.xc-confirms {
  487 + box-sizing: border-box;
  488 + width: 40%;
  489 + border-radius: 50rpx;
  490 + height: 80rpx;
  491 + margin:0 auto;
  492 + font-size:28rpx;
  493 + background: #fff;
  494 + color: #333;
  495 + border: 2rpx solid #333;
  496 +}
332 497  
  498 +.determine-frame{
  499 + width: 100%;
  500 + height: 130rpx;
  501 +
  502 +}
  503 +.xc-determine{
  504 + height: 80rpx;
  505 + width: 40%;
  506 + border-radius: 50rpx;
  507 +background: #d60021;
  508 +color: #fff;
  509 +font-size: 28rpx;
  510 +margin: 0 auto;
  511 +
  512 +}
333 513  
... ...
pages/goods/goodsInfo/buy_integral.wxml
... ... @@ -59,7 +59,7 @@
59 59  
60 60 <!--商品的属性项目-->
61 61 <view class="xc-goods-attribute">
62   - <view hidden="{{ismend==1}}" class="spec-name">商品属性</view>
  62 + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
63 63 <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
64 64 <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">
65 65 {{item.gg}}
... ... @@ -70,7 +70,7 @@
70 70 <view class="b_num">
71 71 <view>购买数量</view>
72 72 <view class="count">
73   - <view bindtap="subCartNum_inte" class="sub">-</view>
  73 + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum_inte'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
74 74 <input bindblur="inputCartNum_inte" type="number" value="{{goodsInputNum}}"></input>
75 75 <view bindtap="addCartNum_inte" class="add">+</view>
76 76 </view>
... ...
pages/goods/goodsInfo/buy_integral_normal.wxml
... ... @@ -60,9 +60,9 @@
60 60  
61 61 <!--商品的属性项目-->
62 62 <view class="xc-goods-attribute">
63   - <view hidden="{{ismend==1}}" class="spec-name">商品属性</view>
  63 + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
64 64 <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
65   - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">
  65 + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">
66 66 {{item.gg}}
67 67 </view>
68 68 </view>
... ... @@ -71,13 +71,27 @@
71 71 <view class="b_num">
72 72 <view>购买数量</view>
73 73 <view class="count">
74   - <view bindtap="subCartNum" class="sub">-</view>
  74 + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
75 75 <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
76 76 <view bindtap="addCartNum" class="add">+</view>
77 77 </view>
78 78 </view>
79 79 </view>
80 80  
  81 +
  82 + <!-- 提示再买多少优惠 -->
  83 + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}">
  84 + 再买{{hui_condition.need}}
  85 + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text>
  86 + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text>
  87 + <text wx:if="{{hui_condition.past==1}}">,包邮</text>
  88 + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text>
  89 + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text>
  90 + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text>
  91 + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text>
  92 + </view>
  93 +
  94 +
81 95 <!-- 按钮部分 -->
82 96 <view class="spec-cart-btns">
83 97  
... ...
pages/goods/goodsInfo/buy_pt.wxml
... ... @@ -74,7 +74,7 @@
74 74 </view>
75 75 <!----商品的属性项目---->
76 76 <view>
77   - <view hidden="{{ismend==1}}" class="spec-name">商品属性</view>
  77 + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
78 78 <block wx:if="{{is_normal==0}}">
79 79 <view hidden="{{ismend==1}}" class="flex">
80 80 <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}}
... ... @@ -84,8 +84,8 @@
84 84  
85 85 <block wx:else>
86 86 <view hidden="{{ismend==1}}" class="flex">
87   - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">{{item.gg}}
88   - </view>
  87 + <view class="spec_bt {{sele_g.goods_id==item.goods_id?'act':''}}"
  88 + bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">{{item.gg}}</view>
89 89 </view>
90 90 </block>
91 91 <view class="clear"></view>
... ... @@ -107,11 +107,25 @@
107 107 <view class="b_num" hidden="{{ismend==1}}" style="margin-top: 20rpx">
108 108 <view>购买数量</view>
109 109 <view class="count">
110   - <view bindtap="subCartNum" class="sub">-</view>
  110 + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
111 111 <input bindblur="inputCartNum" class="xc-val-fream" type="number" value="{{goodsInputNum}}"></input>
112 112 <view bindtap="addCartNum" class="add">+</view>
113 113 </view>
114 114 </view>
  115 +
  116 +
  117 + <!-- 提示再买多少优惠 -->
  118 + <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition && is_normal==1}}">
  119 + 再买{{hui_condition.need}}
  120 + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text>
  121 + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text>
  122 + <text wx:if="{{hui_condition.past==1}}">,包邮</text>
  123 + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text>
  124 + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text>
  125 + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text>
  126 + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text>
  127 + </view>
  128 +
115 129  
116 130 <view class="clear"></view>
117 131 <!---当选取门店的时候会显示门店的选项---->
... ...
pages/goods/goodsInfo/g_filter.wxs
... ... @@ -93,18 +93,7 @@ var g_filters = {
93 93 //折扣数值处理,小数位数为1时,只显示1位;小数位数为2时,才显示2位;
94 94 num: function(value) {
95 95 if(value != 0) {
96   - var val = value.toFixed(2).toString();
97   - if(val.indexOf('.') != -1) {
98   - var arrval = val.split('.');
99   - if(arrval[1].length == 1 && arrval[1][0] == 0) {
100   - val = val.slice(0,-2);
101   - };
102   -
103   - if(arrval[1].length == 2 && arrval[1][1] == 0) {
104   - val = val.slice(0,-1);
105   - };
106   - };
107   - return val;
  96 + return parseFloat(value);
108 97 } else {
109 98 return value.toFixed(0);
110 99 };
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -248,12 +248,13 @@ Page({
248 248 sto_sele_name_1:'',//分享的门店名称
249 249 fir_goods:null,
250 250  
  251 + share_hidden: false,
251 252 },
252 253  
253 254 //------初始化加载----------
254 255 onLoad: function(t) {
255 256 wx.setNavigationBarTitle({
256   - title: "商品详情",
  257 + title: t.title,
257 258 })
258 259 var ee = this,
259 260 that = ee,
... ... @@ -398,7 +399,7 @@ Page({
398 399 //--- 判断是等级会员,且在有效期范围内 ---
399 400 if(user.card_field && now<end){
400 401 var card_name=ob.name_map.get(user.card_field);
401   - if(card_name.length>6) card_name=card_name.substring(0,6);
  402 + //if(card_name.length>6) card_name=card_name.substring(0,6);
402 403  
403 404 var is_near_date=0;
404 405 if(end-now<60*60*30*24) is_near_date=1; //如果小于30天
... ... @@ -448,7 +449,7 @@ Page({
448 449 //如果有开启近距离的话,同时距离优不一样了
449 450 if (that.data.lat != null) {
450 451 //如果经纬度有变化的话
451   - if( appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
  452 + if(e && appd.lat==that.data.lat && appd.lon==that.data.lon && e.distance>0 ){
452 453 //that.data.fir_def_store=e;
453 454 // that.setData({
454 455 // def_pick_store: e,
... ... @@ -501,6 +502,11 @@ Page({
501 502 }, 500)
502 503 },700)
503 504 });
  505 +
  506 + //更新点击量
  507 + getApp().request.put("/api/weshop/goods/updateClick",{
  508 + data:{store_id:os.stoid,goods_id:gid}
  509 + })
504 510 },
505 511  
506 512  
... ... @@ -703,6 +709,7 @@ Page({
703 709  
704 710 //---展示---
705 711 onShow: function() {
  712 + console.log('djfijsaoifjoisadjfoij');
706 713 var goods_list = null,th = this,that=this;
707 714  
708 715 //优惠券要实时更新
... ... @@ -772,24 +779,16 @@ Page({
772 779 ee.check_is_youhui(ee.data.gid);
773 780  
774 781 t.data.data.on_time = ut.formatTime(t.data.data.on_time, 'yyyy-MM-dd hh:mm:ss');
775   - var txt = (t.data.data.shop_price / t.data.data.market_price * 10).toFixed(2).toString();
776   -
777   -
778   - if(txt != 0) {
779   - if(txt.indexOf('.') != -1) {
780   - var arrtxt = txt.split('.');
781   - if(arrtxt[1].length == 1 && arrtxt[1][0] == 0) {
782   - txt = txt.slice(0,-2);
783   - };
784   -
785   - if(arrtxt[1].length == 2 && arrtxt[1][1] == 0) {
786   - txt = txt.slice(0,-1);
787   - };
788   - };
789   - } else {
790   - txt = 0;
791   - }
792   -
  782 +
  783 + var cur_price=t.data.data.shop_price;
  784 + if(getApp().globalData.userInfo && getApp().globalData.userInfo.card_field){
  785 + var cfile=getApp().globalData.userInfo.card_field;
  786 + if(t.data.data[cfile]){
  787 + cur_price=t.data.data[cfile];
  788 + }
  789 + }
  790 + var txt =(cur_price / t.data.data.market_price * 10).toFixed(2).toString();
  791 + txt=parseFloat(txt);
793 792  
794 793 t.data.data['disc'] = txt;
795 794  
... ... @@ -852,7 +851,7 @@ Page({
852 851 ee.get_sto();
853 852 }
854 853  
855   - ee.get_sku(o.stoid, t.data.data.sku, gid);
  854 + ee.get_sku(o.stoid, t.data.data, gid);
856 855 }
857 856 else {
858 857 var gg = "", item = t.data.data;
... ... @@ -1255,9 +1254,9 @@ Page({
1255 1254  
1256 1255 //如果是积分够,is_integral_normal就要有积分购普通购买字段
1257 1256 if(o.prom_type==4){
1258   - newd.is_integral_normal=1;
  1257 + newd.is_integral_normal=1;
1259 1258 }
1260   -
  1259 +
1261 1260 //如果有线下取价
1262 1261 if(o.offline_price){
1263 1262 newd.offline_price=o.offline_price;
... ... @@ -1497,14 +1496,32 @@ Page({
1497 1496 // this.data.shippingCost < 0 || this.data.select.stock <= 0 || (Object.assign(e, {
1498 1497 // action: "buy_now"
1499 1498 // }),
1500   - s.set_b_now(e);
  1499 +
1501 1500 if(e.prom_type==4){
  1501 + s.set_b_now(e);
1502 1502 var url="/pages/cart/cart2_inte/cart2_inte?is_bnow=1&goods_id=" + e.goods_id;
1503 1503 getApp().goto(url);
1504 1504 }else{
1505   - wx.redirectTo({
1506   - url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id,
1507   - });
  1505 + //要判断积分购的普通购买有没有参加优惠活动
  1506 + if(e.is_integral_normal==1){
  1507 + this.check_nor_promgood(e.goods_id,function(res){
  1508 + if(res && res.cat_id){
  1509 + e.prom_type=3;
  1510 + e.prom_id=res.cat_id
  1511 + }
  1512 + s.set_b_now(e);
  1513 + wx.redirectTo({
  1514 + url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id,
  1515 + });
  1516 +
  1517 + })
  1518 + }else{
  1519 + s.set_b_now(e);
  1520 + wx.redirectTo({
  1521 + url: "/pages/cart/cart2/cart2?is_bnow=1&goods_id=" + e.goods_id,
  1522 + });
  1523 + }
  1524 +
1508 1525 }
1509 1526 },
1510 1527  
... ... @@ -1693,6 +1710,13 @@ Page({
1693 1710 closeSpecModal: function() {
1694 1711 if(this.data.openSpecModal_pt && this.data.is_normal){
1695 1712 this.get_sto();
  1713 + this.setData({
  1714 + sele_g:this.data.data,
  1715 + gid:this.data.data.goods_id
  1716 + })
  1717 +
  1718 + this.sele_spec_chech_activity();
  1719 +
1696 1720 }
1697 1721  
1698 1722 this.setData({
... ... @@ -2070,17 +2094,19 @@ Page({
2070 2094 },
2071 2095  
2072 2096 //----------装载同一条形码的商品----------
2073   - async get_sku(stoid, sku, g_id, is_normal, func) {
  2097 + async get_sku(stoid, gd, g_id, is_normal, func) {
2074 2098 var tt = this,arrdata=null;
2075 2099 var now=ut.gettimestamp();
2076 2100  
2077 2101 await getApp().request.promiseGet("/api/weshop/goods/page", {
2078 2102 data: {
2079 2103 store_id: o.stoid,
2080   - sku: sku,
  2104 + sku: gd.sku,
  2105 + more_spec:gd.more_spec,
2081 2106 isonsale: 1,
2082 2107 is_on_sale: 1,
2083   - pageSize:500
  2108 + pageSize:500,
  2109 + orderField: 'sort'
2084 2110 }
2085 2111 }).then(res => {
2086 2112 var e = res;
... ... @@ -2094,25 +2120,48 @@ Page({
2094 2120 for (var i = 0; i < arrdata.length; i++) {
2095 2121 var goodsinfo=arrdata[i],prom=null;
2096 2122 if (goodsinfo.goods_id != g_id) {
2097   - if(goodsinfo.prom_type==1){
2098   - await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+goodsinfo.prom_id,{
2099   - }).then(res=>{
2100   - if(res.data.code==0) prom=res.data.data;
2101   - })
2102   - }
2103   - if(goodsinfo.prom_type==6){
2104   - await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{
2105   - }).then(res=>{
2106   - if(res.data.code==0) prom=res.data.data;
2107   - })
2108   - }
  2123 +
  2124 + switch(goodsinfo.prom_type){
  2125 + case 1:
  2126 + await getApp().request.promiseGet("/api/ms/flash_sale/get/"+os.stoid+"/"+goodsinfo.prom_id,{
  2127 + }).then(res=>{
  2128 + if(res.data.code==0) prom=res.data.data;
  2129 + })
  2130 +
  2131 + break;
  2132 + case 6:
  2133 + await getApp().request.promiseGet("/api/weshop/teamlist/get/"+os.stoid+"/"+goodsinfo.prom_id,{
  2134 + }).then(res=>{
  2135 + if(res.data.code==0) prom=res.data.data;
  2136 + })
  2137 +
  2138 + break;
  2139 + case 2:
  2140 + await getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/"+os.stoid+"/"+goodsinfo.goods_id+"/"+goodsinfo.prom_id,{
  2141 + }).then(res=>{
  2142 + if(res.data.code==0) prom=res.data.data;
  2143 + })
  2144 + break;
  2145 + case 4:
  2146 + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/"+os.stoid+"/"+goodsinfo.goods_id+"/"+goodsinfo.prom_id,{
  2147 + }).then(res=>{
  2148 + if(res.data.code==0) prom=res.data.data;
  2149 + })
  2150 + break
  2151 +
  2152 + }
  2153 +
  2154 +
2109 2155 }
2110 2156 //---如果有活动,不算在一起---
2111 2157 if(prom){
2112   - if(prom.is_end==0 && prom.end_time>now && prom.start_time<now){
2113   - continue;
2114   - }
  2158 + if(goodsinfo.prom_type==1 || goodsinfo.prom_type==6){
  2159 + if(prom.is_end==0 && prom.end_time>now && prom.start_time<now) continue;
  2160 + }else{
  2161 + continue;
  2162 + }
2115 2163 }
  2164 +
2116 2165  
2117 2166 var item = arrdata[i],gg = "";
2118 2167 if(item.goods_spec=="null" || item.goods_spec==null) item.goods_spec="";
... ... @@ -2160,7 +2209,13 @@ Page({
2160 2209 sele_spec: function(e) {
2161 2210 var that=this,ee=this,th=this;
2162 2211 var gid = e.currentTarget.dataset.gid;
  2212 + var nor=e.currentTarget.dataset.nor;
  2213 +
2163 2214 var sku_g = this.data.sku_g;
  2215 + if(nor){
  2216 + sku_g = this.data.sku_g_pt;
  2217 + }
  2218 +
2164 2219 var item = null;
2165 2220 for (var i in sku_g) {
2166 2221 if (sku_g[i].goods_id == gid) {
... ... @@ -2172,12 +2227,13 @@ Page({
2172 2227 sele_g: item,
2173 2228 gid: gid
2174 2229 });
  2230 +
  2231 +
2175 2232  
2176   - that.check_is_youhui(gid)
2177   -
  2233 + that.check_is_youhui(gid,that.data.is_normal);
  2234 +
2178 2235 var ty=0;
2179   -
2180   - this.get_sto();
  2236 + this.get_sto(that.data.is_normal);
2181 2237  
2182 2238  
2183 2239 //默认门店要拿下门店库存
... ... @@ -2233,6 +2289,16 @@ Page({
2233 2289 }
2234 2290 })
2235 2291 }
  2292 +
  2293 + if(goodsinfo.prom_type==4){
  2294 + await getApp().request.promiseGet("/api/weshop/integralbuy/getActInfo/"+os.stoid+"/"+goodsinfo.goods_id+"/"+goodsinfo.prom_id,{
  2295 + }).then(res=>{
  2296 + if(res.data.code==0){
  2297 + prom=res.data.data;
  2298 + }
  2299 + })
  2300 + }
  2301 +
2236 2302 //----------如果有活动,并且在进行中,就不计算线下库存---------------
2237 2303 var now=ut.gettimestamp();
2238 2304 if(prom){
... ... @@ -2319,7 +2385,7 @@ Page({
2319 2385 }).then(res => {
2320 2386 var e = res;
2321 2387  
2322   - if (e.data.code == 0) {
  2388 + if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length>0) {
2323 2389  
2324 2390 //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
2325 2391 if(dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store)=='{}') && th.data.bconfig && th.data.bconfig.is_sort_storage){
... ... @@ -2782,7 +2848,7 @@ Page({
2782 2848 prom_type: 0,
2783 2849 isshow: 1,
2784 2850 });
2785   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2851 + ee.get_sku(os.stoid, ee.data.data, gid);
2786 2852 return false;
2787 2853 }
2788 2854 //----已经结束-----
... ... @@ -2791,7 +2857,7 @@ Page({
2791 2857 prom_type: 0,
2792 2858 isshow: 1,
2793 2859 });
2794   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2860 + ee.get_sku(os.stoid, ee.data.data, gid);
2795 2861 ee.get_sto();
2796 2862 return false;
2797 2863 }
... ... @@ -2802,7 +2868,7 @@ Page({
2802 2868 prom_type: 0,
2803 2869 isshow: 1,
2804 2870 });
2805   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2871 + ee.get_sku(os.stoid, ee.data.data, gid);
2806 2872 return false;
2807 2873 }
2808 2874  
... ... @@ -2812,7 +2878,7 @@ Page({
2812 2878 prom_type: 0,
2813 2879 isshow: 1,
2814 2880 });
2815   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2881 + ee.get_sku(os.stoid, ee.data.data, gid);
2816 2882 ee.get_sto();
2817 2883 return false;
2818 2884 }
... ... @@ -2905,7 +2971,7 @@ Page({
2905 2971  
2906 2972 }else{
2907 2973 ee.setData({prom_type: 0, isshow: 1,});
2908   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  2974 + ee.get_sku(os.stoid, ee.data.data, gid);
2909 2975 ee.get_sto();
2910 2976 return false;
2911 2977 }
... ... @@ -2936,7 +3002,7 @@ Page({
2936 3002 prom_type: 0,
2937 3003 isshow: 1,
2938 3004 });
2939   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  3005 + ee.get_sku(os.stoid, ee.data.data, gid);
2940 3006 ee.get_sto();
2941 3007 return false;
2942 3008 }
... ... @@ -2946,7 +3012,7 @@ Page({
2946 3012 prom_type: 0,
2947 3013 isshow: 1,
2948 3014 });
2949   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  3015 + ee.get_sku(os.stoid, ee.data.data, gid);
2950 3016 return false;
2951 3017 }
2952 3018 //----已经过期-----
... ... @@ -2956,7 +3022,7 @@ Page({
2956 3022 prom_type: 0,
2957 3023 isshow: 1,
2958 3024 });
2959   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  3025 + ee.get_sku(os.stoid, ee.data.data, gid);
2960 3026 ee.get_sto();
2961 3027 return false;
2962 3028 }
... ... @@ -2967,7 +3033,7 @@ Page({
2967 3033 prom_type: 0,
2968 3034 isshow: 1,
2969 3035 });
2970   - ee.get_sku(os.stoid, ee.data.data.sku, gid);
  3036 + ee.get_sku(os.stoid, ee.data.data, gid);
2971 3037 ee.get_sto();
2972 3038 return false;
2973 3039 }
... ... @@ -3090,16 +3156,23 @@ Page({
3090 3156 grounp_tatal = 0;
3091 3157 //如果活动是开团不是商家团
3092 3158 if (this.data.prom_act.kttype > 1) {
3093   - //获取活动从表信息team_id
3094   - await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
3095   - data: {
  3159 +
  3160 + var req_data={
3096 3161 store_id: os.stoid,
3097 3162 pageSize: 3,
3098 3163 page: 1,
3099 3164 state: 2,
3100 3165 team_id: prom_id,
3101 3166 ordernum:1
3102   - }
  3167 + };
  3168 +
  3169 + if(this.data.prom_act.kttype==3 && this.data.prom_act.max_ct_num ){
  3170 + req_data.max_num=this.data.prom_act.max_ct_num;
  3171 + }
  3172 +
  3173 + //获取活动从表信息team_id
  3174 + await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
  3175 + data: req_data
3103 3176 }).then(res => {
3104 3177 teamgroup = res.data.data.pageData;
3105 3178 grounp_tatal = res.data.data.total;
... ... @@ -3313,13 +3386,14 @@ Page({
3313 3386 });
3314 3387 } else {
3315 3388 th.get_sto(1);
3316   - th.get_sku(o.stoid, th.data.data.sku, th.data.gid, 1, function() {
  3389 + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function() {
3317 3390 th.setData({
3318 3391 is_normal: ind,
3319 3392 openSpecModal_pt: 1
3320 3393 });
3321 3394 });
3322   - }
  3395 + }
  3396 + th.check_is_youhui(th.data.gid,1);
3323 3397 } else {
3324 3398  
3325 3399 //拼单商品从这里进,先判断有没有买过商品,
... ... @@ -3545,8 +3619,19 @@ Page({
3545 3619 newd['pick_name'] = th.data.sto_sele_name;
3546 3620 newd['pick_dis'] = th.data.sto_sele_distr;
3547 3621 newd['is_normal'] = th.data.is_normal;
3548   -
3549   - th.buyNow_pt(newd);
  3622 +
  3623 + if(newd['is_normal']){
  3624 + newd['is_pd_normal']=1;
  3625 + //判断一下有没有全局优惠活动
  3626 + th.check_nor_promgood(newd.goods_id,function(e){
  3627 + if(e && e.act_id){
  3628 + newd['prom_type']=3;
  3629 + newd['prom_id']=e.act_id;
  3630 + }
  3631 + th.buyNow(newd)
  3632 + })
  3633 + }
  3634 + else th.buyNow_pt(newd);
3550 3635 })
3551 3636 },
3552 3637 //----------立即购买_pt-----------
... ... @@ -3881,6 +3966,12 @@ Page({
3881 3966 wx.navigateTo({ url: '/pages/togoin/togoin', })
3882 3967 return false;
3883 3968 }
  3969 +
  3970 + if(this.data.share_hidden) {
  3971 + this.setData({
  3972 + share_hidden: false,
  3973 + });
  3974 + };
3884 3975  
3885 3976 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团
3886 3977 var type = this.data.prom_type;
... ... @@ -4004,7 +4095,7 @@ Page({
4004 4095 //---市场价划掉---
4005 4096 context.setFillStyle("gray")
4006 4097 context.setFontSize(22 * unit)
4007   - context.fillText("¥" + th.data.data.market_price, 426 * unit, 213 * unit);
  4098 + context.fillText("¥" + th.data.data.market_price.toFixed(2), 426 * unit, 213 * unit);
4008 4099 context.setStrokeStyle('gray');
4009 4100 context.setLineWidth(1 * unit);
4010 4101 context.moveTo(426 * unit, 206 * unit);
... ... @@ -4740,7 +4831,8 @@ Page({
4740 4831 var index = th.data.sec_pick_index;
4741 4832 item = th.data.sec_sto.s_arr[index];
4742 4833 }
4743   -
  4834 +
  4835 + if(!th.data.sele_g) return false;
4744 4836 //判断门店的配送方式是不是匹配
4745 4837 var g_distr_type = th.data.sele_g.distr_type;
4746 4838 if(item.distr_type!=0 && g_distr_type!=0 && item.distr_type!=g_distr_type){
... ... @@ -5037,33 +5129,53 @@ Page({
5037 5129 },
5038 5130  
5039 5131 //---检查有没有优惠活动---
5040   - check_is_youhui:function(gid){
5041   - var th=this;
5042   - //调用接口判断订单优惠,
5043   - getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+gid+"/0", {}).then(res => {
5044   - if(res.data.code==0){
5045   - var r_data=res.data.data;
5046   - var max=0,min=0;
5047   - if(r_data.collocationList){
5048   - for(var i in r_data.collocationList){
5049   - if(max==0) max=r_data.collocationList[i].price;
5050   - if(min==0) min=r_data.collocationList[i].price;
5051   -
5052   - if(max<parseFloat(r_data.collocationList[i].price)) max=r_data.collocationList[i].price;
5053   - if(min>parseFloat(r_data.collocationList[i].price)) min=r_data.collocationList[i].price;
5054   - }
5055   - r_data.collocationPromList.max=(max+th.data.data.shop_price).toFixed(2);
5056   - r_data.collocationPromList.min=(min+th.data.data.shop_price).toFixed(2);
5057   - }
5058   - th.setData({
5059   - order_prom:r_data.promOrder,
5060   - collocationGoods:r_data.collocationPromList,
5061   - prom_goods:r_data.promGoodsLists,
5062   - })
  5132 + check_is_youhui:function(gid,is_nor){
  5133 + var th=this;
  5134 + //如果是普通购买的时候,要进行调用
  5135 + if(is_nor){
  5136 + getApp().request.get("/api/weshop/goods/getGoodsPromNormal/" + os.stoid+"/"+gid, {
  5137 + success:function(res){
  5138 + if(res.data.code==0){
  5139 + var r_data=res.data.data;
  5140 + th.setData({
  5141 + prom_goods:r_data.promGoodsLists,
  5142 + })
  5143 + th.is_show_more_buy();
  5144 + }
  5145 + },
  5146 + })
5063 5147  
5064   - th.is_show_more_buy();
5065   - }
5066   - })
  5148 + }else{
  5149 + //调用接口判断订单优惠,
  5150 + getApp().request.get("/api/weshop/goods/getGoodsPromList/" + os.stoid+"/"+gid+"/0", {
  5151 + success:function(res){
  5152 + if(res.data.code==0){
  5153 + var r_data=res.data.data;
  5154 + var max=0,min=0;
  5155 + if(r_data.collocationList){
  5156 + for(var i in r_data.collocationList){
  5157 + if(max==0) max=r_data.collocationList[i].price;
  5158 + if(min==0) min=r_data.collocationList[i].price;
  5159 +
  5160 + if(max<parseFloat(r_data.collocationList[i].price)) max=r_data.collocationList[i].price;
  5161 + if(min>parseFloat(r_data.collocationList[i].price)) min=r_data.collocationList[i].price;
  5162 + }
  5163 + r_data.collocationPromList.max=(max+th.data.data.shop_price).toFixed(2);
  5164 + r_data.collocationPromList.min=(min+th.data.data.shop_price).toFixed(2);
  5165 + }
  5166 + th.setData({
  5167 + order_prom:r_data.promOrder,
  5168 + collocationGoods:r_data.collocationPromList,
  5169 + prom_goods:r_data.promGoodsLists,
  5170 + })
  5171 + th.is_show_more_buy();
  5172 + }
  5173 + }
  5174 +
  5175 + })
  5176 + }
  5177 +
  5178 +
5067 5179 },
5068 5180  
5069 5181 closePoster() {
... ... @@ -5191,13 +5303,13 @@ Page({
5191 5303 if(item.prom_type==1){
5192 5304 if(item.condition>this.data.goodsInputNum) {
5193 5305 con=item;
5194   - con.need=(item.condition-this.data.goodsInputNum)+"件";
  5306 + con.need=(item.condition-this.data.goodsInputNum).toFixed(2)+"件";
5195 5307 break;
5196 5308 }
5197 5309 }else{
5198 5310 if(item.condition>all_price){
5199 5311 con=item;
5200   - con.need=(item.condition-all_price)+"元";
  5312 + con.need=(item.condition-all_price).toFixed(2)+"元";
5201 5313 break;
5202 5314 }
5203 5315 }
... ... @@ -5214,8 +5326,20 @@ Page({
5214 5326 },
5215 5327 //-- 积分购普通购买 --
5216 5328 go_pay_integral_normal:function(){
5217   - this.get_sto(1)
5218   - this.setData({openSpecModal_inte_normal:1});
  5329 + var th=this;
  5330 + if (th.data.sku_g_pt) {
  5331 + this.get_sto(1)
  5332 + this.setData({openSpecModal_inte_normal:1});
  5333 + }else{
  5334 + th.get_sto(1);
  5335 + th.get_sku(o.stoid, th.data.data, th.data.gid, 1, function() {
  5336 + th.setData({
  5337 + is_normal: 1,
  5338 + openSpecModal_inte_normal:1
  5339 + });
  5340 + });
  5341 + }
  5342 + this.check_is_youhui(th.data.gid,1);
5219 5343 },
5220 5344  
5221 5345 closeSpecModal_inte:function(){
... ... @@ -5223,6 +5347,14 @@ Page({
5223 5347 } ,
5224 5348 closeSpecModal_inte_normal:function(){
5225 5349 this.setData({openSpecModal_inte_normal:0});
  5350 + //要进行还原
  5351 + this.get_sto();
  5352 + this.setData({
  5353 + sele_g:this.data.data,
  5354 + gid:this.data.data.goods_id
  5355 + })
  5356 +
  5357 + this.sele_spec_chech_activity();
5226 5358 },
5227 5359  
5228 5360 addCart_inte:function(t){
... ... @@ -5241,7 +5373,45 @@ Page({
5241 5373 imageUrl:this.data.gallery[0].image_url,
5242 5374 }
5243 5375 },
  5376 +
  5377 +
  5378 + clickCollapse() {
  5379 + this.setData({
  5380 + flag: !this.data.flag,
  5381 + })
  5382 + },
  5383 +
  5384 + clickShare() {
  5385 + this.setData({
  5386 + share_hidden: true,
  5387 + });
  5388 + },
5244 5389  
  5390 + send() {
  5391 + this.setData({
  5392 + share_hidden:false,
  5393 + });
  5394 + },
  5395 +
  5396 + cancel() {
  5397 + this.setData({
  5398 + share_hidden:false,
  5399 + });
  5400 + },
5245 5401  
5246   -
  5402 + //积分购和拼团的普通购买的的时候,要判断有没有全场优惠活动
  5403 + check_nor_promgood(goods_id,back){
  5404 + getApp().request.get("/api/weshop/goods/getGoodsPromNormal/"+os.stoid+"/"+goods_id,{
  5405 + success:function(res){
  5406 + if(res.data.code==0 && res.data.data && res.data.data.promGoodsLists && res.data.data.promGoodsLists.length>0){
  5407 + var obj={
  5408 + act_id:res.data.data.promGoodsLists[0].prom_id,
  5409 + }
  5410 + back(obj);
  5411 + }else{
  5412 + back(0)
  5413 + }
  5414 + }
  5415 + })
  5416 + }
5247 5417 });
... ...
pages/goods/goodsInfo/goodsInfo.json
... ... @@ -4,6 +4,7 @@
4 4 "usingComponents": {
5 5 "nav_box": "/components/nav_box/nav_box",
6 6 "warn": "/components/long_warn/long_warn",
7   - "goods_recommend": "/components/goods_list/goods_list"
  7 + "goods_recommend": "/components/goods_list/goods_list",
  8 + "share": "/components/share/share"
8 9 }
9 10 }
10 11 \ No newline at end of file
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -93,7 +93,7 @@
93 93 <view class="flex fs35 xc-qtsign">¥</view>
94 94 <view class="fs50 val">{{prom_price}}</view>
95 95 </view>
96   - <view class="word-line fs20 xc-qtunit-price">零售价¥{{data.market_price}}</view>
  96 + <view class="word-line fs20 xc-qtunit-price">零售价¥{{filters.toFix(data.market_price,2)}}</view>
97 97 </view>
98 98 <view class="abs white xc-nanber">
99 99 <text class="fs22">已拼{{prom_act.buy_num}}件</text>
... ... @@ -122,7 +122,7 @@
122 122 </view>
123 123 </view>
124 124  
125   - <view class="pt_fir">
  125 + <view class="pt_fir pd20">
126 126 <!----显示团类型和团价格---->
127 127 <view class="pt_fir_title ">
128 128 <!-- 许程 商家团主页 -->
... ... @@ -131,9 +131,10 @@
131 131 {{data.goods_name}}
132 132 </view>
133 133  
134   - <view class="xc-share-frame-jieti flex" bindtap="saveImageToPhotosAlbum" style="top:0">
135   - <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image>
136   - <view class="share-font">分享</view>
  134 + <!-- 这个是分享按钮 -->
  135 + <view class="xc-share-frame t-c" bindtap="clickShare">
  136 + <view class="iconfont icon-share fs60"></view>
  137 + <view class="fs22 c-7b">分享</view>
137 138 </view>
138 139 </view>
139 140 </view>
... ... @@ -155,25 +156,29 @@
155 156 </view>
156 157  
157 158 <!----------正有多少人在开团---------->
158   - <view class="pt_fir se2" wx:if="{{teamgroup}}">
  159 + <view class="pt_fir se2 bdt16" wx:if="{{teamgroup}}">
159 160 <view class="xc-partner-frame">
160   - <view class="zzk-1" bindtap="go_t_more">以下小伙伴正在拼单,可直接参与
161   - <view class="ckgd flex">查看详细
  161 + <view class="zzk-1 flex jc_sb" bindtap="go_t_more">
  162 + <view class="pdl10">以下小伙伴正在拼单,可直接参与</view>
  163 + <view class="ckgd flex ai_c">查看详细
162 164 <view class="bg_right arrow-one"></view>
163 165 </view>
164 166 </view>
165 167 </view>
166   - <view class='group' wx:for="{{teamgroup}}" wx:for-index="t_ind" wx:key="teamgroup" style='padding-left:28rpx;'>
  168 + <view class='group' wx:for="{{teamgroup}}" wx:for-index="t_ind" wx:key="teamgroup">
167 169 <view class='group-list' bindtap="go_cj_team" data-ind="{{t_ind}}">
168   - <!--//选项框头像-->
169   - <view class='gtou'>
170   - <image src='{{item.user.head_pic}}'></image>
171   - </view>
172   - <!--//等你来拼-->
173   - <view class='gdn ellipsis-1'>{{item.user.nickname}}</view>
  170 + <!-- <view class="flex ai_c"> -->
  171 + <!--//选项框头像-->
  172 + <view class='gtou'>
  173 + <image src='{{item.user.head_pic}}'></image>
  174 + </view>
  175 + <!--//等你来拼-->
  176 + <view class='gdn ellipsis-1'>{{item.user.nickname}}</view>
  177 + <!-- </view> -->
  178 +
174 179 <!--//还差几人,剩余时间-->
175 180 <view class="rel">
176   - <view class='ghaicha ellipsis-2 abs'>
  181 + <view class='ghaicha ellipsis-2'>
177 182 <text class='gred' wx:if="{{prom_act.max_ct_num >0}}"><text class="flex" wx:if="{{prom_act.max_ct_num - item.open_num>0}}">还差<text class="word-color">{{prom_act.max_ct_num - item.open_num}}</text>人享最低优惠</text><text wx:else>您已经享最低优惠</text></text>
178 183 <text class='gred' wx:else>还差<text style='color:#ff2753'>{{prom_act.ct_num - item.open_num}}</text>人成团 </text>
179 184 <view class="t_show">
... ... @@ -189,70 +194,39 @@
189 194 <view class='cjt t-c'>
190 195 去参团
191 196 </view>
192   - <view class="clear"></view>
  197 + <!-- <view class="clear"></view> -->
193 198 </view>
194 199 </view>
195 200 </view>
196 201  
197   - <view class="pt_fir se1">
198   - <view class="pt_hb">
199   - 拼团玩法
200   - <view class="ptgz_an xq flex" bindtap="show_pt_xx">查看详细
201   - <view class="bg_right arrow-two"></view>
202   - </view>
203   - </view>
204   - <view class="flex-level" style='height:198rpx; width:100%;'>
205   - <view class="flex-vertical-between rel" style='width:94%;margin-left:10rpx;'>
206   - <!-- 许程 7: 24 -->
207   - <view class="xc-item t-c">
208   - <view class="circle yuan t-c circle-color">1</view>
209   - <view class="word">选择商品完成下单</view>
210   - </view>
211   - <view class="abs link {{color_type==0?'link-color-red':'link-color'}}"></view>
212   -
213   - <view class="xc-item t-c">
214   - <view class="circle yuan t-c circle-color">2</view>
215   - <view class="word">支付开团或参团</view>
216   - </view>
217   - <view class="abs link1 {{color_type_one==0?'link-color-red':'link-color'}}"></view>
218   -
219   - <view class="xc-item t-c">
220   - <view class="circle yuan t-c circle-color">3</view>
221   - <view class="word">邀请好友参团支付</view>
222   - </view>
223   - <view class="abs link2 {{color_type_two==0?'link-color-red':'link-color'}}"></view>
224 202  
225   -
226   - <view class="xc-item t-c">
227   - <view class="circle yuan t-c circle-color1">4</view>
228   - <view class="word">人满发货失败退款</view>
229   - </view>
230   - </view>
231   - </view>
232   - </view>
233 203 </view>
234 204  
235 205 <!-- 积分购 -->
236 206 <view wx:if="{{prom_type==4}}">
237   - <view class="goods-price rel">
  207 + <view class="goods-price">
238 208 <!-- 价格显示 -->
239   - <view class="co-red" style="overflow: hidden" >
240   - <view class="market-price" style="overflow: hidden; height: 66rpx;">
  209 + <view class="co-red flex jc_sb ai-center">
  210 + <view class="market-price" style="overflow: hidden; height: 66rpx;display: flex; align-items: flex-end;">
241 211 <image class="rel_img" src="{{iurl}}/miniapp/images/integral/integral_red.png"></image>
242   - <block wx:if="{{prom_integral}}">{{prom_integral}}
243   - <text class="rel_txt">积分</text></block>
  212 + <block wx:if="{{prom_integral}}"><text style="position: relative;top:10rpx">{{prom_integral}}</text><text class="rel_txt">积分</text></block>
244 213 <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text>
245 214 <text class="rel_txt" wx:if="{{prom_price}}" >{{filters.toFix(prom_price,2)}}元</text>
246 215 <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text>
247   - <text class="rel_txt" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">&nbsp;&nbsp;&nbsp;零售价:¥{{data.market_price}}</text>
  216 + <text class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">&nbsp;&nbsp;&nbsp;零售价:¥{{filters.toFix(data.market_price,2)}}</text>
248 217 </view>
  218 +
  219 + <!-- 这个是分享按钮 -->
  220 + <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> -->
  221 + <view class="xc-share-frame t-c" bindtap="clickShare">
  222 + <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> -->
  223 + <view class="iconfont icon-share fs60"></view>
  224 + <!-- <view class="share-font">1分享</view> -->
  225 + <view class="fs22 c-7b">分享</view>
  226 + </view>
249 227 </view>
250 228  
251   - <!-- 这个是分享按钮 -->
252   - <view class="xc-share-frame flex {{prom_type==1?'s_ms_bth':''}} " bindtap="saveImageToPhotosAlbum">
253   - <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image>
254   - <view class="share-font">分享</view>
255   - </view>
  229 +
256 230  
257 231 <view class="goods-title">
258 232 <view class="goods-name elli">{{data.goods_name}}</view>
... ... @@ -260,8 +234,7 @@
260 234  
261 235 <view class="goods-num">
262 236 <view class="sales">销量:{{prom_act.buy_num}}件</view>
263   - <!-- <view class="stock">折扣:{{data.disc}}折</view> -->
264   - <view class="stock">折扣:{{g_filters.num((prom_price?prom_price:0)*100/data.shop_price)}}折</view>
  237 + <view class="stock">折扣:{{g_filters.num((prom_price?prom_price:0)*10/data.shop_price)}}折</view>
265 238 <view class="stock">{{categories3[0].num}}人评价</view>
266 239 </view>
267 240 </view>
... ... @@ -269,32 +242,40 @@
269 242  
270 243 <!-- 不是拼团,不是积分购 -->
271 244 <block wx:if="{{prom_type!=6 && prom_type!=4}}">
272   - <view class="goods-price rel">
273   - <view class="co-red" style="overflow: hidden" wx:if="{{prom_type==0 || prom_type==3}}">
274   - <view class="market-price" style="overflow: hidden">
275   - <block wx:if="{{card_field && data[card_field]>0}}">
276   - <view class="flex ai-center grade-card-frame" style="margin-left:12rpx;">
277   - <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
278   - <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view>
279   - </view>
280   - <text class="rel yuan">¥</text>{{filters.toFix(data[card_field],2)}}
281   - <view class='yj' style="top:35rpx">
282   - <text>零售价:¥{{data.market_price}}</text>
283   - </view>
284   - </block>
285   - <block wx:else>
286   - <text class="rel yuan">¥</text>{{filters.toFix(data.shop_price,2)}}
287   - <view class='yj'><text>零售价:¥{{data.market_price}}</text></view>
288   - </block>
289   - </view>
290   -
291   - </view>
292   -
293   - <!-- 这个是分享按钮 -->
294   - <view class="xc-share-frame flex {{prom_type==1?'s_ms_bth':''}} " bindtap="saveImageToPhotosAlbum">
295   - <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image>
296   - <view class="share-font">分享</view>
297   - </view>
  245 + <view class="goods-price">
  246 +
  247 + <view class="flex jc_sb">
  248 + <view class="co-red" style="" wx:if="{{prom_type==0 || prom_type==3}}">
  249 + <view class="market-price flex" style="align-items: baseline;">
  250 + <block wx:if="{{card_field && data[card_field]>0}}">
  251 + <view class="flex ai-center grade-card-frame">
  252 + <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
  253 + <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view>
  254 + </view>
  255 + <text class="rel yuan">¥</text>{{filters.toFix(data[card_field],2)}}
  256 + <view class='yj' style="top:35rpx">
  257 + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>
  258 + </view>
  259 + </block>
  260 + <block wx:else>
  261 + <text class="yuan">¥</text>{{filters.toFix(data.shop_price,2)}}
  262 + <view class='yj'><text>零售价:¥{{filters.toFix(data.market_price,2)}}</text></view>
  263 + </block>
  264 + </view>
  265 +
  266 + </view>
  267 +
  268 + <!-- 这个是分享按钮 -->
  269 + <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> -->
  270 + <view class="xc-share-frame t-c" bindtap="clickShare" wx:if="{{prom_type != 1}}">
  271 + <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> -->
  272 + <view class="iconfont icon-share fs60"></view>
  273 + <!-- <view class="share-font">1分享</view> -->
  274 + <view class="fs22 c-7b">分享</view>
  275 + </view>
  276 + </view>
  277 +
  278 +
298 279  
299 280 <!-- 不是秒杀 -->
300 281 <!-- 等级卡的价格,不是等级卡会员,且商品又有设置等级级价,商家后台有开通升级卡同能 -->
... ... @@ -317,7 +298,7 @@
317 298 <!-- 不是秒杀,且会员不是等级会员 -->
318 299 <view wx:if="{{!card_field && prom_type!=1 && card_list && card_list.length>0}}">
319 300 <view class="beauty-makeup-frame flex ai-center">
320   - <view class="left flex ai-center">
  301 + <view class="left flex ai-center jc_sa">
321 302 <view class="flex ai-center grade-card-frame card-frame advert-card">
322 303 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
323 304 <view class="fs24 white view card-name ellipsis-1">{{g_filters.get_card_price(data,card_list,1)}}</view>
... ... @@ -337,8 +318,8 @@
337 318 <!-- 立即续费的显示 -->
338 319 <view wx:elif="{{is_near_date && data[card_field]>0 && prom_type!=1}}">
339 320 <view class="beauty-makeup-frame flex ai-center">
340   - <view class="left flex ai-center">
341   - <view class="flex ai-center grade-card-frame card-frame advert-card">
  321 + <view class="left flex ai-center jc_sa">
  322 + <view class="flex ai-center grade-card-frame card-frame advert-card">
342 323 <image class="img" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image>
343 324 <view class="fs24 white view card-name ellipsis-1">{{card_name}}</view>
344 325 </view>
... ... @@ -368,23 +349,28 @@
368 349 <view class="goods-num" wx:if="{{prom_type!=1}}">
369 350 <view class="sales">销量:{{data.sales_sum}}件</view>
370 351 <view class="stock">折扣:{{data.disc}}折</view>
371   - <!-- <view class="stock">折扣:{{filters.pInt((prom_price?prom_price:0)*100/data.shop_price)}}折</view> -->
372 352 <view class="stock">{{categories3[0].num}}人评价</view>
373 353 </view>
374 354 <view wx:if="{{prom_type==1}}">
375   - <view class="flex">
376   - <view>
377   - <view class="flex xc-price-frame">
378   - <view class="flex fs45 sign">¥</view>
379   - <view class="fs60 val">{{prom_price}}</view>
380   - </view>
381   - <view class="word-line fs24 xc-unit-price">零售价¥{{data.market_price}}</view>
  355 + <view class="flex jc_sb">
  356 + <view class="flex" style="align-items: baseline;">
  357 + <view class="flex xc-price-frame"><text class="fs30">¥</text>{{prom_price}}</view>
  358 + <view class="word-line fs24">零售价¥{{filters.toFix(data.market_price,2)}}</view>
382 359 </view>
383   - <view class="xc-val-price">
  360 +
  361 + <!-- 这个是分享按钮 -->
  362 + <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> -->
  363 + <view class="xc-share-frame t-c" bindtap="clickShare">
  364 + <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> -->
  365 + <view class="iconfont icon-share fs60"></view>
  366 + <!-- <view class="share-font">1分享</view> -->
  367 + <view class="fs22 c-7b">分享</view>
  368 + </view>
  369 + <!-- <view class="xc-val-price">
384 370 <view class="fs30" style='padding-left:13rpx;' wx:if="{{prom_st==1}}" >已抢:{{prom_act.buy_num+prom_act.virtual}}件</view>
385 371 <view class="fs30" style='padding-left:13rpx;' wx:else >已抢:0件</view>
386 372 <view class="fs30 save t-c">秒杀立省¥{{filters.toFix(data.market_price-prom_price,2)}}</view>
387   - </view>
  373 + </view> -->
388 374 </view>
389 375 </view>
390 376  
... ... @@ -392,7 +378,7 @@
392 378 {{data.goods_name}}
393 379 </view>
394 380  
395   - <view wx:if="{{prom_type==1}}" style='height:58rpx'></view>
  381 + <!-- <view wx:if="{{prom_type==1}}" style='height:58rpx'></view> -->
396 382 <!-- 许程 7.24 暂时注释 -->
397 383 <view wx:if="{{prom_type==1}}">
398 384 <view class="goods-num" wx:if="{{prom_type==1}}">
... ... @@ -428,16 +414,16 @@
428 414 <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
429 415 <view class="fs30" style="color:black;">选择门店</view>
430 416 </view>
431   - <view class="red_bb fs30">
  417 + <view class="red_bb fs26">
432 418 更多门店
433 419 <text class="bg_jj"></text>
434 420 </view>
435 421 </view>
436 422  
437 423 <view wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
438   - <view class="flex-space-between address ai_end ">
  424 + <view class="flex-space-between address ai_end pdv10">
439 425 <view>
440   - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
  426 + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text>
441 427 </view>
442 428 <view class="distance fs24"wx:if="{{def_pick_store.distance!=null}}">
443 429 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
... ... @@ -465,12 +451,14 @@
465 451 <view class="bdt16" wx:if="{{prom_type!=1&&prom_act.kttype!=3&&prom_act.kttype!=2&&prom_act.kttype!=1 && is_closecoupon!=1}}">
466 452 <view class="cx-frame flex" style="position: relative" wx:if="{{fir_quan.length>0}}">
467 453 <view class="cx-sizs fs30">领券</view>
468   - <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="{{index}}">
469   - <view class="circle xc-circular xc-one"></view>
470   - <view class="xc-coupon t-c four-level-word">满{{item.condition}}减{{item.money}}</view>
471   - <view class="circle xc-circular xc-two"></view>
472   - </view>
473   -
  454 + <view class="flex ai_c f1 pdh20">
  455 + <view class="xc-coupon-fram" wx:for="{{fir_quan}}" wx:key="{{index}}">
  456 + <view class="circle xc-circular xc-one"></view>
  457 + <view class="xc-coupon t-c four-level-word">满{{item.condition}}减{{item.money}}</view>
  458 + <view class="circle xc-circular xc-two"></view>
  459 + </view>
  460 + </view>
  461 +
474 462 <view data-coupon="1" bindtap="switchCoupon" class="cx-obtain-coupon wsize">
475 463 <text class="bg_jj"></text>
476 464 </view>
... ... @@ -480,9 +468,9 @@
480 468 <!-- 要判断是不是有促销活动 -->
481 469 <block wx:if="{{prom_goods}}">
482 470 <view class="cx-frame flex" style="position: relative; height: auto" >
483   - <view class="cx-sizs wsize">促销</view>
  471 + <view class="cx-sizs fs30">促销</view>
484 472 <!-- 中间显示层 -->
485   - <view style="margin-top: 36rpx">
  473 + <view class="f1 pdh20">
486 474 <view class="cx_show_view flex fs28" wx:for="{{prom_goods}}">
487 475 <view class="prom_condition">消费满{{item.condition}}<text wx:if="{{item.prom_type==1}}">件</text><text wx:else>元</text></view>
488 476 <view class="word {{is_more_cx?'':'ellipsis-1'}}">
... ... @@ -519,9 +507,17 @@
519 507 </block>
520 508  
521 509  
522   - <view class="bz_view flex ai-center bdt16" wx:if="{{bconfig}}" style="line-height: 36rpx">
  510 + <view class="bz_view flex bdt16" wx:if="{{bconfig}}" style="">
523 511 <image class="bzfu_img" src="{{iurl}}/miniapp/images/bzfu_w.png"></image>
524   - <view class="bz-content">{{bconfig.service_bz}}</view>
  512 + <view class="flex f1 ai_c rel">
  513 + <view class="bz-content {{flag ? '':'ellipsis-1'}} f1">{{bconfig.service_bz}}</view>
  514 + <view bindtap="clickCollapse" class="cx-obtain-coupon wsize arrow">
  515 + <text class="bg_jj {{flag?'down1':''}}"></text>
  516 + </view>
  517 + <!-- <text class="bg_jj" bindtap="clickCollapse"></text> -->
  518 + <!-- <text class="iconfont icon-shuangjiantouxia c-db"></text> -->
  519 + </view>
  520 +
525 521 </view>
526 522  
527 523  
... ... @@ -548,10 +544,10 @@
548 544  
549 545  
550 546 <!--- 宝贝评价 ---->
551   - <view class="bdt16" style="overflow: hidden">
  547 + <view class="bdt16">
552 548 <view class="bb_view">
553   - <view>宝贝评价({{categories3[0].num}})</view>
554   - <view class="red_bb" bindtap="look_pj">查看全部
  549 + <view class="bold">宝贝评价({{categories3[0].num}})</view>
  550 + <view class="red_bb fs26" bindtap="look_pj">查看全部
555 551 <text class="bg_jj"></text>
556 552 </view>
557 553 </view>
... ... @@ -564,8 +560,8 @@
564 560 </view>
565 561  
566 562 <scroll-view scroll-x="true" class="pj_scroll">
567   -
568   - <view class="xc_comment-detail" style="display: inline-block" wx:for="{{fir_comments}}" wx:key="fir_comments">
  563 + <view class="flex">
  564 + <view class="xc_comment-detail" style="" wx:for="{{fir_comments}}" wx:key="fir_comments">
569 565 <view class="xc_comment-left">
570 566 <view class="xc_comment-user">
571 567 <view class="xc_user-img">
... ... @@ -577,8 +573,8 @@
577 573 <image class="xc_comment-img" src="{{iurl}}/miniapp/images/star-red.png" wx:for="{{item.sum_rank}}" wx:key="{{index}}"></image>
578 574 </view>
579 575 </view>
580   - <view class="xc_comment-font pj_word_size ellipsis-2">
581   - {{item.content?item.content:'此用户没有填写评价。'}}
  576 + <view class="xc_comment-font pj_word_size ellipsis-1 pdt12">
  577 + <text class="ellipsis-1">{{item.content?item.content:'此用户没有填写评价。'}} </text>
582 578 </view>
583 579 <view class="xc_comment-val">
584 580 <view class="xc_comment-time">{{item.add_time}}</view>
... ... @@ -591,89 +587,92 @@
591 587 <image wx:else class="xc_goods-img" src='{{gallery[0].image_url}}'></image>
592 588 </view>
593 589 </view>
594   -
  590 + </view>
595 591 </scroll-view>
596 592 </view>
597 593  
598 594 <!-- 图文详情 -->
599   - <view>
600   - <view class="tuwen_title">
  595 + <view class="bdt16">
  596 + <!-- <view class="tuwen_title">
601 597 <view class="g_line"></view>
602 598 <view class="center_s">
603 599 <image src="{{iurl}}/miniapp/images/tuwen_c.png"></image>
604 600 <text>详情</text>
605 601 </view>
606   - </view>
  602 + </view> -->
607 603 <view class="t_g_info">
608 604 <view class="red_shu"></view>
609   - <view class="fs30">商品信息</view>
610   - </view>
611   - <view class="table_s">
612   - <view class="tb_item tb-l">
613   - <view class="item_left">
614   - <text>商品名称</text>
615   - </view>
616   - <view class="item_right">
617   - <text>{{data.goods_name}}</text>
618   - </view>
619   - </view>
620   - <view class="tb_item tb-l">
621   - <view class="item_left">
622   - <text>商品编号</text>
623   - </view>
624   - <view class="item_right">
625   - <text>{{data.goods_sn}}</text>
626   - </view>
627   - </view>
628   - <view class="tb_item tb-l">
629   - <view class="item_left">
630   - <text>商品条码</text>
631   - </view>
632   - <view class="item_right">
633   - <text>{{data.sku}}</text>
634   - </view>
635   - </view>
636   - <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}">
637   - <view class="item_left">
638   - <text>品类</text>
639   - </view>
640   - <view class="item_right">
641   - <text>{{cat_name}}</text>
642   - </view>
643   - </view>
644   - <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}">
645   - <view class="item_left">
646   - <text>品牌</text>
647   - </view>
648   - <view class="item_right">
649   - <text>{{brand_name}}</text>
650   - </view>
651   - </view>
652   - <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}">
653   - <view class="item_left">
654   - <text>国别</text>
655   - </view>
656   - <view class="item_right">
657   - <text>{{nation_name}}</text>
658   - </view>
659   - </view>
660   - <view class="tb_item tb-l">
661   - <view class="item_left">
662   - <text>规格</text>
663   - </view>
664   - <view class="item_right">
665   - <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text>
666   - </view>
667   - </view>
668   - <view class="tb_item tb-l">
669   - <view class="item_left">
670   - <text>上架时间</text>
671   - </view>
672   - <view class="item_right">
673   - <text>{{data.on_time}}</text>
674   - </view>
675   - </view>
  605 + <view class="fs30 bold">商品详情</view>
676 606 </view>
  607 + <view class="pd20">
  608 + <view class="table_s">
  609 + <view class="tb_item tb-l">
  610 + <view class="item_left">
  611 + <text>商品名称</text>
  612 + </view>
  613 + <view class="item_right">
  614 + <text>{{data.goods_name}}</text>
  615 + </view>
  616 + </view>
  617 + <view class="tb_item tb-l">
  618 + <view class="item_left">
  619 + <text>商品编号</text>
  620 + </view>
  621 + <view class="item_right">
  622 + <text>{{data.goods_sn}}</text>
  623 + </view>
  624 + </view>
  625 + <view class="tb_item tb-l">
  626 + <view class="item_left">
  627 + <text>商品条码</text>
  628 + </view>
  629 + <view class="item_right">
  630 + <text>{{data.sku}}</text>
  631 + </view>
  632 + </view>
  633 + <view class="tb_item tb-l" wx:if="{{cat_name && is_show_pl}}">
  634 + <view class="item_left">
  635 + <text>品类</text>
  636 + </view>
  637 + <view class="item_right">
  638 + <text>{{cat_name}}</text>
  639 + </view>
  640 + </view>
  641 + <view class="tb_item tb-l" wx:if="{{brand_name && is_show_pp}}">
  642 + <view class="item_left">
  643 + <text>品牌</text>
  644 + </view>
  645 + <view class="item_right">
  646 + <text>{{brand_name}}</text>
  647 + </view>
  648 + </view>
  649 + <view class="tb_item tb-l" wx:if="{{nation_name && is_show_gb}}">
  650 + <view class="item_left">
  651 + <text>国别</text>
  652 + </view>
  653 + <view class="item_right">
  654 + <text>{{nation_name}}</text>
  655 + </view>
  656 + </view>
  657 + <view class="tb_item tb-l">
  658 + <view class="item_left">
  659 + <text>规格</text>
  660 + </view>
  661 + <view class="item_right">
  662 + <text>{{filters.show_gui_ge(data.goods_spec,data.goods_color)}}</text>
  663 + </view>
  664 + </view>
  665 + <view class="tb_item tb-l">
  666 + <view class="item_left">
  667 + <text>上架时间</text>
  668 + </view>
  669 + <view class="item_right">
  670 + <text>{{data.on_time}}</text>
  671 + </view>
  672 + </view>
  673 + </view>
  674 + </view>
  675 +
677 676 <!--详情图片-->
678 677 <view class="wxParse">
679 678 <template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
... ... @@ -1040,7 +1039,7 @@
1040 1039 <view class="flex-space-between address ai_end xc-width ">
1041 1040  
1042 1041 <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
1043   - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
  1042 + <text class="fs30 xc-black3 shop_name bold">{{def_pick_store.pickup_name}}</text>
1044 1043 <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}">
1045 1044 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
1046 1045  
... ... @@ -1072,7 +1071,7 @@
1072 1071  
1073 1072 <!--商品的属性项目-->
1074 1073 <view class="xc-goods-attribute">
1075   - <view hidden="{{ismend==1}}" class="spec-name">商品属性</view>
  1074 + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
1076 1075 <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
1077 1076 <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-gid='{{item.goods_id}}' wx:for="{{sku_g}}" wx:key="sku_g">
1078 1077 {{item.gg}}
... ... @@ -1084,7 +1083,7 @@
1084 1083 <view class="b_num">
1085 1084 <view>购买数量</view>
1086 1085 <view class="count">
1087   - <view bindtap="subCartNum" class="sub">-</view>
  1086 + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
1088 1087 <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
1089 1088 <view bindtap="addCartNum" class="add">+</view>
1090 1089 </view>
... ... @@ -1250,13 +1249,12 @@
1250 1249 <view class="cover-layer flex-center" data-coupon='0' bindtap="switchCoupon"></view>
1251 1250 <view class="cx-popup {{coupon== true ? 'up' : 'down'}} ">
1252 1251 <view class="top-frame">
1253   - <view class="top two-level-word t-c">
1254   - 优惠券领取
1255   - </view>
  1252 + <!-- <view class="top two-level-word t-c"> -->
  1253 + <view class="top t-c">优惠券领取</view>
1256 1254 </view>
1257   - <view class="top-frame">
  1255 + <!-- <view class="top-frame">
1258 1256 <view class="xc-valid-coupon four-level-word">可以领优惠券</view>
1259   - </view>
  1257 + </view> -->
1260 1258 <view class="xc-frame">
1261 1259 <view class="top-frame">
1262 1260 <view class="xc-coupon-frame ">
... ... @@ -1265,9 +1263,9 @@
1265 1263 <view class="coupon flex">
1266 1264 <view class="circle xc-circular-one"></view>
1267 1265 <view class="xc-coupon-left ">
1268   - <view class="flex xc-money-frame">
1269   - <view class=" xc-money two-level-word xc-rmb">¥</view>
1270   - <view class="one-level-word xc-money">{{item.money}}</view>
  1266 + <view class="flex ai_c xc-money-frame">
  1267 + <text class="xc-money two-level-word xc-rmb">¥</text>
  1268 + <text class="one-level-word xc-money">{{item.money}}</text>
1271 1269 </view>
1272 1270 <view class="xc-money four-level-word xc-spacing">
1273 1271 满{{item.condition}}元可用
... ... @@ -1276,7 +1274,7 @@
1276 1274 <view class="xc-coupon-right flex">
1277 1275 <view class="xc-detail-coupon">
1278 1276 <view class="four-level-word">订单金额满{{item.condition}}元可用</view>
1279   - <view class="four-level-word xc-below">{{item.start}}-{{item.end}}</view>
  1277 + <view class="four-level-word xc-below">{{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)}}</view>
1280 1278 </view>
1281 1279 <view class="flex-vertical">
1282 1280 <view class="three-level-word xc-get background {{item.everyone_num>0 && item.lqnum>=item.everyone_num?'nouse':''}}"
... ... @@ -1289,8 +1287,8 @@
1289 1287 </view>
1290 1288 </view>
1291 1289 </view>
1292   - <view class="cx-confirm flex-center" data-coupon='0' bindtap="switchCoupon">
1293   - <view class="confirm t-c">确定</view>
  1290 + <view class="cx-confirm pd20" data-coupon='0' bindtap="switchCoupon">
  1291 + <view class="confirm t-c">关闭</view>
1294 1292 </view>
1295 1293 </view>
1296 1294 </view>
... ... @@ -1445,6 +1443,10 @@
1445 1443 <warn id="warn"></warn>
1446 1444  
1447 1445  
  1446 +<!-- 分享控件,底部弹出 -->
  1447 +<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum" wx:if="{{share_hidden}}"></share>
  1448 +
  1449 +
1448 1450 <view wx:if="{{showPoster}}">
1449 1451 <view class="mask" catchtap="closePoster"></view>
1450 1452 <view class="poster-container">
... ...
pages/goods/goodsInfo/goodsInfo.wxss
1 1 @import "../../../utils/wxParse/wxParse.wxss";
2   -.container { margin-bottom: 100rpx; overflow: hidden;}
  2 +.container { margin-bottom: 100rpx; overflow: hidden;padding-top: 80rpx;}
3 3 image {
4 4 vertical-align: top;
5 5 }
... ... @@ -9,15 +9,19 @@ image {
9 9 display: flex;
10 10 justify-content: center;
11 11 width: 100%;
  12 + position: fixed;
  13 + top: 0;
  14 + z-index: 999;
12 15 /* height: 80rpx; */
13 16 /* margin-bottom: 20rpx; */
14 17 background-color: #fff;
  18 + border-top: 2rpx solid #ebedf0;
15 19 /* border-bottom: 1rpx #fafafa solid; */
16 20 }
17 21 .type-box {
18 22 width: 25%;
19 23 box-sizing: border-box;
20   - font-size: 28rpx;
  24 + font-size: 32rpx;
21 25 line-height: 76rpx;
22 26 padding: 0 20rpx;
23 27 text-align: center;
... ... @@ -29,12 +33,14 @@ image {
29 33 display: flex;
30 34 justify-content: center;
31 35 width: 100%;
  36 + font-size: 26rpx;
32 37 }
33 38 .type-item-on {
34 39 color: #F95D74;
35 40 font-weight: bold;
36 41 /* border-bottom: 4rpx solid #F95D74; */
37 42 position: relative;
  43 + font-size: 30rpx;
38 44 }
39 45 .type-item-on:after {
40 46 content: '';
... ... @@ -53,19 +59,21 @@ image {
53 59 }
54 60 .goods-title {
55 61 display: flex;
56   - justify-content: space-between; overflow: hidden;
  62 + justify-content: space-between;
  63 + /* overflow: hidden; */
57 64 /* height: 108rpx; */
58 65 }
59 66 .goods-name {
60   - width: 560rpx;
61   - line-height: 46rpx;
  67 + /* width: 560rpx; */
  68 + /* line-height: 46rpx; */
62 69 font-size: 32rpx;
63 70 font-weight: bold;
64 71 color: #333;
65   - margin-top: 30rpx;
66   - margin-bottom:30rpx;
  72 + /* margin-top: 30rpx;
  73 + margin-bottom:30rpx; */
67 74 flex: 1;
68 75 text-align: justify;
  76 + margin: 10rpx 0 20rpx;
69 77 }
70 78  
71 79 .goods-collect {
... ... @@ -89,13 +97,13 @@ image {
89 97 .goods-price {
90 98 font-size: 60rpx;
91 99 /* padding: 20rpx 34rpx; */
92   - padding:0rpx 34rpx;
  100 + /* padding:0rpx 34rpx; */
93 101 /* line-height: 60rpx; */
94 102 color: #999;
95   -
  103 + padding: 20rpx;
96 104 /* margin-top: 46rpx; */
97   - margin-top:26rpx;
98   - padding-bottom:20rpx;
  105 + /* margin-top:26rpx;
  106 + padding-bottom:20rpx; */
99 107 }
100 108  
101 109 .prom-info {
... ... @@ -111,13 +119,13 @@ image {
111 119 border-radius: 4rpx;
112 120 }
113 121 .market-price {
114   - display: flex;
115   - margin-left: -5rpx;
  122 + /* display: flex;
  123 + margin-left: -5rpx; */
116 124 }
117 125  
118 126 .market-price .yuan{
119   - top:24rpx;
120   - font-size: 36rpx
  127 + /* top:24rpx; */
  128 + font-size: 30rpx
121 129 }
122 130  
123 131 .market-price>view>text {
... ... @@ -125,7 +133,8 @@ image {
125 133 }
126 134  
127 135 .market-price>.yj{
128   - color: #999999; font-size: 26rpx;margin-left: 16rpx;position: relative;top:30rpx;
  136 + color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */
  137 + display: inline-block;
129 138 }
130 139  
131 140 .goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;}
... ... @@ -551,17 +560,17 @@ border-radius: 0 56rpx 55rpx 0;
551 560 /* padding: 0 30rpx; */
552 561 font-size: 32rpx;
553 562 box-sizing: border-box;
554   - border-radius: 20rpx;
555   - height: 72%;
  563 + border-radius: 20rpx 20rpx 0 0;
  564 + /* height: 72%; */
556 565 }
557 566  
558   -.spec-model .pding{padding: 0 30rpx;}
  567 +.spec-model .pding{padding: 0 20rpx;}
559 568  
560 569 .spec-goods {
561 570 padding: 30rpx 0 20rpx;
562   - float: left;
  571 + /* float: left; */
563 572 width: 100%;
564   - border-bottom:2rpx solid #eee;
  573 + /* border-bottom:2rpx solid #eee; */
565 574 }
566 575  
567 576 .spec-img {
... ... @@ -608,13 +617,16 @@ border-radius: 0 56rpx 55rpx 0;
608 617 .quhuo{font-size: 30rpx; color: #000}
609 618 .b_num{
610 619 display: flex;font-size: 30rpx; color: #333;
  620 + justify-content: space-between;
  621 + align-items: center;
  622 + padding: 20rpx 0;
611 623 }
612 624  
613 625 .count {
614   - position: fixed;
  626 + /* position: fixed; */
615 627 display: flex;
616 628 height: 50rpx;
617   - border: 1rpx solid #000;
  629 + /* border: 1rpx solid #000; */
618 630 font-size: 28rpx;
619 631 right: 30rpx;
620 632 }
... ... @@ -631,12 +643,22 @@ border-radius: 0 56rpx 55rpx 0;
631 643 border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx;
632 644 }
633 645 .spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;}
634   -.sub {
635   - border-right: 1px solid #000;
  646 +.sub, .add, .count>input {
  647 + /* border-right: 1px solid #000; */
  648 + background-color: #f8f8f8;
  649 + border-radius: 8rpx;
  650 +}
  651 +.sub.active {
  652 + /* background-color: #ddd; */
  653 + color: #ccc;
  654 +}
  655 +.count>input {
  656 + margin: 0 10rpx;
636 657 }
637 658  
638 659 .add {
639   - border-left: 1px solid #000;
  660 + /* background-color: #f8f8f8; */
  661 + /* border-left: 1px solid #000; */
640 662 }
641 663  
642 664 .spec-btn {
... ... @@ -658,14 +680,15 @@ border-radius: 0 56rpx 55rpx 0;
658 680 }
659 681  
660 682 .spec-cart-btns {
661   - width: 92%;
  683 + /* width: 92%; */
662 684 line-height: 70rpx;
663   - margin: 0rpx auto;
664   - margin-top: 160rpx;
665   - border-radius: 20rpx;
666   -position: fixed;
667   -bottom: 50rpx;
668   -left: 4%;
  685 + /* margin: 0rpx auto;
  686 + margin-top: 160rpx; */
  687 + /* border-radius: 20rpx; */
  688 +/* position: fixed; */
  689 +/* bottom: 50rpx; */
  690 +/* left: 4%; */
  691 + padding: 20rpx;
669 692 }
670 693  
671 694 .spec-cart-btn {
... ... @@ -759,8 +782,8 @@ left:31rpx;}
759 782 /*------拼单------*/
760 783 .pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx}
761 784 .pt_view .secondkill-img{width: 100%;height: 100%;}
762   -.pt_fir{ background: #fff;margin-bottom: 10rpx; }
763   -.pt_fir .pt_fir_title{display: flex; align-items: center; margin-left: 10rpx; margin-top: 20rpx; font-size: 28rpx; position: relative;}
  785 +.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */}
  786 +.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;}
764 787 .pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx;
765 788 height: 40rpx; font-size: 24rpx; text-align: center;}
766 789 .pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;}
... ... @@ -782,7 +805,7 @@ left:31rpx;}
782 805 .t_gz{padding: 10rpx 20rpx; font-size:28rpx }
783 806  
784 807 .pt_fir.se1{height: auto; margin: 0}
785   -.pt_fir.se2{height: auto; margin: 0;border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee;}
  808 +.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */}
786 809  
787 810 .pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx;
788 811 border-bottom: 1rpx solid #E5E5E5 }
... ... @@ -804,14 +827,14 @@ left:31rpx;}
804 827 .pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx}
805 828 .pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid}
806 829  
807   -.jie_price{padding: 10rpx 30rpx;}
  830 +.jie_price{/* padding: 10rpx 30rpx; */}
808 831 .jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx}
809 832 .price_list{display: flex; width: 100%;}
810 833 .price_item{width: 25%;font-size: 28rpx; color: #4c336c}
811 834  
812   -.pt_fir.se2 .zzk-1{margin-top: 23rpx; font-size: 30rpx;position: relative; margin-bottom: 30rpx; border-left:4rpx solid red;margin-left:14rpx;height:30rpx;line-height:30rpx;padding-left:5rpx;}
813   -.ckgd{position: absolute;top:0;right:57rpx; color:#d70025; font-size: 32rpx;}
814   -.ckgd .arrow-one{width:18rpx;height:18rpx;border-color:#da0b31;margin-top:5rpx;}
  835 +.pt_fir.se2 .zzk-1{/* margin-top: 23rpx; */ font-size: 30rpx;position: relative; /* margin-bottom: 30rpx; */ border-left:4rpx solid red;/* margin-left:14rpx; */height:30rpx;line-height:30rpx;/* padding-left:5rpx; */}
  836 +.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;}
  837 +.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;}
815 838 .bview{
816 839 position: fixed; top:0; left:0; width: 100%; height: 100%;
817 840 background-color: rgba(0, 0, 0, 0.5);
... ... @@ -829,7 +852,7 @@ left:31rpx;}
829 852 .juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e}
830 853 .juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;}
831 854  
832   -.pt_qd{margin-top: 40rpx; height: auto;}
  855 +.pt_qd{/* margin-top: 40rpx; height: auto; */padding: 20rpx;}
833 856 .spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; }
834 857  
835 858 .sto_v{color: #333;}
... ... @@ -838,65 +861,71 @@ left:31rpx;}
838 861  
839 862 /*---多少人参加团--*/
840 863 .group {
841   - padding-top:25rpx;
842   - width: 91%;
843   - min-height: 92rpx;
844   - border-bottom:2rpx solid #eee;
845   - padding-bottom:25rpx;
  864 + padding-top:20rpx;
  865 + padding-bottom:20rpx;
  866 + width: 100%;
  867 + /* min-height: 92rpx; */
  868 + border-bottom: 2rpx solid #ebedf0;
846 869  
847 870 }
848 871  
849 872 .group .group-list {
850   -
851   - height: 90rpx;
852   - padding: 0 130rpx 0 100rpx;
853   - width: 470rpx;
  873 + display: flex;
  874 + align-items: center;
  875 + justify-content: space-around;
  876 + /* height: 90rpx; */
  877 + /* padding: 0 130rpx 0 100rpx; */
  878 + /* width: 470rpx;
854 879  
855   - position: absolute;
  880 + position: absolute; */
856 881 }
857 882  
858 883 .group .group-list .gtou {
859   - width: 80rpx;
860   - height: 80rpx;
861   - float: left;
  884 + width: 70rpx;
  885 + height: 70rpx;
  886 + /* float: left;
862 887 position: relative;
863 888 top: 6rpx;
864   - left: -96rpx;
  889 + left: -96rpx; */
865 890 }
866 891  
867 892 .group .group-list .gtou image {
868   - width: 80rpx;
869   - height: 80rpx;
870   - border-radius: 200rpx;
871   - background-color: green;
  893 + display: block;
  894 + width: 100%;
  895 + height: 100%;
  896 + border-radius: 50%;
  897 + background-color: #f0f0f0;
872 898 }
873 899  
874 900 .group .group-list .gdn {
875   - float: left;
  901 + width: 140rpx;
  902 + text-align: center;
  903 + /* float: left; */
876 904 font-size: 26rpx;
877   - line-height: 48rpx;
  905 + /* padding-left: 20rpx; */
  906 + /* line-height: 48rpx;
878 907 height: 48rpx;
879 908 width: 168rpx;
880 909 position: relative;
881 910 left: -80rpx;
882   - top:20rpx;
883   - font-weight:600;
  911 + top:20rpx; */
  912 + font-weight:bold;
884 913 }
885 914  
886 915 .group .group-list .ghaicha {
887   - width:300rpx;
  916 + /* width:300rpx; */
888 917 font-size: 27rpx;
889   - margin-left:180rpx;
  918 + /* margin-left:180rpx;
890 919 top:13rpx;
891   - left:-3rpx;
892   - font-weight:600;
  920 + left:-3rpx; */
  921 + font-weight: bold;
893 922  
894 923  
895 924 }
896 925  
897 926 .group .group-list .ghaicha .gred {
898   - height: 48rpx;
899   - width: 300rpx;
  927 + /* height: 48rpx;
  928 + width: 300rpx; */
900 929 }
901 930  
902 931 .gsj {
... ... @@ -907,9 +936,9 @@ left:31rpx;}
907 936 .group .group-list .cjt {
908 937 height:42rpx;
909 938 width: 137rpx;
910   - position: absolute;
  939 + /* position: absolute;
911 940 right: 4rpx;
912   - top:25rpx;
  941 + top:25rpx; */
913 942 line-height: 42rpx;
914 943 font-size: 24rpx;
915 944 color: #fff;
... ... @@ -922,7 +951,7 @@ left:31rpx;}
922 951 .gbody {
923 952 background-color: white;
924 953 }
925   -.t_show{overflow: hidden; display: flex; width: 300rpx; color: #292929; line-height: 36rpx;font-size:26rpx;
  954 +.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx;
926 955 }
927 956 .join-cart>view.set_width {
928 957 width:58%;
... ... @@ -951,8 +980,8 @@ left:31rpx;}
951 980 white-space:nowrap;
952 981 }
953 982  
954   -.tuwen_title{ height: 86rpx; background-color:#eeeeee; margin-bottom: 32rpx; position: relative;
955   - display: flex; justify-content: center;align-items: center; }
  983 +.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative;
  984 + display: flex; justify-content: center;align-items: center; padding: 20rpx;}
956 985  
957 986 .tuwen_title .g_line{
958 987 width:496rpx;
... ... @@ -964,27 +993,28 @@ left:31rpx;}
964 993 overflow: hidden; justify-content: center;align-items: center;
965 994 }
966 995 .tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx}
967   -.t_g_info{ margin: 0 34rpx;margin-bottom: 20rpx; display: flex; align-items: center }
  996 +.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; }
968 997 .red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; }
969 998  
970   -.tb-l{ line-height: 96rpx;}
971   -.table_s{ border:#e4e4e4 1rpx solid; width: 682rpx; margin: 0 34rpx;font-size: 30rpx;}
972   -.tb_item{display: flex; height: 96rpx; border-bottom: 1rpx solid #e4e4e4 }
973   -.item_left{width: 214rpx; height: 100%; background: #f9f9f9 ;border-right:1rpx solid #e4e4e4} .item_left text{ margin-left: 44rpx;}
974   -.item_right{width: 468rpx; height: 100%; overflow : hidden;white-space:nowrap;
975   - text-overflow: ellipsis;}
976   -.item_right text{ margin-left: 66rpx;}
  999 +.tb-l{ /* line-height: 96rpx; */}
  1000 +.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;}
  1001 +.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 }
  1002 +.item_left{width: 210rpx; height: 100%; box-sizing:border-box; text-align: center;padding: 20rpx; background: #f9f9f9 ;border-right:2rpx solid #e4e4e4} .item_left text{ /* margin-left: 44rpx; */}
  1003 +.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;}
  1004 +.item_right text{ /* margin-left: 66rpx; */}
  1005 +
  1006 +.table_s .tb-l:last-child {border-bottom: none;}
977 1007  
978   -.bzfu_img{ width: 164rpx; height:34rpx; margin-right: 18rpx; margin-left: 12rpx }
979   - .bz_view{ height:100rpx; padding: 0 34rpx 0 13rpx; color: #333; font-size: 28rpx;
  1008 +.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ }
  1009 + .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx;
980 1010 /* border-bottom: 3rpx solid #eee; */
981 1011 /* border-top: 3rpx solid #eee; */}
982   - .bz_view view{ width: 460rpx; max-height: 70rpx; overflow: hidden;}
  1012 + .bz_view view{ width: 460rpx; /* max-height: 70rpx; */ /* overflow: hidden; */}
983 1013  
984   -.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 0 34rpx; color: #333;
985   - font-size: 30rpx; height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx }
986   -.red_bb{ color: #d70026; min-width:158rpx;width: auto;}
987   -.bg_jj{ width: 18rpx; height:18rpx;
  1014 +.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333;
  1015 + font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ }
  1016 +.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */}
  1017 +.bg_jj{ width: 14rpx; height:14rpx;
988 1018 border-top: 2rpx solid #d70026;
989 1019 border-right: 2rpx solid #d70026;
990 1020 transform: rotate(45deg);display:inline-block;
... ... @@ -995,6 +1025,7 @@ left:31rpx;}
995 1025 .bz-content {
996 1026 flex-grow: 1;
997 1027 text-align: justify;
  1028 + padding: 0 30rpx 0 20rpx;
998 1029 }
999 1030  
1000 1031 /* 顶部边框 */
... ... @@ -1195,20 +1226,23 @@ left:31rpx;}
1195 1226  
1196 1227 .xc_comment{
1197 1228 display: flex;
  1229 + justify-content: space-around;
1198 1230 width: 100%;
1199   - height: 42rpx;
1200   - padding-left: 34rpx;
  1231 + box-sizing: border-box;
  1232 + padding: 10rpx 20rpx;
  1233 + /* height: 42rpx;
  1234 + padding-left: 34rpx; */
1201 1235 color: #333;
1202 1236  
1203 1237 }
1204 1238 .xc_comment-have-pictures{
1205 1239 width: 153rpx;
1206   - height: 42rpx;
  1240 + /* height: 42rpx; */
1207 1241 line-height: 42rpx;
1208 1242 text-align: center;
1209 1243 background: #ffe3e2;
1210 1244 color: 28rpx;
1211   - border-radius:20rpx;
  1245 + border-radius:21rpx;
1212 1246 font-size: 24rpx;
1213 1247 }
1214 1248 .xc_comment-discuss{
... ... @@ -1225,22 +1259,25 @@ left:31rpx;}
1225 1259  
1226 1260 .xc_comment-detail{
1227 1261 display: flex;
1228   - margin-top: 40rpx;
1229   - width: 524rpx;
1230   - margin-left: 34rpx;
1231   - border-radius: 25rpx;
1232   - border: 2rpx solid #d6d4d5;
1233   - overflow: hidden;
  1262 + /* margin-top: 40rpx; */
  1263 + /* width: 524rpx; */
  1264 + /* margin-left: 34rpx; */
  1265 + border-radius: 24rpx;
  1266 + border: 2rpx solid #ebedf0;
  1267 + margin-left: 20rpx;
  1268 + box-sizing: border-box;
  1269 + /* overflow: hidden; */
1234 1270 }
1235 1271  
1236 1272 .xc_user-img{
1237   - border-radius:50%;
  1273 + border-radius:50%;
  1274 + margin: auto 0;
1238 1275 }
1239 1276  
1240 1277 .xc_comment-user{
1241 1278 display: flex;
1242   - margin-top: 22rpx;
1243   - margin-left: 22rpx;
  1279 + /* margin-top: 22rpx;
  1280 + margin-left: 22rpx; */
1244 1281 }
1245 1282 .xc_user{
1246 1283 width: 170rpx;
... ... @@ -1248,34 +1285,34 @@ left:31rpx;}
1248 1285 margin-left: 6rpx;
1249 1286 overflow: hidden;
1250 1287 }
1251   -.xc_user-name{ height: 25rpx;}
  1288 +.xc_user-name{ /* height: 25rpx; */}
1252 1289 .xc_comment-img{
1253 1290 width: 22rpx;
1254 1291 height: 22rpx;
1255   - margin-top: 14rpx;
  1292 + /* margin-top: 14rpx; */
1256 1293 margin-right: 5rpx
1257 1294 }
1258 1295 .xc_comment-font{
1259   - height: 75rpx;
1260   - margin-left: 22rpx;
  1296 + /* height: 75rpx; */
  1297 + /* margin-left: 22rpx; */
1261 1298 white-space:normal;
1262 1299 overflow: hidden;
1263   - margin-top: 8rpx;
1264   - line-height: 38rpx;
  1300 + /* margin-top: 8rpx;
  1301 + line-height: 38rpx; */
1265 1302  
1266 1303 }
1267 1304 .xc_comment-val{
1268   - width: 88%;
  1305 + /* width: 88%;
1269 1306 height: 30rpx;
1270 1307 margin-left: 22rpx;
1271 1308 display: flex;
1272 1309 margin-top: 15rpx;
1273   - margin-bottom:15rpx;
  1310 + margin-bottom:15rpx; */
1274 1311 }
1275 1312  
1276 1313 .xc_comment-time{
1277   - height: 30rpx;
1278   - font-size: 24rpx;
  1314 + /* height: 30rpx; */
  1315 + font-size: 22rpx;
1279 1316 color: #a5a5a5;
1280 1317 overflow: hidden;
1281 1318 }
... ... @@ -1286,14 +1323,17 @@ left:31rpx;}
1286 1323 .xc_comment-left{
1287 1324 display:inline-block;
1288 1325 width: 312rpx;
  1326 + padding: 20rpx;
1289 1327 }
1290 1328 .xc_goods-img-frame{
1291   - display:inline-block;
1292   - width: 40%;
  1329 + border-radius: 0 22rpx 22rpx 0;
  1330 + overflow: hidden;
  1331 + /* display:inline-block; */
  1332 + /* width: 40%;
1293 1333 height: 90%;
1294 1334 text-align: center;
1295 1335 padding-top: 30rpx;
1296   - vertical-align: top;
  1336 + vertical-align: top; */
1297 1337 }
1298 1338 .xc_imgs{
1299 1339 width: 50rpx;
... ... @@ -1304,11 +1344,13 @@ left:31rpx;}
1304 1344  
1305 1345 .pj_word_size{ font-size: 28rpx}
1306 1346 .pj_scroll{
1307   - white-space: nowrap;
  1347 + /* white-space: nowrap; */
1308 1348 /* height: 324rpx; */
1309   - margin-bottom: 50rpx;
  1349 + /* margin-bottom: 50rpx; */
1310 1350 display: flex;
1311 1351 align-items: center;
  1352 + padding: 20rpx 0;
  1353 + /* box-sizing: border-box; */
1312 1354 /* box-shadow: 0 8px 12px #e7e9eb; */
1313 1355 }
1314 1356  
... ... @@ -1322,57 +1364,61 @@ left:31rpx;}
1322 1364 }
1323 1365 .cx-frame{
1324 1366 /* border-top:3rpx solid #eee; */
1325   - width:99%;
  1367 + /* width:99%;
1326 1368 height: 95rpx;
1327 1369 line-height: 95rpx;
1328   - padding-left:24rpx;
1329   -
1330   -
  1370 + padding-left:24rpx; */
  1371 + padding: 20rpx;
1331 1372 }
1332 1373 .cx-frame .cx-sizs{
1333   - width: 68rpx;
1334   - height: 100%;
1335   - line-height: 100rpx;
1336   - overflow: hidden;
1337   - margin-left: 10rpx;
  1374 + /* width: 68rpx; */
  1375 + /* height: 100%; */
  1376 + /* line-height: 100rpx; */
  1377 + /* overflow: hidden; */
  1378 + /* margin-left: 10rpx; */
1338 1379 }
1339 1380 .xc-coupon-fram{
1340 1381 position: relative;
1341   - width:200rpx;
1342   - padding-top:30rpx;
  1382 + margin-right: 16rpx;
  1383 + /* width:200rpx; */
  1384 + /* padding-top:30rpx; */
1343 1385  
1344 1386 }
1345 1387 .xc-coupon-fram .xc-coupon{
1346   - width:175rpx ;
  1388 + /* width:175rpx ;
1347 1389 height: 40rpx;
1348   - line-height: 40rpx;
  1390 + line-height: 40rpx; */
1349 1391 background-color:#d60021 ;
1350   - margin:0 auto;
  1392 + /* margin:0 auto; */
1351 1393 color:#fff;
1352   -
  1394 + padding: 6rpx 20rpx;
1353 1395  
1354 1396 }
1355 1397 .xc-coupon-fram .xc-circular{
1356   - width: 22rpx;
1357   - height:22rpx;
1358   - background-color:#fff;
  1398 + width: 16rpx;
  1399 + height:16rpx;
  1400 + background-color: white;
1359 1401 position:absolute;
1360   - top: 40rpx;
  1402 + top: 50%;
  1403 + /* left: -10rpx; */
  1404 + transform: translateY(-50%);
1361 1405 }
1362 1406 .xc-coupon-fram .xc-one{
1363   - left:3rpx;
  1407 + left: -8rpx;
1364 1408 }
1365 1409 .xc-coupon-fram .xc-two{
1366   - left: 178rpx;
  1410 + right: -8rpx;
1367 1411 }
1368 1412  
1369 1413 .cx-obtain-coupon{
1370   - width: 65rpx;
  1414 + /* width: 65rpx;
1371 1415 height: 100%;
1372   - padding-left:15rpx;
  1416 + padding-left:15rpx; */
1373 1417 color: #d70025;
1374   - position: absolute;
1375   - right: 5rpx;
  1418 + display: flex;
  1419 + align-items: center;
  1420 + /* position: absolute;
  1421 + right: 5rpx; */
1376 1422 }
1377 1423  
1378 1424 /* 自定义弹出窗口 */
... ... @@ -1387,18 +1433,20 @@ left:31rpx;}
1387 1433 }
1388 1434  
1389 1435 .cx-popup .top{
1390   - width: 90%;
1391   - height:85rpx;
1392   - border-bottom: 4rpx solid #d5d5d5;
1393   - padding-top: 50rpx;
1394   - font-weight:600;
  1436 + /* width: 90%;
  1437 + height:85rpx; */
  1438 + font-size: 32rpx;
  1439 + padding: 20rpx 0;
  1440 + border-bottom: 2rpx solid #ebedf0;
  1441 + /* padding-top: 50rpx;
  1442 + font-weight:600; */
1395 1443  
1396 1444 }
1397 1445 .cx-popup .top-frame{
1398   - width: 100%;
  1446 + /* width: 100%;
1399 1447 display: flex;
1400 1448 justify-content: center;
1401   - overflow: hidden;
  1449 + overflow: hidden; */
1402 1450 }
1403 1451 .xc-valid-coupon{
1404 1452 width: 90%;
... ... @@ -1409,41 +1457,52 @@ left:31rpx;}
1409 1457 .xc-frame{
1410 1458 position: relative;
1411 1459 }
1412   -.xc-coupon-frame{
1413   - width: 90%;
  1460 +.xc-coupon-frame {
  1461 + width: 100%;
1414 1462 max-height: 560rpx;
1415 1463 overflow: auto;
1416 1464  
1417 1465 }
1418   -.xc-coupon-frame .coupon{
1419   - width:99%;
  1466 +.xc-coupon-frame .rel:not(:first-child) {
  1467 + margin-top: 20rpx;
  1468 +}
  1469 +.xc-coupon-frame .coupon {
  1470 + width:100%;
1420 1471 height: 168rpx;
1421 1472 border-radius: 25rpx;
1422   - border:3rpx solid #ffdcdc;
  1473 + border:2rpx solid #ffdcdc;
1423 1474 overflow: hidden;
1424   - margin-top:16rpx;
  1475 + /* margin-top:16rpx; */
  1476 + box-sizing: border-box;
1425 1477  
1426 1478 }
  1479 +/* .xc-coupon-frame .coupon ~ .coupon {
  1480 + margin-top:16rpx;
  1481 +} */
1427 1482 .xc-coupon-left{
1428 1483 width: 216rpx;
1429   - height: 100%;
  1484 + /* height: 100%; */
1430 1485 background-color: #ffeeef;
1431 1486 border-right: 4rpx dashed #ffdbd9;
1432 1487 overflow: hidden;
1433   - line-height: 100%;
1434   -
  1488 + /* line-height: 100%; */
  1489 + display: flex;
  1490 + flex-direction: column;
  1491 + justify-content: center;
  1492 + align-items: center;
  1493 + flex-shrink: 0;
1435 1494 }
1436 1495 .xc-money{
1437 1496 color: #f30026;
1438 1497 text-align:center;
1439 1498 }
1440 1499 .xc-rmb{
1441   - width:44rpx;
1442   - padding-top:7rpx;
  1500 + /* width:44rpx;
  1501 + padding-top:7rpx; */
1443 1502 }
1444 1503 .xc-money-frame{
1445   - margin-left:35rpx;
1446   - margin-top:48rpx;
  1504 + /* margin-left:35rpx;
  1505 + margin-top:48rpx; */
1447 1506  
1448 1507 }
1449 1508 .xc-spacing{
... ... @@ -1451,45 +1510,52 @@ left:31rpx;}
1451 1510 }
1452 1511 .xc-circular-one{
1453 1512 position: absolute;
1454   - top:-8rpx;
1455   - left:208rpx;
1456   - width: 27rpx;
  1513 + top:-15rpx;
  1514 + left:205rpx;
  1515 + width: 30rpx;
1457 1516 height: 30rpx;
1458 1517 background: #fff;
1459 1518 overflow: hidden;
1460 1519 }
1461 1520 .xc-circular-two{
1462 1521 position: absolute;
1463   - top:150rpx;
1464   - left:207rpx;
1465   - width: 27rpx;
  1522 + bottom: -15rpx;
  1523 + /* top:150rpx; */
  1524 + left:205rpx;
  1525 + width: 30rpx;
1466 1526 height:30rpx;
1467 1527 background: #fff;
1468 1528 }
1469 1529 .xc-detail-coupon{
1470   - margin-left: 22rpx;
  1530 + /* margin-left: 22rpx;
1471 1531 overflow: hidden;
1472   - padding-top: 43rpx;
1473   -
  1532 + padding-top: 43rpx; */
  1533 + /* display: flex;
  1534 + align-items: center; */
1474 1535 }
1475 1536 .xc-coupon-right{
1476   - width: 455rpx;
1477   - height: 100%;
  1537 + /* width: 455rpx;
  1538 + height: 100%; */
1478 1539 background: #fffaf9;
  1540 + padding: 20rpx;
  1541 + box-sizing: border-box;
  1542 + width: 100%;
  1543 + justify-content: space-between;
  1544 + align-items: center;
1479 1545 }
1480 1546 .xc-below{
1481   - margin-top:22rpx;
  1547 + margin-top:20rpx;
1482 1548  
1483 1549 }
1484 1550 .xc-get{
1485 1551  
1486   - width: 132rpx;
1487   - height: 48rpx;
  1552 + width: 140rpx;
  1553 + /* height: 48rpx; */
1488 1554 color: #fff;
1489 1555 text-align: center;
1490   - border-radius:20rpx;
1491   - line-height:48rpx;
1492   - margin-left:20rpx;
  1556 + border-radius:27rpx;
  1557 + line-height:54rpx;
  1558 + /* margin-left:20rpx; */
1493 1559 }
1494 1560  
1495 1561 .background{
... ... @@ -1507,16 +1573,19 @@ left:31rpx;}
1507 1573  
1508 1574 .cx-confirm{
1509 1575 width: 100%;
1510   - height: 160rpx;
  1576 + padding: 20rpx;
  1577 + box-sizing: border-box;
  1578 + /* height: 160rpx; */
1511 1579  
1512 1580 }
1513 1581 .cx-confirm .confirm{
1514   - width: 372rpx;
1515   - height: 60rpx;
1516   - background: #f40026;
  1582 + /* width: 372rpx;
  1583 + height: 60rpx; */
  1584 + background-color: #f40026;
1517 1585 color: #fff;
1518   - border-radius:20rpx;
1519   - line-height:60rpx;
  1586 + border-radius:10rpx;
  1587 + line-height: 80rpx;
  1588 + font-size: 28rpx;
1520 1589  
1521 1590 }
1522 1591  
... ... @@ -1527,17 +1596,21 @@ left:31rpx;}
1527 1596  
1528 1597  
1529 1598 /* 分享 */
  1599 +.icon-share {
  1600 + font-size: 46rpx;
  1601 + color: #d60021;
  1602 +}
1530 1603 .xc-share-frame{
1531   - width: 129rpx;
  1604 + /* width: 129rpx;
1532 1605 height: 48rpx;
1533 1606 border-top-left-radius: 18rpx;
1534   - border-bottom-left-radius: 18rpx;
1535   - background: #d60021;
1536   - position:absolute;
  1607 + border-bottom-left-radius: 18rpx; */
  1608 + /* background: #d60021; */
  1609 + /* position:absolute;
1537 1610 left:622rpx;
1538 1611 top:-37rpx;
1539 1612 line-height:50rpx;
1540   - margin-top:52rpx;
  1613 + margin-top:52rpx; */
1541 1614 }
1542 1615 .xc-share-frame-jieti{
1543 1616 width: 129rpx;
... ... @@ -1555,6 +1628,7 @@ left:31rpx;}
1555 1628  
1556 1629 }
1557 1630  
  1631 +
1558 1632 .xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{
1559 1633 width: 30rpx;
1560 1634 height: 30rpx;
... ... @@ -1775,10 +1849,10 @@ xc-ensure-div{
1775 1849 padding-top: 24rpx;
1776 1850 overflow: hidden;
1777 1851 }
1778   -.xc-frame{
1779   - width: 100%;
1780   - margin-top:20rpx;
1781   -
  1852 +.xc-frame {
  1853 + /* width: 100%;
  1854 + margin-top:20rpx; */
  1855 + padding: 20rpx;
1782 1856 }
1783 1857  
1784 1858 .xc-frame .list-frame{
... ... @@ -1813,7 +1887,7 @@ xc-ensure-div{
1813 1887 }
1814 1888  
1815 1889 .xc-money-frame{
1816   - margin-left:35rpx;
  1890 + /* margin-left:35rpx; */
1817 1891  
1818 1892 }
1819 1893 .xc-coupon-effect{
... ... @@ -1948,11 +2022,11 @@ xc-ensure-div{
1948 2022 }
1949 2023  
1950 2024 .xc-video{
1951   - width:100rpx;
1952   - height: 50rpx;
1953   - line-height: 50rpx;
  2025 + /* width:100rpx; */
  2026 + /* height: 50rpx;
  2027 + line-height: 50rpx; */
1954 2028 text-align: center;
1955   - margin-left:-30rpx;
  2029 + /* margin-left:-30rpx; */
1956 2030  
1957 2031  
1958 2032 }
... ... @@ -2026,7 +2100,7 @@ xc-ensure-div{
2026 2100  
2027 2101  
2028 2102 .wsize{font-size: 32rpx}
2029   -.five-level-word{font-size: 28rpx;}
  2103 +.five-level-word{font-size: 24rpx;}
2030 2104  
2031 2105  
2032 2106 /*-- 推荐商品 --*/
... ... @@ -2099,13 +2173,13 @@ padding-left:24rpx;
2099 2173  
2100 2174 .xc-linellae-frame{
2101 2175 width: 100%;
2102   - height: 60rpx;
  2176 + height: 70rpx;
2103 2177 background: #f2f2f2;
2104 2178 }
2105 2179 .xc-linellae-frame .xc-linellae{
2106 2180 width: 386rpx;
2107 2181 height: 1rpx;
2108   - border-bottom: 1rpx solid #a5a5a5;
  2182 + border-bottom: 1rpx solid #ebedf0;
2109 2183 }
2110 2184 .xc-recommend-frame{
2111 2185 background:#f2f2f2;
... ... @@ -2128,7 +2202,8 @@ margin-top: 1rpx;
2128 2202 }
2129 2203 .xc-price-frame{
2130 2204 color: #ec0022;
2131   -height:44rpx;
  2205 + align-items: baseline;
  2206 +/* height:44rpx; */
2132 2207 }
2133 2208 .xc-price-frame .sign{
2134 2209 margin-top:19rpx;
... ... @@ -2159,6 +2234,9 @@ padding-left:-4rpx;
2159 2234 .xc-explain{
2160 2235 color:#292929;
2161 2236 width:542rpx;
  2237 + margin: 10rpx 0 20rpx;
  2238 + width: 100%;
  2239 + font-weight: bold;
2162 2240 }
2163 2241 .xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;}
2164 2242 .xc-item .yuan{
... ... @@ -2264,15 +2342,16 @@ margin-top:5rpx;
2264 2342 }
2265 2343 .xc-goods-explain{
2266 2344 width:100%;
2267   - padding-left:30rpx;
  2345 + /* padding-left:30rpx;
2268 2346 margin-left:-9rpx;
2269   - height: 150rpx
  2347 + height: 150rpx */
2270 2348 }
2271 2349 .xc-partner-frame{
2272 2350 border-bottom:2rpx solid #eee;
2273 2351 width:100%;
2274   -padding:0 20rpx;
2275   -height:56rpx;
  2352 +padding:20rpx;
  2353 +/* height:56rpx; */
  2354 +box-sizing: border-box;
2276 2355 }
2277 2356 .xc-person-number{
2278 2357 width:120rpx;
... ... @@ -2294,41 +2373,43 @@ right:17rpx; top:55rpx;
2294 2373 /* border-top:1rpx solid #eee; */
2295 2374 width: 100%;
2296 2375 height: auto;
  2376 + padding: 20rpx;
  2377 + box-sizing: border-box;
2297 2378 }
2298 2379 .on_height{
2299 2380 height: 90rpx;
2300 2381 }
2301 2382 .sn_height{
2302   - min-height: 170rpx; height: auto;padding: 10rpx 0;
  2383 + /* min-height: 170rpx; height: auto;padding: 10rpx 0; */
2303 2384 }
2304 2385 .xc-address_frame .address_frame{
2305   - width: 92%;
2306   -padding-left: 10rpx;
2307   -margin: auto;
  2386 + width: 100%;
  2387 +/* padding-left: 10rpx;
  2388 +margin: auto; */
2308 2389  
2309 2390 }
2310 2391 .shop_name{
2311 2392  
2312 2393 }
2313 2394 .stores-img{
2314   -width: 40rpx;
2315   - height: 35rpx;
  2395 + width: 28rpx;
  2396 + height: 28rpx;
2316 2397 margin-right: 10rpx;
2317 2398 }
2318 2399 .shop_name{
2319 2400 margin-right: 10rpx;
2320 2401 }
2321 2402 .address{
2322   - width: 87%;
  2403 + /* width: 100%;
2323 2404 margin-top: 5rpx;
2324   - margin-bottom: 5rpx;
  2405 + margin-bottom: 5rpx; */
2325 2406 }
2326 2407 .distance{
2327   - padding-left: 15rpx;
2328   - padding-right: 15rpx;
  2408 + padding-left: 20rpx;
  2409 + padding-right: 20rpx;
2329 2410 background: #eee;
2330 2411 border-radius: 20rpx;
2331   - margin-right: 5rpx;
  2412 + /* margin-right: 5rpx; */
2332 2413 color: #999;
2333 2414 height: 38rpx;
2334 2415 line-height: 38rpx;
... ... @@ -2514,8 +2595,8 @@ margin-top: 10rpx;
2514 2595 }
2515 2596 .xc-goods-attribute{
2516 2597 border-bottom: 1px solid #eee;
2517   -padding-bottom: 15px;
2518   -margin-bottom:40rpx;
  2598 +padding-bottom: 20rpx;
  2599 +/* margin-bottom:40rpx; */
2519 2600 }
2520 2601 .xc-val-fream{
2521 2602 width: 105rpx;
... ... @@ -2542,11 +2623,11 @@ border-radius: 55rpx;
2542 2623 .s_btn{ margin-top: 25rpx; }
2543 2624 /* 美妆价的样式 */
2544 2625 .beauty-makeup-frame{
2545   - width: 101.5%;
2546   - margin: auto;
  2626 + /* width: 101.5%;
  2627 + margin: auto; */
2547 2628 height: 120rpx;
2548 2629 border-radius: 15rpx;
2549   - margin-top: 18px;
  2630 + margin-top: 10px;
2550 2631  
2551 2632 }
2552 2633 .beauty-makeup-frame .left{
... ... @@ -2554,11 +2635,12 @@ border-radius: 55rpx;
2554 2635 height: 100%;
2555 2636 background:#f7f7f7;
2556 2637 border-radius: 20rpx 0rpx 0rpx 20rpx;
2557   - padding-left: 20rpx;
  2638 + /* padding: 0 10rpx; */
2558 2639 }
2559 2640 .card-frame{
2560   - margin-top: 0rpx; padding-right: 23rpx;
2561   - margin-right: 15rpx;
  2641 + margin-top: 0rpx;
  2642 + /* padding-right: 23rpx;
  2643 + margin-right: 15rpx; */
2562 2644 }
2563 2645 .advert-card{
2564 2646 margin-top: 0rpx!important;
... ... @@ -2572,13 +2654,13 @@ border-radius: 55rpx;
2572 2654 }
2573 2655 .grade-card-frame{
2574 2656  
2575   - height:45rpx ;
  2657 + /* height:45rpx ; */
2576 2658 background: #3c300a;
2577 2659 border-radius: 20rpx;
2578   - margin-top: 10px;
2579   - margin-left: 7rpx;
  2660 + /* margin-top: 10px;
  2661 + margin-left: 7rpx; */
2580 2662 justify-content: center;
2581   - padding: 0 15rpx;
  2663 + padding: 4rpx 12rpx;
2582 2664 }
2583 2665 .grade-card-frame .img{
2584 2666 width: 24rpx;
... ... @@ -2592,7 +2674,7 @@ border-radius: 55rpx;
2592 2674 max-width: 165rpx;
2593 2675 }
2594 2676 .card-effect{
2595   - margin-left: 15rpx;
  2677 + /* margin-left: 15rpx; */
2596 2678 }
2597 2679 .at_once_carde{
2598 2680 width:65rpx;
... ... @@ -2616,22 +2698,23 @@ button.custom-service::after{
2616 2698 border: 0;
2617 2699 }
2618 2700 .no_store{color:#d60021; font-size: 26rpx;}
2619   -.cx_show_view{ width: 580rpx; line-height: 30rpx; margin-bottom: 6rpx; }
  2701 +.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ }
2620 2702 .cx_show_view .word{ width: 400rpx}
2621 2703 .prom_condition {
2622 2704 color: #d60021;
2623   - width: 180rpx;
2624   - height: 30rpx;
  2705 + /* width: 180rpx; */
  2706 + /* height: 30rpx; */
2625 2707 font-size: 20rpx;
2626   - padding-top: 0.01rpx;
2627   - display: flex;
  2708 + /* padding-top: 0.01rpx; */
  2709 + /* display: flex;
2628 2710 justify-content: center;
2629   - align-items: center;
2630   - border: #d60021 solid 1rpx;
  2711 + align-items: center; */
  2712 + border: 2rpx solid #d60021;
2631 2713 border-radius: 10rpx;
2632 2714 margin-right:10rpx ;
2633   - margin-left: 10rpx;
2634   -
  2715 + /* margin-left: 10rpx; */
  2716 + font-size: 24rpx;
  2717 + padding: 0 10rpx;
2635 2718 }
2636 2719 .hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx}
2637 2720 .order_hui{color: #444; width: 420rpx}
... ... @@ -2706,9 +2789,10 @@ button.custom-service::after{
2706 2789 } */
2707 2790  
2708 2791 .goods-price .rel_txt{
2709   - position: relative; top: 32rpx; font-size: 30rpx;
  2792 + /* position: relative; top: 32rpx; */
  2793 + font-size: 30rpx;
2710 2794 }
2711   -.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 12rpx;}
  2795 +.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 8rpx;}
2712 2796  
2713 2797 .btn-close {
2714 2798 /* background-color: rgba(0,0,0,.5); */
... ... @@ -2737,4 +2821,13 @@ button.custom-service::after{
2737 2821 -webkit-background-size: cover;
2738 2822 -moz-background-size: cover;
2739 2823 background-size: cover;
  2824 +}
  2825 +
  2826 +
  2827 +
  2828 +.arrow {
  2829 + width: auto !important;
  2830 + position: absolute;
  2831 + right: 0;
  2832 + top: 10rpx;
2740 2833 }
2741 2834 \ No newline at end of file
... ...
pages/goods/search/search.js
... ... @@ -193,8 +193,8 @@ Page({
193 193 submitSearch: function(t) {
194 194 console.log(111,t);
195 195 var val=t.detail.value.word;
196   - if(!val) val=t.detail.value;
197   - val=val.trim();
  196 + if(val==undefined) val=t.detail.value;
  197 + val=val?val.trim():'';
198 198 if(!val){
199 199 a.showWarning("请输入搜索关键词");
200 200 }
... ... @@ -205,8 +205,10 @@ Page({
205 205  
206 206 //热搜关键字
207 207 searchHotWord: function(t) {
208   - this.historyRecord();
209   - this.search(t.currentTarget.dataset.word);
  208 +
  209 + var word= t.currentTarget.dataset.word;
  210 + this.historyRecord(word);
  211 + this.search(word);
210 212 },
211 213  
212 214 //-----点击搜索按钮----
... ... @@ -287,10 +289,13 @@ Page({
287 289 });
288 290 },
289 291  
290   - historyRecord() {
  292 + historyRecord(w) {
  293 + let keyword =w;
291 294 let self = this;
292   - let keyword = this.data.key_str.trim();
293   - let searchRecord = this.data.searchRecord;
  295 + if(!keyword){
  296 + keyword = this.data.key_str.trim();
  297 + }
  298 + let searchRecord = this.data.searchRecord;
294 299 if(!searchRecord || searchRecord.length==0) searchRecord=wx.getStorageSync('searchRecord') || [];
295 300  
296 301 if(keyword) {
... ...
pages/index/index/index.json
... ... @@ -18,7 +18,6 @@
18 18 "mvideo": "/components/diy_video/diy_video",
19 19 "service": "/components/diy_service/diy_service",
20 20 "scan": "/components/diy_scan/diy_scan",
21   - "full_screen": "/components/full_screen/full_screen",
22 21 "store_select": "/components/diy_store_select/diy_store_select"
23 22 },
24 23 "enablePullDownRefresh": false
... ...
pages/index/index/index.wxml
... ... @@ -13,34 +13,38 @@
13 13 <block wx:if="{{banner}}">
14 14 <image class="xc-top-img abs" src="{{url}}/miniapp/images/top-img.png"></image>
15 15 </block>
16   - <!-- 控制要不要显示顶部门店选择 -->
17   - <block wx:if="{{is_topstore}}">
18   - <store_select></store_select>
19   - </block>
20   -
21   - <!--搜索框-->
22   - <view class="search-box {{scrollTop>10?'search-fixed':''}} flex-center white " style="top:{{is_topstore?88:0}}rpx">
23   - <view class="classify-frame t-c" bindtap="go_cate">
24   - <image class="classify-img" src="{{url}}/miniapp/images/classify.png"></image>
25   - <view class="fs20">分
26   - <text class="white fs22">类</text>
27   - </view>
28   - </view>
29   - <view class="search-inner">
30   - <view class="search-img">
31   - <image class="wh100" src="{{url}}/miniapp/images/search.png"></image>
32   - </view>
33   - <input bindfocus="jumpSearch" class="search-cont" placeholder="请输入您所搜索的商品" type="text">
34   - </input>
35   - </view>
36   - <view class="classify-frame t-c" bindtap="getScancode">
37   - <image class="classify-img" src="{{url}}/miniapp/images/scanning.png"></image>
38   - <view class="fs20">扫一扫</view>
39   - </view>
40   - </view>
  16 + <view class="top-bar">
  17 + <!-- 控制要不要显示顶部门店选择 -->
  18 + <block wx:if="{{is_topstore}}">
  19 + <store_select style="z-index: 999;"></store_select>
  20 + </block>
  21 +
  22 + <!--搜索框-->
  23 + <!-- <view class="search-box {{scrollTop>10?'search-fixed':''}} flex-center white " style="top:{{is_topstore?88:0}}rpx"> -->
  24 + <view class="search-box flex-center white">
  25 + <view class="classify-frame t-c" bindtap="go_cate">
  26 + <image class="classify-img" src="{{url}}/miniapp/images/classify.png"></image>
  27 + <!-- <view class="fs20">分类</view> -->
  28 + <!-- <view class="fs20">分类
  29 + <text class="white fs22">类</text>
  30 + </view> -->
  31 + </view>
  32 + <view class="search-inner">
  33 + <view class="search-img">
  34 + <image class="wh100" src="{{url}}/miniapp/images/search.png"></image>
  35 + </view>
  36 + <input bindfocus="jumpSearch" class="search-cont" placeholder="搜索商品" type="text"/>
  37 + </view>
  38 + <view class="classify-frame t-c" bindtap="getScancode">
  39 + <image class="classify-img" src="{{url}}/miniapp/images/scanning.png"></image>
  40 + <!-- <view class="fs20">扫一扫</view> -->
  41 + </view>
  42 + </view>
  43 + </view>
  44 +
41 45 <!--滚动广告-->
42 46 <view class="rel title-img" wx:if="{{banner}}">
43   - <swiper circular="true" autoplay="true" class="swiper_box" duration="1000" interval="3000" vertical="" bindchange="bannerSwiperChange" style="height:{{max_sw_height}}rpx" circular="true">
  47 + <swiper circular="true" indicator-dots indicator-active-color="#fff" autoplay="true" class="swiper_box" duration="1000" interval="3000" vertical="" bindchange="bannerSwiperChange" style="height:{{max_sw_height}}rpx">
44 48 <swiper-item wx:for="{{banner}}" wx:key="banner" class="swiperItem">
45 49 <view class="slide-image-frame">
46 50 <image bindtap='go_ad' data-url="{{item.ad_weapplink}}" class="slide-image" mode="widthFix" src="{{item.ad_code}}" bindload="imageLoad" data-index="{{index}}" lazy-load="true" binderror="bind_bnerr" data-errorimg="banner[{{index}}].ad_code"></image>
... ... @@ -48,14 +52,14 @@
48 52 </swiper-item>
49 53 </swiper>
50 54  
51   - <view class="flex-center-around translation abs">
52   - <view class="circle spot" wx:for="{{banner}}" wx:key="{{index}}" style="background:{{index==banner_index?'#fff':'#999'}}">
  55 + <!-- <view class="flex-center-around translation abs">
  56 + <view class="circle spot" wx:for="{{banner}}" wx:key="{{index}}" style="background-color:{{index==banner_index?'#fff':'rgba(255,255,255,.5)'}}">
53 57 </view>
54   - </view>
  58 + </view> -->
55 59 </view>
56   - <view class="pd-view" wx:else></view>
  60 + <!-- <view class="pd-view" wx:else></view> -->
57 61  
58   - <view class="flex-center-around {{banner==null?'mar-top':'mar-tops'}}">
  62 + <!-- <view class="flex-center-around {{banner==null?'mar-top':'mar-tops'}}">
59 63 <view class="flex-vertical">
60 64 <image class="xc-hook" src="{{url}}/miniapp/images/index/youxuan.png">
61 65 </image>
... ... @@ -74,7 +78,7 @@
74 78 </image>
75 79 <text class="yellow-co fs26 margin-left">售后无忧</text>
76 80 </view>
77   - </view>
  81 + </view> -->
78 82  
79 83 <!---导航-->
80 84 <view class="venues_box">
... ... @@ -86,25 +90,25 @@
86 90 </navigator>
87 91 </view> -->
88 92 <view class="venues_item">
89   - <navigator url="/packageA/pages/jfbuy/jfbuy">
  93 + <navigator url="/packageA/pages/jfbuy/jfbuy" hover-class="none">
90 94 <image src="{{url}}/miniapp/images/index/jifen.png"></image>
91 95 <view>积分购</view>
92 96 </navigator>
93 97 </view>
94 98 <view class="venues_item" wx:if="{{is_closecoupon!=1}}">
95   - <navigator url="/packageA/pages/quan_list/quan_list">
  99 + <navigator url="/packageA/pages/quan_list/quan_list" hover-class="none">
96 100 <image src="{{url}}/miniapp/images/index/youhui.png"></image>
97 101 <view>优惠券</view>
98 102 </navigator>
99 103 </view>
100 104 <view class="venues_item">
101   - <navigator url="/packageA/pages/checkin/checkin">
  105 + <navigator url="/packageA/pages/checkin/checkin" hover-class="none">
102 106 <image src="{{url}}/miniapp/images/index/qiandao.png"></image>
103 107 <view>签到</view>
104 108 </navigator>
105 109 </view>
106 110 <view class="venues_item">
107   - <navigator bindtap="go_url" data-url="/pages/goods/categoryList/categoryList">
  111 + <navigator bindtap="go_url" data-url="/pages/goods/categoryList/categoryList" hover-class="none">
108 112 <image src="{{url}}/miniapp/images/index/fenlei.png"></image>
109 113 <view>全部分类</view>
110 114 </navigator>
... ... @@ -113,18 +117,19 @@
113 117 </view>
114 118  
115 119 <!-- 大分类 -->
116   - <view class="flex-center-around">
117   - <view wx:for="{{gd_category}}" bindtap="go_cate2" data-cid="{{item.id}}" data-pid="0">
118   - <view class="circle xc-class-frame t-c">
  120 + <view class="flex ali-c">
  121 + <view class="w20" wx:for="{{gd_category}}" bindtap="go_cate2" data-cid="{{item.id}}" data-pid="0">
  122 + <view class="circle xc-class-frame t-c">
119 123 <image class="xc-class-img" src="{{item.icoimg==null||item.icoimg==''?(item.image?url+item.image:url+'/miniapp/images/no_cate_def.png'):item.icoimg}}"
120 124 binderror="bind_bnerr_icon" data-err="gd_category[{{index}}].icon"></image>
121   - <view class="fs24 gonju ellipsis-1">{{item.name}}</view>
  125 + <view class="fs24 gonju ellipsis-1"><text>{{item.name}}</text></view>
122 126 </view>
123 127 </view>
124 128 </view>
125 129 <!-- 轮播 -->
126 130 <block wx:if="{{swiperimage.length>0}}">
127   - <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)">
  131 + <!-- <swiper class="swiper" autoplay="true" interval="5000" circular="{{true}}" indicator-dots="{{true}}" indicator-active-color="rgb(255,255,255)" vertical> -->
  132 + <swiper class="swiper" indicator-dots indicator-active-color="#fff" autoplay="true" interval="3000" circular="{{true}}" easing-function="easeInOutCubic">
128 133 <!-- 活动轮播 -->
129 134 <block wx:for="{{swiperimage}}" wx:for-item="adver" wx:for-index="key">
130 135 <swiper-item>
... ... @@ -136,81 +141,85 @@
136 141 </swiper>
137 142 </block>
138 143  
139   - <view class="split-line"></view>
  144 + <!-- <view class="split-line"></view> -->
  145 +
  146 +
  147 + <!--秒杀-->
  148 + <view class="seckill" wx:if="{{saleGoods!=null && pindGoods.length!=0 }}">
  149 + <navigator url="/pages/activity/seckill_list/seckill_list">
  150 + <view class="seckill-time">
  151 + <view class="classname flex ai_c">
  152 + <image class="clock-img" src="{{url}}/miniapp/images/clock.png"></image>
  153 + <image class="seckill-ttitle-img height" src="{{url}}/miniapp/images/seckill-ttitle.png"></image>
  154 + </view>
  155 + <view class="flex ai_c seckill-list">
  156 + <text class="fs24 xc-marfin-right">查看全部</text>
  157 + <image class="arrow-right" src="{{url}}/miniapp/images/icon-arrowdown.png"></image>
  158 + </view>
  159 + </view>
  160 + </navigator>
  161 + <view class="seckill-list">
  162 + <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange" next-margin="25rpx">
  163 + <swiper-item wx:for="{{saleGoods}}" wx:key="{{index}}" class="p_swiper" wx:key="saleGoods">
  164 + <navigator class="nav" hover-class="none" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&title={{aitem.goods_name}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind">
  165 + <view class="imgview ">
  166 + <image src="{{url+aitem.original_img}}" mode="aspectFill" lazy-load="true" data-errorimg="saleGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image>
  167 +
  168 + <image wx:if="{{aitem.status==0}}" class="status_img" src="{{url}}/miniapp/images/miao/yure.png"></image>
  169 + <image wx:if="{{aitem.status==1}}" class="status_img" src="{{url}}/miniapp/images/miao/going.png"></image>
  170 + <image wx:if="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"></image>
  171 + </view>
  172 + <view class="ellipsis-2 mar-top10" style="height: 70rpx;">{{aitem.title}}</view>
  173 + <!-- <view class="red-co mar-top10 is_seckill_height"> -->
  174 + <view class="co-red mar-top10">
  175 + <text class="fs20">¥</text>{{aitem.price}}
  176 + <text class="un_line">¥{{aitem.market_price}}</text>
  177 + </view>
  178 + </navigator>
  179 + </swiper-item>
  180 + </swiper>
  181 + <!-- <view class="flex-center-around translation">
  182 + <view class="circle spot" wx:for="{{saleGoods}}" wx:key="{{index}}" style="background:{{index==flash_index?'#fff':'#999'}}">
  183 + </view>
  184 + </view> -->
  185 + </view>
  186 + </view>
140 187  
141   - <!--秒杀-->
142   - <view class="seckill" wx:if="{{saleGoods!=null && pindGoods.length!=0 }}">
143   - <navigator url="/pages/activity/seckill_list/seckill_list">
144   - <view class="seckill-time">
145   - <view class="classname flex">
146   - <image class="clock-img" src="{{url}}/miniapp/images/clock.png"></image>
147   - <image class="seckill-ttitle-img height" src="{{url}}/miniapp/images/seckill-ttitle.png"></image>
148   - </view>
149   - <view class="flex seckill-list">
150   - <text class="fs24 xc-marfin-right">查看全部</text>
151   - <image class="arrow-right" src="{{url}}/miniapp/images/icon-arrowdown.png"></image>
152   - </view>
153   - </view>
154   - </navigator>
155   - <view class="seckill-list">
156   - <swiper class="s_prom" indicator-dots="{{false}}" bindchange="flashSwiperChange">
157   - <swiper-item wx:for="{{saleGoods}}" wx:key="{{index}}" class="p_swiper " wx:key="saleGoods">
158   - <navigator class="ib m-left" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" wx:for="{{item}}" wx:key="item" wx:for-item="aitem" wx:for-index="aind">
159   - <view class="imgview ">
160   - <image src="{{url+aitem.original_img}}" lazy-load="true" data-errorimg="saleGoods[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3" data-img="{{aitem.original_img}}"></image>
161   -
162   - <image wx:if="{{aitem.status==0}}" class="status_img" src="{{url}}/miniapp/images/miao/yure.png"></image>
163   - <image wx:if="{{aitem.status==1}}" class="status_img" src="{{url}}/miniapp/images/miao/going.png"></image>
164   - <image wx:if="{{aitem.status==2}}" class="status_img" src="{{url}}/miniapp/images/miao/mend.png"></image>
165   - </view>
166   - <view class="ellipsis-2">{{aitem.title}}</view>
167   - <view class="red-co mar-top10 is_seckill_height">
168   - <text class="fs20">¥</text>{{aitem.price}}
169   - <text class="un_line">¥{{aitem.market_price}}</text>
170   - </view>
171   - </navigator>
172   - </swiper-item>
173   - </swiper>
174   - <view class="flex-center-around translation">
175   - <view class="circle spot" wx:for="{{saleGoods}}" wx:key="{{index}}" style="background:{{index==flash_index?'#fff':'#999'}}">
176   - </view>
177   - </view>
178   - </view>
179   - </view>
  188 +
180 189 <!----拼单---->
181   - <view class="seckill assemble-top-border" wx:if="{{pindGoods!=null && pindGoods.length!=0 }}">
182   - <navigator url="/pages/activity/pind_list/pind_list">
  190 + <view class="seckill" wx:if="{{pindGoods!=null && pindGoods.length!=0 }}">
  191 + <navigator url="/pages/activity/pind_list/pind_list" hover-class="none">
183 192 <view class="seckill-time">
184   - <view class="classname flex">
  193 + <view class="classname flex ai_c">
185 194 <image class="clock-img" src="{{url}}/miniapp/images/clock.png"></image>
186 195 <image class="seckill-ttitle-img" src="{{url}}/miniapp/images/team.png"></image>
187 196 <block wx:if="{{pt_timer_item}}">
188   - <view class="flex user-frame t-c xc-ash {{pt_timer_active==1?'pt_active':''}}">
  197 + <view class="flex user-frame ai_c xc-ash {{pt_timer_active==1?'pt_active':''}}">
189 198 <image class="user-img circle" src="{{pt_timer_item.head_pic}}"></image>
190 199 <view class="ellipsis-1 user-name fs24">{{pt_timer_item.nickname}}</view>
191   - <text class="fs20">刚拼团成功</text>
  200 + <text class="fs22" style="color:#ed6a0c;">刚拼团成功</text>
192 201 </view>
193 202 </block>
194 203 </view>
195   - <view class="flex seckill-list">
  204 + <view class="flex ai_c seckill-list">
196 205 <text class="fs24 xc-marfin-right">查看全部</text>
197 206 <image class="arrow-right" src="{{url}}/miniapp/images/icon-arrowdown.png"></image>
198 207 </view>
199 208 </view>
200 209 </navigator>
201 210 <view class="seckill-lists rel">
202   - <swiper class="s_proms" style="height:{{pindGoods[0].length>1?'590':'290'}}rpx" indicator-active-color='red' bindchange="ptSwiperChange">
  211 + <swiper class="s_proms" style="height:{{pindGoods[0].length>1?'580':'290'}}rpx" indicator-active-color='red' bindchange="ptSwiperChange">
203 212 <swiper-item wx:for="{{pindGoods}}" wx:key="{{index}}" wx:for-index="pix">
204 213 <view class="teamheight" style='display:block;' wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
205 214 <view class="kill-item">
206   - <navigator class="flex navwidth" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}">
  215 + <navigator class="flex navwidth" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{aitem.goods_name}}" hover-class="none">
207 216 <view class="kill-pic">
208 217 <image class="wh100" src="{{url+aitem.original_img}}" data-val="{{aitem.original_img}}" data-errorimg="pindGoods[{{pix}}][{{aind}}].original_img" binderror="bind_bnerr2" lazy-load="true">
209 218 </image>
210 219 </view>
211 220  
212 221 <view class="kill-cont">
213   - <navigator class="goods-name ellipsis-2" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
  222 + <navigator class="goods-name ellipsis-2" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&title={{aitem.goods_name}}">
214 223 {{aitem.title}}
215 224  
216 225 </navigator>
... ... @@ -262,7 +271,7 @@
262 271 </view>
263 272  
264 273 <!-- 好物推荐 -->
265   - <view class="title" style="margin-bottom:{{isIpx ? '48rpx' : '0'}};">
  274 + <view class="title bdt16" style="margin-bottom:{{isIpx ? '48rpx' : '0'}};">
266 275 <!-- 标题 -->
267 276 <view>
268 277 <!-- 中文名标题 -->
... ... @@ -283,11 +292,11 @@
283 292 </view>
284 293  
285 294 <!-- 英文标题 -->
286   - <view class="english flex-center">
  295 + <!-- <view class="english flex-center">
287 296 <view class="silk"></view>
288 297 <view class="esh five-level-word">GOOD HOT THING</view>
289 298 <view class="silk"></view>
290   - </view>
  299 + </view> -->
291 300  
292 301 </view>
293 302 <!-- 商品列表组件 -->
... ... @@ -404,14 +413,17 @@
404 413 <view class="disgraceful">
405 414 <!-- 新人礼领取图片 -->
406 415 <view class="newreceive flex-center">
407   - <view>
408   - <navigator bindtap="new_nav">
409   - <view class="flex-level" style="position: relative;">
  416 + <view class="t-c">
  417 + <navigator bindtap="new_nav" hover-class="none">
  418 + <view class="img-box" style="position: relative;">
410 419 <image class="receive" src="{{url}}{{new_image==''?'/miniapp/images/newpeople/newreceive.png':new_image}}"></image>
411   - <image class="close" src="{{url}}/miniapp/images/plus/Close.png" catchtap="close_disgraceful" style="margin-top: -70rpx; right: -60rpx;"></image>
412 420 </view>
  421 + <!-- <view> -->
  422 +
  423 + <!-- </view> -->
413 424 </navigator>
414   - <view class="flex-level"></view>
  425 + <image class="close" src="{{url}}/miniapp/images/plus/Close.png" catchtap="close_disgraceful" mode=""/>
  426 + <!-- <view class="flex-level"></view> -->
415 427 </view>
416 428 </view>
417 429 </view>
... ...
pages/index/index/index.wxss
1 1 .pink-b {
2   - background: #ff7295;
  2 + background: #ff7295;
  3 +}
  4 +
  5 +.top-bar {
  6 + position: fixed;
  7 + top: 0;
  8 + width: 100%;
  9 + z-index: 99;
3 10 }
4 11  
5 12  
6 13 .search-box {
7   - position: fixed;
  14 + /* position: fixed;
8 15 top: 0;
9   - left: 0;
10   - width: 100%;
11   - height: 88rpx;
12   - z-index: 10;
13   - background-color: #ff7295;
  16 + left: 0; */
  17 + width: 100%;
  18 + /* height: 80rpx; */
  19 + z-index: 10;
  20 + background-color: #ff7295;
  21 + padding: 0 10rpx;
  22 + box-sizing: border-box;
14 23 }
15 24  
16 25 .classify-img {
17   - width: 50rpx;
18   - height: 45rpx;
  26 + width: 50rpx;
  27 + height: 50rpx;
19 28 }
20 29  
21 30 .logo {
22   - width: 48rpx;
23   - height: 48rpx;
24   - margin: 0 18rpx;
25   - border-radius: 50%;
26   - overflow: hidden;
  31 + width: 48rpx;
  32 + height: 48rpx;
  33 + margin: 0 18rpx;
  34 + border-radius: 50%;
  35 + overflow: hidden;
27 36 }
28 37  
29 38 .search-inner {
30   - display: flex;
31   - align-items: center;
32   - margin: 20rpx 25rpx;
33   - width: 566rpx;
34   - height: 58rpx;
35   - border-radius: 29rpx;
36   - background-color: #fff;
37   - justify-content: center;
  39 + display: flex;
  40 + align-items: center;
  41 + margin: 12rpx 20rpx;
  42 + /* margin: 20rpx 25rpx; */
  43 + /* width: 566rpx;
  44 + height: 58rpx; */
  45 + border-radius: 29rpx;
  46 + background-color: #fff;
  47 + justify-content: center;
  48 + position: relative;
38 49 }
39 50  
40 51 .search-img {
41   - width: 30rpx;
42   - height: 30rpx;
43   - margin-left: 36rpx;
44   - display: flex;
45   - align-items: center;
46   - position: absolute;
47   - left: 10%;
  52 + width: 30rpx;
  53 + height: 30rpx;
  54 + /* margin-left: 36rpx; */
  55 + display: flex;
  56 + align-items: center;
  57 + position: absolute;
  58 + left: 16rpx;
48 59 }
49 60  
50 61 .search-cont {
51   - height: 58rpx;
52   - width: 530rpx;
53   - padding-left: 12rpx;
54   - line-height: 58rpx;
55   - font-size: 24rpx;
56   - color: #666;
57   - margin-left: 56rpx;
  62 + height: 58rpx;
  63 + width: 530rpx;
  64 + /* padding-left: 12rpx; */
  65 + line-height: 58rpx;
  66 + font-size: 24rpx;
  67 + color: #666;
  68 + margin-left: 50rpx;
58 69 }
59 70  
60 71 .search-fixed {
61   - background: #ff7295;
  72 + background: #ff7295;
62 73 }
63 74  
64 75 .swiper_box {
65   - width: 100%;
66   - height: auto;
  76 + width: 100%;
  77 + /* height: auto; */
  78 + border-radius: 16rpx;
  79 + overflow: hidden;
67 80 }
68 81  
69 82 .swiperItem {
70   - display: flex;
71   - align-items: center;
  83 + display: flex;
  84 + align-items: center;
72 85 }
73 86  
74 87 .s_prom {
75   - width: 100%;
76   - height: 340rpx;
  88 + width: 100%;
  89 + height: 346rpx;
77 90 }
78 91  
79 92 .s_proms {
80   - width: 100%;
81   - height: 590rpx;
  93 + width: 100%;
  94 + height: 590rpx;
82 95 }
83 96  
84 97 .slide-image {
85   - width: 100%;
86   - display: inline-block;
87   - overflow: hidden;
88   - border-radius: 14rpx;
89   - height: auto;
  98 + width: 100%;
  99 + display: block;
  100 + /* overflow: hidden; */
  101 + /* border-radius: 14rpx;
  102 + height: auto; */
90 103 }
91 104  
92 105 .venues_box {
93   - background-color: #fff;
94   - padding: 20rpx 10rpx 0;
  106 + /* background-color: #fff;
  107 + padding: 20rpx 10rpx 0; */
95 108 }
96 109  
97 110 .venues_list {
... ... @@ -100,167 +113,171 @@
100 113 }
101 114  
102 115 .venues_item {
103   - display: block;
104   - float: left;
105   - width: 20%;
106   - text-align: center;
107   - margin: 25rpx 0;
  116 + /* display: block;
  117 + float: left; */
  118 + flex: 1;
  119 + text-align: center;
  120 + margin: 20rpx 0;
108 121 }
109 122  
110 123 .venues_item image {
111   - vertical-align: middle;
112   - width: 90rpx;
113   - height: 90rpx;
114   - border: 0;
  124 + vertical-align: middle;
  125 + width: 80rpx;
  126 + height: 80rpx;
  127 + border: 0;
115 128 }
116 129  
117 130 .venues_item view {
118   - font-size: 26rpx;
119   - margin-top: 10rpx;
  131 + font-size: 26rpx;
  132 + margin-top: 10rpx;
  133 + color: #333;
120 134 }
121 135  
122 136 .choice_box {
123   - font-size: 14px;
  137 + font-size: 14px;
124 138 }
125 139  
126 140 .choice_box .choice_list .choice_item {
127   - width: 368rpx;
128   - float: left;
129   - margin: 2rpx;
130   - background-color: #fff;
  141 + width: 368rpx;
  142 + float: left;
  143 + margin: 2rpx;
  144 + background-color: #fff;
131 145 }
132 146  
133 147 .choice_box .choice_list image {
134   - width: 100%;
135   - height: auto;
  148 + width: 100%;
  149 + height: auto;
136 150 }
137 151  
138 152 .title-img {
139   - margin-top: 110rpx;
140   - margin-bottom: 15rpx;
141   - height: auto;
  153 + margin-top: 10rpx;
  154 + padding: 0 20rpx;
  155 + box-sizing: border-box;
  156 + /* margin-bottom: 15rpx;
  157 + height: auto; */
142 158 }
143 159  
144 160 .choice_box .choice_list .title {
145   - height: 36rpx;
146   - line-height: 36rpx;
147   - /* font-weight: bold; */
148   - text-align: left;
149   - color: #333;
150   - margin-left: 20rpx;
151   - font-size: 30rpx;
  161 + height: 36rpx;
  162 + line-height: 36rpx;
  163 + /* font-weight: bold; */
  164 + text-align: left;
  165 + color: #333;
  166 + margin-left: 20rpx;
  167 + font-size: 30rpx;
152 168 }
153 169  
154 170 .choice_box .choice_list .choice_footer {
155   - display: block;
156   - margin-top: 20rpx;
157   - margin-left: 15rpx;
158   - position: relative;
159   - height: 74rpx;
160   - line-height: 17rpx;
  171 + display: block;
  172 + margin-top: 20rpx;
  173 + margin-left: 15rpx;
  174 + position: relative;
  175 + height: 74rpx;
  176 + line-height: 17rpx;
161 177 }
162 178  
163 179 .choice_box .choice_list .choice_footer .price {
164   - color: #f23030;
165   - height: 10px;
  180 + color: #f23030;
  181 + height: 10px;
166 182 }
167 183  
168 184 .choice_box .choice_list .choice_footer .similer {
169   - position: absolute;
170   - bottom: 0;
171   - right: 0;
172   - text-align: center;
173   - color: #686868;
174   - width: fit-content;
175   - line-height: 30rpx;
176   - border: 1rpx solid #bfbfbf;
177   - padding: 1rpx 6rpx;
178   - border-radius: 5rpx;
  185 + position: absolute;
  186 + bottom: 0;
  187 + right: 0;
  188 + text-align: center;
  189 + color: #686868;
  190 + width: fit-content;
  191 + line-height: 30rpx;
  192 + border: 1rpx solid #bfbfbf;
  193 + padding: 1rpx 6rpx;
  194 + border-radius: 5rpx;
179 195 }
180 196  
181 197 .section {
182   - margin-top: 20rpx;
183   - background-color: #fff;
  198 + margin-top: 20rpx;
  199 + background-color: #fff;
184 200 }
185 201  
186 202 .section-title {
187   - padding-top: 30rpx;
188   - height: 54rpx;
189   - line-height: 54rpx;
190   - font-size: 36rpx;
191   - font-weight: 700;
192   - color: #333;
193   - text-align: center;
194   - letter-spacing: 3rpx;
  203 + padding-top: 30rpx;
  204 + height: 54rpx;
  205 + line-height: 54rpx;
  206 + font-size: 36rpx;
  207 + font-weight: 700;
  208 + color: #333;
  209 + text-align: center;
  210 + letter-spacing: 3rpx;
195 211 }
196 212  
197 213 .section-subtitle {
198   - line-height: 0;
199   - width: 340rpx;
200   - height: 16rpx;
201   - padding-bottom: 20rpx;
202   - margin: 0 auto;
  214 + line-height: 0;
  215 + width: 340rpx;
  216 + height: 16rpx;
  217 + padding-bottom: 20rpx;
  218 + margin: 0 auto;
203 219 }
204 220  
205 221 .seckill {
206   - margin-top: 20rpx;
207   - background-color: #fff;
208   - padding-bottom: 30rpx;
  222 + /* margin-top: 20rpx; */
  223 + background-color: #fff;
  224 + border-top: 16rpx solid #f7f8fa;
  225 + /* padding-bottom: 30rpx; */
209 226 }
210 227  
211 228 .seckill-time {
212   - display: flex;
213   - justify-content: space-between;
214   - padding: 0 30rpx;
215   - align-items: center;
216   - height: 72rpx;
217   - color: #333;
218   - margin-bottom: 20rpx;
  229 + display: flex;
  230 + justify-content: space-between;
  231 + padding: 20rpx;
  232 + align-items: center;
  233 + /* height: 70rpx; */
  234 + color: #333;
  235 + /* margin-bottom: 10rpx; */
219 236 }
220 237  
221 238 .sk-tips {
222   - font-size: 36rpx;
223   - font-weight: bold;
224   - margin-right: 20rpx;
  239 + font-size: 36rpx;
  240 + font-weight: bold;
  241 + margin-right: 20rpx;
225 242 }
226 243  
227 244 .sk-time {
228   - position: relative;
229   - display: inline-block;
230   - font-size: 24rpx;
231   - width: 36rpx;
232   - line-height: 36rpx;
233   - background-color: #333;
234   - margin-right: 20rpx;
235   - color: #fff;
236   - text-align: center;
  245 + position: relative;
  246 + display: inline-block;
  247 + font-size: 24rpx;
  248 + width: 36rpx;
  249 + line-height: 36rpx;
  250 + background-color: #333;
  251 + margin-right: 20rpx;
  252 + color: #fff;
  253 + text-align: center;
237 254 }
238 255  
239 256 .sk-time::before {
240   - content: ':';
241   - position: absolute;
242   - right: -13rpx;
243   - top: 0;
244   - color: #333;
245   - font-weight: bold;
  257 + content: ':';
  258 + position: absolute;
  259 + right: -13rpx;
  260 + top: 0;
  261 + color: #333;
  262 + font-weight: bold;
246 263 }
247 264  
248 265 .sk-time:last-child::before {
249   - content: '';
  266 + content: '';
250 267 }
251 268  
252 269 .seckill-time>navigator {
253   - font-size: 28rpx;
  270 + font-size: 28rpx;
254 271 }
255 272  
256 273 .sk-pic {
257   - width: 28rpx;
258   - height: 28rpx;
259   - vertical-align: top;
  274 + width: 28rpx;
  275 + height: 28rpx;
  276 + vertical-align: top;
260 277 }
261 278  
262 279 .seckill-list {
263   - overflow: hidden;
  280 + /* overflow: hidden; */
264 281 }
265 282  
266 283 /* .seckill-list navigator {
... ... @@ -268,665 +285,703 @@
268 285 } */
269 286  
270 287 .seckill-list view {
271   - height: 62rpx;
272   - padding: 0 10rpx;
273   - line-height: 33rpx;
274   - overflow: hidden;
275   - font-size: 28rpx;
276   - width: 203rpx;
  288 + /* height: 62rpx; */
  289 + /* padding: 0 10rpx;
  290 + line-height: 33rpx; */
  291 + overflow: hidden;
  292 + font-size: 26rpx;
  293 + width: 200rpx;
277 294 }
278 295  
279 296 .seckill-list view.imgview {
280   - width: 203rpx;
281   - height: 210rpx;
282   - position: relative;
283   - overflow: hidden;
  297 + width: 223rpx;
  298 + height: 210rpx;
  299 + border-radius: 10rpx;
  300 + position: relative;
  301 + overflow: hidden;
284 302 }
285 303  
286 304 .imgview image {
287   - width: 203rpx;
288   - height: 203rpx;
289   - border-radius: 10rpx;
  305 + display: block;
  306 + width: 100%;
  307 + height: 100%;
  308 +
290 309 }
291 310  
292 311 .seckill-list view.djs_view {
293   - background: rgba(9, 9, 9, 0.5);
294   - color: #fff;
295   - font-size: 20rpx;
296   - width: 216rpx;
297   - height: 36rpx;
298   - line-height: 36rpx;
299   - position: absolute;
300   - bottom: 0;
301   - left: 10rpx;
302   - z-index: 5;
303   - text-align-last: center;
  312 + background: rgba(9, 9, 9, 0.5);
  313 + color: #fff;
  314 + font-size: 20rpx;
  315 + width: 216rpx;
  316 + height: 36rpx;
  317 + line-height: 36rpx;
  318 + position: absolute;
  319 + bottom: 0;
  320 + left: 10rpx;
  321 + z-index: 5;
  322 + text-align-last: center;
304 323 }
305 324  
306 325 .seckill-list image.status_img {
307   - width: 100rpx;
308   - height: 35rpx;
309   - position: absolute;
310   - top: 0rpx;
311   - left: 10rpx;
312   - z-index: 5;
  326 + width: 100rpx;
  327 + height: 35rpx;
  328 + position: absolute;
  329 + top: 0;
  330 + left: 0;
  331 + /* z-index: 5; */
313 332 }
314 333  
315 334 .seckill-list view.status_view {
316   - width: 60rpx;
317   - height: 60rpx;
318   - text-align: center;
319   - line-height: 60rpx;
320   - position: absolute;
321   - background: #e9030d;
322   - color: #fff;
323   - font-size: 18rpx;
324   - top: 5rpx;
325   - right: 10rpx;
326   - z-index: 5;
327   - border-radius: 50%;
328   - padding: 0;
  335 + width: 60rpx;
  336 + height: 60rpx;
  337 + text-align: center;
  338 + line-height: 60rpx;
  339 + position: absolute;
  340 + background: #e9030d;
  341 + color: #fff;
  342 + font-size: 18rpx;
  343 + top: 5rpx;
  344 + right: 10rpx;
  345 + z-index: 5;
  346 + border-radius: 50%;
  347 + padding: 0;
329 348 }
330 349  
331 350 .xiafa {
332   - text-decoration: line-through;
333   - font-size: 10px;
334   - color: #999;
335   - margin-left: 10rpx;
  351 + text-decoration: line-through;
  352 + font-size: 10px;
  353 + color: #999;
  354 + margin-left: 10rpx;
336 355 }
337 356  
338 357 .shelue {
339   - /* text-overflow: -o-ellipsis-lastline;
  358 + /* text-overflow: -o-ellipsis-lastline;
340 359 overflow: hidden;
341 360 text-overflow: ellipsis;
342 361 display: -webkit-box;
343 362 -webkit-line-clamp: 2;
344 363 -webkit-box-orient: vertical; */
345   - white-space: nowrap;
346   - text-overflow: ellipsis;
347   - overflow: hidden;
  364 + white-space: nowrap;
  365 + text-overflow: ellipsis;
  366 + overflow: hidden;
348 367 }
349 368  
350 369 .meiz {
351   - padding: 0 10rpx;
352   - background: #c4182e;
353   - color: #fff;
354   - height: 18px;
355   - line-height: 18px;
356   - margin-top: -10rpx;
357   - border-radius: 10rpx;
  370 + padding: 0 10rpx;
  371 + background: #c4182e;
  372 + color: #fff;
  373 + height: 18px;
  374 + line-height: 18px;
  375 + margin-top: -10rpx;
  376 + border-radius: 10rpx;
358 377 }
359 378  
360 379 .dengj {
361   - padding: 0 10rpx;
362   - background: #ffd700;
363   - color: #fff;
364   - height: 18px;
365   - line-height: 18px;
366   - margin-top: -10rpx;
367   - border-radius: 10rpx;
  380 + padding: 0 10rpx;
  381 + background: #ffd700;
  382 + color: #fff;
  383 + height: 18px;
  384 + line-height: 18px;
  385 + margin-top: -10rpx;
  386 + border-radius: 10rpx;
368 387 }
369 388  
370 389 .kongge {
371   - width: 20rpx;
  390 + width: 20rpx;
372 391 }
373 392  
374 393 .choice_footer .ys {
375   - color: #999;
376   - margin-top: 20rpx;
377   - font-size: 11px;
378   - margin-left: 5rpx;
  394 + color: #999;
  395 + margin-top: 20rpx;
  396 + font-size: 11px;
  397 + margin-left: 5rpx;
379 398 }
380 399  
381 400 .p_swiper {
382   - display: flex;
  401 + display: flex;
  402 + padding: 0 10rpx;
  403 + box-sizing: border-box;
  404 +}
  405 +
  406 +.nav {
  407 + padding: 0 10rpx;
  408 + box-sizing: border-box;
  409 + flex: 1;
383 410 }
384 411  
385 412 .p_swiper .un_line {
386   - text-decoration: line-through;
387   - font-size: 22rpx;
388   - color: #b2a2c2;
  413 + text-decoration: line-through;
  414 + font-size: 22rpx;
  415 + color: #b2a2c2;
389 416 }
390 417  
391 418 .seckill-list view.co-red2 {
392   - font-size: 22rpx;
393   - color: #c2aebb;
394   - margin-top: -8rpx;
  419 + font-size: 22rpx;
  420 + color: #c2aebb;
  421 + margin-top: -8rpx;
395 422 }
396 423  
397 424 .seckill-list view.cantuan {
398   - width: 72rpx;
399   - height: 36rpx;
400   - text-align: center;
401   - line-height: 36rpx;
402   - position: absolute;
403   - background: #e9030d;
404   - color: #fff;
405   - font-size: 18rpx;
406   - bottom: 30rpx;
407   - right: 10rpx;
408   - z-index: 5;
409   - border-radius: 5rpx;
410   - padding: 0;
  425 + width: 72rpx;
  426 + height: 36rpx;
  427 + text-align: center;
  428 + line-height: 36rpx;
  429 + position: absolute;
  430 + background: #e9030d;
  431 + color: #fff;
  432 + font-size: 18rpx;
  433 + bottom: 30rpx;
  434 + right: 10rpx;
  435 + z-index: 5;
  436 + border-radius: 5rpx;
  437 + padding: 0;
411 438 }
412 439  
413 440 .arrow-right {
414   - width: 24rpx;
415   - height: 24rpx;
  441 + width: 20rpx;
  442 + height: 20rpx;
416 443 }
417 444  
418 445 .pd-view {
419   - height: 80rpx;
  446 + /* height: 80rpx; */
420 447 }
421 448  
422 449 .xc-grow-ups {
423   - margin-left: 8rpx;
424   - margin-top: 6rpx;
  450 + margin-left: 8rpx;
  451 + margin-top: 6rpx;
425 452 }
426 453  
427 454 .xc-top-img {
428   - width: 100%;
429   - top: -1rpx;
430   - height: 315rpx;
  455 + width: 100%;
  456 + /* margin-top: -30rpx; */
  457 + height: 420rpx;
  458 + top: 0;
  459 + background-color: white;
  460 + /* top: -1rpx;
  461 + height: 315rpx; */
431 462 }
432 463  
433 464 .classify-frame {
434   - line-height: 25rpx;
  465 + line-height: 25rpx;
435 466 }
436 467  
437 468 .slide-image-frame {
438   - width: 95%;
439   - margin: auto;
440   - border-radius: 10rpx;
  469 + width: 100%;
  470 + /* margin: auto; */
  471 + /* padding: 0 20rpx;
  472 + box-sizing: border-box; */
  473 + /* border-radius: 10rpx; */
441 474 }
442 475  
443 476 .xc-hook {
444   - width: 52rpx;
445   - height: 52rpx;
  477 + width: 52rpx;
  478 + height: 52rpx;
446 479 }
447 480  
448 481 .margin-left {
449   - margin-left: 10rpx;
  482 + margin-left: 10rpx;
450 483 }
451 484  
452 485 .xc-class-img {
453   - width: 83rpx;
454   - height: 83rpx;
  486 + width: 80rpx;
  487 + height: 80rpx;
455 488 }
456 489  
457 490 .xc-class-frame {
458   - line-height: 40rpx;
459   - margin-top: 20rpx;
460   - margin-bottom: 20rpx;
  491 + line-height: 40rpx;
  492 + /* margin-top: 20rpx; */
  493 + margin-bottom: 20rpx;
461 494 }
462 495  
463 496 .xc-title-img {
464   - height: 220rpx;
465   - width: 100%;
466   - border-radius: 15rpx;
  497 + height: 100%;
  498 + width: 100%;
  499 + border-radius: 15rpx;
467 500 }
468 501  
469 502 .title-img-frame {
470   - width: 94%;
471   - margin: auto;
  503 + width: 100%;
  504 + height: 100%;
  505 + /* margin: auto;
472 506 margin-top: 30rpx;
473   - padding-bottom: 10rpx;
  507 + padding-bottom: 10rpx; */
474 508 }
475 509  
476 510 .seckill-list {
477   - line-height: 24rpx;
  511 + /* line-height: 24rpx; */
  512 + color: #333;
  513 +
478 514 }
479 515  
480 516 .seckill-lists {
481   - line-height: 30rpx;
  517 + /* line-height: 30rpx; */
482 518 }
483 519  
484 520 .xc-marfin-right {
485   - margin-right: 8rpx;
  521 + margin-right: 8rpx;
486 522 }
487 523  
488 524 .classname .clock-img {
489   - width: 36rpx;
490   - height: 36rpx;
491   - margin-right: 10rpx;
  525 + width: 28rpx;
  526 + height: 28rpx;
  527 + /* margin-right: 10rpx; */
492 528 }
493 529  
494 530 .classname .seckill-ttitle-img {
495   - width: 150rpx;
496   - height: 40rpx;
  531 + width: 150rpx;
  532 + height: 40rpx;
497 533 }
498 534  
499 535 .seckill-ttitle-img.height {
500   - height: 35rpx;
  536 + height: 35rpx;
501 537 }
502 538  
503 539 .split-line {
504   - width: 100%;
505   - height: 10rpx;
506   - background: #eee;
  540 + width: 100%;
  541 + height: 10rpx;
  542 + background: #eee;
507 543 }
508 544  
509 545 .mar-top10 {
510   - margin-top: 10rpx;
  546 + margin-top: 10rpx;
511 547 }
512 548  
513 549 .classname .user-img {
514   - width: 30rpx;
515   - height: 30rpx;
516   - margin-left: 20rpx;
517   - margin-right: 10rpx;
  550 + width: 40rpx;
  551 + height: 40rpx;
  552 + margin-left: 20rpx;
  553 + margin-right: 10rpx;
  554 + background-color: #f7f8fa;
518 555 }
519 556  
520 557 .user-frame {
521   - /* border-left: 5rpx solid #eee; */
522   - height: 35rpx;
523   - line-height: 35rpx;
524   - margin-left: 10rpx;
  558 + /* border-left: 5rpx solid #eee; */
  559 + /* height: 35rpx;
  560 + line-height: 35rpx; */
  561 + margin-left: 10rpx;
525 562 }
526 563  
527 564 .user-name {
528   - width: 66rpx;
529   - border-left: 5rpx solid #eee;
  565 + width: 140rpx;
  566 + padding-left: 10rpx;
  567 + border-left: 2rpx solid #ebedf0;
530 568 }
531 569  
532 570 /* 团购列表 */
533 571  
534 572 .kill-item {
535   - display: flex;
536   - justify-content: space-between;
537   - background-color: #fff;
538   - padding: 10rpx 10rpx;
539   - margin-bottom: 10rpx;
540   - border-radius: 10rpx;
541   - height: 249rpx;
542   - align-items: center;
  573 + display: flex;
  574 + justify-content: space-between;
  575 + background-color: #fff;
  576 + padding: 20rpx;
  577 + /* margin-bottom: 10rpx; */
  578 + border-radius: 10rpx;
  579 + /* height: 249rpx; */
  580 + align-items: center;
543 581 }
544 582  
545 583 .kill-pic {
546   - width: 215rpx;
547   - height: 215rpx;
548   - position: relative;
  584 + width: 215rpx;
  585 + height: 215rpx;
  586 + position: relative;
549 587 }
550 588  
551 589 .teamheight {
552   - height: 289rpx;
553   - border-bottom: 6rpx solid #eee;
  590 + /* height: 289rpx; */
  591 + border-bottom: 2rpx solid #ebedf0;
554 592 }
555 593  
556 594 .kill-cont {
557   - width: 440rpx;
558   - height: 215rpx;
559   - margin-left: 16rpx;
  595 + width: 440rpx;
  596 + height: 215rpx;
  597 + margin-left: 16rpx;
560 598 }
561 599  
562 600 .goods-name {
563   - max-height: 60rpx;
564   - font-size: 24rpx;
565   - color: #555;
566   - line-height: 55rpx;
  601 + max-height: 60rpx;
  602 + font-size: 24rpx;
  603 + color: #555;
  604 + line-height: 55rpx;
567 605 }
568 606  
569 607 .xc-team-img {
570   - width: 38rpx;
571   - height: 45rpx;
572   - left: -1rpx;
573   - top: -16rpx;
  608 + width: 38rpx;
  609 + height: 45rpx;
  610 + left: -1rpx;
  611 + top: -16rpx;
574 612 }
575 613  
576 614 .tneirong {
577   - color: #fff;
578   - font-size: 20rpx;
579   - border-radius: 20rpx;
580   - padding-left: 32rpx;
581   - padding-right: 15rpx;
582   - padding-bottom: 2rpx;
583   - height: 28rpx;
584   - line-height: 28rpx;
585   - white-space: nowrap;
  615 + color: #fff;
  616 + font-size: 20rpx;
  617 + border-radius: 20rpx;
  618 + padding-left: 32rpx;
  619 + padding-right: 15rpx;
  620 + padding-bottom: 2rpx;
  621 + height: 28rpx;
  622 + line-height: 28rpx;
  623 + white-space: nowrap;
586 624 }
587 625  
588 626 .xc-people-val-frame {
589   - border: 3rpx solid #d60021;
590   - border-radius: 8rpx;
591   - white-space: nowrap;
592   - height: 28rpx;
  627 + border: 3rpx solid #d60021;
  628 + border-radius: 8rpx;
  629 + white-space: nowrap;
  630 + height: 28rpx;
593 631 }
594 632  
595 633 .xc-people-val-frame .val-img {
596   - width: 33rpx;
597   - height: 28rpx;
598   - border-radius: 8rpx;
599   - margin-left: -2rpx;
  634 + width: 33rpx;
  635 + height: 28rpx;
  636 + border-radius: 8rpx;
  637 + margin-left: -2rpx;
600 638 }
601 639  
602 640 .people-img {
603   - width: 20rpx;
604   - height: 20rpx;
  641 + width: 20rpx;
  642 + height: 20rpx;
605 643 }
606 644  
607 645 .goods-num {
608   - height: 50rpx;
609   - display: flex;
610   - justify-content: space-between;
611   - margin-top: 10rpx;
612   - font-size: 24rpx;
613   - color: #999;
  646 + height: 50rpx;
  647 + display: flex;
  648 + justify-content: space-between;
  649 + margin-top: 10rpx;
  650 + font-size: 24rpx;
  651 + color: #999;
614 652 }
615 653  
616 654 .xc-top15 {
617   - padding-top: 15rpx;
618   - margin-top: 25rpx;
  655 + padding-top: 15rpx;
  656 + margin-top: 25rpx;
619 657 }
620 658  
621 659 .underline {
622   - text-decoration: line-through;
623   - color: #999;
624   - font-size: 20rpx;
625   - margin-left: 5rpx;
626   - margin-top: 5rpx;
  660 + text-decoration: line-through;
  661 + color: #999;
  662 + font-size: 20rpx;
  663 + margin-left: 5rpx;
  664 + margin-top: 5rpx;
627 665 }
628 666  
629 667 .navigator.navwidth {
630   - width: 100%;;
  668 + width: 100%;;
631 669 }
632 670  
633 671 .view.left {
634   - padding: 0 5rpx;
  672 + padding: 0 5rpx;
635 673 }
636 674  
637 675 /* 热门好物 */
638 676  
639 677 .title .China {
640   - width: 100%;
641   - margin-top: 10rpx;
642   - margin-bottom: 10rpx;
643   - line-height: 0rpx;
  678 + width: 100%;
  679 + padding: 20rpx 0;
  680 + /* line-height: 0rpx; */
644 681 }
645 682  
646 683 .title .China .line view {
647   - width: 2rpx;
  684 + width: 2rpx;
648 685 }
649 686  
650 687 .title .China .line {
651   - height: 40rpx;
652   - color: rgb(51, 51, 51);
  688 + height: 40rpx;
  689 + color: rgb(51, 51, 51);
653 690 }
654 691  
655 692 .title .China .line view {
656   - border-left: 3rpx solid #000;
657   - margin-left: 5rpx;
  693 + border-left: 3rpx solid #000;
  694 + margin-left: 5rpx;
658 695 }
659 696  
660 697 .title .China .line .one {
661   - height: 23rpx;
  698 + height: 23rpx;
662 699 }
663 700  
664 701 .title .China .line .two {
665   - height: 15rpx;
  702 + height: 15rpx;
666 703 }
667 704  
668 705 .title .China .line .three {
669   - height: 18rpx;
  706 + height: 18rpx;
670 707 }
671 708  
672 709 .title .China .Recommend {
673   - margin: 0rpx 20rpx;
674   - font-size: 28rpx;
675   - line-height: 39rpx;
676   - font-weight: bold;
  710 + margin: 0rpx 20rpx;
  711 + font-size: 30rpx;
  712 + line-height: 39rpx;
  713 + font-weight: bold;
677 714 }
678 715  
679 716 .title .english .silk {
680   - width: 214rpx;
681   - height: 2rpx;
682   - background-color: #000;
  717 + width: 214rpx;
  718 + height: 2rpx;
  719 + background-color: #000;
683 720 }
684 721  
685 722 .title .english .esh {
686   - margin: 0rpx 15rpx;
  723 + margin: 0rpx 15rpx;
687 724 }
688 725  
689 726 .collects {
690   - margin-top: 40rpx;
  727 + margin-top: 40rpx;
691 728 }
692 729  
693 730 .hang {
694   - width: 100%;
695   - margin: auto;
696   - padding-left: 21rpx;
  731 + width: 100%;
  732 + margin: auto;
  733 + padding-left: 21rpx;
697 734 }
698 735  
699 736 .hang .collect {
700   - width: 347rpx;
701   - height: 571rpx;
702   - border-radius: 25rpx;
703   - border: 1rpx solid rgb(214, 214, 214);
704   - overflow: hidden;
705   - margin-right: 14rpx;
706   - margin-bottom: 5rpx;
  737 + width: 347rpx;
  738 + height: 571rpx;
  739 + border-radius: 25rpx;
  740 + border: 1rpx solid rgb(214, 214, 214);
  741 + overflow: hidden;
  742 + margin-right: 14rpx;
  743 + margin-bottom: 5rpx;
707 744 }
708 745  
709 746 .collect .bottom {
710   - padding: 0rpx 20rpx;
  747 + padding: 0rpx 20rpx;
711 748 }
712 749  
713 750 .collect .sp {
714   - width: 100%;
715   - height: 326rpx;
  751 + width: 100%;
  752 + height: 326rpx;
716 753 }
717 754  
718 755 .collect .money {
719   - margin-top: 60rpx;
720   - margin-bottom: 18rpx;
721   - line-height: 28rpx;
722   - align-items: baseline;
  756 + margin-top: 60rpx;
  757 + margin-bottom: 18rpx;
  758 + line-height: 28rpx;
  759 + align-items: baseline;
723 760 }
724 761  
725 762 .collect .money view {
726   - line-height: 28rpx;
  763 + line-height: 28rpx;
727 764 }
728 765  
729 766 .collect .money .flex {
730   - font-weight: bold;
  767 + font-weight: bold;
731 768 }
732 769  
733 770 .collect .money .flex .fs24 {
734   - padding-top: 5rpx;
  771 + padding-top: 5rpx;
735 772 }
736 773  
737 774 .collect .Discount {
738   - width: 156rpx;
739   - height: 28rpx;
740   - border-radius: 20rpx;
741   - background-color: rgb(56, 56, 56);
742   - font-size: 18rpx;
743   - color: rgb(255, 255, 255);
  775 + width: 156rpx;
  776 + height: 28rpx;
  777 + border-radius: 20rpx;
  778 + background-color: rgb(56, 56, 56);
  779 + font-size: 18rpx;
  780 + color: rgb(255, 255, 255);
744 781 }
745 782  
746 783 .collect .Discount image {
747   - height: 18rpx;
748   - width: 18rpx;
749   - line-height: 28rpx;
750   - margin-right: 3rpx;
  784 + height: 18rpx;
  785 + width: 18rpx;
  786 + line-height: 28rpx;
  787 + margin-right: 3rpx;
751 788 }
752 789  
753 790 .collect.ml20 {
754   - margin-left: 13rpx;
  791 + margin-left: 13rpx;
755 792 }
756 793  
757 794 .fs24.dollar {
758   - padding: 0rpx;
  795 + padding: 0rpx;
759 796 }
760 797  
761 798 .money .price {
762   - margin-left: 12rpx;
763   - text-decoration: line-through;
764   - line-height: 23rpx;
  799 + margin-left: 12rpx;
  800 + text-decoration: line-through;
  801 + line-height: 23rpx;
765 802 }
766 803  
767 804 .province {
768   - line-height: 26rpx;
  805 + line-height: 26rpx;
769 806 }
770 807  
771 808 .nothing {
772   - height: 75rpx;
773   - width: 100%;
  809 + height: 75rpx;
  810 + width: 100%;
774 811 }
775 812  
776 813 .nothing .no_content {
777   - margin: 0rpx 11rpx;
778   - color: rgb(138, 138, 138);
  814 + margin: 0rpx 11rpx;
  815 + color: rgb(138, 138, 138);
779 816 }
780 817  
781 818 .nothing .Foil {
782   - width: 80rpx;
783   - height: 2rpx;
784   - background-color: rgb(138, 138, 138);
  819 + width: 80rpx;
  820 + height: 2rpx;
  821 + background-color: rgb(138, 138, 138);
785 822 }
786 823  
787 824 .goods_name {
788   - height: 70rpx;
789   - margin-top: 6rpx;
  825 + height: 70rpx;
  826 + margin-top: 6rpx;
790 827 }
791 828  
792 829 .seckill-list view.translation {
793   - width: 108rpx;
794   - height: 20rpx;
795   - border-radius: 20rpx;
796   - background: #dfdfdf;
797   - margin: auto;
798   - line-height: 20rpx;
  830 + width: 108rpx;
  831 + height: 20rpx;
  832 + border-radius: 20rpx;
  833 + background: #dfdfdf;
  834 + margin: auto;
  835 + line-height: 20rpx;
799 836 }
800 837  
801 838 .seckill-list view.spot {
802   - width: 10rpx;
803   - height: 10rpx;
804   - padding: 0rpx;
  839 + width: 10rpx;
  840 + height: 10rpx;
  841 + padding: 0rpx;
805 842 }
806 843  
807 844 .spot {
808   - width: 10rpx;
809   - height: 10rpx;
810   - padding: 0rpx;
  845 + width: 10rpx;
  846 + height: 10rpx;
  847 + padding: 0rpx;
811 848 }
812 849  
813 850 .translation {
814   - width: 108rpx;
815   - height: 20rpx;
816   - border-radius: 20rpx;
817   - background: #e0e0e0;
818   - line-height: 20rpx;
819   - bottom: 45rpx;
820   - left: 43%;
  851 + width: 108rpx;
  852 + height: 20rpx;
  853 + border-radius: 20rpx;
  854 + /* background: #e0e0e0; */
  855 + line-height: 20rpx;
  856 + bottom: 45rpx;
  857 + left: 43%;
821 858 }
822 859  
823 860 .translation {
824   - width: 108rpx;
825   - height: 20rpx;
826   - border-radius: 20rpx;
827   - background: #b8d1d6;
828   - line-height: 20rpx;
829   - bottom: 12rpx;
830   - left: 43%;
  861 + width: 108rpx;
  862 + height: 20rpx;
  863 + border-radius: 20rpx;
  864 + /* background: #b8d1d6; */
  865 + line-height: 20rpx;
  866 + bottom: 12rpx;
  867 + left: 43%;
831 868 }
832 869  
833 870 .translations {
834   - width: 108rpx;
835   - height: 20rpx;
836   - border-radius: 20rpx;
837   - background: #dfdfdf;
838   - line-height: 20rpx;
839   - bottom: 25rpx;
840   - left: 43%;
  871 + width: 108rpx;
  872 + height: 20rpx;
  873 + border-radius: 20rpx;
  874 + background: #dfdfdf;
  875 + line-height: 20rpx;
  876 + bottom: 25rpx;
  877 + left: 43%;
841 878 }
842 879  
843 880 .mar-top {
844   - margin-top: 20rpx;
  881 + margin-top: 20rpx;
845 882 }
846 883  
847 884 .mar-tops {
848   - margin-top: 10rpx;
  885 + margin-top: 10rpx;
849 886 }
850 887  
851 888 .pt_active {
852   - animation: sport 0.5s;
  889 + animation: sport 0.5s;
853 890 }
854 891  
855 892 @keyframes sport {
856   - 0% {
857   - transform: translateY(80rpx);
858   - opacity: 0;
859   - }
  893 + 0% {
  894 + transform: translateY(80rpx);
  895 + opacity: 0;
  896 + }
860 897  
861   - 100% {
862   - transform: translateY(0rpx);
863   - opacity: 1;
864   - }
  898 + 100% {
  899 + transform: translateY(0rpx);
  900 + opacity: 1;
  901 + }
865 902 }
866 903  
867 904 .m-left {
868   - margin-left: 18rpx;
  905 + margin-left: 10rpx;
869 906 }
870 907  
871 908 .martop4 {
872   - margin-top: 4rpx;
  909 + margin-top: 4rpx;
873 910 }
874 911  
875 912 .time-blue {
876   - margin-left: 10rpx;
  913 + margin-left: 10rpx;
877 914 }
878 915  
879 916 .is_seckill_height {
880   - height: 40rpx;
881   - line-height: 32rpx;
  917 + height: 40rpx;
  918 + line-height: 32rpx;
882 919 }
883 920  
884 921 .assemble-top-border {
885   - border-top: 10rpx solid #eee;
886   - padding-top: 20rpx;
887   - margin-top: 0rpx;
  922 + border-top: 10rpx solid #eee;
  923 + padding-top: 20rpx;
  924 + margin-top: 0rpx;
888 925 }
889 926  
890 927 .gonju {
891   - max-width: 120rpx;
  928 + /* max-width: 120rpx; */
  929 + padding: 0 20rpx;
  930 + color: #333;
  931 + box-sizing: border-box;
892 932 }
893 933  
894 934 .disgraceful {
895   - position: fixed;
896   - width: 100%;
897   - height: 100%;
898   - left: 0rpx;
899   - bottom: 0rpx;
900   - background-color: rgba(182, 174, 174, 0.753);
901   - z-index: 10;
  935 + position: fixed;
  936 + width: 100%;
  937 + height: 100%;
  938 + left: 0rpx;
  939 + bottom: 0rpx;
  940 + background-color: rgba(0, 0, 0, 0.5);
  941 + z-index: 998;
902 942 }
903 943  
904 944 .newreceive {
905   - position: fixed;
906   - width: 100%;
907   - height: 100%;
908   - z-index: 11;
  945 + position: fixed;
  946 + width: 100%;
  947 + height: 100%;
  948 + z-index: 999;
909 949 }
910 950  
911 951 .receive {
912   - width: 570rpx;
913   - height: 750rpx;
  952 + display: block;
  953 + width: 100%;
  954 + height: 100%;
914 955 }
915   -.close{
916   - width: 70rpx;
917   - height: 70rpx;
918   - margin-top: 30rpx;
  956 +
  957 +.close {
  958 + width: 60rpx;
  959 + height: 60rpx;
  960 + margin-top: 10rpx;
919 961 }
920   -.swiper{
921   - height: 250rpx;
922   - padding-bottom:30rpx;
  962 +
  963 +.swiper {
  964 + height: 220rpx;
  965 + box-sizing: border-box;
  966 + padding: 10rpx 20rpx;
  967 + /* padding-bottom:30rpx; */
923 968 }
924 969  
925 970 page {
926   - overflow-x: hidden;
927   - padding-bottom: 120rpx;
  971 + overflow-x: hidden;
  972 + padding-bottom: 120rpx;
  973 + /* background-color: #f7f8fa; */
  974 +}
  975 +
  976 +.container {
  977 + overflow: hidden;
  978 + padding-top: 140rpx;
928 979 }
929   -.container{ overflow: hidden;}
  980 +
  981 +/* page,
  982 +.container {
  983 + height: 100%;
  984 +} */
930 985  
931 986  
932 987 .hongbao-container {
... ... @@ -935,7 +990,7 @@ page {
935 990 height: 100%;
936 991 top: 0;
937 992 left: 0;
938   - background-color: rgba(0,0,0,.5);
  993 + background-color: rgba(0, 0, 0, .5);
939 994 z-index: 999;
940 995 }
941 996  
... ... @@ -952,9 +1007,9 @@ page {
952 1007 }
953 1008  
954 1009 .close {
955   - position: absolute;
  1010 + /* position: absolute;
956 1011 top: 0;
957   - right: 0;
  1012 + right: 0; */
958 1013 }
959 1014  
960 1015 .hongbao_sm-img {
... ... @@ -966,20 +1021,48 @@ page {
966 1021 /* transform: translateY(-50%); */
967 1022 z-index: 10000;
968 1023 }
969   -.dis_top{position: fixed; top: 0; left: 0; width: 100%; z-index: 100000;}
970   -.full_screen{
971   - position: fixed;left: 0;top: 0;
  1024 +
  1025 +.dis_top {
  1026 + position: fixed;
  1027 + top: 0;
  1028 + left: 0;
  1029 + width: 100%;
  1030 + z-index: 100000;
  1031 +}
  1032 +
  1033 +.full_screen {
  1034 + position: fixed;
  1035 + left: 0;
  1036 + top: 0;
972 1037 z-index: 1000000000000;
973   - background-color: rgba(0,0,0,0.4);
  1038 + background-color: rgba(0, 0, 0, 0.4);
974 1039 width: 100%;
975 1040 height: 100%;
976 1041 background-position: center;
977 1042 background-size: 100% 100%;
978 1043 background-repeat: no-repeat;
979 1044 }
980   -.skip_box{
981   - float: right; margin-top: 10rpx; margin-right: 10rpx;
982   - background-color: gainsboro; width: 120rpx;
983   - height: 48rpx; font-size: 28rpx; line-height: 48rpx;
984   - text-align: center; border-radius: 20rpx;
985   - }
  1045 +
  1046 +.skip_box {
  1047 + float: right;
  1048 + margin-top: 10rpx;
  1049 + margin-right: 10rpx;
  1050 + background-color: gainsboro;
  1051 + width: 120rpx;
  1052 + height: 48rpx;
  1053 + font-size: 28rpx;
  1054 + line-height: 48rpx;
  1055 + text-align: center;
  1056 + border-radius: 20rpx;
  1057 +}
  1058 +
  1059 +
  1060 +.bdt16 {
  1061 + border-top: 16rpx solid #f7f8fa;
  1062 +}
  1063 +
  1064 +.img-box {
  1065 + width: 560rpx;
  1066 + height: 800rpx;
  1067 +}
  1068 +
... ...
pages/team/team_more/team_more.js
... ... @@ -58,11 +58,20 @@ Page({
58 58 user = null,
59 59 ee = this, th=ee,
60 60 pt_status = 1;//已支付
61   -
  61 +
  62 + var req_data={
  63 + store_id: os.stoid, pageSize:6,page:ee.data.currentPage,
  64 + state: 2, team_id: team_id,ordernum:1
  65 + }
  66 +
  67 + if(this.data.pt_act.kttype==3 && this.data.pt_act.max_num){
  68 + req_data.max_num=this.data.pt_act.max_num;
  69 + }
  70 +
  71 +
62 72 //获取活动从表信息team_id
63 73 await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
64   - data: { store_id: os.stoid, pageSize:6,page:ee.data.currentPage,
65   - state: 2, team_id: team_id,ordernum:1 }
  74 + data: req_data
66 75 }).then(res => {
67 76 teamgroup = res.data.data.pageData;
68 77 console.log(teamgroup);
... ...