diff --git a/packageA/pages/activity_share/activity_share.js b/packageA/pages/activity_share/activity_share.js
index 6cdb951..b4230de 100644
--- a/packageA/pages/activity_share/activity_share.js
+++ b/packageA/pages/activity_share/activity_share.js
@@ -7,7 +7,7 @@ Page({
*/
data: {
// tab
- tab: ['秒杀','拼单','促销','专享礼包'],
+ tab: ['秒杀','拼单','促销','专享礼包','预售','团购','组合购'],
currentIndex: 0,
//促销页tab
tab2: ['订单促销','搭配促销','优惠促销'],
@@ -56,7 +56,7 @@ Page({
var th=this;
//接受有没有导购的参数
var first_leader=options.first_leader;
- var StaffId=options.StaffId;
+ var StaffId=options.StaffId;
var StorageId=options.StorageId;
if(first_leader){
//-- user_id代过来免登录 --
@@ -142,9 +142,10 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {
+ console.log('abc');
var th = this;
//礼包的转发
- if(th.data.currentIndex==3){
+ if(th.data.currentIndex==3) {
var lbid=th.data.hui_active.lbId;
var url="/pages/giftpack/giftpacklist/giftpacklist?lbId="+lbid+"&isBuy=1";
if(getApp().globalData.user_id){
@@ -161,26 +162,71 @@ Page({
th.setData({share_hidden:1});
th.insert_act_share(title,lbid,6,null,th.data.hui_active.payMoney);
return ob;
- }else{
- //---秒杀,拼团,促销---
+ }else if(th.data.currentIndex==4) {
+ let item = this.data.hui_active;
+ let pre_id = item.id;
+ let goods_id = item.goods_id;
+ let price = item.presell_money;
+ let url = `packageC/pages/presell/goodsInfo/goodsInfo?goods_id=${goods_id}&pre_id=${pre_id}`;
+ let title = item.goods_name;
+ let img = this.data.url + item.original_img;
+
+ // console.log('preselll=======>>>>>', item, url);
+
+ if(getApp().globalData.user_id){
+ url += "&first_leader=" + getApp().globalData.user_id;
+ }
+ th.setData({share_hidden:1,share_good:null});
+ return {
+ title: price + "元 " +title,
+ path: url,
+ imageUrl: img,
+ };
+ } else if(th.data.currentIndex==6) {
+ let item = this.data.hui_active;
+ let id = item.id;
+ let title = item.name;
+ let price = item.zhprice;
+ let url = `/packageB/pages/zuhegou/index/index?id=${id}&title=${title}`;
+ let img = this.data.url + item.img_url;
+
+ console.log('zuhebuy=======>>>>>', item, url);
+
+ if(getApp().globalData.user_id){
+ url += "&first_leader=" + getApp().globalData.user_id;
+ }
+ th.setData({share_hidden:1});
+ return {
+ title: price + "元 " +title,
+ path: url,
+ imageUrl: img,
+ };
+
+ } else {
+ //---秒杀,拼团,促销, 团购---
var item=this.data.share_good;
+
if(item){
var price = item.price;
if(!price) price=item.shop_price;
switch(th.data.currentIndex){
case 0: item.prom_type=1;break;
case 1: item.prom_type=6;break;
- case 2:
- if(th.data.currentIndex2==1) item.prom_type = 5;
- if(th.data.currentIndex2==2) {
- item.prom_type = 3;
- item.id=item.prom_id;
- }
- break;
+ case 2:
+ if(th.data.currentIndex2==1) item.prom_type = 5;
+ if(th.data.currentIndex2==2) {
+ item.prom_type = 3;
+ item.id=item.prom_id;
+ };
+ break;
+ case 5:
+ item.prom_type = 2;
+ break;
}
- item.prom_id=item.id;
+
+ item.prom_id=item.id;
- var title= item.goods_name;
+ var title= item.goods_name;
var img=this.data.url+item.original_img;
var url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + item.goods_id+"&prom_type="+item.prom_type+"&prom_id="+item.prom_id;
if(getApp().globalData.user_id){
@@ -200,6 +246,8 @@ Page({
ind=4;//拼团
}else if(th.data.currentIndex==2){
ind=5;//促销
+ }else if(th.data.currentIndex==5){
+ ind=8;//团购
}
//插入活动
@@ -284,6 +332,7 @@ Page({
this.requestGoodsList();
}
},
+
// 关闭弹出层
closePopup() {
this.setData({
@@ -363,7 +412,7 @@ Page({
},
//-- -------获取商品列表--------
- requestGoodsList:function(){
+ requestGoodsList:function() {
var th=this;
if(th.data.is_load) return false; //-- 正在加载
if(th.data.is_no_data) return false; //-- 没有数据
@@ -430,7 +479,42 @@ Page({
if(th.data.key_str && th.data.key_str.trim()){
req_data.key_str=th.data.key_str.trim();
}
- break;
+ break;
+
+ case 4: //预售
+ url = '/api/weshop/marketing/marketingPresellList/page';
+ req_data.is_end = 0;
+ req_data.pageSize = 10;
+ req_data.timetype = 1;
+ req_data.isuse = 1;
+ req_data.user_id = user_id;
+
+ if(th.data.key_str && th.data.key_str.trim()){
+ req_data.key_str=th.data.key_str.trim();
+ }
+ break;
+
+ case 5: //团购
+ url = '/api/weshop/goods/groupBuy/page';
+ req_data.is_show = 1;
+ req_data.is_end = 0;
+ req_data.timetype = 1;
+ if(th.data.key_str && th.data.key_str.trim()){
+ req_data.key_str = th.data.key_str.trim();
+ }
+ break;
+
+ case 6: //组合购
+ // "/api/weshop/prom/zhbuy/page?is_end=0&timetype=1&page=" + e.data.currentPage
+ url = '/api/weshop/prom/zhbuy/page';
+ req_data.user_id = user_id;
+ req_data.is_end = 0;
+ req_data.timetype = 1;
+ // req_data.page = 20;
+ if(th.data.key_str && th.data.key_str.trim()){
+ req_data.key_str = th.data.key_str.trim();
+ }
+ break;
}
if(this.data.key_str && this.data.key_str.trim()){
@@ -454,6 +538,7 @@ Page({
if(res.data.data.page*10>res.data.data.total){th.setData({is_no_more:1});}
var list=th.data.list;
list=list.concat(data);
+ console.log('list------>>>>', data)
th.setData({list:list});
}else{
if(th.data.currentPage==1){
@@ -1174,6 +1259,8 @@ Page({
if(th.data.currentIndex2==1) item.prom_type = 5;
if(th.data.currentIndex2==2) item.prom_type = 3;
break;
+ case 5:
+ item.prom_type = 2;break;
}
item.prom_id = item.id;
@@ -1202,7 +1289,7 @@ Page({
var url="/api/weshop/sharetypeList/save";
var req_data={
shareActId:actid,
- shareActName:title,
+ shareActName:title,
shareType:ind,
shareUserId:th.data.first_leader,
shareStaffId:th.data.StaffId,
diff --git a/packageA/pages/activity_share/activity_share.wxml b/packageA/pages/activity_share/activity_share.wxml
index ea5378f..61fa5b2 100644
--- a/packageA/pages/activity_share/activity_share.wxml
+++ b/packageA/pages/activity_share/activity_share.wxml
@@ -1,3 +1,4 @@
+
@@ -9,11 +10,11 @@
-
-
- {{item}}
-
-
+
+
+ {{item}}
+
+
@@ -22,7 +23,7 @@
+
+
+
+
+
+
+
+ {{item.goods_name}}
+
+
+
+
+
+ 已预售{{filters.toFix((item.buy_goodnum+item.virtual_qty)/(item.presell_sumqty+item.virtual_qty)*100,0)}}%
+
+
+
+ 库存还剩{{item.presell_sumqty-item.buy_goodnum}}件
+
+
+
+
+
+
+
+ ¥{{item.presell_price}}
+ {{item.price}}
+ 零售价¥{{item.market_price}}
+
+
+ 分享
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{item.rebate}}折
+ {{item.price}}
+ {{item.market_price}}
+
+
+
+
+ 已售{{item.buy_num+item.virtual_num}}件
+ {{item.djs.day}}天{{item.djs.hou}}时{{item.djs.min}}分{{item.djs.sec}}秒
+
+ 分享
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+ 组合数量: {{item.zhbuyqty}}
+ 活动时间: {{filters.format_time(item.start_time) + '至' + filters.format_time(item.end_time)}}
+
+
+ ¥
+ {{item.zhprice}}
+
+ 分享
+
+
+
+
+
+
+
+
+
+
暂无数据
diff --git a/packageA/pages/activity_share/activity_share.wxss b/packageA/pages/activity_share/activity_share.wxss
index 25bedb9..b1985a3 100644
--- a/packageA/pages/activity_share/activity_share.wxss
+++ b/packageA/pages/activity_share/activity_share.wxss
@@ -49,7 +49,7 @@ page {
border-radius: 0 6rpx 6rpx 0;
}
.title {
- display: flex;
+ white-space: nowrap;
font-size: 30rpx;
border-bottom: 2rpx solid #f8f8f8;
}
@@ -59,10 +59,11 @@ page {
margin-left: 8rpx;
}
.title-item {
- width: 25%;
+ /* width: 25%; */
+ display: inline-block;
box-sizing: border-box;
text-align: center;
- padding: 20rpx;
+ padding: 20rpx 30rpx;
position: relative;
}
.title-item.active {
@@ -105,7 +106,7 @@ page {
.img-container {
background-color: #f0f0f0;
width: 280rpx;
- height: 248rpx;
+ /* height: 248rpx; */
display: flex;
align-items: center;
justify-content: center;
@@ -392,3 +393,172 @@ radio .wx-radio-input.wx-radio-input-checked::before{
}
+
+
+.kill-time {
+ text-align: center;
+ justify-content: space-around;
+ align-items: center;
+ /* height: 101rpx; */
+ border-bottom: 1px solid #ddd;
+ border-top: 1px solid #ddd;
+ background-color: #f6f6f6;
+}
+.kill-time .theader{
+ display: flex; margin: 0 auto; align-items: center;
+ height: 100rpx;
+
+}
+.kill-time .theader .timeac {
+ font-size: 32rpx; height:100%; width: 50%;
+ color: #333; background-color: #fff;
+
+}
+
+.kill-time .theader .timeac.active{color: #c4182e}
+
+.kill-item {
+ display: flex;
+ justify-content: space-between;
+ background-color: #fff;
+ padding: 20rpx;
+ /* margin-bottom: 10rpx; */
+ border-radius: 10rpx;
+ /* height: 249rpx; */
+ align-items: center;
+ /* margin-top: 20rpx; */
+}
+
+.kill-pic {
+ width: 215rpx;
+ height: 215rpx;
+}
+
+/* .kill-pic.zhbuy::before {
+ content: none;
+}
+
+.kill-pic::before {
+ position: absolute;
+ content: '预售';
+ left: 0;
+ top: 0;
+ background-color: #e23245;
+ color: white;
+ font-size: 22rpx;
+ padding: 0 10rpx;
+ border-radius: 4rpx 4rpx 4rpx 0;
+} */
+
+.kill-cont {
+ /* width: 465rpx;
+ margin-left:20rpx;
+ margin-right: 5rpx; */
+ padding-left: 20rpx;
+ flex: 1;
+}
+
+.goods-name {
+ height: 60rpx;
+ font-size: 27rpx;
+ color: #555;
+ line-height: 30rpx;
+
+}
+
+.goods-num {
+ padding-top: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ line-height: 42rpx;
+ font-size: 24rpx;
+ color: #999;
+}
+
+.goods-num .co-red {
+ font-size: 30rpx;
+ font-weight: bold;
+}
+
+.underline {
+ text-decoration: line-through;
+ color:#999999; font-size: 20rpx;
+ margin-left: 10rpx;
+ line-height: 30rpx;
+}
+
+.kill-btn {
+ text-align: right;
+ display: flex;
+height: 100%;
+align-items: flex-end;
+padding-top: 4rpx;
+
+}
+
+.kill-btn>navigator {
+ padding: 0 20rpx;
+ background: #e23245;
+ color: #fff;
+ border-radius: 20rpx;
+ /* margin-top: 37px; */
+
+}
+
+.kill-btn .gray {
+ background-color: #555;
+}
+
+.total{
+ width:215rpx;height:26rpx;border-radius:20rpx;
+ background: #aaa;
+}
+
+.xc-fill-text{
+ left:34%;
+ line-height: 26rpx;
+}
+
+.rmb {
+ position: relative;
+}
+
+.rmb::before {
+ content: '¥';
+ font-size: 24rpx;
+}
+
+.del {
+ text-decoration: line-through;
+}
+
+.btn {
+ background-color: #ff6768;
+ color: white;
+ padding: 10rpx 30rpx;
+ border-radius: 6rpx;
+ font-size: 26rpx;
+}
+
+.tag {
+ background-color: #ff6768;
+ color: white;
+ font-size: 24rpx;
+ padding-left: 10rpx;
+ padding-right: 10rpx;
+}
+
+.xc-fill{
+ border-radius:20rpx;height:26rpx;
+}
+
+.ml10 {
+ margin-left: 10rpx;
+}
+
+.goods-num.zhbuy {
+ display: block;
+ padding-top: 20rpx;
+}
+