Commit dd31553a68fc21e13c973adbbd8c5626cb8ca719

Authored by 后端研发-苏明海
2 parents 4b018694 29593190

Merge branch 'dev' into 'test'

Dev

See merge request !212
components/diy_goodsGroup/diy_goodsGroup.js
@@ -107,12 +107,13 @@ Component({ @@ -107,12 +107,13 @@ Component({
107 this.data.is_new = 1 107 this.data.is_new = 1
108 } 108 }
109 this.data.requestData = new Array(); 109 this.data.requestData = new Array();
  110 + //---将数组---
110 this.data.g_id = this.data.object.data; 111 this.data.g_id = this.data.object.data;
111 var arr = []; 112 var arr = [];
112 -  
113 - for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) {  
114 - arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); 113 + for (var i = 0; i < this.data.g_id .length; i += this.data.goodscount) {
  114 + arr.push(this.data.g_id .slice(i, i + this.data.goodscount));
115 } 115 }
  116 +
116 this.data.firist_type_data = arr; 117 this.data.firist_type_data = arr;
117 this.init(this.data.classstyle_id, this.data.wgroup); 118 this.init(this.data.classstyle_id, this.data.wgroup);
118 }, 119 },
@@ -124,7 +125,7 @@ Component({ @@ -124,7 +125,7 @@ Component({
124 var th = this; 125 var th = this;
125 var g_id = this.data.g_id; 126 var g_id = this.data.g_id;
126 if (classstyle_id == 1) { 127 if (classstyle_id == 1) {
127 - //手动选择的时候 128 + //---手动选择的时候---
128 g_id = this.data.firist_type_data[th.data.firist_type_curr]; 129 g_id = this.data.firist_type_data[th.data.firist_type_curr];
129 th.data.firist_type_curr++; 130 th.data.firist_type_curr++;
130 } 131 }
@@ -136,75 +137,46 @@ Component({ @@ -136,75 +137,46 @@ Component({
136 137
137 //--初始化卡类-- 138 //--初始化卡类--
138 th.card_init(); 139 th.card_init();
139 -  
140 var os=getApp().globalData.setting; 140 var os=getApp().globalData.setting;
141 -  
142 classstyle_id = classstyle_id + ""; 141 classstyle_id = classstyle_id + "";
143 switch (classstyle_id) { 142 switch (classstyle_id) {
144 - case "1":  
145 - g_id.forEach(function (val, ind) {  
146 - var item = {};  
147 - var prom_id = null;  
148 - console.log(val.goodsid);  
149 - app.request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + val.goodsid, {}).then(res => {  
150 - //商品地址  
151 - var goods = res.data.data;  
152 - th.setData({  
153 - goods_btn: res.data.data  
154 - })  
155 -  
156 - item.goods_name = goods.goods_name;  
157 - item.goods_img = th.data.imghost + goods.original_img;  
158 - item.market_price = goods.market_price;  
159 - item.shop_price = goods.shop_price;  
160 - item.sales_sum = goods.sales_sum;  
161 - item.goods_id = goods.goods_id;  
162 - item.cardprice1 = goods.cardprice1;  
163 - item.cardprice2 = goods.cardprice2;  
164 - item.cardprice3 = goods.cardprice3;  
165 -  
166 - prom_id = res.data.data.prom_id;  
167 -  
168 - var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单  
169 -  
170 - var url = "";  
171 - if (prom_type == 6) {  
172 - url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id;  
173 - } else if (prom_type == 1) {  
174 - url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id;  
175 - }  
176 - if(url==""){  
177 - th.data.requestData.push(item);  
178 - th.setData({ goods_array: th.data.requestData, });  
179 - if (th.data.firist_type_curr == th.data.firist_type_data.length) {  
180 - th.setData({ goods_btn: [] });  
181 - }  
182 - }else{  
183 - return app.request.promiseGet(url, {})  
184 - }  
185 -  
186 - }).then(res => {  
187 - index++;  
188 - var prom = res.data.data;  
189 - var now=ut.gettimestamp();  
190 - if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) {  
191 - item.prom_price = res.data.data.price;  
192 - }  
193 - th.data.requestData.push(item);  
194 - th.setData({  
195 - goods_array: th.data.requestData,  
196 - });  
197 143
198 - if (th.data.firist_type_curr == th.data.firist_type_data.length) {  
199 - th.setData({  
200 - goods_btn: []  
201 - });  
202 - }  
203 - })  
204 - }) 144 + //---手动选择商品---
  145 + case "1":
  146 + var str="";
  147 + for (var i = 0; i < g_id.length; i++) {
  148 + str += g_id[i].goodsid + ",";
  149 + }
  150 + str=str.substring(0, str.length - 1);
  151 + app.request.get("/api/weshop/goods/getgoodslistOrdby?store_id=" + os.stoid + "&goodsidlist=" + str, {
  152 + success: function(res) {
  153 + console.log("121212");
  154 + if(res.data.code==0 && res.data.data){
  155 + var rData = th.data.requestData;
  156 + if (rData == null) rData=[];
  157 + var now=ut.gettimestamp();
  158 +
  159 + var new_arr=[];
  160 + for (var ii in res.data.data){
  161 + var item=res.data.data[ii];
  162 + item.goods_img=th.data.imghost + item.original_img;
  163 + if(item.e_time<now) {item.prom_type=0; item.prom_price=0;}
  164 + if(item.warm_uptime>now) {item.prom_type=0; item.prom_price=0;}
  165 + new_arr.push(item);
  166 + }
  167 + rData = rData.concat(new_arr);
  168 + th.data.requestData = rData;
  169 + th.setData({ goods_array: rData });
  170 + //---控制有没有加载更多的按钮---
  171 + if (th.data.firist_type_curr == th.data.firist_type_data.length) {th.setData({ goods_btn: [] }); }
  172 + else th.setData({ goods_btn: res.data});
  173 + }
  174 + }
  175 +
  176 + })
  177 +
205 break; 178 break;
206 case "2": 179 case "2":
207 -  
208 var item = {}; 180 var item = {};
209 app.request.promiseGet("/api/weshop/goods/page", { 181 app.request.promiseGet("/api/weshop/goods/page", {
210 data: { 182 data: {
@@ -256,7 +228,8 @@ Component({ @@ -256,7 +228,8 @@ Component({
256 } 228 }
257 if(url!="") { 229 if(url!="") {
258 await app.request.promiseGet(url, {}).then(res => { 230 await app.request.promiseGet(url, {}).then(res => {
259 - var prom = res.data.data; 231 + var prom = null
  232 + if (res && res.data) prom=res.data.data;
260 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { 233 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) {
261 item.prom_price = res.data.data.price; 234 item.prom_price = res.data.data.price;
262 } 235 }
@@ -329,7 +302,8 @@ Component({ @@ -329,7 +302,8 @@ Component({
329 302
330 if(url!=null){ 303 if(url!=null){
331 await app.request.promiseGet(url, {}).then(res => { 304 await app.request.promiseGet(url, {}).then(res => {
332 - var prom = res.data.data; 305 + var prom =null;
  306 + if(res && res.data) res.data.data;
333 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) { 307 if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time<now) {
334 item.prom_price = res.data.data.price; 308 item.prom_price = res.data.data.price;
335 } 309 }
components/diy_pingd_buy/diy_pingd_buy.wxml
1 <!--pages/wp/wp.wxml--> 1 <!--pages/wp/wp.wxml-->
2 <block wx:if="goods_array.length>0"> 2 <block wx:if="goods_array.length>0">
3 - <!--拼单-->  
4 - <view class='top_p'>  
5 - <view class='t_left_p'></view>  
6 - <view class='t_ms_p'>拼单</view>  
7 - <view class='right_p' bindtap="go_to_pindlist">  
8 - <image src="{{iurl}}/miniapp/images/icon-arrowdown.png"></image>  
9 - </view> 3 + <!--拼单-->
  4 + <view class='top_p'>
  5 + <view class="top">
  6 + <view class='t_left_p'></view>
  7 + <view class='t_ms_p'>拼单</view>
10 </view> 8 </view>
11 - <!--商品展示-->  
12 - <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}">  
13 - <view class='sp_p' wx:if="{{object.style==1}}">  
14 - <swiper-item class="s_it" wx:for="{{goods_array}}" >  
15 - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" >  
16 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">  
17 - <view class='one_p'>  
18 - <view class='sp_top_p'>  
19 -  
20 - <block wx:if="{{aitem.start_time>newTime}}">  
21 - <span class='s_top_p' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>  
22 - </block>  
23 - <block wx:if="{{aitem.start_time<newTime}}">  
24 - <span class='s_top_p'>火热进行</span>  
25 - </block>  
26 -  
27 - <!-- <span class='s_top_p'>火热进行</span> -->  
28 -  
29 - <view class='s_img_p'>  
30 - <image src="{{iurl+aitem.original_img}}"  
31 - data-errorimg="goods_array[{{index}}][{{aind}}].original_img"  
32 - binderror="bind_bnerr3"></image>  
33 - </view> 9 + <view class='right_p' bindtap="go_to_pindlist">
  10 + <image src="{{iurl}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image>
  11 + </view>
  12 + </view>
  13 + <!--商品展示-->
  14 + <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}">
  15 + <view class='sp_p' wx:if="{{object.style==1}}">
  16 + <swiper-item class="s_it" wx:for="{{goods_array}}">
  17 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  18 + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">
  19 + <view class='one_p'>
  20 + <view class='sp_top_p'>
34 21
35 - <!--<view class='s_foot_p'>-->  
36 - <!--<text>{{aitem.djs.hou}}天</text>-->  
37 - <!--<text>{{aitem.djs.hou}}时</text>-->  
38 - <!--<text>{{aitem.djs.min}}分</text>-->  
39 - <!--<text>{{aitem.djs.sec}}秒</text>-->  
40 - <!--</view>--> 22 + <block wx:if="{{aitem.start_time>newTime}}">
  23 + <span class='s_top_p' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>
  24 + </block>
  25 + <block wx:if="{{aitem.start_time<newTime}}">
  26 + <span class='s_top_p'>火热进行</span>
  27 + </block>
41 28
42 - <view class='sp_sj_p' wx:if="{{aitem.kttype==1}}">商家</view>  
43 - <view class='sp_sj_p' wx:if="{{aitem.kttype==2}}">会员</view>  
44 - <view class='sp_sj_p' wx:if="{{aitem.kttype==3}}">阶梯</view>  
45 - </view> 29 + <!-- <span class='s_top_p'>火热进行</span> -->
46 30
47 - <view class='sp_wz_p'>  
48 - <view class='sp_wzi_p'>{{aitem.goods_name}}</view>  
49 - <view class='sp_jg_p'>¥{{aitem.price}}</view>  
50 - <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>--> 31 + <view class='s_img_p'>
  32 + <image src="{{iurl+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  33 + </view>
51 34
52 - <view class="tuan_set_num">  
53 - <view class="co-red2">{{aitem.ct_num}}人团</view> 35 + <!--<view class='s_foot_p'>-->
  36 + <!--<text>{{aitem.djs.hou}}天</text>-->
  37 + <!--<text>{{aitem.djs.hou}}时</text>-->
  38 + <!--<text>{{aitem.djs.min}}分</text>-->
  39 + <!--<text>{{aitem.djs.sec}}秒</text>-->
  40 + <!--</view>-->
54 41
55 - <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view>  
56 - <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>  
57 - <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>  
58 - <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view>  
59 - </view>  
60 - </view>  
61 - </view>  
62 - </navigator>  
63 - </block>  
64 - </swiper-item> 42 + <view class='sp_sj_p' wx:if="{{aitem.kttype==1}}">商家</view>
  43 + <view class='sp_sj_p' wx:if="{{aitem.kttype==2}}">会员</view>
  44 + <view class='sp_sj_p' wx:if="{{aitem.kttype==3}}">阶梯</view>
  45 + </view>
65 46
66 - </view>  
67 - </swiper>  
68 - <view class="sp2_p" wx:if="{{object.style==2}}">  
69 - <block wx:for="{{goods_array}}" >  
70 - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" >  
71 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">  
72 - <view class='one1_p'>  
73 - <block>  
74 - <view class="o1_img_p">  
75 - <image src="{{iurl+aitem.original_img}}"  
76 - data-errorimg="goods_array[{{index}}][{{aind}}].original_img"  
77 - binderror="bind_bnerr3"></image>  
78 - <view class='sp_sj1_p' wx:if="{{aitem.kttype==1}}">商家</view>  
79 - <view class='sp_sj1_p' wx:if="{{aitem.kttype==2}}">会员</view>  
80 - <view class='sp_sj1_p' wx:if="{{aitem.kttype==3}}">阶梯</view>  
81 - </view>  
82 - </block> 47 + <view class='sp_wz_p'>
  48 + <view class='sp_wzi_p'>{{aitem.goods_name}}</view>
  49 + <view class='sp_jg_p'>¥{{aitem.price}}</view>
  50 + <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>-->
83 51
84 - <view class="o1_right_p"> 52 + <view class="tuan_set_num">
  53 + <view class="co-red2">{{aitem.ct_num}}人团</view>
85 54
86 - <view class="sp_wzi_p">{{aitem.title}}</view>  
87 - <view class="co-red2">  
88 - <text class="yituan_num">已团{{aitem.buy_num}}件</text>  
89 - {{aitem.ct_num}}人团  
90 - </view>  
91 - <view class='sp_jg_p'>¥{{aitem.price}}</view>  
92 - <view class='sp_jgx_p'>¥{{aitem.market_price}}</view>  
93 -  
94 - <view class="o1_sj_p">  
95 - <image class="time_img" src="/public/static/images/model/time.png"></image><block wx:if="aitem.djs.day>0">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒  
96 - </view>  
97 -  
98 - <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>  
99 - <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view>  
100 - <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>  
101 - <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view>  
102 -  
103 - </view>  
104 - </view>  
105 - </navigator>  
106 - </block> 55 + <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去参团</view>
  56 + <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
  57 + <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="cantuan">去开团</view>
  58 + <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="cantuan huise">已抢光</view>
  59 + </view>
  60 + </view>
  61 + </view>
  62 + </navigator>
107 </block> 63 </block>
  64 + </swiper-item>
  65 +
108 </view> 66 </view>
  67 + </swiper>
  68 + <view class="sp2_p" wx:if="{{object.style==2}}">
  69 + <block wx:for="{{goods_array}}">
  70 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  71 + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">
  72 + <view class='one1_p'>
  73 + <block>
  74 + <view class="o1_img_p">
  75 + <image src="{{iurl+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  76 + <view class='sp_sj1_p' wx:if="{{aitem.kttype==1}}">商家</view>
  77 + <view class='sp_sj1_p' wx:if="{{aitem.kttype==2}}">会员</view>
  78 + <view class='sp_sj1_p' wx:if="{{aitem.kttype==3}}">阶梯</view>
  79 + </view>
  80 + </block>
  81 +
  82 + <view class="o1_right_p">
  83 +
  84 + <view class="sp_wzi_p">{{aitem.title}}</view>
  85 + <view class="co-red2">
  86 + <text class="yituan_num">已团{{aitem.buy_num}}件</text> {{aitem.ct_num}}人团
  87 + </view>
  88 + <view class="money">
  89 + <view class='sp_jg_p'>¥{{aitem.price}}</view>
  90 + <view class='sp_jgx_p'>¥{{aitem.market_price}}</view>
  91 + </view>
  92 + <view class="o1_sj_p">
  93 + <image class="time_img" src="/public/static/images/model/time.png"></image>
  94 + <block wx:if="aitem.djs.day>0">{{aitem.djs.day}}天</block>{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒
  95 + </view>
  96 +
  97 + <view wx:if="{{aitem.kttype==1 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
  98 + <view wx:if="{{aitem.kttype==2 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去开团</view>
  99 + <view wx:if="{{aitem.kttype==3 && aitem.goods_num>aitem.buy_num }}" class="wo_p">去参团</view>
  100 + <view wx:if="{{aitem.goods_num<=aitem.buy_num }}" class="wo_p huise">已抢光</view>
  101 +
  102 + </view>
  103 + </view>
  104 + </navigator>
  105 + </block>
  106 + </block>
  107 + </view>
109 108
110 </block> 109 </block>
111 \ No newline at end of file 110 \ No newline at end of file
components/diy_pingd_buy/diy_pingd_buy.wxss
1 /* pages/wp/wp.wxss */ 1 /* pages/wp/wp.wxss */
2 - 2 +.top{
  3 + display: flex;
  4 + align-items: center;
  5 +}
3 .top_p { 6 .top_p {
4 - width: 100%; 7 + padding:0rpx 20rpx;
5 background-color: white; 8 background-color: white;
6 height: 70rpx; 9 height: 70rpx;
7 line-height: 70rpx; 10 line-height: 70rpx;
@@ -9,12 +12,12 @@ @@ -9,12 +12,12 @@
9 text-align: left; 12 text-align: left;
10 border-bottom: 2rpx solid #eee; 13 border-bottom: 2rpx solid #eee;
11 display: flex; 14 display: flex;
  15 + justify-content: space-between;
  16 + align-items: center;
12 } 17 }
13 18
14 .right_p { 19 .right_p {
15 width: 30rpx; 20 width: 30rpx;
16 - height: 100%;  
17 - margin-left: 580rpx;  
18 } 21 }
19 22
20 .right_p image { 23 .right_p image {
@@ -26,9 +29,7 @@ @@ -26,9 +29,7 @@
26 width: 10rpx; 29 width: 10rpx;
27 height: 38rpx; 30 height: 38rpx;
28 background: #c4182e; 31 background: #c4182e;
29 - margin-top: 18rpx;  
30 margin-right: 12rpx; 32 margin-right: 12rpx;
31 - margin-left: 20rpx;  
32 } 33 }
33 34
34 .sp_p { 35 .sp_p {
@@ -42,7 +43,7 @@ @@ -42,7 +43,7 @@
42 .sp_p .sp_top_p { 43 .sp_p .sp_top_p {
43 height: 220rpx; 44 height: 220rpx;
44 min-width: 30%; 45 min-width: 30%;
45 - position: relative; 46 + position: relative;
46 } 47 }
47 48
48 .sp_p .sp_top_p .s_img_p { 49 .sp_p .sp_top_p .s_img_p {
@@ -206,21 +207,24 @@ swiper { @@ -206,21 +207,24 @@ swiper {
206 } 207 }
207 208
208 .sp2_p .one1_p { 209 .sp2_p .one1_p {
209 - width: 100%;  
210 background-color: white; 210 background-color: white;
211 height: 252rpx; 211 height: 252rpx;
212 display: flex; 212 display: flex;
213 padding: 20rpx; 213 padding: 20rpx;
214 border-bottom: 6rpx#eee solid; 214 border-bottom: 6rpx#eee solid;
  215 + align-items: center;
215 } 216 }
216 217
217 .sp2_p .one1_p .o1_img_p { 218 .sp2_p .one1_p .o1_img_p {
218 - width: 200rpx;  
219 - height: 240rpx;  
220 - margin-right: 24rpx; 219 + width: 220rpx;
  220 + height: 220rpx;
  221 + margin-right: 25rpx;
221 } 222 }
222 223
223 -.o1_right_p{position: relative; width: 485rpx;} 224 +.o1_right_p {
  225 + position: relative;
  226 + width: 465rpx;
  227 +}
224 228
225 .o1_right_p .sp_wzi_p { 229 .o1_right_p .sp_wzi_p {
226 font-size: 36rpx; 230 font-size: 36rpx;
@@ -228,16 +232,16 @@ swiper { @@ -228,16 +232,16 @@ swiper {
228 width: 100%; 232 width: 100%;
229 text-align: left; 233 text-align: left;
230 padding: 4rpx 0; 234 padding: 4rpx 0;
231 - overflow: hidden;  
232 height: 48rpx; 235 height: 48rpx;
  236 + overflow: hidden;
  237 + white-space: nowrap;
233 text-overflow: ellipsis; 238 text-overflow: ellipsis;
234 } 239 }
235 240
236 .o1_right_p .o1_sj_p { 241 .o1_right_p .o1_sj_p {
237 height: 60rpx; 242 height: 60rpx;
238 - margin-bottom: 10rpx;  
239 - font-size: 28rpx;  
240 - line-height: 40rpx; 243 + font-size: 28rpx;
  244 + line-height: 40rpx;
241 } 245 }
242 246
243 .o1_right_p .o1_sj_p text { 247 .o1_right_p .o1_sj_p text {
@@ -269,8 +273,6 @@ swiper { @@ -269,8 +273,6 @@ swiper {
269 height: 100%; 273 height: 100%;
270 background-color: blueviolet; 274 background-color: blueviolet;
271 position: relative; 275 position: relative;
272 - top: -8rpx;  
273 - left: 0rpx;  
274 } 276 }
275 277
276 .o1_right_p .wo_p { 278 .o1_right_p .wo_p {
@@ -280,11 +282,11 @@ swiper { @@ -280,11 +282,11 @@ swiper {
280 line-height: 60rpx; 282 line-height: 60rpx;
281 color: white; 283 color: white;
282 text-align: center; 284 text-align: center;
283 - font-size: 26rpx; 285 + font-size: 32rpx;
284 border-radius: 14rpx; 286 border-radius: 14rpx;
285 - position: absolute;  
286 - right: 0;  
287 - bottom:46rpx; 287 + position: absolute;
  288 + right: 0;
  289 + bottom: 46rpx;
288 } 290 }
289 291
290 .sp_sj_p { 292 .sp_sj_p {
@@ -295,12 +297,11 @@ swiper { @@ -295,12 +297,11 @@ swiper {
295 position: absolute; 297 position: absolute;
296 bottom: 300rpx; 298 bottom: 300rpx;
297 right: 0rpx; 299 right: 0rpx;
298 - top: 0; 300 + top: 0;
299 width: 60rpx; 301 width: 60rpx;
300 height: 60rpx; 302 height: 60rpx;
301 text-align: center; 303 text-align: center;
302 line-height: 60rpx; 304 line-height: 60rpx;
303 -  
304 } 305 }
305 306
306 .sp_sj1_p { 307 .sp_sj1_p {
@@ -315,20 +316,48 @@ swiper { @@ -315,20 +316,48 @@ swiper {
315 text-align: center; 316 text-align: center;
316 line-height: 60rpx; 317 line-height: 60rpx;
317 } 318 }
318 -.tuan_set_num{  
319 - display: flex;justify-content: space-between; font-size: 28rpx; 319 +
  320 +.tuan_set_num {
  321 + display: flex;
  322 + justify-content: space-between;
  323 + font-size: 28rpx;
  324 +}
  325 +
  326 +.tuan_set_num .co-red2 {
  327 + color: #b2aea8;
  328 + font-size: 26rpx;
  329 +}
  330 +
  331 +.tuan_set_num .cantuan {
  332 + background: #c4182e;
  333 + color: #fff;
  334 + padding: 4rpx 10rpx;
  335 + border-radius: 5rpx;
320 } 336 }
321 337
322 -.tuan_set_num .co-red2{  
323 - color: #B2AEA8;font-size: 26rpx; 338 +.tuan_set_num .cantuan.huise {
  339 + background: gainsboro;
  340 + color: #666;
324 } 341 }
325 -.tuan_set_num .cantuan{  
326 - background:#c4182e; color: #fff; padding: 4rpx 10rpx; border-radius:5rpx ; 342 +
  343 +.o1_sj_p .time_img {
  344 + width: 40rpx;
  345 + height: 40rpx;
  346 + vertical-align: top;
  347 + margin-right: 10rpx;
327 } 348 }
328 -.tuan_set_num .cantuan.huise{  
329 - background:gainsboro; color: #666; 349 +
  350 +.o1_right_p .co-red2 {
  351 + font-size: 30rpx;
  352 + color: #999;
330 } 353 }
331 354
332 -.o1_sj_p .time_img{width: 40rpx; height: 40rpx; vertical-align: top; margin-right: 10rpx;}  
333 -.o1_right_p .co-red2{font-size:30rpx; color: #999;}  
334 -.o1_right_p .co-red2 .yituan_num{font-size:30rpx; margin-right: 10rpx; color: #333;} 355 +.o1_right_p .co-red2 .yituan_num {
  356 + font-size: 30rpx;
  357 + margin-right: 10rpx;
  358 + color: #333;
  359 +}
  360 +.money{
  361 + display: flex;
  362 + align-items: center;
  363 +}
335 \ No newline at end of file 364 \ No newline at end of file
components/diy_seckill/diy_seckill.wxml
1 <block wx:if="goods_array.length>0"> 1 <block wx:if="goods_array.length>0">
2 - <!--秒杀-->  
3 - <view class='top'>  
4 - <view class='t_left'></view>  
5 - <view class='t_ms'>秒杀</view> 2 + <!--秒杀-->
  3 + <view class='top'>
  4 + <view class="flex">
  5 + <view class='t_left'></view>
  6 + <view class='t_ms'>秒杀</view>
  7 + </view>
6 <view class='right_k' bindtap="go_to_skill"> 8 <view class='right_k' bindtap="go_to_skill">
7 - <image src="{{imghost}}/miniapp/images/icon-arrowdown.png"></image> 9 + <image src="{{imghost}}/miniapp/images/icon-arrowdown.png" lazy-load="true"></image>
8 </view> 10 </view>
9 - </view> 11 + </view>
10 12
11 - <!--商品展示-->  
12 - <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}"> 13 + <!--商品展示-->
  14 + <swiper class="s_prom" indicator-active-color='red' indicator-dots="false" wx:if="{{object.style==1}}">
13 <view class='sp' wx:if="{{object.style==1}}"> 15 <view class='sp' wx:if="{{object.style==1}}">
14 - <swiper-item class="s_it" wx:for="{{goods_array}}" >  
15 - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">  
16 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">  
17 - <view class='one'>  
18 - <view class='sp_top'>  
19 - <view class='po'></view>  
20 - <block wx:if="{{aitem.start_time>newTime}}">  
21 - <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>  
22 - </block>  
23 - <block wx:if="{{aitem.start_time<newTime}}">  
24 - <span class='s_top_kill'>火热进行</span>  
25 - </block>  
26 - <view class='clear'></view>  
27 -  
28 - <view class='s_img'>  
29 - <image src="{{imghost+aitem.original_img}}"  
30 - data-errorimg="goods_array[{{index}}][{{aind}}].original_img"  
31 - binderror="bind_bnerr3"></image>  
32 - </view>  
33 -  
34 - <view class='s_foot_kill'>  
35 - <text>{{aitem.djs.day}}天</text>  
36 - <text>{{aitem.djs.hou}}时</text>  
37 - <text>{{aitem.djs.min}}分</text>  
38 - <text>{{aitem.djs.sec}}秒</text>  
39 - </view>  
40 - <view class='clear'></view>  
41 -  
42 - </view>  
43 -  
44 - <view class='sp_wz'>  
45 - <view class='sp_wzi'>{{aitem.goods_name}}</view>  
46 - <view class='sp_jg'>¥{{aitem.price}}</view>  
47 - <view class='sp_jgx'>¥{{aitem.market_price}}</view>  
48 - </view>  
49 -  
50 - </view>  
51 - </navigator>  
52 - </block>  
53 - </swiper-item>  
54 - </view>  
55 - </swiper>  
56 -  
57 - <view class="sp2" wx:if="{{object.style==2}}">  
58 - <block wx:for="{{goods_array}}" >  
59 - <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind" >  
60 - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">  
61 - <view class='one1'>  
62 -  
63 - <view class="o1_img">  
64 - <image src="{{imghost+aitem.original_img}}"  
65 - data-errorimg="goods_array[{{index}}][{{aind}}].original_img"  
66 - binderror="bind_bnerr3"></image>  
67 - </view>  
68 -  
69 - <view class="o1_right">  
70 - <view class="sp_wzi">{{aitem.goods_name}}</view>  
71 - <view class="o1_sj_kill">  
72 - <text>{{aitem.djs.day}}</text>  
73 - 天  
74 - <text>{{aitem.djs.hou}}</text>  
75 - :  
76 - <text>{{aitem.djs.min}}</text>  
77 - :  
78 - <text>{{aitem.djs.sec}}</text>  
79 -  
80 - </view>  
81 - <view class='sp_jg'>¥{{aitem.price}}</view>  
82 - <view class='sp_jgx'>¥{{aitem.market_price}}</view>  
83 - <block wx:if="{{aitem.start_time>newTime}}">  
84 - <view class="wo" style="background-color: #adadad">正在预热</view>  
85 - </block>  
86 - <block wx:if="{{aitem.start_time<newTime}}">  
87 - <view class="wo">我要抢</view>  
88 - </block>  
89 -  
90 -  
91 - </view> 16 + <swiper-item class="s_it" wx:for="{{goods_array}}">
  17 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  18 + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">
  19 + <view class='one'>
  20 + <view class='sp_top'>
  21 + <view class='po'></view>
  22 + <block wx:if="{{aitem.start_time>newTime}}">
  23 + <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span>
  24 + </block>
  25 + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}">
  26 + <span class='s_top_kill'>火热进行</span>
  27 + </block>
  28 + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}">
  29 + <span class='s_top_kill gray'>已抢光</span>
  30 + </block>
  31 +
  32 + <view class='clear'></view>
  33 +
  34 + <view class='s_img'>
  35 + <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  36 + </view>
  37 +
  38 + <view class='s_foot_kill'>
  39 + <text>{{aitem.djs.day}}天</text>
  40 + <text>{{aitem.djs.hou}}时</text>
  41 + <text>{{aitem.djs.min}}分</text>
  42 + <text>{{aitem.djs.sec}}秒</text>
92 </view> 43 </view>
93 - </navigator> 44 + <view class='clear'></view>
  45 +
  46 + </view>
  47 +
  48 + <view class='sp_wz'>
  49 + <view class='sp_wzi'>{{aitem.goods_name}}</view>
  50 + <view class='sp_jg'>¥{{aitem.price}}</view>
  51 + <view class='sp_jgx'>¥{{aitem.market_price}}</view>
  52 + </view>
  53 +
  54 + </view>
  55 + </navigator>
94 </block> 56 </block>
  57 + </swiper-item>
  58 + </view>
  59 + </swiper>
  60 +
  61 + <view class="sp2" wx:if="{{object.style==2}}">
  62 + <block wx:for="{{goods_array}}">
  63 + <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind">
  64 + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1">
  65 + <view class='one1'>
  66 +
  67 + <view class="o1_img">
  68 + <image src="{{imghost+aitem.original_img}}" data-errorimg="goods_array[{{index}}][{{aind}}].original_img" binderror="bind_bnerr3"></image>
  69 + </view>
  70 +
  71 + <view class="o1_right">
  72 + <view class="sp_wzi">{{aitem.goods_name}}</view>
  73 + <view class="o1_sj_kill">
  74 + <text>{{aitem.djs.day}}</text> 天
  75 + <text>{{aitem.djs.hou}}</text> :
  76 + <text>{{aitem.djs.min}}</text> :
  77 + <text>{{aitem.djs.sec}}</text>
  78 +
  79 + </view>
  80 + <view class="money">
  81 + <view class='sp_jg'>¥{{aitem.price}}</view>
  82 + <view class='sp_jgx'>¥{{aitem.market_price}}</view>
  83 + </view>
  84 + <block wx:if="{{aitem.start_time>newTime}}">
  85 + <view class="wo" style="background-color: #adadad">正在预热</view>
  86 + </block>
  87 + <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}">
  88 + <view class="rob">
  89 + <view class="wo">我要抢</view>
  90 + </view>
  91 + </block>
  92 +
  93 + <block wx:if="{{aitem.goods_num<=aitem.buy_num}}">
  94 + <view class="wo" style="background-color: #adadad">已抢光</view>
  95 + </block>
  96 +
  97 +
  98 + </view>
  99 + </view>
  100 + </navigator>
  101 + </block>
95 </block> 102 </block>
96 103
97 - </view>  
98 - <view class='clear'></view> 104 + </view>
  105 + <view class='clear'></view>
99 106
100 </block> 107 </block>
101 \ No newline at end of file 108 \ No newline at end of file
components/diy_seckill/diy_seckill.wxss
1 -  
2 -.top{  
3 - width: 100%; 1 +.flex{
  2 + display: flex;
  3 + align-items: center;
  4 +}
  5 +.top {
4 background-color: white; 6 background-color: white;
5 height: 70rpx; 7 height: 70rpx;
6 line-height: 70rpx; 8 line-height: 70rpx;
7 - color: #000;  
8 - text-align: left;  
9 - border-bottom: 2rpx solid #eee;  
10 - display: flex; 9 + color: #000;
  10 + border-bottom: 2rpx solid #eee;
  11 + padding:0rpx 20rpx;
  12 + display: flex;
  13 + justify-content: space-between;
11 } 14 }
12 15
13 -  
14 -.s_it{ 16 +.s_it {
15 width: 100%; 17 width: 100%;
16 display: flex; 18 display: flex;
17 background-color: white; 19 background-color: white;
18 } 20 }
19 21
20 -.s_prom{ 22 +.s_prom {
21 width: 100%; 23 width: 100%;
22 background-color: white; 24 background-color: white;
23 min-height: 200rpx; 25 min-height: 200rpx;
24 } 26 }
25 27
26 swiper { 28 swiper {
27 - display:block;  
28 - height:400rpx;  
29 - 29 + display: block;
  30 + height: 400rpx;
30 } 31 }
31 32
32 -.right_k{ 33 +.right_k {
33 width: 30rpx; 34 width: 30rpx;
34 - height: 100%;  
35 - margin-left: 580rpx;  
36 } 35 }
37 -.right_k image{ width: 30rpx; height: 30rpx}  
38 -  
39 -  
40 -.top .t_left{  
41 - width: 10rpx;  
42 - height: 38rpx;  
43 - background: #C4182E;  
44 - margin-top:18rpx;  
45 -margin-right:12rpx;  
46 -margin-left:20rpx; 36 +.right_k image{
  37 + width: 30rpx;
  38 + height: 30rpx;
  39 +}
  40 + .t_left {
  41 + width: 10rpx;
  42 + height: 38rpx;
  43 + background: #c4182e;
  44 + margin-right: 10rpx;
47 } 45 }
48 46
49 47
50 -.sp{ 48 +.sp {
51 min-height: 300rpx; 49 min-height: 300rpx;
52 width: 100%; 50 width: 100%;
53 background-color: white; 51 background-color: white;
54 - padding:18rpx;  
55 -display: flex; 52 + padding: 18rpx;
  53 + display: flex;
56 } 54 }
57 55
58 -.sp .sp_top{ 56 +.sp .sp_top {
59 height: 220rpx; 57 height: 220rpx;
60 min-width: 30%; 58 min-width: 30%;
61 -  
62 -  
63 } 59 }
64 60
65 -.sp .sp_top .s_img{ 61 +.sp .sp_top .s_img {
66 width: 210rpx; 62 width: 210rpx;
67 height: 100%; 63 height: 100%;
68 } 64 }
69 65
70 -.sp .sp_top .s_img image{ 66 +.sp .sp_top .s_img image {
71 width: 210rpx; 67 width: 210rpx;
72 height: 100%; 68 height: 100%;
73 -  
74 position: relative; 69 position: relative;
75 top: -74rpx; 70 top: -74rpx;
76 - left:0rpx;  
77 - 71 + left: 0rpx;
78 } 72 }
79 73
80 -.sp .sp_top .s_top_kill  
81 -  
82 -{  
83 -  
84 -background-color:#C4182E;  
85 -font-size:24rpx;  
86 -height:38rpx;  
87 -line-height:38rpx;  
88 -left:6rpx;  
89 -  
90 -padding:4rpx 10rpx;  
91 -  
92 -border-radius:10rpx;  
93 -  
94 -  
95 -z-index: 999; 74 +.sp .sp_top .s_top_kill {
  75 + background-color: #c4182e;
  76 + font-size: 24rpx;
  77 + height: 38rpx;
  78 + line-height: 38rpx;
  79 + left: 6rpx;
  80 + padding: 4rpx 10rpx;
  81 + border-radius: 10rpx;
  82 + z-index: 999;
96 position: relative; 83 position: relative;
97 - top:-6rpx;  
98 - width: 210rpx;  
99 -  
100 -  
101 - color: #fff;  
102 - text-align: center;  
103 -  
104 - 84 + top: -6rpx;
  85 + width: 210rpx;
  86 + color: #fff;
  87 + text-align: center;
105 } 88 }
106 89
107 -.po{ 90 +.po {
108 position: absolute; 91 position: absolute;
109 } 92 }
110 93
111 -.sp .sp_top .s_foot_kill{ 94 +.sp .sp_top .s_foot_kill {
112 font-size: 20rpx; 95 font-size: 20rpx;
113 position: relative; 96 position: relative;
114 - top:-90rpx;  
115 - width: 210rpx;  
116 - height: 38rpx;  
117 - line-height: 38rpx;  
118 - color: #fff;  
119 - text-align: center;  
120 - background-color: rgba(0, 0, 0, 0.5); 97 + top: -90rpx;
  98 + width: 210rpx;
  99 + height: 38rpx;
  100 + line-height: 38rpx;
  101 + color: #fff;
  102 + text-align: center;
  103 + background-color: rgba(0, 0, 0, 0.5);
121 } 104 }
122 105
123 -  
124 -  
125 -.sp_wz{  
126 -width: 210rpx;  
127 - min-height:100rpx;  
128 - 106 +.sp_wz {
  107 + width: 210rpx;
  108 + min-height: 100rpx;
129 } 109 }
130 110
131 -.sp_wz .sp_wzi{  
132 - font-size: 30rpx;  
133 - border-bottom: 2rpx solid #dcdcdc;  
134 - width: 100%;  
135 - text-align: left;  
136 - padding: 4rpx 0;  
137 - overflow: hidden;  
138 - height: 48rpx;  
139 - text-overflow: ellipsis;  
140 - white-space: nowrap;  
141 - line-height: 48rpx; 111 +.sp_wz .sp_wzi {
  112 + font-size: 30rpx;
  113 + border-bottom: 2rpx solid #dcdcdc;
  114 + width: 100%;
  115 + text-align: left;
  116 + padding: 4rpx 0;
  117 + overflow: hidden;
  118 + height: 48rpx;
  119 + text-overflow: ellipsis;
  120 + white-space: nowrap;
  121 + line-height: 48rpx;
142 } 122 }
143 123
144 -.sp_wz .sp_jg{  
145 - color: #C4182E;  
146 - font-size: 30rpx;  
147 - overflow: hidden;  
148 - display: inline-block;  
149 - text-overflow: ellipsis;  
150 - white-space: nowrap;  
151 - margin-right: 10rpx; 124 +.sp_wz .sp_jg {
  125 + color: #c4182e;
  126 + font-size: 30rpx;
  127 + overflow: hidden;
  128 + display: inline-block;
  129 + text-overflow: ellipsis;
  130 + white-space: nowrap;
  131 + margin-right: 10rpx;
152 } 132 }
153 133
154 -.sp_wz .sp_jgx{ 134 +.sp_wz .sp_jgx {
155 color: #adadad; 135 color: #adadad;
156 - text-decoration: line-through;  
157 - font-size: 24rpx;  
158 -  
159 - overflow: hidden;  
160 - display: inline-block;  
161 - text-overflow: ellipsis;  
162 - white-space: nowrap;  
163 - 136 + text-decoration: line-through;
  137 + font-size: 24rpx;
  138 + overflow: hidden;
  139 + display: inline-block;
  140 + text-overflow: ellipsis;
  141 + white-space: nowrap;
164 } 142 }
165 143
166 -.one{ 144 +.one {
167 margin-left: 14rpx; 145 margin-left: 14rpx;
168 -  
169 } 146 }
170 147
171 -  
172 -.sp .sp_top .s_top1_kill{ 148 +.sp .sp_top .s_top1_kill {
173 position: absolute; 149 position: absolute;
174 -background-color:#C4182E;  
175 -font-size:24rpx;  
176 -height:38rpx;  
177 -line-height:38rpx;  
178 -left:265rpx;  
179 -top:100rpx;  
180 -padding:0 10rpx;  
181 -color:white;  
182 -border-radius:10rpx;  
183 - 150 + background-color: #c4182e;
  151 + font-size: 24rpx;
  152 + height: 38rpx;
  153 + line-height: 38rpx;
  154 + left: 265rpx;
  155 + top: 100rpx;
  156 + padding: 0 10rpx;
  157 + color: white;
  158 + border-radius: 10rpx;
184 } 159 }
185 160
186 -.sp .sp_top .s_top2_kill{ 161 +.sp .sp_top .s_top2_kill {
187 position: absolute; 162 position: absolute;
188 -background-color:#C4182E;  
189 -font-size:24rpx;  
190 -height:38rpx;  
191 -line-height:38rpx;  
192 -right:146rpx;  
193 -top:100rpx;  
194 -padding:0 10rpx;  
195 -color:white;  
196 -border-radius:10rpx;  
197 - 163 + background-color: #c4182e;
  164 + font-size: 24rpx;
  165 + height: 38rpx;
  166 + line-height: 38rpx;
  167 + right: 146rpx;
  168 + top: 100rpx;
  169 + padding: 0 10rpx;
  170 + color: white;
  171 + border-radius: 10rpx;
198 } 172 }
199 173
200 -  
201 -  
202 -.sp .sp_top .s_foot1_kill{ 174 +.sp .sp_top .s_foot1_kill {
203 font-size: 20rpx; 175 font-size: 20rpx;
204 position: absolute; 176 position: absolute;
205 - top:270rpx;  
206 - width: 210rpx;  
207 - height: 38rpx;  
208 - line-height: 38rpx;  
209 - color: #fff;  
210 - text-align: center;  
211 - background-color: rgba(0, 0, 0, 0.5); 177 + top: 270rpx;
  178 + width: 210rpx;
  179 + height: 38rpx;
  180 + line-height: 38rpx;
  181 + color: #fff;
  182 + text-align: center;
  183 + background-color: rgba(0, 0, 0, 0.5);
212 } 184 }
213 185
214 -.po1{ 186 +.po1 {
215 position: absolute; 187 position: absolute;
216 } 188 }
217 189
218 -  
219 -.sp .sp_top .s_foot2_kill{ 190 +.sp .sp_top .s_foot2_kill {
220 font-size: 20rpx; 191 font-size: 20rpx;
221 position: absolute; 192 position: absolute;
222 - top:270rpx;  
223 - width: 210rpx;  
224 - height: 38rpx;  
225 - line-height: 38rpx;  
226 - color: #fff;  
227 - text-align: center;  
228 - background-color: rgba(0, 0, 0, 0.5); 193 + top: 270rpx;
  194 + width: 210rpx;
  195 + height: 38rpx;
  196 + line-height: 38rpx;
  197 + color: #fff;
  198 + text-align: center;
  199 + background-color: rgba(0, 0, 0, 0.5);
229 } 200 }
230 201
231 -  
232 -  
233 -  
234 -  
235 -  
236 -  
237 -.sp2{ 202 +.sp2 {
238 width: 100%; 203 width: 100%;
239 min-height: 240rpx; 204 min-height: 240rpx;
240 -  
241 } 205 }
242 206
243 -.sp2 .one1{  
244 - width: 100%; 207 +.sp2 .one1 {
245 background-color: white; 208 background-color: white;
246 - height: 252rpx; 209 + height: 285rpx;
247 display: flex; 210 display: flex;
248 - padding: 20rpx;  
249 - border-bottom:6rpx#eee solid;  
250 - 211 + padding:0rpx 20rpx;
  212 + border-bottom: 6rpx#eee solid;
  213 + align-items: center;
251 } 214 }
252 215
253 -.sp2 .one1 .o1_img{  
254 - width: 200rpx;  
255 - height: 240rpx;  
256 -  
257 - margin-right: 24rpx; 216 +.sp2 .one1 .o1_img {
  217 + width: 220rpx;
  218 + height: 220rpx;
  219 + margin-right: 25rpx;
258 } 220 }
259 221
260 -.o1_right .sp_wzi{ 222 +.o1_right .sp_wzi {
261 font-size: 36rpx; 223 font-size: 36rpx;
262 - margin-bottom:6rpx;  
263 -  
264 - width: 100%; 224 + margin-bottom: 6rpx;
265 text-align: left; 225 text-align: left;
266 padding: 4rpx 0; 226 padding: 4rpx 0;
267 - overflow: hidden;  
268 height: 48rpx; 227 height: 48rpx;
  228 + overflow: hidden;
  229 + white-space: nowrap;
269 text-overflow: ellipsis; 230 text-overflow: ellipsis;
270 - white-space: nowrap  
271 } 231 }
272 232
273 -.o1_right .o1_sj_kill{ 233 +.o1_right .o1_sj_kill {
274 height: 60rpx; 234 height: 60rpx;
275 -  
276 margin-bottom: 10rpx; 235 margin-bottom: 10rpx;
277 } 236 }
278 237
279 -.o1_right .o1_sj_kill text{ 238 +.o1_right .o1_sj_kill text {
280 background-color: #fdcb08; 239 background-color: #fdcb08;
281 text-align: center; 240 text-align: center;
282 border-radius: 10rpx; 241 border-radius: 10rpx;
283 - padding:4rpx;  
284 -margin-left:6rpx;  
285 - 242 + padding: 4rpx;
  243 + margin-left: 6rpx;
286 } 244 }
287 245
288 -  
289 -  
290 -.o1_right .sp_jg{  
291 - color: #C4182E; 246 +.o1_right .sp_jg {
  247 + color: #c4182e;
292 font-size: 36rpx; 248 font-size: 36rpx;
293 -  
294 overflow: hidden; 249 overflow: hidden;
295 display: inline-block; 250 display: inline-block;
296 margin-right: 10rpx; 251 margin-right: 10rpx;
297 } 252 }
298 253
299 -.o1_right .sp_jgx{ 254 +.o1_right .sp_jgx {
300 color: #dcdcdc; 255 color: #dcdcdc;
301 text-decoration: line-through; 256 text-decoration: line-through;
302 font-size: 26rpx; 257 font-size: 26rpx;
303 -  
304 overflow: hidden; 258 overflow: hidden;
305 display: inline-block; 259 display: inline-block;
306 } 260 }
307 261
308 -  
309 -.o1_img image{  
310 - width: 100%;  
311 - height: 100%;  
312 -  
313 - position:relative;  
314 -top:-23rpx;  
315 -left:0rpx;  
316 - 262 +.o1_img image {
  263 + width: 220rpx;
  264 + height: 220rpx;
317 } 265 }
318 -  
319 -.o1_right .wo{  
320 - background-color: #C4182E; 266 +.o1_right{
  267 + width: 465rpx;
  268 +}
  269 +.o1_right .wo {
  270 + background-color: #c4182e;
321 width: 160rpx; 271 width: 160rpx;
322 height: 60rpx; 272 height: 60rpx;
323 line-height: 60rpx; 273 line-height: 60rpx;
324 color: white; 274 color: white;
325 text-align: center; 275 text-align: center;
326 - font-size: 38rpx;  
327 - margin-left:298rpx;  
328 -border-radius:14rpx;  
329 -padding-left: 10rpx;  
330 -padding-right: 10rpx; 276 + font-size: 32rpx;
  277 + border-radius: 14rpx;
  278 +}
  279 +.rob{
  280 + display: flex;
  281 + justify-content: flex-end;
  282 +}
  283 +.money{
  284 + display: flex;
  285 + align-items: center;
331 } 286 }
332 287
333 -  
334 - 288 +.sp .sp_top .s_top_kill.gray{background-color:#bdbdc1;color: #fff;font-weight: normal}
335 \ No newline at end of file 289 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.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 + data: {
  8 + url: a.url, //接口网址
  9 + iurl: a.imghost, //图片前缀网址
  10 + getStorageID: '',
  11 + getUserID: '',
  12 + wareCard: [],
  13 + page: 0,
  14 + pageSize: 10,
  15 + isEmpty: true,
  16 + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
  17 + contentText: {
  18 + contentdown: '加载更多',
  19 + contentrefresh: '加载中...',
  20 + contentnomore: '已加载全部'
  21 + },
  22 + is_read:0,//礼包列表是否全部加载完毕
  23 + },
  24 + onLoad: function(options) {
  25 + var th = this;
  26 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  27 + my_confirm.open_cancel(0);
  28 + th.setData({
  29 + getStorageID: a.stoid,
  30 + getUserID: d.user_id
  31 + })
  32 + },
  33 + onShow: function() {
  34 + var th = this;
  35 + th.setData({
  36 + pages: 1,
  37 + pageSize: 10,
  38 + loadingType: 0
  39 + })
  40 + th.getList();
  41 + },
  42 +
  43 + GetBuyPrice: function(e) {
  44 + var that = this.data;
  45 + var th = this;
  46 + var id = e.currentTarget.dataset.id;//活动id
  47 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  48 + my_confirm.open(
  49 + "是否确定购买该礼包",
  50 + "取消",
  51 + "确定",
  52 + function() {
  53 + my_confirm.open_cancel(0);
  54 + },
  55 + function() {
  56 + my_confirm.open_cancel(0);
  57 + var json = {
  58 + "actId": '', //活动Id
  59 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  60 + "buyType": '2', //1=积分兑换 2=余额购买
  61 + "lbId": id, //礼包Id
  62 + "storeId": that.getStorageID, //商家Id
  63 + "userId": that.getUserID, //用户ID
  64 + "buyFrom": 2
  65 + };
  66 + var data = JSON.stringify(json);
  67 + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
  68 + wx.request({
  69 + url: url,
  70 + data: data,
  71 + method: 'post',
  72 + header: {
  73 + 'content-type': 'application/json'
  74 + }, // 设置请求的 header
  75 + success: function (res) {
  76 + if (res.data.code == 0) {
  77 + res=res.data.data;
  78 + wx.requestPayment({
  79 + timeStamp: String(res.timeStamp),
  80 + nonceStr: res.nonceStr,
  81 + package: res.packageValue,
  82 + signType: res.signType,
  83 + paySign: res.paySign,
  84 + success: function (n) {
  85 +
  86 + },
  87 + fail: function (n) {
  88 +
  89 + }
  90 + });
  91 + } else {
  92 + getApp().my_warnning(res.data.msg, 0, th);
  93 + }
  94 + }
  95 + })
  96 +
  97 + }
  98 +
  99 +
  100 + )
  101 +
  102 +
  103 + },
  104 + GetBuyIntegral: function(e) {
  105 + var that = this.data;
  106 + var th = this;
  107 + var id = e.currentTarget.dataset.id;//活动id
  108 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  109 + my_confirm.open(
  110 + "是否确定兑换该礼包",
  111 + "取消",
  112 + "确定",
  113 + function() {
  114 + my_confirm.open_cancel(0);
  115 + },
  116 + function() {
  117 + my_confirm.open_cancel(0);
  118 + var json = {
  119 + "actId": '', //活动Id
  120 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  121 + "buyType": '1', //1=积分兑换 2=余额购买
  122 + "lbId": id, //礼包Id
  123 + "storeId": that.getStorageID, //商家Id
  124 + "userId": that.getUserID //用户ID
  125 + };
  126 + var data = JSON.stringify(json);
  127 + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert";
  128 + wx.request({
  129 + url: url,
  130 + data: data,
  131 + method: 'post',
  132 + header: {
  133 + 'content-type': 'application/json'
  134 + }, // 设置请求的 header
  135 + success: function (res) {
  136 + if (res.data.code == 0) {
  137 + getApp().my_warnning("兑换成功!", 1, th);
  138 + } else {
  139 + getApp().my_warnning(res.data.msg, 0, th);
  140 + }
  141 + }
  142 + })
  143 +
  144 + })
  145 +
  146 +
  147 + },
  148 + getList: function(e) {
  149 + var _this = this; //上拉加载
  150 + var that = this.data;
  151 + if (that.loadingType != 0) {
  152 + return false;
  153 + }
  154 + // that.loadingType = 1;
  155 + _this.setData({
  156 + loadingType: 1
  157 + })
  158 + getApp().request.get('/api/weshop/marketing/giftbag/page', {
  159 + data: {
  160 + "storeId": that.getStorageID, //商家ID
  161 + "userId": that.getUserID, //用户ID
  162 + "page": that.pages,
  163 + "pageSize": that.pageSize
  164 + },
  165 + success: function success(res) {
  166 + if (res.data.code == 0) {
  167 + if (res.data.data.total > 0) {
  168 + _this.setData({
  169 + isEmpty: false
  170 + })
  171 + } else {
  172 + _this.setData({
  173 + isEmpty: true
  174 + })
  175 + }
  176 + if (res.data.data.pageData.length == 0) {
  177 + _this.setData({
  178 + loadingType: 2
  179 + })
  180 + } else {
  181 + var wareCard = that.wareCard;
  182 + var is_read = 0;
  183 + if (wareCard.length < res.data.data.total) {
  184 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  185 + wareCard.push(res.data.data.pageData[i]);
  186 + }
  187 + }else{
  188 + is_read:1
  189 + }
  190 + _this.setData({
  191 + wareCard: wareCard,
  192 + is_read: is_read,
  193 + loadingType: 0
  194 + })
  195 +
  196 + }
  197 + } else {
  198 + getApp().my_warnning(res.data.msg, 0, _this);
  199 + }
  200 + }
  201 + })
  202 +
  203 + },
  204 + //销毁界面跳转
  205 + redirectTo: function(e) {
  206 + var th = this;
  207 + var url = e.currentTarget.dataset.url;
  208 + //销毁跳转
  209 + wx.redirectTo({
  210 + url: url
  211 + });
  212 + },
  213 + //不销毁界面跳转
  214 + navigateTo:function(e){
  215 + var th = this;
  216 + var url = e.currentTarget.dataset.url;
  217 + wx.navigateTo({
  218 + url: url,
  219 + })
  220 + }
  221 +})
0 \ No newline at end of file 222 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "礼包列表",
  3 + "navigationStyle": "custom",
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm"
  7 + }
  8 +}
0 \ No newline at end of file 9 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.wxml 0 → 100644
  1 +<view class="top_img">
  2 + <view class="top_img">
  3 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}" lazy-load="true"></image>
  4 + </view>
  5 + <view class="top_title">
  6 + <view class="top_title_box">
  7 + <text class="top_title_redtext">礼包列表</text>
  8 + </view>
  9 + <view class="top_title_box_S"></view>
  10 + <view class="top_title_box">
  11 + <a class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/mygiftpack/mygiftpack">我的礼包</a>
  12 + </view>
  13 + </view>
  14 + <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index">
  15 + <view class="content_box">
  16 + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn={{items.orderSn}}">
  17 + <view class="content_box_img">
  18 + <image src="{{iurl+items.lbUrl}}" lazy-load="true"></image>
  19 + </view>
  20 + <view class="content_box_title">
  21 + <view class="content_ware_title">
  22 + <text bindtap="__e">{{items.giftTitle}}</text>
  23 + </view>
  24 + <view class="content_ware_type">
  25 + <block wx:if="{{items.payMoney>0}}">
  26 + <text>{{"¥"+items.payMoney}}</text>
  27 + </block>
  28 + <block wx:if="{{items.payMoney>0&&items.payIntegral>0}}">
  29 + <text>/</text>
  30 + </block>
  31 + <block wx:if="{{items.payIntegral>0}}">
  32 + <text>{{items.payIntegral+"积分"}}</text>
  33 + </block>
  34 + </view>
  35 + <view class="content_ware_price">
  36 + <text>{{"原价:¥"+items.giftPosPrice}}</text>
  37 + </view>
  38 + <view class="content_ware_time">
  39 + <text>{{"活动时间:"+items.endTime}}</text>
  40 + </view>
  41 + </view>
  42 + </view>
  43 + <view class="content_box_button">
  44 + <view class="box_button_remark">
  45 + <text>{{"已售:"+items.giftQty+"件"}}</text>
  46 + </view>
  47 + <block wx:if="{{items.payMoney>0}}">
  48 + <view class="box_button_buy" bindtap="GetBuyPrice" data-id="{{items.lbId}}">
  49 + <button>立即购买</button>
  50 + </view>
  51 + </block>
  52 + <block wx:if="{{items.payIntegral>0}}">
  53 + <view class="box_button_dui" bindtap="GetBuyIntegral" data-id="{{items.lbId}}">
  54 + <button>立即兑换</button>
  55 + </view>
  56 + </block>
  57 + </view>
  58 + </view>
  59 + </block>
  60 + <block wx:if="{{isEmpty==true && wareCard.length<2}}">
  61 + <view class="foot_empty">
  62 + <view>
  63 + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
  64 + </view>
  65 + <view>
  66 + <text>当前暂无礼包</text>
  67 + </view>
  68 + <view class="foot_empty_button">
  69 + <text bindtap="__e">去获取</text>
  70 + </view>
  71 + </view>
  72 + </block>
  73 + <view wx:if="{{is_read}}" class="foot_box">
  74 + <text>———— 到底了 ————</text>
  75 + </view>
  76 +</view>
  77 +<!-- 引入提示组件 -->
  78 +<warn id="warn"></warn>
  79 +<my_confirm id="my_confirm"></my_confirm>
0 \ No newline at end of file 80 \ No newline at end of file
pages/giftpack/buygiftpack/giftpackbuy.wxss 0 → 100644
  1 +/*引用样式路径*/
  2 +@charset "UTF-8";
  3 +
  4 +/* Author XGQ
  5 + * 2019-11-12
  6 + */
  7 +
  8 +page {
  9 + background-color: #fb7454;
  10 +}
  11 +
  12 +.top_img {
  13 + -webkit-align-content: center;
  14 + align-content: center;
  15 +}
  16 +
  17 +.top_img image {
  18 + width: 100%;
  19 + height: 660rpx;
  20 +}
  21 +
  22 +.top_title {
  23 + display: -webkit-box;
  24 + display: -webkit-flex;
  25 + display: flex;
  26 + background-color: #fff;
  27 + height: 85rpx;
  28 + border-radius: 10rpx 10rpx 0rpx 0rpx;
  29 + margin: 0rpx 20rpx 0rpx 20rpx;
  30 + -webkit-align-content: center;
  31 + align-content: center;
  32 +}
  33 +
  34 +.top_title_box {
  35 + width: 49%;
  36 + -webkit-align-content: center;
  37 + align-content: center;
  38 + text-align: center;
  39 + padding: 15rpx;
  40 +}
  41 +
  42 +.top_title_box_S {
  43 + width: 1%;
  44 + -webkit-align-content: center;
  45 + align-content: center;
  46 + text-align: center;
  47 + margin: 20rpx 0rpx 20rpx 0rpx;
  48 + border-left: #000 solid 3rpx;
  49 +}
  50 +
  51 +.top_title_redtext {
  52 + font-size: 30rpx;
  53 + color: #d61b30;
  54 +}
  55 +
  56 +.top_title_blacktext {
  57 + font-size: 30rpx;
  58 + color: #000;
  59 +}
  60 +
  61 +.content_box {
  62 + background-color: #fff;
  63 + margin: 10rpx 20rpx 0rpx 20rpx;
  64 + border-radius: 10rpx;
  65 +}
  66 +
  67 +.content_box_ware {
  68 + border-bottom: #f5f5f5 solid 2rpx;
  69 + display: -webkit-box;
  70 + display: -webkit-flex;
  71 + display: flex;
  72 +}
  73 +
  74 +.content_box_img {
  75 + margin: 20rpx 20rpx 20rpx 25rpx;
  76 + width: 35%;
  77 + display: -webkit-box;
  78 + display: -webkit-flex;
  79 + display: flex;
  80 + font-size: 8rpx;
  81 + position: relative;
  82 +}
  83 +
  84 +.content_box_img image {
  85 + width: 100%;
  86 + height: 230rpx;
  87 +}
  88 +
  89 +.content_box_title {
  90 + width: 65%;
  91 + margin: 25rpx 25rpx 10rpx 0rpx;
  92 + position: relative;
  93 +}
  94 +
  95 +.content_ware_title {
  96 + font-size: 30rpx;
  97 + word-break: break-all;
  98 + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
  99 + text-overflow: ellipsis;
  100 + display: -webkit-box;
  101 + /** 对象作为伸缩盒子模型显示 **/
  102 + -webkit-box-orient: vertical;
  103 + /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  104 + -webkit-line-clamp: 2;
  105 + /** 显示的行数 **/
  106 + overflow: hidden;
  107 + /** 隐藏超出的内容 **/
  108 +}
  109 +
  110 +.content_ware_type {
  111 + font-size: 28rpx;
  112 + color: #c61a34;
  113 + margin-top: 10rpx;
  114 + position: absolute;
  115 + left: 0;
  116 + bottom: 100rpx;
  117 +}
  118 +
  119 +.content_ware_price {
  120 + font-size: 20rpx;
  121 + color: #b9b5b5;
  122 + margin-top: 2rpx;
  123 + text-decoration: line-through;
  124 + position: absolute;
  125 + left: 0;
  126 + bottom: 70rpx;
  127 +}
  128 +
  129 +.content_ware_time {
  130 + font-size: 25rpx;
  131 + color: #000;
  132 + margin-top: 20rpx;
  133 + position: absolute;
  134 + left: 0;
  135 + bottom: 25rpx;
  136 +}
  137 +.box_button_buy{
  138 + display: flex;
  139 + align-items: center;
  140 +}
  141 +.content_box_button {
  142 + display: flex;
  143 + height: 110rpx;
  144 + justify-content: space-between;
  145 + align-items: center;
  146 + padding-left: 20rpx;
  147 + padding-right: 25rpx;
  148 + line-height: 110rpx;
  149 +}
  150 +
  151 +.box_button_remark {
  152 + margin-left: 5rpx;
  153 +}
  154 +
  155 +.box_button_remark text {
  156 + font-size: 28rpx;
  157 + color: #b9b5b5;
  158 +}
  159 +
  160 +.box_button_buy button {
  161 + display: inline-block;
  162 + width: 160rpx;
  163 + height: 50rpx;
  164 + font-size: 20rpx;
  165 + background: #d41c34;
  166 + color: #fff;
  167 + line-height: 50rpx;
  168 +}
  169 +
  170 +.box_button_dui {
  171 + text-align: right;
  172 + margin: 22rpx 25rpx 0rpx 0rpx;
  173 +}
  174 +
  175 +.box_button_dui button {
  176 + display: inline-block;
  177 + width: 160rpx;
  178 + height: 50rpx;
  179 + font-size: 20rpx;
  180 + background: #fff;
  181 + color: #000;
  182 + line-height: 50rpx;
  183 +}
  184 +
  185 +.foot_box {
  186 + -webkit-align-content: center;
  187 + align-content: center;
  188 + text-align: center;
  189 + margin-top: 15rpx;
  190 + margin-bottom: 50rpx;
  191 +}
  192 +
  193 +.foot_box text {
  194 + font-size: 25rpx;
  195 + color: #fff;
  196 +}
  197 +
  198 +.foot_empty {
  199 + background-color: #fff;
  200 + height: 375rpx;
  201 + margin: 10rpx 20rpx 0rpx 20rpx;
  202 + border-radius: 10rpx;
  203 + text-align: center;
  204 + padding: 150rpx 0rpx 300rpx 0rpx;
  205 + -webkit-box-pack: center;
  206 + -webkit-justify-content: center;
  207 + justify-content: center;
  208 +}
  209 +
  210 +.foot_empty image {
  211 + width: 400rpx;
  212 + height: 273rpx;
  213 +}
  214 +
  215 +.foot_empty text {
  216 + font-size: 30rpx;
  217 + color: #999;
  218 +}
  219 +
  220 +.foot_empty_button {
  221 + background: #ff6363;
  222 + margin: 60rpx 230rpx 0rpx 230rpx;
  223 + padding: 10rpx;
  224 + border-radius: 70rpx;
  225 + line-height: 40rpx;
  226 +}
  227 +
  228 +.foot_empty_button text {
  229 + font-size: 28rpx;
  230 + color: #fff;
  231 +}
pages/giftpack/giftpacklist/giftpacklist.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 + data: {
  8 + url: a.url, //接口网址
  9 + iurl: a.imghost, //图片前缀网址
  10 + isBuy: 0,
  11 + getGiftID: '', //礼包id
  12 + giftImage: '',
  13 + giftTitle: '',
  14 + giftDate: '',
  15 + giftPrice: '',
  16 + giftIntegral: '',
  17 + giftPosPrice: '',
  18 + giftQty: '',
  19 + giftRemark: '',
  20 + giftType: '',
  21 + actTitle: '',
  22 + getUrl: '',
  23 + wareCard: [],
  24 + orderSn: "", //订单编号
  25 + },
  26 + onLoad: function(options) {
  27 + var th = this;
  28 + th.setData({
  29 + isBuy: options.isBuy,
  30 + getStorageID: a.stoid,
  31 + getUserID: d.user_id,
  32 + getGiftID: options.lbId,
  33 + orderSn: options.orderSn
  34 + })
  35 + },
  36 + onShow: function() {
  37 + var th = this;
  38 + if (th.data.isBuy == 0) {
  39 + th.GetMyGiftList();
  40 + } else {
  41 + th.GetBuyGiftList();
  42 + }
  43 +
  44 + // this.giftRemark = this.giftRemark.replace(/<p><img/gi, "<p class='img'><img");
  45 + th.setData({
  46 + giftRemark: th.data.giftRemark.replace(/<p><img/gi, "<p class='img'><img")
  47 + })
  48 + },
  49 + GetBuyPrice: function() {
  50 + var that = this;
  51 + var th = this.data;
  52 + uni.showModal({
  53 + title: '',
  54 + content: '是否确定购买该礼包',
  55 + success: function success(res) {
  56 + if (res.confirm) {
  57 + getApp().request.post('/api/weshop/marketing/buy/receive/gift/record/insert', {
  58 + data: {
  59 + "actId": '', //活动Id
  60 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  61 + "buyType": '2', //1=积分兑换 2=余额购买
  62 + "lbId": th.getGiftID, //礼包Id
  63 + "storeId": th.getStorageID, //商家Id
  64 + "userId": th.getUserID //用户ID
  65 + },
  66 + success: function success(res) {
  67 + if (res.data.code == 0) {
  68 + getApp().my_warnning("购买成功!", 0, that);
  69 +
  70 + } else {
  71 + getApp().my_warnning(res.data.msg, 0, that);
  72 + }
  73 + }
  74 + });
  75 +
  76 + } else if (res.cancel) {
  77 +
  78 + }
  79 + }
  80 + });
  81 +
  82 +
  83 + },
  84 + GetBuyIntegral: function() {
  85 + var that = this.data;
  86 + uni.showModal({
  87 + title: '',
  88 + content: '是否确定兑换该礼包',
  89 + success: function success(res) {
  90 + if (res.confirm) {
  91 + getApp().request.promisepost('/api/weshop/marketing/buy/receive/gift/record/insert', {
  92 + data: {
  93 + "actId": '', //活动Id
  94 + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
  95 + "buyType": '1', //1=积分兑换 2=余额购买
  96 + "lbId": that.getGiftID, //礼包Id
  97 + "storeId": that.getStorageID, //商家Id
  98 + "userId": that.getUserID //用户ID
  99 + },
  100 + success: function success(res) {
  101 + if (res.data.code == 0) {
  102 + // uni.showToast({
  103 + // icon: 'none',
  104 + // title: '兑换成功!'
  105 + // });
  106 + getApp().my_warnning("兑换成功!");
  107 +
  108 + } else {
  109 + uni.showToast({
  110 + icon: 'none',
  111 + title: res.data.msg
  112 + });
  113 +
  114 + }
  115 + }
  116 + });
  117 +
  118 +
  119 + } else if (res.cancel) {}
  120 + }
  121 + });
  122 +
  123 + },
  124 + GetMyGiftList: function() {
  125 + var _this = this;
  126 + var th = this;
  127 + getApp().request.get('/api/weshop/marketing/my/giftbag/detail/get', {
  128 + data: {
  129 + "storeId": th.data.getStorageID, //商家ID
  130 + "userId": th.data.getUserID, //用户ID
  131 + "orderSn": th.data.orderSn
  132 + },
  133 + success: function success(res) {
  134 + if (res.data.code == 0) {
  135 + th.setData({
  136 + giftImage: th.data.iurl + res.data.data.lbUrl,
  137 + giftTitle: res.data.data.giftTitle
  138 + })
  139 + if (res.data.data.giftRemark == '') {
  140 + th.setData({
  141 + giftRemark: '暂无详情......'
  142 + })
  143 + } else {
  144 + th.setData({
  145 + giftRemark: res.data.data.giftRemark
  146 + })
  147 + }
  148 +
  149 + th.setData({
  150 + giftDate: res.data.data.endTime,
  151 + giftPosPrice: res.data.data.giftPosPrice,
  152 + giftQty: res.data.data.giftQty,
  153 + giftIntegral: res.data.data.payIntegral,
  154 + giftPrice: res.data.data.payMoney,
  155 + giftType: res.data.data.actType,
  156 + actTitle: res.data.data.actTitle,
  157 + wareCard: res.data.data.wareCard
  158 + })
  159 + } else {
  160 + getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
  161 + return false;
  162 + }
  163 + }
  164 + });
  165 +
  166 + },
  167 + GetBuyGiftList: function() {
  168 + var _this2 = this;
  169 + var th = this.data;
  170 + getApp().request.get('/api/weshop/marketing/giftbag/detail/get', {
  171 + data: {
  172 + "storeId": th.getStorageID, //商家ID
  173 + "userId": th.getUserID, //用户ID
  174 + "giftBagId": th.getGiftID
  175 + },
  176 + success: function success(res) {
  177 + if (res.data.code == 0) {
  178 + _this2.setData({
  179 + giftImage: th.iurl + res.data.data.lbUrl,
  180 + giftTitle: res.data.data.giftTitle
  181 + })
  182 + if (res.data.data.giftRemark == '') {
  183 +
  184 + _this2.setData({
  185 + giftRemark: '暂无详情......'
  186 + })
  187 + } else {
  188 + _this2.setData({
  189 + giftRemark: res.data.data.giftRemark
  190 + })
  191 + }
  192 +
  193 + _this2.setData({
  194 + giftDate: res.data.data.endTime,
  195 + giftPosPrice: res.data.data.giftPosPrice,
  196 + giftQty: res.data.data.giftQty,
  197 + giftIntegral: res.data.data.payIntegral,
  198 + giftPrice: res.data.data.payMoney,
  199 + giftType: res.data.data.actType,
  200 + actTitle: res.data.data.actTitle,
  201 + wareCard: res.data.data.wareCard
  202 + })
  203 + } else {
  204 + getApp().my_warnning("系统繁忙,请稍后再试", 0, _this2);
  205 + return false;
  206 + }
  207 + }
  208 + });
  209 +
  210 + },
  211 + GetQrCode: function() {
  212 + //不销毁调整
  213 + uni.navigateTo({
  214 + url: '/pages/mygiftpack/QrCode?number=' + this.getGiftID
  215 + });
  216 +
  217 + },
  218 + GetWebHttp: function(type) {
  219 +
  220 + if (type == 0) {
  221 + this.getUrl = this.$GetInfo.HtmlHttp + '/index.php/Mobile/User/coupon/stoid/' + this.getStorageID + '/user_id/' + this.getUserID + '.html';
  222 + }
  223 + if (type == 1) {
  224 + this.getUrl = this.$GetInfo.HtmlHttp + '/index.php/Mobile/Yyservice/service_items_list/stoid/' + this.getStorageID + '/user_id/' + this.getUserID + '.html';
  225 + }
  226 + window.location.href = this.getUrl;
  227 + }
  228 +
  229 +});
0 \ No newline at end of file 230 \ No newline at end of file
pages/giftpack/giftpacklist/giftpacklist.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "礼包详情",
  3 + "navigationStyle": "custom",
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm"
  7 + }
  8 +}
0 \ No newline at end of file 9 \ No newline at end of file
pages/giftpack/giftpacklist/giftpacklist.wxml 0 → 100644
  1 +<view class="box data-v-3a5b7e36">
  2 + <view class="box_top data-v-3a5b7e36">
  3 + <image src="{{giftImage}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  4 + </view>
  5 + <view class="box_title data-v-3a5b7e36">
  6 + <view class="top_title data-v-3a5b7e36">
  7 + <text class="data-v-3a5b7e36 ellipsis-2">{{giftTitle}}</text>
  8 + </view>
  9 + <view class="top_time data-v-3a5b7e36">
  10 + <text class="data-v-3a5b7e36">{{"兑换截至时间:"+giftDate}}</text>
  11 + </view>
  12 + <view class="top_price data-v-3a5b7e36">
  13 + <block wx:if="{{giftPrice>0}}">
  14 + <text class="data-v-3a5b7e36">{{"¥"+giftPrice}}</text>
  15 + </block>
  16 + <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
  17 + <text class="data-v-3a5b7e36">/</text>
  18 + </block>
  19 + <block wx:if="{{giftIntegral>0}}">
  20 + <text class="data-v-3a5b7e36">{{giftIntegral+"积分"}}</text>
  21 + </block>
  22 + <block wx:if="{{giftType>0}}">
  23 + <text class="data-v-3a5b7e36">{{actTitle}}</text>
  24 + </block>
  25 + </view>
  26 + <view class="top_foot data-v-3a5b7e36">
  27 + <view class="top_foot_price data-v-3a5b7e36">
  28 + <text class="data-v-3a5b7e36">{{"原价:"+giftPosPrice+"元"}}</text>
  29 + </view>
  30 + <view class="top_foot_qty data-v-3a5b7e36">
  31 + <text class="data-v-3a5b7e36">{{"已售:"+giftQty+"件"}}</text>
  32 + </view>
  33 + </view>
  34 + </view>
  35 + <view class="box_ware data-v-3a5b7e36">
  36 + <view class="box_ware_title data-v-3a5b7e36">
  37 + <text class="data-v-3a5b7e36">礼包内容</text>
  38 + </view>
  39 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index">
  40 + <view class="box_ware_box data-v-3a5b7e36">
  41 + <view class="box_ware_img data-v-3a5b7e36">
  42 + <block wx:if="{{item.lbType==1}}">
  43 + <image src="{{item.wareImage==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.wareImage}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  44 + </block>
  45 + <block wx:if="{{item.lbType==2}}">
  46 + <image src="{{iurl+'/miniapp/images/giftbag/gift05.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  47 + </block>
  48 + <block wx:if="{{item.lbType==3}}">
  49 + <image src="{{iurl+'/miniapp/images/giftbag/gift02.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  50 + </block>
  51 + <block wx:if="{{item.lbType==4}}">
  52 + <image src="{{iurl+'/miniapp/images/giftbag/gift03.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  53 + </block>
  54 + <block wx:if="{{item.lbType==5}}">
  55 + <image src="{{iurl+'/miniapp/images/giftbag/gift04.png'}}" class="data-v-3a5b7e36" lazy-load="true"></image>
  56 + </block>
  57 + </view>
  58 + <view class="box_ware_item data-v-3a5b7e36">
  59 + <view class="box_ware_item_title data-v-3a5b7e36">
  60 + <text class="data-v-3a5b7e36">{{item.couponName}}</text>
  61 + </view>
  62 + <view class="box_ware_item_price data-v-3a5b7e36">
  63 + <text class="data-v-3a5b7e36"></text>
  64 + </view>
  65 + <view class="box_ware_item_qty data-v-3a5b7e36">
  66 + <text class="data-v-3a5b7e36">{{"数量:"+item.num}}</text>
  67 + </view>
  68 + <view class="box_ware_code data-v-3a5b7e36">
  69 + <block wx:if="{{isBuy==0&item.lbType==1}}">
  70 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" lazy-load="true" bindtap="__e" class="data-v-3a5b7e36"></image>
  71 + </block>
  72 + <block wx:if="{{isBuy==0&item.lbType==2}}">
  73 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image>
  74 + </block>
  75 + <block wx:if="{{isBuy==0&item.lbType==3}}">
  76 + <image src="{{iurl+'/miniapp/images/giftbag/gift06.png'}}" bindtap="__e" class="data-v-3a5b7e36" lazy-load="true"></image>
  77 + </block>
  78 + <block wx:if="{{isBuy==0&item.lbType>3}}">
  79 + <text class="data-v-3a5b7e36">已自动到账</text>
  80 + </block>
  81 + </view>
  82 + </view>
  83 + </view>
  84 + </block>
  85 + </view>
  86 + <view class="foot_box data-v-3a5b7e36">
  87 + <view class="foot_box_title data-v-3a5b7e36">
  88 + <text class="data-v-3a5b7e36">活动说明</text>
  89 + </view>
  90 + <view class="foot_box_remark data-v-3a5b7e36">
  91 + <rich-text nodes="{{giftRemark}}"></rich-text>
  92 + </view>
  93 + </view>
  94 + <view class="foot_empty data-v-3a5b7e36"></view>
  95 + <block wx:if="{{isBuy==1}}">
  96 + <view class="foot_button data-v-3a5b7e36">
  97 + <block wx:if="{{giftPrice>0&&giftIntegral>0}}">
  98 + <view class="foot_button_left data-v-3a5b7e36">
  99 + <text bindtap="__e" class="data-v-3a5b7e36">立即购买</text>
  100 + </view>
  101 + </block>
  102 + <block wx:if="{{giftPrice>0 && giftIntegral>0}}">
  103 + <view class="foot_button_right data-v-3a5b7e36">
  104 + <text bindtap="__e" class="data-v-3a5b7e36">立即兑换</text>
  105 + </view>
  106 + </block>
  107 + <block wx:if="{{giftPrice>0 && giftIntegral<=0}}">
  108 + <view class="foot_button_buy data-v-3a5b7e36">
  109 + <text bindtap="__e" class="data-v-3a5b7e36">立即购买</text>
  110 + </view>
  111 + </block>
  112 + <block wx:if="{{giftPrice<=0 && giftIntegral>0}}">
  113 + <view class="foot_button_intalge data-v-3a5b7e36">
  114 + <text bindtap="__e" class="data-v-3a5b7e36">立即兑换</text>
  115 + </view>
  116 + </block>
  117 + </view>
  118 + </block>
  119 + <block wx:if="{{isBuy==0}}">
  120 + <view class="foot_button data-v-3a5b7e36">
  121 + <view class="foot_button_buy data-v-3a5b7e36">
  122 + <text bindtap="__e" class="data-v-3a5b7e36">立即使用</text>
  123 + </view>
  124 + </view>
  125 + </block>
  126 +</view>
  127 +<!-- 引入提示组件 -->
  128 +<warn id="warn"></warn>
  129 +<my_confirm id="my_confirm"></my_confirm>
0 \ No newline at end of file 130 \ No newline at end of file
pages/giftpack/giftpacklist/giftpacklist.wxss 0 → 100644
  1 +
  2 +@charset "UTF-8";
  3 +/* Author XGQ
  4 + * 2019-12-12
  5 + */
  6 +.box.data-v-3a5b7e36 {
  7 + -webkit-align-content: center;
  8 + align-content: center;
  9 +}
  10 +.box_top.data-v-3a5b7e36 {
  11 + width: 100%;
  12 +}
  13 +.box_top image.data-v-3a5b7e36 {
  14 + width: 100%;
  15 + height: 540rpx;
  16 +}
  17 +.box_title.data-v-3a5b7e36 {
  18 + margin: 10rpx 20rpx 20rpx 20rpx;
  19 + padding: 35rpx;
  20 + background-color: #FFFFFF;
  21 + border-radius: 20rpx;
  22 +}
  23 +.top_title.data-v-3a5b7e36 {
  24 + font-size: 30rpx;
  25 + margin-bottom: 10rpx;
  26 +}
  27 +.top_time.data-v-3a5b7e36 {
  28 + font-size: 27rpx;
  29 + color: #B9B5B5;
  30 +}
  31 +.top_price.data-v-3a5b7e36 {
  32 + font-size: 35rpx;
  33 + color: #D61B30;
  34 + margin-top: 30rpx;
  35 + margin-bottom: 5rpx;
  36 +}
  37 +.top_foot.data-v-3a5b7e36 {
  38 + display: -webkit-box;
  39 + display: -webkit-flex;
  40 + display: flex;
  41 +}
  42 +.top_foot_price.data-v-3a5b7e36 {
  43 + font-size: 22rpx;
  44 + color: #B9B5B5;
  45 + width: 50%;
  46 + text-decoration: line-through;
  47 +}
  48 +.top_foot_qty.data-v-3a5b7e36 {
  49 + font-size: 22rpx;
  50 + color: #B9B5B5;
  51 + width: 50%;
  52 + -webkit-align-content: flex-end;
  53 + align-content: flex-end;
  54 + text-align: right;
  55 +}
  56 +.box_ware.data-v-3a5b7e36 {
  57 + margin: 10rpx 20rpx 20rpx 20rpx;
  58 + padding: 35rpx;
  59 + background-color: #FFFFFF;
  60 + border-radius: 20rpx;
  61 +}
  62 +.box_ware_title.data-v-3a5b7e36 {
  63 + font-size: 35rpx;
  64 + margin: 5rpx 0rpx 30rpx 0rpx;
  65 +}
  66 +.box_ware_box.data-v-3a5b7e36 {
  67 + display: -webkit-box;
  68 + display: -webkit-flex;
  69 + display: flex;
  70 + margin: 10rpx 0rpx 25rpx 0rpx;
  71 +}
  72 +.box_ware_img.data-v-3a5b7e36 {
  73 + width: 30%;
  74 + height: 180rpx;
  75 + border: #999999 solid 1rpx;
  76 +}
  77 +.box_ware_img image.data-v-3a5b7e36 {
  78 + width: 100%;
  79 + height: 100%;
  80 +}
  81 +.box_ware_item.data-v-3a5b7e36 {
  82 + width: 70%;
  83 + margin-left: 25rpx;
  84 + position: relative;
  85 +}
  86 +.box_ware_item_title.data-v-3a5b7e36 {
  87 + font-size: 30rpx;
  88 + word-break: break-all;
  89 + text-overflow: ellipsis;
  90 + display: -webkit-box;
  91 + -webkit-box-orient: vertical;
  92 + -webkit-line-clamp: 2;
  93 + overflow: hidden;
  94 +}
  95 +.box_ware_count.data-v-3a5b7e36 {
  96 + display: -webkit-box;
  97 + display: -webkit-flex;
  98 + display: flex;
  99 +}
  100 +.box_ware_item_price.data-v-3a5b7e36 {
  101 + font-size: 25rpx;
  102 + color: #B9B5B5;
  103 + position: absolute;
  104 + bottom: 60rpx;
  105 + left: 0;
  106 +}
  107 +.box_ware_item_qty.data-v-3a5b7e36 {
  108 + font-size: 25rpx;
  109 + position: absolute;
  110 + bottom: 15rpx;
  111 + left: 0;
  112 +}
  113 +.box_ware_code.data-v-3a5b7e36 {
  114 + position: absolute;
  115 + bottom: 10rpx;
  116 + right: 10rpx;
  117 +}
  118 +.box_ware_code image.data-v-3a5b7e36 {
  119 + width: 60rpx;
  120 + height: 60rpx;
  121 +}
  122 +.box_ware_code text.data-v-3a5b7e36 {
  123 + font-size: 20rpx;
  124 +}
  125 +.foot_box.data-v-3a5b7e36 {
  126 + margin: 10rpx 20rpx 50rpx 20rpx;
  127 + padding: 35rpx;
  128 + background-color: #FFFFFF;
  129 + border-radius: 20rpx;
  130 +}
  131 +.foot_box_title.data-v-3a5b7e36 {
  132 + font-size: 35rpx;
  133 + margin-bottom: 30rpx;
  134 +}
  135 +.foot_box_remark.data-v-3a5b7e36 {
  136 + font-size: 27rpx;
  137 + line-height: 40rpx;
  138 +}
  139 +.foot_empty.data-v-3a5b7e36 {
  140 + height: 90rpx;
  141 +}
  142 +.foot_button.data-v-3a5b7e36 {
  143 + display: -webkit-box;
  144 + display: -webkit-flex;
  145 + display: flex;
  146 + margin: 20rpx 0rpx 0rpx 0rpx;
  147 + padding: 25rpx 0rpx;
  148 + background: #FFFFFF;
  149 + text-align: center;
  150 + -webkit-box-pack: center;
  151 + -webkit-justify-content: center;
  152 + justify-content: center;
  153 + position: fixed;
  154 + bottom: 0;
  155 + left: 0;
  156 + width: 100%;
  157 +}
  158 +.foot_button_left.data-v-3a5b7e36 {
  159 + background: #e4010c;
  160 + color: #FFFFFF;
  161 + width: 250rpx;
  162 + height: 70rpx;
  163 + font-size: 28rpx;
  164 + line-height: 70rpx;
  165 + border-radius: 30rpx 0rpx 0rpx 30rpx;
  166 +}
  167 +.foot_button_right.data-v-3a5b7e36 {
  168 + background: #ffbb42;
  169 + color: #FFFFFF;
  170 + width: 250rpx;
  171 + height: 70rpx;
  172 + font-size: 28rpx;
  173 + line-height: 70rpx;
  174 + border-radius: 0rpx 30rpx 30rpx 0rpx;
  175 +}
  176 +.foot_button_buy.data-v-3a5b7e36 {
  177 + background: #e4010c;
  178 + color: #FFFFFF;
  179 + width: 400rpx;
  180 + height: 70rpx;
  181 + font-size: 28rpx;
  182 + line-height: 70rpx;
  183 + border-radius: 30rpx 30rpx 30rpx 30rpx;
  184 +}
  185 +.foot_button_intalge.data-v-3a5b7e36 {
  186 + background: #ffbb42;
  187 + color: #FFFFFF;
  188 + width: 400rpx;
  189 + height: 70rpx;
  190 + font-size: 28rpx;
  191 + line-height: 70rpx;
  192 + border-radius: 30rpx 30rpx 30rpx 30rpx;
  193 +}
  194 +page.data-v-3a5b7e36 {
  195 + background-color: #e85f93;
  196 +}
  197 +.foot_box_remark.data-v-3a5b7e36 ._img {
  198 + width: 100%;
  199 +}
  200 +.foot_box_remark.data-v-3a5b7e36 .img {
  201 + line-height: 0;
  202 +}
  203 +
pages/giftpack/mygiftpack/mygiftpack.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 + data: {
  8 + iurl: a.imghost, //图片前缀网址
  9 + getDate: new Date().getTime(),
  10 + getStorageID: '',
  11 + getUserID: '',
  12 + wareCard: [],
  13 + pages: 0,
  14 + pageSize: 10,
  15 + isEmpty: true,
  16 + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
  17 + contentText: {
  18 + contentdown: '加载更多',
  19 + contentrefresh: '加载中...',
  20 + contentnomore: '已加载全部'
  21 + },
  22 + is_resad:0,//数据是否全部加载完成
  23 + },
  24 +
  25 + onLoad: function(options) {
  26 + // this.getStorageID = options.stoid;
  27 + // this.getUserID = options.userid;
  28 + var th = this;
  29 + th.setData({
  30 + getStorageID: a.stoid,
  31 + getUserID: d.user_id
  32 + })
  33 + },
  34 + onShow: function() {
  35 + // this.pages = 1;
  36 + // this.pageSize = 10;
  37 + // this.loadingType = 0;
  38 + // this.getList();
  39 + var th = this;
  40 + th.setData({
  41 + pages: 1,
  42 + pageSize: 10,
  43 + loadingType: 0
  44 + })
  45 + th.getList();
  46 + },
  47 + // methods: {
  48 + // BuyGift: function BuyGift() {
  49 + // /*销毁跳转*/
  50 + // uni.reLaunch({
  51 + // url: 'pages/giftpack/buygiftpack/giftpackbuy?stoid=' + this.getStorageID + '&userid=' + this.getUserID
  52 + // });
  53 +
  54 + // },
  55 + // GetGiftPackList: function(getId, ojb) {
  56 + // //不销毁调整
  57 + // uni.navigateTo({
  58 + // url: 'pages/giftpack/giftpacklist/giftpacklist?isBuy=0&stoid=' + this.getStorageID + '&userid=' + this.getUserID + '&id=' +
  59 + // getId
  60 + // });
  61 +
  62 + // },
  63 + getList: function() {
  64 + var _this = this; //上拉加载
  65 + var that = this.data;
  66 + if (that.loadingType != 0) {
  67 + return false;
  68 + }
  69 + // that.loadingType = 1;
  70 + _this.setData({
  71 + loadingType: 1
  72 + })
  73 + getApp().request.get('/api/weshop/marketing/my/giftbag/page', {
  74 + data: {
  75 + // "storeId": this.getStorageID, //商家ID
  76 + // "userId": this.getUserID, //用户ID
  77 + // "page": this.pages,
  78 + // "pageSize": this.pageSize
  79 + "storeId": that.getStorageID, //商家ID
  80 + "userId": that.getUserID, //用户ID
  81 + "page": that.pages,
  82 + "pageSize": that.pageSize
  83 + },
  84 + success: function success(res) {
  85 + if (res.data.code == 0) {
  86 + console.log(res.data.data);
  87 + if (res.data.data.total > 0) {
  88 + // _this.isEmpty = false;
  89 + _this.setData({
  90 + isEmpty: false
  91 + })
  92 + } else {
  93 + // _this.isEmpty = true;
  94 + _this.setData({
  95 + isEmpty: true
  96 + })
  97 + }
  98 + if (res.data.data.pageData.length == 0) {
  99 + // _this.loadingType = 2;
  100 + _this.setData({
  101 + loadingType: 2
  102 + })
  103 + } else {
  104 + var wareCard = that.wareCard;
  105 + var is_resad = 0;
  106 + // if (_this.wareCard.length < res.data.data.pageData.length) {
  107 + if (wareCard.length < res.data.data.total) {
  108 + for (var i = 0; i < res.data.data.pageData.length; i++) {
  109 + wareCard.push(res.data.data.pageData[i]);
  110 + }
  111 + }else{
  112 + is_resad=1
  113 + }
  114 + _this.setData({
  115 + wareCard: wareCard,
  116 + is_resad: is_resad
  117 + })
  118 +
  119 + // _this.loadingType = 0;
  120 + _this.setData({
  121 + loadingType: 0
  122 + })
  123 + }
  124 + } else {
  125 +
  126 + }
  127 + }
  128 + });
  129 +
  130 + },
  131 + TimeToDate: function(num) { //时间戳数据处理 是按秒来转换
  132 + var date = new Date(num * 1000);
  133 + //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  134 + var y = date.getFullYear();
  135 + var MM = date.getMonth() + 1;
  136 + MM = MM < 10 ? '0' + MM : MM; //月补0
  137 + var d = date.getDate();
  138 + d = d < 10 ? '0' + d : d; //天补0
  139 + var h = date.getHours();
  140 + h = h < 10 ? '0' + h : h; //小时补0
  141 + var m = date.getMinutes();
  142 + m = m < 10 ? '0' + m : m; //分钟补0
  143 + var s = date.getSeconds();
  144 + s = s < 10 ? '0' + s : s; //秒补0
  145 + return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
  146 + },
  147 + DateToTime: function DateToTime(TimeNum) { //时间转换成时间戳
  148 + var Time = new Date(TimeNum);
  149 + return Time.getTime() / 1000;
  150 + },
  151 + //销毁界面跳转
  152 + redirectTo: function (e) {
  153 + var th = this;
  154 + var url = e.currentTarget.dataset.url;
  155 + //销毁跳转
  156 + wx.redirectTo({
  157 + url: url
  158 + });
  159 + },
  160 + //不销毁界面跳转
  161 + navigateTo: function (e) {
  162 + var th = this;
  163 + var url = e.currentTarget.dataset.url;
  164 + wx.navigateTo({
  165 + url: url,
  166 + })
  167 + }
  168 +
  169 +});
0 \ No newline at end of file 170 \ No newline at end of file
pages/giftpack/mygiftpack/mygiftpack.json 0 → 100644
  1 +{
  2 + "navigationBarTitleText": "我的礼包",
  3 + "enablePullDownRefresh": false,
  4 + "usingComponents": {
  5 + "warn": "/components/long_warn/long_warn",
  6 + "my_confirm": "/components/my_confirm/my_confirm"
  7 + }
  8 +}
0 \ No newline at end of file 9 \ No newline at end of file
pages/giftpack/mygiftpack/mygiftpack.wxml 0 → 100644
  1 +<view class="top_img">
  2 + <view class="top_img">
  3 + <!-- <image src="{{$GetInfo.imgHttp+'/miniapp/images/giftbag/gift00.jpg'}}"></image> -->
  4 + <image src="{{iurl+'/miniapp/images/giftbag/gift00.jpg'}}"></image>
  5 + </view>
  6 + <view class="top_title">
  7 + <view class="top_title_box">
  8 + <text class="top_title_blacktext" bindtap="redirectTo" data-url="/pages/giftpack/buygiftpack/giftpackbuy">礼包列表</text>
  9 + </view>
  10 + <view class="top_title_box_S"></view>
  11 + <view class="top_title_box">
  12 + <text class="top_title_redtext">我的礼包</text>
  13 + </view>
  14 + </view>
  15 + <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index">
  16 + <view class="content_box">
  17 + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{item.lbId}}&orderSn={{item.orderSn}}">
  18 + <view class="content_box_img">
  19 + <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> -->
  20 + <image src="{{iurl+item.lbUrl}}" lazy-load="true"></image>
  21 + <block wx:if="{{item.actType!=0}}">
  22 + <view class="{{[item.actType==1?'content_box_img_title content_box_img_ground1':item.actType==2?'content_box_img_title content_box_img_ground2':item.actType==4?'content_box_img_title content_box_img_ground3':'content_box_img_title content_box_img_ground4']}}">
  23 + <image src="{{iurl+'/miniapp/images/giftbag/gift01.png'}}"></image>
  24 + <!-- <block wx:if="{{item.$orig.actType==1}}"> -->
  25 + <block wx:if="{{item.actType==1}}">
  26 + <text>新人有礼</text>
  27 + </block>
  28 + <block wx:if="{{item.actType==2}}">
  29 + <text>评价有礼</text>
  30 + </block>
  31 + <block wx:if="{{item.actType==3}}">
  32 + <text>节日营销</text>
  33 + </block>
  34 + <block wx:if="{{item.actType==4}}">
  35 + <text>生日营销</text>
  36 + </block>
  37 + <block wx:if="{{item.actType==5}}">
  38 + <text>助力礼包</text>
  39 + </block>
  40 + </view>
  41 + </block>
  42 + </view>
  43 + <view class="content_box_title">
  44 + <view class="content_ware_title">
  45 + <text bindtap="__e">{{item.giftTitle}}</text>
  46 + </view>
  47 + <view class="content_ware_type">
  48 + <block wx:if="{{item.actType==0&item.payMoney>0}}">
  49 + <text>{{"¥"+item.payMoney}}</text>
  50 + </block>
  51 + <block wx:if="{{item.actType==0&item.payIntegral>0}}">
  52 + <text>{{item.payIntegral+"积分"}}</text>
  53 + </block>
  54 + <block wx:if="{{item.actType==1}}">
  55 + <text>{{item.actTitle}}</text>
  56 + </block>
  57 + <block wx:if="{{item.actType==2}}">
  58 + <text>{{item.actTitle}}</text>
  59 + </block>
  60 + <block wx:if="{{item.actType==3}}">
  61 + <text>{{item.actTitle}}</text>
  62 + </block>
  63 + <block wx:if="{{item.actType==4}}">
  64 + <text>{{item.actTitle}}</text>
  65 + </block>
  66 + <block wx:if="{{item.actType==5}}">
  67 + <text>{{item.actTitle}}</text>
  68 + </block>
  69 + </view>
  70 + <view class="content_ware_price">
  71 + <text>{{"原价:¥"+item.giftPosPrice}}</text>
  72 + </view>
  73 + <view class="content_ware_time">
  74 + <!-- <block wx:if="{{getDate>item.endTime}}"> -->
  75 + <!-- <text>{{"兑换截至日期:"+item.endTime}}</text> -->
  76 + <text>{{"兑换截至日期:"+getDate}}</text>
  77 + <!-- </block> -->
  78 + <block wx:if="{{getDate<item.starTime}}">
  79 + <text>{{"距兑换开始时间: "+item.starTime}}</text>
  80 + </block>
  81 + </view>
  82 + </view>
  83 + </view>
  84 + <view class="content_box_button">
  85 + <button bindtap="__e">立即使用</button>
  86 + </view>
  87 + </view>
  88 + </block>
  89 + <block wx:if="{{isEmpty==true}}">
  90 + <view class="foot_empty">
  91 + <view>
  92 + <image src="{{iurl+'/miniapp/images/giftbag/gift07.png'}}" lazy-load="true"></image>
  93 + </view>
  94 + <view>
  95 + <text>当前暂无礼包</text>
  96 + </view>
  97 + <view class="foot_empty_button">
  98 + <text bindtap="__e">去获取</text>
  99 + </view>
  100 + </view>
  101 + </block>
  102 + <block wx:if="{{is_resad}}">
  103 + <view class="foot_box">
  104 + <text>———— 到底了 ————</text>
  105 + </view>
  106 + </block>
  107 +</view>
  108 +<!-- 引入提示组件 -->
  109 +<warn id="warn"></warn>
  110 +<my_confirm id="my_confirm"></my_confirm>
0 \ No newline at end of file 111 \ No newline at end of file
pages/giftpack/mygiftpack/mygiftpack.wxss 0 → 100644
  1 +
  2 +
  3 +/*引用样式路径*/
  4 +@charset "UTF-8";
  5 +/* Author XGQ
  6 + * 2019-11-12
  7 + */
  8 +.top_img {
  9 + -webkit-align-content: center;
  10 + align-content: center;
  11 +}
  12 +.top_img image {
  13 + width: 100%;
  14 + height: 660rpx;
  15 +}
  16 +.top_title {
  17 + display: -webkit-box;
  18 + display: -webkit-flex;
  19 + display: flex;
  20 + background-color: #FFFFFF;
  21 + height: 85rpx;
  22 + border-radius: 10rpx 10rpx 0rpx 0rpx;
  23 + margin: 0rpx 20rpx 0rpx 20rpx;
  24 + -webkit-align-content: center;
  25 + align-content: center;
  26 +}
  27 +.top_title_box {
  28 + width: 49%;
  29 + -webkit-align-content: center;
  30 + align-content: center;
  31 + text-align: center;
  32 + padding: 15rpx;
  33 +}
  34 +.top_title_box_S {
  35 + width: 1%;
  36 + -webkit-align-content: center;
  37 + align-content: center;
  38 + text-align: center;
  39 + margin: 20rpx 0rpx 20rpx 0rpx;
  40 + border-left: #000000 solid 3rpx;
  41 +}
  42 +.top_title_redtext {
  43 + font-size: 30rpx;
  44 + color: #d61b30;
  45 +}
  46 +.top_title_blacktext {
  47 + font-size: 30rpx;
  48 + color: #000000;
  49 +}
  50 +.content_box {
  51 + background-color: #FFFFFF;
  52 + height: 375rpx;
  53 + margin: 10rpx 20rpx 0rpx 20rpx;
  54 + border-radius: 10rpx;
  55 +}
  56 +.content_box_ware {
  57 + border-bottom: #f5f5f5 solid 2rpx;
  58 + display: -webkit-box;
  59 + display: -webkit-flex;
  60 + display: flex;
  61 +}
  62 +.content_box_img {
  63 + margin: 20rpx 20rpx 20rpx 25rpx;
  64 + width: 35%;
  65 + display: -webkit-box;
  66 + display: -webkit-flex;
  67 + display: flex;
  68 + font-size: 8rpx;
  69 + position: relative;
  70 +}
  71 +.content_box_img image {
  72 + width: 100%;
  73 + height: 230rpx;
  74 +}
  75 +.content_box_img_title {
  76 + position: absolute;
  77 + background: #D01119;
  78 + display: -webkit-box;
  79 + display: -webkit-flex;
  80 + display: flex;
  81 + padding: 8rpx;
  82 + border-radius: 0rpx 0rpx 10rpx 0rpx;
  83 +}
  84 +.content_box_img_ground1{
  85 + background: #fb6451;
  86 +}
  87 +.content_box_img_ground2{
  88 + background: #ffb72d;
  89 +}
  90 +.content_box_img_ground3{
  91 + background: #9be0e5;
  92 +}
  93 +.content_box_img_ground4{
  94 + background: #4784ef;
  95 +}
  96 +.content_box_img_title image {
  97 + width: 30rpx;
  98 + height: 30rpx;
  99 +}
  100 +.content_box_img_title text {
  101 + font-size: 20rpx;
  102 + color: #FFFFFF;
  103 + line-height: 25rpx;
  104 + padding-top: 5rpx;
  105 +}
  106 +.content_box_title {
  107 + width: 65%;
  108 + margin: 25rpx 25rpx 10rpx 0rpx;
  109 + position: relative;
  110 +}
  111 +.content_ware_title {
  112 + font-size: 30rpx;
  113 + word-break: break-all;
  114 + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
  115 + text-overflow: ellipsis;
  116 + display: -webkit-box;
  117 + /** 对象作为伸缩盒子模型显示 **/
  118 + -webkit-box-orient: vertical;
  119 + /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  120 + -webkit-line-clamp: 2;
  121 + /** 显示的行数 **/
  122 + overflow: hidden;
  123 + /** 隐藏超出的内容 **/
  124 +}
  125 +.content_ware_type {
  126 + font-size: 28rpx;
  127 + color: #c61a34;
  128 + margin-top: 10rpx;
  129 + position: absolute;
  130 + left: 0;
  131 + bottom: 100rpx;
  132 +}
  133 +.content_ware_price {
  134 + font-size: 20rpx;
  135 + color: #b9b5b5;
  136 + margin-top: 2rpx;
  137 + text-decoration: line-through;
  138 + position: absolute;
  139 + left: 0;
  140 + bottom: 70rpx;
  141 +}
  142 +.content_ware_time {
  143 + font-size: 25rpx;
  144 + color: #c61a34;
  145 + margin-top: 20rpx;
  146 + position: absolute;
  147 + left: 0;
  148 + bottom: 25rpx;
  149 +}
  150 +.content_box_button {
  151 + text-align: right;
  152 + margin: 20rpx 25rpx 20rpx 20rpx;
  153 +}
  154 +.content_box_button button {
  155 + display: inline-block;
  156 + width: 160rpx;
  157 + height: 50rpx;
  158 + font-size: 25rpx;
  159 + background: #d41c34;
  160 + color: #FFFFFF;
  161 + line-height: 50rpx;
  162 +}
  163 +.foot_box {
  164 + -webkit-align-content: center;
  165 + align-content: center;
  166 + text-align: center;
  167 + margin-top: 15rpx;
  168 + margin-bottom: 50rpx;
  169 +}
  170 +.foot_box text {
  171 + font-size: 25rpx;
  172 + color: #FFFFFF;
  173 +}
  174 +.foot_empty{
  175 + background-color: #FFFFFF;
  176 + height: 375rpx;
  177 + margin: 10rpx 20rpx 0rpx 20rpx;
  178 + border-radius: 10rpx;
  179 + text-align: center;
  180 + padding: 150rpx 0rpx 300rpx 0rpx;
  181 + -webkit-box-pack: center;
  182 + -webkit-justify-content: center;
  183 + justify-content: center;
  184 +}
  185 +.foot_empty image{
  186 + width: 400rpx;
  187 + height: 273rpx;
  188 +}
  189 +.foot_empty text{
  190 + font-size: 30rpx;
  191 + color: #999999;
  192 +}
  193 +.foot_empty_button{
  194 + background: #ff6363;
  195 + margin: 60rpx 230rpx 0rpx 230rpx;
  196 + padding: 10rpx;
  197 + border-radius: 70rpx;
  198 + line-height: 40rpx;
  199 +}
  200 +.foot_empty_button text{
  201 + font-size: 28rpx;
  202 + color: #FFFFFF;
  203 +}
  204 +page {
  205 + background-color: #fb7454;
  206 +}
pages/user/index/index.wxml
@@ -212,10 +212,14 @@ @@ -212,10 +212,14 @@
212 <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image> 212 <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image>
213 <view class="four-level-word">我的地址</view> 213 <view class="four-level-word">我的地址</view>
214 </view> 214 </view>
215 - <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_service" > 215 + <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_service" >
216 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image> 216 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
217 <view class="four-level-word">我的服务</view> 217 <view class="four-level-word">我的服务</view>
218 </view> 218 </view>
  219 + <view class="item t-c" data-url="/pages/giftpack/buygiftpack/giftpackbuy" bindtap="goto">
  220 + <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
  221 + <view class="four-level-word">我的礼包</view>
  222 + </view>
219 </view> 223 </view>
220 224
221 225