diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js index f483645..1514c65 100644 --- a/components/diy_goodsGroup/diy_goodsGroup.js +++ b/components/diy_goodsGroup/diy_goodsGroup.js @@ -107,12 +107,13 @@ Component({ this.data.is_new = 1 } this.data.requestData = new Array(); + //---将数组--- this.data.g_id = this.data.object.data; var arr = []; - - for (var i = 0; i < this.data.g_id.length; i += this.data.goodscount) { - arr.push(this.data.g_id.slice(i, i + this.data.goodscount)); + for (var i = 0; i < this.data.g_id .length; i += this.data.goodscount) { + arr.push(this.data.g_id .slice(i, i + this.data.goodscount)); } + this.data.firist_type_data = arr; this.init(this.data.classstyle_id, this.data.wgroup); }, @@ -124,7 +125,7 @@ Component({ var th = this; var g_id = this.data.g_id; if (classstyle_id == 1) { - //手动选择的时候 + //---手动选择的时候--- g_id = this.data.firist_type_data[th.data.firist_type_curr]; th.data.firist_type_curr++; } @@ -136,75 +137,46 @@ Component({ //--初始化卡类-- th.card_init(); - var os=getApp().globalData.setting; - classstyle_id = classstyle_id + ""; switch (classstyle_id) { - case "1": - g_id.forEach(function (val, ind) { - var item = {}; - var prom_id = null; - console.log(val.goodsid); - app.request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + val.goodsid, {}).then(res => { - //商品地址 - var goods = res.data.data; - th.setData({ - goods_btn: res.data.data - }) - - item.goods_name = goods.goods_name; - item.goods_img = th.data.imghost + goods.original_img; - item.market_price = goods.market_price; - item.shop_price = goods.shop_price; - item.sales_sum = goods.sales_sum; - item.goods_id = goods.goods_id; - item.cardprice1 = goods.cardprice1; - item.cardprice2 = goods.cardprice2; - item.cardprice3 = goods.cardprice3; - - prom_id = res.data.data.prom_id; - - var prom_type = res.data.data.prom_type; //0普通商品 1秒杀 6拼单 - - var url = ""; - if (prom_type == 6) { - url = "/api/weshop/teamlist/get/" + os.stoid + "/" + prom_id; - } else if (prom_type == 1) { - url = "/api/ms/flash_sale/get/" + os.stoid + "/" + prom_id; - } - if(url==""){ - th.data.requestData.push(item); - th.setData({ goods_array: th.data.requestData, }); - if (th.data.firist_type_curr == th.data.firist_type_data.length) { - th.setData({ goods_btn: [] }); - } - }else{ - return app.request.promiseGet(url, {}) - } - - }).then(res => { - index++; - var prom = res.data.data; - var now=ut.gettimestamp(); - if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_timenow) {item.prom_type=0; item.prom_price=0;} + new_arr.push(item); + } + rData = rData.concat(new_arr); + th.data.requestData = rData; + th.setData({ goods_array: rData }); + //---控制有没有加载更多的按钮--- + if (th.data.firist_type_curr == th.data.firist_type_data.length) {th.setData({ goods_btn: [] }); } + else th.setData({ goods_btn: res.data}); + } + } + + }) + break; case "2": - var item = {}; app.request.promiseGet("/api/weshop/goods/page", { data: { @@ -256,7 +228,8 @@ Component({ } if(url!="") { await app.request.promiseGet(url, {}).then(res => { - var prom = res.data.data; + var prom = null + if (res && res.data) prom=res.data.data; if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time { - var prom = res.data.data; + var prom =null; + if(res && res.data) res.data.data; if (prom != null && prom.is_end==0 && prom.end_time>now && prom.show_time - - - - 拼单 - - - + + + + + 拼单 - - - - - - - - - - - 即将开始 - - - 火热进行 - - - - - - - + + + + + + + + + + + + - - - - - - + + 即将开始 + + + 火热进行 + - 商家 - 会员 - 阶梯 - + - - {{aitem.goods_name}} - ¥{{aitem.price}} - + + + - - {{aitem.ct_num}}人团 + + + + + + - 去参团 - 去开团 - 去开团 - 已抢光 - - - - - - + 商家 + 会员 + 阶梯 + - - - - - - - - - - - 商家 - 会员 - 阶梯 - - + + {{aitem.goods_name}} + ¥{{aitem.price}} + - + + {{aitem.ct_num}}人团 - {{aitem.title}} - - 已团{{aitem.buy_num}}件 - {{aitem.ct_num}}人团 - - ¥{{aitem.price}} - ¥{{aitem.market_price}} - - - {{aitem.djs.day}}天{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒 - - - 去参团 - 去开团 - 去参团 - 已抢光 - - - - - + 去参团 + 去开团 + 去开团 + 已抢光 + + + + + + + + + + + + + + + + 商家 + 会员 + 阶梯 + + + + + + {{aitem.title}} + + 已团{{aitem.buy_num}}件 {{aitem.ct_num}}人团 + + + ¥{{aitem.price}} + ¥{{aitem.market_price}} + + + + {{aitem.djs.day}}天{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒 + + + 去参团 + 去开团 + 去参团 + 已抢光 + + + + + + + \ No newline at end of file diff --git a/components/diy_pingd_buy/diy_pingd_buy.wxss b/components/diy_pingd_buy/diy_pingd_buy.wxss index 7ecabf5..9f8d984 100644 --- a/components/diy_pingd_buy/diy_pingd_buy.wxss +++ b/components/diy_pingd_buy/diy_pingd_buy.wxss @@ -1,7 +1,10 @@ /* pages/wp/wp.wxss */ - +.top{ + display: flex; + align-items: center; +} .top_p { - width: 100%; + padding:0rpx 20rpx; background-color: white; height: 70rpx; line-height: 70rpx; @@ -9,12 +12,12 @@ text-align: left; border-bottom: 2rpx solid #eee; display: flex; + justify-content: space-between; + align-items: center; } .right_p { width: 30rpx; - height: 100%; - margin-left: 580rpx; } .right_p image { @@ -26,9 +29,7 @@ width: 10rpx; height: 38rpx; background: #c4182e; - margin-top: 18rpx; margin-right: 12rpx; - margin-left: 20rpx; } .sp_p { @@ -42,7 +43,7 @@ .sp_p .sp_top_p { height: 220rpx; min-width: 30%; - position: relative; + position: relative; } .sp_p .sp_top_p .s_img_p { @@ -206,21 +207,24 @@ swiper { } .sp2_p .one1_p { - width: 100%; background-color: white; height: 252rpx; display: flex; padding: 20rpx; border-bottom: 6rpx#eee solid; + align-items: center; } .sp2_p .one1_p .o1_img_p { - width: 200rpx; - height: 240rpx; - margin-right: 24rpx; + width: 220rpx; + height: 220rpx; + margin-right: 25rpx; } -.o1_right_p{position: relative; width: 485rpx;} +.o1_right_p { + position: relative; + width: 465rpx; +} .o1_right_p .sp_wzi_p { font-size: 36rpx; @@ -228,16 +232,16 @@ swiper { width: 100%; text-align: left; padding: 4rpx 0; - overflow: hidden; height: 48rpx; + overflow: hidden; + white-space: nowrap; text-overflow: ellipsis; } .o1_right_p .o1_sj_p { height: 60rpx; - margin-bottom: 10rpx; - font-size: 28rpx; - line-height: 40rpx; + font-size: 28rpx; + line-height: 40rpx; } .o1_right_p .o1_sj_p text { @@ -269,8 +273,6 @@ swiper { height: 100%; background-color: blueviolet; position: relative; - top: -8rpx; - left: 0rpx; } .o1_right_p .wo_p { @@ -280,11 +282,11 @@ swiper { line-height: 60rpx; color: white; text-align: center; - font-size: 26rpx; + font-size: 32rpx; border-radius: 14rpx; - position: absolute; - right: 0; - bottom:46rpx; + position: absolute; + right: 0; + bottom: 46rpx; } .sp_sj_p { @@ -295,12 +297,11 @@ swiper { position: absolute; bottom: 300rpx; right: 0rpx; - top: 0; + top: 0; width: 60rpx; height: 60rpx; text-align: center; line-height: 60rpx; - } .sp_sj1_p { @@ -315,20 +316,48 @@ swiper { text-align: center; line-height: 60rpx; } -.tuan_set_num{ - display: flex;justify-content: space-between; font-size: 28rpx; + +.tuan_set_num { + display: flex; + justify-content: space-between; + font-size: 28rpx; +} + +.tuan_set_num .co-red2 { + color: #b2aea8; + font-size: 26rpx; +} + +.tuan_set_num .cantuan { + background: #c4182e; + color: #fff; + padding: 4rpx 10rpx; + border-radius: 5rpx; } -.tuan_set_num .co-red2{ - color: #B2AEA8;font-size: 26rpx; +.tuan_set_num .cantuan.huise { + background: gainsboro; + color: #666; } -.tuan_set_num .cantuan{ - background:#c4182e; color: #fff; padding: 4rpx 10rpx; border-radius:5rpx ; + +.o1_sj_p .time_img { + width: 40rpx; + height: 40rpx; + vertical-align: top; + margin-right: 10rpx; } -.tuan_set_num .cantuan.huise{ - background:gainsboro; color: #666; + +.o1_right_p .co-red2 { + font-size: 30rpx; + color: #999; } -.o1_sj_p .time_img{width: 40rpx; height: 40rpx; vertical-align: top; margin-right: 10rpx;} -.o1_right_p .co-red2{font-size:30rpx; color: #999;} -.o1_right_p .co-red2 .yituan_num{font-size:30rpx; margin-right: 10rpx; color: #333;} +.o1_right_p .co-red2 .yituan_num { + font-size: 30rpx; + margin-right: 10rpx; + color: #333; +} +.money{ + display: flex; + align-items: center; +} \ No newline at end of file diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml index 653412b..f5e479f 100644 --- a/components/diy_seckill/diy_seckill.wxml +++ b/components/diy_seckill/diy_seckill.wxml @@ -1,100 +1,107 @@ - - - - 秒杀 + + + + + 秒杀 + - + - + - - + + - - - - - - - - 即将开始 - - - 火热进行 - - - - - - - - - {{aitem.djs.day}}天 - {{aitem.djs.hou}}时 - {{aitem.djs.min}}分 - {{aitem.djs.sec}}秒 - - - - - - - {{aitem.goods_name}} - ¥{{aitem.price}} - ¥{{aitem.market_price}} - - - - - - - - - - - - - - - - - - - - - {{aitem.goods_name}} - - {{aitem.djs.day}} - 天 - {{aitem.djs.hou}} - : - {{aitem.djs.min}} - : - {{aitem.djs.sec}} - - - ¥{{aitem.price}} - ¥{{aitem.market_price}} - - 正在预热 - - - 我要抢 - - - - + + + + + + + + 即将开始 + + + 火热进行 + + + 已抢光 + + + + + + + + + + {{aitem.djs.day}}天 + {{aitem.djs.hou}}时 + {{aitem.djs.min}}分 + {{aitem.djs.sec}}秒 - + + + + + + {{aitem.goods_name}} + ¥{{aitem.price}} + ¥{{aitem.market_price}} + + + + + + + + + + + + + + + + + + + + {{aitem.goods_name}} + + {{aitem.djs.day}} 天 + {{aitem.djs.hou}} : + {{aitem.djs.min}} : + {{aitem.djs.sec}} + + + + ¥{{aitem.price}} + ¥{{aitem.market_price}} + + + 正在预热 + + + + 我要抢 + + + + + 已抢光 + + + + + + + - - + + \ No newline at end of file diff --git a/components/diy_seckill/diy_seckill.wxss b/components/diy_seckill/diy_seckill.wxss index 8d24783..a47415c 100644 --- a/components/diy_seckill/diy_seckill.wxss +++ b/components/diy_seckill/diy_seckill.wxss @@ -1,334 +1,288 @@ - -.top{ - width: 100%; +.flex{ + display: flex; + align-items: center; +} +.top { background-color: white; height: 70rpx; line-height: 70rpx; - color: #000; - text-align: left; - border-bottom: 2rpx solid #eee; - display: flex; + color: #000; + border-bottom: 2rpx solid #eee; + padding:0rpx 20rpx; + display: flex; + justify-content: space-between; } - -.s_it{ +.s_it { width: 100%; display: flex; background-color: white; } -.s_prom{ +.s_prom { width: 100%; background-color: white; min-height: 200rpx; } swiper { - display:block; - height:400rpx; - + display: block; + height: 400rpx; } -.right_k{ +.right_k { width: 30rpx; - height: 100%; - margin-left: 580rpx; } -.right_k image{ width: 30rpx; height: 30rpx} - - -.top .t_left{ - width: 10rpx; - height: 38rpx; - background: #C4182E; - margin-top:18rpx; -margin-right:12rpx; -margin-left:20rpx; +.right_k image{ + width: 30rpx; + height: 30rpx; +} + .t_left { + width: 10rpx; + height: 38rpx; + background: #c4182e; + margin-right: 10rpx; } -.sp{ +.sp { min-height: 300rpx; width: 100%; background-color: white; - padding:18rpx; -display: flex; + padding: 18rpx; + display: flex; } -.sp .sp_top{ +.sp .sp_top { height: 220rpx; min-width: 30%; - - } -.sp .sp_top .s_img{ +.sp .sp_top .s_img { width: 210rpx; height: 100%; } -.sp .sp_top .s_img image{ +.sp .sp_top .s_img image { width: 210rpx; height: 100%; - position: relative; top: -74rpx; - left:0rpx; - + left: 0rpx; } -.sp .sp_top .s_top_kill - -{ - -background-color:#C4182E; -font-size:24rpx; -height:38rpx; -line-height:38rpx; -left:6rpx; - -padding:4rpx 10rpx; - -border-radius:10rpx; - - -z-index: 999; +.sp .sp_top .s_top_kill { + background-color: #c4182e; + font-size: 24rpx; + height: 38rpx; + line-height: 38rpx; + left: 6rpx; + padding: 4rpx 10rpx; + border-radius: 10rpx; + z-index: 999; position: relative; - top:-6rpx; - width: 210rpx; - - - color: #fff; - text-align: center; - - + top: -6rpx; + width: 210rpx; + color: #fff; + text-align: center; } -.po{ +.po { position: absolute; } -.sp .sp_top .s_foot_kill{ +.sp .sp_top .s_foot_kill { font-size: 20rpx; position: relative; - top:-90rpx; - width: 210rpx; - height: 38rpx; - line-height: 38rpx; - color: #fff; - text-align: center; - background-color: rgba(0, 0, 0, 0.5); + top: -90rpx; + width: 210rpx; + height: 38rpx; + line-height: 38rpx; + color: #fff; + text-align: center; + background-color: rgba(0, 0, 0, 0.5); } - - -.sp_wz{ -width: 210rpx; - min-height:100rpx; - +.sp_wz { + width: 210rpx; + min-height: 100rpx; } -.sp_wz .sp_wzi{ - font-size: 30rpx; - border-bottom: 2rpx solid #dcdcdc; - width: 100%; - text-align: left; - padding: 4rpx 0; - overflow: hidden; - height: 48rpx; - text-overflow: ellipsis; - white-space: nowrap; - line-height: 48rpx; +.sp_wz .sp_wzi { + font-size: 30rpx; + border-bottom: 2rpx solid #dcdcdc; + width: 100%; + text-align: left; + padding: 4rpx 0; + overflow: hidden; + height: 48rpx; + text-overflow: ellipsis; + white-space: nowrap; + line-height: 48rpx; } -.sp_wz .sp_jg{ - color: #C4182E; - font-size: 30rpx; - overflow: hidden; - display: inline-block; - text-overflow: ellipsis; - white-space: nowrap; - margin-right: 10rpx; +.sp_wz .sp_jg { + color: #c4182e; + font-size: 30rpx; + overflow: hidden; + display: inline-block; + text-overflow: ellipsis; + white-space: nowrap; + margin-right: 10rpx; } -.sp_wz .sp_jgx{ +.sp_wz .sp_jgx { color: #adadad; - text-decoration: line-through; - font-size: 24rpx; - - overflow: hidden; - display: inline-block; - text-overflow: ellipsis; - white-space: nowrap; - + text-decoration: line-through; + font-size: 24rpx; + overflow: hidden; + display: inline-block; + text-overflow: ellipsis; + white-space: nowrap; } -.one{ +.one { margin-left: 14rpx; - } - -.sp .sp_top .s_top1_kill{ +.sp .sp_top .s_top1_kill { position: absolute; -background-color:#C4182E; -font-size:24rpx; -height:38rpx; -line-height:38rpx; -left:265rpx; -top:100rpx; -padding:0 10rpx; -color:white; -border-radius:10rpx; - + background-color: #c4182e; + font-size: 24rpx; + height: 38rpx; + line-height: 38rpx; + left: 265rpx; + top: 100rpx; + padding: 0 10rpx; + color: white; + border-radius: 10rpx; } -.sp .sp_top .s_top2_kill{ +.sp .sp_top .s_top2_kill { position: absolute; -background-color:#C4182E; -font-size:24rpx; -height:38rpx; -line-height:38rpx; -right:146rpx; -top:100rpx; -padding:0 10rpx; -color:white; -border-radius:10rpx; - + background-color: #c4182e; + font-size: 24rpx; + height: 38rpx; + line-height: 38rpx; + right: 146rpx; + top: 100rpx; + padding: 0 10rpx; + color: white; + border-radius: 10rpx; } - - -.sp .sp_top .s_foot1_kill{ +.sp .sp_top .s_foot1_kill { font-size: 20rpx; position: absolute; - top:270rpx; - width: 210rpx; - height: 38rpx; - line-height: 38rpx; - color: #fff; - text-align: center; - background-color: rgba(0, 0, 0, 0.5); + top: 270rpx; + width: 210rpx; + height: 38rpx; + line-height: 38rpx; + color: #fff; + text-align: center; + background-color: rgba(0, 0, 0, 0.5); } -.po1{ +.po1 { position: absolute; } - -.sp .sp_top .s_foot2_kill{ +.sp .sp_top .s_foot2_kill { font-size: 20rpx; position: absolute; - top:270rpx; - width: 210rpx; - height: 38rpx; - line-height: 38rpx; - color: #fff; - text-align: center; - background-color: rgba(0, 0, 0, 0.5); + top: 270rpx; + width: 210rpx; + height: 38rpx; + line-height: 38rpx; + color: #fff; + text-align: center; + background-color: rgba(0, 0, 0, 0.5); } - - - - - - -.sp2{ +.sp2 { width: 100%; min-height: 240rpx; - } -.sp2 .one1{ - width: 100%; +.sp2 .one1 { background-color: white; - height: 252rpx; + height: 285rpx; display: flex; - padding: 20rpx; - border-bottom:6rpx#eee solid; - + padding:0rpx 20rpx; + border-bottom: 6rpx#eee solid; + align-items: center; } -.sp2 .one1 .o1_img{ - width: 200rpx; - height: 240rpx; - - margin-right: 24rpx; +.sp2 .one1 .o1_img { + width: 220rpx; + height: 220rpx; + margin-right: 25rpx; } -.o1_right .sp_wzi{ +.o1_right .sp_wzi { font-size: 36rpx; - margin-bottom:6rpx; - - width: 100%; + margin-bottom: 6rpx; text-align: left; padding: 4rpx 0; - overflow: hidden; height: 48rpx; + overflow: hidden; + white-space: nowrap; text-overflow: ellipsis; - white-space: nowrap } -.o1_right .o1_sj_kill{ +.o1_right .o1_sj_kill { height: 60rpx; - margin-bottom: 10rpx; } -.o1_right .o1_sj_kill text{ +.o1_right .o1_sj_kill text { background-color: #fdcb08; text-align: center; border-radius: 10rpx; - padding:4rpx; -margin-left:6rpx; - + padding: 4rpx; + margin-left: 6rpx; } - - -.o1_right .sp_jg{ - color: #C4182E; +.o1_right .sp_jg { + color: #c4182e; font-size: 36rpx; - overflow: hidden; display: inline-block; margin-right: 10rpx; } -.o1_right .sp_jgx{ +.o1_right .sp_jgx { color: #dcdcdc; text-decoration: line-through; font-size: 26rpx; - overflow: hidden; display: inline-block; } - -.o1_img image{ - width: 100%; - height: 100%; - - position:relative; -top:-23rpx; -left:0rpx; - +.o1_img image { + width: 220rpx; + height: 220rpx; } - -.o1_right .wo{ - background-color: #C4182E; +.o1_right{ + width: 465rpx; +} +.o1_right .wo { + background-color: #c4182e; width: 160rpx; height: 60rpx; line-height: 60rpx; color: white; text-align: center; - font-size: 38rpx; - margin-left:298rpx; -border-radius:14rpx; -padding-left: 10rpx; -padding-right: 10rpx; + font-size: 32rpx; + border-radius: 14rpx; +} +.rob{ + display: flex; + justify-content: flex-end; +} +.money{ + display: flex; + align-items: center; } - - +.sp .sp_top .s_top_kill.gray{background-color:#bdbdc1;color: #fff;font-weight: normal} \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js new file mode 100644 index 0000000..1f29d89 --- /dev/null +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -0,0 +1,221 @@ +var e = getApp(), + a = e.globalData.setting, + os = a, + t = e.request, + d = e.globalData; +Page({ + data: { + url: a.url, //接口网址 + iurl: a.imghost, //图片前缀网址 + getStorageID: '', + getUserID: '', + wareCard: [], + page: 0, + pageSize: 10, + isEmpty: true, + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore + contentText: { + contentdown: '加载更多', + contentrefresh: '加载中...', + contentnomore: '已加载全部' + }, + is_read:0,//礼包列表是否全部加载完毕 + }, + onLoad: function(options) { + var th = this; + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open_cancel(0); + th.setData({ + getStorageID: a.stoid, + getUserID: d.user_id + }) + }, + onShow: function() { + var th = this; + th.setData({ + pages: 1, + pageSize: 10, + loadingType: 0 + }) + th.getList(); + }, + + GetBuyPrice: function(e) { + var that = this.data; + var th = this; + var id = e.currentTarget.dataset.id;//活动id + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定购买该礼包", + "取消", + "确定", + function() { + my_confirm.open_cancel(0); + }, + function() { + my_confirm.open_cancel(0); + var json = { + "actId": '', //活动Id + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 + "buyType": '2', //1=积分兑换 2=余额购买 + "lbId": id, //礼包Id + "storeId": that.getStorageID, //商家Id + "userId": that.getUserID, //用户ID + "buyFrom": 2 + }; + var data = JSON.stringify(json); + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; + wx.request({ + url: url, + data: data, + method: 'post', + header: { + 'content-type': 'application/json' + }, // 设置请求的 header + success: function (res) { + if (res.data.code == 0) { + res=res.data.data; + wx.requestPayment({ + timeStamp: String(res.timeStamp), + nonceStr: res.nonceStr, + package: res.packageValue, + signType: res.signType, + paySign: res.paySign, + success: function (n) { + + }, + fail: function (n) { + + } + }); + } else { + getApp().my_warnning(res.data.msg, 0, th); + } + } + }) + + } + + + ) + + + }, + GetBuyIntegral: function(e) { + var that = this.data; + var th = this; + var id = e.currentTarget.dataset.id;//活动id + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + my_confirm.open( + "是否确定兑换该礼包", + "取消", + "确定", + function() { + my_confirm.open_cancel(0); + }, + function() { + my_confirm.open_cancel(0); + var json = { + "actId": '', //活动Id + "actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销 + "buyType": '1', //1=积分兑换 2=余额购买 + "lbId": id, //礼包Id + "storeId": that.getStorageID, //商家Id + "userId": that.getUserID //用户ID + }; + var data = JSON.stringify(json); + var url = that.url + "/api/weshop/marketing/buy/receive/gift/record/insert"; + wx.request({ + url: url, + data: data, + method: 'post', + header: { + 'content-type': 'application/json' + }, // 设置请求的 header + success: function (res) { + if (res.data.code == 0) { + getApp().my_warnning("兑换成功!", 1, th); + } else { + getApp().my_warnning(res.data.msg, 0, th); + } + } + }) + + }) + + + }, + getList: function(e) { + var _this = this; //上拉加载 + var that = this.data; + if (that.loadingType != 0) { + return false; + } + // that.loadingType = 1; + _this.setData({ + loadingType: 1 + }) + getApp().request.get('/api/weshop/marketing/giftbag/page', { + data: { + "storeId": that.getStorageID, //商家ID + "userId": that.getUserID, //用户ID + "page": that.pages, + "pageSize": that.pageSize + }, + success: function success(res) { + if (res.data.code == 0) { + if (res.data.data.total > 0) { + _this.setData({ + isEmpty: false + }) + } else { + _this.setData({ + isEmpty: true + }) + } + if (res.data.data.pageData.length == 0) { + _this.setData({ + loadingType: 2 + }) + } else { + var wareCard = that.wareCard; + var is_read = 0; + if (wareCard.length < res.data.data.total) { + for (var i = 0; i < res.data.data.pageData.length; i++) { + wareCard.push(res.data.data.pageData[i]); + } + }else{ + is_read:1 + } + _this.setData({ + wareCard: wareCard, + is_read: is_read, + loadingType: 0 + }) + + } + } else { + getApp().my_warnning(res.data.msg, 0, _this); + } + } + }) + + }, + //销毁界面跳转 + redirectTo: function(e) { + var th = this; + var url = e.currentTarget.dataset.url; + //销毁跳转 + wx.redirectTo({ + url: url + }); + }, + //不销毁界面跳转 + navigateTo:function(e){ + var th = this; + var url = e.currentTarget.dataset.url; + wx.navigateTo({ + url: url, + }) + } +}) \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.json b/pages/giftpack/buygiftpack/giftpackbuy.json new file mode 100644 index 0000000..d1faf2e --- /dev/null +++ b/pages/giftpack/buygiftpack/giftpackbuy.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "礼包列表", + "navigationStyle": "custom", + "usingComponents": { + "warn": "/components/long_warn/long_warn", + "my_confirm": "/components/my_confirm/my_confirm" + } +} \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml new file mode 100644 index 0000000..162d566 --- /dev/null +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml @@ -0,0 +1,79 @@ + + + + + + + 礼包列表 + + + + 我的礼包 + + + + + + + + + + + {{items.giftTitle}} + + + + {{"¥"+items.payMoney}} + + + / + + + {{items.payIntegral+"积分"}} + + + + {{"原价:¥"+items.giftPosPrice}} + + + {{"活动时间:"+items.endTime}} + + + + + + {{"已售:"+items.giftQty+"件"}} + + + + + + + + + + + + + + + + + + + + + 当前暂无礼包 + + + 去获取 + + + + + ———— 到底了 ———— + + + + + \ No newline at end of file diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxss b/pages/giftpack/buygiftpack/giftpackbuy.wxss new file mode 100644 index 0000000..0ae857b --- /dev/null +++ b/pages/giftpack/buygiftpack/giftpackbuy.wxss @@ -0,0 +1,231 @@ +/*引用样式路径*/ +@charset "UTF-8"; + +/* Author XGQ + * 2019-11-12 + */ + +page { + background-color: #fb7454; +} + +.top_img { + -webkit-align-content: center; + align-content: center; +} + +.top_img image { + width: 100%; + height: 660rpx; +} + +.top_title { + display: -webkit-box; + display: -webkit-flex; + display: flex; + background-color: #fff; + height: 85rpx; + border-radius: 10rpx 10rpx 0rpx 0rpx; + margin: 0rpx 20rpx 0rpx 20rpx; + -webkit-align-content: center; + align-content: center; +} + +.top_title_box { + width: 49%; + -webkit-align-content: center; + align-content: center; + text-align: center; + padding: 15rpx; +} + +.top_title_box_S { + width: 1%; + -webkit-align-content: center; + align-content: center; + text-align: center; + margin: 20rpx 0rpx 20rpx 0rpx; + border-left: #000 solid 3rpx; +} + +.top_title_redtext { + font-size: 30rpx; + color: #d61b30; +} + +.top_title_blacktext { + font-size: 30rpx; + color: #000; +} + +.content_box { + background-color: #fff; + margin: 10rpx 20rpx 0rpx 20rpx; + border-radius: 10rpx; +} + +.content_box_ware { + border-bottom: #f5f5f5 solid 2rpx; + display: -webkit-box; + display: -webkit-flex; + display: flex; +} + +.content_box_img { + margin: 20rpx 20rpx 20rpx 25rpx; + width: 35%; + display: -webkit-box; + display: -webkit-flex; + display: flex; + font-size: 8rpx; + position: relative; +} + +.content_box_img image { + width: 100%; + height: 230rpx; +} + +.content_box_title { + width: 65%; + margin: 25rpx 25rpx 10rpx 0rpx; + position: relative; +} + +.content_ware_title { + font-size: 30rpx; + word-break: break-all; + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ + text-overflow: ellipsis; + display: -webkit-box; + /** 对象作为伸缩盒子模型显示 **/ + -webkit-box-orient: vertical; + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ + -webkit-line-clamp: 2; + /** 显示的行数 **/ + overflow: hidden; + /** 隐藏超出的内容 **/ +} + +.content_ware_type { + font-size: 28rpx; + color: #c61a34; + margin-top: 10rpx; + position: absolute; + left: 0; + bottom: 100rpx; +} + +.content_ware_price { + font-size: 20rpx; + color: #b9b5b5; + margin-top: 2rpx; + text-decoration: line-through; + position: absolute; + left: 0; + bottom: 70rpx; +} + +.content_ware_time { + font-size: 25rpx; + color: #000; + margin-top: 20rpx; + position: absolute; + left: 0; + bottom: 25rpx; +} +.box_button_buy{ + display: flex; + align-items: center; +} +.content_box_button { + display: flex; + height: 110rpx; + justify-content: space-between; + align-items: center; + padding-left: 20rpx; + padding-right: 25rpx; + line-height: 110rpx; +} + +.box_button_remark { + margin-left: 5rpx; +} + +.box_button_remark text { + font-size: 28rpx; + color: #b9b5b5; +} + +.box_button_buy button { + display: inline-block; + width: 160rpx; + height: 50rpx; + font-size: 20rpx; + background: #d41c34; + color: #fff; + line-height: 50rpx; +} + +.box_button_dui { + text-align: right; + margin: 22rpx 25rpx 0rpx 0rpx; +} + +.box_button_dui button { + display: inline-block; + width: 160rpx; + height: 50rpx; + font-size: 20rpx; + background: #fff; + color: #000; + line-height: 50rpx; +} + +.foot_box { + -webkit-align-content: center; + align-content: center; + text-align: center; + margin-top: 15rpx; + margin-bottom: 50rpx; +} + +.foot_box text { + font-size: 25rpx; + color: #fff; +} + +.foot_empty { + background-color: #fff; + height: 375rpx; + margin: 10rpx 20rpx 0rpx 20rpx; + border-radius: 10rpx; + text-align: center; + padding: 150rpx 0rpx 300rpx 0rpx; + -webkit-box-pack: center; + -webkit-justify-content: center; + justify-content: center; +} + +.foot_empty image { + width: 400rpx; + height: 273rpx; +} + +.foot_empty text { + font-size: 30rpx; + color: #999; +} + +.foot_empty_button { + background: #ff6363; + margin: 60rpx 230rpx 0rpx 230rpx; + padding: 10rpx; + border-radius: 70rpx; + line-height: 40rpx; +} + +.foot_empty_button text { + font-size: 28rpx; + color: #fff; +} diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js new file mode 100644 index 0000000..fbb2069 --- /dev/null +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -0,0 +1,229 @@ +var e = getApp(), + a = e.globalData.setting, + os = a, + t = e.request, + d = e.globalData; +Page({ + data: { + url: a.url, //接口网址 + iurl: a.imghost, //图片前缀网址 + isBuy: 0, + getGiftID: '', //礼包id + giftImage: '', + giftTitle: '', + giftDate: '', + giftPrice: '', + giftIntegral: '', + giftPosPrice: '', + giftQty: '', + giftRemark: '', + giftType: '', + actTitle: '', + getUrl: '', + wareCard: [], + orderSn: "", //订单编号 + }, + onLoad: function(options) { + var th = this; + th.setData({ + isBuy: options.isBuy, + getStorageID: a.stoid, + getUserID: d.user_id, + getGiftID: options.lbId, + orderSn: options.orderSn + }) + }, + onShow: function() { + var th = this; + if (th.data.isBuy == 0) { + th.GetMyGiftList(); + } else { + th.GetBuyGiftList(); + } + + // this.giftRemark = this.giftRemark.replace(/

+ + + + + + {{giftTitle}} + + + {{"兑换截至时间:"+giftDate}} + + + + {{"¥"+giftPrice}} + + + / + + + {{giftIntegral+"积分"}} + + + {{actTitle}} + + + + + {{"原价:"+giftPosPrice+"元"}} + + + {{"已售:"+giftQty+"件"}} + + + + + + 礼包内容 + + + + + + + + + + + + + + + + + + + + + + + {{item.couponName}} + + + + + + {{"数量:"+item.num}} + + + + + + + + + + + + + 已自动到账 + + + + + + + + + 活动说明 + + + + + + + + + + + 立即购买 + + + + + 立即兑换 + + + + + 立即购买 + + + + + 立即兑换 + + + + + + + + 立即使用 + + + + + + + \ No newline at end of file diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss new file mode 100644 index 0000000..1f5ccb2 --- /dev/null +++ b/pages/giftpack/giftpacklist/giftpacklist.wxss @@ -0,0 +1,203 @@ + +@charset "UTF-8"; +/* Author XGQ + * 2019-12-12 + */ +.box.data-v-3a5b7e36 { + -webkit-align-content: center; + align-content: center; +} +.box_top.data-v-3a5b7e36 { + width: 100%; +} +.box_top image.data-v-3a5b7e36 { + width: 100%; + height: 540rpx; +} +.box_title.data-v-3a5b7e36 { + margin: 10rpx 20rpx 20rpx 20rpx; + padding: 35rpx; + background-color: #FFFFFF; + border-radius: 20rpx; +} +.top_title.data-v-3a5b7e36 { + font-size: 30rpx; + margin-bottom: 10rpx; +} +.top_time.data-v-3a5b7e36 { + font-size: 27rpx; + color: #B9B5B5; +} +.top_price.data-v-3a5b7e36 { + font-size: 35rpx; + color: #D61B30; + margin-top: 30rpx; + margin-bottom: 5rpx; +} +.top_foot.data-v-3a5b7e36 { + display: -webkit-box; + display: -webkit-flex; + display: flex; +} +.top_foot_price.data-v-3a5b7e36 { + font-size: 22rpx; + color: #B9B5B5; + width: 50%; + text-decoration: line-through; +} +.top_foot_qty.data-v-3a5b7e36 { + font-size: 22rpx; + color: #B9B5B5; + width: 50%; + -webkit-align-content: flex-end; + align-content: flex-end; + text-align: right; +} +.box_ware.data-v-3a5b7e36 { + margin: 10rpx 20rpx 20rpx 20rpx; + padding: 35rpx; + background-color: #FFFFFF; + border-radius: 20rpx; +} +.box_ware_title.data-v-3a5b7e36 { + font-size: 35rpx; + margin: 5rpx 0rpx 30rpx 0rpx; +} +.box_ware_box.data-v-3a5b7e36 { + display: -webkit-box; + display: -webkit-flex; + display: flex; + margin: 10rpx 0rpx 25rpx 0rpx; +} +.box_ware_img.data-v-3a5b7e36 { + width: 30%; + height: 180rpx; + border: #999999 solid 1rpx; +} +.box_ware_img image.data-v-3a5b7e36 { + width: 100%; + height: 100%; +} +.box_ware_item.data-v-3a5b7e36 { + width: 70%; + margin-left: 25rpx; + position: relative; +} +.box_ware_item_title.data-v-3a5b7e36 { + font-size: 30rpx; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} +.box_ware_count.data-v-3a5b7e36 { + display: -webkit-box; + display: -webkit-flex; + display: flex; +} +.box_ware_item_price.data-v-3a5b7e36 { + font-size: 25rpx; + color: #B9B5B5; + position: absolute; + bottom: 60rpx; + left: 0; +} +.box_ware_item_qty.data-v-3a5b7e36 { + font-size: 25rpx; + position: absolute; + bottom: 15rpx; + left: 0; +} +.box_ware_code.data-v-3a5b7e36 { + position: absolute; + bottom: 10rpx; + right: 10rpx; +} +.box_ware_code image.data-v-3a5b7e36 { + width: 60rpx; + height: 60rpx; +} +.box_ware_code text.data-v-3a5b7e36 { + font-size: 20rpx; +} +.foot_box.data-v-3a5b7e36 { + margin: 10rpx 20rpx 50rpx 20rpx; + padding: 35rpx; + background-color: #FFFFFF; + border-radius: 20rpx; +} +.foot_box_title.data-v-3a5b7e36 { + font-size: 35rpx; + margin-bottom: 30rpx; +} +.foot_box_remark.data-v-3a5b7e36 { + font-size: 27rpx; + line-height: 40rpx; +} +.foot_empty.data-v-3a5b7e36 { + height: 90rpx; +} +.foot_button.data-v-3a5b7e36 { + display: -webkit-box; + display: -webkit-flex; + display: flex; + margin: 20rpx 0rpx 0rpx 0rpx; + padding: 25rpx 0rpx; + background: #FFFFFF; + text-align: center; + -webkit-box-pack: center; + -webkit-justify-content: center; + justify-content: center; + position: fixed; + bottom: 0; + left: 0; + width: 100%; +} +.foot_button_left.data-v-3a5b7e36 { + background: #e4010c; + color: #FFFFFF; + width: 250rpx; + height: 70rpx; + font-size: 28rpx; + line-height: 70rpx; + border-radius: 30rpx 0rpx 0rpx 30rpx; +} +.foot_button_right.data-v-3a5b7e36 { + background: #ffbb42; + color: #FFFFFF; + width: 250rpx; + height: 70rpx; + font-size: 28rpx; + line-height: 70rpx; + border-radius: 0rpx 30rpx 30rpx 0rpx; +} +.foot_button_buy.data-v-3a5b7e36 { + background: #e4010c; + color: #FFFFFF; + width: 400rpx; + height: 70rpx; + font-size: 28rpx; + line-height: 70rpx; + border-radius: 30rpx 30rpx 30rpx 30rpx; +} +.foot_button_intalge.data-v-3a5b7e36 { + background: #ffbb42; + color: #FFFFFF; + width: 400rpx; + height: 70rpx; + font-size: 28rpx; + line-height: 70rpx; + border-radius: 30rpx 30rpx 30rpx 30rpx; +} +page.data-v-3a5b7e36 { + background-color: #e85f93; +} +.foot_box_remark.data-v-3a5b7e36 ._img { + width: 100%; +} +.foot_box_remark.data-v-3a5b7e36 .img { + line-height: 0; +} + diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js new file mode 100644 index 0000000..c679c3b --- /dev/null +++ b/pages/giftpack/mygiftpack/mygiftpack.js @@ -0,0 +1,169 @@ +var e = getApp(), + a = e.globalData.setting, + os = a, + t = e.request, + d = e.globalData; +Page({ + data: { + iurl: a.imghost, //图片前缀网址 + getDate: new Date().getTime(), + getStorageID: '', + getUserID: '', + wareCard: [], + pages: 0, + pageSize: 10, + isEmpty: true, + loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore + contentText: { + contentdown: '加载更多', + contentrefresh: '加载中...', + contentnomore: '已加载全部' + }, + is_resad:0,//数据是否全部加载完成 + }, + + onLoad: function(options) { + // this.getStorageID = options.stoid; + // this.getUserID = options.userid; + var th = this; + th.setData({ + getStorageID: a.stoid, + getUserID: d.user_id + }) + }, + onShow: function() { + // this.pages = 1; + // this.pageSize = 10; + // this.loadingType = 0; + // this.getList(); + var th = this; + th.setData({ + pages: 1, + pageSize: 10, + loadingType: 0 + }) + th.getList(); + }, + // methods: { + // BuyGift: function BuyGift() { + // /*销毁跳转*/ + // uni.reLaunch({ + // url: 'pages/giftpack/buygiftpack/giftpackbuy?stoid=' + this.getStorageID + '&userid=' + this.getUserID + // }); + + // }, + // GetGiftPackList: function(getId, ojb) { + // //不销毁调整 + // uni.navigateTo({ + // url: 'pages/giftpack/giftpacklist/giftpacklist?isBuy=0&stoid=' + this.getStorageID + '&userid=' + this.getUserID + '&id=' + + // getId + // }); + + // }, + getList: function() { + var _this = this; //上拉加载 + var that = this.data; + if (that.loadingType != 0) { + return false; + } + // that.loadingType = 1; + _this.setData({ + loadingType: 1 + }) + getApp().request.get('/api/weshop/marketing/my/giftbag/page', { + data: { + // "storeId": this.getStorageID, //商家ID + // "userId": this.getUserID, //用户ID + // "page": this.pages, + // "pageSize": this.pageSize + "storeId": that.getStorageID, //商家ID + "userId": that.getUserID, //用户ID + "page": that.pages, + "pageSize": that.pageSize + }, + success: function success(res) { + if (res.data.code == 0) { + console.log(res.data.data); + if (res.data.data.total > 0) { + // _this.isEmpty = false; + _this.setData({ + isEmpty: false + }) + } else { + // _this.isEmpty = true; + _this.setData({ + isEmpty: true + }) + } + if (res.data.data.pageData.length == 0) { + // _this.loadingType = 2; + _this.setData({ + loadingType: 2 + }) + } else { + var wareCard = that.wareCard; + var is_resad = 0; + // if (_this.wareCard.length < res.data.data.pageData.length) { + if (wareCard.length < res.data.data.total) { + for (var i = 0; i < res.data.data.pageData.length; i++) { + wareCard.push(res.data.data.pageData[i]); + } + }else{ + is_resad=1 + } + _this.setData({ + wareCard: wareCard, + is_resad: is_resad + }) + + // _this.loadingType = 0; + _this.setData({ + loadingType: 0 + }) + } + } else { + + } + } + }); + + }, + TimeToDate: function(num) { //时间戳数据处理 是按秒来转换 + var date = new Date(num * 1000); + //时间戳为10位需*1000,时间戳为13位的话不需乘1000 + var y = date.getFullYear(); + var MM = date.getMonth() + 1; + MM = MM < 10 ? '0' + MM : MM; //月补0 + var d = date.getDate(); + d = d < 10 ? '0' + d : d; //天补0 + var h = date.getHours(); + h = h < 10 ? '0' + h : h; //小时补0 + var m = date.getMinutes(); + m = m < 10 ? '0' + m : m; //分钟补0 + var s = date.getSeconds(); + s = s < 10 ? '0' + s : s; //秒补0 + return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; + }, + DateToTime: function DateToTime(TimeNum) { //时间转换成时间戳 + var Time = new Date(TimeNum); + return Time.getTime() / 1000; + }, + //销毁界面跳转 + redirectTo: function (e) { + var th = this; + var url = e.currentTarget.dataset.url; + //销毁跳转 + wx.redirectTo({ + url: url + }); + }, + //不销毁界面跳转 + navigateTo: function (e) { + var th = this; + var url = e.currentTarget.dataset.url; + wx.navigateTo({ + url: url, + }) + } + +}); \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.json b/pages/giftpack/mygiftpack/mygiftpack.json new file mode 100644 index 0000000..1f07b7f --- /dev/null +++ b/pages/giftpack/mygiftpack/mygiftpack.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "我的礼包", + "enablePullDownRefresh": false, + "usingComponents": { + "warn": "/components/long_warn/long_warn", + "my_confirm": "/components/my_confirm/my_confirm" + } +} \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxml b/pages/giftpack/mygiftpack/mygiftpack.wxml new file mode 100644 index 0000000..97c8b55 --- /dev/null +++ b/pages/giftpack/mygiftpack/mygiftpack.wxml @@ -0,0 +1,110 @@ + + + + + + + + 礼包列表 + + + + 我的礼包 + + + + + + + + + + + + + + 新人有礼 + + + 评价有礼 + + + 节日营销 + + + 生日营销 + + + 助力礼包 + + + + + + + {{item.giftTitle}} + + + + {{"¥"+item.payMoney}} + + + {{item.payIntegral+"积分"}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + {{item.actTitle}} + + + + {{"原价:¥"+item.giftPosPrice}} + + + + + {{"兑换截至日期:"+getDate}} + + + {{"距兑换开始时间: "+item.starTime}} + + + + + + + + + + + + + + + + 当前暂无礼包 + + + 去获取 + + + + + + ———— 到底了 ———— + + + + + + \ No newline at end of file diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxss b/pages/giftpack/mygiftpack/mygiftpack.wxss new file mode 100644 index 0000000..089d370 --- /dev/null +++ b/pages/giftpack/mygiftpack/mygiftpack.wxss @@ -0,0 +1,206 @@ + + +/*引用样式路径*/ +@charset "UTF-8"; +/* Author XGQ + * 2019-11-12 + */ +.top_img { + -webkit-align-content: center; + align-content: center; +} +.top_img image { + width: 100%; + height: 660rpx; +} +.top_title { + display: -webkit-box; + display: -webkit-flex; + display: flex; + background-color: #FFFFFF; + height: 85rpx; + border-radius: 10rpx 10rpx 0rpx 0rpx; + margin: 0rpx 20rpx 0rpx 20rpx; + -webkit-align-content: center; + align-content: center; +} +.top_title_box { + width: 49%; + -webkit-align-content: center; + align-content: center; + text-align: center; + padding: 15rpx; +} +.top_title_box_S { + width: 1%; + -webkit-align-content: center; + align-content: center; + text-align: center; + margin: 20rpx 0rpx 20rpx 0rpx; + border-left: #000000 solid 3rpx; +} +.top_title_redtext { + font-size: 30rpx; + color: #d61b30; +} +.top_title_blacktext { + font-size: 30rpx; + color: #000000; +} +.content_box { + background-color: #FFFFFF; + height: 375rpx; + margin: 10rpx 20rpx 0rpx 20rpx; + border-radius: 10rpx; +} +.content_box_ware { + border-bottom: #f5f5f5 solid 2rpx; + display: -webkit-box; + display: -webkit-flex; + display: flex; +} +.content_box_img { + margin: 20rpx 20rpx 20rpx 25rpx; + width: 35%; + display: -webkit-box; + display: -webkit-flex; + display: flex; + font-size: 8rpx; + position: relative; +} +.content_box_img image { + width: 100%; + height: 230rpx; +} +.content_box_img_title { + position: absolute; + background: #D01119; + display: -webkit-box; + display: -webkit-flex; + display: flex; + padding: 8rpx; + border-radius: 0rpx 0rpx 10rpx 0rpx; +} +.content_box_img_ground1{ + background: #fb6451; +} +.content_box_img_ground2{ + background: #ffb72d; +} +.content_box_img_ground3{ + background: #9be0e5; +} +.content_box_img_ground4{ + background: #4784ef; +} +.content_box_img_title image { + width: 30rpx; + height: 30rpx; +} +.content_box_img_title text { + font-size: 20rpx; + color: #FFFFFF; + line-height: 25rpx; + padding-top: 5rpx; +} +.content_box_title { + width: 65%; + margin: 25rpx 25rpx 10rpx 0rpx; + position: relative; +} +.content_ware_title { + font-size: 30rpx; + word-break: break-all; + /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/ + text-overflow: ellipsis; + display: -webkit-box; + /** 对象作为伸缩盒子模型显示 **/ + -webkit-box-orient: vertical; + /** 设置或检索伸缩盒对象的子元素的排列方式 **/ + -webkit-line-clamp: 2; + /** 显示的行数 **/ + overflow: hidden; + /** 隐藏超出的内容 **/ +} +.content_ware_type { + font-size: 28rpx; + color: #c61a34; + margin-top: 10rpx; + position: absolute; + left: 0; + bottom: 100rpx; +} +.content_ware_price { + font-size: 20rpx; + color: #b9b5b5; + margin-top: 2rpx; + text-decoration: line-through; + position: absolute; + left: 0; + bottom: 70rpx; +} +.content_ware_time { + font-size: 25rpx; + color: #c61a34; + margin-top: 20rpx; + position: absolute; + left: 0; + bottom: 25rpx; +} +.content_box_button { + text-align: right; + margin: 20rpx 25rpx 20rpx 20rpx; +} +.content_box_button button { + display: inline-block; + width: 160rpx; + height: 50rpx; + font-size: 25rpx; + background: #d41c34; + color: #FFFFFF; + line-height: 50rpx; +} +.foot_box { + -webkit-align-content: center; + align-content: center; + text-align: center; + margin-top: 15rpx; + margin-bottom: 50rpx; +} +.foot_box text { + font-size: 25rpx; + color: #FFFFFF; +} +.foot_empty{ + background-color: #FFFFFF; + height: 375rpx; + margin: 10rpx 20rpx 0rpx 20rpx; + border-radius: 10rpx; + text-align: center; + padding: 150rpx 0rpx 300rpx 0rpx; + -webkit-box-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +.foot_empty image{ + width: 400rpx; + height: 273rpx; +} +.foot_empty text{ + font-size: 30rpx; + color: #999999; +} +.foot_empty_button{ + background: #ff6363; + margin: 60rpx 230rpx 0rpx 230rpx; + padding: 10rpx; + border-radius: 70rpx; + line-height: 40rpx; +} +.foot_empty_button text{ + font-size: 28rpx; + color: #FFFFFF; +} +page { + background-color: #fb7454; +} diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 25f9ee2..3efcfc0 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -212,10 +212,14 @@ 我的地址 - + 我的服务 + + + 我的礼包 +