diff --git a/components/diy_goodsGroup/diy_goodsGroup.js b/components/diy_goodsGroup/diy_goodsGroup.js
index ebfd0dd..202374c 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.js
+++ b/components/diy_goodsGroup/diy_goodsGroup.js
@@ -45,6 +45,7 @@ Component({
nav_list:null,
title_index:0,
swiper_hei:0,
+ title_class:"",
},
ready: function () {},
@@ -96,7 +97,17 @@ Component({
if(this.data.object.goodsprice) hei+=80;
if(this.data.object.goodsnum) hei+=80;
- this.setData({swiper_hei:hei});
+ if(this.data.object.title_color){
+ this.data.title_class=`color:${this.data.object.title_color};`
+ }
+
+ if(this.data.object.title_font_size){
+ this.data.title_class=this.data.title_class.concat(`font-size:${this.data.object.title_font_size}px;`)
+ }
+ this.setData({
+ swiper_hei:hei,
+ title_class:this.data.title_class,
+ });
if (nav_item && nav_item.goodsclass == 1) {
this.data.is_recommend = 1
@@ -432,7 +443,9 @@ Component({
set_good:async function(goods){
var now=ut.gettimestamp();
var th=this;
- if(!goods || goods.length==0) return false;
+ if(!goods || goods.length==0) return false;
+ var user_id=getApp().globalData.userInfo.user_id;
+ if(!user_id) user_id=0;
for(var i in goods){
var val=goods[i];
var item = {};
@@ -441,7 +454,7 @@ Component({
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:os.stoid,goodsidlist:val.goods_id,is_detail:1
+ store_id:os.stoid,goodsidlist:val.goods_id,is_detail:1,user_id:user_id
};
//获取商品的实际活动
diff --git a/components/diy_goodsGroup/diy_goodsGroup.wxml b/components/diy_goodsGroup/diy_goodsGroup.wxml
index 3f5b5b3..4541684 100644
--- a/components/diy_goodsGroup/diy_goodsGroup.wxml
+++ b/components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -6,7 +6,7 @@
- {{item.title}}
+ {{item.title}}
@@ -327,12 +327,12 @@
-
+
-
+
-
+
@@ -473,7 +473,7 @@
销量:{{item.sales_sum}}件
-
+
diff --git a/packageA/pages/activity_share/activity_share.js b/packageA/pages/activity_share/activity_share.js
index 6cdb951..a3dbdee 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,98 @@ 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;
+ let ind = 9;
+ // console.log('preselll=======>>>>>', item, url);
+
+ if(getApp().globalData.user_id){
+ url += "&first_leader=" + getApp().globalData.user_id;
+ }
+ th.insert_act_share(title,pre_id,ind,item.goods_sn,price);
+ 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;
+ let ind = 11;
+ // console.log('zuhebuy=======>>>>>', item, url);
+
+ if(getApp().globalData.user_id){
+ url += "&first_leader=" + getApp().globalData.user_id;
+ }
+
+ th.insert_act_share(title,id,ind,null,price);
+ th.setData({share_hidden:1});
+ return {
+ title: price + "元 " +title,
+ path: url,
+ imageUrl: img,
+ };
+
+ } else if(th.data.currentIndex==7) {
+ // /packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=462393&group_id=288
+ let item = this.data.hui_active;
+ // console.log('luckygo>>>>>', item);
+ let id = item.id;
+ let title = item.title;
+ let price = item.group_price / 100;
+ let url = `/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=462393&group_id=288`;
+ let img = this.data.url + item.original_img;
+ let ind = 12;
+ // console.log('zuhebuy=======>>>>>', item, url);
+
+ if(getApp().globalData.user_id){
+ url += "&first_leader=" + getApp().globalData.user_id;
+ }
+
+ th.insert_act_share(title,id,ind,null,price);
+ 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 +273,8 @@ Page({
ind=4;//拼团
}else if(th.data.currentIndex==2){
ind=5;//促销
+ }else if(th.data.currentIndex==5){
+ ind=10;//团购
}
//插入活动
@@ -284,6 +359,7 @@ Page({
this.requestGoodsList();
}
},
+
// 关闭弹出层
closePopup() {
this.setData({
@@ -363,7 +439,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 +506,51 @@ 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;
+
+ case 7: //幸运购
+ url = '/api/weshop/prom/luckyActivity/page';
+ 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;
}
if(this.data.key_str && this.data.key_str.trim()){
@@ -454,6 +574,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 +1295,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 +1325,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,
@@ -1232,7 +1355,13 @@ Page({
})
- }
+ },
+
+ //跳转
+ go: function (e) {
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
+ },
})
\ No newline at end of file
diff --git a/packageA/pages/activity_share/activity_share.wxml b/packageA/pages/activity_share/activity_share.wxml
index ea5378f..1556605 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}}
+
+ 分享
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+ {{filters.price(item.group_price)}}
+ 零售价:{{item.market_price}}
+
+
+
+
+ 分享
+
+
+
+
+
+ *{{item.group_num}}人成团,{{item.group_win}}人得商品,{{item.group_num - item.group_win}}人全额退款并得惊喜礼品!
+
+
+
暂无数据
diff --git a/packageA/pages/activity_share/activity_share.wxss b/packageA/pages/activity_share/activity_share.wxss
index 25bedb9..8363201 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;
@@ -138,7 +139,7 @@ page {
padding-bottom: 8rpx;
}
.pdl20 {
- padding-left: 104rpx;
+ padding-left: 20rpx;
}
@@ -392,3 +393,262 @@ 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;
+}
+
+
+
+
+.luckygo.list-item {
+ display: block;
+ background-color: white;
+ padding: 20rpx;
+ border-radius: 12rpx;
+ /* margin-top: 20rpx; */
+}
+
+.luckygo .img-container {
+ width: 220rpx;
+ height: 220rpx;
+ border-radius: 14rpx;
+ overflow: hidden;
+ flex-shrink: 0;
+ position: relative;
+}
+
+.luckygo .img-container::before {
+ content: '幸运购';
+ position: absolute;
+ left: 0;
+ top: 0;
+ padding: 4rpx;
+ background-color: rgba(255,103,103,.7);
+ color: white;
+ font-size: 22rpx;
+ border-radius: 0 0 14rpx 0;
+}
+
+.luckygo .name::before {
+ content: attr(data-content);
+ background-color: #FF6768;
+ color: white;
+ font-size: 24rpx;
+ padding-left: 10rpx;
+ padding-right: 10rpx;
+ border-radius: 20rpx;
+ margin-right: 10rpx;
+}
+
+.luckygo .rmb::before {
+ content: '¥';
+ font-size: 24rpx;
+}
+
+.luckygo .del {
+ text-decoration: line-through;
+}
+
+.luckygo .btn {
+ background-color: #FF6768;
+ border-radius: 20rpx;
+ padding-left:20rpx;
+ padding-right: 20rpx;
+ color: white;
+}
+
+.luckygo .name {
+ height: 88rpx;
+ word-break: break-all;
+}
+
+/* .no-more {
+ font-size: 24rpx;
+ line-height: 2;
+ text-align: center;
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+ color: #ccc;
+} */
+
+.luckygo .progress {
+ position: relative;
+}
+.luckygo .progress::before {
+ position: absolute;
+ width: 100%;
+ content: attr(data-content);
+ font-size: 20rpx;
+ color: white;
+ text-align: center;
+}
+
+.luckygo .btn.gray {
+ background-color: #ccc;
+}
+
diff --git a/packageA/pages/myGiftDetails/myGiftDetails.js b/packageA/pages/myGiftDetails/myGiftDetails.js
index 29cdaaf..f0eaebb 100644
--- a/packageA/pages/myGiftDetails/myGiftDetails.js
+++ b/packageA/pages/myGiftDetails/myGiftDetails.js
@@ -14,6 +14,7 @@ Page({
val: "12121",
content: "当前核销码仅限当面使用!"
},
+ showBtn: true,
},
/**
@@ -21,9 +22,19 @@ Page({
*/
onLoad: function (options) {
self = this;
+
+ // 如果从商品详情页点击促销栏里的礼包跳转过来的话,不显示底部按钮
+ // showBtn 控制按钮是否显示
+ let showBtn = this.data.showBtn;
+ if(options.btn == 0) {
+ showBtn = false;
+ }
+
this.setData({
+ options: options,
id: options.id,
index: options.index,
+ showBtn: showBtn,
})
// console.log('options', options);
diff --git a/packageA/pages/myGiftDetails/myGiftDetails.wxml b/packageA/pages/myGiftDetails/myGiftDetails.wxml
index a85c217..fe643fe 100644
--- a/packageA/pages/myGiftDetails/myGiftDetails.wxml
+++ b/packageA/pages/myGiftDetails/myGiftDetails.wxml
@@ -122,7 +122,7 @@
-
+
活动还未开始
@@ -141,7 +141,7 @@
-
+
活动还未开始
diff --git a/packageA/pages/quan_pro/quan_pro.js b/packageA/pages/quan_pro/quan_pro.js
index ae34bb5..08981c6 100644
--- a/packageA/pages/quan_pro/quan_pro.js
+++ b/packageA/pages/quan_pro/quan_pro.js
@@ -128,9 +128,16 @@ Page({
},
go_quan:function(){
- //跳转到券列表
+ //跳转到券列表
+ this.setData({
+ show_success:0
+ })
getApp().goto("/pages/user/coupons/coupons");
- }
-
+ },
+ close_show(){
+ this.setData({
+ show_success:0
+ })
+ },
});
diff --git a/packageA/pages/quan_pro/quan_pro.wxml b/packageA/pages/quan_pro/quan_pro.wxml
index d8c4f98..0789a3e 100644
--- a/packageA/pages/quan_pro/quan_pro.wxml
+++ b/packageA/pages/quan_pro/quan_pro.wxml
@@ -7,42 +7,39 @@
-
-
-
-
- {{q_data.name}}
- 不存在此微券或数量已领取完
-
-
-
-
-
-
- 全场通用
- 仅限{{q_data.useobjectname}}使用
-
-
-
- {{q_data.coupon_remark}}
-
+
+
+
+ {{q_data.name}}
+ 不存在此微券或数量已领取完
-
- ¥{{filters.toFix(q_data.money,2)}}
- 满{{filters.toFix(q_data.condition,2)}}可用
+
+
+
+
+ 全场通用
+ 仅限{{q_data.useobjectname}}使用
+
+
+
+ ¥{{filters.toFix(q_data.money,2)}}
+ 满{{filters.toFix(q_data.condition,2)}}可用
+
+ {{q_data.coupon_remark}}
-
+
有效期
- {{filters.format_time(getcurday+3600*24*q_data.startdays)}}
+ {{filters.format_time(getcurday+3600*24*q_data.startdays)}}
{{filters.format_time(q_data.use_start_time)}}至
{{filters.format_time(q_data.use_end_time)}}不限
有效期
- {{filters.format_time(getcurday+3600*24*q_data.startdays)}}
- {{filters.format_time(getcurday)}}至
- {{filters.format_time(getcurday+3600*24*q_data.days)}}不限
+ {{filters.format_time(getcurday+3600*24*q_data.startdays)}}
+ {{filters.format_time(getcurday)}}至
+ {{filters.format_time(getcurday+3600*24*q_data.days)}}不限
+
@@ -58,7 +55,7 @@
- 猜你喜欢
+ 猜你喜欢
@@ -83,6 +80,4 @@
-
-
-
+
\ No newline at end of file
diff --git a/packageA/pages/quan_pro/quan_pro.wxss b/packageA/pages/quan_pro/quan_pro.wxss
index 90cdbc8..440eb21 100644
--- a/packageA/pages/quan_pro/quan_pro.wxss
+++ b/packageA/pages/quan_pro/quan_pro.wxss
@@ -7,10 +7,10 @@ page{background-color: #f8f8f8;}
.img_part{ padding: 0 20rpx; position: relative}
.btn{ width: 90%; height: 72rpx; border-radius: 10rpx; background-color: #ff6c6c; color: #fff;}
.love{ width: 60rpx; height: 50rpx}
-.q_content{ position: absolute;top: 0; left: 0; width: 100%; height: 450rpx;padding: 0 20rpx; }
+.q_content{ position: absolute;top: 0; left: 0; width: calc(100% - 40rpx); height: 450rpx;padding: 0 20rpx; }
.upper{ height:330rpx;}
.lower{ height: 120rpx; line-height: 170rpx;color:#7a668f}
-
+.quan_box {display: flex;flex-direction: column;justify-content: flex-start; box-sizing: border-box;}
.upper .left{ margin-left:30rpx; margin-top: 30rpx }
.t_circle{ width: 10rpx; height: 10rpx; border-radius: 50%; background-color: #fff; margin-right: 8rpx}
diff --git a/packageB/pages/zuhegou/index/index.js b/packageB/pages/zuhegou/index/index.js
index 806135f..ce91880 100644
--- a/packageB/pages/zuhegou/index/index.js
+++ b/packageB/pages/zuhegou/index/index.js
@@ -10,8 +10,7 @@ let imgDraw = {
"width": "650px",
"height": "843px",
"background": "https://mshopimg.yolipai.net/miniapp/images/zhg/bg-zuhegou.jpg",
- "views": [
- { // 头像
+ "views": [{ // 头像
"type": "image",
"url": "https://desk-fd.zol-img.com.cn/t_s960x600c5/g5/M00/0F/08/ChMkJlauzXWIDrXBAAdCg2xP7oYAAH9FQOpVAIAB0Kb342.jpg",
"css": {
@@ -64,7 +63,7 @@ let imgDraw = {
"textAlign": "center"
}
},
- { // 码
+ { // 码
"type": "image",
"url": "https://desk-fd.zol-img.com.cn/t_s960x600c5/g5/M00/0F/08/ChMkJlauzXWIDrXBAAdCg2xP7oYAAH9FQOpVAIAB0Kb342.jpg",
"css": {
@@ -102,64 +101,62 @@ Page({
showNum: false,
haveAdded: false,
//imgDraw: imgDraw, 分享内容
- id: 0, //获得活动id
- page: 1, //第一页
- no_more: 0, //没有更多
- loading: 0, //加载中
- list:null, //商品列表的显示
- act: null, //组合活动
+ id: 0, //获得活动id
+ page: 1, //第一页
+ no_more: 0, //没有更多
+ loading: 0, //加载中
+ list: null, //商品列表的显示
+ act: null, //组合活动
all_price: 0, //合计价格
- all_num: 0, //全部数量
+ all_num: 0, //全部数量
sele_pick_id: 0, //默认选择门店,当用户什么商品都没有选,sele_pick_id=0
- def_store: null, //用户默认的门店
- sele_store: 0, //是不是选择了门店
+ def_store: null, //用户默认的门店
+ sele_store: 0, //是不是选择了门店
more_store: 0, //选择门店
sort_store: 0, //门店分类
choice_sort_store: 0, //选择分类门店
- fir_pick_index: 0, //门店选择的下标
- sec_pick_index: 0 //门店选择的下标,地区选择之后的内页
+ fir_pick_index: 0, //门店选择的下标
+ sec_pick_index: 0 //门店选择的下标,地区选择之后的内页
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
- console.log(options,111);
-
+ console.log(options, 111);
self = this;
var the_id = options.id;
- if(options.title) {
- wx.setNavigationBarTitle({
- title: options.title,
- });
- };
- var first_leader=options.first_leader;
+ if (options.title) {
+ wx.setNavigationBarTitle({
+ title: options.title,
+ });
+ };
+ var first_leader = options.first_leader;
//--如果tg_id是空的话,分享回来--
if (the_id == undefined || the_id == null || the_id == "") {
- var gid_str = decodeURIComponent(options.scene);
- gid_str=gid_str.split("_");
- the_id=gid_str[0];
- if(gid_str.length>1){
- first_leader=gid_str[1];
+ var gid_str = decodeURIComponent(options.scene);
+ gid_str = gid_str.split("_");
+ the_id = gid_str[0];
+ if (gid_str.length > 1) {
+ first_leader = gid_str[1];
}
}
- this.data.id=the_id;
- if(first_leader){
- getApp().globalData.first_leader=first_leader;
+ this.data.id = the_id;
+ if (first_leader) {
+ getApp().globalData.first_leader = first_leader;
//调用接口判断是不是会员
- getApp().request.promiseGet("/api/weshop/shoppingGuide/get/"+os.stoid+"/"+first_leader,{}).then(res=>{
- if(res.data.code==0){
- getApp().globalData.guide_id=res.data.data.id;
+ getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
+ if (res.data.code == 0) {
+ getApp().globalData.guide_id = res.data.data.id;
}
})
}
//如果有会员的时候
var userInfo = getApp().globalData.userInfo;
- if(!userInfo){
+ if (!userInfo) {
getApp().goto("/pages/togoin/togoin");
return false;
}
@@ -169,40 +166,51 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
- var th = this, that = this, ee = this;
+ var th = this,
+ that = this,
+ ee = this;
this.data.is_timer = 1;
if (this.data.act) this.countDown();
//如果有会员的时候
var userInfo = getApp().globalData.userInfo;
if (userInfo) {
- if(!th.data.is_get_act){
+ if (!th.data.is_get_act) {
//获取活动信息
- var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + th.data.id+"/"+userInfo.user_id;
+ var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + th.data.id + "/" + userInfo.user_id;
getApp().request.get(url, {
success: function (e) {
- th.data.is_get_act=1;
+ th.data.is_get_act = 1;
if (e.data.code == 0 && e.data.data) {
- self.setData({act: e.data.data});
- if(e.data.data.is_show!=1){
- th.setData({error:'活动未开启'});
+ self.setData({
+ act: e.data.data
+ });
+ if (e.data.data.is_show != 1) {
+ th.setData({
+ error: '活动未开启'
+ });
return false;
}
- if(ut.gettimestamp()=th.data.act.end_time ) {
+ if (th.data.act.is_end == 10 || ut.gettimestamp() >= th.data.act.end_time) {
return false;
}
//获取头像的分享
@@ -241,7 +249,9 @@ Page({
success: function (res) {
var vpath = res.path;
imgDraw.views[4].url = vpath;
- th.setData({imgDraw: imgDraw})
+ th.setData({
+ imgDraw: imgDraw
+ })
}
})
})
@@ -254,13 +264,13 @@ Page({
}
-
+
var ee = JSON.parse(JSON.stringify(e));
var appd = getApp().globalData;
//-- 等待定位系统的开启 --
th.waitfor2(15, 'is_get_local_ok', function () {
- if(!th.data.is_get_local_ok) return false;
+ if (!th.data.is_get_local_ok) return false;
var e = JSON.parse(JSON.stringify(ee));
//如果有开启近距离的话,同时距离优不一样了
@@ -325,10 +335,14 @@ Page({
var sw_arr = JSON.parse(swithc_list);
//---如果后台又开等级卡的开关---
if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
- th.setData({rank_switch: true});
+ th.setData({
+ rank_switch: true
+ });
//---回调卡的列表---
th.getPlusCardType(function (ob) {
- th.setData({card_list: ob.card_list});
+ th.setData({
+ card_list: ob.card_list
+ });
var user = getApp().globalData.userInfo;
if (!user) return false;
if (user.card_field && user['card_expiredate']) {
@@ -350,7 +364,7 @@ Page({
th.get_cart_val(e);
})
- }else{
+ } else {
//获取购物车的内容
th.get_cart_val(e);
}
@@ -359,9 +373,6 @@ Page({
})
}
-
-
-
},
onHide: function () {
@@ -386,33 +397,43 @@ Page({
data: req_data,
success: function (res) {
th.data.loading = 0;
- th.setData({is_get: 1})
+ th.setData({
+ is_get: 1
+ })
if (ut.ajax_ok(res)) {
th.data.page++;
var list = th.data.list;
- if(!list) list=[];
+ if (!list) list = [];
//当是下拉刷新的时候
- if(th.data.page>1 && th.data.cart_list){
+ if (th.data.page > 1 && th.data.cart_list) {
//下拉之后也要重新计算一下金额
- th.calc_more(res.data.data.pageData,function (list1) {
+ th.calc_more(res.data.data.pageData, function (list1) {
for (var i in list1) {
list.push(list1[i]);
}
- th.setData({list: list});
+ th.setData({
+ list: list
+ });
th.re_sum_price();
})
- }else{
+ } else {
for (var i in res.data.data.pageData) {
list.push(res.data.data.pageData[i]);
}
- th.setData({list: list});
+ th.setData({
+ list: list
+ });
if (res.data.data.total <= 10) {
- th.setData({no_more: 1});
+ th.setData({
+ no_more: 1
+ });
}
}
} else {
- th.setData({no_more: 1});
+ th.setData({
+ no_more: 1
+ });
}
}
})
@@ -428,34 +449,34 @@ Page({
*/
onShareAppMessage: function () {
var title = this.data.act.name;
- var url= "/packageB/pages/zuhegou/index/index?id="+this.data.act.id;
+ var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id;
if (getApp().globalData.user_id) {
url += "&first_leader=" + getApp().globalData.user_id;
}
var ob = {
- title:title,
+ title: title,
path: url,
};
- if(this.data.act.img_url)
- ob.imageUrl=this.data.iurl+this.data.act.img_url;
+ if (this.data.act.img_url)
+ ob.imageUrl = this.data.iurl + this.data.act.img_url;
return ob;
},
/**
* 用户分享朋友圈
*/
- onShareTimeline(){
+ onShareTimeline() {
var title = this.data.act.name;
- var url= "/packageB/pages/zuhegou/index/index?id="+this.data.act.id;
+ var url = "/packageB/pages/zuhegou/index/index?id=" + this.data.act.id;
if (getApp().globalData.user_id) {
url += "&first_leader=" + getApp().globalData.user_id;
}
var ob = {
- title:title,
+ title: title,
path: url,
};
- if(this.data.act.img_url)
- ob.imageUrl=this.data.iurl+this.data.act.img_url;
+ if (this.data.act.img_url)
+ ob.imageUrl = this.data.iurl + this.data.act.img_url;
return ob;
},
/**
@@ -505,7 +526,7 @@ Page({
this.data.sele_index = index;
let title = '';
self = this;
- th.data.s_cart_num=0;
+ th.data.s_cart_num = 0;
//说明是加入购物车是时候
this.data.is_zuhe_addcart = 1;
@@ -527,7 +548,7 @@ Page({
wx.showModal({
title: '温馨提示',
content: '该商品的物流配送方式和默认门店不匹配,是否要切换门店?',
- success (res) {
+ success(res) {
if (res.confirm) {
//物流的配送方式不一样
th.get_sto();
@@ -544,7 +565,9 @@ Page({
}
return false;
} else {
- th.setData({is_no_pipei: 0});
+ th.setData({
+ is_no_pipei: 0
+ });
th.check_is_in_cart(function () {
th.add_cart_func();
})
@@ -559,10 +582,10 @@ Page({
wx.showModal({
title: '温馨提示',
content: "确定取消该商品参与活动?",
- success (res) {
+ success(res) {
if (res.confirm) {
console.log('用户点击确定');
- if(th.data.sele_g.cart_num && th.data.sele_g.cart_num - th.data.sele_g.num>0){
+ if (th.data.sele_g.cart_num && th.data.sele_g.cart_num - th.data.sele_g.num > 0) {
var updata = {
id: th.data.sele_g.cart_id,
@@ -571,8 +594,8 @@ Page({
}
getApp().request.put("/api/weshop/cart/update", {
data: updata,
- success:function (rs) {
- if(rs.data.code==0) {
+ success: function (rs) {
+ if (rs.data.code == 0) {
title = '取消成功';
th.setData({
[txt1]: 0,
@@ -588,12 +611,12 @@ Page({
}
})
- }else{
- var url = '/api/weshop/cart/del/' + os.stoid + '/' + th.data.sele_g.cart_id;
- getApp().request.delete(url, {
- success:function (res) {
+ } else {
+ var url = '/api/weshop/cart/del/' + os.stoid + '/' + th.data.sele_g.cart_id;
+ getApp().request.delete(url, {
+ success: function (res) {
- if(res.data.code==0) {
+ if (res.data.code == 0) {
title = '取消成功';
th.setData({
[txt1]: 0,
@@ -635,14 +658,14 @@ Page({
return false;
}
- if(this.data.changing) return false;
- this.data.changing=1;
+ if (this.data.changing) return false;
+ this.data.changing = 1;
var index = e.currentTarget.dataset.index;
this.data.sele_g = this.data.list[index];
- this.data.sele_index=index;
+ this.data.sele_index = index;
th.data.goodsInputNum = this.data.sele_g.num + 1;
- if(this.data.sele_g.cart_num){
+ if (this.data.sele_g.cart_num) {
th.data.s_cart_num = this.data.sele_g.cart_num + 1;
}
th.add_cart_func();
@@ -661,7 +684,7 @@ Page({
var th = this;
var index = e.currentTarget.dataset.index;
var item = this.data.list[index];
- this.data.sele_g=item;
+ this.data.sele_g = item;
let num = item.num;
th.data.s_cart_num = item.cart_num - 1;
@@ -677,8 +700,8 @@ Page({
return false;
}
- if(th.data.changing) return false;
- th.data.changing=1;
+ if (th.data.changing) return false;
+ th.data.changing = 1;
th.data.sele_g = item;
th.data.sele_index = index;
th.data.goodsInputNum = check_num;
@@ -694,19 +717,19 @@ Page({
wx.showModal({
title: '温馨提示',
content: '确定取消该商品参与活动?',
- success (res) {
+ success(res) {
if (res.confirm) {
- if(th.data.s_cart_num){
+ if (th.data.s_cart_num) {
var updata = {
id: th.data.sele_g.cart_id,
- goods_num:th.data.s_cart_num ,
+ goods_num: th.data.s_cart_num,
store_id: os.stoid
}
getApp().request.put("/api/weshop/cart/update", {
data: updata,
- success:function (rs) {
- if(rs.data.code==0) {
+ success: function (rs) {
+ if (rs.data.code == 0) {
var title = '取消成功';
th.setData({
[txt1]: 0,
@@ -721,7 +744,7 @@ Page({
}
}
})
- }else {
+ } else {
var url = '/api/weshop/cart/del/' + os.stoid + '/' + item.cart_id;
getApp().request.delete(url, {
success: function (res) {
@@ -736,7 +759,7 @@ Page({
title: title,
icon: 'success',
});
- th.re_sum_price();//重新统计数量和总金额
+ th.re_sum_price(); //重新统计数量和总金额
}
}
});
@@ -911,11 +934,11 @@ Page({
//-- 加入购物的函数 --
add_cart_func: function () {
if (oo.user_id == null) {
- this.data.changing=0;
+ this.data.changing = 0;
return getApp().my_warnning("还未登录!", 0, this);
}
if (!getApp().globalData.userInfo) {
- this.data.changing=0;
+ this.data.changing = 0;
return getApp().my_warnning("还未登录!", 0, this);
}
@@ -933,16 +956,16 @@ Page({
title: '提示',
content: '超出商品限购'
});
- th.data.changing=0;
+ th.data.changing = 0;
return false;
}
- if(th.data.s_cart_num){
+ if (th.data.s_cart_num) {
if (th.data.s_cart_num + th.data.g_buy_num.get(th.data.sele_g.goods_id).gd_buynum > th.data.sele_g.viplimited) {
wx.showModal({
title: '提示',
content: '超出商品限购'
});
- th.data.changing=0;
+ th.data.changing = 0;
return false;
}
}
@@ -950,25 +973,27 @@ Page({
}
//---判断商品是否超出活动限购---
if (th.data.sele_g.buyqty > 0) {
- if (th.data.goodsInputNum+ th.data.g_buy_num.get(th.data.sele_g.goods_id).prom_buybum > th.data.sele_g.buyqty) {
+ if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id).prom_buybum > th.data.sele_g.buyqty) {
wx.showModal({
title: '提示',
content: '超出商品活动限购'
});
- th.data.changing=0;
+ th.data.changing = 0;
return false;
}
}
- if (th.data.goodsInputNum <= 0){
- this.data.changing=0;return s.my_warnning("商品数量不能为0", 0, th);
+ if (th.data.goodsInputNum <= 0) {
+ this.data.changing = 0;
+ return s.my_warnning("商品数量不能为0", 0, th);
}
if (th.data.sto_sele_name == null || th.data.sto_sele_name == undefined)
this.setData({
sto_sele_name: ""
});
if (th.data.sto_sele_name == "") {
- th.data.changing=0;return s.my_warnning("请选择门店", 0, th);
+ th.data.changing = 0;
+ return s.my_warnning("请选择门店", 0, th);
}
//--------------此时操作的数据------------
@@ -984,8 +1009,8 @@ Page({
goods_sn: o.goods_sn,
};
- if(th.data.s_cart_num){
- newd.goods_num=th.data.s_cart_num;
+ if (th.data.s_cart_num) {
+ newd.goods_num = th.data.s_cart_num;
}
//---是不是从收藏夹出来的---
@@ -1010,19 +1035,21 @@ Page({
if (newd.goods_id == getApp().globalData.room_goods_id) newd.room_id = getApp().globalData.room_id;
}
- if (o.store_count <= 0){
- th.data.changing=0;return getApp().my_warnning("库存已为空!", 0, th);
+ if (o.store_count <= 0) {
+ th.data.changing = 0;
+ return getApp().my_warnning("库存已为空!", 0, th);
}
- if (o.store_count < e.data.goodsInputNum){
- th.data.changing=0;return getApp().my_warnning("库存不足!", 0, th);
+ if (o.store_count < e.data.goodsInputNum) {
+ th.data.changing = 0;
+ return getApp().my_warnning("库存不足!", 0, th);
}
- th.add_cart_next(o, newd); //加入购物车下一步
+ th.add_cart_next(o, newd); //加入购物车下一步
})
},
//---加入购物车的最后一步---
- add_cart_next(o, newd){
+ add_cart_next(o, newd) {
var th = this;
//如果会员有等级价
if (th.data.card_field) {
@@ -1052,12 +1079,12 @@ Page({
th.data.adding = 0;
return getApp().my_warnning("库存不足!", 0, th);
}
- if (th.data.goodsInputNum+ th.data.g_buy_num.get(th.data.sele_g.goods_id).prom_buybum > o.buyqty && o.buyqty>0) {
+ if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id).prom_buybum > o.buyqty && o.buyqty > 0) {
th.data.adding = 0;
return getApp().my_warnning("超出商品活动限购!", 0, th);
}
- if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id).prom_buybum > th.data.sele_g.viplimited
- && th.data.sele_g.viplimited > 0
+ if (th.data.goodsInputNum + th.data.g_buy_num.get(th.data.sele_g.goods_id).prom_buybum > th.data.sele_g.viplimited &&
+ th.data.sele_g.viplimited > 0
) {
th.data.adding = 0;
return getApp().my_warnning("超出商品限购!", 0, th);
@@ -1071,13 +1098,13 @@ Page({
member_goods_price: newd.goods_price,
store_id: os.stoid,
};
- if(th.data.s_cart_num){
- updata.goods_num=th.data.s_cart_num;
+ if (th.data.s_cart_num) {
+ updata.goods_num = th.data.s_cart_num;
}
//---是不是从收藏夹出来的---
if (th.data.c_guide_id) {
updata['guide_id'] = th.data.c_guide_id;
- updata['guide_type'] = 3; //加入购物车之后就变成了3
+ updata['guide_type'] = 3; //加入购物车之后就变成了3
} else {
if (getApp().globalData.guide_id) {
updata['guide_id'] = getApp().globalData.guide_id;
@@ -1096,12 +1123,14 @@ Page({
th.data.adding = 0;
th.data.sele_store = 1;
- if(th.data.s_cart_num){
+ if (th.data.s_cart_num) {
var txt_temp = "list[" + index + "].cart_num";
- th.setData({[txt_temp]:th.data.s_cart_num})
+ th.setData({
+ [txt_temp]: th.data.s_cart_num
+ })
}
- th.re_sum_price();//重新统计数量和总金额
+ th.re_sum_price(); //重新统计数量和总金额
}
});
} else {
@@ -1121,7 +1150,7 @@ Page({
th.data.adding = 0;
th.data.sele_store = 1;
- th.re_sum_price();//重新统计数量和总金额
+ th.re_sum_price(); //重新统计数量和总金额
}
}
});
@@ -1182,14 +1211,17 @@ Page({
list.push(plusCard[i]);
}
- var ob = {"card_list": list, "name_map": card_name_map};
+ var ob = {
+ "card_list": list,
+ "name_map": card_name_map
+ };
func(ob);
})
},
//--- 设置一下默认库存的数量 ----
- set_def_storage(ee){
+ set_def_storage(ee) {
var that = this;
that.data.fir_def_store = ee;
that.setData({
@@ -1206,8 +1238,8 @@ Page({
this.waitfor2(15, 'is_get_local_ok', function () {
//if (!th.data.sele_g) return false;
var dd = null;
- var g_distr_type =0;
- if(th.data.sele_g) g_distr_type=th.data.sele_g.distr_type;
+ var g_distr_type = 0;
+ if (th.data.sele_g) g_distr_type = th.data.sele_g.distr_type;
if (g_distr_type != 0) {
dd = {
store_id: os.stoid,
@@ -1233,7 +1265,9 @@ Page({
//如果会员是有默认的门店话
if (!th.data.def_pick_store && th.data.fir_def_store) {
- th.setData({def_pick_store: th.data.fir_def_store});
+ th.setData({
+ def_pick_store: th.data.fir_def_store
+ });
}
wx.showLoading({
@@ -1246,14 +1280,15 @@ Page({
var e = res;
if (e.data.code == 0 && e.data.data && e.data.data.pageData && e.data.data.pageData.length > 0) {
- var his_cate_num=0;
- for(let i in e.data.data.pageData){
- let item=e.data.data.pageData[i];
- if(item.category_id>0){
- his_cate_num=1;break;
+ var his_cate_num = 0;
+ for (let i in e.data.data.pageData) {
+ let item = e.data.data.pageData[i];
+ if (item.category_id > 0) {
+ his_cate_num = 1;
+ break;
}
}
- e.his_cate_num=his_cate_num;
+ e.his_cate_num = his_cate_num;
//如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
if (dd.lat && (!th.data.def_pick_store || JSON.stringify(th.data.def_pick_store) == '{}') && th.data.bconfig && th.data.bconfig.is_sort_storage) {
@@ -1277,14 +1312,16 @@ Page({
e.data.data.pageData.splice(0, 0, th.data.def_pick_store); //添加
}
- th.setData({all_pick_list: e.data.data.pageData});
+ th.setData({
+ all_pick_list: e.data.data.pageData
+ });
th.deal_pickup(e);
}
})
})
},
//------------处理门店---------------
- deal_pickup(e){
+ deal_pickup(e) {
var th = this;
wx.hideLoading();
//单总量超出5个的时候
@@ -1299,12 +1336,13 @@ Page({
success: function (ee) {
if (ee.data.code == 0) {
- var check_all_cate=0;
- if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0){
- for(let i in ee.data.data.pageData){
- let item=ee.data.data.pageData[i];
- if(item.is_show==1){
- check_all_cate=1;break
+ var check_all_cate = 0;
+ if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
+ for (let i in ee.data.data.pageData) {
+ let item = ee.data.data.pageData[i];
+ if (item.is_show == 1) {
+ check_all_cate = 1;
+ break
}
}
}
@@ -1316,12 +1354,14 @@ Page({
var newarr = new Array();
var qita = new Array();
- var is_del_pk=0;
+ var is_del_pk = 0;
//----要进行门店分组--------
for (var i = 0; i < sto_arr.length; i++) {
//找一下这个门店有没有在分类数组内
- var find2 = 0, find2name = "", sort = 0;
- is_del_pk=0;
+ var find2 = 0,
+ find2name = "",
+ sort = 0;
+ is_del_pk = 0;
for (var m = 0; m < sto_cate.length; m++) {
if (sto_arr[i].category_id == sto_cate[m].cat_id) {
if (sto_cate[m].is_show != 1) {
@@ -1337,7 +1377,7 @@ Page({
break;
}
}
- if(is_del_pk) continue;
+ if (is_del_pk) continue;
if (newarr.length > 0) {
var find = 0;
@@ -1416,13 +1456,13 @@ Page({
}
- var sd={
+ var sd = {
all_sto: newarr,
- is_show_sto_cat:1
+ is_show_sto_cat: 1
}
- if(!sto_arr || sto_arr.length<=10){
- sd.is_show_sto_cat=-1;
- sd.only_pk=sto_arr;
+ if (!sto_arr || sto_arr.length <= 10) {
+ sd.is_show_sto_cat = -1;
+ sd.only_pk = sto_arr;
}
th.setData(sd);
@@ -1433,7 +1473,9 @@ Page({
});
//-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
if (!th.data.def_pick_store) {
- th.setData({def_pick_store: e.data.data.pageData[0]})
+ th.setData({
+ def_pick_store: e.data.data.pageData[0]
+ })
}
}
} else {
@@ -1443,7 +1485,9 @@ Page({
});
//-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
if (!th.data.def_pick_store) {
- th.setData({def_pick_store: e.data.data.pageData[0]})
+ th.setData({
+ def_pick_store: e.data.data.pageData[0]
+ })
}
}
}
@@ -1508,7 +1552,7 @@ Page({
}
//判断门店的配送方式是不是匹配
- var g_distr_type=0;
+ var g_distr_type = 0;
if (th.data.sele_g)
g_distr_type = th.data.sele_g.distr_type;
if (item.distr_type != 0 && g_distr_type != 0 && item.distr_type != g_distr_type) {
@@ -1609,7 +1653,7 @@ Page({
sto_sele_distr: item.distr_type,
store: 0,
choice_sort_store: 0,
- sort_store: 0, //关闭门店2级
+ sort_store: 0, //关闭门店2级
});
th.add_cart_func();
@@ -1643,7 +1687,8 @@ Page({
//-------------获取购买数量的总函数----------------
get_buy_num: function (gd, func) {
var map = this.data.g_buy_num,
- th = this, user_id = getApp().globalData.user_id;
+ th = this,
+ user_id = getApp().globalData.user_id;
if (user_id == null) {
getApp().goto("/pages/togoin/togoin");
@@ -1652,7 +1697,7 @@ Page({
if (map && map.has(gd.goods_id)) {
"function" == typeof func && func();
} else {
- var res1=null;
+ var res1 = null;
//----获取商品购买数----
getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
data: {
@@ -1662,9 +1707,9 @@ Page({
prom_type: 7,
prom_id: th.data.act.id
},
- }).then(res2=>{
- var g_buy_num=0;
- var promgoodsbuynum=0;
+ }).then(res2 => {
+ var g_buy_num = 0;
+ var promgoodsbuynum = 0;
if (res2.data.code == 0) {
var buy_num_data = res2.data.data;
if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;
@@ -1672,9 +1717,9 @@ Page({
}
if (!map) map = new Map();
- var ob={
- gd_buynum:g_buy_num,
- prom_buybum:promgoodsbuynum,
+ var ob = {
+ gd_buynum: g_buy_num,
+ prom_buybum: promgoodsbuynum,
}
map.set(gd.goods_id, ob);
th.setData({
@@ -1686,7 +1731,7 @@ Page({
},
//-- 当是减数量的调用 --
- sub_updata_cart(){
+ sub_updata_cart() {
var th = this;
var index = this.data.sele_index;
var txt = "list[" + index + "].haveAdded";
@@ -1704,14 +1749,14 @@ Page({
store_id: os.stoid,
};
- if(th.data.s_cart_num){
- updata.goods_num=th.data.s_cart_num;
+ if (th.data.s_cart_num) {
+ updata.goods_num = th.data.s_cart_num;
}
//---是不是从收藏夹出来的---
if (th.data.c_guide_id) {
updata['guide_id'] = th.data.c_guide_id;
- updata['guide_type'] = 3; //加入购物车之后就变成了3
+ updata['guide_type'] = 3; //加入购物车之后就变成了3
} else {
if (getApp().globalData.guide_id) {
updata['guide_id'] = getApp().globalData.guide_id;
@@ -1729,12 +1774,14 @@ Page({
});
th.data.adding = 0;
th.data.sele_store = 1;
- if(th.data.s_cart_num){
+ if (th.data.s_cart_num) {
var txt_temp = "list[" + index + "].cart_num";
- th.setData({[txt_temp]:th.data.s_cart_num})
+ th.setData({
+ [txt_temp]: th.data.s_cart_num
+ })
}
- th.re_sum_price();//重新统计数量和总金额
+ th.re_sum_price(); //重新统计数量和总金额
}
});
},
@@ -1776,24 +1823,24 @@ Page({
success: function (re) {
if (re.data.data.total > 0) {
var item = re.data.data.pageData[0];
- th.get_buy_num(th.data.sele_g,function () {
+ th.get_buy_num(th.data.sele_g, function () {
//当前的价格要更新进去
var cur_price = th.data.sele_g.shop_price;
if (th.data.card_field && th.data.sele_g[th.data.card_field]) {
cur_price = th.data.sele_g[th.data.card_field];
}
- var prom_buybum=0;
- var gd_buynum=0;
+ var prom_buybum = 0;
+ var gd_buynum = 0;
//加入也要控制一下限购
- var check_obj=th.data.g_buy_num.get(th.data.sele_g.goods_id);
- if(check_obj.gd_buynum && check_obj.gd_buynum>0) gd_buynum=check_obj.gd_buynum;
- if(check_obj.prom_buybum && check_obj.prom_buybum>0) prom_buybum=check_obj.prom_buybum;
-
- if(check_obj){
- if(check_obj.prom_buybum && check_obj.prom_buybum>=th.data.sele_g.buyqty &&
- th.data.sele_g.buyqty>0
- ){
+ var check_obj = th.data.g_buy_num.get(th.data.sele_g.goods_id);
+ if (check_obj.gd_buynum && check_obj.gd_buynum > 0) gd_buynum = check_obj.gd_buynum;
+ if (check_obj.prom_buybum && check_obj.prom_buybum > 0) prom_buybum = check_obj.prom_buybum;
+
+ if (check_obj) {
+ if (check_obj.prom_buybum && check_obj.prom_buybum >= th.data.sele_g.buyqty &&
+ th.data.sele_g.buyqty > 0
+ ) {
wx.showToast({
title: "您的已购数量超出活动的限购",
icon: 'none',
@@ -1801,9 +1848,9 @@ Page({
});
return false;
}
- if(check_obj.gd_buynum && check_obj.gd_buynum>=th.data.sele_g.viplimited &&
- th.data.sele_g.viplimited>0
- ){
+ if (check_obj.gd_buynum && check_obj.gd_buynum >= th.data.sele_g.viplimited &&
+ th.data.sele_g.viplimited > 0
+ ) {
wx.showToast({
title: "您的已购数量超出商品的限购",
icon: 'none',
@@ -1813,17 +1860,17 @@ Page({
}
}
- item.cbuy='no';
- var cbuy=th.data.sele_g.viplimited>0?th.data.sele_g.viplimited-gd_buynum:'no';
- if(cbuy!='no') item.cbuy=cbuy;
- var cbuy2=th.data.sele_g.buyqty>0?th.data.sele_g.buyqty-prom_buybum:'no';
- if(cbuy2!='no'){
- if(item.cbuy=='no' || item.cbuy>cbuy2) item.cbuy=cbuy2;
+ item.cbuy = 'no';
+ var cbuy = th.data.sele_g.viplimited > 0 ? th.data.sele_g.viplimited - gd_buynum : 'no';
+ if (cbuy != 'no') item.cbuy = cbuy;
+ var cbuy2 = th.data.sele_g.buyqty > 0 ? th.data.sele_g.buyqty - prom_buybum : 'no';
+ if (cbuy2 != 'no') {
+ if (item.cbuy == 'no' || item.cbuy > cbuy2) item.cbuy = cbuy2;
}
- var num=item.goods_num;
- if(item.cbuy>-1 && item.cbuy -1 && item.cbuy < item.goods_num) {
+ num = item.cbuy;
}
th.setData({
[txt1]: num,
@@ -1848,11 +1895,10 @@ Page({
getApp().request.put("/api/weshop/cart/update", {
data: updata,
- success: function (t) {
- }
+ success: function (t) {}
});
th.re_sum_price();
- })
+ })
} else {
func();
@@ -1863,12 +1909,12 @@ Page({
//-- 计算统计之后的金额 --
re_sum_price: function () {
- var all_num = 0; //商品数量之和
+ var all_num = 0; //商品数量之和
var all_price = 0;
var need_to_buy = 0;
var data = this.data.list;
- var all_zhqty = 0; //所有商品要求起购数之后
-
+ var all_zhqty = 0; //所有商品要求起购数之后
+ var zhqty_bz=[]; //超量
var no_in_arr = [];
for (var i in data) {
var item = data[i];
@@ -1877,18 +1923,25 @@ Page({
all_price += item.num * item.current_price;
//当有起购数的控制的时候
if (item.zhqty) {
+ zhqty_bz.push(item);
all_zhqty += item.zhqty;
if (item.num < item.zhqty) {
need_to_buy += item.zhqty - item.num;
}
if (item.num > item.zhqty) {
for (var i = 0; i < item.num - item.zhqty; i++) {
- no_in_arr.push({price: item.current_price,goods_id:item.goods_id});
+ no_in_arr.push({
+ price: item.current_price,
+ goods_id: item.goods_id
+ });
}
}
} else {
for (var j = 0; j < item.num; j++) {
- no_in_arr.push({price: item.current_price,goods_id:item.goods_id});
+ no_in_arr.push({
+ price: item.current_price,
+ goods_id: item.goods_id
+ });
}
}
} else {
@@ -1901,23 +1954,49 @@ Page({
function sortData(a, b) {
return a.price - b.price
}
- if(no_in_arr.length) no_in_arr.sort(sortData);
+ if (no_in_arr.length) no_in_arr.sort(sortData);
var aprice = this.data.act.zhprice;
if (this.data.act.zhbuyqty > all_zhqty) {
- for (var n = 0; n < this.data.act.zhbuyqty-all_zhqty; n++) {
+ for (var n = 0; n < this.data.act.zhbuyqty - all_zhqty; n++) {
no_in_arr.pop();
}
}
//看一下剩下的数量有没有满足组合购的要求,以及要不要倍增
if (this.data.act.is_bz && no_in_arr.length >= this.data.act.zhbuyqty) {
- //看一下是几倍
+ let zhqty_map=new map();
+ //看一下是几倍
var be = parseInt(no_in_arr.length / this.data.act.zhbuyqty);
- aprice += be * aprice;
- for (var m = 0; m < be * this.data.act.zhbuyqty; m++) {
- no_in_arr.pop();
+ if(this.data.act.is_bzyh && zhqty_bz.length > 0 ){
+ for(let i=0;i 0) {
- item_j.current_price=card_price;
+ item_j.current_price = card_price;
}
}
- if(map[item_j.goods_id]){
- var cart_num=map[item_j.goods_id].goods_num;
- item_j.num=cart_num;
- item_j.cart_num=cart_num;
- item_j.cart_id=map[item_j.goods_id].id;
- if(item_j.buyqty>0){
- var g_buy_num=0;
- var promgoodsbuynum=0;
- //----获取商品购买数----
- await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
- data: {
- store_id: os.stoid,
- user_id: user_id,
- goods_id: item_j.goods_id,
- prom_type: 7,
- prom_id: th.data.act.id
- },
- }).then(res2=>{
- if (res2.data.code == 0) {
- var buy_num_data = res2.data.data;
- if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;
- g_buy_num = buy_num_data.goodsbuynum;
- }
- })
-
- if(item_j.viplimited>0){
- var cby=item_j.viplimited-g_buy_num;
- if(cby<=0) continue;//不能买就continue下一个
- item_j.num=cby>item_j.num?item_j.num:cby;
- }
- if(item_j.buyqty>0){
- var cby=item_j.buyqty-promgoodsbuynum;
- if(cby<=0) continue;//不能买就continue下一个
- item_j.num=cby>item_j.num?item_j.num:cby;
- }
- }
-
- item_j.haveAdded=1;
- item_j.showNum=true;
+ if (map[item_j.goods_id]) {
+ var cart_num = map[item_j.goods_id].goods_num;
+ item_j.num = cart_num;
+ item_j.cart_num = cart_num;
+ item_j.cart_id = map[item_j.goods_id].id;
+ if (item_j.buyqty > 0) {
+ var g_buy_num = 0;
+ var promgoodsbuynum = 0;
+ //----获取商品购买数----
+ await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
+ data: {
+ store_id: os.stoid,
+ user_id: user_id,
+ goods_id: item_j.goods_id,
+ prom_type: 7,
+ prom_id: th.data.act.id
+ },
+ }).then(res2 => {
+ if (res2.data.code == 0) {
+ var buy_num_data = res2.data.data;
+ if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;
+ g_buy_num = buy_num_data.goodsbuynum;
+ }
+ })
+
+ if (item_j.viplimited > 0) {
+ var cby = item_j.viplimited - g_buy_num;
+ if (cby <= 0) continue; //不能买就continue下一个
+ item_j.num = cby > item_j.num ? item_j.num : cby;
+ }
+ if (item_j.buyqty > 0) {
+ var cby = item_j.buyqty - promgoodsbuynum;
+ if (cby <= 0) continue; //不能买就continue下一个
+ item_j.num = cby > item_j.num ? item_j.num : cby;
+ }
+ }
+
+ item_j.haveAdded = 1;
+ item_j.showNum = true;
}
}
- th.setData({list:th.data.list});
+ th.setData({
+ list: th.data.list
+ });
th.re_sum_price();
}
- }
- });
+ }
+ });
},
//滚动加载跟多的时候的计算
- async calc_more(list,func){
- var th=this;
- var map={};
- var mlist=this.data.cart_list;
- for(let i in mlist){
- let item=mlist[i];
- if(item.prom_type!=7) continue;
- if(item.prom_id!=th.data.act.id) continue;
- map[item.goods_id]=item;
+ async calc_more(list, func) {
+ var th = this;
+ var map = {};
+ var mlist = this.data.cart_list;
+ for (let i in mlist) {
+ let item = mlist[i];
+ if (item.prom_type != 7) continue;
+ if (item.prom_id != th.data.act.id) continue;
+ map[item.goods_id] = item;
}
- for(let j in list){
- let item_j=list[j];
- item_j.current_price=item_j.shop_price;
+ for (let j in list) {
+ let item_j = list[j];
+ item_j.current_price = item_j.shop_price;
- var card_price=0;
+ var card_price = 0;
//如果会员有等级价
if (th.data.card_field) {
card_price = item_j[th.data.card_field];
if (card_price > 0) {
- item_j.current_price=card_price;
+ item_j.current_price = card_price;
}
}
- if(map[item_j.goods_id]){
- var cart_num=map[item_j.goods_id].goods_num;
- item_j.num=cart_num;
- item_j.cart_num=cart_num;
- item_j.cart_id=map[item_j.goods_id].id;
- if(item_j.buyqty>0){
- var g_buy_num=0;
- var promgoodsbuynum=0;
+ if (map[item_j.goods_id]) {
+ var cart_num = map[item_j.goods_id].goods_num;
+ item_j.num = cart_num;
+ item_j.cart_num = cart_num;
+ item_j.cart_id = map[item_j.goods_id].id;
+ if (item_j.buyqty > 0) {
+ var g_buy_num = 0;
+ var promgoodsbuynum = 0;
//----获取商品购买数----
await getApp().request.promiseGet("/api/weshop/ordergoods/getUserBuyGoodsNum", {
data: {
@@ -2078,7 +2159,7 @@ Page({
prom_type: 7,
prom_id: th.data.act.id
},
- }).then(res2=>{
+ }).then(res2 => {
if (res2.data.code == 0) {
var buy_num_data = res2.data.data;
if (buy_num_data.promgoodsbuynum) promgoodsbuynum = buy_num_data.promgoodsbuynum;
@@ -2086,23 +2167,23 @@ Page({
}
})
- if(item_j.viplimited>0){
- var cby=item_j.viplimited-g_buy_num;
- if(cby<=0) continue;//不能买就continue下一个
- item_j.num=cby>item_j.num?item_j.num:cby;
+ if (item_j.viplimited > 0) {
+ var cby = item_j.viplimited - g_buy_num;
+ if (cby <= 0) continue; //不能买就continue下一个
+ item_j.num = cby > item_j.num ? item_j.num : cby;
}
- if(item_j.buyqty>0){
- var cby=item_j.buyqty-promgoodsbuynum;
- if(cby<=0) continue;//不能买就continue下一个
- item_j.num=cby>item_j.num?item_j.num:cby;
+ if (item_j.buyqty > 0) {
+ var cby = item_j.buyqty - promgoodsbuynum;
+ if (cby <= 0) continue; //不能买就continue下一个
+ item_j.num = cby > item_j.num ? item_j.num : cby;
}
}
- item_j.haveAdded=1;
- item_j.showNum=true;
+ item_j.haveAdded = 1;
+ item_j.showNum = true;
}
}
- if(func) func(list)
+ if (func) func(list)
}
diff --git a/packageB/pages/zuhegou/list/list.wxml b/packageB/pages/zuhegou/list/list.wxml
index d0b8c7e..f58b305 100644
--- a/packageB/pages/zuhegou/list/list.wxml
+++ b/packageB/pages/zuhegou/list/list.wxml
@@ -23,15 +23,12 @@
-
-
-
@@ -57,52 +54,12 @@
¥
{{item.zhprice}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
没有相关内容
@@ -124,6 +81,4 @@
-
-
diff --git a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
index 6fbbaae..7e4956c 100644
--- a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
+++ b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
@@ -1272,9 +1272,10 @@ Page({
var all_cutprice = 0; //所有的优惠减
var all_zh_cutprice = 0; //所有的组合优惠减
var all_order_prom = 0; //所有的订单优惠
-
+ var out_of_weight=0; //超出多少重量
var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0);
var freight_free = ee.freight_free; //全场满多少包邮
+ var weight_free = ee.weight_free; //多少kg内包邮
var no_ex_id = ee.no_ex_id;
var no_ex_good = null;
var by_qc = {};
@@ -1371,6 +1372,16 @@ Page({
o_price_no_zh += item[j].goods_price * item[j].goods_num;
}
o_price += item[j].goods_price * item[j].goods_num;
+
+ //判断是否有设置限制重量包邮
+ if(weight_free){
+ if( item[j]['exp_sum_type']==2 ){
+ if (goods_weight < 0) goods_weight = 0;
+ //累积商品重量 每种商品的重量 * 数量
+ goods_weight += item[j]['weight'] * item[j]['goods_num'];
+ out_of_weight = (weight_free*1000) - goods_weight;
+ }
+ }
}
//判断是不是有组合购的金额
var f_o_price = o_price;
@@ -1410,7 +1421,7 @@ Page({
//--有不包邮区域,且不免运费,全场的计算,要减到优惠金额 和券的金额--
- if (no_ex_id && freight_free > 0 && (o_price - quan_price) >= freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list)) {
+ if (no_ex_id && freight_free > 0 && (o_price - quan_price) >= freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list) && out_of_weight > 0) {
//如果有设置不包邮区域的时候
if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) {
if (th.check_by_area(by_qc.region_list)) {
@@ -1533,13 +1544,13 @@ Page({
//统一运费
o_shipping_price += item[j]['uniform_exp_sum'];
break;
- case 2:
- +''
- if (goods_weight < 0) goods_weight = 0;
- //累积商品重量 每种商品的重量 * 数量
- goods_weight += item[j]['weight'] * item[j]['goods_num'];
-
- break;
+ // case 2: //1464行已计算 不必重复计算 注释为:判断是否有设置限制重量包邮
+ // +''
+ // if (goods_weight < 0) goods_weight = 0;
+ // //累积商品重量 每种商品的重量 * 数量
+ // goods_weight += item[j]['weight'] * item[j]['goods_num'];
+ // out_of_weight = (weight_free*1000) - goods_weight;
+ // break;
case 3:
if (goods_piece < 0) goods_piece = 0;
//累积商品数量
@@ -1548,6 +1559,11 @@ Page({
}
}
+ }else{
+ if(goods_weight && out_of_weight !== 0){
+ goods_weight=-1;
+ out_of_weight=0;
+ }
}
}
@@ -1558,7 +1574,7 @@ Page({
if (th.data.wu_arr && th.data.wu_arr[cart_item.wind])
code = th.data.wu_arr[cart_item.wind].code;
cart_item.shipping_price =
- th.calculatewuliu(code, o_shipping_price, goods_weight,
+ th.calculatewuliu(code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, th.data.user_addr, freight_free, o_price - quan_price, rs);
if (!th.data.using_quan[pickid] || th.data.using_quan[pickid].isby != 1) {
@@ -1777,7 +1793,10 @@ Page({
to.getwuliuprice(async function (rs) {
var o_shipping_price = 0, goods_weight = -1, goods_piece = -1;
-
+ var out_of_weight=null; //超出多少重量
+ var freight_free = ee.freight_free; //全场满多少包邮
+ var weight_free = ee.weight_free; //多少kg内包邮
+ var no_ex_id = ee.no_ex_id;
//---如果有选择优惠券的情况下---
var quan_price = 0, bn_pick = th.data.bn_pick;
var quan_no = null;
@@ -1844,6 +1863,7 @@ Page({
if (goods_weight < 0) goods_weight = 0;
//累积商品重量 每种商品的重量 * 数量
goods_weight += good['weight'] * good['buynum'];
+ out_of_weight = (weight_free * 1000 ) - goods_weight;
break;
case 3:
if (goods_piece < 0) goods_piece = 0;
@@ -1854,8 +1874,7 @@ Page({
var code = "";
if (th.data.wu_arr && th.data.wu_arr[th.data.index]) code = th.data.wu_arr[th.data.index].code;
- var freight_free = ee.freight_free; //全场满多少包邮
- var no_ex_id = ee.no_ex_id;
+
th.data.is_no_by[th.data.bn_pick] = 0;
var no_by_data = null;
@@ -1891,12 +1910,12 @@ Page({
th.data.is_by[th.data.bn_pick] = 0;
//--------------开始计算物流------------------
var shipping_price =
- th.calculatewuliu(code, o_shipping_price, goods_weight,
+ th.calculatewuliu(code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, th.data.user_addr, freight_free, parseFloat(allpice) - cut_price - quan_price, rs);
//如果有赠品的时候,也要计算赠品的物流费用
if (th.data.buy_now_gift_goods) {
- shipping_price = th.get_now_gift_goods_wuliu(code, o_shipping_price, th.data.user_addr, gift_freight_free,
+ shipping_price = th.get_now_gift_goods_wuliu(code, o_shipping_price, th.data.user_addr, gift_freight_free,out_of_weight,
parseFloat(allpice) - cut_price - quan_price, rs, shipping_price, no_by_data, goods_weight, goods_piece);
}
@@ -2832,12 +2851,12 @@ Page({
th.calculatePrice();
},
//-------------------计算物流---------------
- calculatewuliu: function (code, o_shipping_price, goods_weight,
+ calculatewuliu: function (code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, user_addr, freight_free, o_price, rs) {
var price = 0, th = this;
price += parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price >= freight_free) {
+ if (freight_free > 0 && o_price >= freight_free && out_of_weight > 0) {
return 0;
}
if (user_addr == null) {
@@ -2855,7 +2874,7 @@ Page({
item = item.config;
if (item == null) return o_shipping_price;
//------按重量----------
- if (goods_weight >= 0 && item['money']) {
+ if (goods_weight >= 0 && item['money'] && out_of_weight > 0) {
fw_price = parseFloat(item['money']);
if (goods_weight > item['first_weight']) {
var fw = goods_weight - item['first_weight'];
@@ -2863,6 +2882,13 @@ Page({
fw_price = fw_price + n * parseFloat(item['add_money']);
}
}
+ //------超出重量----------
+ if(out_of_weight < 0){
+ fw_price = parseFloat(item['money']);
+ var out_of_weight = Math.abs(out_of_weight);
+ var n = Math.ceil(out_of_weight / item['second_weight'])
+ fw_price = fw_price + n * parseFloat(item['add_money']);
+ }
//------按件数----------
if (goods_piece > 0 && item['piecemoney']) {
fp_price = parseFloat(item['piecemoney']);
@@ -3718,7 +3744,7 @@ Page({
},
//计算立即购买赠品的物流费用
- get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
+ get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free,gift_weight_free, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
var good = this.data.buy_now_gift_goods;
var goods_weight = -1, goods_piece = -1;
var gift_shipping_price = 0;
@@ -3735,6 +3761,7 @@ Page({
goods_weight += good['weight'] * good['buynum'];
if (goods_weight1 > 0) {
goods_weight += goods_weight1;
+ out_of_weight = (gift_weight_free*1000) - goods_weight;
}
break;
case 3:
diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
index f568ee8..79d7362 100644
--- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
+++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -1042,7 +1042,7 @@ Page({
th = this;
price += parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price > freight_free) {
+ if (freight_free > 0 && o_price >= freight_free) {
return 0;
}
if (user_addr == null) {
diff --git a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
index 36bcc17..2085de5 100644
--- a/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
+++ b/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -5474,7 +5474,7 @@ Page({
this.setData({
store: 1,
openSpecModal: !1,
- openSpecModal_pt: !1
+ openSpecModal_pt: 1
})
}
},
@@ -5672,6 +5672,7 @@ Page({
}
else {
th.setData({
+ // openSpecModal_pt: 1,
store: 0,
choice_sort_store: 0,
sort_store: 0
diff --git a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
index d6c761b..84762b1 100644
--- a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
+++ b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
@@ -531,6 +531,7 @@ Page({
check_more_order:async function(item){
var pickup=null,th=this;
var user_id=getApp().globalData.userInfo.user_id;
+ if(!user_id) user_id=0;
wx.showLoading();
//--------获取门店-----------
await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + item.pickup_id, {
@@ -617,7 +618,7 @@ Page({
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:g_item.store_id,goodsidlist:g_item.goods_id,is_detail:1
+ store_id:g_item.store_id,goodsidlist:g_item.goods_id,is_detail:1,user_id:user_id
};
await getApp().request.promiseGet(url, {data:req_data}).then(res=>{
if(res.data.code==0){
diff --git a/packageC/pages/presell/cart/cart2.js b/packageC/pages/presell/cart/cart2.js
index 150f762..0572787 100644
--- a/packageC/pages/presell/cart/cart2.js
+++ b/packageC/pages/presell/cart/cart2.js
@@ -612,7 +612,10 @@ Page({
to.getwuliuprice(async function (rs) {
var o_shipping_price = 0, goods_weight = -1, goods_piece = -1;
-
+ var out_of_weight=null; //超出多少重量
+ var freight_free = ee.freight_free; //全场满多少包邮
+ var weight_free = ee.weight_free; //多少kg内包邮
+ var no_ex_id = ee.no_ex_id;
//---如果有选择优惠券的情况下---
var quan_price = 0, bn_pick = th.data.bn_pick;
var quan_no = null;
@@ -679,6 +682,7 @@ Page({
if (goods_weight < 0) goods_weight = 0;
//累积商品重量 每种商品的重量 * 数量
goods_weight += good['weight'] * good['buynum'];
+ out_of_weight = (weight_free * 1000 ) - goods_weight;
break;
case 3:
if (goods_piece < 0) goods_piece = 0;
@@ -689,8 +693,7 @@ Page({
var code = "";
if (th.data.wu_arr && th.data.wu_arr[th.data.index]) code = th.data.wu_arr[th.data.index].code;
- var freight_free = ee.freight_free; //全场满多少包邮
- var no_ex_id = ee.no_ex_id;
+
th.data.is_no_by[th.data.bn_pick] = 0;
var no_by_data = null;
@@ -726,12 +729,12 @@ Page({
th.data.is_by[th.data.bn_pick] = 0;
//--------------开始计算物流------------------
var shipping_price =
- th.calculatewuliu(code, o_shipping_price, goods_weight,
+ th.calculatewuliu(code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, th.data.user_addr, freight_free, parseFloat(allpice) - cut_price - quan_price, rs);
//如果有赠品的时候,也要计算赠品的物流费用
if (th.data.buy_now_gift_goods) {
- shipping_price = th.get_now_gift_goods_wuliu(code, o_shipping_price, th.data.user_addr, gift_freight_free,
+ shipping_price = th.get_now_gift_goods_wuliu(code, o_shipping_price, th.data.user_addr, gift_freight_free,gift_weight_free,
parseFloat(allpice) - cut_price - quan_price, rs, shipping_price, no_by_data, goods_weight, goods_piece);
}
@@ -1665,12 +1668,12 @@ Page({
th.calculatePrice();
},
//-------------------计算物流---------------
- calculatewuliu: function (code, o_shipping_price, goods_weight,
+ calculatewuliu: function (code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, user_addr, freight_free, o_price, rs) {
var price = 0, th = this;
price += parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price >= freight_free) {
+ if (freight_free > 0 && o_price >= freight_free && out_of_weight > 0) {
return 0;
}
if (user_addr == null) {
@@ -1688,7 +1691,7 @@ Page({
item = item.config;
if (item == null) return o_shipping_price;
//------按重量----------
- if (goods_weight >= 0 && item['money']) {
+ if (goods_weight >= 0 && item['money'] && out_of_weight > 0) {
fw_price = parseFloat(item['money']);
if (goods_weight > item['first_weight']) {
var fw = goods_weight - item['first_weight'];
@@ -1696,6 +1699,14 @@ Page({
fw_price = fw_price + n * parseFloat(item['add_money']);
}
}
+
+ //------超出重量----------
+ if(out_of_weight < 0){
+ fw_price = parseFloat(item['money']);
+ var out_of_weight = Math.abs(out_of_weight);
+ var n = Math.ceil(out_of_weight / item['second_weight'])
+ fw_price = fw_price + n * parseFloat(item['add_money']);
+ }
//------按件数----------
if (goods_piece > 0 && item['piecemoney']) {
fp_price = parseFloat(item['piecemoney']);
@@ -2527,7 +2538,7 @@ Page({
},
//计算立即购买赠品的物流费用
- get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
+ get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free,gift_weight_free, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
var good = this.data.buy_now_gift_goods;
var goods_weight = -1, goods_piece = -1;
var gift_shipping_price = 0;
@@ -2544,6 +2555,7 @@ Page({
goods_weight += good['weight'] * good['buynum'];
if (goods_weight1 > 0) {
goods_weight += goods_weight1;
+ out_of_weight = (gift_weight_free*1000) - goods_weight;
}
break;
case 3:
diff --git a/packageC/pages/presell/cart/cart2_pre.js b/packageC/pages/presell/cart/cart2_pre.js
index ec01b55..39a3410 100644
--- a/packageC/pages/presell/cart/cart2_pre.js
+++ b/packageC/pages/presell/cart/cart2_pre.js
@@ -706,7 +706,7 @@ Page({
var price =0,th=this;
price +=parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price > freight_free){ return 0;}
+ if (freight_free > 0 && o_price >= freight_free){ return 0;}
if (user_addr==null) { return 0; }
//计算物流的config item;
var item=null;
diff --git a/packageC/pages/presell/goodsInfo/goodsInfo.wxml b/packageC/pages/presell/goodsInfo/goodsInfo.wxml
index b5d9f66..10c8c60 100644
--- a/packageC/pages/presell/goodsInfo/goodsInfo.wxml
+++ b/packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -16,6 +16,22 @@
+
+
+
+
+
+
+
+
+
+
+ abson下单成功
+
+
+
+
+
diff --git a/pages/activity/pind_list/pind_list.js b/pages/activity/pind_list/pind_list.js
index 254970d..82fb069 100644
--- a/pages/activity/pind_list/pind_list.js
+++ b/pages/activity/pind_list/pind_list.js
@@ -1,95 +1,109 @@
-var e = getApp(),
-i = e.request,
- a = e.globalData.setting,
- os=a,ut = require("../../../utils/util.js");
+var e = getApp(),
+ i = e.request,
+ a = e.globalData.setting,
+ os = a,
+ ut = require("../../../utils/util.js");
var regeneratorRuntime = require('../../../utils/runtime.js');
-Page({
- data: {
- url: a.imghost,
- killtime: null,
- currentPage: 1,
- goodlist: null,
- type:1,
- timer:null,
- ismore:1,
- isshow:0,
- iurl: os.imghost,
- ad_data:null,
- max_sw_height:200,
- },
-
- //------初始化加载----------
- onLoad: function(t) {
- wx.setNavigationBarTitle({ title: "天天拼单",})
- var first_leader = t.first_leader;
- var th=this;
-
- console.log("------------");
- console.log(first_leader);
- getApp().getConfig();
-
- if (first_leader) {
- getApp().globalData.first_leader = first_leader;
- //调用接口判断是不是会员
- getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
- if (res.data.code == 0) {
- getApp().globalData.guide_id = res.data.data.id;
- }
- })
+Page({
+ data: {
+ url: a.imghost,
+ killtime: null,
+ currentPage: 1,
+ goodlist: [],
+ type: 1,
+ timer: null,
+ ismore: 1,
+ isshow: 0,
+ iurl: os.imghost,
+ ad_data: null,
+ max_sw_height: 200,
+ },
+
+ //------初始化加载----------
+ onLoad: function (t) {
+ wx.setNavigationBarTitle({
+ title: "天天拼单",
+ })
+ var first_leader = t.first_leader;
+ var th = this;
+
+ console.log("------------");
+ console.log(first_leader);
+ getApp().getConfig();
+
+ if (first_leader) {
+ getApp().globalData.first_leader = first_leader;
+ //调用接口判断是不是会员
+ getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
+ if (res.data.code == 0) {
+ getApp().globalData.guide_id = res.data.data.id;
}
-
- getApp().request.promiseGet("/api/weshop/ad/page?pid=801&store_id=" + os.stoid, {
- data: {
- enabled: 1
- }
- }).then(res => {
- if(res.data.code==0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length>0){
- var a = res.data.data.pageData;
- var narr=[];
- for(var i in a){
- var tt = {
- 'ad_code': os.imghost + a[i].ad_code,
- 'media_link': '',
- 'ad_weapplink':a[i].ad_weapplink
- };
- narr.push(tt);
- }
-
- th.setData({ad_data:narr});
- }
- })
- },
-
- onShow: function(t) {
-
- this.data.is_timer=1;
- this.data.currentPage=1;
- this.data.ismore=1;
- this.setData({goodlist:null});
- var th=this;
- this.requestSalelist();
- //设置全局定时器
- th.data.timer=setInterval(function () {
- th.countDown();
- },1000);
- },
-
- onHide:function(){
- //--清理定时器--
- clearInterval(this.timer);
- this.setData({isshow:0});
- },
-
- //---小于10的格式化函数----
- timeFormat(param) {
- return param < 10 ? '0' + param : param;
- },
+ })
+ }
+
+ getApp().request.promiseGet("/api/weshop/ad/page?pid=801&store_id=" + os.stoid, {
+ data: {
+ enabled: 1
+ }
+ }).then(res => {
+ if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length > 0) {
+ var a = res.data.data.pageData;
+ var narr = [];
+ for (var i in a) {
+ var tt = {
+ 'ad_code': os.imghost + a[i].ad_code,
+ 'media_link': '',
+ 'ad_weapplink': a[i].ad_weapplink
+ };
+ narr.push(tt);
+ }
+
+ th.setData({
+ ad_data: narr
+ });
+ }
+ })
+
+ },
+
+ onShow: function (t) {
+
+ this.data.is_timer = 1;
+ this.data.currentPage = 1;
+ this.data.ismore = 1;
+ var th = this;
+ var userInfo = wx.getStorageSync('userinfo');
+ console.log(userInfo,30000);
+ if (userInfo && th.data.goodlist.length==0) {
+ //调用列表
+ this.requestSalelist(userInfo.user_id);
+ } else {
+ getApp().goto("/pages/togoin/togoin");
+ }
+ //设置全局定时器
+ th.data.timer = setInterval(function () {
+ th.countDown();
+ }, 1000);
+ },
+
+ onHide: function () {
+ //--清理定时器--
+ clearInterval(this.timer);
+ this.setData({
+ isshow: 0
+ });
+ },
+
+ //---小于10的格式化函数----
+ timeFormat(param) {
+ return param < 10 ? '0' + param : param;
+ },
//----倒计时函数-----
- countDown() {
- if(!this.data.goodlist) return false;
- var th=this;
+ countDown() {
+ if (!this.data.goodlist) return false;
+ var th = this;
// 获取当前时间,同时得到活动结束时间数组
var newTime = ut.gettimestamp();
var endTimeList = this.data.goodlist;
@@ -119,119 +133,138 @@ Page({
}
},
- //读取数据
- async requestSalelist(){
- if(!this.data.ismore) return false;
- var e = this,th=e,i = "/api/weshop/teamlist/pageteam/"+th.data.type+"?page=" + e.data.currentPage;
- var plist=null,alllist=th.data.goodlist;
- if(!alllist) alllist=[];
-
- await getApp().request.promiseGet(i,
- {isShowLoading:1,data:{store_id:os.stoid,is_end:0,is_show:1}}
- ).then(res=>{
- if(ut.ajax_ok(res)) plist=res.data.data.pageData;
- });
+ //读取数据
+ async requestSalelist(user_id) {
+ if (!this.data.ismore) return false;
+ var e = this,
+ th = e,
+ i = "/api/weshop/teamlist/pageteam/" + th.data.type + "?page=" + e.data.currentPage;
+ var plist = null,
+ alllist = th.data.goodlist;
+ if (!alllist) alllist = [];
+ await getApp().request.promiseGet(i, {
+ isShowLoading: 1,
+ data: {
+ store_id: os.stoid,
+ is_end: 0,
+ is_show: 1,
+ user_id,
+ }
+ }).then(res => {
+ plist = res.data.data.pageData;
+ });
- if(!plist || plist.length<=0){
- getApp().showWarning("没有更多数据");
- th.data.ismore=0;
- return false;
- }
- //--循环读取接口---
- for(var i=0;i{
- if(res.data.code==0){
- plist[i].status=1;
- if(res.data.data<=0) plist[i].status=3;
- }
- });
- alllist.push(plist[i]);
- }
- e.data.currentPage++;
-
- th.setData({goodlist:alllist,isshow:1});
- },
-
- onPullDownRefresh: function() {
- this.reloadGoodList();
- },
- reloadGoodList: function() {
- this.data.goodlist = null, this.data.currentPage = 1, this.requestSalelist();
- },
- onReachBottom: function() {
- this.requestSalelist();
- },
-
- //点击tab事件
- tip:function(e){
- var a=e.currentTarget.dataset.ty,th=this; th.data.ismore=1;th.data.currentPage=1;
- this.setData({type:a,goodlist:null});
- this.reloadGoodList();
- },
-
-
-
- //---------分享配置--------
- onShareAppMessage: function (e) {
- var curPage=this;
- var pagePath = curPage.route; //当前页面url
- if (pagePath.indexOf('/') != 0) {
- pagePath = '/' + pagePath;
+ if (plist.length <= 0) {
+ getApp().showWarning("没有更多数据");
+ th.data.ismore = 0;
+ }
+ //--循环读取接口---
+ for (var i = 0; i < plist.length; i++) {
+ var prom_id = plist[i].id;
+ await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
+ os.stoid + "/6/" + prom_id, {}).then(res => {
+ if (res.data.code == 0) {
+ plist[i].status = 1;
+ if (res.data.data <= 0) plist[i].status = 3;
}
- if(getApp().globalData.user_id){
+ });
+ alllist.push(plist[i]);
+ }
+ e.data.currentPage++;
- if(pagePath.indexOf("?")>0){
- pagePath+="&first_leader="+getApp().globalData.user_id;
- }else{
- pagePath+="?first_leader="+getApp().globalData.user_id;
- }
- }
+ th.setData({
+ goodlist: alllist,
+ isshow: 1,
+ ismore:0,
+ });
+ },
- console.log("11"+pagePath);
+ onPullDownRefresh: function () {
+ this.reloadGoodList();
+ },
+ reloadGoodList: function () {
+ this.data.goodlist = null, this.data.currentPage = 1, this.requestSalelist();
+ },
+ onReachBottom: function () {
+ this.requestSalelist();
+ },
- return {
- title: "限时团购",
- path:pagePath,
- }
- },
-
-
-
-
- //图片失败,默认图片
- bind_bnerr2: function (e) {
- var _errImg = e.target.dataset.errorimg;
- var val = e.target.dataset.val;
- if(val!="/public/images/default_goods_image_240.gif"){
- var _errObj = {};
- _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
- this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
- }
- },
-
- imageLoad:function(e){
- var imgwidth = e.detail.width;
- var imgheight = e.detail.height;
- //宽高比
- var ratio = imgwidth / imgheight;
- //计算的高度值
- var viewHeight = 750 / ratio;
- var hei=this.data.max_sw_height;
-
- if (hei< viewHeight) {
- this.setData({ max_sw_height: viewHeight });
- }
- },
-
- onShareTimeline() {
- var store_name=getApp().globalData.config?getApp().globalData.config.store_name:'';
- if(!store_name)
- store_name=getApp().globalData.setting.appName;
- return {
- title: '秒杀活动-' + store_name,
- }
- },
-
-});
+ //点击tab事件
+ tip: function (e) {
+ var a = e.currentTarget.dataset.ty,
+ th = this;
+ th.data.ismore = 1;
+ th.data.currentPage = 1;
+ this.setData({
+ type: a,
+ goodlist: []
+ });
+ this.reloadGoodList();
+ },
+
+
+
+ //---------分享配置--------
+ onShareAppMessage: function (e) {
+ var curPage = this;
+ var pagePath = curPage.route; //当前页面url
+ if (pagePath.indexOf('/') != 0) {
+ pagePath = '/' + pagePath;
+ }
+ if (getApp().globalData.user_id) {
+
+ if (pagePath.indexOf("?") > 0) {
+ pagePath += "&first_leader=" + getApp().globalData.user_id;
+ } else {
+ pagePath += "?first_leader=" + getApp().globalData.user_id;
+ }
+ }
+
+ console.log("11" + pagePath);
+
+ return {
+ title: "限时团购",
+ path: pagePath,
+ }
+ },
+
+
+
+
+ //图片失败,默认图片
+ bind_bnerr2: function (e) {
+ var _errImg = e.target.dataset.errorimg;
+ var val = e.target.dataset.val;
+ if (val != "/public/images/default_goods_image_240.gif") {
+ var _errObj = {};
+ _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ }
+ },
+
+ imageLoad: function (e) {
+ var imgwidth = e.detail.width;
+ var imgheight = e.detail.height;
+ //宽高比
+ var ratio = imgwidth / imgheight;
+ //计算的高度值
+ var viewHeight = 750 / ratio;
+ var hei = this.data.max_sw_height;
+
+ if (hei < viewHeight) {
+ this.setData({
+ max_sw_height: viewHeight
+ });
+ }
+ },
+
+ onShareTimeline() {
+ var store_name = getApp().globalData.config ? getApp().globalData.config.store_name : '';
+ if (!store_name)
+ store_name = getApp().globalData.setting.appName;
+ return {
+ title: '秒杀活动-' + store_name,
+ }
+ },
+
+});
\ No newline at end of file
diff --git a/pages/activity/pind_list/pind_list.wxml b/pages/activity/pind_list/pind_list.wxml
index 4346863..388283d 100644
--- a/pages/activity/pind_list/pind_list.wxml
+++ b/pages/activity/pind_list/pind_list.wxml
@@ -104,7 +104,7 @@
-没有相关内容
+没有相关内容
diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js
index 2d496ce..3573ece 100644
--- a/pages/cart/cart/cart.js
+++ b/pages/cart/cart/cart.js
@@ -1,7 +1,7 @@
var t = getApp(),
a = t.request,
oo = t.globalData.setting,
- os=oo,
+ os = oo,
app = getApp(),
rq = t.request,
ut = require("../../../utils/util.js"),
@@ -9,6 +9,7 @@ var t = getApp(),
ladder_calc = require("ladder_calculate.js");
var regeneratorRuntime = require('../../../utils/runtime.js');
+
Page({
data: {
url: t.globalData.setting.url,
@@ -41,33 +42,35 @@ Page({
in_zhact_gdmap:{}, //不同门店参与同一活动的限购
ladder_map:{}, //阶梯促销需要的map
+
},
- onLoad: function() {
- var a = this,ee=a;
+ onLoad: function () {
+ var a = this,
+ ee = a;
//----获取系统参数-----
- getApp().getConfig2(function(e) {
- ee.setData({
- bconfig: e,
- sales_rules:e.sales_rules
- });
- })
+ // getApp().getConfig2(function (e) {
+ // ee.setData({
+ // bconfig: e,
+ // sales_rules: e.sales_rules
+ // });
+ // })
wx.setNavigationBarTitle({
title: "购物车",
})
//判断是否有登录
- t.auth.hadAuth() && t.getUserInfo(function() {
+ t.auth.hadAuth() && t.getUserInfo(function () {
//a.getCardList();
});
},
- onShow: function() {
+ onShow: function () {
//每次显示都清空
- this.data.in_zhact_gdmap={};
+ this.data.in_zhact_gdmap = {};
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
- var index=getApp().getPageIndex(this);
+ var index = getApp().getPageIndex(this);
this.getTabBar().setData({
active: index //数字是当前页面在tabbar的索引
})
@@ -76,7 +79,10 @@ Page({
}
var th = this;
- this.setData({requestData:null,is_load:0});
+ this.setData({
+ requestData: null,
+ is_load: 0
+ });
//调用底部导航
//t.editTabBar(th,getApp().globalData.setting.stoid,getApp().globalData.url);
//----获取系统参数-----
@@ -84,7 +90,10 @@ Page({
var json_d = JSON.parse(e.switch_list);
var is_open_offline=json_d.is_pricing_open;
th.setData({
- bconfig: e,sales_rules:e.sales_rules
+ bconfig: e,
+ freight_free:e.freight_free,
+ weight_free:e.weight_free,
+ sales_rules:e.sales_rules,
});
getApp().request.promiseGet("/store/storemoduleendtime/page?store_id=" +os.stoid + "&type=6",{}).then(res=>{
//未购买
@@ -131,58 +140,60 @@ Page({
is_end: 0,
is_show: 1,
pageSize: 1,
- user_id:user_id
+ user_id: user_id
}
- //--获取是否又秒杀活动--
- getApp().request.promiseGet("/api/ms/flash_sale/spikepage", {
- data:req_d,
- }).then(res => {
- if (res.data.code == 0 && res.data.data && res.data.data.pageData.length > 0) {
- th.setData({
- is_has_flash: 1
- })
- }
- });
- }
- })
-
-
+ //--获取是否又秒杀活动--
+ getApp().request.promiseGet("/api/ms/flash_sale/spikepage", {
+ data: req_d,
+ }).then(res => {
+ if (res.data.code == 0 && res.data.data && res.data.data.pageData.length > 0) {
+ th.setData({
+ is_has_flash: 1
+ })
+ }
+ });
+ }
+ })
+
+
},
- onHide(){
- this.data.zuhe_map={};
+ onHide() {
+ this.data.zuhe_map = {};
},
- onUnLoad(){
- getApp().globalData.cart_zh_act=null;
+ onUnLoad() {
+ getApp().globalData.cart_zh_act = null;
},
//-------------获取购物车列表,要安装门店进行分类订单-----------
- getCardList: function() {
-
+ getCardList: function () {
+
var th = this;
//要获取会员是不是等级会员
- getApp().getConfig2(function(conf){
+ getApp().getConfig2(function (conf) {
//--- 看后台是不是有开通等级卡 ---
- if(conf.switch_list){
- var s_list=JSON.parse(conf.switch_list);
- var user=getApp().globalData.userInfo;
+ if (conf.switch_list) {
+ var s_list = JSON.parse(conf.switch_list);
+ var user = getApp().globalData.userInfo;
//如果后台有开启等级价的功能
- if(user && parseInt(s_list.rank_switch)==2 && user['card_expiredate']){
+ if (user && parseInt(s_list.rank_switch) == 2 && user['card_expiredate']) {
var str = user['card_expiredate'].replace(/-/g, '/');
var end = new Date(str);
end = Date.parse(end) / 1000;
var now = ut.gettimestamp();
//--- 判断是等级会员,且在有效期范围内 ---
- if(user.card_field && now0) {
- var g_arr=[];
+ if (carr && carr.length > 0) {
+ var g_arr = [];
for (var i = 0; i < carr.length; i++) {
- if(g_arr.length==0) g_arr.push(carr[i].goods_id);
- else{
- var ind=g_arr.findIndex(function (ele) {
- return ele.goods_id==carr[i].goods_id
- })
- if(ind>-1) continue;
- g_arr.push(carr[i].goods_id)
- }
+ if (g_arr.length == 0) g_arr.push(carr[i].goods_id);
+ else {
+ var ind = g_arr.findIndex(function (ele) {
+ return ele.goods_id == carr[i].goods_id
+ })
+ if (ind > -1) continue;
+ g_arr.push(carr[i].goods_id)
+ }
}
- var by_map=null;
+ var by_map = null;
//--要获得商品,该用户买了多少件,同步应用--
await getApp().request.promiseGet("/api/weshop/ordergoods/listUserBuyGoodsNum", {
data: {
@@ -253,11 +263,11 @@ Page({
},
}).then(res => {
- if(res.data.code==0 && res.data.data && res.data.data.length>0){
- by_map={};
- for(let i in res.data.data){
- let item=res.data.data[i];
- by_map[item.goods_id]=item;
+ if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
+ by_map = {};
+ for (let i in res.data.data) {
+ let item = res.data.data[i];
+ by_map[item.goods_id] = item;
}
}
})
@@ -265,11 +275,10 @@ Page({
for (var i = 0; i < carr.length; i++) {
var item = carr[i];
var good = item;
- if(item.is_gift){
+ if (item.is_gift) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
- success: function (t) {
- }
+ success: function (t) {}
});
//商品已经下架
continue;
@@ -280,77 +289,92 @@ Page({
if ((good.down_time > 0 && good.down_time < tt) || good.is_on_sale == 0) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
- success: function (t) {
- }
+ success: function (t) {}
});
//商品已经下架
continue;
}
- var goodsbuynum=0,promgoodsbuynum=0,limit=0;
- if(by_map && by_map[good.goods_id]){
- goodsbuynum=by_map[good.goods_id].goodsbuynum;
- promgoodsbuynum=by_map[good.goods_id].promgoodsbuynum;
+ var goodsbuynum = 0,
+ promgoodsbuynum = 0,
+ limit = 0;
+ if (by_map && by_map[good.goods_id]) {
+ goodsbuynum = by_map[good.goods_id].goodsbuynum;
+ promgoodsbuynum = by_map[good.goods_id].promgoodsbuynum;
}
- limit=good.viplimited;
+ limit = good.viplimited;
//判断商品的限购
- if(item.goods_num+goodsbuynum>limit && limit>0){
- var cbuy=limit-goodsbuynum;
- if(cbuy<=0){
+ if (item.goods_num + goodsbuynum > limit && limit > 0) {
+ var cbuy = limit - goodsbuynum;
+ if (cbuy <= 0) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
a.delete(url, {});
continue;
}
//-- 购物车更新 --
- var updata1={id: item.id,goods_num:cbuy,store_id:os.stoid,user_id:getApp().globalData.userInfo.user_id };
+ var updata1 = {
+ id: item.id,
+ goods_num: cbuy,
+ store_id: os.stoid,
+ user_id: getApp().globalData.userInfo.user_id
+ };
getApp().request.put("/api/weshop/cart/update", {
data: updata1,
})
- item.goods_num=cbuy;
+ item.goods_num = cbuy;
}
//如果秒杀活动都去掉了,或者结束了,那么这个商品也没有必要留着
if (item.prom_type == 1) {
var prom = null;
var now = ut.gettimestamp();
- await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid +'/'+user_id+ "/" + item.prom_id, {}).then(res => {
- if (res.data.code == 0){
+ await getApp().request.promiseGet("/api/ms/flash_sale/getNew/" + os.stoid + '/' + user_id + "/" + item.prom_id, {}).then(res => {
+ if (res.data.code == 0) {
prom = res.data.data;
- prom.price=prom.user_price;
+ prom.price = prom.user_price;
}
})
//---如果互动都已经过期,或者还未开始,或者无活动
if (!prom || prom.is_end == 1 || prom.end_time < now || prom.start_time > now) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
a.delete(url, {
- success: function (t) {
- }
+ success: function (t) {}
});
//商品已经下架
continue;
}
//判断秒杀的限购
- if(item.goods_num+promgoodsbuynum>prom.buy_limit && prom.buy_limit>0){
- var cbuy=prom.buy_limit-promgoodsbuynum;
- if(cbuy<=0){
+ if (item.goods_num + promgoodsbuynum > prom.buy_limit && prom.buy_limit > 0) {
+ var cbuy = prom.buy_limit - promgoodsbuynum;
+ if (cbuy <= 0) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
a.delete(url, {});
continue;
}
//-- 购物车更新 --
- var updata1={id: item.id,goods_num:cbuy,store_id:os.stoid,user_id:getApp().globalData.userInfo.user_id };
+ var updata1 = {
+ id: item.id,
+ goods_num: cbuy,
+ store_id: os.stoid,
+ user_id: getApp().globalData.userInfo.user_id
+ };
getApp().request.put("/api/weshop/cart/update", {
data: updata1,
})
- item.goods_num=cbuy;
+ item.goods_num = cbuy;
}
//价格不对,就要更新一下
- if(good.goods_price!=prom.price){
- good.goods_price=prom.price;
+ if (good.goods_price != prom.price) {
+ good.goods_price = prom.price;
//-- 购物车更新秒杀价格 --
- var updata1={id: item.id,goods_price:prom.price,store_id:os.stoid,user_id:getApp().globalData.userInfo.user_id };
+ var updata1 = {
+ id: item.id,
+ goods_price: prom.price,
+ store_id: os.stoid,
+ user_id: getApp().globalData.userInfo.user_id
+ };
getApp().request.put("/api/weshop/cart/update", {
data: updata1,
})
@@ -371,13 +395,12 @@ Page({
let item=res.data.data[i];
if(item.prom_type==3) {
is_g_prom=1; break;
-
}
}
}
})
- if(is_g_prom){
+ if (is_g_prom) {
await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + item.goods_id + "/1", {}).then(res => {
if (res.data.code == 0) {
var r_data = res.data.data;
@@ -386,9 +409,9 @@ Page({
getApp().request.delete(url, {});
//商品已经无活动
isok = 0;
- }else{
+ } else {
//如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了
- if(item.prom_id!=r_data.promGoodsLists[0].prom_id ){
+ if (item.prom_id != r_data.promGoodsLists[0].prom_id) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {});
//商品已经下架
@@ -404,7 +427,7 @@ Page({
}
})
- }else{
+ } else {
await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromNormal/" + os.stoid + "/" + item.goods_id, {}).then(res => {
if (res.data.code == 0) {
var r_data = res.data.data;
@@ -413,9 +436,9 @@ Page({
getApp().request.delete(url, {});
//商品已经无活动
isok = 0;
- }else{
+ } else {
//如果活动的ID不一样,说明原先的活动已经没有参与了或者过期了
- if(item.prom_id!=r_data.promGoodsLists[0].prom_id ){
+ if (item.prom_id != r_data.promGoodsLists[0].prom_id) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {});
//商品已经下架
@@ -434,47 +457,47 @@ Page({
}
if (!isok) continue;
-
}
else if (item.prom_type == 7) {
if(!th.data.zuhe_map[item.prom_id]){
+
//如果有组合购
var isok = 1;
- var is_flag=1;
- var act=null;
- var url="/api/weshop/prom/zhbuy/get/"+os.stoid+"/"+item.prom_id+"/"+getApp().globalData.userInfo.user_id;
+ var is_flag = 1;
+ var act = null;
+ var url = "/api/weshop/prom/zhbuy/get/" + os.stoid + "/" + item.prom_id + "/" + getApp().globalData.userInfo.user_id;
await getApp().request.promiseGet(url, {}).then(res => {
- console.log(res,1000);
- if(res.data.code==0 && res.data.data){
- if(res.data.data.is_show!=1){
- isok=0;
- }
- //如果活动已经结束
- if(res.data.data.is_end==1){
- isok=0;
- }
- //已经结束
- if(ut.gettimestamp()>res.data.data.end_time){
- isok=0;
- }
- //还未开始
- if(ut.gettimestamp() res.data.data.end_time) {
+ isok = 0;
+ }
+ //还未开始
+ if (ut.gettimestamp() < res.data.data.start_time) {
+ isok = 0;
+ }
+ act = res.data.data;
+
+ } else {
+ //未找到商品的活动
+ is_flag = 0;
+ }
})
- if (!isok){
+ if (!isok) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {});
- th.data.zuhe_map[item.prom_id]=-1;
+ th.data.zuhe_map[item.prom_id] = -1;
continue;
}
- th.data.zuhe_map[item.prom_id]=act;
+ th.data.zuhe_map[item.prom_id] = act;
var url1 = "/api/weshop/prom/zhbuyGoods/page";
var req_data = {
page: 1,
@@ -485,37 +508,37 @@ Page({
await getApp().request.promiseGet(url1, {
data: req_data
}).then(res => {
- console.log(res,2000);
+ console.log(res, 2000);
if (ut.ajax_ok(res)) {
var gdlist = res.data.data.pageData;
- gdlist.forEach(i=>{
- if(item.goods_id==i.goods_id&&!is_flag){
- item.prom_type=0;
- item.prom_type1=0;
- item.prom_id=0;
- item.prom_id1=0
+ gdlist.forEach(i => {
+ if (item.goods_id == i.goods_id && !is_flag) {
+ item.prom_type = 0;
+ item.prom_type1 = 0;
+ item.prom_id = 0;
+ item.prom_id1 = 0
}
})
- th.data.zuhe_map_good[item.prom_id]=gdlist;
+ th.data.zuhe_map_good[item.prom_id] = gdlist;
}
})
}
- if(th.data.zuhe_map[item.prom_id] && th.data.zuhe_map[item.prom_id]!=-1 ){
- var gdlist=th.data.zuhe_map_good[item.prom_id];
- var t_item=gdlist.find(function (ele) {
- return ele.goods_id==item.goods_id
+ if (th.data.zuhe_map[item.prom_id] && th.data.zuhe_map[item.prom_id] != -1) {
+ var gdlist = th.data.zuhe_map_good[item.prom_id];
+ var t_item = gdlist.find(function (ele) {
+ return ele.goods_id == item.goods_id
})
- if(!t_item){
+ if (!t_item) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {});
- th.data.zuhe_map[item.prom_id]=-1;
+ th.data.zuhe_map[item.prom_id] = -1;
continue;
}
- item.buyqty=t_item.buyqty;
- item.zh_b_num=promgoodsbuynum;
- item.act=th.data.zuhe_map[item.prom_id];
- }//else{
+ item.buyqty = t_item.buyqty;
+ item.zh_b_num = promgoodsbuynum;
+ item.act = th.data.zuhe_map[item.prom_id];
+ } //else{
// var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
// getApp().request.delete(url, {});
// th.data.zuhe_map[item.prom_id]=-1;
@@ -524,7 +547,7 @@ Page({
}
else if (item.prom_type == 10) {
if(!th.data.ladder_map[item.prom_id]){
- //如果有组合购
+ //如果有阶梯购
var isok = 1;
var is_flag=1;
var act=null;
@@ -585,6 +608,7 @@ Page({
}
else if(item.prom_type == 0) {
+
//如果有优惠活动,要更新活动
await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + item.goods_id + "/1", {}).then(res => {
if (res.data.code == 0) {
@@ -592,7 +616,12 @@ Page({
if (r_data.promGoodsLists) {
var url = '/api/weshop/cart/update';
getApp().request.put(url, {
- data:{id:item.id,store_id:oo.stoid,prom_type:3,prom_id:r_data.promGoodsLists[0].prom_id}
+ data: {
+ id: item.id,
+ store_id: oo.stoid,
+ prom_type: 3,
+ prom_id: r_data.promGoodsLists[0].prom_id
+ }
});
item.prom_type=3;
item.prom_id=r_data.promGoodsLists[0].prom_id;
@@ -607,6 +636,8 @@ Page({
//如果是阶梯购的时候
if(item.prom_type==10){
+
+
if(!th.data.ladder_map[item.prom_id]){
//如果有阶梯购,要判断身份
var isok = 1;
@@ -642,10 +673,6 @@ Page({
item.prom_type=0;
item.prom_id=0;
}else{
- var url = '/api/weshop/cart/update';
- getApp().request.put(url, {
- data:{id:item.id,store_id:oo.stoid,prom_type:10,prom_id:act.id}
- });
th.data.ladder_map[item.prom_id]=act;
//-- 获取阶梯规则 --
@@ -668,6 +695,13 @@ Page({
//直接把活动赋值给元素
if(th.data.ladder_map[item.prom_id] && th.data.ladder_map[item.prom_id]!=-1 ){
item.act=th.data.ladder_map[item.prom_id];
+
+ //如果有活动,就更新商品的活动那个
+ var url = '/api/weshop/cart/update';
+ getApp().request.put(url, {
+ data:{id:item.id,store_id:oo.stoid,prom_type:10,prom_id:item.prom_id}
+ });
+
}
}
@@ -676,19 +710,27 @@ Page({
all_num += item.goods_num;
item.original_img = oo.imghost + item.original_img;
item.selected = 0;
- item.erpwareid=good.erpwareid; //要同步下线商品的id
- item.shop_price=good.shop_price; //要同步下线商品的id
+ item.erpwareid = good.erpwareid; //要同步下线商品的id
+ item.shop_price = good.shop_price; //要同步下线商品的id
//当商品要计算等级价的售
- if(item.prom_type == 0 || item.prom_type == 3 || item.prom_type == 5 || item.prom_type == 7){
- if(th.data.card_field && good[th.data.card_field]){
- item.goods_price=good[th.data.card_field]; //要同步下线商品的id
- }else{
- item.goods_price=good.shop_price;
+ if (item.prom_type == 0 || item.prom_type == 3 || item.prom_type == 5 || item.prom_type == 7) {
+ if (th.data.card_field && good[th.data.card_field]) {
+ item.goods_price = good[th.data.card_field]; //要同步下线商品的id
+ } else {
+ item.goods_price = good.shop_price;
}
- var t={id:item.id,store_id:os.stoid,user_id:getApp().globalData.userInfo.user_id,goods_price:item.goods_price}
- getApp().request.put("/api/weshop/cart/update", {isShowLoading:0,data: t,})
+ var t = {
+ id: item.id,
+ store_id: os.stoid,
+ user_id: getApp().globalData.userInfo.user_id,
+ goods_price: item.goods_price
+ }
+ getApp().request.put("/api/weshop/cart/update", {
+ isShowLoading: 0,
+ data: t,
+ })
}
@@ -728,20 +770,20 @@ Page({
}
}
- if(th.data.is_open_offline && th.data.is_open_offline>0 && th.data.sales_rules==2){
- //-- 此时要实时更新线下取价价格 --
- for(var i=0;i 0 && th.data.sales_rules == 2) {
+ //-- 此时要实时更新线下取价价格 --
+ for (var i = 0; i < arr.length; i++) {
+ //每个门店都去看下线下取价
+ var list = arr[i];
+ await th.set_offline(list);
+ }
+ } else {
//-- 此时要实时更新线下取价价格 --
- for(var ij in arr){
+ for (var ij in arr) {
//每个门店都去看下线下取价
- var list=arr[ij];
- for(var i in list.goods){
- list.goods[i].offline_price=0
+ var list = arr[ij];
+ for (var i in list.goods) {
+ list.goods[i].offline_price = 0
}
}
}
@@ -774,7 +816,7 @@ Page({
},
//-----真的获取购物车--------
- get_ser_cart: function() {
+ get_ser_cart: function () {
var th = this;
var rd = Math.random().toString(36).substr(2, 15);
getApp().request.get("/api/weshop/cartService/page", {
@@ -782,27 +824,26 @@ Page({
user_id: app.globalData.user_id,
rd: rd,
store_id: oo.stoid,
- pageSize: 600,
+ pageSize: 600,
},
- success:async function(su) {
+ success: async function (su) {
//按门店分类的数组
var arr = new Array(),
carr = su.data.data.pageData;
var all_num = 0;
-
- if(carr && carr.length>0) {
+
+ if (carr && carr.length > 0) {
for (var i = 0; i < carr.length; i++) {
var item = carr[i];
var good = null;
-
+
await getApp().request.promiseGet("/api/weshop/serviceCard/get/" + oo.stoid + "/" + item.service_id, {}).then(res => {
good = res.data.data;
})
- if(!good){
+ if (!good) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
- success: function (t) {
- }
+ success: function (t) {}
});
continue;
}
@@ -811,8 +852,7 @@ Page({
if (good.is_show == 0) {
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + item.id;
getApp().request.delete(url, {
- success: function (t) {
- }
+ success: function (t) {}
});
//商品已经下架
continue;
@@ -821,7 +861,7 @@ Page({
all_num += item.goods_num;
item.img_url = oo.imghost + good.imgUrl;
item.selected = 0;
-
+
var pcid = item.pick_id;
var find = 0;
@@ -835,7 +875,7 @@ Page({
}
}
}
-
+
//------如果没有找到-----
if (find == 0) {
var pikname = '';
@@ -858,75 +898,74 @@ Page({
}
}
}
-
- // console.log('BBBBBB', all_num);
+
+ // console.log('BBBBBB', all_num);
th.setData({
- service_data: arr,
- all_num2: all_num,
- is_edit: 0
- }),
- th.doCheckAll(), wx.stopPullDownRefresh();
-
+ service_data: arr,
+ all_num2: all_num,
+ is_edit: 0
+ }),
+ th.doCheckAll(), wx.stopPullDownRefresh();
+
}
});
},
-
-
+
+
//设置莫个门店的所有线下价格
- async set_offline(list){
- var th=this;
- var userInfo=getApp().globalData.userInfo;
+ async set_offline(list) {
+ var th = this;
+ var userInfo = getApp().globalData.userInfo;
//组织一下商品,然后进行线下价格的赋值
- var wlist="";
- for(var i in list.goods){
+ var wlist = "";
+ for (var i in list.goods) {
//如果商品有促销活动
- if(list.goods[i].prom_type>0 && list.goods[i].prom_type!=7) continue;
- wlist+= encodeURIComponent(list.goods[i].erpwareid)+",";
+ if (list.goods[i].prom_type > 0 && list.goods[i].prom_type != 7) continue;
+ wlist += encodeURIComponent(list.goods[i].erpwareid) + ",";
}
- wlist=ut.sub_last(wlist);
+ wlist = ut.sub_last(wlist);
//调用接口进行赋值
- await getApp().request.promiseGet("/api/weshop/goods/listWarePrice", {
- data:{
- store_id:os.stoid,
- PickupId:list.pid,
- WareIds:wlist,
- VIPId:encodeURIComponent(userInfo.erpvipid)
+ await getApp().request.promiseGet("/api/weshop/goods/listWarePrice", {
+ data: {
+ store_id: os.stoid,
+ PickupId: list.pid,
+ WareIds: wlist,
+ VIPId: encodeURIComponent(userInfo.erpvipid)
}
}).then(res => {
- if(res.data.code==0 && res.data.data && res.data.data.length>0){
- for(var e in res.data.data){
- th.set_cart_offline_price(res.data.data[e],list.goods);
+ if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
+ for (var e in res.data.data) {
+ th.set_cart_offline_price(res.data.data[e], list.goods);
}
}
})
},
//-- 设置购物车线下 --
- set_cart_offline_price:function(data,glist)
- {
- for(var i in glist) {
- if(glist[i].erpwareid==data.WareId && (glist[i].prom_type==0 || glist[i].prom_type==7)){
- if(glist[i].goods_price>=data.WarePrice){
- glist[i].is_offline=1;
- glist[i].offline_price=data.WarePrice;
- glist[i].pricing_type=data.PriceType;
+ set_cart_offline_price: function (data, glist) {
+ for (var i in glist) {
+ if (glist[i].erpwareid == data.WareId && (glist[i].prom_type == 0 || glist[i].prom_type == 7)) {
+ if (glist[i].goods_price >= data.WarePrice) {
+ glist[i].is_offline = 1;
+ glist[i].offline_price = data.WarePrice;
+ glist[i].pricing_type = data.PriceType;
}
}
}
},
//删除商品
- delete_th_item: function(t) {
+ delete_th_item: function (t) {
var e = this;
var a = rq;
console.log(a);
wx.showModal({
title: "确定删除?",
- success: function(s) {
+ success: function (s) {
if (s.confirm) {
var r = t.currentTarget.dataset.cartid;
var url = '/api/weshop/cart/del/' + oo.stoid + '/' + r;
a.delete(url, {
- success: function(t) {
+ success: function (t) {
e.getCardList();
}
});
@@ -936,19 +975,19 @@ Page({
},
//-----------------点击输入修改商品数量---------------
- valueToNum: function(t) {
- if(!this.data.is_load) return false;
+ valueToNum: function (t) {
+ if (!this.data.is_load) return false;
//控制住,避免事件响应冲突,只有input有输入的时候,才刷新
- if(this.data.btn_click){
+ if (this.data.btn_click) {
return false;
}
- this.data.btn_click=1;
+ this.data.btn_click = 1;
var a = t.currentTarget.dataset.item;
var b = t.currentTarget.dataset.pitems;
a = this.data.requestData[b].goods[a];
var e = a;
- var th=this;
+ var th = this;
if (a = isNaN(t.detail.value) || t.detail.value < 1 ? 1 : parseInt(t.detail.value)) {
var s = {
@@ -962,24 +1001,24 @@ Page({
},
//-------------加数量---------------------
- addNum: function(t) {
- if(!this.data.is_load) return false;
+ addNum: function (t) {
+ if (!this.data.is_load) return false;
if (this.data.up_dating == 1) return false;
this.data.up_dating = 1;
var a = t.currentTarget.dataset.item;
var b = t.currentTarget.dataset.pitems;
a = this.data.requestData[b].goods[a];
-
- console.log('add+');
- if (a.goods_num0
- && e.data.service_data && e.data.service_data.length>0){
+ if (e.data.requestData && e.data.requestData.length > 0 &&
+ e.data.service_data && e.data.service_data.length > 0) {
wx.showModal({
title: '提示',
content: '服务卡项目不能和商品一起选择'
@@ -1107,19 +1147,19 @@ Page({
return false;
}
- this.data.btn_click=1;
+ this.data.btn_click = 1;
- var offline_price=0;
- var offline_num=0;
- th.data.in_zhact_gdmap={};
+ var offline_price = 0;
+ var offline_num = 0;
+ th.data.in_zhact_gdmap = {};
- if(dda && dda.length>0){
+ if (dda && dda.length > 0) {
for (var i = 0; i < dda.length; i++) {
var item = dda[i].goods;
-
+
if (e.data.checkAllToggle) {
var txt = "requestData[" + i + "].selected";
e.setData({
@@ -1138,6 +1178,7 @@ Page({
if(obj.prom_type==10)
ladder_calc.remove_ladder_prom(dda,i,obj);
+
if (fir == 0) {
fir = item[j].distr_type;
} else {
@@ -1155,27 +1196,27 @@ Page({
if(obj.prom_type==7) zh_calc.add_zhprom(dda,i,obj);
//加入阶梯促销计算
if(obj.prom_type==10) ladder_calc.add_ladder_prom(dda,i,obj);
-
e.setData({
+
[txt]: !e.data.checkAllToggle,
})
-
+
if (!e.data.checkAllToggle) {
//组合购的金额要另外算
if(item[j].prom_type!=7 && item[j].prom_type!=10)
tfeel += item[j].goods_num * item[j].goods_price;
- t_num += item[j].goods_num;
+ t_num += item[j].goods_num;
}
//-- 如果这个商品是线下取价的时候 --
- if(item[j].is_offline && item[j].prom_type!=7){
- offline_price+= (item[j].goods_price-item[j].offline_price)*item[j].goods_num;
- offline_num+=item[j].goods_num;
+ if (item[j].is_offline && item[j].prom_type != 7) {
+ offline_price += (item[j].goods_price - item[j].offline_price) * item[j].goods_num;
+ offline_num += item[j].goods_num;
}
- }
- }
+ }
+ }
if (text_arr != "") {
@@ -1186,7 +1227,7 @@ Page({
return false;
} else {
- for (var i = 0; i < dda.length; i++) {
+ for (var i = 0; i < dda.length; i++) {
if (!e.data.checkAllToggle) {
var txt = "requestData[" + i + "].selected";
@@ -1195,11 +1236,11 @@ Page({
});
}
- //总的价格,把组合商品的价格拿出来
- var zh_calc_res=zh_calc.calculate_zh(dda,i,this);
- tfeel+=zh_calc_res.tfeel;
- offline_price+=zh_calc_res.offline_price;
- offline_num+=zh_calc_res.offline_num;
+ //总的价格,把组合商品的价格拿出来
+ var zh_calc_res = zh_calc.calculate_zh(dda, i, this);
+ tfeel += zh_calc_res.tfeel;
+ offline_price += zh_calc_res.offline_price;
+ offline_num += zh_calc_res.offline_num;
//总的价格,把阶梯促销的商品的价格拿出来
var ladder_calc_res=ladder_calc.calculate_ladder(dda,i,this);
@@ -1208,24 +1249,24 @@ Page({
offline_num+=ladder_calc_res.offline_num;
//当有线下取价的时候
- if(offline_price){
- var txt1= "requestData[" + i + "].offline_price";
- var txt2= "requestData[" + i+ "].offline_num";
+ if (offline_price) {
+ var txt1 = "requestData[" + i + "].offline_price";
+ var txt2 = "requestData[" + i + "].offline_num";
th.setData({
[txt1]: offline_price.toFixed(2),
[txt2]: offline_num,
});
- }else{
- if(dda[i].offline_price>0){
- var txt1= "requestData[" + i + "].offline_price";
- var txt2= "requestData[" + i + "].offline_num";
+ } else {
+ if (dda[i].offline_price > 0) {
+ var txt1 = "requestData[" + i + "].offline_price";
+ var txt2 = "requestData[" + i + "].offline_num";
th.setData({
[txt1]: 0,
[txt2]: 0
});
}
}
- }
+ }
e.setData({
checkAllToggle: !e.data.checkAllToggle,
@@ -1233,13 +1274,13 @@ Page({
total_num: t_num,
});
- for(var i in e.data.requestData){
+ for (var i in e.data.requestData) {
e.check_prom_activity(i)
}
}
}
- if(sdda && sdda.length>0){
+ if (sdda && sdda.length > 0) {
for (var i = 0; i < sdda.length; i++) {
var item = sdda[i].goods;
if (e.data.checkAllToggle) {
@@ -1269,30 +1310,30 @@ Page({
},
//------门店全选按钮,要判断是否门店的匹配方式一致---------
- check_th_all_item:async function(ele) {
+ check_th_all_item: async function (ele) {
var e = this,
pitems = ele.currentTarget.dataset.pitems,
item = this.data.requestData[pitems].goods,
sele = this.data.requestData[pitems].selected;
- this.data.btn_click=1;
- var garr=e.data.service_data;
+ this.data.btn_click = 1;
+ var garr = e.data.service_data;
var isok = 1,
fir = 0,
iarr = item;
- if(!sele){
- var check_is_service_selected=0;
- for (var ii in garr){
- for (var ij in garr[ii].goods){
- if( garr[ii].goods[ij].selected){
- check_is_service_selected=1;
+ if (!sele) {
+ var check_is_service_selected = 0;
+ for (var ii in garr) {
+ for (var ij in garr[ii].goods) {
+ if (garr[ii].goods[ij].selected) {
+ check_is_service_selected = 1;
break;
}
}
}
- if(check_is_service_selected){
+ if (check_is_service_selected) {
wx.showModal({
title: '提示',
content: '服务卡项目不能和商品一起选择'
@@ -1303,7 +1344,7 @@ Page({
if (!sele && item.length > 0) {
for (var i = 0; i < iarr.length; i++) {
- if(iarr[i].is_gift==1) continue;
+ if (iarr[i].is_gift == 1) continue;
if (iarr[i].distr_type != 0) {
if (fir == 0) {
fir = iarr[i].distr_type;
@@ -1335,23 +1376,24 @@ Page({
e.setData({
[txt]: Number(!sele),
});
-
- await e.check_prom_activity(pitems);
- for(var i in e.data.requestData){
- if(i!=pitems) await e.check_prom_activity(i);
- }
+
+ await e.check_prom_activity(pitems);
+ for (var i in e.data.requestData) {
+ if (i != pitems) await e.check_prom_activity(i);
+ }
this.doCheckAll();
},
//---------------单选,也要判断门店的配送方式是否一致--------------
- check_th_item: async function(t) {
+ check_th_item: async function (t) {
var e = this,
item = t.currentTarget.dataset.item,
pitems = t.currentTarget.dataset.pitems;
a = this.data.requestData[pitems].goods[item];
- var isok = 1,fir = 0;
+ var isok = 1,
+ fir = 0;
var iarr = e.data.requestData[pitems].goods;
- this.data.btn_click=1;
- var garr= e.data.service_data;
+ this.data.btn_click = 1;
+ var garr = e.data.service_data;
if (!a.selected) {
var check_is_service_selected = 0;
@@ -1376,7 +1418,7 @@ Page({
if (iarr.length > 1 && !a.selected) {
for (var i = 0; i < iarr.length; i++) {
- if(iarr[i].is_gift==1) continue;
+ if (iarr[i].is_gift == 1) continue;
//---当不是本身选择项目----
var sel = iarr[i].selected;
if (iarr[i].distr_type != 0 && (sel || iarr[i].id == a.id)) {
@@ -1402,42 +1444,42 @@ Page({
[txt]: Number(!a.selected),
});
- if(a.prom_type==3){
-
- await e.check_prom_activity(pitems);
+ if (a.prom_type == 3) {
+
+ await e.check_prom_activity(pitems);
//判断商品是不是优惠活动
- for(var i in e.data.requestData){
- if(i!=pitems) await e.check_prom_activity(i);
- }
+ for (var i in e.data.requestData) {
+ if (i != pitems) await e.check_prom_activity(i);
+ }
}
this.doCheckAll();
}
},
//------门店全选按钮,要判断是否门店的匹配方式一致---------
- check_th_all_item_ser:async function(ele) {
+ check_th_all_item_ser: async function (ele) {
var e = this,
pitems = ele.currentTarget.dataset.pitems,
item = this.data.service_data[pitems].goods,
sele = this.data.service_data[pitems].selected;
- this.data.btn_click=1;
- var garr= e.data.requestData;
+ this.data.btn_click = 1;
+ var garr = e.data.requestData;
var isok = 1,
fir = 0,
iarr = item;
- if(!sele){
- var check_is_goods_selected=0;
- for (var ii in garr){
- for (var ij in garr[ii].goods){
- if( garr[ii].goods[ij].selected){
- check_is_goods_selected=1;
+ if (!sele) {
+ var check_is_goods_selected = 0;
+ for (var ii in garr) {
+ for (var ij in garr[ii].goods) {
+ if (garr[ii].goods[ij].selected) {
+ check_is_goods_selected = 1;
break;
}
}
}
- if(check_is_goods_selected){
+ if (check_is_goods_selected) {
wx.showModal({
title: '提示',
content: '服务卡项目不能和商品一起选择'
@@ -1459,29 +1501,30 @@ Page({
this.doCheckAll();
},
//---------------单选,也要判断门店的配送方式是否一致--------------
- check_th_item_ser: async function(t) {
+ check_th_item_ser: async function (t) {
var e = this,
item = t.currentTarget.dataset.item,
pitems = t.currentTarget.dataset.pitems;
a = this.data.service_data[pitems].goods[item];
- var isok = 1,fir = 0;
+ var isok = 1,
+ fir = 0;
var iarr = e.data.service_data[pitems].goods;
- this.data.btn_click=1;
+ this.data.btn_click = 1;
- var garr= e.data.requestData;
+ var garr = e.data.requestData;
- if(!a.selected){
- var check_is_goods_selected=0;
- for (var ii in garr){
- for (var ij in garr[ii].goods){
- if( garr[ii].goods[ij].selected){
- check_is_goods_selected=1;
+ if (!a.selected) {
+ var check_is_goods_selected = 0;
+ for (var ii in garr) {
+ for (var ij in garr[ii].goods) {
+ if (garr[ii].goods[ij].selected) {
+ check_is_goods_selected = 1;
break;
}
}
}
- if(check_is_goods_selected){
+ if (check_is_goods_selected) {
wx.showModal({
title: '提示',
content: '服务卡项目不能和商品一起选择'
@@ -1498,7 +1541,7 @@ Page({
},
//----------检查是否全选---------
- doCheckAll: function() {
+ doCheckAll: function () {
var th = this,
tfeel = 0,
t_num = 0,
@@ -1508,28 +1551,27 @@ Page({
all_num = 0;
//-- 购物车 --
- if(car && car.length>0){
- th.data.in_zhact_gdmap={};
+ if (car && car.length > 0) {
+ th.data.in_zhact_gdmap = {};
for (var a = 0; a < car.length; a++) {
var item = car[a].goods,is_s_sele = 1;
var offline_price=0;
var offline_num=0;
for (var c = 0; c < item.length; c++) {
- if(item[c].is_gift) continue;
+ if (item[c].is_gift) continue;
all_num += item[c].goods_num;
//不管怎么样都要移出去
var obj=JSON.parse(JSON.stringify(item[c]));
-
zh_calc.remove_zhprom(car,a,obj);
ladder_calc.remove_ladder_prom(car,a,obj);
if (item[c].selected == 0) {
ischeck = 0;
is_s_sele = 0;
- if(item[c].prom_type==7) {
- obj.goods_num=0;
- zh_calc.add_zhprom(car,a,obj);
+ if (item[c].prom_type == 7) {
+ obj.goods_num = 0;
+ zh_calc.add_zhprom(car, a, obj);
}
if(item[c].prom_type==10) {
obj.goods_num=0;
@@ -1551,9 +1593,9 @@ Page({
}
//-- 如果这个商品是线下取价的时候 --
- if(item[c].is_offline && item[c].prom_type!=7){
- offline_price+= (item[c].goods_price-item[c].offline_price)*item[c].goods_num;
- offline_num+=item[c].goods_num;
+ if (item[c].is_offline && item[c].prom_type != 7) {
+ offline_price += (item[c].goods_price - item[c].offline_price) * item[c].goods_num;
+ offline_num += item[c].goods_num;
}
}
@@ -1576,35 +1618,36 @@ Page({
});
//当有线下取价的时候
- if(offline_price){
- var txt1= "requestData[" + a + "].offline_price";
- var txt2= "requestData[" + a + "].offline_num";
+ if (offline_price) {
+ var txt1 = "requestData[" + a + "].offline_price";
+ var txt2 = "requestData[" + a + "].offline_num";
th.setData({
[txt1]: offline_price.toFixed(2),
[txt2]: offline_num,
});
- }else{
- if(car[a].offline_price>0){
- var txt1= "requestData[" + a + "].offline_price";
- var txt2= "requestData[" + a + "].offline_num";
- th.setData({
- [txt1]: 0,
- [txt2]: 0
- });
- }
+ } else {
+ if (car[a].offline_price > 0) {
+ var txt1 = "requestData[" + a + "].offline_price";
+ var txt2 = "requestData[" + a + "].offline_num";
+ th.setData({
+ [txt1]: 0,
+ [txt2]: 0
+ });
+ }
}
}
}
//-- 服务卡 --
- if(car2 && car2.length>0){
+ if (car2 && car2.length > 0) {
for (var a = 0; a < car2.length; a++) {
- var c_item=car2[a];
- var item = car2[a].goods, is_s_sele = 1;
+ var c_item = car2[a];
+ var item = car2[a].goods,
+ is_s_sele = 1;
for (var c = 0; c < item.length; c++) {
- if(item[c].is_gift) continue;
+ if (item[c].is_gift) continue;
all_num += item[c].goods_num;
if (item[c].selected == 0) {
ischeck = 0;
@@ -1632,28 +1675,31 @@ Page({
},
//----------------------更新购物数量,加减,调用接口---------------------
- postCardList: function(t, item, pitem) {
- var e = this,th=e,user_id = getApp().globalData.user_id;
- function normal_check(store_count,goodsinfo,wareIds) {
- //--- 看一下是不是线下库存 ---
- if(th.data.sales_rules==2 && goodsinfo.prom_type!=7){
- th.check_down_line(t, pitem, item,wareIds);
- }else{
- if (t.goods_num > store_count) {
- wx.showModal({
- title: '提示',
- content: '购买数量超出商品库存'
- });
- var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.setData({
- [txt]: store_count
- });
- e.doCheckAll();
- t.goods_num=store_count;
- }
- e.update_cart(t, pitem, item);
- }
- }
+ postCardList: function (t, item, pitem) {
+ var e = this,
+ th = e,
+ user_id = getApp().globalData.user_id;
+
+ function normal_check(store_count, goodsinfo, wareIds) {
+ //--- 看一下是不是线下库存 ---
+ if (th.data.sales_rules == 2 && goodsinfo.prom_type != 7) {
+ th.check_down_line(t, pitem, item, wareIds);
+ } else {
+ if (t.goods_num > store_count) {
+ wx.showModal({
+ title: '提示',
+ content: '购买数量超出商品库存'
+ });
+ var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
+ e.setData({
+ [txt]: store_count
+ });
+ e.doCheckAll();
+ t.goods_num = store_count;
+ }
+ e.update_cart(t, pitem, item);
+ }
+ }
// console.log('update');
// console.log('9995959595959',t);
@@ -1683,8 +1729,10 @@ Page({
var buy_num_data = res.data.data;
if (buy_num_data.promgoodsbuynum) {
promgoodsbuynum = buy_num_data.promgoodsbuynum;
- var txt="requestData[" + pitem + "].goods[" + item + "].zh_b_num";
- th.setData({[txt]:promgoodsbuynum});
+ var txt = "requestData[" + pitem + "].goods[" + item + "].zh_b_num";
+ th.setData({
+ [txt]: promgoodsbuynum
+ });
}
goodsbuynum = buy_num_data.goodsbuynum;
@@ -1705,19 +1753,19 @@ Page({
});
e.doCheckAll();
- t.goods_num=cbuy > 0 ? cbuy : 0,
+ t.goods_num = cbuy > 0 ? cbuy : 0,
e.update_cart(t, pitem, item);
return false;
}
- switch (goodsinfo.prom_type){
- case 1:
+ switch (goodsinfo.prom_type) {
+ case 1:
//读取秒杀
rq.get("/api/ms/flash_sale/getFlashSaleOne/" + oo.stoid + "/" + goodsinfo.prom_id, {
isShowLoading: 0,
- success: function(res_d) {
- if(res_d.data.code==0 && res_d.data.data){
+ success: function (res_d) {
+ if (res_d.data.code == 0 && res_d.data.data) {
if (t.goods_num > store_count) {
wx.showModal({
title: '提示',
@@ -1729,7 +1777,7 @@ Page({
});
e.doCheckAll();
- t.goods_num=store_count;
+ t.goods_num = store_count;
e.update_cart(t, pitem, item);
return false;
@@ -1748,7 +1796,7 @@ Page({
});
e.doCheckAll();
- t.goods_num=false_data.goods_num - false_data.buy_num;
+ t.goods_num = false_data.goods_num - false_data.buy_num;
e.update_cart(t, pitem, item);
return false;
@@ -1766,7 +1814,7 @@ Page({
});
e.doCheckAll();
- t.goods_num=false_data.redisnum;
+ t.goods_num = false_data.redisnum;
e.update_cart(t, pitem, item);
return false;
}
@@ -1782,110 +1830,110 @@ Page({
[txt]: false_data.buy_limit
});
e.doCheckAll();
- t.goods_num=(false_data.buy_limit-promgoodsbuynum)?false_data.buy_limit-promgoodsbuynum:0;
+ t.goods_num = (false_data.buy_limit - promgoodsbuynum) ? false_data.buy_limit - promgoodsbuynum : 0;
e.update_cart(t, pitem, item);
return false;
}
e.update_cart(t, pitem, item);
- }else{
- normal_check(store_count,goodsinfo,wareIds);
+ } else {
+ normal_check(store_count, goodsinfo, wareIds);
}
}
})
- break;
- case 2:
- getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {
- }).then(res => {
- if(res.data.code==0 && res.data.data){
- if (t.goods_num > store_count) {
- wx.showModal({
- title: '提示',
- content: '购买数量超出商品库存'
- });
- var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.setData({
- [txt]: store_count
- });
- e.doCheckAll();
-
- t.goods_num=store_count;
- e.update_cart(t, pitem, item);
-
- return false;
- }
-
- var gr_data = res.data.data;
- //--判断库存--
- if (t.goods_num > gr_data.goods_num - gr_data.buy_num) {
- wx.showModal({
- title: '提示',
- content: '购买数量超出活动库存'
- });
- var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.setData({
- [txt]: gr_data.goods_num - gr_data.buy_num
- });
- e.doCheckAll();
-
- t.goods_num=gr_data.goods_num - gr_data.buy_num;
- e.update_cart(t, pitem, item);
-
- return false;
- }
-
- //--判断redis数量是否已经超出--
- if (t.goods_num > gr_data.redisnum) {
- wx.showModal({
- title: '提示',
- content: '购买数量超出商品库存'
- });
- var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.setData({
- [txt]: gr_data.redisnum
- });
- e.doCheckAll();
-
- t.goods_num=gr_data.redisnum;
- e.update_cart(t, pitem, item);
- return false;
- }
-
- //--活动的限购是不是要判断--
- if (t.goods_num + promgoodsbuynum > gr_data.buy_limit && gr_data.buy_limit > 0) {
- wx.showModal({
- title: '提示',
- content: '购买数量超出团购限购'
- });
- var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
- e.setData({
- [txt]: gr_data.buy_limit
- });
- e.doCheckAll();
-
- t.goods_num=(gr_data.buy_limit-promgoodsbuynum)?gr_data.buy_limit-promgoodsbuynum:0;
- e.update_cart(t, pitem, item);
- return false;
- }
- e.update_cart(t, pitem, item);
-
- }else{
- normal_check(store_count,goodsinfo,wareIds);
- }
+ break;
+ case 2:
+ getApp().request.promiseGet("/api/weshop/goods/groupBuy/getActInfo/" + os.stoid + "/" + goodsinfo.goods_id + "/" + goodsinfo.prom_id, {}).then(res => {
+ if (res.data.code == 0 && res.data.data) {
+ if (t.goods_num > store_count) {
+ wx.showModal({
+ title: '提示',
+ content: '购买数量超出商品库存'
+ });
+ var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
+ e.setData({
+ [txt]: store_count
+ });
+ e.doCheckAll();
+
+ t.goods_num = store_count;
+ e.update_cart(t, pitem, item);
+
+ return false;
+ }
+
+ var gr_data = res.data.data;
+ //--判断库存--
+ if (t.goods_num > gr_data.goods_num - gr_data.buy_num) {
+ wx.showModal({
+ title: '提示',
+ content: '购买数量超出活动库存'
+ });
+ var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
+ e.setData({
+ [txt]: gr_data.goods_num - gr_data.buy_num
+ });
+ e.doCheckAll();
+
+ t.goods_num = gr_data.goods_num - gr_data.buy_num;
+ e.update_cart(t, pitem, item);
+
+ return false;
+ }
+
+ //--判断redis数量是否已经超出--
+ if (t.goods_num > gr_data.redisnum) {
+ wx.showModal({
+ title: '提示',
+ content: '购买数量超出商品库存'
+ });
+ var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
+ e.setData({
+ [txt]: gr_data.redisnum
+ });
+ e.doCheckAll();
+
+ t.goods_num = gr_data.redisnum;
+ e.update_cart(t, pitem, item);
+ return false;
+ }
+
+ //--活动的限购是不是要判断--
+ if (t.goods_num + promgoodsbuynum > gr_data.buy_limit && gr_data.buy_limit > 0) {
+ wx.showModal({
+ title: '提示',
+ content: '购买数量超出团购限购'
+ });
+ var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
+ e.setData({
+ [txt]: gr_data.buy_limit
+ });
+ e.doCheckAll();
+
+ t.goods_num = (gr_data.buy_limit - promgoodsbuynum) ? gr_data.buy_limit - promgoodsbuynum : 0;
+ e.update_cart(t, pitem, item);
+ return false;
+ }
+ e.update_cart(t, pitem, item);
+
+ } else {
+ normal_check(store_count, goodsinfo, wareIds);
+ }
})
- break;
- default:
- normal_check(store_count,goodsinfo,wareIds);
- break
- }
+ break;
+ default:
+ normal_check(store_count, goodsinfo, wareIds);
+ break
+ }
}
});
},
//----------------------更新购物数量,加减,调用接口---------------------
- postCardList_ser: function(t, item, pitem) {
- var e = this,th=e;
+ postCardList_ser: function (t, item, pitem) {
+ var e = this,
+ th = e;
var user_id = getApp().globalData.user_id;
var txt = "service_data[" + pitem + "].goods[" + item + "].goods_num";
e.setData({
@@ -1894,17 +1942,18 @@ Page({
e.doCheckAll();
e.update_cart_ser(t, pitem, item);
},
-
+
//---检验线下库存的数量---
- async check_down_line(t, pitem, item,erpwareid){
- var ob={},th=this;
- await this.check_down_line_next(t, pitem, item,erpwareid,function(res){
- ob=res;
+ async check_down_line(t, pitem, item, erpwareid) {
+ var ob = {},
+ th = this;
+ await this.check_down_line_next(t, pitem, item, erpwareid, function (res) {
+ ob = res;
});
- var log=0;
- if(ob.code==-1){
+ var log = 0;
+ if (ob.code == -1) {
wx.showModal({
title: '提示',
content: '购买数量超出商品库存'
@@ -1914,31 +1963,41 @@ Page({
[txt]: ob.CanOutQty
});
th.doCheckAll();
- t.goods_num=ob.CanOutQty;
+ t.goods_num = ob.CanOutQty;
}
this.update_cart(t, pitem, item);
},
//---检验线下库存的数量的子函数---
- async check_down_line_next(t, pitem, item,erpwareid,func){
+ async check_down_line_next(t, pitem, item, erpwareid, func) {
var goodsinfo = this.data.requestData[pitem].goods[item];
- var lock=0,pick_no,plist;
+ var lock = 0,
+ pick_no, plist;
//先读取门店的lock
- await getApp().request.promiseGet("/api/weshop/order/ware/lock/page",{
- data:{store_id:os.stoid,wareId:t.goods_id,storageId:goodsinfo.pick_id,pageSize:1000}
- }).then(res=>{
- if(res.data.code==0 && res.data.data.total>0){
- for(var i in res.data.data.pageData)
- lock+=res.data.data.pageData[i].outQty;
+ await getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
+ data: {
+ store_id: os.stoid,
+ wareId: t.goods_id,
+ storageId: goodsinfo.pick_id,
+ pageSize: 1000
+ }
+ }).then(res => {
+ if (res.data.code == 0 && res.data.data.total > 0) {
+ for (var i in res.data.data.pageData)
+ lock += res.data.data.pageData[i].outQty;
}
})
//先获取门店的编号
- await getApp().request.promiseGet("/api/weshop/pickup/get/"+os.stoid+"/"+goodsinfo.pick_id,{
- data:{storeId:os.stoid,goodsId:t.goods_id,pickupId:goodsinfo.pick_id}
- }).then(res=>{
- if(res.data.code==0){
- pick_no=res.data.data.pickup_no;
+ await getApp().request.promiseGet("/api/weshop/pickup/get/" + os.stoid + "/" + goodsinfo.pick_id, {
+ data: {
+ storeId: os.stoid,
+ goodsId: t.goods_id,
+ pickupId: goodsinfo.pick_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ pick_no = res.data.data.pickup_no;
}
})
//读取线下的门店库存
@@ -1949,40 +2008,44 @@ Page({
plist=res.data.data.pageData[0];
}
})
- var ob={}; ob.code=1;
+ var ob = {};
+ ob.code = 1;
- if(!plist){
- ob.code=-1;ob.CanOutQty=0;func(ob); return false;
+ if (!plist) {
+ ob.code = -1;
+ ob.CanOutQty = 0;
+ func(ob);
+ return false;
}
- var c_num=t.goods_num;
- if(t.need_downlow_num) c_num=t.need_downlow_num;
+ var c_num = t.goods_num;
+ if (t.need_downlow_num) c_num = t.need_downlow_num;
- if( c_num>plist.CanOutQty-lock){
- ob.code=-1;
- ob.CanOutQty=plist.CanOutQty-lock
- if(ob.CanOutQty<0) ob.CanOutQty=0;
+ if (c_num > plist.CanOutQty - lock) {
+ ob.code = -1;
+ ob.CanOutQty = plist.CanOutQty - lock
+ if (ob.CanOutQty < 0) ob.CanOutQty = 0;
}
func(ob)
},
//--更新购物车---
- update_cart: function(t, pitem, item) {
+ update_cart: function (t, pitem, item) {
var e = this;
getApp().request.put("/api/weshop/cart/update", {
data: t,
- success:async function(ee) {
+ success: async function (ee) {
var txt = "requestData[" + pitem + "].goods[" + item + "].goods_num";
e.setData({
[txt]: t.goods_num,
});
-
- await e.check_prom_activity(pitem)
- for(var i in e.data.requestData){
- if(i!=pitem) await e.check_prom_activity(i)
+
+ await e.check_prom_activity(pitem)
+ for (var i in e.data.requestData) {
+ if (i != pitem) await e.check_prom_activity(i)
}
e.doCheckAll();
getApp().requestCardNum(e);
@@ -1991,11 +2054,11 @@ Page({
},
//--更新购物车---
- update_cart_ser: function(t, pitem, item) {
+ update_cart_ser: function (t, pitem, item) {
var e = this;
getApp().request.put("/api/weshop/cartService/update", {
data: t,
- success:async function(ee) {
+ success: async function (ee) {
var txt = "service_data[" + pitem + "].goods[" + item + "].goods_num";
e.setData({
[txt]: t.goods_num,
@@ -2008,22 +2071,22 @@ Page({
//-------下拉刷新---------
- onPullDownRefresh: function(t) {
+ onPullDownRefresh: function (t) {
this.getCardList();
},
//--------------去结算------------
async checkout() {
- if(!this.data.total_num || this.data.total_num<=0) return false;
- if(!this.data.is_load) return false;
- if(this.data.up_dating) {
+ if (!this.data.total_num || this.data.total_num <= 0) return false;
+ if (!this.data.is_load) return false;
+ if (this.data.up_dating) {
wx.showLoading({
- title:"计算中"
+ title: "计算中"
})
}
- var garr=this.data.requestData;
- var check_is_goods_selected=0;
- if(garr) {
+ var garr = this.data.requestData;
+ var check_is_goods_selected = 0;
+ if (garr) {
for (var ii in garr) {
for (var ij in garr[ii].goods) {
if (garr[ii].goods[ij].selected) {
@@ -2034,7 +2097,7 @@ Page({
}
}
//-- 如果是商品的结算 --
- if(check_is_goods_selected) {
+ if (check_is_goods_selected) {
var glist = ""; //用逗号隔开的
var map = new Map(); //使用map值键进行运算
var map_limit = new Map(); //使用map值键进行存储限购
@@ -2050,7 +2113,7 @@ Page({
for (var j = 0; j < i_arr.length; j++) {
if (i_arr[j].selected && i_arr[j].is_gift != 1) {
- if (i_arr[j].is_pd_normal || i_arr[j].prom_type==0 || i_arr[j].prom_type==3) {
+ if (i_arr[j].is_pd_normal || i_arr[j].prom_type == 0 || i_arr[j].prom_type == 3) {
normal_arr[i_arr[j].goods_id] = 1;
}
@@ -2078,8 +2141,8 @@ Page({
glist += i_arr[j].goods_id + ",";
ab = 1;
//--普通商品,如果有开启线下库存的功能,要调用线下库存进行计算,赠品不要进行调用线下库存---
- if ((i_arr[j].prom_type == 0 || i_arr[j].prom_type == 3 || i_arr[j].prom_type == 5
- || i_arr[j].need_downlow_num ) && th.data.sales_rules == 2 && i_arr[j].is_gift != 1) {
+ if ((i_arr[j].prom_type == 0 || i_arr[j].prom_type == 3 || i_arr[j].prom_type == 5 ||
+ i_arr[j].need_downlow_num) && th.data.sales_rules == 2 && i_arr[j].is_gift != 1) {
//--获取商品的线下商品ID--
var gd = null;
await getApp().request.promiseGet("/api/weshop/goods/get/" + oo.stoid + "/" + i_arr[j].goods_id, {}).then(res => {
@@ -2242,14 +2305,14 @@ Page({
//如果会员是等级会员,商品有等级价,且不是活动商品
if (card_field && val[card_field] > 0 &&
- ((val.prom_type == 0 && g_arr[i].prom_type==0) || val.prom_type == 3 || val.prom_type == 4 || val.prom_type == 5 || val.prom_type == 7 || normal_arr[val.goods_id])) {
+ ((val.prom_type == 0 && g_arr[i].prom_type==0) || val.prom_type == 3 || val.prom_type == 4 || val.prom_type == 5 || val.prom_type == 7 || val.prom_type == 10 || normal_arr[val.goods_id])) {
if (g_arr[i].goods_price != val[card_field]) {
isok = 0;
gname = val.goods_name;
throw "商品价格已经变化";
}
} else {
- if (g_arr[i].goods_price != val.shop_price && g_arr[i].goods_price != val.prom_price && val.prom_price>0) {
+ if (g_arr[i].goods_price != val.shop_price && g_arr[i].goods_price != val.prom_price && val.prom_price > 0) {
isok = 0;
gname = val.goods_name;
throw "商品价格已经变化";
@@ -2292,7 +2355,7 @@ Page({
}
}
});
- }else{
+ } else {
//-- 开始服务卡的购物车购买 --
for (var i = 0; i < this.data.service_data.length; i++) {
var i_arr = this.data.service_data[i].goods;
@@ -2314,7 +2377,7 @@ Page({
},
//结算到最后一个商品
- set_last: function(ab, isok, gname) {
+ set_last: function (ab, isok, gname) {
if (isok == 0) {
t.my_warnning(gname + "商品超出库存", 0, this);
} else {
@@ -2326,7 +2389,7 @@ Page({
//图片失败,默认图片
- bind_bnerr2: function(e) {
+ bind_bnerr2: function (e) {
var _errImg = e.target.dataset.errorimg;
var _errurl = e.target.dataset.url;
var ii = _errurl.indexOf(oo.imghost);
@@ -2337,13 +2400,13 @@ Page({
}
},
//设置点击按钮为true或者false
- radio_chick: function(checked, num) {
+ radio_chick: function (checked, num) {
var th = this;
var requestData = th.data.requestData;
},
//点击编辑后的效果
- edit_cart: function(e) {
+ edit_cart: function (e) {
var type = parseFloat(e.currentTarget.dataset.type);
this.setData({
is_edit: type
@@ -2351,13 +2414,14 @@ Page({
},
//--多个删除购物车商品---
- check_del: function() {
- var glist = "",slist=''; //用逗号隔开的
+ check_del: function () {
+ var glist = "",
+ slist = ''; //用逗号隔开的
var user_id = getApp().globalData.user_id;
var th = this;
var ab = 0; //选中
- var abc=0; //
+ var abc = 0; //
for (var i = 0; i < this.data.requestData.length; i++) {
var i_arr = this.data.requestData[i].goods;
for (var j = 0; j < i_arr.length; j++) {
@@ -2378,104 +2442,112 @@ Page({
}
}
- if (ab == 0 && abc==0) {
+ if (ab == 0 && abc == 0) {
t.my_warnning("未选择商品或者服务卡", 0, th);
return false;
}
- if(ab){
+ if (ab) {
glist = glist.substring(0, glist.length - 1);
//要删除购物车中的商品
var url = '/api/weshop/cart/delIds/' + oo.stoid + '/' + user_id + "/" + glist;
getApp().request.delete(url, {
- success: function(t) {
- // console.log('del done1111111111');
+ success: function (t) {
+ // console.log('del done1111111111');
th.getCardList();
- getApp().requestCardNum(th);
- // console.log('all================', th.data.all_num);
- // getApp().globalData.cartGoodsNum =
+ getApp().requestCardNum(th);
+ // console.log('all================', th.data.all_num);
+ // getApp().globalData.cartGoodsNum =
}
});
}
- if(abc){
+ if (abc) {
slist = slist.substring(0, slist.length - 1);
//要删除购物车中的商品
var url = '/api/weshop/cartService/delIds/' + oo.stoid + '/' + user_id + "/" + slist;
getApp().request.delete(url, {
- success: function(t) {
+ success: function (t) {
th.getCardList();
- getApp().requestCardNum(th);
- console.log('all2================', th.data.all_num);
+ getApp().requestCardNum(th);
+ console.log('all2================', th.data.all_num);
}
});
}
-
+
},
//跳到首页
- goto: function(e) {
- var url='/pages/index/index/index';
- getApp().goto(url);
+ goto: function (e) {
+ var url = '/pages/index/index/index';
+ getApp().goto(url);
},
//---加载更多是靠这个函数----
- onReachBottom: function() {
- if(this.data.requestData && this.data.requestData.length==0) {
+ onReachBottom: function () {
+ if (this.data.requestData && this.data.requestData.length == 0) {
var goods_list = this.selectComponent("#goods_list"); //组件的id
if (goods_list) goods_list.get_list();
}
},
//检查莫个门店下的商品是不是优惠活动,有的话,看要不要送礼品,同时有没有倍增
- check_prom_activity:async function (cindex) {
- var make_up_arr=new Array();
- var th=this;
- var map=new Map();
- var list= JSON.parse(JSON.stringify(this.data.requestData[cindex]));
+ check_prom_activity: async function (cindex) {
+ var make_up_arr = new Array();
+ var th = this;
+ var map = new Map();
+ var list = JSON.parse(JSON.stringify(this.data.requestData[cindex]));
//循环处理活动,看活动商品的数量,用map来出来存储,key为活动id,值是数量
-
- //-- 所有的购物车的数据,要用拷贝的赖进行计算 --
- var alllist= JSON.parse(JSON.stringify(this.data.requestData));
- var list2=alllist[cindex];
- var no_gift_arr=[];
-
- //主要判断有没有促销活动
- var is_sele_prom=0;
- var is_gift_del=0;
- for(var i=0;i {
- if(res.data.code==0){
- prom=res.data.data;
+ var t_prom_list = new Array();
+ for (let p_item of map.entries()) {
+ var prom = null;
+ await getApp().request.promiseGet("/api/weshop/promgoods/get/" + os.stoid + "/" + p_item[0], {}).then(res => {
+ if (res.data.code == 0) {
+ prom = res.data.data;
}
})
//如果活动已经结束
- if(!prom || prom.is_end || prom.end_time{
- if(res.data.code==0) discount=res.data.data;
+ }).then(res => {
+ if (res.data.code == 0) discount = res.data.data;
})
//---如果有打折的信息,赠送的信息,赠送的时候要判断是不是限购数量---
- if(discount && discount['goods_id'] && discount.limit_num>=discount.bs && discount.gift_storecount>=discount.bs){
- //如果这礼品超了情况下
- if(no_gift_arr.indexOf(discount.gift_id)!=-1) continue;
- var o=discount.goodsinfo;
+ if (discount && discount['goods_id'] && discount.limit_num >= discount.bs && discount.gift_storecount >= discount.bs) {
+ //如果这礼品超了情况下
+ if (no_gift_arr.indexOf(discount.gift_id) != -1) continue;
+ var o = discount.goodsinfo;
var newd = {
goods_id: o.goods_id,
goods_num: discount.bs,
@@ -2542,88 +2615,107 @@ Page({
user_id: app.globalData.user_id,
store_id: os.stoid,
goods_price: 0,
+ guide_id:ob.guide_id?ob.guide_id:0,
+ guide_type:ob.guide_type?ob.guide_type:0,
member_goods_price: 0,
goods_name: o.goods_name,
goods_sn: o.goods_sn,
sku: o.sku,
is_gift: 1,
- prom_id:p_item[0],
- prom_type:3,
- selected:1,
- gift_id:discount.gift_id,
- original_img:th.data.imgUrl+o.original_img
+ prom_id: p_item[0],
+ prom_type: 3,
+ selected: 1,
+ gift_id: discount.gift_id,
+ original_img: th.data.imgUrl + o.original_img
};
-
- list2.goods.push(newd);
- var all_num=0;
- var all_limit_num=0;
-
- for(var i in alllist){
- var list_item=alllist[i];
- for(var j in list_item.goods){
- //如果赠品的ID一样,要进行统计数量
- if(list_item.goods[j].is_gift==1 && list_item.goods[j].gift_id==newd.gift_id){
- all_num+= list_item.goods[j].goods_num;
- }
- if(list_item.goods[j].is_gift==1 && list_item.goods[j].gift_id==newd.gift_id && list_item.goods[j].prom_id==p_item[0]){
- all_limit_num+= list_item.goods[j].goods_num;
- }
-
- }
- }
-
- //-- 赠品的数量超出库存数量和会员的限制,这里是保证所有的赠品部会超出 --
- if(discount.gift_storecount{
- if(res.data.code==0){
- add_data=res.data.data;
+ var add_data = null;
+ await getApp().request.promisePost("/api/weshop/cart/save", {
+ data: newd
+ }).then(res => {
+ if (res.data.code == 0) {
+ add_data = res.data.data;
}
})
- if(add_data){
- newd.id=add_data.id;
+ if (add_data) {
+ newd.id = add_data.id;
list.goods.push(newd);
- }
+ }
}
}
//--更新购物车的前台渲染--
- var rq_text="requestData["+cindex+"]";
- this.setData({[rq_text]:list});
+ var rq_text = "requestData[" + cindex + "]";
+ this.setData({
+ [rq_text]: list
+ });
- if(!t_prom_list || t_prom_list.length==0 ) return false;
+ if (!t_prom_list || t_prom_list.length == 0) return false;
//-- 提示凑单的,放在最后显示 --
- for(let prid in t_prom_list){
- var prom=t_prom_list[prid];
+ for (let prid in t_prom_list) {
+ var prom = t_prom_list[prid];
//-- 获取凑单提示 --
- await getApp().request.promiseGet("/api/weshop/promgoodslist/list",{
- data:{prom_id:prom.id}
- }).then(res=>{
- if(res.data.code==0){
- var list=res.data.data;
- for(var i in list){
- var item=list[i];
- if(item.prom_type==0){
- if(ob.price {
+ if (res.data.code == 0) {
+ var list = res.data.data;
+ for (var i in list) {
+ var item = list[i];
+ if (item.prom_type == 0) {
+ if (ob.price < item.condition) {
+ var elem = {
+ prom_id: prom.id,
+ diff_type: item.prom_type,
+ diff: (item.condition - ob.price).toFixed(2),
+ content: JSON.parse(item.preferential_type)
+ }
+ make_up_arr.push(elem);
+ break;
}
- }else{
- if(ob.num0){
- this.setData({[diff_text]:make_up_arr});
- }else{
- this.setData({[diff_text]:null});
+ if (make_up_arr.length > 0) {
+ this.setData({
+ [diff_text]: make_up_arr
+ });
+ } else {
+ this.setData({
+ [diff_text]: null
+ });
}
},
//去凑单
- go_cou_dang:function (e) {
- var prom_id=e.currentTarget.dataset.prom_id;
- var url="/pages/goods/goodsList/goodsList?prom_type=3&prom_id="+prom_id;
+ go_cou_dang: function (e) {
+ var prom_id = e.currentTarget.dataset.prom_id;
+ var url = "/pages/goods/goodsList/goodsList?prom_type=3&prom_id=" + prom_id;
getApp().goto(url);
},
//导航跳转
- nav_goto:function(e){
- var url=e.currentTarget.dataset.url;
- if(!url || url=='') return;
- if(url[0]!='/') url='/'+url;
+ nav_goto: function (e) {
+ var url = e.currentTarget.dataset.url;
+ if (!url || url == '') return;
+ if (url[0] != '/') url = '/' + url;
getApp().goto(url);
},
- refresh_input:function(){
- this.data.btn_click=0;
+ refresh_input: function () {
+ this.data.btn_click = 0;
+ },
+
+ imageLoad: function (e) {
+ var imgwidth = e.detail.width;
+ var imgheight = e.detail.height;
+ //宽高比
+ var ratio = imgwidth / imgheight;
+ //计算的高度值
+ var viewHeight = 715 / ratio;
+ var hei = this.data.max_sw_height;
+
+ if (hei < viewHeight) {
+ this.setData({
+ max_sw_height: viewHeight
+ });
+ }
},
-
- imageLoad:function(e){
- var imgwidth = e.detail.width;
- var imgheight = e.detail.height;
- //宽高比
- var ratio = imgwidth / imgheight;
- //计算的高度值
- var viewHeight = 715 / ratio;
- var hei=this.data.max_sw_height;
-
- if (hei< viewHeight) {
- this.setData({ max_sw_height: viewHeight });
- }
- },
-
- go_url(e){
- var url=e.currentTarget.dataset.url;
+
+ go_url(e) {
+ var url = e.currentTarget.dataset.url;
getApp().goto(url);
},
//跳转到商品
go_gd:function (e) {
+ var user_id=getApp().globalData.user_id;
+ if(!user_id) user_id=0;
var gd= e.currentTarget.dataset.gd;
var good_url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gd;
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:os.stoid,goodsidlist:gd,is_detail:1
+ store_id:os.stoid,goodsidlist:gd,is_detail:1,user_id:user_id
};
//获取秒杀的多规格
getApp().request.promiseGet(url, {data:req_data}).then(res=>{
if(res.data.code==0 && res.data.data){
if(res.data.data.length==1){
- good_url+="&prom_type="+res.data.data[0].prom_type+"&prom_id="+res.data.data[0].act_id;
+ var item=res.data.data[0];
+ switch (item.prom_type){
+ case 9:
+ good_url= '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + gd + '&group_id=' + item.prom_id;
+ break;
+ case 8:
+ good_url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+gd+"&prom_id="+item.prom_id
+ break;
+ default:
+ good_url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gd+"&prom_id="+item.prom_id+"&prom_type=1";
+ break
+ }
}
getApp().goto(good_url);
- }else{
- getApp().goto(good_url);
+ } else {
+ getApp().goto(good_url);
}
})
}
-
+
});
\ No newline at end of file
diff --git a/pages/cart/cart/cart.wxml b/pages/cart/cart/cart.wxml
index 8329100..f2760de 100644
--- a/pages/cart/cart/cart.wxml
+++ b/pages/cart/cart/cart.wxml
@@ -43,6 +43,7 @@
总数量:
{{all_num}}
+ 再买{{freight_free - total_fee}}元可享包邮({{weight_free}}kg内);
编辑
完成
diff --git a/pages/cart/cart/cart.wxss b/pages/cart/cart/cart.wxss
index a977424..9519427 100644
--- a/pages/cart/cart/cart.wxss
+++ b/pages/cart/cart/cart.wxss
@@ -234,6 +234,12 @@ radio {
margin-left: 13rpx;
}
+.login-in .weight_free {
+ font-size: 26rpx;
+ line-height: 48rpx;
+ margin-left: 30rpx;
+}
+
.allradio {
width: 600rpx;
height: 100%;
diff --git a/pages/cart/cart/zh_calculate.js b/pages/cart/cart/zh_calculate.js
index f02e370..517f016 100644
--- a/pages/cart/cart/zh_calculate.js
+++ b/pages/cart/cart/zh_calculate.js
@@ -1,6 +1,6 @@
module.exports = {
//辅助数组添加元素功能
- find_in_add: function(list, ele) {
+ find_in_add: function (list, ele) {
for (var i in list) {
var item = list[i];
if (item.goods_id == ele.goods_id) {
@@ -10,7 +10,7 @@ module.exports = {
list.push(ele);
},
//辅助数组添加元素功能
- find_in_remove: function(list, ele) {
+ find_in_remove: function (list, ele) {
for (var i in list) {
var item = list[i];
if (item.goods_id == ele.goods_id) {
@@ -20,7 +20,7 @@ module.exports = {
},
//主要是把组合购的商品分离出来
- add_zhprom: function(car, a, ele) {
+ add_zhprom: function (car, a, ele) {
var point = car[a];
if (point.zh_map) {
if (point.zh_map[ele.prom_id]) {
@@ -42,7 +42,7 @@ module.exports = {
}
},
//未选中的商品,要从中剔除
- remove_zhprom: function(car, a, ele) {
+ remove_zhprom: function (car, a, ele) {
var point = car[a];
if (point.zh_map) {
if (point.zh_map[ele.prom_id]) {
@@ -52,14 +52,14 @@ module.exports = {
},
//把组合购的商品价格计算出来,同时每个会员都有购买组合商品的上限!zh_b_num是已经购买了多少件
- calculate_zh: function(car, a, th) {
+ calculate_zh: function (car, a, th) {
var car_item = car[a];
var tfeel = 0,
offline_price = 0,
offline_num = 0;
var txt = "requestData[" + a + "].need_list";
- //活动的列表都存储在这里面,可以快速查询
- var zh_prom_goods=car_item.zh_prom_goods;
+ //活动的列表都存储在这里面,可以快速查询
+ var zh_prom_goods = car_item.zh_prom_goods;
if (!car_item.zh_map || !zh_prom_goods) {
var res = {
tfeel: tfeel,
@@ -71,7 +71,7 @@ module.exports = {
});
return res;
}
-
+
//因为可能有多个组合购的活动
for (var i in car_item.zh_map) {
var bitem = car_item.zh_map[i];
@@ -81,14 +81,13 @@ module.exports = {
var need_to_buy = 0;
var all_zhqty = 0; //所有商品要求起购数之和
var no_in_arr = []; //剩余的未加入组合购
- var out_arr=[]; //超出活动限购的商品放入
-
- var title =""; //提示语;
+ var out_arr = []; //超出活动限购的商品放入
+ var zhqty_bz = []; //超量
+ var title = ""; //提示语;
//var goods = bitem.goods;
var goods = zh_prom_goods[act.id];
-
- for (let v3 in car_item.goods) {
- car_item.goods[v3].need_downlow_num=0;
+ for (let v3 in car_item.goods) {
+ car_item.goods[v3].need_downlow_num = 0;
}
//寻找一下
@@ -102,71 +101,76 @@ module.exports = {
return 0;
}
- //寻找一下
- function get_num2(ite) {
- for (let v2 in car_item.goods) {
- var vh = car_item.goods[v2];
- if (vh.goods_id == ite.goods_id) {
- return vh;
- }
- }
- return 0;
- }
+ //寻找一下
+ function get_num2(ite) {
+ for (let v2 in car_item.goods) {
+ var vh = car_item.goods[v2];
+ if (vh.goods_id == ite.goods_id) {
+ return vh;
+ }
+ }
+ return 0;
+ }
for (var i in goods) {
var item = goods[i];
- item.goods_price=get_num(item).goods_price;
- item.offline_price=get_num(item).offline_price;
- var cart_num=get_num(item).goods_num;
- var zh_b_num=get_num2(item).zh_b_num;
- if(!cart_num) {
- if (item.zhqty) {
- title="必买商品未加购,下单立享【"+act.zhprice+"元任选"+act.zhbuyqty+"件】";
- need_to_buy += item.zhqty;
- }
- continue;
+ item.goods_price = get_num(item).goods_price;
+ item.offline_price = get_num(item).offline_price;
+ var cart_num = get_num(item).goods_num;
+ var zh_b_num = get_num2(item).zh_b_num;
+ if (!cart_num) {
+ if (item.zhqty) {
+ title = "必买商品未加购,下单立享【" + act.zhprice + "元任选" + act.zhbuyqty + "件】";
+ need_to_buy += item.zhqty;
+ }
+ continue;
}
- item.cart_num =cart_num;
- //-- 当商品有购买的时候,以及有限购的时候 --
- if(item.buyqty>0){
-
- console.log(111,th.data.in_zhact_gdmap);
-
- var cbuy=item.buyqty-zh_b_num;
- var key=item.goods_id+""+act.id;
- if(th.data.in_zhact_gdmap[key]){
- var cbuy=item.buyqty-zh_b_num-th.data.in_zhact_gdmap[key];
- }
- //当可买的数量为0
- if(cbuy<=0){
- item.num=0;
- out_arr.push({
- price: item.goods_price,offline_price:item.offline_price,goods_id:item.goods_id,num:cart_num
- })
- }else{
- if(cbuy>=cart_num) item.num =cart_num;
- else{
- item.num =cbuy;
- out_arr.push({
- price: item.goods_price,offline_price:item.offline_price,goods_id:item.goods_id,num:cart_num-cbuy
- })
- }
- }
-
- }else{
- item.num =cart_num;
+ item.cart_num = cart_num;
+ //-- 当商品有购买的时候,以及有限购的时候 --
+ if (item.buyqty > 0) {
+ console.log(111, th.data.in_zhact_gdmap);
+ var cbuy = item.buyqty - zh_b_num;
+ var key = item.goods_id + "" + act.id;
+ if (th.data.in_zhact_gdmap[key]) {
+ var cbuy = item.buyqty - zh_b_num - th.data.in_zhact_gdmap[key];
+ }
+ //当可买的数量为0
+ if (cbuy <= 0) {
+ item.num = 0;
+ out_arr.push({
+ price: item.goods_price,
+ offline_price: item.offline_price,
+ goods_id: item.goods_id,
+ num: cart_num
+ })
+ } else {
+ if (cbuy >= cart_num) item.num = cart_num;
+ else {
+ item.num = cbuy;
+ out_arr.push({
+ price: item.goods_price,
+ offline_price: item.offline_price,
+ goods_id: item.goods_id,
+ num: cart_num - cbuy
+ })
+ }
+ }
+
+ } else {
+ item.num = cart_num;
}
- item.goods_price=get_num(item).goods_price;
- item.offline_price=get_num(item).offline_price;
- if(item.cart_num){
- all_price += item.cart_num * item.goods_price;
+ item.goods_price = get_num(item).goods_price;
+ item.offline_price = get_num(item).offline_price;
+ if (item.cart_num) {
+ all_price += item.cart_num * item.goods_price;
}
if (item.num) {
all_num += item.num;
//当有起购数的控制的时候
if (item.zhqty) {
+ zhqty_bz.push(item);
all_zhqty += item.zhqty;
if (item.num < item.zhqty) {
need_to_buy += item.zhqty - item.num;
@@ -174,20 +178,24 @@ module.exports = {
if (item.num > item.zhqty) {
for (var i = 0; i < item.num - item.zhqty; i++) {
no_in_arr.push({
- price: item.goods_price,offline_price:item.offline_price,goods_id:item.goods_id
+ price: item.goods_price,
+ offline_price: item.offline_price,
+ goods_id: item.goods_id
})
}
}
} else {
for (var j = 0; j < item.num; j++) {
no_in_arr.push({
- price: item.goods_price,offline_price:item.offline_price,goods_id:item.goods_id
+ price: item.goods_price,
+ offline_price: item.offline_price,
+ goods_id: item.goods_id
})
}
}
} else {
- if (item.zhqty) {
- title="必买商品未加购,下单立享【"+act.zhprice+"元任选"+act.zhbuyqty+"件】";
+ if (item.zhqty) {
+ title = "必买商品未加购,下单立享【" + act.zhprice + "元任选" + act.zhbuyqty + "件】";
need_to_buy += item.zhqty;
}
}
@@ -195,83 +203,97 @@ module.exports = {
//当满足组合的要求:总数要满足,起购数要满足
if (all_num >= act.zhbuyqty && !need_to_buy) {
- //商品的列表
- for (var u in goods) {
- var ite=goods[u];
- if(ite.buyqty>0 && ite.num>0){
-
- console.log(222,th.data.in_zhact_gdmap);
-
- var key=ite.goods_id+""+act.id;
- if(th.data.in_zhact_gdmap[key]){
- th.data.in_zhact_gdmap[key]+=ite.num;
- }else{
- th.data.in_zhact_gdmap[key]=ite.num;
- }
- }
+ //商品的列表
+ for (var u in goods) {
+ var ite = goods[u];
+ if (ite.buyqty > 0 && ite.num > 0) {
+
+ console.log(222, th.data.in_zhact_gdmap);
+
+ var key = ite.goods_id + "" + act.id;
+ if (th.data.in_zhact_gdmap[key]) {
+ th.data.in_zhact_gdmap[key] += ite.num;
+ } else {
+ th.data.in_zhact_gdmap[key] = ite.num;
+ }
+ }
}
- function sortData(a, b) {
- return a.price - b.price
- }
- if(no_in_arr.length>0) no_in_arr.sort(sortData);
+ function sortData(a, b) {
+ return a.price - b.price
+ }
+ if (no_in_arr.length > 0) no_in_arr.sort(sortData);
var aprice = act.zhprice;
if (act.zhbuyqty > all_zhqty) {
- for (var n = 0; n < act.zhbuyqty-all_zhqty; n++) {
+ for (var n = 0; n < act.zhbuyqty - all_zhqty; n++) {
no_in_arr.pop();
}
}
//看一下剩下的数量有没有满足组合购的要求,以及要不要倍增
if (act.is_bz && no_in_arr.length >= act.zhbuyqty) {
//看一下是几倍
+ let num = 0;
+ let bz_num = 0;
var be = parseInt(no_in_arr.length / act.zhbuyqty);
- aprice += be * act.zhprice;
- for (var m = 0; m < be * act.zhbuyqty; m++) {
- no_in_arr.pop();
+ if (act.is_bzyh && zhqty_bz.length > 0) {
+ for (let i = 0; i < zhqty_bz.length; i++) {
+ let item = zhqty_bz[i];
+ bz_num = be * item.zhqty;
+ for (let j = 0; j < no_in_arr.length; j++) {
+ let i = no_in_arr[j];
+ if (item.goods_id === i.goods_id) {
+ num++
+ }
+ }
+ }
+ }
+ if (bz_num <= num) {
+ aprice += be * act.zhprice;
+ for (var m = 0; m < be * act.zhbuyqty; m++) {
+ no_in_arr.pop();
+ }
}
}
//算一下剩余的钱
if (no_in_arr.length) {
for (var ii in no_in_arr) {
var item = no_in_arr[ii];
- var gitem=get_num2(item);
- if(gitem) {
- if (!gitem.need_downlow_num) {
- gitem.need_downlow_num = 1;
- }
- else {
- gitem.need_downlow_num++;
- }
- aprice += item.price;
- if (item.offline_price) {
- offline_price += gitem.goods_price - gitem.offline_price;
- offline_num += 1;
- }
- }
+ var gitem = get_num2(item);
+ if (gitem) {
+ if (!gitem.need_downlow_num) {
+ gitem.need_downlow_num = 1;
+ } else {
+ gitem.need_downlow_num++;
+ }
+ aprice += item.price;
+ if (item.offline_price) {
+ offline_price += gitem.goods_price - gitem.offline_price;
+ offline_num += 1;
+ }
+ }
}
}
//超量的部分也要计算一下
- if(out_arr.length){
- for (var m in out_arr) {
- var item = out_arr[m];
- var gitem=get_num2(item);
- if(gitem) {
- if (!gitem.need_downlow_num) {
- gitem.need_downlow_num = item.num;
- }
- else {
- gitem.need_downlow_num+=item.num;
- }
- aprice += item.price*item.num;
- if (item.offline_price && th.data.sales_rules==2) {
- offline_price += (gitem.goods_price - gitem.offline_price)*item.num;
- offline_num += item.num;
- }
+ if (out_arr.length) {
+ for (var m in out_arr) {
+ var item = out_arr[m];
+ var gitem = get_num2(item);
+ if (gitem) {
+ if (!gitem.need_downlow_num) {
+ gitem.need_downlow_num = item.num;
+ } else {
+ gitem.need_downlow_num += item.num;
+ }
+ aprice += item.price * item.num;
+ if (item.offline_price && th.data.sales_rules == 2) {
+ offline_price += (gitem.goods_price - gitem.offline_price) * item.num;
+ offline_num += item.num;
+ }
}
- }
+ }
}
@@ -291,16 +313,16 @@ module.exports = {
} else {
for (var ii in goods) {
var item = goods[ii];
- var gitem=get_num2(item);
- if(gitem && gitem.selected) {
+ var gitem = get_num2(item);
+ if (gitem && gitem.selected) {
- gitem.need_downlow_num = gitem.goods_num;
+ gitem.need_downlow_num = gitem.goods_num;
- if (item.offline_price && th.data.sales_rules==2) {
- offline_price += (item.goods_price - item.offline_price) * gitem.goods_num;
- offline_num += gitem.goods_num;
- }
- }
+ if (item.offline_price && th.data.sales_rules == 2) {
+ offline_price += (item.goods_price - item.offline_price) * gitem.goods_num;
+ offline_num += gitem.goods_num;
+ }
+ }
}
if (act.zhbuyqty - all_num > need_to_buy) {
need_to_buy = act.zhbuyqty - all_num;
@@ -317,8 +339,8 @@ module.exports = {
}
} else {
var index = this.find_need_to(need_to, act);
- if(title=='')
- title = "再买" + need_to_buy + "件,下单立享【" + act.zhprice + "元任选" + act.zhbuyqty + "件】";
+ if (title == '')
+ title = "再买" + need_to_buy + "件,下单立享【" + act.zhprice + "元任选" + act.zhbuyqty + "件】";
if (index != -1) {
need_to[index].title = title;
} else {
@@ -339,7 +361,7 @@ module.exports = {
tfeel += all_price;
}
- console.log('nyf111');
+ console.log('nyf111');
console.log(car_item);
var res = {
@@ -352,7 +374,7 @@ module.exports = {
},
- find_need_to: function(list, iter) {
+ find_need_to: function (list, iter) {
if (!list || list.length <= 0) return -1;
for (var i in list) {
var item = list[i];
@@ -364,30 +386,31 @@ module.exports = {
},
//筛选组合购,纯粹的数组按活动id分组
- find_split: function(arr) {
+ find_split: function (arr) {
//过滤只有团购的商品
- var oarr = arr.goods.filter(function(ele) {
+ var oarr = arr.goods.filter(function (ele) {
return ele.prom_type == 7
})
- if(!oarr || oarr.length==0) return null;
+ if (!oarr || oarr.length == 0) return null;
//看一下有多少个不同的团购
- var map = {},dest = [];
+ var map = {},
+ dest = [];
for (var i = 0; i < oarr.length; i++) {
var ai = oarr[i];
- var index=map[ai.prom_id]
- if (!index) {
+ var index = map[ai.prom_id]
+ if (!index) {
dest.push({
prom_id: ai.prom_id,
data: [ai]
});
- map[ai.prom_id]=dest.length; //存储下标
- } else {
- var dj = dest[index-1];
- dj.data.push(ai);
+ map[ai.prom_id] = dest.length; //存储下标
+ } else {
+ var dj = dest[index - 1];
+ dj.data.push(ai);
}
}
return dest;
}
-}
+}
\ No newline at end of file
diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js
index 869c147..621ebfd 100644
--- a/pages/cart/cart2/cart2.js
+++ b/pages/cart/cart2/cart2.js
@@ -146,12 +146,20 @@ Page({
}
});
- //阶梯购的立即购买
+ //阶梯购 或者 组合购的立即购买
if(t.state){
th.data.state=1;
}
-
-
+ getApp().promiseGet("/api/wx/weappSendlist/page", {
+ data: {
+ store_id: os.stoid,
+ typeid: "1001"
+ }}).then(res=>{
+ if (res.data.code == 0 && res.data.data.pageData.length > 0) {
+ var template_id = res.data.data.pageData[0].template_id;
+ th.setData({template_id:template_id});
+ }
+ })
},
onUnload: function () {
this.setData({isclose: 1})
@@ -889,9 +897,8 @@ Page({
}
}
-
- gd.prom_type=gg.prom_type;
- gd.prom_id=gg.prom_id;
+ gd.prom_type=gg.prom_type?gg.prom_type:0;
+ gd.prom_id=gg.prom_id?gg.prom_id:0;
switch (gd.prom_type) {
case 0:
@@ -1036,7 +1043,7 @@ Page({
th.data.old_cartlist = cart_arr;
}
th.setData({
- bn_goods: t.data.data, bn_pickname: gg.pick_name, index: m_wind,
+ bn_goods: gd, bn_pickname: gg.pick_name, index: m_wind,
bn_pick: gg.pick_id, bn_t_exp_t: distr_t, bn_exp_type: et
});
@@ -1344,7 +1351,7 @@ Page({
},
//-------------------计算订单价格-------------------
- calculatePrice: function (t, s) {
+ calculatePrice : function (t, s) {
var th = this;
to.getConfig2(function (ee) {
to.getwuliuprice(async function (rs) {
@@ -1364,10 +1371,11 @@ Page({
var umoney = th.data.userinfo.user_money - th.data.txmon - (th.data.userinfo.frozen_money ? th.data.userinfo.frozen_money : 0);
var freight_free = ee.freight_free; //全场满多少包邮
+ var weight_free = ee.weight_free; //多少kg内包邮
var no_ex_id = ee.no_ex_id;
var no_ex_good = null;
var by_qc = {};
-
+ var out_of_weight=0; //超出多少重量
if (no_ex_id && freight_free > 0) {
//-----------获取不包邮区域,不包邮商品-------
await getApp().request.promiseGet("/api/weshop/areaFeemail/getAreaGoods", {
@@ -1477,6 +1485,16 @@ Page({
o_price_no_zh += item[j].goods_price * item[j].goods_num;
}
o_price += item[j].goods_price * item[j].goods_num;
+
+ //判断是否有设置限制重量包邮
+ if(weight_free){
+ if( item[j]['exp_sum_type']==2 ){
+ if (goods_weight < 0) goods_weight = 0;
+ //累积商品重量 每种商品的重量 * 数量
+ goods_weight += item[j]['weight'] * item[j]['goods_num'];
+ out_of_weight = (weight_free*1000) - goods_weight;
+ }
+ }
}
//判断是不是有组合购的金额
var f_o_price = o_price;
@@ -1526,9 +1544,8 @@ Page({
//计算物流费用
cart_item.shipping_price = 0;
-
//--有不包邮区域,且不免运费,全场的计算,要减到优惠金额 和券的金额--
- if (no_ex_id && freight_free > 0 && (o_price - quan_price) >= freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list)) {
+ if (no_ex_id && freight_free > 0 && (o_price - quan_price) >= freight_free && cart_item.exp_type == 0 && (by_qc.region_list || by_qc.goods_list) && out_of_weight > 0) {
//如果有设置不包邮区域的时候
if (by_qc.region_list != "" && by_qc.region_list != null && by_qc.region_list != undefined) {
if (th.check_by_area(by_qc.region_list)) {
@@ -1651,13 +1668,13 @@ Page({
//统一运费
o_shipping_price += item[j]['uniform_exp_sum'];
break;
- case 2:
- +''
- if (goods_weight < 0) goods_weight = 0;
- //累积商品重量 每种商品的重量 * 数量
- goods_weight += item[j]['weight'] * item[j]['goods_num'];
-
- break;
+ // case 2: //1464行已计算 不必重复计算 注释为:判断是否有设置限制重量包邮
+ // +''
+ // if (goods_weight < 0) goods_weight = 0;
+ // //累积商品重量 每种商品的重量 * 数量
+ // goods_weight += item[j]['weight'] * item[j]['goods_num'];
+ // out_of_weight = (weight_free*1000) - goods_weight;
+ // break;
case 3:
if (goods_piece < 0) goods_piece = 0;
//累积商品数量
@@ -1666,6 +1683,11 @@ Page({
}
}
+ }else{
+ if(goods_weight && out_of_weight !==0){
+ goods_weight=-1;
+ out_of_weight=0;
+ }
}
}
@@ -1676,7 +1698,7 @@ Page({
if (th.data.wu_arr && th.data.wu_arr[cart_item.wind])
code = th.data.wu_arr[cart_item.wind].code;
cart_item.shipping_price =
- th.calculatewuliu(code, o_shipping_price, goods_weight,
+ th.calculatewuliu(code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, th.data.user_addr, freight_free, o_price - quan_price, rs);
if (!th.data.using_quan[pickid] || th.data.using_quan[pickid].isby != 1) {
@@ -1862,7 +1884,7 @@ Page({
//---------计算立即购买----------
- calculatePrice2: function () {
+ calculatePrice2 : function () {
var th = this, good = this.data.bn_goods;
if (!good) return false;
@@ -1904,7 +1926,11 @@ Page({
to.getConfig2(function (ee) {
to.getwuliuprice(async function (rs) {
- var o_shipping_price = 0, goods_weight = -1, goods_piece = -1;
+ var o_shipping_price = 0,goods_weight = -1,goods_piece = -1;
+ var out_of_weight=null; //超出多少重量
+ var freight_free = ee.freight_free; //全场满多少包邮
+ var weight_free = ee.weight_free; //多少kg内包邮
+ var no_ex_id = ee.no_ex_id;
//---如果有选择优惠券的情况下---
var quan_price = 0, bn_pick = th.data.bn_pick;
@@ -1970,8 +1996,10 @@ Page({
break;
case 2:
if (goods_weight < 0) goods_weight = 0;
+ //dw
//累积商品重量 每种商品的重量 * 数量
goods_weight += good['weight'] * good['buynum'];
+ out_of_weight = (weight_free * 1000 ) - goods_weight;
break;
case 3:
if (goods_piece < 0) goods_piece = 0;
@@ -1982,8 +2010,7 @@ Page({
var code = "";
if (th.data.wu_arr && th.data.wu_arr[th.data.index]) code = th.data.wu_arr[th.data.index].code;
- var freight_free = ee.freight_free; //全场满多少包邮
- var no_ex_id = ee.no_ex_id;
+
th.data.is_no_by[th.data.bn_pick] = 0;
var no_by_data = null;
@@ -2019,12 +2046,12 @@ Page({
th.data.is_by[th.data.bn_pick] = 0;
//--------------开始计算物流------------------
var shipping_price =
- th.calculatewuliu(code, o_shipping_price, goods_weight,
+ th.calculatewuliu(code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, th.data.user_addr, freight_free, parseFloat(allpice) - cut_price - quan_price, rs);
//如果有赠品的时候,也要计算赠品的物流费用
if (th.data.buy_now_gift_goods) {
- shipping_price = th.get_now_gift_goods_wuliu(code, o_shipping_price, th.data.user_addr, gift_freight_free,
+ shipping_price = th.get_now_gift_goods_wuliu(code, o_shipping_price, th.data.user_addr, gift_freight_free,out_of_weight,
parseFloat(allpice) - cut_price - quan_price, rs, shipping_price, no_by_data, goods_weight, goods_piece);
}
@@ -2197,10 +2224,26 @@ Page({
});
},
- //--------------------提交订单-----------------------
- async submitForm(t){
- var sub_value = t;
+ requestSubscribe(){
+ const th=this;
+ const template_id = this.data.template_id;
+ wx.getSetting({
+ withSubscriptions:true,
+ success(res){
+ let itemSettings=res.subscriptionsSetting.itemSettings;
+ if(itemSettings && itemSettings[template_id]=="accept"){
+ th.submit_func();
+ }else{
+ th.sendsm(function(){
+ th.submit_func();
+ })
+ }
+ }
+ })
+ },
+ //--------------------提交订单-----------------------
+ async submit_func(){
if (this.data.is_summit_ing == 1) return false; //--提交中退出--
this.data.is_summit_ing = 1;
var th = this, pdata = new Array();
@@ -2244,7 +2287,7 @@ Page({
'user_money': th.data.formData.user_money, //使用余额
'total_amount': th.data.formData.total_amount, //订单总价
'order_amount': th.data.formData.order_amount, //应付
- 'user_note': t.detail.value.user_note, //用户备注
+ 'user_note': th.data.user_note, //用户备注
'store_id': oo.stoid, //商家
'pickup_id': th.data.bn_pick, //门店
'exp_type': th.data.bn_exp_type, //配送方式
@@ -2443,7 +2486,7 @@ Page({
var addr = th.data.user_addr;
if (th.data.is_all_zt == 1) addr = null;
- var val_arr = t.detail.value;
+ var val_arr = th.data.user_note;
if (th.data.is_all_zt != 1)
if (th.data.wu_arr == null || th.data.wu_arr.length <= 0) {
@@ -2476,7 +2519,7 @@ Page({
'user_money': t_item.user_money, //使用余额
'total_amount': t_item.total_amount, //订单总价
'order_amount': t_item.order_amount, //应付
- 'user_note': val_arr['user_note_' + t_item.pickup_id], //用户备注
+ 'user_note': val_arr[i], //用户备注
'store_id': oo.stoid, //商家
'pickup_id': t_item.pickup_id, //门店
'exp_type': t_item.exp_type, //配送方式
@@ -2785,7 +2828,7 @@ Page({
} else if (res.confirm) {
th.data.is_continue = 1;
th.data.is_summit_ing = 0; //是否提交中
- th.submitForm(sub_value);
+ th.submit_func();
}
}
})
@@ -2977,12 +3020,12 @@ Page({
th.calculatePrice();
},
//-------------------计算物流---------------
- calculatewuliu: function (code, o_shipping_price, goods_weight,
+ calculatewuliu: function (code, o_shipping_price, goods_weight,out_of_weight,
goods_piece, user_addr, freight_free, o_price, rs) {
var price = 0, th = this;
price += parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price >= freight_free) {
+ if (freight_free > 0 && o_price >= freight_free && out_of_weight>0) {
return 0;
}
if (user_addr == null) {
@@ -3000,7 +3043,7 @@ Page({
item = item.config;
if (item == null) return o_shipping_price;
//------按重量----------
- if (goods_weight >= 0 && item['money']) {
+ if (goods_weight >= 0 && item['money'] && out_of_weight > 0) {
fw_price = parseFloat(item['money']);
if (goods_weight > item['first_weight']) {
var fw = goods_weight - item['first_weight'];
@@ -3008,6 +3051,13 @@ Page({
fw_price = fw_price + n * parseFloat(item['add_money']);
}
}
+ //------超出重量----------
+ if(out_of_weight < 0){
+ fw_price = parseFloat(item['money']);
+ var out_of_weight = Math.abs(out_of_weight);
+ var n = Math.ceil(out_of_weight / item['second_weight'])
+ fw_price = fw_price + n * parseFloat(item['add_money']);
+ }
//------按件数----------
if (goods_piece > 0 && item['piecemoney']) {
fp_price = parseFloat(item['piecemoney']);
@@ -3887,7 +3937,7 @@ Page({
},
//计算立即购买赠品的物流费用
- get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
+ get_now_gift_goods_wuliu: function (code, o_shipping_price, user_addr, gift_freight_free,gift_weight_free, allpice, rs, shipping_price, no_by_data, goods_weight1, goods_piece1) {
var good = this.data.buy_now_gift_goods;
var goods_weight = -1, goods_piece = -1;
var gift_shipping_price = 0;
@@ -3904,6 +3954,7 @@ Page({
goods_weight += good['weight'] * good['buynum'];
if (goods_weight1 > 0) {
goods_weight += goods_weight1;
+ out_of_weight = (gift_weight_free*1000) - goods_weight;
}
break;
case 3:
@@ -3933,7 +3984,7 @@ Page({
}
var t_shipping_price =
- this.calculatewuliu(code, gift_shipping_price, goods_weight,
+ this.calculatewuliu(code, gift_shipping_price, goods_weight,out_of_weight,
goods_piece, user_addr, gift_freight_free, allpice, rs);
return t_shipping_price;
@@ -4054,17 +4105,17 @@ Page({
});
},
- set_hid_inp:function (e) {
- var index = e.currentTarget.dataset.index;
- var txt = "cartlist[" + index + "].focus";
- this.setData({[txt]:1})
- },
-
- clear_hid_inp:function (e) {
- var index = e.currentTarget.dataset.index;
- var txt = "cartlist[" + index + "].focus";
- this.setData({[txt]:0})
- },
+ // set_hid_inp:function (e) {
+ // var index = e.currentTarget.dataset.index;
+ // var txt = "cartlist[" + index + "].focus";
+ // this.setData({[txt]:1})
+ // },
+ //
+ // clear_hid_inp:function (e) {
+ // var index = e.currentTarget.dataset.index;
+ // var txt = "cartlist[" + index + "].focus";
+ // this.setData({[txt]:0})
+ // },
go_url:function (e) {
var url = e.currentTarget.dataset.url;
@@ -4136,7 +4187,23 @@ Page({
}
}
}
- }
+ },
+ //订阅消息提醒
+ sendsm:function(func)
+ {
+ var template_id = this.data.template_id;
+ // //授权订阅
+ wx.requestSubscribeMessage({
+ tmplIds: [template_id],
+ success(res) {
+ func();
+ },
+ fail(res) {
+ func();
+ }
+ })
+
+ },
});
diff --git a/pages/cart/cart2/cart2.wxml b/pages/cart/cart2/cart2.wxml
index b91f5ad..b3e0d46 100644
--- a/pages/cart/cart2/cart2.wxml
+++ b/pages/cart/cart2/cart2.wxml
@@ -2,38 +2,38 @@
-
@@ -672,9 +672,9 @@
店铺优惠
- 优惠¥{{show_off_price}}
+ 优惠¥{{show_off_price}}
- 不用优惠
+ 不用优惠
diff --git a/pages/cart/cart2/zh_calculate.js b/pages/cart/cart2/zh_calculate.js
index c23727e..8fa478a 100644
--- a/pages/cart/cart2/zh_calculate.js
+++ b/pages/cart/cart2/zh_calculate.js
@@ -2,15 +2,18 @@ var regeneratorRuntime = require('../../../utils/runtime.js');
module.exports = {
//主要的作用,就是把组合购多余的商品进行拆分,
//如果没有达成组合购的要求,所有的商品都打回原价购买
- fir_set_arr: function (c_item,th) {
+ fir_set_arr: function (c_item, th) {
//组合活动,以及组合活动从表的商品
let zh_prom_goods = c_item.zh_prom_goods;
- let goods = c_item.goods; //一个门店中所有的商品
- let tfeel = 0,cut_price=0, offline_price = 0, offline_num = 0;
+ let goods = c_item.goods; //一个门店中所有的商品
+ let tfeel = 0,
+ cut_price = 0,
+ offline_price = 0,
+ offline_num = 0;
let txt_ite = c_item.need_list;
//多个活动要拿来循环一下
for (let i in zh_prom_goods) {
- let title = ""; //提示语;
+ let title = ""; //提示语;
//其中的一个活动
let act_item = zh_prom_goods[i];
let act_goos = act_item.gdlist;
@@ -19,12 +22,12 @@ module.exports = {
let all_num = 0; //商品数量之和
let all_price0 = 0; //商品数量之和
- let aprice=0; //达到活动条件的购买价格
+ let aprice = 0; //达到活动条件的购买价格
let need_to_buy = 0;
let all_zhqty = 0; //所有商品要求起购数之和
let no_in_arr = []; //剩余的未加入组合购
- let out_arr=[]; //超出活动限购的商品放入
-
+ let out_arr = []; //超出活动限购的商品放入
+ let zhqty_bz = []; //超量
//-- 寻找一下 --
function get_num2(ite) {
for (let v2 in goods) {
@@ -39,35 +42,42 @@ module.exports = {
for (let j in act_goos) {
let item = act_goos[j];
let item_j = goods.find(function (ele) {
+ console.log('ele',ele);
return ele.goods_id == act_goos[j].goods_id;
})
//-- 如果有找到的话 --
if (item_j) {
act_goos[j].num = item_j.goods_num;
act_goos[j].goods_price = item_j.goods_price;
- var cart_num=item.cart_num =item_j.goods_num;
- var zh_b_num=item_j.promgoodsbuynum;
- if(item.buyqty>0){
-
- var key=item.goods_id+""+act.id;
- var cbuy=item.buyqty-zh_b_num;
- if(th.data.in_zhact_gdmap[key]){
- var cbuy=item.buyqty-zh_b_num-th.data.in_zhact_gdmap[key];
+ var cart_num = item.cart_num = item_j.goods_num;
+ var zh_b_num = item_j.promgoodsbuynum;
+ if (item.buyqty > 0) {
+
+ var key = item.goods_id + "" + act.id;
+ var cbuy = item.buyqty - zh_b_num;
+ if (th.data.in_zhact_gdmap[key]) {
+ var cbuy = item.buyqty - zh_b_num - th.data.in_zhact_gdmap[key];
}
//当可买的数量为0
- if(cbuy<=0){
- item.num=0;
+ if (cbuy <= 0) {
+ item.num = 0;
out_arr.push({
- price: item.goods_price,offline_price:item.offline_price,goods_id:item.goods_id,num:cart_num
+ price: item.goods_price,
+ offline_price: item.offline_price,
+ goods_id: item.goods_id,
+ num: cart_num
})
- }else{
- if(cbuy>=cart_num) item.num =cart_num;
- else{
- item.num =cbuy;
+ } else {
+ if (cbuy >= cart_num) item.num = cart_num;
+ else {
+ item.num = cbuy;
out_arr.push({
- price: item.goods_price,offline_price:item.offline_price,goods_id:item.goods_id,num:cart_num-cbuy
+ price: item.goods_price,
+ offline_price: item.offline_price,
+ goods_id: item.goods_id,
+ num: cart_num - cbuy
})
}
}
@@ -76,6 +86,7 @@ module.exports = {
all_num += item.num;
//当有起购数的控制的时候
if (item.zhqty) {
+ zhqty_bz.push(item);
all_zhqty += item.zhqty;
if (item.num < item.zhqty) {
need_to_buy += item.zhqty - item.num;
@@ -83,14 +94,18 @@ module.exports = {
if (item.num > item.zhqty) {
for (let i = 0; i < item.num - item.zhqty; i++) {
no_in_arr.push({
- price: item.goods_price, goods_id: item.goods_id, offline_price: item_j.offline_price
+ price: item.goods_price,
+ goods_id: item.goods_id,
+ offline_price: item_j.offline_price
})
}
}
} else {
for (let j = 0; j < item.num; j++) {
no_in_arr.push({
- price: item.goods_price, goods_id: item.goods_id, offline_price: item_j.offline_price
+ price: item.goods_price,
+ goods_id: item.goods_id,
+ offline_price: item_j.offline_price
})
}
}
@@ -105,47 +120,58 @@ module.exports = {
//当满足组合的要求:总数要满足,起购数要满足
if (act && all_num >= act.zhbuyqty && !need_to_buy) {
-
//商品的列表
for (var u in act_goos) {
- var ite=act_goos[u];
- if(ite.buyqty>0 && ite.num>0){
- var key=ite.goods_id+""+act.id;
- if(th.data.in_zhact_gdmap[key]){
- th.data.in_zhact_gdmap[key]+=ite.num;
- }else{
- th.data.in_zhact_gdmap[key]=ite.num;
+ var ite = act_goos[u];
+ if (ite.buyqty > 0 && ite.num > 0) {
+ var key = ite.goods_id + "" + act.id;
+ if (th.data.in_zhact_gdmap[key]) {
+ th.data.in_zhact_gdmap[key] += ite.num;
+ } else {
+ th.data.in_zhact_gdmap[key] = ite.num;
}
}
}
-
-
function sortData(a, b) {
return a.price - b.price
}
-
- if(no_in_arr.length>0) no_in_arr.sort(sortData);
-
+ if (no_in_arr.length > 0) no_in_arr.sort(sortData);
aprice = act.zhprice;
if (act.zhbuyqty > all_zhqty) {
- for (let n = 0; n < act.zhbuyqty-all_zhqty; n++) {
+ for (let n = 0; n < act.zhbuyqty - all_zhqty; n++) {
no_in_arr.pop();
}
}
//看一下剩下的数量有没有满足组合购的要求,以及要不要倍增
if (act.is_bz && no_in_arr.length >= act.zhbuyqty) {
//看一下是几倍
- let be = parseInt(no_in_arr.length / act.zhbuyqty);
- aprice += be * act.zhprice;
- for (let m = 0; m < be * act.zhbuyqty; m++) {
- no_in_arr.pop();
- }
+ let num = 0;
+ let bz_num = 0;
+ let be = parseInt(no_in_arr.length / act.zhbuyqty);
+ if (act.is_bzyh && zhqty_bz.length > 0) {
+ for (let i = 0; i < zhqty_bz.length; i++) {
+ let item = zhqty_bz[i];
+ bz_num = be * item.zhqty;
+ for (let j = 0; j < no_in_arr.length; j++) {
+ let i = no_in_arr[j];
+ if (item.goods_id === i.goods_id) {
+ num++
+ }
+ }
+ }
+ }
+ if (bz_num <= num) {
+ aprice += be * act.zhprice;
+ for (var m = 0; m < be * act.zhbuyqty; m++) {
+ no_in_arr.pop();
+ }
+ }
+
}
-
let goods_map = {};
//算一下剩余的商品
- if(no_in_arr.length) {
+ if (no_in_arr.length) {
for (let ii in no_in_arr) {
let item = no_in_arr[ii];
if (item.offline_price) {
@@ -162,24 +188,24 @@ module.exports = {
}
//超量的部分也要计算一下
- if(out_arr.length){
+ if (out_arr.length) {
for (var m in out_arr) {
var item = out_arr[m];
if (item.offline_price) {
- offline_price += (item.price - item.offline_price)*item.num;
+ offline_price += (item.price - item.offline_price) * item.num;
offline_num += item.num;
}
if (goods_map[item.goods_id]) {
var num = goods_map[item.goods_id];
- num+=item.num
- goods_map[item.goods_id] =num;
+ num += item.num
+ goods_map[item.goods_id] = num;
} else {
goods_map[item.goods_id] = item.num;
}
}
}
- if(Object.keys(goods_map).length) {
+ if (Object.keys(goods_map).length) {
//这里就开始拆分提交订单时的列表
for (let j in goods_map) {
//map中存的就是商品的数量
@@ -196,24 +222,26 @@ module.exports = {
goods.push(new_g);
//如果商品的数量已经为空了
- if(goods[idx].goods_num<=0){
- goods.splice(idx,1);
+ if (goods[idx].goods_num <= 0) {
+ goods.splice(idx, 1);
}
}
}
//-- 只统计是参与活动的商品 --
- for(var ij in goods){
- var iter=goods[ij];
- if(iter.prom_type!=7 || iter.prom_id!=act.id){ continue; }
- all_price0+=iter.goods_num*iter.goods_price;
+ for (var ij in goods) {
+ var iter = goods[ij];
+ if (iter.prom_type != 7 || iter.prom_id != act.id) {
+ continue;
+ }
+ all_price0 += iter.goods_num * iter.goods_price;
}
//-- 活动的条件已经满足 --
c_item.zh_prom_goods[act.id].is_has_zh = 1;
c_item.is_has_zh = 1;
c_item.zh_prom_goods[act.id].actual_price = aprice;
- c_item.zh_prom_goods[act.id].cut_price =all_price0-aprice;
+ c_item.zh_prom_goods[act.id].cut_price = all_price0 - aprice;
//-- 设置还需要购买多少件,享受活动,前段显示 --
let need_to = c_item.need_list;
@@ -257,7 +285,7 @@ module.exports = {
txt_ite = need_to;
}
tfeel += aprice;
- cut_price+=all_price0-aprice;;
+ cut_price += all_price0 - aprice;;
}
c_item.zh_all_price = tfeel;
@@ -315,10 +343,10 @@ module.exports = {
calc_zh_split_price: async function (c_arr, th) {
//-- 循环处理 --
for (var k in c_arr) {
- var cart_item = c_arr[k]; //就是每一单的意思
- var ord_goods = c_arr[k].goods; //就是每一单的从表的意思
+ var cart_item = c_arr[k]; //就是每一单的意思
+ var ord_goods = c_arr[k].goods; //就是每一单的从表的意思
- var zh_prom_goods = cart_item.zh_prom_goods; //一单中所有的组合购的集合
+ var zh_prom_goods = cart_item.zh_prom_goods; //一单中所有的组合购的集合
var item_map = {};
for (let i in zh_prom_goods) {
let item = zh_prom_goods[i];
@@ -330,14 +358,14 @@ module.exports = {
return ele.prom_type == 7 && ele.prom_id == i;
})
var all_good_price = 0;
- var post_gd=[];
+ var post_gd = [];
for (let j in glist) {
let item = glist[j];
all_good_price += item.goods_price * item.goods_num;
- var gitem={
- goods_id:item.goods_id,
- goods_num:item.goods_num,
- goods_price:item.goods_price
+ var gitem = {
+ goods_id: item.goods_id,
+ goods_num: item.goods_num,
+ goods_price: item.goods_price
}
post_gd.push(gitem);
}
@@ -365,7 +393,7 @@ module.exports = {
'goods': post_gd
}
var pt_res = null;
- await getApp().request.promisePost("/api/weshop/order/getGoodsSplit", {
+ await getApp().request.promisePost("/api/weshop/order/getGoodsSplit", {
is_json: 1,
data: pt_data
}).then(res => {
@@ -376,7 +404,7 @@ module.exports = {
if (pt_res) {
for (var io in glist) {
var goods_id = glist[io].goods_id;
- item_map[goods_id]={};
+ item_map[goods_id] = {};
//平摊赋值
item_map[goods_id].account_fir = th.arr_get_goods(goods_id, pt_res).fisrt_account;
item_map[goods_id].account_yu_fir = th.arr_get_goods(goods_id, pt_res).fisrt_account_yu;
@@ -404,4 +432,4 @@ module.exports = {
}
-}
+}
\ No newline at end of file
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index c088f9b..377b76f 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -779,7 +779,7 @@ Page({
var price =0,th=this;
price +=parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price > freight_free){ return 0;}
+ if (freight_free > 0 && o_price >= freight_free){ return 0;}
if (user_addr==null) { return 0; }
//计算物流的config item;
var item=null;
diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js
index 7d21c37..f55f477 100644
--- a/pages/cart/cart_wk/cart_wk.js
+++ b/pages/cart/cart_wk/cart_wk.js
@@ -470,7 +470,7 @@ Page({
var price = 0, th = this;
price += parseFloat(o_shipping_price);
//如果是包邮
- if (freight_free > 0 && o_price > freight_free) { return 0; }
+ if (freight_free > 0 && o_price >= freight_free) { return 0; }
if (user_addr == null) { return 0; }
//计算物流的config item;
var item = null;
diff --git a/pages/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js
index 688561f..590c300 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.js
+++ b/pages/giftpack/birthdaygift/birthdaygift.js
@@ -119,7 +119,7 @@ Page({
var th = this;
th.setData({
getActId: options.actId,
- giftID: options.giftBagId
+ giftID: options.giftBagId,
})
},
@@ -131,6 +131,7 @@ Page({
return false;
}
this.GetList();
+ this.is_birthdayInfo()
},
GetReceive: function() {
@@ -175,6 +176,29 @@ Page({
}
},
+ //获取生日有礼信息
+ is_birthdayInfo: function(e) {
+ var th = this;
+ var url = `/api/weshop/marketing/get/${a.stoid}/${th.data.getActId}`;
+ console.log(th.data.getActId);
+ getApp().request.promiseGet(url, {
+
+ }).then(res => {
+ console.log(res,20000);
+ if (res.data.code == 0) {
+ let birthdayStyle=`
+ --bg-color:${res.data.data.actBgColor};
+ --color:${res.data.data.actFontColor};
+ `
+ th.setData({
+ bimg: res.data.data.actBoundImg,
+ birthdayStyle,
+ // actFontColor: res.data.actFontColor, //字体颜色
+ // actBgColor: res.data.actBgColor, //背景颜色
+ })
+ }
+ })
+ },
//界面跳转
goto: function(e) {
var url = e.currentTarget.dataset.url;
diff --git a/pages/giftpack/birthdaygift/birthdaygift.wxml b/pages/giftpack/birthdaygift/birthdaygift.wxml
index 1aa6519..ec36d55 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.wxml
+++ b/pages/giftpack/birthdaygift/birthdaygift.wxml
@@ -1,6 +1,6 @@
-
+
-
+
diff --git a/pages/giftpack/birthdaygift/birthdaygift.wxss b/pages/giftpack/birthdaygift/birthdaygift.wxss
index b2b445a..24a7647 100644
--- a/pages/giftpack/birthdaygift/birthdaygift.wxss
+++ b/pages/giftpack/birthdaygift/birthdaygift.wxss
@@ -246,7 +246,7 @@
}
.top_box_image button {
margin: 15rpx 95rpx 0rpx 95rpx;
- background: #fe6a6a;
+ background: var(--color);
border-radius: 50rpx;
line-height: 60rpx;
height: 60rpx;
@@ -275,7 +275,7 @@
}
.button {
margin: 0 30rpx;
- background: #61d3dd;
+ background:var(--bg-color);
border-radius: 50rpx;
line-height: 80rpx;
height: 80rpx;
@@ -308,7 +308,7 @@
width: 100%;
}
.foot_button_buy {
- background: #e4010c;
+ background:var(--color);
color: #FFFFFF;
width: 400rpx;
height: 70rpx;
@@ -351,4 +351,9 @@ button::after {
width: 20rpx;
height: 90rpx;
z-index: 5;
+}
+
+.font_and_bg {
+ background-color: var(--bg-color);
+ color:var(--color);
}
\ No newline at end of file
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index 3c52c12..06a7141 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -415,12 +415,13 @@ Page({
if (pagePath.indexOf('/') != 0) {
pagePath = '/' + pagePath;
}
- pagePath += "?isBuy=1" + "&lbId=" + this.data.lbId + "&first_leader="+ this.data.getUserID;
+ pagePath += "?isBuy=1" + "&lbId=" + this.data.getGiftID + "&first_leader="+ this.data.getUserID;
// if (this.data.isBuy == 0) {
// pagePath += "&orderSn=" + this.data.orderSn;
// } else {
// pagePath += "&lbId=" + this.data.getGiftID;
// }
+ // console.log('pagePath', pagePath);
return {
title: "礼包详情",
path: pagePath,
diff --git a/pages/goods/goodsInfo/buy_pt.wxml b/pages/goods/goodsInfo/buy_pt.wxml
index 662f1f3..cb72777 100644
--- a/pages/goods/goodsInfo/buy_pt.wxml
+++ b/pages/goods/goodsInfo/buy_pt.wxml
@@ -144,7 +144,7 @@
{{sec_sto.name}}
- {{item.pickup_name}}
+ {{item.pickup_name}}
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index 1f2403f..c6b12d9 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -254,7 +254,6 @@ Page({
//------初始化加载----------
onLoad: function (t) {
-
var ee = this,
that = ee,
th = ee,
@@ -408,7 +407,6 @@ Page({
var user = getApp().globalData.userInfo;
if (!user) return false;
clearInterval(ti);
-
if (user.card_field && user['card_expiredate']) {
var str = user['card_expiredate'].replace(/-/g, '/');
var end = new Date(str);
@@ -527,7 +525,12 @@ Page({
}).then(res => {
if (res.data.code == 0 && res.data.data.total > 0) {
plist = res.data.data.pageData[0];
- }
+ } else {
+ wx.showToast({
+ title: '库存不足,请更换其他门店',
+ icon: 'none',
+ });
+ };
if (plist && plist.CanOutQty - lock > 0) {
ee.CanOutQty = plist.CanOutQty - lock;
} else {
@@ -686,7 +689,7 @@ Page({
mapurl_f_img = res1.data.data.video_img;
}
})
-
+ this.getHistoryBuy(); //获取历史购买
ee.setData({
gallery: gallery,
is_collect: is_collect,
@@ -702,7 +705,6 @@ Page({
//---展示---
onShow: function () {
- // console.log('djfijsaoifjoisadjfoij');
var goods_list = null, th = this, that = this;
var show_prew_img = this.data.show_prew_img
if (show_prew_img) {
@@ -1520,38 +1522,36 @@ Page({
}
else {
- if(newd.prom_type==10){
- //----先看会员在购物车中是否加入了该商品,立即购买的-----
- getApp().request.get("/api/weshop/cart/page", {
- data: {
- store_id: e.data.stoid,
- user_id: oo.user_id,
- state:1
- },
- success: function (res) {
- //-------如果购物车中有相关的数据---------
- if (res.data.code==0 && res.data.data.total > 0) {
- for(let j in res.data.data.pageData){
- let item_j=res.data.data.pageData[j];
- var url = '/api/weshop/cart/del/' +e.data.stoid+ '/' + item_j.id;
- getApp().request.delete(url, {});
- }
+ //这一步主要是要让立即购买 走 购物车的逻辑 参与活动
+ if(newd.prom_type==10 || newd.prom_type==7){
+ //----先看会员在购物车中是否加入了该商品,立即购买的-----
+ getApp().request.get("/api/weshop/cart/page", {
+ data: {
+ store_id: e.data.stoid,
+ user_id: oo.user_id,
+ state:1
+ },
+ success: function (res) {
+ //-------如果购物车中有相关的数据---------
+ if (res.data.code==0 && res.data.data.total > 0) {
+ for(let j in res.data.data.pageData){
+ let item_j=res.data.data.pageData[j];
+ var url = '/api/weshop/cart/del/' +e.data.stoid+ '/' + item_j.id;
+ getApp().request.delete(url, {});
}
- newd.state=1;
- getApp().request.post("/api/weshop/cart/save", {
- data: newd,
- success: function (t) {
- th.closeSpecModal();
- getApp().goto("/pages/cart/cart2/cart2?state=1");
- }
- });
-
-
- }
- })
- return false;
- }
-
+ }
+ newd.state=1;
+ getApp().request.post("/api/weshop/cart/save", {
+ data: newd,
+ success: function (t) {
+ th.closeSpecModal();
+ getApp().goto("/pages/cart/cart2/cart2?state=1");
+ }
+ });
+ }
+ })
+ return false;
+ }
if (th.data.prom_goods) {
var prom_d = th.data.prom_goods;
@@ -2409,9 +2409,9 @@ Page({
}
},
- //-----------选择属性的按钮事件----------
+ //-----------选择属性的按钮事件----------
sele_spec: function (e) {
- var that = this, ee = this, th = this;
+ var that = this;
var gid = e.currentTarget.dataset.gid;
var nor = e.currentTarget.dataset.nor;
@@ -2430,25 +2430,33 @@ Page({
break
}
}
+ console.log(item,2000);
+ var cur_price = item.shop_price;
+ if (getApp().globalData.userInfo && getApp().globalData.userInfo.card_field) {
+ var cfile = getApp().globalData.userInfo.card_field;
+ console.log('cfile',cfile);
+ if (item[cfile]) {
+ cur_price =item[cfile];
+ }
+ }
+ var txt = (cur_price / item.market_price * 10).toFixed(2).toString();
+ txt = parseFloat(txt);
+ item['disc'] = txt;
if (item) this.setData({
sele_g: item,
- gid: gid
+ gid: gid,
+ data:item,
});
-
-
that.check_is_youhui(gid, that.data.is_normal);
- this.get_sto(that.data.is_normal);
-
-
//默认门店要拿下门店库存
if (that.data.sales_rules == 2 && that.data.def_pick_store) {
var lock = 0, plist = null;
//先读取门店的lock,采用链式写法,少用await
getApp().request.promiseGet("/api/weshop/order/ware/lock/page", {
- data: { store_id: os.stoid, wareId: ee.data.sele_g.goods_id, storageId: that.data.def_pick_store.pickup_id, pageSize: 1000 }
+ data: { store_id: os.stoid, wareId: that.data.sele_g.goods_id, storageId: that.data.def_pick_store.pickup_id, pageSize: 1000 }
}).then(res => {
if (res.data.code == 0 && res.data.data.total > 0) {
for (var i in res.data.data.pageData)
@@ -2456,7 +2464,7 @@ Page({
}
//---通过接口获取门店的线下库存信息--
return getApp().request.promiseGet("/api/weshop/goods/getWareStorages", {
- data: { storageNos: that.data.def_pick_store.pickup_no, wareIds: encodeURIComponent(th.data.sele_g.erpwareid), storeId: os.stoid }
+ data: { storageNos: that.data.def_pick_store.pickup_no, wareIds: encodeURIComponent(that.data.sele_g.erpwareid), storeId: os.stoid }
})
}).then(res => {
if (res.data.code == 0 && res.data.data.total > 0) {
@@ -2468,11 +2476,9 @@ Page({
that.data.def_pick_store.CanOutQty = 0;
}
//--给门店赋值线下库存--
- th.setData({ def_pick_store: that.data.def_pick_store });
+ that.setData({ def_pick_store: that.data.def_pick_store });
})
}
-
-
this.sele_spec_chech_activity();
},
@@ -2576,6 +2582,7 @@ Page({
//---------拿出门店分类和门店------------
get_sto(e) {
+ console.log('get_sto')
var th = this, that = this;
var is_normal = e;
@@ -3382,8 +3389,8 @@ Page({
await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
1: 1
}).then(res => {
- console.log(res,3114);
var em = res;
+ var flag=null;
if (em.data.code == 0) {
if (em.data.data <= 0) ee.setData({
prom_r_null: 1
@@ -3391,8 +3398,7 @@ Page({
//拿取价格并且判断时间--
getApp().request.get("/api/weshop/teamlist/get/" +
os.stoid + "/" + prom_id, {
- success: function (t) {
- console.log(t,3124);
+ success: async function (t) {
if (t.data.code != 0) {
ee.get_normal(gid);
return false;
@@ -3431,25 +3437,40 @@ Page({
}
});
return false
- ee.setData({
- prom_type: 0,
- isshow: 1,
- });
- ee.get_sku(os.stoid, ee.data.data, gid);
- ee.get_sto();
- return false;
}
+ await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{
+ data:{
+ store_id: os.stoid,
+ is_end: 0,
+ is_show: 1,
+ user_id: getApp().globalData.user_id,
+ pageSize:1000
+ }
+ }).then(res=>{
+
+ let pd_list=res.data.data.pageData;
+ if(res.data.code==0 && pd_list.length>0){
+ flag =pd_list.some(pd=>{
+ return pd.goods_id==gid
+ })
+ }
+ })
+ if(!flag){
+ ee.get_normal(gid);
+ return false;
+
+ }
//-------查看自己是不是有买过该团的商品,并还为支付,或者在进行中-------
- getApp().request.get("/api/weshop/order/page", {
+ await getApp().request.promiseGet("/api/weshop/order/page", {
data: {
pt_prom_id: prom_id,
user_id: oo.user_id,
store_id: os.stoid,
pageSize: 1,
page: 1
- },
- success: function (e) {
+ }
+ }).then(e=>{
if (e.data.code == 0 && e.data.data.pageData.length > 0) {
var odr = e.data.data.pageData[0];
th.data.buy_order = odr;
@@ -3495,8 +3516,7 @@ Page({
th.data.wk_order_id = odr.order_id;
}
}
- },
- });
+ })
//----------查看阶梯团------------
if (t.data.data.ct_rylist != "null" && t.data.data.ct_rylist != "" && t.data.data.ct_rylist != null && t.data.data.ct_rylist != undefined) {
@@ -5781,7 +5801,7 @@ Page({
//调用接口判断订单优惠,
getApp().request.get("/api/weshop/goods/getGoodsPromList/" + os.stoid + "/" + gid + "/0", {
success: function (res) {
- console.log(res);
+
if (res.data.code == 0 && res.data.data) {
var r_data = res.data.data;
var max = 0, min = 0;
@@ -5939,11 +5959,11 @@ Page({
})
},
- previewImage() {
+ previewImage(e) {
this.data.show_prew_img = 1;
wx.previewImage({
//将图片预览出来
- urls: [this.data.shareImgPath]
+ urls: [this.data.sele_g.original_img]
});
},
@@ -6212,11 +6232,38 @@ Page({
this.check_is_youhui(gid,1);
this.data.is_normal=1;
},
+
+
+ // 促销 -> 送礼包 -> 查看详情
+ viewLbDetails(e) {
+ let id = e.currentTarget.dataset.id; // 获取礼包id
+ let url = `/packageA/pages/myGiftDetails/myGiftDetails?btn=0&index=0&id=${id}`; // btn=0 控制跳转到的页面不显示按钮
+ // console.log('myurl', url);
+ getApp().goto(url);
+ },
+
go_more_ladder:function (e) {
var prom_id=e.currentTarget.dataset.id;
getApp().goto("/pages/goods/goodsList/goodsList?ladder_id="+prom_id);
- }
-
-
+ },
+ getHistoryBuy() {
+ let _this=this;
+ let req_data = {
+ store_id:os.stoid,
+ goods_id:this.data.gid,
+ pay_status:1,
+ rndid:1
+ };
+ getApp().request.promiseGet('/api/weshop/ordergoods/list',{
+ data:req_data,
+ })
+ .then(res=>{
+ if(t.ajax_ok(res)){
+ _this.setData({
+ historyBuyInfo:res.data.data.pageData,
+ })
+ }
+ })
+ }
});
diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml
index 02dd02b..2af28f2 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxml
+++ b/pages/goods/goodsInfo/goodsInfo.wxml
@@ -2,16 +2,35 @@
+
-
+
{{item.name}}
-
+
+
+
+
+
+
+
+
+
+
+
+ {{item.nickname}}下单成功
+
+
+
+
+
+
+
@@ -218,71 +237,7 @@
-
-
-
-
-
- 已参团4人,还差1人成团
-
- 查看奖励
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- *5人成团,5人得商品,5人全额退款并获得惊喜礼品!
-
-
-
-
+
@@ -327,12 +282,10 @@
-
-
-
+
@@ -570,7 +523,7 @@
领券
-
+
满{{item.condition}}减{{item.money}}
@@ -586,29 +539,35 @@
- 促销
+
-
-
-
- 消费满{{item.condition}}
- 件
- 元
-
-
- 减价{{item.money}}元;
- 打{{item.sale}}折;
- 包邮;
- 送{{tem.intValue}}积分;
- 送{{item.couponMoney}}元优惠券;
- 送商品{{item.goods_name}};
- 送{{item.lbtitle}};
+
+ 促销
+
+
+
+ 消费满{{item.condition}}{{item.prom_type==1 ? '件':'元'}}享优惠
+
+
+
+
+
+
+
+ 减价{{item.money}}元
+ 打{{item.sale}}折
+ 包邮
+ 送{{item.intValue}}积分
+ 送{{item.couponMoney}}元优惠券
+ 送商品{{item.goods_name}}
+ 送{{item.lbtitle}}
-
-
+
+
@@ -633,7 +592,7 @@
- 订单优惠
+ 订单优惠
@@ -1190,7 +1149,7 @@
-
+
{{sele_g.goods_name}}
@@ -1396,7 +1355,7 @@
{{sec_sto.name}}
-
+
{{item.pickup_name}}
@@ -1421,7 +1380,7 @@
优惠信息
-
+
{{item.title}}
@@ -1488,7 +1447,7 @@
- 订单金额满{{item.condition}}元可用
+ {{item.name}}
{{filters.replace_time2(item.start)}} 至 {{filters.replace_time2(item.end)}}
diff --git a/pages/goods/goodsInfo/goodsInfo.wxss b/pages/goods/goodsInfo/goodsInfo.wxss
index 3a065c7..88fede6 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxss
+++ b/pages/goods/goodsInfo/goodsInfo.wxss
@@ -1,47 +1,60 @@
@import "../../../utils/wxParse/wxParse.wxss";
-.container { margin-bottom: 100rpx; overflow: hidden;padding-top: 80rpx;}
+
+.container {
+ margin-bottom: 100rpx;
+ overflow: hidden;
+ padding-top: 80rpx;
+}
+
image {
- vertical-align: top;
+ vertical-align: top;
+}
+
+.goods-detail {
+ overflow: hidden
}
-.goods-detail{overflow: hidden}
.type-navbar {
- display: flex;
- justify-content: center;
- width: 100%;
- position: fixed;
- top: 0;
- z-index: 999;
- /* height: 80rpx; */
- /* margin-bottom: 20rpx; */
- background-color: #fff;
- border-top: 2rpx solid #ebedf0;
- /* border-bottom: 1rpx #fafafa solid; */
+ display: flex;
+ justify-content: center;
+ width: 100%;
+ position: fixed;
+ top: 0;
+ z-index: 999;
+ /* height: 80rpx; */
+ /* margin-bottom: 20rpx; */
+ background-color: #fff;
+ border-top: 2rpx solid #ebedf0;
+ /* border-bottom: 1rpx #fafafa solid; */
}
+
.type-box {
- width: 25%;
- box-sizing: border-box;
- font-size: 32rpx;
- line-height: 76rpx;
- padding: 0 20rpx;
- text-align: center;
- display: inline-block;
- overflow: hidden;
+ width: 25%;
+ box-sizing: border-box;
+ font-size: 32rpx;
+ line-height: 76rpx;
+ padding: 0 20rpx;
+ text-align: center;
+ display: inline-block;
+ overflow: hidden;
}
+
.type-navbar-item {
- /* border-bottom: 4rpx solid #fff; */
- display: flex;
- justify-content: center;
- width: 100%;
- font-size: 26rpx;
+ /* border-bottom: 4rpx solid #fff; */
+ display: flex;
+ justify-content: center;
+ width: 100%;
+ font-size: 26rpx;
}
+
.type-item-on {
color: #F95D74;
font-weight: bold;
- /* border-bottom: 4rpx solid #F95D74; */
+ /* border-bottom: 4rpx solid #F95D74; */
position: relative;
font-size: 30rpx;
}
+
.type-item-on:after {
content: '';
position: absolute;
@@ -53,651 +66,721 @@ image {
bottom: 0;
margin: 0 auto;
}
+
.swiper_box {
- width: 100%;
- height: 750rpx;
+ width: 100%;
+ height: 750rpx;
}
+
.goods-title {
- display: flex;
- justify-content: space-between;
- /* overflow: hidden; */
- /* height: 108rpx; */
+ display: flex;
+ justify-content: space-between;
+ /* overflow: hidden; */
+ /* height: 108rpx; */
}
+
.goods-name {
- /* width: 560rpx; */
- /* line-height: 46rpx; */
- font-size: 32rpx;
- font-weight: bold;
- color: #333;
- /* margin-top: 30rpx;
+ /* width: 560rpx; */
+ /* line-height: 46rpx; */
+ font-size: 32rpx;
+ font-weight: bold;
+ color: #333;
+ /* margin-top: 30rpx;
margin-bottom:30rpx; */
- flex: 1;
- text-align: justify;
- margin: 10rpx 0 20rpx;
+ flex: 1;
+ text-align: justify;
+ margin: 10rpx 0 20rpx;
}
.goods-collect {
- width: 112rpx;
- padding-top: 30rpx;
+ width: 112rpx;
+ padding-top: 30rpx;
}
.collect-img {
- width: 50rpx;
- height: 44rpx;
- margin: 0 auto;
- overflow: hidden;
+ width: 50rpx;
+ height: 44rpx;
+ margin: 0 auto;
+ overflow: hidden;
}
.collect-des {
- text-align: center;
- font-size: 24rpx;
- color: #333;
+ text-align: center;
+ font-size: 24rpx;
+ color: #333;
}
.goods-price {
- font-size: 60rpx;
- /* padding: 20rpx 34rpx; */
- /* padding:0rpx 34rpx; */
- /* line-height: 60rpx; */
- color: #999;
- padding: 20rpx;
- /* margin-top: 46rpx; */
- /* margin-top:26rpx;
+ font-size: 60rpx;
+ /* padding: 20rpx 34rpx; */
+ /* padding:0rpx 34rpx; */
+ /* line-height: 60rpx; */
+ color: #999;
+ padding: 20rpx;
+ /* margin-top: 46rpx; */
+ /* margin-top:26rpx;
padding-bottom:20rpx; */
}
.prom-info {
- margin: 10rpx 0;
- color: #f23030;
+ margin: 10rpx 0;
+ color: #f23030;
}
.prom-info>.prom-type {
- color: white;
- background-color: #f23030;
- margin-right: 14rpx;
- padding: 2rpx 8rpx;
- border-radius: 4rpx;
+ color: white;
+ background-color: #f23030;
+ margin-right: 14rpx;
+ padding: 2rpx 8rpx;
+ border-radius: 4rpx;
}
+
.market-price {
- /* display: flex;
+ /* display: flex;
margin-left: -5rpx; */
}
-.market-price .yuan{
- /* top:24rpx; */
- font-size: 30rpx
+.market-price .yuan {
+ /* top:24rpx; */
+ font-size: 30rpx
}
.market-price>view>text {
- text-decoration: line-through;
+ text-decoration: line-through;
}
-.market-price>.yj{
- color: #999999; font-size: 24rpx;/* margin-left: 16rpx;position: relative;top:30rpx; */
- display: inline-block;
+.market-price>.yj {
+ color: #999999;
+ font-size: 24rpx;
+ /* margin-left: 16rpx;position: relative;top:30rpx; */
+ display: inline-block;
}
-.goods-price>.tm{ color: #999999; font-size: 26rpx;margin-top: 10rpx;}
+.goods-price>.tm {
+ color: #999999;
+ font-size: 26rpx;
+ margin-top: 10rpx;
+}
.goods-num {
- display: flex;
- font-size: 24rpx;
- justify-content: space-between;
+ display: flex;
+ font-size: 24rpx;
+ justify-content: space-between;
+}
+
+.goods-detail .twen {
+ background: #fff;
+ height: 60rpx;
+ line-height: 60rpx;
+ font-size: 30rpx;
+ padding-left: 30rpx;
+ display: flex;
+}
+
+.goods-detail .twen .img {
+ width: 32rpx;
+ height: 32rpx;
+ margin-left: 200rpx;
+ background: #fff
}
-.goods-detail .twen{
- background: #fff;height: 60rpx; line-height: 60rpx; font-size: 30rpx;padding-left: 30rpx;display: flex;
+.goods-detail .twen image.img {
+ vertical-align: auto;
}
-.goods-detail .twen .img{ width: 32rpx; height: 32rpx; margin-left: 200rpx; background: #fff}
-.goods-detail .twen image.img{vertical-align:auto;}
.logistics-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 90rpx;
- /*border-bottom: 1px solid #f5f5f5;*/
- font-size: 32rpx;
- color: #666;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 90rpx;
+ /*border-bottom: 1px solid #f5f5f5;*/
+ font-size: 32rpx;
+ color: #666;
+}
+
+.logistics-item .small {
+ color: #999;
+ font-size: 24rpx;
+}
+
+.item-title {
+ width: 180rpx;
}
-.logistics-item .small{color: #999; font-size: 24rpx;}
-.item-title { width: 180rpx;}
.item-mes {
- color: #333; width: 420rpx;
- height: 90rpx; line-height: 90rpx;
+ color: #333;
+ width: 420rpx;
+ height: 90rpx;
+ line-height: 90rpx;
}
-.item-img { width: 32rpx; height: 32rpx;}
+
+.item-img {
+ width: 32rpx;
+ height: 32rpx;
+}
+
.prom-item {
- color: #f23030;
- border: 1px solid #f23030;
- border-radius: 18rpx;
- line-height: 40rpx;
- height: 40rpx;
- padding: 2rpx 8rpx;
+ color: #f23030;
+ border: 1px solid #f23030;
+ border-radius: 18rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ padding: 2rpx 8rpx;
}
.guarantee {
- justify-content: space-around;
+ justify-content: space-around;
}
.ico-item {
- width: 32rpx;
- height: 32rpx;
- margin-right: 10rpx;
+ width: 32rpx;
+ height: 32rpx;
+ margin-right: 10rpx;
}
.guarantee>view {
- display: flex;
- align-items: center;
- height: 32rpx;
- color: #666;
+ display: flex;
+ align-items: center;
+ height: 32rpx;
+ color: #666;
}
.user-comment {
- margin: 10rpx 0;
- font-size: 28rpx;
+ margin: 10rpx 0;
+ font-size: 28rpx;
}
-.good-comment,.comment-num {
- display: flex;
+.good-comment,
+.comment-num {
+ display: flex;
}
.recommend {
- background-color: #fff;
- border-bottom: 1px solid #ddd;
- padding-bottom: 20rpx;
+ background-color: #fff;
+ border-bottom: 1px solid #ddd;
+ padding-bottom: 20rpx;
}
.recommend-title {
- height: 70rpx;
- line-height: 70rpx;
- font-size: 28rpx;
- padding: 0 30rpx;
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 28rpx;
+ padding: 0 30rpx;
}
.recommend-ul {
- display: flex;
- justify-content: flex-start;
+ display: flex;
+ justify-content: flex-start;
}
.recommend-ul .li {
- width: 25%;
- box-sizing: border-box;
- text-align: center;
- font-size: 28rpx;
- color: #333;
+ width: 25%;
+ box-sizing: border-box;
+ text-align: center;
+ font-size: 28rpx;
+ color: #333;
}
.li-img {
- width: 120rpx;
- height: 120rpx;
- margin: 0 auto;
+ width: 120rpx;
+ height: 120rpx;
+ margin: 0 auto;
}
.li-title {
- height: 58rpx;
- line-height: 30rpx;
- margin: 10rpx 0;
+ height: 58rpx;
+ line-height: 30rpx;
+ margin: 10rpx 0;
}
.comment-item {
- background-color: #fff;
- font-size: 28rpx;
+ background-color: #fff;
+ font-size: 28rpx;
}
.comment-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 102rpx;
- margin: 0 30rpx;
- color: #333;
- border-bottom: 1px solid #eee;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 102rpx;
+ margin: 0 30rpx;
+ color: #333;
+ border-bottom: 1px solid #eee;
}
.user-name {
- display: flex;
- align-items: center;
+ display: flex;
+ align-items: center;
}
.user-pic {
- width: 54rpx;
- height: 54rpx;
- margin-right: 10rpx;
- border-radius: 50%;
- overflow: hidden;
+ width: 54rpx;
+ height: 54rpx;
+ margin-right: 10rpx;
+ border-radius: 50%;
+ overflow: hidden;
}
.stars {
- float: left;
- display: flex;
- height: 42rpx;
- line-height: 42rpx;
- margin: 15rpx 0;
- width: 200rpx;
+ float: left;
+ display: flex;
+ height: 42rpx;
+ line-height: 42rpx;
+ margin: 15rpx 0;
+ width: 200rpx;
}
.star {
- width: 26rpx;
- height: 26rpx;
- margin-right: 5rpx;
+ width: 26rpx;
+ height: 26rpx;
+ margin-right: 5rpx;
}
.state-spec {
- margin: 15rpx 0;
- float: right;
- font-size: 24rpx;
- color: #666;
- width: 460rpx;
- text-align: right;
+ margin: 15rpx 0;
+ float: right;
+ font-size: 24rpx;
+ color: #666;
+ width: 460rpx;
+ text-align: right;
}
.comment-cont {
- padding: 0 30rpx 30rpx;
- border-bottom: 1px solid #eee;
+ padding: 0 30rpx 30rpx;
+ border-bottom: 1px solid #eee;
}
.comment-mes {
- line-height: 42rpx;
+ line-height: 42rpx;
}
.img-ul {
- display: flex;
- flex-wrap: wrap;
+ display: flex;
+ flex-wrap: wrap;
}
.img-li {
- width: 150rpx;
- height: 150rpx;
- margin-top: 8rpx;
- margin-right: 10rpx;
+ width: 150rpx;
+ height: 150rpx;
+ margin-top: 8rpx;
+ margin-right: 10rpx;
}
.comment-btn {
- height: 60rpx;
- padding: 20rpx 30rpx;
+ height: 60rpx;
+ padding: 20rpx 30rpx;
}
.comment-btn .btn {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 60rpx;
- width: 45%;
- border: 1px solid #eee;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 60rpx;
+ width: 45%;
+ border: 1px solid #eee;
}
.comment-btn .btn-img {
- width: 30rpx;
- height: 28rpx;
- margin: 0 10rpx;
+ width: 30rpx;
+ height: 28rpx;
+ margin: 0 10rpx;
}
.reply-ul {
- margin-top: 20rpx;
+ margin-top: 20rpx;
}
.reply-li {
- color: #aaa;
+ color: #aaa;
}
.join-cart {
- position: fixed;
- left: 0;
- bottom: 0;
- display: flex;
- width: 100%;
- height: 100rpx;
- background-color: #fff;
- z-index: 9;
- border-top: 4rpx solid #eee;
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ display: flex;
+ width: 100%;
+ height: 100rpx;
+ background-color: #fff;
+ z-index: 9;
+ border-top: 4rpx solid #eee;
}
.join-cart>view {
- width: 29%;
+ width: 29%;
}
.join-cart>.new_split {
- width: 13%;
- text-align: center;
- padding: 0;
- margin: 0;
+ width: 13%;
+ text-align: center;
+ padding: 0;
+ margin: 0;
}
.cart-ico {
- font-size: 24rpx;
- color: #333;
+ font-size: 24rpx;
+ color: #333;
}
.shopping-cart {
- position: relative;
+ position: relative;
}
.cs-img {
- width: 45rpx;
- height: 40rpx;
- margin-top: 15rpx;
+ width: 45rpx;
+ height: 40rpx;
+ margin-top: 15rpx;
}
.sc-img {
- width: 42rpx;
- height: 40rpx;
- margin-top: 15rpx;
+ width: 42rpx;
+ height: 40rpx;
+ margin-top: 15rpx;
}
.cart-num {
- position: absolute;
- left: 50%;
- top: 1rpx;
- width: 40rpx;
- height: 40rpx;
- line-height: 40rpx;
- text-align: center;
- border-radius: 50%;
- color: #fff;
- background-color: rgba(217,81,99,0.9);
+ position: absolute;
+ left: 50%;
+ top: 1rpx;
+ width: 40rpx;
+ height: 40rpx;
+ line-height: 40rpx;
+ text-align: center;
+ border-radius: 50%;
+ color: #fff;
+ background-color: rgba(217, 81, 99, 0.9);
}
.cart-btn {
- font-size: 28rpx;
- color: #fff;
- line-height: 70rpx;
- margin-top: 16rpx;
- text-align: center;
+ font-size: 28rpx;
+ color: #fff;
+ line-height: 70rpx;
+ margin-top: 16rpx;
+ text-align: center;
}
.join-btn {
- background-color: #ffb03f;
- height: 70rpx;
-border-radius: 55rpx 0rpx 0rpx 55rpx;
-margin-top: 16rpx;
+ background-color: #ffb03f;
+ height: 70rpx;
+ border-radius: 55rpx 0rpx 0rpx 55rpx;
+ margin-top: 16rpx;
}
view.cart-btn-lg {
- width: 50%;
+ width: 50%;
}
.buy-btn {
- background-color: #f23030;
- height: 70rpx;
-border-radius: 0 56rpx 55rpx 0;
+ background-color: #f23030;
+ height: 70rpx;
+ border-radius: 0 56rpx 55rpx 0;
}
-.buy-btn-all{
- background-color: #f23030;
- height: 70rpx;
- border-radius: 56rpx;
+.buy-btn-all {
+ background-color: #f23030;
+ height: 70rpx;
+ border-radius: 56rpx;
}
.toTop {
- position: fixed;
- z-index: 3;
- right: 20rpx;
- bottom: 160rpx;
- width: 68rpx;
- height: 68rpx;
- border: 1px solid #ddd;
- border-radius: 50%;
- overflow: hidden;
- cursor: pointer;
+ position: fixed;
+ z-index: 3;
+ right: 20rpx;
+ bottom: 160rpx;
+ width: 68rpx;
+ height: 68rpx;
+ border: 1px solid #ddd;
+ border-radius: 50%;
+ overflow: hidden;
+ cursor: pointer;
}
.comment-more {
- height: 56rpx;
- line-height: 56rpx;
- font-size: 26rpx;
- color: #999;
- text-align: center;
- background-color: #eee;
+ height: 56rpx;
+ line-height: 56rpx;
+ font-size: 26rpx;
+ color: #999;
+ text-align: center;
+ background-color: #eee;
}
.goods-more {
- background-color: #fff;
+ background-color: #fff;
}
.goods-norms {
- background-color: #fff;
+ background-color: #fff;
}
.type-navbar2 {
- display: flex;
- height: 72rpx;
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
+ display: flex;
+ height: 72rpx;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
}
.type-box2 {
- width: 50%;
- font-size: 26rpx;
- line-height: 72rpx;
- text-align: center;
- overflow: hidden;
+ width: 50%;
+ font-size: 26rpx;
+ line-height: 72rpx;
+ text-align: center;
+ overflow: hidden;
}
.type-item2-on {
- color: #f23030;
+ color: #f23030;
}
.parameter {
- padding: 40rpx 0;
+ padding: 40rpx 0;
}
.table {
- width: 698rpx;
- margin: 0 auto;
- border: 1px solid #ddd;
- border-bottom: none;
+ width: 698rpx;
+ margin: 0 auto;
+ border: 1px solid #ddd;
+ border-bottom: none;
}
.tb {
- width: 100%;
- min-height: 69rpx;
- line-height: 69rpx;
- border-bottom: 1px solid #ddd;
- font-size: 28rpx;
- text-align: center;
- color: #333;
+ width: 100%;
+ min-height: 69rpx;
+ line-height: 69rpx;
+ border-bottom: 1px solid #ddd;
+ font-size: 28rpx;
+ text-align: center;
+ color: #333;
}
.th-thitle {
- font-weight: bold;
- background-color: #f5fafe;
+ font-weight: bold;
+ background-color: #f5fafe;
}
.td-cont {
- display: flex;
+ display: flex;
}
.td-title {
- width: 259rpx;
- background-color: #f5fafe;
- border-right: 1px solid #ddd;
+ width: 259rpx;
+ background-color: #f5fafe;
+ border-right: 1px solid #ddd;
}
.td-text {
- width: 439rpx;
+ width: 439rpx;
}
.goods-comment {
- background-color: #fff;
+ background-color: #fff;
}
.type-navbar3 {
- display: flex;
- height: 88rpx;
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
- padding: 10rpx 0;
+ display: flex;
+ height: 88rpx;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ padding: 10rpx 0;
}
.type-box3 {
- width: 20%;
- font-size: 30rpx;
- line-height: 44rpx;
- text-align: center;
- overflow: hidden;
+ width: 20%;
+ font-size: 30rpx;
+ line-height: 44rpx;
+ text-align: center;
+ overflow: hidden;
}
.type-item3-on {
- color: #f23030;
+ color: #f23030;
}
.spec-model {
- position: fixed;
- bottom: 0;
- z-index: 20;
- background: white;
- width: 100%;
- /* padding: 0 30rpx; */
- font-size: 32rpx;
- box-sizing: border-box;
- border-radius: 20rpx 20rpx 0 0;
- /* height: 72%; */
+ position: fixed;
+ bottom: 0;
+ z-index: 20;
+ background: white;
+ width: 100%;
+ /* padding: 0 30rpx; */
+ font-size: 32rpx;
+ box-sizing: border-box;
+ border-radius: 20rpx 20rpx 0 0;
+ /* height: 72%; */
}
-.spec-model .pding{padding: 0 20rpx;}
+.spec-model .pding {
+ padding: 0 20rpx;
+}
.spec-goods {
- padding: 30rpx 0 20rpx;
- /* float: left; */
- width: 100%;
- /* border-bottom:2rpx solid #eee; */
+ padding: 30rpx 0 20rpx;
+ /* float: left; */
+ width: 100%;
+ /* border-bottom:2rpx solid #eee; */
}
.spec-img {
- float: left;
- height: 186rpx;
- width: 186rpx;
- border: 4rpx solid #eee
+ float: left;
+ height: 186rpx;
+ width: 186rpx;
+ border: 4rpx solid #eee
}
.spec-goods-info {
- float: left;
- padding: 0 25rpx;
- width: 400rpx;
+ float: left;
+ padding: 0 25rpx;
+ width: 400rpx;
}
.spec-goods-name {
- font-size: 30rpx;
- line-height: 35rpx;
- height: 70rpx;
- margin: 15rpx 20rpx 25rpx 0;
- overflow: hidden;
- text-overflow: ellipsis;color: #333;
+ font-size: 30rpx;
+ line-height: 35rpx;
+ height: 70rpx;
+ margin: 15rpx 20rpx 25rpx 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ color: #333;
}
.spec-goods-price {
- color: #d60021;
- font-size: 33rpx;
- font-weight: bold;
+ color: #d60021;
+ font-size: 33rpx;
+ font-weight: bold;
}
.spec-goods-stock {
- margin-top: 3rpx;
- font-size: 24rpx;
- color: #999999;
- margin-right: 15rpx;
+ margin-top: 3rpx;
+ font-size: 24rpx;
+ color: #999999;
+ margin-right: 15rpx;
}
.spec-name {
- clear: both;
- padding: 20rpx 0;
- font-size: 30rpx;color: #333;
+ clear: both;
+ padding: 20rpx 0;
+ font-size: 30rpx;
+ color: #333;
+}
+
+.quhuo {
+ font-size: 30rpx;
+ color: #000
}
-.quhuo{font-size: 30rpx; color: #000}
-.b_num{
- display: flex;font-size: 30rpx; color: #333;
- justify-content: space-between;
- align-items: center;
- padding: 20rpx 0;
+.b_num {
+ display: flex;
+ font-size: 30rpx;
+ color: #333;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx 0;
}
.count {
- /* position: fixed; */
- display: flex;
- height: 50rpx;
- /* border: 1rpx solid #000; */
- font-size: 28rpx;
- right: 30rpx;
+ /* position: fixed; */
+ display: flex;
+ height: 50rpx;
+ /* border: 1rpx solid #000; */
+ font-size: 28rpx;
+ right: 30rpx;
}
-.count>view,.count>input {
- width: 60rpx;
- height: 50rpx;
- line-height: 50rpx;
- text-align: center;
+.count>view,
+.count>input {
+ width: 60rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+}
+
+.spec_bt {
+ background: fff;
+ color: #333;
+ margin-left: 10rpx;
+ padding: 4rpx 15rpx 4rpx;
+ display: inline-block;
+ border-radius: 30rpx;
+ font-size: 24rpx;
+ border: 1rpx solid #ccc;
+ margin: 10rpx;
+ height: 40rpx;
+ line-height: 40rpx;
}
-.spec_bt{
- background: fff;color: #333; margin-left: 10rpx;padding: 4rpx 15rpx 4rpx; display: inline-block;
- border-radius:30rpx;font-size: 24rpx;border: 1rpx solid #ccc; margin: 10rpx; height: 40rpx; line-height: 40rpx;
+
+.spec_bt.act {
+ background: #d60021;
+ color: #fff;
+ border: 1rpx solid #d60021;
}
-.spec_bt.act{background: #d60021;color: #fff;border: 1rpx solid #d60021;}
-.sub, .add, .count>input {
- /* border-right: 1px solid #000; */
+
+.sub,
+.add,
+.count>input {
+ /* border-right: 1px solid #000; */
background-color: #f8f8f8;
border-radius: 8rpx;
}
+
.sub.active {
/* background-color: #ddd; */
color: #ccc;
}
+
.count>input {
margin: 0 10rpx;
}
.add {
/* background-color: #f8f8f8; */
- /* border-left: 1px solid #000; */
+ /* border-left: 1px solid #000; */
}
.spec-btn {
- color: black;
- background-color: white;
- padding: 10rpx 10rpx;
- font-size: 26rpx;
- line-height: 28rpx;
- float: left;
- border: 1rpx solid #dedede;
- margin: 4rpx 10rpx 4rpx 0;
- border-radius: 4rpx;
+ color: black;
+ background-color: white;
+ padding: 10rpx 10rpx;
+ font-size: 26rpx;
+ line-height: 28rpx;
+ float: left;
+ border: 1rpx solid #dedede;
+ margin: 4rpx 10rpx 4rpx 0;
+ border-radius: 4rpx;
}
.spec-btn-click {
- color: white;
- background-color: #f23030;
- border: 1rpx solid #f23030;
+ color: white;
+ background-color: #f23030;
+ border: 1rpx solid #f23030;
}
.spec-cart-btns {
- /* width: 92%; */
- line-height: 70rpx;
- /* margin: 0rpx auto;
+ /* width: 92%; */
+ line-height: 70rpx;
+ /* margin: 0rpx auto;
margin-top: 160rpx; */
- /* border-radius: 20rpx; */
-/* position: fixed; */
-/* bottom: 50rpx; */
-/* left: 4%; */
+ /* border-radius: 20rpx; */
+ /* position: fixed; */
+ /* bottom: 50rpx; */
+ /* left: 4%; */
padding: 20rpx;
}
.spec-cart-btn {
-
- width:100%;
- font-size: 30rpx;
- text-align: center;
- color: white;
- border-radius: 40rpx;
+
+ width: 100%;
+ font-size: 30rpx;
+ text-align: center;
+ color: white;
+ border-radius: 40rpx;
}
.spec-cart-btn.w40 {
@@ -705,2044 +788,2890 @@ border-radius: 0 56rpx 55rpx 0;
}
.spec-add-cart {
- background-color: #ffb03f;
+ background-color: #ffb03f;
}
.spec-buy {
- background-color: #f23030;
- /* margin-left: 34rpx; */
+ background-color: #f23030;
+ /* margin-left: 34rpx; */
}
.spec-cart-disable {
- background: #bbbbbb;
+ background: #bbbbbb;
}
.spec-cart-btn-lg {
- width: 614rpx;
+ width: 614rpx;
}
.prom-model {
- position: fixed;
- bottom: 0;
- z-index: 20;
- background: white;
- width: 100%;
- padding: 0 30rpx 30rpx;
- font-size: 32rpx;
- box-sizing: border-box;
- overflow-x: hidden;
-}
-
-.prom-model .prom-title {text-align: center;margin: 30rpx 0;}
-.prom-model .logistics-item {border: 0;}
-.prom-model .item-mes {width: 500rpx;}
-.integral-btn {width: 100%; padding: 0rpx;margin: 0rpx;}
-.clear{clear: both;}
-.sto_v .title,.sto_v .stitle{ border-top: 1rpx solid #dedede;border-bottom: 1rpx solid #dedede; height: 78rpx; line-height: 78rpx;}
-.sto_v .title .tubiao,.sto_v .stitle .tubiao{width: 32rpx; height: 32rpx; margin-top: 23rpx;}
-.itemlists .item{border-bottom: 1rpx solid #dedede; height: 72rpx; line-height: 72rpx;font-size: 28rpx; margin: 0 10rpx;}
-
-.cshu{margin-bottom: 30rpx; margin-top: 20rpx;}
-.cshu view{color: #999; font-size: 30rpx; margin-left: 26rpx;}
-
-
-/*---活动特殊显示---*/
-.prom_show{height: 120rpx; display: flex;}
-.prom_show .secondkill-img{width: 100%; height: 100%;}
-.prom_show .spike-img{width: 283rpx; height: 57rpx; top:35rpx;
-left:31rpx;}
-.prom_show .stop{ color:#d81731;top: 17rpx;right:65rpx; font-weight:600;}
-.prom_show .start{ color:#009ae2;top: 17rpx;right:65rpx; font-weight:600;}
-.prom_show .timeac { font-size: 32rpx; height: 120rpx; color: #333; }
-.prom_show .timeac.left{width: 66%; color: #fff;background:#f23030;}
-.prom_show .timeac.right{width: 34%;background-color: #d7d7d7; text-align: center}
-
-.prom_show .secview .day{padding-right:10rpx;}
-.prom_show .secview .time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;}
-.prom_show .secview .time{margin-right:10rpx; margin-left:10rpx;}
-
-
-.prom_show .timeac.left view{ margin-left: 20rpx}
-.prom_show .timeac.left view.firview{margin-top: 10rpx}
-.prom_show .timeac.left view .tr_line{ text-decoration: line-through; font-size: 28rpx;}
-.prom_show .timeac.left view .bprice{ font-size: 50rpx; }
-
-.prom_show .timeac.right view.firview{margin-top:12rpx; margin-bottom: 10rpx}
-.prom_show .timeac.right view.secview{display: flex; text-align: center; justify-content:center; flex-direction: row;}
-.prom_show .timeac.right view .tui-conutdown-box{
- /* background: #6b6b6b; */
- width: auto;
- /* min-width: 45rpx; */
- height: 45rpx; color: #c4182e; font-size: 27rpx; text-align: center; line-height: 46rpx;}
-
-.huise{ background:gray}
-.lanse{background:#0199e2}
-
-
-/*------拼单------*/
-.pt_view{ text-align: center; width: 100%; height: 100rpx; line-height: 100rpx; font-size: 26rpx}
-.pt_view .secondkill-img{width: 100%;height: 100%;}
-.pt_fir{ background: #fff;/* margin-bottom: 10rpx; */}
-.pt_fir .pt_fir_title{display: flex; align-items: center; /* margin-left: 10rpx; margin-top: 20rpx; */ font-size: 28rpx; position: relative;}
-.pt_fir .pt_fir_title .kt_type{ color: #fff;background:#e9030d; width: 100rpx; line-height: 40rpx; border-radius: 6rpx; margin: 0 10rpx;
- height: 40rpx; font-size: 24rpx; text-align: center;}
-.pt_fir .pt_fir_title .price{color: #e9030d;font-size: 26rpx;}
-.pt_fir .pt_fir_title .bigw{font-size: 36rpx;}
-.pt_fir .pt_fir_title .tprice{text-decoration: line-through;color: #949494}
-.pt_fir .pt_fir_title .tprice.ml50{margin-left: 50rpx}
-
-.pt_fir .pt_fir_title .js{padding: 0 15rpx;height: 40rpx;background:#e9030d; text-align: center; border-radius: 8rpx; color: #fff; margin-left: 10rpx;}
-.pt_fir .pt_fir_title .tuannum{color: #e9030d; position: absolute; right: 20rpx; font-size: 26rpx;}
-.pding{padding-top: 20rpx;padding-left: 20rpx;height: 81%;
- padding-right: 20rpx;font-size: 26rpx;color: #ea120f}
-.pdres{margin-left: 10rpx;color: #8f8f94}
-.ptgz{position: relative;font-size: 30rpx;padding-left: 20rpx;margin-top: 10rpx; overflow: hidden }
-.shuxian{width: 6rpx;height: 28rpx; background: #ea120f; display: inline-block;top: 5rpx;position: relative; margin-right: 5rpx}
-.ptgz_an{position: absolute;top:5rpx; right: 6rpx}
-.ptgz_an .arrow-two{width:18rpx;height:18rpx;border-color:#da0b31; margin-top:30rpx;}
-
-.pt_fir.se{height: auto; margin-bottom: 10rpx}
-.t_gz{padding: 10rpx 20rpx; font-size:28rpx }
-
-.pt_fir.se1{height: auto; margin: 0}
-.pt_fir.se2{height: auto; margin: 0;/* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */}
-
-.pt_hb{height:78rpx; line-height: 75rpx; position: relative; font-size: 32rpx;overflow: hidden;width:695rpx;margin-left:28rpx;
- border-bottom: 1rpx solid #E5E5E5 }
-.ptgz_an.xq{font-size: 32rpx; color:#d40024}
-.wf{display: flex; padding: 20rpx 0;}
-.wf .item{width: 24.5%; text-align: center; font-size: 26rpx; color: #666}
-.wf .item .item_txy{position: relative;width: 60rpx; height: 60rpx; background: #ea120f; border-radius: 50%;left: 50%;margin-left: -30rpx;
- border: 3px #dfdfdf solid; text-align: center;line-height: 60rpx; color: #fff; margin-bottom: 10rpx;}
-.wf .item .item_txy.hs{ background: #cbcbcb;}
-.po{margin-bottom: 20rpx;}
-
-.cart-btn.line-h{ line-height: 26rpx;}
-.cart-btn .fir-v{ margin-top: 10rpx;}
-
-.hyt{ padding: 0 20rpx; font-size: 30rpx; display: flex; align-items:center; margin-top: 10rpx;}
-.hyt .r_f{color: #e9120f;font-size: 26rpx;position: relative;top:3rpx}
-.hyt .byj{color: #e9120f;font-size: 32rpx;position: relative;top:5rpx}
-
-.pt_fir .pt_fir_title.no-mar-b{margin-bottom: 0;padding-bottom: 10rpx; margin-left: 20rpx}
-.pt_fir .pt_fir_title.boder-1{border-bottom: 1rpx #e7e7e7 solid}
-
-.jie_price{/* padding: 10rpx 30rpx; */}
-.jie_price_title{font-size: 30rpx; color: #a26270; margin-bottom: 10rpx}
-.price_list{display: flex; width: 100%;}
-.price_item{width: 25%;font-size: 28rpx; color: #4c336c}
-
-.pt_fir.se2 .zzk-1{/* margin-top: 23rpx; */ font-size: 30rpx;position: relative; /* margin-bottom: 30rpx; */ border-left:4rpx solid red;/* margin-left:14rpx; */height:30rpx;line-height:30rpx;/* padding-left:5rpx; */}
-.ckgd{/* position: absolute;top:0;right:57rpx; */ color:#d70025; font-size: 26rpx;}
-.ckgd .arrow-one{width:14rpx;height:14rpx;border-color:#da0b31;/* margin-top:5rpx; */ margin:auto;}
-.bview{
- position: fixed; top:0; left:0; width: 100%; height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
-}
-.juzhong{
- position: fixed; top:0; left:0; width: 100%; height: 100%;
- display: flex;
- flex-direction:row;
- justify-content: center;
- align-items: center;
+ position: fixed;
+ bottom: 0;
+ z-index: 20;
+ background: white;
+ width: 100%;
+ padding: 0 30rpx 30rpx;
+ font-size: 32rpx;
+ box-sizing: border-box;
+ overflow-x: hidden;
}
-.juzhong .xq{ padding: 0 20rpx; background: #fff; font-size: 30rpx; padding-bottom: 20rpx;}
-.juzhong .xq .title{text-align: center; margin: 20rpx 0; position: relative; height: 50rpx;}
-.juzhong .xq .hs1{font-size: 28rpx; color: #ab8f9e}
-.juzhong .xq .title .close{position: absolute;top: 0; right: 0; width: 45rpx; height: 45rpx;}
+.prom-model .prom-title {
+ text-align: center;
+ margin: 30rpx 0;
+}
-.pt_qd{/* margin-top: 40rpx; height: auto; */padding: 20rpx;}
-.spec-cart-btn.w100{width: 95%; margin-left: 0; height: 75rpx; line-height:75rpx;margin: auto; }
+.prom-model .logistics-item {
+ border: 0;
+}
-.sto_v{color: #333;}
-.ellipsis{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
+.prom-model .item-mes {
+ width: 500rpx;
+}
+.integral-btn {
+ width: 100%;
+ padding: 0rpx;
+ margin: 0rpx;
+}
-/*---多少人参加团--*/
-.group {
- padding-top:20rpx;
- padding-bottom:20rpx;
- width: 100%;
- /* min-height: 92rpx; */
- border-bottom: 2rpx solid #ebedf0;
+.clear {
+ clear: both;
+}
+.sto_v .title,
+.sto_v .stitle {
+ border-top: 1rpx solid #dedede;
+ border-bottom: 1rpx solid #dedede;
+ height: 78rpx;
+ line-height: 78rpx;
}
-.group .group-list {
- display: flex;
- align-items: center;
- justify-content: space-around;
- /* height: 90rpx; */
- /* padding: 0 130rpx 0 100rpx; */
- /* width: 470rpx;
-
- position: absolute; */
+.sto_v .title .tubiao,
+.sto_v .stitle .tubiao {
+ width: 32rpx;
+ height: 32rpx;
+ margin-top: 23rpx;
}
-.group .group-list .gtou {
- width: 70rpx;
- height: 70rpx;
- /* float: left;
- position: relative;
- top: 6rpx;
- left: -96rpx; */
+.itemlists .item {
+ border-bottom: 1rpx solid #dedede;
+ height: 72rpx;
+ line-height: 72rpx;
+ font-size: 28rpx;
+ margin: 0 10rpx;
}
-.group .group-list .gtou image {
- display: block;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- background-color: #f0f0f0;
+.cshu {
+ margin-bottom: 30rpx;
+ margin-top: 20rpx;
}
-.group .group-list .gdn {
- width: 140rpx;
- text-align: center;
- /* float: left; */
- font-size: 26rpx;
- /* padding-left: 20rpx; */
- /* line-height: 48rpx;
- height: 48rpx;
- width: 168rpx;
- position: relative;
- left: -80rpx;
- top:20rpx; */
- font-weight:bold;
+.cshu view {
+ color: #999;
+ font-size: 30rpx;
+ margin-left: 26rpx;
}
-.group .group-list .ghaicha {
- /* width:300rpx; */
- font-size: 27rpx;
- /* margin-left:180rpx;
- top:13rpx;
- left:-3rpx; */
- font-weight: bold;
+/*---活动特殊显示---*/
+.prom_show {
+ height: 120rpx;
+ display: flex;
+}
+.prom_show .secondkill-img {
+ width: 100%;
+ height: 100%;
}
-.group .group-list .ghaicha .gred {
- /* height: 48rpx;
- width: 300rpx; */
+.prom_show .spike-img {
+ width: 283rpx;
+ height: 57rpx;
+ top: 35rpx;
+ left: 31rpx;
}
-.gsj {
- float: left;
- color: #8f8f94;
+.prom_show .stop {
+ color: #d81731;
+ top: 17rpx;
+ right: 65rpx;
+ font-weight: 600;
}
-.group .group-list .cjt {
- height:42rpx;
- width: 137rpx;
- /* position: absolute;
- right: 4rpx;
- top:25rpx; */
- line-height: 42rpx;
- font-size: 24rpx;
- color: #fff;
- border:2rpx solid #d60024;
- background-color:#d60024;
- border-radius:25rpx;
+.prom_show .start {
+ color: #009ae2;
+ top: 17rpx;
+ right: 65rpx;
+ font-weight: 600;
+}
+.prom_show .timeac {
+ font-size: 32rpx;
+ height: 120rpx;
+ color: #333;
}
-.gbody {
- background-color: white;
+.prom_show .timeac.left {
+ width: 66%;
+ color: #fff;
+ background: #f23030;
}
-.t_show{/* overflow: hidden; */ display: flex; /* width: 300rpx; */ color: #292929; /* line-height: 36rpx; */font-size:26rpx;
+
+.prom_show .timeac.right {
+ width: 34%;
+ background-color: #d7d7d7;
+ text-align: center
}
-.join-cart>view.set_width {
- width:58%;
+
+.prom_show .secview .day {
+ padding-right: 10rpx;
+}
+
+.prom_show .secview .time-val {
+ width: 36rpx;
+ height: 36rpx;
+ border-radius: 7rpx;
+ line-height: 36rpx;
+}
+
+.prom_show .secview .time {
+ margin-right: 10rpx;
+ margin-left: 10rpx;
+}
+
+
+.prom_show .timeac.left view {
+ margin-left: 20rpx
+}
+
+.prom_show .timeac.left view.firview {
+ margin-top: 10rpx
+}
+
+.prom_show .timeac.left view .tr_line {
+ text-decoration: line-through;
+ font-size: 28rpx;
+}
+
+.prom_show .timeac.left view .bprice {
+ font-size: 50rpx;
+}
+
+.prom_show .timeac.right view.firview {
+ margin-top: 12rpx;
+ margin-bottom: 10rpx
+}
+
+.prom_show .timeac.right view.secview {
+ display: flex;
+ text-align: center;
+ justify-content: center;
+ flex-direction: row;
+}
+
+.prom_show .timeac.right view .tui-conutdown-box {
+ /* background: #6b6b6b; */
+ width: auto;
+ /* min-width: 45rpx; */
+ height: 45rpx;
+ color: #c4182e;
+ font-size: 27rpx;
+ text-align: center;
+ line-height: 46rpx;
+}
+
+.huise {
+ background: gray
+}
+
+.lanse {
+ background: #0199e2
+}
+
+
+/*------拼单------*/
+.pt_view {
+ text-align: center;
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
+ font-size: 26rpx
+}
+
+.pt_view .secondkill-img {
+ width: 100%;
+ height: 100%;
+}
+
+.pt_fir {
+ background: #fff;
+ /* margin-bottom: 10rpx; */
+}
+
+.pt_fir .pt_fir_title {
+ display: flex;
+ align-items: center;
+ /* margin-left: 10rpx; margin-top: 20rpx; */
+ font-size: 28rpx;
+ position: relative;
+}
+
+.pt_fir .pt_fir_title .kt_type {
+ color: #fff;
+ background: #e9030d;
+ width: 100rpx;
+ line-height: 40rpx;
+ border-radius: 6rpx;
+ margin: 0 10rpx;
+ height: 40rpx;
+ font-size: 24rpx;
+ text-align: center;
+}
+
+.pt_fir .pt_fir_title .price {
+ color: #e9030d;
+ font-size: 26rpx;
+}
+
+.pt_fir .pt_fir_title .bigw {
+ font-size: 36rpx;
+}
+
+.pt_fir .pt_fir_title .tprice {
+ text-decoration: line-through;
+ color: #949494
+}
+
+.pt_fir .pt_fir_title .tprice.ml50 {
+ margin-left: 50rpx
+}
+
+.pt_fir .pt_fir_title .js {
+ padding: 0 15rpx;
+ height: 40rpx;
+ background: #e9030d;
+ text-align: center;
+ border-radius: 8rpx;
+ color: #fff;
+ margin-left: 10rpx;
+}
+
+.pt_fir .pt_fir_title .tuannum {
+ color: #e9030d;
+ position: absolute;
+ right: 20rpx;
+ font-size: 26rpx;
+}
+
+.pding {
+ padding-top: 20rpx;
+ padding-left: 20rpx;
+ height: 81%;
+ padding-right: 20rpx;
+ font-size: 26rpx;
+ color: #ea120f
+}
+
+.pdres {
+ margin-left: 10rpx;
+ color: #8f8f94
+}
+
+.ptgz {
+ position: relative;
+ font-size: 30rpx;
+ padding-left: 20rpx;
+ margin-top: 10rpx;
+ overflow: hidden
+}
+
+.shuxian {
+ width: 6rpx;
+ height: 28rpx;
+ background: #ea120f;
+ display: inline-block;
+ top: 5rpx;
+ position: relative;
+ margin-right: 5rpx
+}
+
+.ptgz_an {
+ position: absolute;
+ top: 5rpx;
+ right: 6rpx
+}
+
+.ptgz_an .arrow-two {
+ width: 18rpx;
+ height: 18rpx;
+ border-color: #da0b31;
+ margin-top: 30rpx;
+}
+
+.pt_fir.se {
+ height: auto;
+ margin-bottom: 10rpx
+}
+
+.t_gz {
+ padding: 10rpx 20rpx;
+ font-size: 28rpx
+}
+
+.pt_fir.se1 {
+ height: auto;
+ margin: 0
+}
+
+.pt_fir.se2 {
+ height: auto;
+ margin: 0;
+ /* border-top:6rpx solid #eeeeee;border-bottom:2rpx solid #eeeeee; */
+}
+
+.pt_hb {
+ height: 78rpx;
+ line-height: 75rpx;
+ position: relative;
+ font-size: 32rpx;
+ overflow: hidden;
+ width: 695rpx;
+ margin-left: 28rpx;
+ border-bottom: 1rpx solid #E5E5E5
+}
+
+.ptgz_an.xq {
+ font-size: 32rpx;
+ color: #d40024
+}
+
+.wf {
+ display: flex;
+ padding: 20rpx 0;
+}
+
+.wf .item {
+ width: 24.5%;
+ text-align: center;
+ font-size: 26rpx;
+ color: #666
+}
+
+.wf .item .item_txy {
+ position: relative;
+ width: 60rpx;
+ height: 60rpx;
+ background: #ea120f;
+ border-radius: 50%;
+ left: 50%;
+ margin-left: -30rpx;
+ border: 3px #dfdfdf solid;
+ text-align: center;
+ line-height: 60rpx;
+ color: #fff;
+ margin-bottom: 10rpx;
+}
+
+.wf .item .item_txy.hs {
+ background: #cbcbcb;
+}
+
+.po {
+ margin-bottom: 20rpx;
+}
+
+.cart-btn.line-h {
+ line-height: 26rpx;
+}
+
+.cart-btn .fir-v {
+ margin-top: 10rpx;
+}
+
+.hyt {
+ padding: 0 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ margin-top: 10rpx;
+}
+
+.hyt .r_f {
+ color: #e9120f;
+ font-size: 26rpx;
+ position: relative;
+ top: 3rpx
+}
+
+.hyt .byj {
+ color: #e9120f;
+ font-size: 32rpx;
+ position: relative;
+ top: 5rpx
+}
+
+.pt_fir .pt_fir_title.no-mar-b {
+ margin-bottom: 0;
+ padding-bottom: 10rpx;
+ margin-left: 20rpx
+}
+
+.pt_fir .pt_fir_title.boder-1 {
+ border-bottom: 1rpx #e7e7e7 solid
+}
+
+.jie_price {
+ /* padding: 10rpx 30rpx; */
+}
+
+.jie_price_title {
+ font-size: 30rpx;
+ color: #a26270;
+ margin-bottom: 10rpx
+}
+
+.price_list {
+ display: flex;
+ width: 100%;
+}
+
+.price_item {
+ width: 25%;
+ font-size: 28rpx;
+ color: #4c336c
+}
+
+.pt_fir.se2 .zzk-1 {
+ /* margin-top: 23rpx; */
+ font-size: 30rpx;
+ position: relative;
+ /* margin-bottom: 30rpx; */
+ border-left: 4rpx solid red;
+ /* margin-left:14rpx; */
+ height: 30rpx;
+ line-height: 30rpx;
+ /* padding-left:5rpx; */
+}
+
+.ckgd {
+ /* position: absolute;top:0;right:57rpx; */
+ color: #d70025;
+ font-size: 26rpx;
+}
+
+.ckgd .arrow-one {
+ width: 14rpx;
+ height: 14rpx;
+ border-color: #da0b31;
+ /* margin-top:5rpx; */
+ margin: auto;
+}
+
+.bview {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+
+.juzhong {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+}
+
+.juzhong .xq {
+ padding: 0 20rpx;
+ background: #fff;
+ font-size: 30rpx;
+ padding-bottom: 20rpx;
+}
+
+.juzhong .xq .title {
+ text-align: center;
+ margin: 20rpx 0;
+ position: relative;
+ height: 50rpx;
+}
+
+.juzhong .xq .hs1 {
+ font-size: 28rpx;
+ color: #ab8f9e
+}
+
+.juzhong .xq .title .close {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 45rpx;
+ height: 45rpx;
+}
+
+.pt_qd {
+ /* margin-top: 40rpx; height: auto; */
+ padding: 20rpx;
+}
+
+.spec-cart-btn.w100 {
+ width: 95%;
+ margin-left: 0;
+ height: 75rpx;
+ line-height: 75rpx;
+ margin: auto;
+}
+
+.sto_v {
+ color: #333;
+}
+
+.ellipsis {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+
+/*---多少人参加团--*/
+.group {
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+ width: 100%;
+ /* min-height: 92rpx; */
+ border-bottom: 2rpx solid #ebedf0;
+
+}
+
+.group .group-list {
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ /* height: 90rpx; */
+ /* padding: 0 130rpx 0 100rpx; */
+ /* width: 470rpx;
+
+ position: absolute; */
+}
+
+.group .group-list .gtou {
+ width: 70rpx;
+ height: 70rpx;
+ /* float: left;
+ position: relative;
+ top: 6rpx;
+ left: -96rpx; */
+}
+
+.group .group-list .gtou image {
+ display: block;
+ width: 100%;
+ height: 100%;
+ border-radius: 50%;
+ background-color: #f0f0f0;
+}
+
+.group .group-list .gdn {
+ width: 140rpx;
+ text-align: center;
+ /* float: left; */
+ font-size: 26rpx;
+ /* padding-left: 20rpx; */
+ /* line-height: 48rpx;
+ height: 48rpx;
+ width: 168rpx;
+ position: relative;
+ left: -80rpx;
+ top:20rpx; */
+ font-weight: bold;
+}
+
+.group .group-list .ghaicha {
+ /* width:300rpx; */
+ font-size: 27rpx;
+ /* margin-left:180rpx;
+ top:13rpx;
+ left:-3rpx; */
+ font-weight: bold;
+
+
+}
+
+.group .group-list .ghaicha .gred {
+ /* height: 48rpx;
+ width: 300rpx; */
+}
+
+.gsj {
+ float: left;
+ color: #8f8f94;
+}
+
+.group .group-list .cjt {
+ height: 42rpx;
+ width: 137rpx;
+ /* position: absolute;
+ right: 4rpx;
+ top:25rpx; */
+ line-height: 42rpx;
+ font-size: 24rpx;
+ color: #fff;
+ border: 2rpx solid #d60024;
+ background-color: #d60024;
+ border-radius: 25rpx;
+
+}
+
+.gbody {
+ background-color: white;
+}
+
+.t_show {
+ /* overflow: hidden; */
+ display: flex;
+ /* width: 300rpx; */
+ color: #292929;
+ /* line-height: 36rpx; */
+ font-size: 26rpx;
+}
+
+.join-cart>view.set_width {
+ width: 58%;
}
/*秒杀样式zwp*/
-#zwpMs{
- width: 31%;
- color: #fff;
- background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat;
- background-size: 100% 60px;
+#zwpMs {
+ width: 31%;
+ color: #fff;
+ background: url(https://mshopimg.yolipai.net/miniapp/images/user/bgred.png) no-repeat;
+ background-size: 100% 60px;
+}
+
+
+/*--------- 修改后的样式 -----------*/
+.elli {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
+
+.one_elli {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.tuwen_title {
+ /* height: 86rpx; */
+ background-color: #eeeeee;
+ /* margin-bottom: 32rpx; */
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 20rpx;
+}
+
+.tuwen_title .g_line {
+ width: 496rpx;
+ height: 1rpx;
+ border-bottom: #ababab 1rpx solid;
+}
+
+.tuwen_title .center_s {
+ width: 124rpx;
+ position: absolute;
+ height: 34rpx;
+ background-color: #eeeeee;
+ font-size: 32rpx;
+ display: flex;
+ overflow: hidden;
+ justify-content: center;
+ align-items: center;
+}
+
+.tuwen_title .center_s image {
+ width: 34rpx;
+ height: 26rpx;
+ margin-right: 10rpx
+}
+
+.t_g_info {
+ /* margin: 0 34rpx;margin-bottom: 20rpx; */
+ display: flex;
+ align-items: center;
+ padding: 20rpx;
+}
+
+.red_shu {
+ width: 10rpx;
+ height: 36rpx;
+ background-color: #da0035;
+ margin-right: 8rpx;
+}
+
+.tb-l {
+ /* line-height: 96rpx; */
+}
+
+.table_s {
+ border: #e4e4e4 1rpx solid;
+ box-sizing: border-box;
+ font-size: 26rpx;
+}
+
+.tb_item {
+ display: flex;
+ /* height: 96rpx; */
+ border-bottom: 1rpx solid #e4e4e4
+}
+
+.item_left {
+ width: 210rpx;
+ height: 100%;
+ box-sizing: border-box;
+ text-align: center;
+ padding: 20rpx;
+ background: #f9f9f9;
+ border-right: 2rpx solid #e4e4e4
+}
+
+.item_left text {
+ /* margin-left: 44rpx; */
+}
+
+.item_right {
+ flex: 1;
+ height: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ padding: 20rpx;
+}
+
+.item_right text {
+ /* margin-left: 66rpx; */
+}
+
+.table_s .tb-l:last-child {
+ border-bottom: none;
+}
+
+.bzfu_img {
+ width: 164rpx;
+ height: 34rpx;
+ /* margin-right: 18rpx; margin-left: 12rpx */
+}
+
+.bz_view {
+ /* height:100rpx; padding: 0 34rpx 0 13rpx; */
+ color: #333;
+ font-size: 28rpx;
+ padding: 20rpx 20rpx 20rpx 10rpx;
+ /* border-bottom: 3rpx solid #eee; */
+ /* border-top: 3rpx solid #eee; */
+}
+
+.bz_view view {
+ width: 460rpx;
+ /* max-height: 70rpx; */
+ /* overflow: hidden; */
+}
+
+.bb_view {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20rpx;
+ color: #333;
+ font-size: 30rpx;
+ /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */
+}
+
+.red_bb {
+ color: #d70026;
+ /* min-width:158rpx;width: auto; */
+}
+
+.bg_jj {
+ width: 14rpx;
+ height: 14rpx;
+ border-top: 2rpx solid #d70026;
+ border-right: 2rpx solid #d70026;
+ transform: rotate(45deg);
+ display: inline-block;
+ margin-bottom: 3rpx;
+}
+
+.bg_jj.down1 {
+ transform: rotate(135deg);
+}
+
+.bz-content {
+ flex-grow: 1;
+ text-align: justify;
+ padding: 0 30rpx 0 20rpx;
+}
+
+/* 顶部边框 */
+.topframe {
+ width: 100%;
+ height: 172rpx;
+ flex-direction: row;
+ justify-content: space-between;
+ border-bottom: 6rpx solid #eeeeee;
+ overflow: hidden;
+}
+
+/* 评价人边框*/
+.topframe .topframe-top {
+ display: flex;
+ margin-top: 40rpx;
+ margin-bottom: 36rpx;
+ color: #7d7d7d;
+ padding-left: 20rpx;
+ font-size: 32rpx;
+}
+
+/*评价人数量*/
+.topframe .topframe-top .topframe-top-val {
+ margin-left: 15rpx;
+
+}
+
+.topframe-top-content {
+ display: flex;
+ width: 36%;
+}
+
+/* 好评 */
+.topframe-praise {
+ width: 61%;
+ text-align: right;
+ color: #dc4355;
+ font-size: 28rpx;
+}
+
+/* 按钮列表 */
+.buttem-list {
+ width: 100%;
+ display: flex;
+ font-size: 20rpx;
+ overflow: hidden;
+}
+
+.buttem-list .item {
+ min-width: 17%;
+ font-size: 24rpx;
+ border-radius: 20rpx;
+ background: #ffe3e2;
+ height: 38rpx;
+ text-align: center;
+ line-height: 38rpx;
+ margin-left: 20rpx;
+}
+
+.buttem-list .item.red {
+ color: #fff;
+ background: #d60022;
+}
+
+/* 用户评价 */
+.middle {
+ width: 95%;
+ margin: 0 auto;
+}
+
+.middle-img-frame {
+ height: 65rpx;
+ display: flex;
+ margin-top: 32rpx;
+
+}
+
+/* 评价的用户图片 */
+.middle-img {
+ width: 60rpx;
+ height: 60rpx;
+ border-radius: 50%;
+ -moz-border-radius: 50%;
+ -webkit-border-radius: 50%;
+ margin-right: 15rpx;
+}
+
+/* 评价的用户边框 */
+.middle-user-frame {
+ height: 65rpx;
+ overflow: hidden;
+}
+
+.middle-user {
+ height: 25;
+ font-size: 28rpx;
+}
+
+/* 评价图片 */
+.middle-img-two {
+ width: 115rpx;
+ height: 25rpx;
+ text-align: center;
+ margin-bottom: 20rpx;
+ margin-left: 5rpx;
+}
+
+.xc-pirces {
+ margin-top: 14rpx;
+}
+
+/* 评价文字 */
+.middle-font {
+ font-size: 30rpx;
+
+}
+
+.iddle-goods-img {
+ width: 100%;
+ display: flex;
+ margin-top: 22rpx;
+}
+
+/* 商品图片 */
+.goods-img {
+ width: 156rpx;
+ height: 156rpx;
+ margin-left: 22rpx;
+ height: 100%;
+}
+
+.parameter-frame {
+ margin-top: 14rxp;
+ margin-bottom: 14rpx;
+ width: 50%;
+ height: 30rpx;
+}
+
+.z_parameter {
+ width: 98%;
+ height: 45rpx;
+ display: flex;
+ line-height: 45rpx;
+ margin-top: 20rpx;
+ margin-bottom: 14rpx;
+ justify-content: space-between;
+}
+
+.parameter-font {
+ font-size: 26rpx;
+
+}
+
+/* 规格 */
+.parameter-state {
+ width: 100rpx;
+ font-size: 24rpx;
+ color: #c4c4c4;
+}
+
+.parameter-dian {
+ display: flex;
+ width: 94rpx;
+ height: 33rpx;
+ font-size: 20rpx;
+ border-radius: 20rpx;
+ line-height: 33rpx;
+ padding-left: 25rpx;
+ border: 4rpx solid #eeeeee;
+
+}
+
+/* 点赞图片 */
+.parameter-img {
+ width: 27rpx;
+ height: 27rpx;
+ margin-top: 3rpx;
+}
+
+.parameter-val {
+ margin-left: 25rpx;
+ font-size: 26rpx;
+ color: #999;
+}
+
+/* 回复 */
+.reply {
+ width: 95%;
+ height: 120rpx;
+ padding-top: 14rpx;
+ border-top: 3rpx solid #eeeeee;
+ margin: 0 auto;
+
+}
+
+.shop-reply {
+ height: 30rpx;
+ color: #d60022;
+ font-size: 24rpx;
+ overflow: hidden;
+}
+
+.shop-font {
+ width: 94%;
+ font-size: 24rpx;
+ padding-top: 10rpx;
+
+}
+
+.line_bulge {
+ width: 17rpx;
+ height: 17rpx;
+ border-top: 1rpx solid #eeeeee;
+ border-left: 1rpx solid #eeeeee;
+ transform: rotate(45deg);
+ position: absolute;
+ top: -12rpx;
+ left: 50rpx;
+ background: #fff;
+}
+
+
+.xc_comment {
+ display: flex;
+ justify-content: space-around;
+ width: 100%;
+ box-sizing: border-box;
+ padding: 10rpx 20rpx;
+ /* height: 42rpx;
+ padding-left: 34rpx; */
+ color: #333;
+
+}
+
+.xc_comment-have-pictures {
+ width: 153rpx;
+ /* height: 42rpx; */
+ line-height: 42rpx;
+ text-align: center;
+ background: #ffe3e2;
+ color: 28rpx;
+ border-radius: 21rpx;
+ font-size: 24rpx;
+}
+
+.xc_comment-discuss {
+ width: 152rpx;
+ height: 42rpx;
+ line-height: 42rpx;
+ text-align: center;
+ background: #ffe3e2;
+ color: 28rpx;
+ border-radius: 20rpx;
+ font-size: 24rpx;
+ margin-left: 28rpx
+}
+
+.xc_comment-detail {
+ display: flex;
+ /* margin-top: 40rpx; */
+ /* width: 524rpx; */
+ /* margin-left: 34rpx; */
+ border-radius: 24rpx;
+ border: 2rpx solid #ebedf0;
+ margin-left: 20rpx;
+ box-sizing: border-box;
+ /* overflow: hidden; */
+}
+
+.xc_user-img {
+ border-radius: 50%;
+ margin: auto 0;
+}
+
+.xc_comment-user {
+ display: flex;
+ /* margin-top: 22rpx;
+ margin-left: 22rpx; */
+}
+
+.xc_user {
+ width: 170rpx;
+ height: 60rpx;
+ margin-left: 6rpx;
+ overflow: hidden;
+}
+
+.xc_user-name {
+ /* height: 25rpx; */
+}
+
+.xc_comment-img {
+ width: 22rpx;
+ height: 22rpx;
+ /* margin-top: 14rpx; */
+ margin-right: 5rpx
+}
+
+.xc_comment-font {
+ /* height: 75rpx; */
+ /* margin-left: 22rpx; */
+ white-space: normal;
+ overflow: hidden;
+ /* margin-top: 8rpx;
+ line-height: 38rpx; */
+
}
+.xc_comment-val {
+ /* width: 88%;
+ height: 30rpx;
+ margin-left: 22rpx;
+ display: flex;
+ margin-top: 15rpx;
+ margin-bottom:15rpx; */
+}
-/*--------- 修改后的样式 -----------*/
-.elli{
- overflow : hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
-}
-.one_elli{
- overflow : hidden;
- text-overflow: ellipsis;
- white-space:nowrap;
-}
-
-.tuwen_title{ /* height: 86rpx; */ background-color:#eeeeee; /* margin-bottom: 32rpx; */ position: relative;
- display: flex; justify-content: center;align-items: center; padding: 20rpx;}
-
-.tuwen_title .g_line{
- width:496rpx;
- height:1rpx;
- border-bottom:#ababab 1rpx solid;
-}
-.tuwen_title .center_s{
- width: 124rpx; position: absolute; height: 34rpx; background-color:#eeeeee; font-size: 32rpx; display: flex;
- overflow: hidden; justify-content: center;align-items: center;
-}
-.tuwen_title .center_s image{ width: 34rpx; height: 26rpx; margin-right: 10rpx}
-.t_g_info{ /* margin: 0 34rpx;margin-bottom: 20rpx; */ display: flex; align-items: center;padding: 20rpx; }
-.red_shu{ width: 10rpx; height: 36rpx; background-color:#da0035; margin-right: 8rpx; }
-
-.tb-l{ /* line-height: 96rpx; */}
-.table_s{ border:#e4e4e4 1rpx solid; box-sizing: border-box;font-size: 26rpx;}
-.tb_item{display: flex; /* height: 96rpx; */ border-bottom: 1rpx solid #e4e4e4 }
-.item_left{width: 210rpx; height: 100%; box-sizing:border-box; text-align: center;padding: 20rpx; background: #f9f9f9 ;border-right:2rpx solid #e4e4e4} .item_left text{ /* margin-left: 44rpx; */}
-.item_right{flex:1; height: 100%; overflow : hidden;white-space:nowrap;text-overflow: ellipsis; padding: 20rpx;}
-.item_right text{ /* margin-left: 66rpx; */}
-
-.table_s .tb-l:last-child {border-bottom: none;}
-
-.bzfu_img{ width: 164rpx; height:34rpx; /* margin-right: 18rpx; margin-left: 12rpx */ }
- .bz_view{ /* height:100rpx; padding: 0 34rpx 0 13rpx; */ color: #333; font-size: 28rpx; padding: 20rpx 20rpx 20rpx 10rpx;
- /* border-bottom: 3rpx solid #eee; */
- /* border-top: 3rpx solid #eee; */}
- .bz_view view{ width: 460rpx; /* max-height: 70rpx; */ /* overflow: hidden; */}
-
-.bb_view{ display: flex;align-items: center;justify-content: space-between; padding: 20rpx; color: #333;
- font-size: 30rpx; /* height: 104rpx; line-height: 104rpx; overflow: hidden; padding-right:26rpx */ }
-.red_bb{ color: #d70026; /* min-width:158rpx;width: auto; */}
-.bg_jj{ width: 14rpx; height:14rpx;
- border-top: 2rpx solid #d70026;
- border-right: 2rpx solid #d70026;
- transform: rotate(45deg);display:inline-block;
- margin-bottom:3rpx;
-}
-.bg_jj.down1{transform: rotate(135deg);}
+.xc_comment-time {
+ /* height: 30rpx; */
+ font-size: 22rpx;
+ color: #a5a5a5;
+ overflow: hidden;
+}
-.bz-content {
- flex-grow: 1;
- text-align: justify;
- padding: 0 30rpx 0 20rpx;
+.xc_goods-img {
+ width: 180rpx;
+ height: 180rpx;
}
-/* 顶部边框 */
-.topframe{
- width: 100%;
- height: 172rpx;
- flex-direction: row;
- justify-content: space-between;
- border-bottom: 6rpx solid #eeeeee;
- overflow: hidden;
+.xc_comment-left {
+ display: inline-block;
+ width: 312rpx;
+ padding: 20rpx;
}
-/* 评价人边框*/
-.topframe .topframe-top{
- display: flex;
- margin-top: 40rpx;
- margin-bottom: 36rpx;
- color: #7d7d7d;
- padding-left: 20rpx;
- font-size: 32rpx;
+
+.xc_goods-img-frame {
+ border-radius: 0 22rpx 22rpx 0;
+ overflow: hidden;
+ /* display:inline-block; */
+ /* width: 40%;
+ height: 90%;
+ text-align: center;
+ padding-top: 30rpx;
+ vertical-align: top; */
}
-/*评价人数量*/
-.topframe .topframe-top .topframe-top-val{
- margin-left: 15rpx;
+.xc_imgs {
+ width: 50rpx;
+ height: 50rpx;
+ border-radius: 50%;
+ margin-right: 5rpx;
}
-.topframe-top-content{
- display: flex;
- width: 36%;
+
+.pj_word_size {
+ font-size: 28rpx
}
-/* 好评 */
-.topframe-praise{
- width: 61%;
- text-align: right;
- color: #dc4355;
- font-size: 28rpx;
+
+.pj_scroll {
+ /* white-space: nowrap; */
+ /* height: 324rpx; */
+ /* margin-bottom: 50rpx; */
+ display: flex;
+ align-items: center;
+ padding: 20rpx 0;
+ /* box-sizing: border-box; */
+ /* box-shadow: 0 8px 12px #e7e9eb; */
}
-/* 按钮列表 */
-.buttem-list{
- width: 100%;
- display: flex;
- font-size: 20rpx;
- overflow: hidden;
+
+
+/*领券*/
+.three-level-word {
+ font-size: 25rpx;
}
-.buttem-list .item{
- min-width: 17%;
- font-size: 24rpx;
- border-radius: 20rpx;
- background:#ffe3e2;
- height:38rpx;
- text-align: center;
- line-height: 38rpx;
- margin-left: 20rpx;
+.four-level-word {
+ font-size: 23rpx;
+}
+
+.cx-frame {
+ /* border-top:3rpx solid #eee; */
+ /* width:99%;
+ height: 95rpx;
+ line-height: 95rpx;
+ padding-left:24rpx; */
+ padding: 20rpx;
}
-.buttem-list .item.red{
- color: #fff;
- background: #d60022;
+.cx-frame .cx-sizs {
+ /* width: 68rpx; */
+ /* height: 100%; */
+ /* line-height: 100rpx; */
+ /* overflow: hidden; */
+ /* margin-left: 10rpx; */
}
-/* 用户评价 */
-.middle{
- width: 95%;
- margin:0 auto;
+.xc-coupon-fram {
+ position: relative;
+ margin-right: 16rpx;
+ /* width:200rpx; */
+ /* padding-top:30rpx; */
+
+}
+
+.xc-coupon-fram .xc-coupon {
+ /* width:175rpx ;
+ height: 40rpx;
+ line-height: 40rpx; */
+ background-color: #d60021;
+ /* margin:0 auto; */
+ color: #fff;
+ padding: 6rpx 20rpx;
+
+}
+
+.xc-coupon-fram .xc-circular {
+ width: 16rpx;
+ height: 16rpx;
+ background-color: white;
+ position: absolute;
+ top: 50%;
+ /* left: -10rpx; */
+ transform: translateY(-50%);
+}
+
+.xc-coupon-fram .xc-one {
+ left: -8rpx;
+}
+
+.xc-coupon-fram .xc-two {
+ right: -8rpx;
+}
+
+.cx-obtain-coupon {
+ /* width: 65rpx;
+ height: 100%;
+ padding-left:15rpx; */
+ color: #d70025;
+ display: flex;
+ align-items: center;
+ /* position: absolute;
+ right: 5rpx; */
+}
+
+/* 自定义弹出窗口 */
+.cx-popup {
+ width: 100%;
+ background: #fff;
+ z-index: 35;
+ border-top-left-radius: 25rpx;
+ border-top-right-radius: 25rpx;
+ position: fixed;
+ bottom: 0;
+}
+
+.cx-popup .top {
+ /* width: 90%;
+ height:85rpx; */
+ font-size: 32rpx;
+ padding: 20rpx 0;
+ border-bottom: 2rpx solid #ebedf0;
+ /* padding-top: 50rpx;
+ font-weight:600; */
+
}
-.middle-img-frame{
- height:65rpx;
+
+.cx-popup .top-frame {
+ /* width: 100%;
display: flex;
- margin-top: 32rpx;
-
+ justify-content: center;
+ overflow: hidden; */
}
-/* 评价的用户图片 */
-.middle-img{
- width:60rpx;
- height:60rpx;
- border-radius: 50%;
- -moz-border-radius: 50%;
- -webkit-border-radius: 50%;
- margin-right: 15rpx;
+
+.xc-valid-coupon {
+ width: 90%;
+ height: 40rpx;
+ padding-top: 24rpx;
+ overflow: hidden;
}
-/* 评价的用户边框 */
-.middle-user-frame{
- height: 65rpx;
+
+.xc-frame {
+ position: relative;
+}
+
+.xc-coupon-frame {
+ width: 100%;
+ max-height: 560rpx;
+ overflow: auto;
+
+}
+
+.xc-coupon-frame .rel:not(:first-child) {
+ margin-top: 20rpx;
+}
+
+.xc-coupon-frame .coupon {
+ width: 100%;
+ height: 168rpx;
+ border-radius: 25rpx;
+ border: 2rpx solid #ffdcdc;
+ overflow: hidden;
+ /* margin-top:16rpx; */
+ box-sizing: border-box;
+
+}
+
+/* .xc-coupon-frame .coupon ~ .coupon {
+ margin-top:16rpx;
+} */
+.xc-coupon-left {
+ width: 216rpx;
+ /* height: 100%; */
+ background-color: #ffeeef;
+ border-right: 4rpx dashed #ffdbd9;
+ overflow: hidden;
+ /* line-height: 100%; */
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex-shrink: 0;
+}
+
+.xc-money {
+ color: #f30026;
+ text-align: center;
+}
+
+.xc-rmb {
+ /* width:44rpx;
+ padding-top:7rpx; */
+}
+
+.xc-money-frame {
+ /* margin-left:35rpx;
+ margin-top:48rpx; */
+
+}
+
+.xc-spacing {
+ letter-spacing: 4rpx;
+}
+
+.xc-circular-one {
+ position: absolute;
+ top: -15rpx;
+ left: 205rpx;
+ width: 30rpx;
+ height: 30rpx;
+ background: #fff;
+ overflow: hidden;
+}
+
+.xc-circular-two {
+ position: absolute;
+ bottom: -15rpx;
+ /* top:150rpx; */
+ left: 205rpx;
+ width: 30rpx;
+ height: 30rpx;
+ background: #fff;
+}
+
+.xc-detail-coupon {
+ /* margin-left: 22rpx;
overflow: hidden;
+ padding-top: 43rpx; */
+ /* display: flex;
+ align-items: center; */
+}
+
+.xc-coupon-right {
+ /* width: 455rpx;
+ height: 100%; */
+ background: #fffaf9;
+ padding: 20rpx;
+ box-sizing: border-box;
+ width: 100%;
+ justify-content: space-between;
+ align-items: center;
}
-.middle-user{
- height: 25;
- font-size: 28rpx;
+
+.xc-below {
+ margin-top: 20rpx;
+
}
-/* 评价图片 */
-.middle-img-two{
- width: 115rpx;
- height: 25rpx;
- text-align: center;
- margin-bottom:20rpx;
- margin-left:5rpx;
+
+.xc-get {
+
+ width: 140rpx;
+ /* height: 48rpx; */
+ color: #fff;
+ text-align: center;
+ border-radius: 27rpx;
+ line-height: 54rpx;
+ /* margin-left:20rpx; */
}
-.xc-pirces{
- margin-top: 14rpx;
+
+.background {
+ background: #f40028;
}
-/* 评价文字 */
-.middle-font{
- font-size: 30rpx;
-
+
+/*--不可使用--*/
+.background.nouse {
+ background: gainsboro;
}
-.iddle-goods-img{
- width: 100%;
- display: flex;
- margin-top:22rpx;
+
+.xc-background {
+ background: #b9b9b9;
}
-/* 商品图片 */
-.goods-img{
- width: 156rpx;
- height: 156rpx;
- margin-left: 22rpx;
- height: 100%;
+
+
+.cx-confirm {
+ width: 100%;
+ padding: 20rpx;
+ box-sizing: border-box;
+ /* height: 160rpx; */
+
}
-.parameter-frame{
- margin-top:14rxp;
- margin-bottom: 14rpx;
- width:50%;
- height: 30rpx;
+
+.cx-confirm .confirm {
+ /* width: 372rpx;
+ height: 60rpx; */
+ background-color: #f40026;
+ color: #fff;
+ border-radius: 10rpx;
+ line-height: 80rpx;
+ font-size: 28rpx;
+
+}
+
+.up {
+ animation: up .7s;
+}
+
+.down {
+ animation: down 1s;
+}
+
+@keyframes up {
+ 0% {
+ transform: translateY(550rpx);
+ }
+
+ 100% {
+ transform: translateY(0);
+ }
}
-.z_parameter{
- width:98%;
- height: 45rpx;
- display:flex;
- line-height: 45rpx;
- margin-top: 20rpx;
- margin-bottom: 14rpx;
- justify-content : space-between;
+
+@keyframes down {
+ 0% {
+ transform: translateY(0);
+ }
+
+ 100% {
+ transform: translateY(550rpx);
+ }
+}
+
+
+/* 分享 */
+.icon-share {
+ font-size: 46rpx;
+ color: #d60021;
+}
+
+.xc-share-frame {
+ /* width: 129rpx;
+ height: 48rpx;
+ border-top-left-radius: 18rpx;
+ border-bottom-left-radius: 18rpx; */
+ /* background: #d60021; */
+ /* position:absolute;
+ left:622rpx;
+ top:-37rpx;
+ line-height:50rpx;
+ margin-top:52rpx; */
+}
+
+.xc-share-frame-jieti {
+ width: 129rpx;
+ height: 48rpx;
+ border-top-left-radius: 18rpx;
+ border-bottom-left-radius: 18rpx;
+ background: #d60021;
+ line-height: 50rpx;
+}
+
+.xc-share-frame .share-font,
+.xc-share-frame-jieti .share-font {
+ font-size: 32rpx;
+ color: #fff;
+ margin-left: 10rpx;
+
+}
+
+
+.xc-share-frame .share-frame,
+.xc-share-frame-jieti .share-frame {
+ width: 30rpx;
+ height: 30rpx;
+ margin-top: 9rpx;
+ margin-left: 10rpx;
+
+}
+
+.xc-share {
+ width: 90%;
+ height: 800rpx;
+ background: #fff;
+ z-index: 35;
+}
+
+.img-frame {
+ position: absolute;
+ top: 175rpx;
+ left: 100rpx;
+ z-index: 55;
+ overflow: hidden;
+
+}
+
+.img-frame .img {
+ width: 100rpx;
+ height: 100rpx;
+
+}
+
+.xc-share .top {
+ height: 85rpx;
+ width: 100%;
+ border-bottom: 4rpx dashed #f5f5f5;
+ overflow: hidden;
+
+}
+
+.xc-share .name {
+ font-size: 25rpx;
+ margin-left: 180rpx;
+ color: #000;
+
+}
+
+.xc-share .recommend {
+ width: 110rpx;
+ height: 12rpx;
+ color: #fff;
+ background: #d60021;
+ font-size: 20rpx;
+ border-radius: 25rpx;
+ margin-left: 10rpx;
+ line-height: 37rpx;
+}
+
+.xc-left-circle {
+ width: 40rpx;
+ height: 25rpx;
+ position: absolute;
+ top: 280rpx;
+ left: 29rpx;
+ z-index: 55;
+ background: #727272;
+ border-radius: 50rpx 50rpx 0 0;
+ transform: rotate(90deg);
+
+}
+
+.xc-right-circle {
+ width: 40rpx;
+ height: 25rpx;
+ position: absolute;
+ top: 280rpx;
+ left: 683rpx;
+ z-index: 55;
+ background: #727272;
+ border-radius: 50rpx 50rpx 0 0;
+ transform: rotate(270deg);
+
+}
+
+.xc-circle-frame {
+ width: 25rpx;
+ height: 40rpx;
+ overflow: hidden;
}
-.parameter-font{
- font-size: 26rpx;
-
+
+.xc-goods-name {
+ width: 95%;
+ font-size: 35rpx;
+ padding-left: 75rpx;
+ height: 50rpx;
+ padding-top: 10rpx;
+ color: #000;
+
}
-/* 规格 */
-.parameter-state{
- width: 100rpx;
- font-size: 24rpx;
- color: #c4c4c4;
+
+.xc-good-img {
+ width: 100%;
+ height: 381rpx;
+ margin-top: 5rpx;
+
}
-.parameter-dian{
- display: flex;
- width: 94rpx;
- height: 33rpx;
- font-size: 20rpx;
- border-radius: 20rpx;
- line-height:33rpx;
- padding-left: 25rpx;
- border:4rpx solid #eeeeee;
+.xc-good-img .img {
+ width: 90%;
+ height: 381rpx;
}
-/* 点赞图片 */
-.parameter-img{
- width: 27rpx;
- height: 27rpx;
- margin-top: 3rpx;
+
+.xc-ensure-frame {
+ width: 90%;
+ height: 60rpx;
+ border-bottom: 2rpx solid #d8d6d7;
}
-.parameter-val{
- margin-left:25rpx;
- font-size: 26rpx;
- color: #999;
+
+.xc-ensure {
+ width: 30%;
+ height: 60rpx;
+ line-height: 60rpx;
}
-/* 回复 */
-.reply{
- width: 95%;
- height: 120rpx;
- padding-top: 14rpx;
- border-top:3rpx solid #eeeeee;
- margin:0 auto;
+xc-ensure-div {
+ width: 100%;
+ height: 60rpx;
}
-.shop-reply{
- height: 30rpx;
- color:#d60022;
- font-size:24rpx;
- overflow: hidden;
+
+.xc-ensure .word {
+ font-size: 25rpx;
+ color: #d30025;
+ margin-left: 9rpx;
+
}
-.shop-font{
- width: 94%;
- font-size: 24rpx;
- padding-top: 10rpx;
-
+
+.xc-ensure .img {
+ width: 25rpx;
+ height: 25rpx;
+ margin-top: 18rpx;
+
}
-.line_bulge{
- width: 17rpx;
- height: 17rpx;
- border-top: 1rpx solid #eeeeee;
- border-left: 1rpx solid #eeeeee;
- transform:rotate(45deg);
- position: absolute;
- top: -12rpx;
- left:50rpx;
- background:#fff;
+
+.xc-bottmon {
+ width: 100%;
}
+.xc-bottmon .xc-left {
+ width: 55%;
+ margin-top: 30rpx;
+ padding-left: 20rpx;
-.xc_comment{
- display: flex;
- justify-content: space-around;
- width: 100%;
- box-sizing: border-box;
- padding: 10rpx 20rpx;
- /* height: 42rpx;
- padding-left: 34rpx; */
- color: #333;
+}
+.xc-left .xc-top {
+ font-size: 25rpx;
+ height: 40rpx;
+ line-height: 40rpx;
+ color: #000;
}
-.xc_comment-have-pictures{
- width: 153rpx;
- /* height: 42rpx; */
- line-height: 42rpx;
- text-align: center;
- background: #ffe3e2;
- color: 28rpx;
- border-radius:21rpx;
- font-size: 24rpx;
-}
-.xc_comment-discuss{
- width: 152rpx;
- height: 42rpx;
- line-height: 42rpx;
- text-align: center;
- background: #ffe3e2;
- color: 28rpx;
- border-radius:20rpx;
- font-size: 24rpx;
- margin-left: 28rpx
+
+.xc-left .xc-middle {
+ font-size: 25rpx;
+ color: #b2b2b2;
+ height: 30rpx;
+ line-height: 30rpx;
}
-.xc_comment-detail{
- display: flex;
- /* margin-top: 40rpx; */
- /* width: 524rpx; */
- /* margin-left: 34rpx; */
- border-radius: 24rpx;
- border: 2rpx solid #ebedf0;
- margin-left: 20rpx;
- box-sizing: border-box;
- /* overflow: hidden; */
-}
-
-.xc_user-img{
- border-radius:50%;
- margin: auto 0;
+.xc-left .xc-buttem {
+ font-size: 25rpx;
+ height: 100rpx;
+ line-height: 100rpx;
+ color: #000;
}
-.xc_comment-user{
- display: flex;
- /* margin-top: 22rpx;
- margin-left: 22rpx; */
+.xc-ensure-right {
+ width: 30%;
}
-.xc_user{
- width: 170rpx;
- height: 60rpx;
- margin-left: 6rpx;
- overflow: hidden;
+
+.xc-qrcode {
+ width: 120rpx;
+ height: 120rpx;
+ margin-top: 43rpx;
+ margin-left: 80rpx;
+
}
-.xc_user-name{ /* height: 25rpx; */}
-.xc_comment-img{
- width: 22rpx;
- height: 22rpx;
- /* margin-top: 14rpx; */
- margin-right: 5rpx
-}
-.xc_comment-font{
- /* height: 75rpx; */
- /* margin-left: 22rpx; */
- white-space:normal;
- overflow: hidden;
- /* margin-top: 8rpx;
- line-height: 38rpx; */
+
+.xc-close {
+ width: 50rpx;
+ height: 50rpx;
+ border-radius: 50%;
+ border: 3rpx solid #fff;
+ text-align: center;
+ line-height: 41rpx;
+ font-size: 50rpx;
+ color: #fff;
+ font-weight: lighter;
+ font-family: MingLiU;
+ transform: rotate(270deg);
+ overflow: auto;
+ margin-top: 6rpx;
+ margin-bottom: 1rpx;
}
-.xc_comment-val{
- /* width: 88%;
- height: 30rpx;
- margin-left: 22rpx;
- display: flex;
- margin-top: 15rpx;
- margin-bottom:15rpx; */
+
+.xc-close-frame {
+ position: absolute;
+ margin-top: 30rpx;
+ width: 90%;
+ display: flex;
+ justify-content: center;
+ overflow: auto;
+
}
-.xc_comment-time{
- /* height: 30rpx; */
- font-size: 22rpx;
- color: #a5a5a5;
- overflow: hidden;
+.xc-guanbi {
+ width: 100%;
+ height: 80rpx;
+ overflow: hidden;
}
-.xc_goods-img{
- width: 180rpx;height: 180rpx;
+
+/* 自定义弹出窗口 */
+.cx-popup {
+ width: 100%;
+ background: #fff;
+ z-index: 35;
+ border-top-left-radius: 10rpx;
+ border-top-right-radius: 10rpx;
+ position: fixed;
+ bottom: 0;
}
-.xc_comment-left{
- display:inline-block;
- width: 312rpx;
- padding: 20rpx;
+
+.xc-top-content {
+ width: 88%;
+ height: 85rpx;
+ padding-top: 50rpx;
+ font-size: 36rpx;
}
-.xc_goods-img-frame{
- border-radius: 0 22rpx 22rpx 0;
- overflow: hidden;
- /* display:inline-block; */
- /* width: 40%;
- height: 90%;
- text-align: center;
- padding-top: 30rpx;
- vertical-align: top; */
+
+
+.xc-valid-coupon {
+ width: 90%;
+ height: 40rpx;
+ padding-top: 24rpx;
+ overflow: hidden;
}
-.xc_imgs{
- width: 50rpx;
- height:50rpx;
- border-radius:50%;
- margin-right: 5rpx;
+
+.xc-frame {
+ /* width: 100%;
+ margin-top:20rpx; */
+ padding: 20rpx;
}
-.pj_word_size{ font-size: 28rpx}
-.pj_scroll{
- /* white-space: nowrap; */
- /* height: 324rpx; */
- /* margin-bottom: 50rpx; */
+.xc-frame .list-frame {
+ width: 90%;
+ height: 100%;
+ overflow-y: scroll;
+
+ margin-top: 20rpx;
+
+}
+
+.xc-close-frame {
+ margin-top: 30rpx;
+ width: 15%;
display: flex;
- align-items: center;
- padding: 20rpx 0;
- /* box-sizing: border-box; */
- /* box-shadow: 0 8px 12px #e7e9eb; */
}
+.xc-close {
+ width: 70rpx;
+ height: 70rpx;
+ border-radius: 50%;
+ border: 5rpx solid #a5a5a7;
+ text-align: center;
+ line-height: 55rpx;
+ font-size: 80rpx;
+ color: #a5a5a7;
+ font-family: "微软正黑体";
+ margin-top: 8rpx;
-/*领券*/
-.three-level-word{
- font-size: 25rpx;
}
-.four-level-word{
- font-size: 23rpx;
-}
-.cx-frame{
- /* border-top:3rpx solid #eee; */
- /* width:99%;
- height: 95rpx;
- line-height: 95rpx;
- padding-left:24rpx; */
- padding: 20rpx;
+
+.xc-money {
+ color: #ff0013;
}
-.cx-frame .cx-sizs{
- /* width: 68rpx; */
- /* height: 100%; */
- /* line-height: 100rpx; */
- /* overflow: hidden; */
- /* margin-left: 10rpx; */
+
+.xc-money-frame {
+ /* margin-left:35rpx; */
+
}
-.xc-coupon-fram{
- position: relative;
- margin-right: 16rpx;
- /* width:200rpx; */
- /* padding-top:30rpx; */
+
+.xc-coupon-effect {
+ width: 99%;
+ height: 128rpx;
+ border-bottom: 3rpx solid #ddd;
+
}
-.xc-coupon-fram .xc-coupon{
- /* width:175rpx ;
- height: 40rpx;
- line-height: 40rpx; */
- background-color:#d60021 ;
- /* margin:0 auto; */
- color:#fff;
- padding: 6rpx 20rpx;
+
+.xc-goods-coupon {
+ width: 80%;
+ height: 100%;
}
-.xc-coupon-fram .xc-circular{
- width: 16rpx;
- height:16rpx;
- background-color: white;
- position:absolute;
- top: 50%;
- /* left: -10rpx; */
- transform: translateY(-50%);
+
+.xc-title {
+ width: 50%;
+ margin-left: 222rpx;
+
}
-.xc-coupon-fram .xc-one{
- left: -8rpx;
+
+.xc-coupon-money {
+ color: #c91e31;
+ font-size: 35rpx;
+ margin-top: 20rpx;
+
}
-.xc-coupon-fram .xc-two{
- right: -8rpx;
+
+.xc-coupon-time {
+ height: 50rpx;
+ font-size: 27rpx;
+ color: #a4a4a4;
}
-.cx-obtain-coupon{
- /* width: 65rpx;
- height: 100%;
- padding-left:15rpx; */
- color: #d70025;
- display: flex;
- align-items: center;
- /* position: absolute;
- right: 5rpx; */
+.xc-coupon-time .time {
+ margin-left: 15rpx;
+ font-size: 27rpx;
}
-/* 自定义弹出窗口 */
-.cx-popup{
- width:100%;
- background: #fff;
- z-index: 35;
- border-top-left-radius: 25rpx;
- border-top-right-radius: 25rpx;
- position:fixed;
- bottom:0;
-}
-
-.cx-popup .top{
- /* width: 90%;
- height:85rpx; */
- font-size: 32rpx;
- padding: 20rpx 0;
- border-bottom: 2rpx solid #ebedf0;
- /* padding-top: 50rpx;
- font-weight:600; */
+.xc-coupon-selection {
+ width: 99%;
+ height: 100%;
+
}
-.cx-popup .top-frame{
- /* width: 100%;
- display: flex;
- justify-content: center;
- overflow: hidden; */
-}
-.xc-valid-coupon{
- width: 90%;
- height:40rpx;
- padding-top: 24rpx;
- overflow: hidden;
+
+.xc-confirm {
+ width: 90%;
+ height: 75rpx;
+ margin: 0 auto;
+ background: #c41830;
+ color: #fff;
+ border-radius: 10rpx;
+ font-size: 30rpx;
+ margin-top: 50rpx;
}
-.xc-frame{
- position: relative;
+
+.xc-not-Selection {
+ width: 60rpx;
+ height: 60rpx;
+ background: #eeeeee;
}
-.xc-coupon-frame {
- width: 100%;
- max-height: 560rpx;
- overflow: auto;
-
+
+/*---------------视频图片---------------*/
+.xc-imageCount {
+ width: 95rpx;
+ height: 50rpx;
+ background-color: rgba(0, 0, 0, 0.3);
+ border-radius: 40rpx;
+ line-height: 50rpx;
+ color: #fff;
+ text-align: center;
+ font-size: 26rpx;
+ position: absolute;
+
+ right: 23rpx;
+ bottom: 21rpx;
}
-.xc-coupon-frame .rel:not(:first-child) {
- margin-top: 20rpx;
+
+
+/* 视频图片的边框 */
+.xc-videos-picture {
+ width: 100%;
+ height: 750rpx;
}
-.xc-coupon-frame .coupon {
- width:100%;
- height: 168rpx;
- border-radius: 25rpx;
- border:2rpx solid #ffdcdc;
- overflow: hidden;
- /* margin-top:16rpx; */
- box-sizing: border-box;
+
+/* 视频 */
+.xc-videos {
+ width: 100%;
+ height: 544rpx;
+
}
-/* .xc-coupon-frame .coupon ~ .coupon {
- margin-top:16rpx;
-} */
-.xc-coupon-left{
- width: 216rpx;
- /* height: 100%; */
- background-color: #ffeeef;
- border-right: 4rpx dashed #ffdbd9;
- overflow: hidden;
- /* line-height: 100%; */
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- flex-shrink: 0;
-}
-.xc-money{
- color: #f30026;
- text-align:center;
-}
-.xc-rmb{
- /* width:44rpx;
- padding-top:7rpx; */
+
+/* 点击视频或图片 */
+.xc-video-picture {
+
+ bottom: 20rpx;
+ left: 0rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 45%;
+ height: 60rpx;
+ margin-left: 215rpx;
+
}
-.xc-money-frame{
- /* margin-left:35rpx;
- margin-top:48rpx; */
+
+.xc-video-button:before {
+ content: "";
+ position: absolute;
+ left: 48%;
+ top: 40%;
+ width: 0;
+ height: 0;
+ margin-left: -36rpx;
+ margin-top: -10rpx;
+ border-width: 13rpx;
+ border-style: dashed;
+ border-color: transparent transparent transparent #fff;
+ font-size: 0;
+ line-height: 0;
+ z-index: 2;
+ -webkit-backface-visibility: hidden;
+}
+
+.xc-video-buttons:before {
+ content: "";
+ position: absolute;
+ left: 50%;
+ top: 41%;
+ width: 0;
+ height: 0;
+ margin-left: -36rpx;
+ margin-top: -10rpx;
+ border-width: 13rpx;
+ border-style: dashed;
+ border-color: transparent transparent transparent #000;
+ font-size: 0;
+ line-height: 0;
+ z-index: 2;
+ -webkit-backface-visibility: hidden;
+}
+
+.xc-video {
+ /* width:100rpx; */
+ /* height: 50rpx;
+ line-height: 50rpx; */
+ text-align: center;
+ /* margin-left:-30rpx; */
+
}
-.xc-spacing{
- letter-spacing:4rpx;
+
+/* 图片 */
+.xc-picture {
+ color: #000;
+ background: #dcdcdc;
+ width: 94rpx;
+ height: 45rpx;
+ font-size: 25rpx;
+ border-radius: 25rpx;
+ font-family: 'SimHei', Arial;
+ text-align: center;
+ line-height: 45rpx;
+ margin-left: 53rpx
}
-.xc-circular-one{
- position: absolute;
- top:-15rpx;
- left:205rpx;
- width: 30rpx;
- height: 30rpx;
- background: #fff;
- overflow: hidden;
+
+/* 点击视频 */
+.xc-video-button {
+ position: relative;
+ color: #000;
+ background: #dcdcdc;
+ width: 85rpx;
+ height: 45rpx;
+ line-height: 45rpx;
+ font-size: 30rpx;
+ border-radius: 25rpx;
+ font-family: 'SimHei', Arial;
+ padding-left: 11rpx;
}
-.xc-circular-two{
- position: absolute;
- bottom: -15rpx;
- /* top:150rpx; */
- left:205rpx;
- width: 30rpx;
- height:30rpx;
- background: #fff;
-}
-.xc-detail-coupon{
- /* margin-left: 22rpx;
- overflow: hidden;
- padding-top: 43rpx; */
- /* display: flex;
- align-items: center; */
+
+
+.xc-sn {
+ color: #fff;
+ background: #c7161e;
+ border-color: transparent transparent transparent #fff;
}
-.xc-coupon-right{
- /* width: 455rpx;
- height: 100%; */
- background: #fffaf9;
- padding: 20rpx;
- box-sizing: border-box;
- width: 100%;
- justify-content: space-between;
- align-items: center;
+
+/* 图片 */
+.xc-pictures {
+ width: 100%;
+ height: 529rpx;
+
}
-.xc-below{
- margin-top:20rpx;
+/*视频封面的图片 */
+.xc-picturess {
+ position: relative;
+ width: 100%;
+ height: 529rpx;
}
-.xc-get{
-
- width: 140rpx;
- /* height: 48rpx; */
- color: #fff;
- text-align: center;
- border-radius:27rpx;
- line-height:54rpx;
- /* margin-left:20rpx; */
+
+/* 播放 */
+.xc-play {
+ width: 130rpx;
+ height: 130rpx;
+ position: absolute;
+ top: 207rpx;
+ left: 309rpx;
}
-.background{
- background:#f40028;
+.xc-video-buttons {
+ position: relative;
+ color: #000;
+ background: #dcdcdc;
+ width: 85rpx;
+ height: 45rpx;
+ line-height: 45rpx;
+ font-size: 30rpx;
+ border-radius: 25rpx;
+ font-family: 'SimHei', Arial;
+ padding-left: 11rpx;
}
-/*--不可使用--*/
-.background.nouse{
- background:gainsboro;
+
+
+.wsize {
+ font-size: 32rpx
}
-.xc-background{
- background:#b9b9b9;
+.five-level-word {
+ font-size: 24rpx;
}
-.cx-confirm{
- width: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- /* height: 160rpx; */
-
+/*-- 推荐商品 --*/
+.xc-goods {
+ height: auto;
+ background: #f2f2f2;
+ padding: 0 20rpx;
+ margin-top: -25rpx;
+ padding-bottom: 20rpx
}
-.cx-confirm .confirm{
- /* width: 372rpx;
- height: 60rpx; */
- background-color: #f40026;
- color: #fff;
- border-radius:10rpx;
- line-height: 80rpx;
- font-size: 28rpx;
+
+.xc-goods-recommend {
+ border-radius: 20rpx;
+ width: 345rpx;
+ height: 450rpx;
+ margin-top: 25rpx;
+ display: inline-block;
}
-.up{ animation: up .7s; }
-.down{ animation: down 1s; }
-@keyframes up { 0% { transform: translateY(550rpx); } 100% { transform: translateY(0); } }
-@keyframes down { 0% { transform: translateY(0); } 100% { transform: translateY(550rpx); } }
+.xc-goods-recommend.ml {
+ margin-left: 22rpx
+}
+.xc-goods-recommend .xc-goods-imgs {
+ width: 100%;
+ height: 325rpx;
+ border-radius: 20rpx 20rpx 0 0;
+}
-/* 分享 */
-.icon-share {
- font-size: 46rpx;
- color: #d60021;
+.xc-goods-bottom {
+ width: 345rpx;
+ height: 134rpx;
+ background: #fff;
+ border-radius: 0 0 20rpx 20rpx;
+ bottom: -8rpx;
+ left: 0rpx;
}
-.xc-share-frame{
- /* width: 129rpx;
- height: 48rpx;
- border-top-left-radius: 18rpx;
- border-bottom-left-radius: 18rpx; */
- /* background: #d60021; */
- /* position:absolute;
- left:622rpx;
- top:-37rpx;
- line-height:50rpx;
- margin-top:52rpx; */
+
+.xc-goods-bottom .monry-frame {
+ width: 283rpx;
+ height: 52rpx;
+ padding-left: 24rpx;
+
}
-.xc-share-frame-jieti{
- width: 129rpx;
- height: 48rpx;
- border-top-left-radius: 18rpx;
- border-bottom-left-radius: 18rpx;
- background: #d60021;
- line-height:50rpx;
+
+.xc-good-explain {
+ width: 283rpx;
+ height: 60rpx;
+ word-break: normal;
+ margin-left: 30rpx;
+ font-size: 26rpx;
+ line-height: 30rpx;
+ margin-top: 5rpx;
}
-.xc-share-frame .share-font,.xc-share-frame-jieti .share-font{
- font-size: 32rpx;
- color:#fff;
- margin-left:10rpx;
+.money-color-val {
+ color: #c6172f;
+}
+.rmb-symbol {
+ line-height: 81rpx;
+ height: 53rpx;
+ font-size: 28rpx;
}
+.xc-original-price {
+ color: #c0c0c0;
+}
-.xc-share-frame .share-frame,.xc-share-frame-jieti .share-frame{
- width: 30rpx;
- height: 30rpx;
- margin-top:9rpx;
- margin-left: 10rpx;
+/* 文字中间加线条 */
+.word-lines {
+ text-decoration: line-through;
+ line-height: 90rpx;
+ margin-left: 10rpx;
+ font-size: 20rpx;
+}
+.xc-linellae-frame {
+ width: 100%;
+ height: 70rpx;
+ background: #f2f2f2;
}
-.xc-share {
- width:90%;
- height:800rpx;
- background:#fff;
- z-index:35;
-}
-.img-frame{
- position: absolute;
- top: 175rpx;
- left:100rpx;
- z-index: 55;
- overflow:hidden;
-
-}
-.img-frame .img{
- width: 100rpx;
- height: 100rpx;
-
-}
-.xc-share .top{
- height: 85rpx;
- width: 100%;
- border-bottom: 4rpx dashed #f5f5f5;
- overflow:hidden;
-
-}
-.xc-share .name{
- font-size: 25rpx;
- margin-left:180rpx;
- color:#000;
-
-}
-
-.xc-share .recommend{
- width: 110rpx;
- height: 12rpx;
- color: #fff;
- background: #d60021;
- font-size: 20rpx;
- border-radius:25rpx;
- margin-left:10rpx;
- line-height:37rpx;
-}
-.xc-left-circle{
- width: 40rpx;
- height: 25rpx;
- position: absolute;
- top:280rpx;
- left:29rpx;
- z-index: 55;
- background:#727272;
- border-radius:50rpx 50rpx 0 0;
- transform:rotate(90deg);
-
-}
-.xc-right-circle{
- width: 40rpx;
- height: 25rpx;
- position: absolute;
- top: 280rpx;
- left:683rpx;
- z-index: 55;
- background:#727272;
- border-radius:50rpx 50rpx 0 0;
- transform:rotate(270deg);
-
-}
-.xc-circle-frame{
- width: 25rpx;
- height: 40rpx;
- overflow: hidden;
+
+.xc-linellae-frame .xc-linellae {
+ width: 386rpx;
+ height: 1rpx;
+ border-bottom: 1rpx solid #ebedf0;
}
-.xc-goods-name{
- width: 95%;
- font-size: 35rpx;
- padding-left: 75rpx;
- height: 50rpx;
- padding-top: 10rpx;
- color:#000;
-
+
+.xc-recommend-frame {
+ background: #f2f2f2;
+ width: 97rpx;
+ height: 100%;
+ padding-left: 10rpx;
}
-.xc-good-img{
- width: 100%;
- height: 381rpx;
- margin-top:5rpx;
-
-}
-.xc-good-img .img{
- width: 90%;
- height: 381rpx;
-}
-.xc-ensure-frame{
- width: 90%;
- height: 60rpx;
- border-bottom: 2rpx solid #d8d6d7;
-}
-.xc-ensure{
- width: 30%;
- height: 60rpx;
- line-height: 60rpx;
-}
-xc-ensure-div{
- width: 100%;
- height: 60rpx;
-}
-.xc-ensure .word{
- font-size: 25rpx;
- color: #d30025;
- margin-left:9rpx;
-
-}
-.xc-ensure .img{
- width: 25rpx;
- height: 25rpx;
- margin-top:18rpx;
-
-}
-
-.xc-bottmon{
- width: 100%;
-}
-.xc-bottmon .xc-left{
- width: 55%;
- margin-top:30rpx;
- padding-left:20rpx;
-
-}
-.xc-left .xc-top{
- font-size: 25rpx;
- height:40rpx;
- line-height:40rpx;
- color:#000;
-}
-.xc-left .xc-middle{
- font-size: 25rpx;
- color: #b2b2b2;
- height:30rpx;
- line-height:30rpx;
-}
-.xc-left .xc-buttem{
- font-size: 25rpx;
- height:100rpx;
- line-height:100rpx;
- color:#000;
-}
-.xc-ensure-right{
- width: 30%;
-}
-.xc-qrcode{
- width:120rpx;
- height: 120rpx;
- margin-top:43rpx;
- margin-left:80rpx;
-
-}
-.xc-close{
- width:50rpx;
- height:50rpx;
- border-radius:50%;
- border:3rpx solid #fff;
- text-align:center;
- line-height: 41rpx;
- font-size:50rpx;
- color:#fff;
- font-weight: lighter;
- font-family:MingLiU;
- transform:rotate(270deg);
- overflow:auto;
- margin-top:6rpx;
- margin-bottom:1rpx;
-
-}
-.xc-close-frame{
- position:absolute;
- margin-top:30rpx;
- width:90%;
- display:flex;
- justify-content:center;
- overflow: auto;
-}
-.xc-guanbi{
- width: 100%;
- height: 80rpx;
- overflow: hidden;
+.xc-recommend-frame .xc-recommend {
+ width: 35rpx;
+ height: 27rpx;
}
+.xc-recommend-frame .xc-recommend-word {
+ width: 58rpx;
+ font-size: 24rpx;
+ color: #a9a9a9;
+ margin-left: 5rpx;
+ margin-bottom: 5rpx;
+ margin-top: 1rpx;
-/* 自定义弹出窗口 */
-.cx-popup{
- width:100%;
- background: #fff;
- z-index: 35;
- border-top-left-radius: 10rpx;
- border-top-right-radius: 10rpx;
- position:fixed;
- bottom:0;
}
-.xc-top-content{
- width: 88%;
- height:85rpx;
- padding-top: 50rpx;
- font-size: 36rpx;
+.xc-price-frame {
+ color: #ec0022;
+ align-items: baseline;
+ /* height:44rpx; */
}
+.xc-price-frame .sign {
+ margin-top: 19rpx;
+ margin-left: -4px;
+}
-.xc-valid-coupon{
- width: 90%;
- height:40rpx;
- padding-top: 24rpx;
- overflow: hidden;
+.xc-val-price {
+ margin-left: 24rpx;
+ color: #ec0022;
+ padding-top: 13rpx;
}
-.xc-frame {
- /* width: 100%;
- margin-top:20rpx; */
- padding: 20rpx;
+
+.xc-val-price .save {
+ border-radius: 10rpx;
+ margin-top: 5rpx;
+ background: #fed2d9;
+ min-width: 230rpx;
+ height: 40rpx;
+ line-height: 40rpx;
+ width: auto;
+ padding-left: 12rpx;
+ padding-right: 12rpx;
+
}
-.xc-frame .list-frame{
- width: 90%;
- height: 100%;
- overflow-y:scroll;
+.xc-unit-price {
+ margin-top: 25rpx;
+ padding-left: -4rpx;
- margin-top:20rpx;
+}
+.xc-explain {
+ color: #292929;
+ width: 542rpx;
+ margin: 10rpx 0 20rpx;
+ width: 100%;
+ font-weight: bold;
}
-.xc-close-frame{
- margin-top:30rpx;
- width:15%;
- display:flex;
+
+.xc-item {
+ width: 16%;
+ font-size: 26rpx;
+ color: #666;
+ margin-right: 5rpx;
}
-.xc-close{
- width:70rpx;
- height:70rpx;
- border-radius:50%;
- border:5rpx solid #a5a5a7;
- text-align:center;
- line-height: 55rpx;
- font-size:80rpx;
- color:#a5a5a7;
- font-family:"微软正黑体";
- margin-top:8rpx;
+.xc-item .yuan {
+ width: 38rpx;
+ height: 38rpx;
+ line-height: 38rpx;
+ border: 1rpx solid #f3f1f2;
+ margin-left: 33rpx;
}
-.xc-money{
- color: #ff0013;
+
+.xc-item .word {
+ width: 104rpx;
+ margin-top: 16rpx;
+ color: #363636;
+ font-weight: 600;
+
}
-.xc-money-frame{
- /* margin-left:35rpx; */
+.xc-item .circle-color {
+ background: #d60024;
+ color: #fff;
+}
+.xc-item .circle-color1 {
+ background: #fefefe;
+ color: #666666;
}
-.xc-coupon-effect{
- width: 99%;
- height: 128rpx;
- border-bottom:3rpx solid #ddd;
+.link {
+ height: 6rpx;
+ width: 180rpx;
+ top: 54rpx;
+ left: 32px;
+}
+.link1 {
+ height: 6rpx;
+ width: 166rpx;
+ top: 54rpx;
+ left: 264rpx;
}
-.xc-goods-coupon{
- width: 80%;
- height:100%;
+.link2 {
+ height: 6rpx;
+ width: 157rpx;
+ top: 54rpx;
+ right: 87rpx;
}
-.xc-title{
- width:50%;
- margin-left:222rpx;
+.link-color-red {
+ background: #d60024;
}
-.xc-coupon-money{
- color: #c91e31;
- font-size: 35rpx;
- margin-top:20rpx;
+.link-color {
+ background: #e5e5e5;
}
-.xc-coupon-time{
- height: 50rpx;
- font-size: 27rpx;
- color: #a4a4a4;
+
+.xc-qt-price {
+ top: -15rpx;
+ left: 25rpx;
+ color: #fff;
}
-.xc-coupon-time .time{
- margin-left: 15rpx;
- font-size: 27rpx;
+
+.xc-qt-price .xc-qtunit-price {
+ margin-left: 6rpx;
+ margin-top: -4rpx;
}
-.xc-coupon-selection{
- width:99%;
- height:100%;
+.xc-nanber {
+ top: -25rpx;
+ left: 289rpx;
}
-.xc-confirm {
- width: 90%;
- height: 75rpx;
- margin:0 auto;
- background:#c41830;
- color:#fff;
- border-radius:10rpx;
- font-size:30rpx;
- margin-top: 50rpx;
-}
-.xc-not-Selection{
- width: 60rpx;
- height: 60rpx;
- background: #eeeeee;
+
+.xc-qtsign {
+ margin-top: 5rpx;
+
}
-/*---------------视频图片---------------*/
-.xc-imageCount {
- width:95rpx;
- height:50rpx;
- background-color: rgba(0, 0, 0, 0.3);
- border-radius:40rpx;
- line-height:50rpx;
- color:#fff;
- text-align:center;
- font-size:26rpx;
- position:absolute;
+.xc-people-img {
+ height: 36rpx;
+ width: 36rpx;
+ background: #fff;
+ border-radius: 7rpx;
- right:23rpx;
- bottom:21rpx;
}
+.xc-people-img .imgs {
+ width: 28rpx;
+ height: 28rpx;
+ margin-top: 4rpx;
-/* 视频图片的边框 */
-.xc-videos-picture{
- width: 100%;
- height: 750rpx;
}
-/* 视频 */
-.xc-videos{
- width: 100%;
- height:544rpx;
+.xc-people-val {
+ height: 32rpx;
+ border-top: 1rpx solid #fff;
+ border-bottom: 1rpx solid #fff;
+ border-right: 1rpx solid #fff;
+ border-radius: 0 7rpx 7rpx 0;
+ line-height: 32rpx;
+ margin-left: -6rpx;
+ padding: 0 12rpx;
}
-/* 点击视频或图片 */
-.xc-video-picture{
- bottom: 20rpx;
- left: 0rpx;
- display: flex;
- align-items: center;
- justify-content:center;
- width: 45%;
- height: 60rpx;
- margin-left: 215rpx;
-
-}
-.xc-video-button:before{
- content: "";
- position: absolute;
- left: 48%;
- top: 40%;
- width: 0;
- height: 0;
- margin-left: -36rpx;
- margin-top: -10rpx;
- border-width:13rpx;
- border-style: dashed;
- border-color: transparent transparent transparent #fff;
- font-size: 0;
- line-height: 0;
- z-index: 2;
- -webkit-backface-visibility: hidden;
-}
-.xc-video-buttons:before{
- content: "";
- position: absolute;
- left: 50%;
- top:41%;
- width: 0;
- height: 0;
- margin-left: -36rpx;
- margin-top: -10rpx;
- border-width:13rpx;
- border-style: dashed;
- border-color: transparent transparent transparent #000;
- font-size: 0;
- line-height: 0;
- z-index: 2;
- -webkit-backface-visibility: hidden;
-}
-
-.xc-video{
- /* width:100rpx; */
- /* height: 50rpx;
- line-height: 50rpx; */
- text-align: center;
- /* margin-left:-30rpx; */
+.word-color {
+ color: #d70024;
+}
+.word-color-lan {
+ color: #0393e1;
+}
+.pt_view .hy-stop {
+ top: -23rpx;
+ right: 56rpx;
}
-/* 图片 */
-.xc-picture{
- color: #000;
- background: #dcdcdc;
- width: 94rpx;
- height: 45rpx;
- font-size: 25rpx;
- border-radius: 25rpx;
- font-family: 'SimHei',Arial;
- text-align: center;
- line-height: 45rpx;
- margin-left:53rpx
+.xc-time-val {
+ width: 36rpx;
+ height: 36rpx;
+ border-radius: 7rpx;
+ line-height: 36rpx;
}
-/* 点击视频 */
-.xc-video-button{
- position: relative;
- color: #000;
- background: #dcdcdc;
- width: 85rpx;
- height: 45rpx;
- line-height: 45rpx;
- font-size: 30rpx;
- border-radius: 25rpx;
- font-family: 'SimHei',Arial;
- padding-left: 11rpx;
+
+.xc-time {
+ margin-right: 10rpx;
+ margin-left: 10rpx;
+ margin-top: -32rpx;
}
+.xc-goods-explain {
+ width: 100%;
+ /* padding-left:30rpx;
+ margin-left:-9rpx;
+ height: 150rpx */
+}
-.xc-sn{
- color: #fff;
- background: #c7161e;
- border-color: transparent transparent transparent #fff;
+.xc-partner-frame {
+ border-bottom: 2rpx solid #eee;
+ width: 100%;
+ padding: 20rpx;
+ /* height:56rpx; */
+ box-sizing: border-box;
}
-/* 图片 */
-.xc-pictures{
- width: 100%;
- height:529rpx;
+.xc-person-number {
+ width: 120rpx;
+ color: #999999;
+ padding-left: 8rpx;
+ text-align: left
}
-/*视频封面的图片 */
-.xc-picturess{
- position: relative;
- width: 100%;
- height:529rpx;
+
+.xc-miaosha-time {
+ right: 17rpx;
+ top: 55rpx;
}
-/* 播放 */
-.xc-play{
- width: 130rpx;
- height: 130rpx;
- position: absolute;
- top:207rpx;
- left:309rpx;
+
+.pd_top1 {
+ padding-top: 10rpx
}
-.xc-video-buttons{
- position: relative;
- color: #000;
- background: #dcdcdc;
- width: 85rpx;
- height: 45rpx;
- line-height: 45rpx;
- font-size: 30rpx;
- border-radius: 25rpx;
- font-family: 'SimHei',Arial;
- padding-left: 11rpx;
+.s_ms_bth {
+ margin-top: 85rpx
}
-.wsize{font-size: 32rpx}
-.five-level-word{font-size: 24rpx;}
+.no_pj_list {
+ text-align: center;
+ width: 100%;
+ color: #999;
+ margin: 30rpx 0;
+ display: inline-block;
+ font-size: 28rpx
+}
+
+/* 门店地址 */
+.xc-address_frame {
+ /* border-top:1rpx solid #eee; */
+ width: 100%;
+ height: auto;
+ padding: 20rpx;
+ box-sizing: border-box;
+}
+.on_height {
+ height: 90rpx;
+}
-/*-- 推荐商品 --*/
-.xc-goods{
- height: auto;
- background: #f2f2f2;
- padding: 0 20rpx;
- margin-top: -25rpx;
- padding-bottom: 20rpx
+.sn_height {
+ /* min-height: 170rpx; height: auto;padding: 10rpx 0; */
}
-.xc-goods-recommend {
- border-radius: 20rpx;
- width:345rpx;
- height: 450rpx;
- margin-top: 25rpx;
- display: inline-block;
+.xc-address_frame .address_frame {
+ width: 100%;
+ /* padding-left: 10rpx;
+margin: auto; */
}
-.xc-goods-recommend.ml{ margin-left: 22rpx}
+.shop_name {}
-.xc-goods-recommend .xc-goods-imgs{
- width: 100%;
- height: 325rpx;
- border-radius:20rpx 20rpx 0 0;
+.stores-img {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 10rpx;
}
-.xc-goods-bottom{
- width: 345rpx;
- height: 134rpx;
- background: #fff;
- border-radius:0 0 20rpx 20rpx;
- bottom:-8rpx;
- left:0rpx;
+.shop_name {
+ margin-right: 10rpx;
}
-.xc-goods-bottom .monry-frame{
- width:283rpx;
-height:52rpx;
-padding-left:24rpx;
+.address {
+ /* width: 100%;
+ margin-top: 5rpx;
+ margin-bottom: 5rpx; */
}
-.xc-good-explain{
- width: 283rpx;
- height:60rpx;
- word-break: normal;
- margin-left:30rpx;
- font-size: 26rpx;
- line-height: 30rpx;
- margin-top: 5rpx;
+
+.distance {
+ padding-left: 20rpx;
+ padding-right: 20rpx;
+ background: #eee;
+ border-radius: 20rpx;
+ /* margin-right: 5rpx; */
+ color: #999;
+ height: 38rpx;
+ line-height: 38rpx;
+
}
-.money-color-val{
- color: #c6172f;
+
+/* 选择门店的弹窗 */
+.mongolia-layer {
+ position: fixed;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 11;
+ background: rgba(0, 0, 0, 0.4);
+ width: 100%;
+ height: 91.9%;
+
}
-.rmb-symbol{
- line-height:81rpx;
- height:53rpx;
- font-size: 28rpx;
+
+.popup-frame {
+ position: fixed;
+ z-index: 20;
+ background: white;
+ width: 100%;
+ border-radius: 20rpx 20rpx 0 0;
+ height: auto;
+ bottom: 0;
}
-.xc-original-price{
- color: #c0c0c0;
+
+.popup-top {
+ border-bottom: 1rpx solid #eee;
+ height: 155rpx;
+ width: 95%;
+ margin: auto;
+ line-height: 155rpx;
+
}
-/* 文字中间加线条 */
-.word-lines{
- text-decoration:line-through;
- line-height:90rpx;
- margin-left:10rpx;
- font-size: 20rpx;
-}
-
- .xc-linellae-frame{
- width: 100%;
- height: 70rpx;
- background: #f2f2f2;
-}
-.xc-linellae-frame .xc-linellae{
- width: 386rpx;
- height: 1rpx;
- border-bottom: 1rpx solid #ebedf0;
-}
-.xc-recommend-frame{
-background:#f2f2f2;
-width:97rpx;
-height:100%;
-padding-left: 10rpx;
-}
-.xc-recommend-frame .xc-recommend{
- width: 35rpx;
- height: 27rpx;
-}
-.xc-recommend-frame .xc-recommend-word{
- width:58rpx;
-font-size:24rpx;
-color: #a9a9a9;
-margin-left: 5rpx;
-margin-bottom: 5rpx;
-margin-top: 1rpx;
-
-}
-.xc-price-frame{
- color: #ec0022;
- align-items: baseline;
-/* height:44rpx; */
+
+.bg_rights {
+ border-top: 2rpx solid;
+ border-right: 2rpx solid;
+ transform: rotate(45deg);
+ display: inline-block;
+ width: 15rpx;
+ height: 15rpx;
+ border-color: #da0b31;
}
-.xc-price-frame .sign{
-margin-top:19rpx;
-margin-left:-4px;
+
+.modal-closes {
+ position: absolute;
+ right: 30rpx;
+ top: -15rpx;
+ height: 25rpx;
+
}
-.xc-val-price{
-margin-left:24rpx;
-color: #ec0022;
-padding-top:13rpx;
+
+.choose_more {
+ margin-top: 40rpx;
+ margin-right: 20rpx;
+
}
-.xc-val-price .save{
- border-radius:10rpx;
- margin-top:5rpx;
- background:#fed2d9;
- min-width:230rpx;
- height:40rpx;
- line-height:40rpx;
- width: auto;
- padding-left:12rpx;
- padding-right:12rpx;
+
+.choose_mores {
+ margin-top: 30rpx;
+ margin-right: 15rpx;
}
-.xc-unit-price{
- margin-top:25rpx;
-padding-left:-4rpx;
+.store-list {
+ width: 95%;
+ min-height: 300rpx;
+ overflow-y: scroll;
+ margin: auto;
+ max-height: 610rpx;
}
-.xc-explain{
- color:#292929;
- width:542rpx;
- margin: 10rpx 0 20rpx;
+
+.store-list .store_choose {
width: 100%;
- font-weight: bold;
-}
-.xc-item{width: 16%; font-size: 26rpx; color: #666;margin-right:5rpx;}
-.xc-item .yuan{
- width: 38rpx;
- height: 38rpx;
- line-height: 38rpx;
- border:1rpx solid #f3f1f2;
-margin-left:33rpx;
-
-}
-.xc-item .word{
- width:104rpx;
- margin-top:16rpx;
- color:#363636;
- font-weight:600;
-
-}
-.xc-item .circle-color{
- background: #d60024;
- color: #fff;
-}
-.xc-item .circle-color1{
- background: #fefefe;
- color: #666666;
-}
-.link{
-height:6rpx;
-width:180rpx;
-top:54rpx;
-left:32px;
-}
-.link1{
-height:6rpx;
-width:166rpx;
-top:54rpx;
-left:264rpx;
-}
-.link2{
- height:6rpx;
-width:157rpx;
-top:54rpx;
-right:87rpx;
-}
-.link-color-red{
- background: #d60024;}
-.link-color{
- background: #e5e5e5;
-}
-.xc-qt-price{
- top:-15rpx;
-left:25rpx;
- color: #fff;
-}
-.xc-qt-price .xc-qtunit-price{
- margin-left:6rpx;
-margin-top:-4rpx;
-}
-.xc-nanber{
- top:-25rpx;
-left:289rpx;
-
-}
-.xc-qtsign{
-margin-top:5rpx;
-
-}
-.xc-people-img{
- height: 36rpx;
- width: 36rpx;
- background: #fff;
- border-radius: 7rpx;
-
-}
-.xc-people-img .imgs{
- width: 28rpx;
- height: 28rpx;
- margin-top:4rpx;
-
-}
-.xc-people-val{
-
- height: 32rpx;
- border-top: 1rpx solid #fff;
- border-bottom: 1rpx solid #fff;
- border-right: 1rpx solid #fff;
- border-radius:0 7rpx 7rpx 0;
- line-height:32rpx;
- margin-left:-6rpx;
- padding: 0 12rpx;
-}
-.word-color{
- color:#d70024;
-}
-.word-color-lan{
- color:#0393e1;
-}
-.pt_view .hy-stop{
- top: -23rpx;
- right: 56rpx;
-}
-.xc-time-val{width:36rpx;height:36rpx;border-radius:7rpx; line-height: 36rpx;}
-.xc-time{margin-right:10rpx; margin-left:10rpx; margin-top:-32rpx;
-}
-.xc-goods-explain{
- width:100%;
- /* padding-left:30rpx;
- margin-left:-9rpx;
- height: 150rpx */
+ height: 120rpx;
+ line-height: 125rpx;
+ border-bottom: 1rpx solid #eee;
+
}
-.xc-partner-frame{
-border-bottom:2rpx solid #eee;
-width:100%;
-padding:20rpx;
-/* height:56rpx; */
-box-sizing: border-box;
+
+.store-list .store_choose .store {
+ width: 100%;
+ margin: auto;
+ line-height: 37rpx;
+ padding-left: 20rpx;
+
}
-.xc-person-number{
- width:120rpx;
- color: #999999;
- padding-left:8rpx;
- text-align: left
+
+.xc-hook {
+ width: 35rpx;
+ height: 35rpx;
+ transform: rotate(-145deg);
+ line-height: 37rpx;
+ text-align: center;
}
-.xc-miaosha-time{
-right:17rpx; top:55rpx;
+.xc-hooks {
+ width: 30rpx;
+ height: 30rpx;
+ border: 1rpx solid #999;
}
-.pd_top1{padding-top: 10rpx}
-.s_ms_bth{margin-top: 85rpx}
+.address-frame {
+ width: 93%;
+ margin-left: 7rpx;
-.no_pj_list{text-align: center; width: 100%; color: #999; margin: 30rpx 0; display: inline-block; font-size: 28rpx}
-/* 门店地址 */
-.xc-address_frame{
- /* border-top:1rpx solid #eee; */
- width: 100%;
- height: auto;
- padding: 20rpx;
- box-sizing: border-box;
-}
-.on_height{
-height: 90rpx;
}
-.sn_height{
- /* min-height: 170rpx; height: auto;padding: 10rpx 0; */
-}
-.xc-address_frame .address_frame{
- width: 100%;
-/* padding-left: 10rpx;
-margin: auto; */
+.nearby_store {
+ margin-left: 17rpx;
}
-.shop_name{
+
+.address_name {
+ margin-right: 10rpx;
}
-.stores-img{
- width: 28rpx;
- height: 28rpx;
- margin-right: 10rpx;
+
+.address-val {
+ height: 38rpx;
+ line-height: 38rpx;
+
}
-.shop_name{
- margin-right: 10rpx;
+
+.store-bottom {
+ width: 85%;
+ margin: auto;
+ height: 90rpx;
}
-.address{
- /* width: 100%;
- margin-top: 5rpx;
- margin-bottom: 5rpx; */
+
+.determine {
+ width: 260rpx;
+ height: 55rpx;
+ border-radius: 50rpx;
+ line-height: 55rpx;
}
-.distance{
- padding-left: 20rpx;
- padding-right: 20rpx;
- background: #eee;
- border-radius: 20rpx;
- /* margin-right: 5rpx; */
- color: #999;
- height: 38rpx;
-line-height: 38rpx;
+.default {
+ width: 260rpx;
+ height: 55rpx;
+ border: 3rpx solid #c8c8c8;
+ border-radius: 50rpx;
+ line-height: 55rpx;
}
-/* 选择门店的弹窗 */
-.mongolia-layer{
- position: fixed;
-left: 0;
-top: 0;
-right: 0;
-bottom: 0;
-z-index: 11;
-background: rgba(0,0,0,0.4);
-width: 100%;
-height: 91.9%;
-
-}
-
-.popup-frame{
-position: fixed;
-z-index: 20;
-background: white;
-width: 100%;
-border-radius: 20rpx 20rpx 0 0;
-height: auto;
-bottom: 0;
-}
-.popup-top{
- border-bottom: 1rpx solid #eee;
- height: 155rpx;
- width: 95%;
- margin: auto;
- line-height: 155rpx;
-
-}
-.bg_rights{
- border-top: 2rpx solid ;
- border-right: 2rpx solid ;
- transform: rotate(45deg);
- display:inline-block;
- width:15rpx;height:15rpx;
- border-color:#da0b31;
+
+.store-bottom-frame {
+ width: 95%;
+ margin: auto;
+
}
-.modal-closes {
- position: absolute;
- right: 30rpx;
- top: -15rpx;
- height: 25rpx;
-
-}
-.choose_more{
- margin-top: 40rpx;
- margin-right: 20rpx;
-
-}
-.choose_mores{
- margin-top: 30rpx;
- margin-right: 15rpx;
-
-}
-.store-list{
- width: 95%;
- min-height: 300rpx;
- overflow-y: scroll;
- margin: auto;
- max-height: 610rpx;
-}
-.store-list .store_choose{
- width: 100%;
- height: 120rpx;
- line-height: 125rpx;
- border-bottom: 1rpx solid #eee;
-
-}
-.store-list .store_choose .store{
-width: 100%;
-margin: auto;
-line-height: 37rpx;
-padding-left: 20rpx;
-
-}
-.xc-hook{
- width: 35rpx;
- height: 35rpx;
- transform: rotate(-145deg);
-line-height: 37rpx;
-text-align: center;
-}
- .xc-hooks{
- width: 30rpx;
- height: 30rpx;
- border: 1rpx solid #999;
- }
- .address-frame{
- width: 93%;
-margin-left: 7rpx;
-
- }
- .nearby_store{
-margin-left: 17rpx;
- }
- .address_name{
- margin-right: 10rpx;
-
- }
- .address-val{
- height: 38rpx;
-line-height: 38rpx;
-
- }
- .store-bottom{
- width: 85%;
- margin: auto;
- height: 90rpx;
- }
- .determine{
- width: 260rpx;
- height: 55rpx;
- border-radius: 50rpx;
- line-height: 55rpx;
- }
- .default{
- width: 260rpx;
- height: 55rpx;
- border:3rpx solid #c8c8c8;
- border-radius: 50rpx;
- line-height: 55rpx;
- }
- .store-bottom-frame{
- width: 95%;
- margin: auto;
-
- }
- /* 门店分类列表 */
-.sort_store_list{
- height: 82%;
- overflow: hidden;
- overflow-y: scroll;
- width: 95%;
- margin: auto;
+
+/* 门店分类列表 */
+.sort_store_list {
+ height: 82%;
+ overflow: hidden;
+ overflow-y: scroll;
+ width: 95%;
+ margin: auto;
}
-.sort_store_list .sort-store-frame{
- width: 100%;
-height: 100rpx;
-line-height:100rpx;
-border-bottom: 1rpx solid #eee;
+
+.sort_store_list .sort-store-frame {
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
+ border-bottom: 1rpx solid #eee;
}
-.sort_store_list .sort-store-frame .sort-store{
- width: 94.5%;
- margin: auto;
+
+.sort_store_list .sort-store-frame .sort-store {
+ width: 94.5%;
+ margin: auto;
}
-.black_rights-frame{
-width: 50%;
+
+.black_rights-frame {
+ width: 50%;
}
-.black_rights-frame .black_rights{
- border-top: 3rpx solid;
-border-right: 3rpx solid;
-transform: rotate(45deg);
-display: inline-block;
-width: 20rpx;
-height: 20rpx;
+
+.black_rights-frame .black_rights {
+ border-top: 3rpx solid;
+ border-right: 3rpx solid;
+ transform: rotate(45deg);
+ display: inline-block;
+ width: 20rpx;
+ height: 20rpx;
}
-.xc-val-money{
- height:55rpx;
+
+.xc-val-money {
+ height: 55rpx;
}
-.xc-distance-bottom{
- margin-bottom: 40rpx;
+.xc-distance-bottom {
+ margin-bottom: 40rpx;
}
-.xc-distance-top{
-margin-top: 10rpx;
+
+.xc-distance-top {
+ margin-top: 10rpx;
}
-.xc-width{
- width: 100%;
+
+.xc-width {
+ width: 100%;
}
-.right-arrow{ width: 15rpx; height:15rpx;
- border-top: 2rpx solid #d70026;
- border-right: 2rpx solid #d70026;
- transform: rotate(45deg);display:inline-block;
- margin-bottom:3rpx;
+
+.right-arrow {
+ width: 15rpx;
+ height: 15rpx;
+ border-top: 2rpx solid #d70026;
+ border-right: 2rpx solid #d70026;
+ transform: rotate(45deg);
+ display: inline-block;
+ margin-bottom: 3rpx;
}
-.xc-goods-attribute{
- border-bottom: 1px solid #eee;
-padding-bottom: 20rpx;
-/* margin-bottom:40rpx; */
+
+.xc-goods-attribute {
+ border-bottom: 1px solid #eee;
+ padding-bottom: 20rpx;
+ /* margin-bottom:40rpx; */
}
-.xc-val-fream{
- width: 105rpx;
+
+.xc-val-fream {
+ width: 105rpx;
}
-.is_stock{
-width: 58%;
-height: 70rpx;
-border-radius: 55rpx;
+
+.is_stock {
+ width: 58%;
+ height: 70rpx;
+ border-radius: 55rpx;
}
-.select_store_height{
- height: 50rpx;
+
+.select_store_height {
+ height: 50rpx;
}
-.butttem5{
- margin-bottom: 5rpx;
+
+.butttem5 {
+ margin-bottom: 5rpx;
}
-.no_pj_list{text-align: center; width: 100%; color: #999; margin-top: 30rpx; display: inline-block; font-size: 28rpx}
+.no_pj_list {
+ text-align: center;
+ width: 100%;
+ color: #999;
+ margin-top: 30rpx;
+ display: inline-block;
+ font-size: 28rpx
+}
.join-cart>view.no_store {
- width: 58%; background-color: #adadad;
+ width: 58%;
+ background-color: #adadad;
+}
+
+.s_btn {
+ margin-top: 25rpx;
}
-.s_btn{ margin-top: 25rpx; }
/* 美妆价的样式 */
-.beauty-makeup-frame{
- /* width: 101.5%;
+.beauty-makeup-frame {
+ /* width: 101.5%;
margin: auto; */
- height: 120rpx;
- border-radius: 15rpx;
- margin-top: 10px;
+ height: 120rpx;
+ border-radius: 15rpx;
+ margin-top: 10px;
}
-.beauty-makeup-frame .left{
+
+.beauty-makeup-frame .left {
width: 80%;
height: 100%;
- background:#f7f7f7;
+ background: #f7f7f7;
border-radius: 20rpx 0rpx 0rpx 20rpx;
/* padding: 0 10rpx; */
}
- .card-frame{
- margin-top: 0rpx;
+
+.card-frame {
+ margin-top: 0rpx;
/* padding-right: 23rpx;
margin-right: 15rpx; */
}
-.advert-card{
- margin-top: 0rpx!important;
+
+.advert-card {
+ margin-top: 0rpx !important;
}
-.beauty-makeup-frame .right{
+
+.beauty-makeup-frame .right {
width: 20%;
height: 100%;
- background:#f3efe3;
+ background: #f3efe3;
border-radius: 0rpx 20rpx 20rpx 0rpx;
- }
-.grade-card-frame{
+}
+
+.grade-card-frame {
/* height:45rpx ; */
background: #3c300a;
border-radius: 20rpx;
- /* margin-top: 10px;
+ /* margin-top: 10px;
margin-left: 7rpx; */
- justify-content: center;
- padding: 4rpx 12rpx;
+ justify-content: center;
+ padding: 4rpx 12rpx;
}
-.grade-card-frame .img{
+
+.grade-card-frame .img {
width: 24rpx;
- height: 24rpx;
- margin-top: 2px;
+ height: 24rpx;
+ margin-top: 2px;
}
-.grade-card-frame .card-name{
+
+.grade-card-frame .card-name {
margin-left: 8rpx;
- /* max-width: 120rpx; */
+ /* max-width: 120rpx; */
max-width: 165rpx;
}
-.card-effect{
- /* margin-left: 15rpx; */
+
+.card-effect {
+ /* margin-left: 15rpx; */
+}
+
+.at_once_carde {
+ width: 65rpx;
+ height: 75rpx;
+ line-height: 38rpx;
}
-.at_once_carde{
- width:65rpx;
- height: 75rpx;
- line-height:38rpx;
+
+.bg_right {
+ width: 18rpx;
+ height: 18rpx;
+ border-top: 2rpx solid #333;
+ border-right: 2rpx solid #333;
+ transform: rotate(45deg);
+ display: inline-block;
+ margin-bottom: 3rpx;
+
}
-.bg_right{ width: 18rpx; height:18rpx;
- border-top: 2rpx solid #333;
- border-right: 2rpx solid #333;
- transform: rotate(45deg);display:inline-block;
- margin-bottom:3rpx;
+.carde_frame {
+ height: 50rpx;
+ /* line-height: 18rpx */
}
-.carde_frame{
- height: 50rpx;
- /* line-height: 18rpx */
+
+button.custom-service {
+ line-height: normal;
+ border: 0;
}
-button.custom-service { line-height: normal; border: 0;}
-button.custom-service::after{
+button.custom-service::after {
border: 0;
}
-.no_store{color:#d60021; font-size: 26rpx;}
-.cx_show_view{ width: 580rpx; /* line-height: 30rpx; margin-bottom: 6rpx; */ }
-.cx_show_view .word{ width: 400rpx}
+
+.no_store {
+ color: #d60021;
+ font-size: 26rpx;
+}
+
+.cx_show_view {
+ width: 580rpx;
+ /* line-height: 30rpx; margin-bottom: 6rpx; */
+}
+
+.cx_show_view .word {
+ width: 400rpx
+}
+
.prom_condition {
- color: #d60021;
- /* width: 180rpx; */
- /* height: 30rpx; */
- font-size: 20rpx;
- /* padding-top: 0.01rpx; */
- /* display: flex;
+ color: #f23030;
+ /* width: 180rpx; */
+ /* height: 30rpx; */
+ /* font-size: 20rpx; */
+ /* padding-top: 0.01rpx; */
+ /* display: flex;
justify-content: center;
align-items: center; */
- border: 2rpx solid #d60021;
- border-radius: 10rpx;
- margin-right:10rpx ;
- /* margin-left: 10rpx; */
- font-size: 24rpx;
- padding: 0 10rpx;
-}
-.hui_img{ width: 44rpx; height: 44rpx; margin-right: 8rpx}
-.order_hui{color: #444; width: 420rpx}
-.order_hui view{ height: 34rpx; line-height: 34rpx;}
-.dp_img{width: 240rpx; height: 240rpx; margin: 0 40rpx}
-.dp_cx_view{border-bottom: 0.02rpx solid #eee; padding-bottom: 40rpx}
-.act_content{ margin-top: 40rpx}
-.act_content view{ margin-bottom: 12rpx}
-.color_b{color: #ff9c00}
+ border: 2rpx solid #f23030;
+ border-radius: 6rpx;
+ /* margin-right: 10rpx; */
+ /* margin-left: 10rpx; */
+ font-size: 24rpx;
+ padding-right: 6rpx;
+ /* padding: 0 10rpx; */
+}
+
+.hui_img {
+ width: 44rpx;
+ height: 44rpx;
+ margin-right: 8rpx
+}
+
+.order_hui {
+ color: #444;
+ width: 420rpx
+}
+
+.order_hui view {
+ height: 34rpx;
+ line-height: 34rpx;
+}
+
+.dp_img {
+ width: 240rpx;
+ height: 240rpx;
+ margin: 0 40rpx
+}
+
+.dp_cx_view {
+ border-bottom: 0.02rpx solid #eee;
+ padding-bottom: 40rpx
+}
+
+.act_content {
+ margin-top: 40rpx
+}
+
+.act_content view {
+ margin-bottom: 12rpx
+}
+
+.color_b {
+ color: #ff9c00
+}
.poster-container {
- box-sizing: border-box;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: calc(100% - 210rpx);
- z-index: 1000;
+ box-sizing: border-box;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: calc(100% - 210rpx);
+ z-index: 1000;
}
+
.mask {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 999;
- background-color: rgba(0,0,0,.6);
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 999;
+ background-color: rgba(0, 0, 0, .6);
}
+
.poster-wrapper {
width: 100%;
}
@@ -2757,15 +3686,18 @@ button.custom-service::after{
z-index: 999;
overflow: hidden;
}
+
.poster-img {
display: block;
width: 100%;
height: 100%;
}
+
.btn-container {
display: flex;
justify-content: space-around;
}
+
.btn-share {
display: block;
background-color: #FE6867;
@@ -2775,6 +3707,7 @@ button.custom-service::after{
margin-top: 28rpx;
padding: 0 60rpx;
}
+
/* .btn-close {
background-color: rgba(0,0,0,.5);
color: white;
@@ -2788,39 +3721,50 @@ button.custom-service::after{
top: 10rpx;
} */
-.goods-price .rel_txt{
- /* position: relative; top: 32rpx; */
- font-size: 30rpx;
+.goods-price .rel_txt {
+ /* position: relative; top: 32rpx; */
+ font-size: 30rpx;
+}
+
+.goods-price .rel_img {
+ width: 62rpx;
+ height: 62rpx;
+ position: relative;
+ top: 8rpx;
}
-.goods-price .rel_img{width: 62rpx; height: 62rpx;position: relative; top: 8rpx;}
.btn-close {
- /* background-color: rgba(0,0,0,.5); */
- color: #ccc;
- width: 50rpx;
- height: 50rpx;
- line-height: 50rpx;
- text-align: center;
- border-radius: 50%;
- position: absolute;
- right: 20rpx;
- top: 20rpx;
+ /* background-color: rgba(0,0,0,.5); */
+ color: #ccc;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+ border-radius: 50%;
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
}
.icon-close {
- font-size: 48rpx;
-}
-.quan_price{
- background-color: #ff4700; color: #fff; padding: 10rpx 25rpx; margin-left: 10rpx; border-radius: 30rpx;
+ font-size: 48rpx;
+}
+
+.quan_price {
+ background-color: #ff4700;
+ color: #fff;
+ padding: 10rpx 25rpx;
+ margin-left: 10rpx;
+ border-radius: 30rpx;
}
/*--闪白屏--*/
-.g_img_box{
- background-position: center center;
+.g_img_box {
+ background-position: center center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
- background-size: cover;
+ background-size: cover;
}
@@ -2844,28 +3788,45 @@ button.custom-service::after{
margin-right: 10rpx;
}
-.miao_lab{ width: 36rpx; height: 36rpx; border: 4rpx solid #e71f19; color:#e71f19; text-align: center;margin-right: 10rpx;
- line-height: 36rpx;font-size: 22rpx; font-weight: bolder; border-radius: 50%; }
+.miao_lab {
+ width: 36rpx;
+ height: 36rpx;
+ border: 4rpx solid #e71f19;
+ color: #e71f19;
+ text-align: center;
+ margin-right: 10rpx;
+ line-height: 36rpx;
+ font-size: 22rpx;
+ font-weight: bolder;
+ border-radius: 50%;
+}
-.pop_more_act .content{
- position:fixed;background: #fff; width: 100%;
- left: 0;bottom: 0;z-index: 1000;
+.pop_more_act .content {
+ position: fixed;
+ background: #fff;
+ width: 100%;
+ left: 0;
+ bottom: 0;
+ z-index: 1000;
}
-.p_btn{
- background-color: #f23030;
- height: 70rpx;line-height: 70rpx;
- color: #fff;
+.p_btn {
+ background-color: #f23030;
+ height: 70rpx;
+ line-height: 70rpx;
+ color: #fff;
}
-.mt20{ margin-top: 20rpx}
+.mt20 {
+ margin-top: 20rpx
+}
.group .group-list.luck {
padding: 0 20rpx;
justify-content: flex-start;
}
-.group-list.luck .gtou ~ .gtou {
+.group-list.luck .gtou~.gtou {
margin-left: -16rpx;
}
@@ -2877,4 +3838,95 @@ button.custom-service::after{
color: #aaa;
}
-.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
\ No newline at end of file
+
+.tick {
+ position: relative;
+}
+
+.tick:before {
+ content: '';
+ display: inline-block;
+ vertical-align: middle;
+ margin-top: -4rpx;
+ margin-right: 12rpx;
+ width: 22rpx;
+ height: 22rpx;
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTPInDPInDPgoDfMnDPYqEvInDPInDPInDP87NPUoDv8vEvMoDPInDPIoDPMnDvInDPInDPInDPIoDPQoDfInDEON4KMAAAAVdFJOUwD45yawG4zz3gQ0DmLOfECQZpPlS54kMQ4AAAC0SURBVBjTbZFREoMgDERDS0xQQNHu/a/alEGtaIYfHrBhs0S1pujVifo40VkhC+BUHSDzQTlBhjHY8bjogXmDZ+orJKwXwMUeUoa/0PeGbH8Q4Y5CJopYOjosiOQxdpRGk1UXOkrBKdkimtN8UrKrJBVXdzsllSYSjR/0J9JaGn81WluWtonYKQ0op51P3M2L2bmZN9n8MKoVqTph/RsseyjfYxAkfgot/82CpuJVLOLSIv4Cd5AJ37BgpFwAAAAASUVORK5CYII=) no-repeat;
+ background-size: 22rpx auto;
+}
+
+.details::after {
+ content: '';
+ position: absolute;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ display: inline-block;
+ width: 40rpx;
+ height: 40rpx;
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURUdwTIyMjCYmJiYmJi0tLY+PjyYmJidnOsIAAAAGdFJOUwDt6aYcSSEXj/YAAAA8SURBVCjPY2AYBTQBLEbKDhiCTmlpKggeq2AAiDJLS0tGcBkFBUActbS0JAY4F6sgVu1YLcLnpFFAFQAATwgLKVhjC9UAAAAASUVORK5CYII=);
+ background-repeat: no-repeat;
+ background-size: 40rpx auto;
+}
+
+.lh2 {
+ line-height: 2;
+}
+
+.fill-box {
+ background-color: #f23030;
+ color: white;
+ padding: 0 6rpx;
+ border-radius: 0 0 10rpx 0;
+ margin-right: 4rpx;
+}
+
+.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
+
+.jie_show{ display: inline-block; width: 40rpx; height: 40rpx; background-color:#ff0505;border-radius:50%;color: #fff;text-align: center; margin: 0 20rpx }
+/* 历史购买 */
+.swiper-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 20rpx 10rpx;
+ width: 100%;
+ box-sizing: border-box;
+ z-index: 98;
+}
+
+.swiper {
+ height: 60rpx;
+ color: white;
+ font-size: 26rpx;
+}
+
+.swiper-item {
+ /* width: auto !important;
+ background-color: rgba(0,0,0,.4);
+ border-radius: 60rpx; */
+ position: relative;
+}
+
+.swiper-item .item {
+ position: absolute;
+}
+
+.item {
+ /* position: absolute; */
+ display: flex;
+ align-items: center;
+ /* justify-content: center; */
+ border-radius: 60rpx;
+ background-color: rgba(0,0,0,.4);
+ /* position: absolute; */
+}
+
+.avatar-container {
+ width: 60rpx;
+ height: 60rpx;
+ border-radius: 50%;
+ overflow: hidden;
+ flex-shrink: 0;
+}
diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js
index 66f2cc5..287403a 100644
--- a/pages/goods/goodsList/goodsList.js
+++ b/pages/goods/goodsList/goodsList.js
@@ -238,6 +238,9 @@ Page({
var e = this,th=e;
this.data.requestUrl = t;
+
+ var user_id=getApp().globalData.user_id;
+ if(!user_id) user_id=0;
//不是商品分组的,不是默认排序的
if(t.indexOf("group_id")==-1 || e.data.tabname!="sort" ){
t += "&orderField=" + e.data.tabname;
@@ -254,10 +257,10 @@ Page({
for(let i in res.data.data.pageData){
let item=res.data.data.pageData[i];
item.original_img = th.data.url + item.original_img;
-
+ /*--
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1
+ store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1,user_id:user_id
};
//获取商品的实际活动
await getApp().request.promiseGet(url, {data:req_data}).then(res=>{
@@ -265,7 +268,7 @@ Page({
item.prom_type=res.data.data[0].prom_type;
item.prom_id=res.data.data[0].act_id;
}
- })
+ })--*/
var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购
var prom_id=item.prom_id;
diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js
index 951734c..fa3aab4 100644
--- a/pages/goods/search/search.js
+++ b/pages/goods/search/search.js
@@ -145,6 +145,10 @@ Page({
t += "&user_id=" + getApp().globalData.userInfo.user_id;
}
this.data.requestUrl = t;
+
+ var user_id=getApp().globalData.user_id;
+ if(!user_id) user_id=0;
+
getApp().request.promiseGet(t, {data:{is_mainshow: 1, isonsale: 1, store_id: oo.stoid,orderField: e.data.tabname, orderType: e.data.adname, page: e.data.currentPage}}).then(async res=>{
th.data.loading=0;
if(ut.ajax_ok(res)){
@@ -152,9 +156,11 @@ Page({
for(let i in res.data.data.pageData){
let item=res.data.data.pageData[i];
item.original_img = th.data.url + item.original_img;
+
+ /*--
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1
+ store_id:oo.stoid,goodsidlist:item.goods_id,is_detail:1,user_id:user_id
};
//获取商品的实际活动
await getApp().request.promiseGet(url, {data:req_data}).then(res=>{
@@ -162,7 +168,7 @@ Page({
item.prom_type=res.data.data[0].prom_type;
item.prom_id=res.data.data[0].act_id;
}
- })
+ })--*/
var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购
var prom_id=item.prom_id;
@@ -170,8 +176,6 @@ Page({
var url = "";
switch (prom_type){
case 1:
- var user_id=getApp().globalData.user_id;
- if(!user_id) user_id=0;
url = "/api/ms/flash_sale/getNew/" +oo.stoid + "/" +user_id+"/"+ prom_id;
break;
case 2:
@@ -182,6 +186,28 @@ Page({
break;
case 6:
url = "/api/weshop/teamlist/get/" + oo.stoid + "/" + prom_id;
+ await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{
+ data:{
+ store_id: oo.stoid,
+ is_end: 0,
+ is_show: 1,
+ user_id: getApp().globalData.user_id,
+ pageSize:1000,
+ }
+ }).then(pd=>{
+ let pd_list=pd.data.data.pageData;
+ if(res.data.code==0 && pd_list.length>0){
+ var flag = pd_list.some(pd=>{
+ return pd.goods_id==item.goods_id
+ })
+
+ if(!flag){
+ item.prom_type=0;
+ item.prom_id=0;
+ item.prom_price=null;
+ }
+ }
+ })
break;
case 8:
var presell_id = prom_id;
@@ -208,37 +234,23 @@ Page({
if(url!=null && url!=''){
await getApp().request.promiseGet(url, {}).then(async res => {
var prom =null;
- var flag=null;
if(res.data.code==0 && res.data.data){
prom=res.data.data;
- await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{
- data:{
- store_id: oo.stoid,
- is_end: 0,
- is_show: 1,
- user_id: getApp().globalData.user_id,
- pageSize:1000
- }
- }).then(pd=>{
- let pd_list=pd.data.data.pageData;
- if(res.data.code==0 && pd_list.length>0){
- flag =pd_list.some(pd=>{
- return pd.goods_id==item.goods_id
- })
- }
- if (prom != null && prom.is_end==0 && prom.end_time>now && flag && (prom.start_timenow && (prom.start_time {
var e = res;
@@ -747,7 +749,7 @@ Page({
}
console.log("---首页---分享--");
var title = "商城首页"
- //分享
+ //分享
if (getApp().globalData.config && getApp().globalData.config.store_name) {
title = getApp().globalData.config.store_name;
} else if (getApp().globalData.setting.appName) {
@@ -1182,7 +1184,7 @@ Page({
var url=e.currentTarget.dataset.url;
getApp().goto(url);
},
-
-});
\ No newline at end of file
+
+});
diff --git a/pages/team/team_ping/team_ping.js b/pages/team/team_ping/team_ping.js
index 0ccecc4..590cf9c 100644
--- a/pages/team/team_ping/team_ping.js
+++ b/pages/team/team_ping/team_ping.js
@@ -114,7 +114,7 @@ Page({
}).then(res => {
order_goods = res.data.data.pageData;
order[i].order_goods = order_goods;
- order[i].gimage = ee.data.imageurl + order_goods[0].original_img;
+ order[i].gimage = ee.data.imageurl + order_goods[0]?.original_img;
})
diff --git a/pages/team/team_ping/team_ping.wxml b/pages/team/team_ping/team_ping.wxml
index dbb2400..cdcc57d 100644
--- a/pages/team/team_ping/team_ping.wxml
+++ b/pages/team/team_ping/team_ping.wxml
@@ -1,5 +1,5 @@
-
+
全部
@@ -10,113 +10,114 @@
-
-
-
-
-
- 订单编号:{{item.order_sn}}
-
-
-
-
-
-
-
-
-
- {{item.order_goods[0].goods_name}}
+
+
+
+
+
+ 订单编号:{{item.order_sn}}
+
-
-
-
-
- ¥
- {{item.order_goods[0].goods_price}}
- 零售价:¥{{item.order_goods[0].market_price}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{item.order_goods[0].goods_name}}
+
-
-
- 还差{{item.ct_num-item.tx.length}}人成团
-
-
- 还差{{item.max_ct_num-item.tx.length}}人享受最价
- 您已经可以享受最低价
-
+
+
+ ¥
+ {{item.order_goods[0].goods_price}}
+ 零售价:¥{{item.order_goods[0].market_price}}
+
+
+
+
+
+
+
+
+
+
+
+ 还差{{item.ct_num-item.tx.length}}人成团
+
+
+ 还差{{item.max_ct_num-item.tx.length}}人享受最价
+ 您已经可以享受最低价
+
+
-
-
-
-
-
-
-
-
-
-
- 金额:¥
-
-
-
-
+
+
-
+
+ 金额:¥
+
+
+
+
+ 退款时间:{{filters.format_time(item.is_back_time,1)}}
-
- 邀请好友
- 查看详情
- 支付尾款失败
+
-
+
+
+
+
+ 剩余:
+ {{item.djs.day}}天
+ {{item.djs.hou}}时
+ {{item.djs.min}}分
+ {{item.djs.sec}}秒
-
-
-
-
- 剩余:
- {{item.djs.day}}天
- {{item.djs.hou}}时
- {{item.djs.min}}分
- {{item.djs.sec}}秒
-
-
-
diff --git a/pages/team/team_ping/team_ping.wxss b/pages/team/team_ping/team_ping.wxss
index be11cc6..34db240 100644
--- a/pages/team/team_ping/team_ping.wxss
+++ b/pages/team/team_ping/team_ping.wxss
@@ -191,11 +191,15 @@ height:222rpx;
}
.foot-left{
-
- margin-left:19rpx;
- min-width: 360rpx;
- line-height: 100rpx;
- font-size:26rpx;
+ margin-left:19rpx;
+ min-width: 360rpx;
+ height: 100rpx;
+ line-height: 100rpx;
+ font-size:26rpx;
+}
+.foot-left .jietitun {
+ height: 50rpx;
+ line-height: 50rpx;
}
.foot-right{
@@ -211,6 +215,7 @@ height:222rpx;
}
+
.foot-right-wz{
padding: 6rpx 20rpx;
diff --git a/pages/togoin/togoin.js b/pages/togoin/togoin.js
index 77c8f4c..ccc0545 100644
--- a/pages/togoin/togoin.js
+++ b/pages/togoin/togoin.js
@@ -1,4 +1,4 @@
-var t = require("../../utils/common.js");
+var t = require("../../utils/common.js");
const app=getApp();
var os = app.globalData.setting;
var regeneratorRuntime = require('../../utils/runtime.js');
@@ -18,53 +18,86 @@ Page({
canIUseGetUserProfile: true
})
}
-
- getApp().globalData.isLoad_ad=1;
+
+ getApp().globalData.isLoad_ad=1;
//--判断是否有接受到邀请人的ID--
if(options.first_leader){
this.setData({first_leader:options.first_leader});
}else if(getApp().globalData.first_leader){
- this.setData({first_leader:getApp().globalData.first_leader});
- }
+ this.setData({first_leader:getApp().globalData.first_leader});
+ }
var th=this;
app.getConfig(function (e) {
- var logo=th.data.imghots+e.store_logo;
+ var logo=th.data.imghots+e.store_logo;
th.setData({ store: e,store_logo:logo});
- })
-
- //判断注册的条件
+ })
+
+ //判断注册的条件
app.getConfig2(function (e) {
- if(e.reg_type==1){
- var arr=JSON.parse(e.reg_info);
+ if(e.reg_type==1){
+ var arr=JSON.parse(e.reg_info);
if(arr['name_state']==1) th.data.name_need_go=1;
if(arr['birthday_state']==1) th.data.birth_need_go=1;
if(arr['idcard_state']==1) th.data.idcard_need_go=1;
if(arr['address_state']==1) th.data.address_need_go=1;
if(arr['pick_state']==1) th.data.pick_need_go=1;
if(arr['sex_state']==1) th.data.sex_need_go=1;
- if(arr['introducer_state']==1) th.data.introducer_need_go=1;
- }
- },1)
+ if(arr['introducer_state']==1) th.data.introducer_need_go=1;
+ }
+ },1)
+
+ getApp().promiseGet("/api/wx/weappSendlist/page", {
+ data: {
+ store_id: os.stoid,
+ typeid: "1007"
+ }}).then(res=>{
+ if (res.data.code == 0 && res.data.data.pageData.length > 0) {
+ var template_id = res.data.data.pageData[0].template_id;
+ th.setData({template_id:template_id});
+ }
+ })
},
+
+
//绑定手机号
getphone:function (e) {
//接下来写业务代码登录
e=e.detail;
- if (e.encryptedData==undefined){
+ if (e.encryptedData==undefined){
this.setData({show_bind:0})
return app.my_warnning("登录需要授权手机号码!", 0, this);
return false;
- }
- var th=this;
+ }
+ var th=this;
var sessionKey = getApp().globalData.sessionKey;
var openid = getApp().globalData.openid;
- var r=getApp().globalData.getu;
- th.save_the_data(r,e,sessionKey,openid)
+ var r=getApp().globalData.getu;
+
+ if(e){
+ wx.showModal({
+ title: '授权通知',
+ content:'是否接受注册成功通知',
+ success(res){
+ if(res.confirm){
+ th.sendsm(function (){
+ th.save_the_data(r,e,sessionKey,openid)
+ })
+ }else if(res.cancel){
+ th.save_the_data(r,e,sessionKey,openid)
+ }
+ }
+
+ })
+ }
+
+
},
+ requestSubscribe(){
+
+ },
//-- 会员授权 --
bindGetUserInfo: function(ee) {
-
if(!this.data.isAgree) {
wx.showToast({
title: '请您先阅读和勾选指定的内容',
@@ -83,27 +116,27 @@ Page({
js_code:o.code,
store_id: os.stoid,
nickname: app.clear_word(app.globalData.getu.nickName),
- head_pic: app.clear_word(app.globalData.getu.avatarUrl)
- };
+ head_pic: app.clear_word(app.globalData.getu.avatarUrl)
+ };
//-- 导购会员ID --
if(getApp().globalData.guide_id){
dd.guide_id=getApp().globalData.guide_id;
}
-
+
getApp().request.get("/api/weshop/users/openidandkey", {
data: dd,
success: function (e) {
- if(e.data.code==0){
- that.setData({user:user})
+ if(e.data.code==0){
+ that.setData({user:user})
//如果有会员的话,没有sessionKey
if(!e.data.data.sessionKey){
getApp().showWarning("登录成功");
getApp().globalData.userInfo=e.data.data;
getApp().globalData.user_id=e.data.data.user_id;
getApp().globalData.openid = e.data.data.weapp_openid;
- //把会员的信息存在内存
+ //把会员的信息存在内存
wx.setStorageSync("userinfo",e.data.data);
-
+
setTimeout(function () {
getApp().globalData.login_back=1;
wx.navigateBack({ delta: 1}) //返回上一页
@@ -111,45 +144,48 @@ Page({
}else{
getApp().globalData.sessionKey=e.data.data.sessionKey;
getApp().globalData.openid=e.data.data.openid;
- that.setData({show_bind:1});
+ that.setData({show_bind:1});
}
}else{
- getApp().confirmBox(e.data.msg);
+ getApp().confirmBox(e.data.msg);
}
}
});
}
- })
-
- })
+ })
+
+ })
},
-
+
//-- 调整后的获取会员信息 --
getUserProfile:function(func){
- var that=this;
+ var that=this;
wx.getUserProfile({
desc:'获取用户相关信息',
success:res=>{
console.log("getUserProfile",res);
//此处授权得到userInfo
- getApp().globalData.getu = res.userInfo;
- func(res.userInfo);
+ getApp().globalData.getu = res.userInfo;
+ func(res.userInfo);
}
- });
+ });
},
-
+
//暂不登录,返回上一页
cancle_bind:function () {
wx.navigateBack({ delta: 1})
},
-
+
close_pop:function(){
this.setData({show_bind:0})
},
show_bind_mobile:function(){
- this.setData({show_bind:1})
+ let th=this;
+ th.sendsm(function (){
+ th.setData({show_bind:1})
+ })
},
-
+
save_the_data: async function (r,e,sessionKey,openid) {
var app=getApp(),a=app,th=this;
var dd = {
@@ -174,39 +210,39 @@ Page({
dd.first_leader=th.data.first_leader;
}
}
- })
- }
+ })
+ }
//-- 导购会员ID --
if(getApp().globalData.guide_id){
dd.guide_id=getApp().globalData.guide_id;
}
-
+
//门店的扫描识别码
if(getApp().globalData.store_number){
dd.SunCode=encodeURIComponent(getApp().globalData.store_number.trim());
}
-
- console.log("-----会员注册的信息-------");
+
+ console.log("-----会员注册的信息-------");
console.log(dd);
app.request.get("/api/weshop/users/thirdLogin", {
data: dd,
success: function (e) {
-
+
if (e.data.code == 0) {
app.globalData.user_id = e.data.data.user_id;
} else {
return app.showWarning("授权登入失败!"+e.data.msg);
}
-
-
- var need_go=0;
+
+
+ var need_go=0;
var t_user=e.data.data;
getApp().globalData.login_back=1;
wx.setStorageSync("userinfo",e.data.data);
wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = t.getFullUrl(a.globalData.userInfo.head_pic);
-
+
//如果有需要完善的信息没有完善,就需要跳转
if(!t_user['vipname'] && th.data.name_need_go){ need_go=1;}
if(!t_user['birthday'] && th.data.birth_need_go){ need_go=1;}
@@ -215,15 +251,15 @@ Page({
if(!t_user['pickup_id'] && th.data.pick_need_go){ need_go=1;}
if(!t_user['sex'] && th.data.sex_need_go){ need_go=1;}
if(!t_user['fromuser_id'] && th.data.introducer_need_go){ need_go=1;}
-
+
if(need_go){
getApp().goto("/packageA/pages/profile/profile");
}else{
wx.navigateBack({ delta: 1})
}
-
+
},
- failStatus: function (t) {
+ failStatus: function (t) {
return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
},
fail: function (t) {
@@ -238,14 +274,14 @@ Page({
_errObj[_errImg] = this.data.imghots+"/miniapp/images/logo.png";
this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
},
-
+
//-- 会员授权 --
bindUserInfo: function(ee) {
var that = this;
var user=ee.detail.userInfo;
//此处授权得到userInfo
getApp().globalData.getu = user;
-
+
//--拿下code--
wx.login({
success: function (o) {
@@ -253,27 +289,27 @@ Page({
js_code:o.code,
store_id: os.stoid,
nickname: app.clear_word(app.globalData.getu.nickName),
- head_pic: app.clear_word(app.globalData.getu.avatarUrl)
- };
+ head_pic: app.clear_word(app.globalData.getu.avatarUrl)
+ };
//-- 导购会员ID --
if(getApp().globalData.guide_id){
dd.guide_id=getApp().globalData.guide_id;
}
-
+
getApp().request.get("/api/weshop/users/openidandkey", {
data: dd,
success: function (e) {
- if(e.data.code==0){
- that.setData({user:user})
+ if(e.data.code==0){
+ that.setData({user:user})
//如果有会员的话,没有sessionKey
if(!e.data.data.sessionKey){
getApp().showWarning("登录成功");
getApp().globalData.userInfo=e.data.data;
getApp().globalData.user_id=e.data.data.user_id;
getApp().globalData.openid = e.data.data.weapp_openid;
- //把会员的信息存在内存
+ //把会员的信息存在内存
wx.setStorageSync("userinfo",e.data.data);
-
+
setTimeout(function () {
getApp().globalData.login_back=1;
wx.navigateBack({ delta: 1}) //返回上一页
@@ -281,26 +317,26 @@ Page({
}else{
getApp().globalData.sessionKey=e.data.data.sessionKey;
getApp().globalData.openid=e.data.data.openid;
- that.setData({show_bind:1});
+ that.setData({show_bind:1});
}
}else{
- getApp().confirmBox(e.data.msg);
+ getApp().confirmBox(e.data.msg);
}
}
});
}
- })
-
-
+ })
+
+
},
-
-
+
+
close_pop_back:function(){
this.close_pop();
wx.navigateBack({ delta: 1})
},
-
-
+
+
// 是否同意协议
isAgree(e) {
let isAgree = null;
@@ -308,22 +344,37 @@ Page({
isAgree = true;
} else {
isAgree = false;
- };
+ };
// this.data.isAgree = isAgree;
this.setData({
isAgree,
});
},
-
-
+
+
//通过路径跳转到其他页面
goto: function(e) {
console.log('xxxx', e);
var url = e.currentTarget.dataset.url;
getApp().goto(url);
},
-
-
-
-
+
+ //订阅消息提醒
+ sendsm:function(func)
+ {
+ var template_id = this.data.template_id;
+ // //授权订阅
+ wx.requestSubscribeMessage({
+ tmplIds: [template_id],
+ success(res) {
+ func();
+ },
+ fail(res) {
+ func();
+ }
+ })
+
+ },
+
+
})
diff --git a/pages/togoin/togoin.wxml b/pages/togoin/togoin.wxml
index 8b6ebf5..7ec704c 100644
--- a/pages/togoin/togoin.wxml
+++ b/pages/togoin/togoin.wxml
@@ -14,45 +14,45 @@
-
+
我已阅读同意 《用户使用协议》与《隐私政策》
-
-
+
+
-
+
-
+
+
-
-
+
+
-
-
-
+
+
+
+
+
- 暂不登录
+ 暂不登录
@@ -60,14 +60,14 @@
-
-
+
+
登录手机号,同步会员信息以及订单记录
- 暂不授权
+ 暂不授权
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 0f68d0e..0ce9fbe 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -58,7 +58,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
-
var th=this;
//-- 读取会员中心按钮列表 --
getApp().request.get("/api/weshop/userTool/page?pageSize=100", {
@@ -99,9 +98,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
- this.getTabBar().setData({
- cartGoodsNum: getApp().globalData.cartGoodsNum,
- })
//看一下小程序是不是过期了
getApp().getConfig2(function(config2){
if(config2 && config2.is_overdue==1){
@@ -739,8 +735,6 @@ Page({
}
})
-
-
},
clike_banne: function() {
var th = this;
@@ -755,6 +749,7 @@ Page({
getApp().showWarning("请稍后重试");
}
},
+
// 判断助力活动是不是存在
is_assistance: function() {
var th = this,r=Math.random()*100;
diff --git a/pages/user/my_service/i_service.wxml b/pages/user/my_service/i_service.wxml
index 2582208..8406e1a 100644
--- a/pages/user/my_service/i_service.wxml
+++ b/pages/user/my_service/i_service.wxml
@@ -99,4 +99,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js
index e93dc83..12ec7c8 100644
--- a/pages/user/order_detail/order_detail.js
+++ b/pages/user/order_detail/order_detail.js
@@ -1099,7 +1099,7 @@ Page({
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:g_item.store_id,goodsidlist:g_item.goods_id,is_detail:1
+ store_id:g_item.store_id,goodsidlist:g_item.goods_id,is_detail:1,user_id:user_id
};
await getApp().request.promiseGet(url, {data:req_data}).then(res=>{
if(res.data.code==0){
@@ -1604,17 +1604,32 @@ Page({
//跳转到商品
go_gd:function (e) {
+
+ var user_id=getApp().globalData.user_id;
+ if(!user_id) user_id=0;
+
var gd= e.currentTarget.dataset.gd;
var good_url="/pages/goods/goodsInfo/goodsInfo?goods_id=" + gd;
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:os.stoid,goodsidlist:gd,is_detail:1
+ store_id:os.stoid,goodsidlist:gd,is_detail:1,user_id:user_id
};
//获取秒杀的多规格
getApp().request.promiseGet(url, {data:req_data}).then(res=>{
if(res.data.code==0 && res.data.data){
if(res.data.data.length==1){
- good_url+="&prom_type="+res.data.data[0].prom_type+"&prom_id="+res.data.data[0].act_id;
+ var item=res.data.data[0];
+ switch (item.prom_type){
+ case 9:
+ good_url= '/packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo?goods_id=' + gd + '&group_id=' + item.prom_id;
+ break;
+ case 8:
+ good_url="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+gd+"&prom_id="+item.prom_id
+ break;
+ default:
+ good_url="/pages/goods/goodsInfo/goodsInfo?goods_id="+gd+"&prom_id="+item.prom_id+"&prom_type=1";
+ break
+ }
}
getApp().goto(good_url);
diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js
index 3623e3c..33661b6 100644
--- a/pages/user/order_list/order_list.js
+++ b/pages/user/order_list/order_list.js
@@ -1291,7 +1291,7 @@ Page({
var url="/api/weshop/activitylist/getGoodActInfo";
var req_data={
- store_id:g_item.store_id,goodsidlist:g_item.goods_id,is_detail:1
+ store_id:g_item.store_id,goodsidlist:g_item.goods_id,is_detail:1,user_id:user_id
};
await getApp().request.promiseGet(url, {data:req_data}).then(res=>{
if(res.data.code==0){
diff --git a/utils/util.js b/utils/util.js
index 54e556a..a4560f7 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -13,7 +13,22 @@ function trim(str) { return str.replace(/(^s*)|(s*$)/g, "");}
function e(e) {
var r = ""; for (var t in e) r += (r ? "&" : "") + t + "=" + e[t]; return r;
}
-
+//节流
+let _throttle =function (fn, interval) {
+ var enterTime = 0;//触发的时间
+ console.log(1);
+
+ var gapTime = interval || 300 ;//间隔时间,如果interval不传,则默认300ms
+ return function() {
+ console.log(2);
+ var context = this;
+ var backTime = new Date();//第一次函数return即触发的时间
+ if (backTime - enterTime > gapTime) {
+ fn.call(context,arguments);
+ enterTime = backTime;//赋值给第一次触发的时间,这样就保存了第二次触发的时间
+ }
+ };
+}.bind(this);
function utf16to8(str) {
var out, i, len, c; out = ""; len = str.length;
for (i = 0; i < len; i++) {
@@ -577,6 +592,7 @@ module.exports = {
});
},
unserialize: unserialize,
+ _throttle:_throttle,
unserialize_o: unserialize_o,
trim: trim, //去空格
isEmptyObject: isEmptyObject, //判断空对象
diff --git a/utils/wxParse/wxParse.wxml b/utils/wxParse/wxParse.wxml
index 90aa270..b08065e 100644
--- a/utils/wxParse/wxParse.wxml
+++ b/utils/wxParse/wxParse.wxml
@@ -1,7 +1,7 @@
@@ -16,7 +16,7 @@
-
+