|
@@ -249,7 +249,8 @@
|
|
|
show: false, // 是否显示底部按钮
|
|
|
recommendedlist: [], // 大家都在拼
|
|
|
specClass: 'none', //显示隐藏弹窗
|
|
|
- groupInfo: {}
|
|
|
+ groupInfo: {},
|
|
|
+ product_type: 0
|
|
|
};
|
|
|
|
|
|
},
|
|
@@ -464,53 +465,74 @@
|
|
|
title: data.product.store_name,
|
|
|
stock: data.stock
|
|
|
}
|
|
|
- // obj.goodsObjact.price = goods.price
|
|
|
- // obj.goodsObjact.product_price = data.product.product_price
|
|
|
console.log(obj.goodsObjact, 88)
|
|
|
console.log(Array.isArray(data.productValue), 99)
|
|
|
obj.imgList = goods.slider_image; //保存轮播图
|
|
|
- obj.actionPrice = goods.sku.image; //保存默认选中商品价格
|
|
|
+ obj.actionPrice = goods.price; //保存默认选中商品价格
|
|
|
obj.actionImage = goods.image; //保存默认选中商品图片
|
|
|
- obj.goodsNumberMax = 1; //保存默认选中最大可购买商品数量
|
|
|
- if (Array.isArray(data.productValue) != true) {
|
|
|
- obj.many = 2;
|
|
|
- obj.specList = data.productAttr; //保存产品属性
|
|
|
- obj.productValue = data.productValue; //保存属性值
|
|
|
- obj.specSelected = []; //初始化默认选择对象
|
|
|
- for (let i = 0; i < obj.specList.length; i++) {
|
|
|
- // 设置默认数据
|
|
|
- let attrValue = obj.specList[i].attr_value[0];
|
|
|
- attrValue.check = true;
|
|
|
- obj.specSelected.push(attrValue.attr);
|
|
|
+ obj.goodsNumberMax = data.once_pay_count; //保存默认选中最大可购买商品数量
|
|
|
+ obj.product_type = data.product.product_type
|
|
|
+ if(goods.content.content != null) {
|
|
|
+ obj.description = goods.content.content.replace(/\<img/gi, '<img class="rich-img"');
|
|
|
+ }
|
|
|
+ if( goods.attr.length !== 0){
|
|
|
+ console.log('多规格')
|
|
|
+ obj.many = 2
|
|
|
+ obj.specList = goods.attr
|
|
|
+ obj.productValue = goods.sku
|
|
|
+ obj.specSelected = []
|
|
|
+ for(let i = 0 ; i < obj.specList.length; i++ ) {
|
|
|
+ let attrValue = obj.specList[i].attr_value[0]
|
|
|
+ attrValue.check = true
|
|
|
+ obj.specSelected.push(attrValue.attr)
|
|
|
}
|
|
|
let str = obj.specSelected.join(',');
|
|
|
- console.log(str, 'str')
|
|
|
- // 设置默认值
|
|
|
-
|
|
|
- obj.actionPrice = obj.productValue[str].price;
|
|
|
- obj.goodsNumberMax = obj.productValue[str].stock;
|
|
|
- obj.actionImage = obj.productValue[str].image;
|
|
|
- obj.uniqueId = obj.productValue[str].unique;
|
|
|
- obj.goodsStore = obj.productValue[str].quota;
|
|
|
- } else {
|
|
|
+ console.log(str)
|
|
|
+
|
|
|
+ }else {
|
|
|
+ console.log("单规格")
|
|
|
obj.many = 1;
|
|
|
}
|
|
|
- console.log(obj.many, 'obj.many')
|
|
|
- if (obj.goodsObjact.description != null) {
|
|
|
- obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
|
|
|
- }
|
|
|
+ // console.log()
|
|
|
+ // if (Array.isArray(data.productValue) != true) {
|
|
|
+ // obj.many = 2;
|
|
|
+ // obj.specList = data.productAttr; //保存产品属性
|
|
|
+ // obj.productValue = data.productValue; //保存属性值
|
|
|
+ // obj.specSelected = []; //初始化默认选择对象
|
|
|
+ // for (let i = 0; i < obj.specList.length; i++) {
|
|
|
+ // // 设置默认数据
|
|
|
+ // let attrValue = obj.specList[i].attr_value[0];
|
|
|
+ // attrValue.check = true;
|
|
|
+ // obj.specSelected.push(attrValue.attr);
|
|
|
+ // }
|
|
|
+ // let str = obj.specSelected.join(',');
|
|
|
+ // console.log(str, 'str')
|
|
|
+ // // 设置默认值
|
|
|
+
|
|
|
+ // obj.actionPrice = obj.productValue[str].price;
|
|
|
+ // obj.goodsNumberMax = obj.productValue[str].stock;
|
|
|
+ // obj.actionImage = obj.productValue[str].image;
|
|
|
+ // obj.uniqueId = obj.productValue[str].unique;
|
|
|
+ // obj.goodsStore = obj.productValue[str].quota;
|
|
|
+ // } else {
|
|
|
+ // obj.many = 1;
|
|
|
+ // }
|
|
|
+ // console.log(obj.many, 'obj.many')
|
|
|
+ // if (obj.goodsObjact.description != null) {
|
|
|
+ // obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
|
|
|
+ // }
|
|
|
|
|
|
- if (obj.goodsObjact.pink_type == 'AA团') {
|
|
|
- obj.pink_type = 1;
|
|
|
- } else {
|
|
|
- obj.pink_type = 2;
|
|
|
- }
|
|
|
- // obj.pinkTlist = data.pink;
|
|
|
- obj.pinkTlist = data.groupBuying;
|
|
|
- obj.showlist = obj.pinkTlist.slice(0, 2);
|
|
|
- if (obj.pinkTlist.length <= 2) {
|
|
|
- obj.more = false;
|
|
|
- }
|
|
|
+ // if (obj.goodsObjact.pink_type == 'AA团') {
|
|
|
+ // obj.pink_type = 1;
|
|
|
+ // } else {
|
|
|
+ // obj.pink_type = 2;
|
|
|
+ // }
|
|
|
+ // // obj.pinkTlist = data.pink;
|
|
|
+ // obj.pinkTlist = data.groupBuying;
|
|
|
+ // obj.showlist = obj.pinkTlist.slice(0, 2);
|
|
|
+ // if (obj.pinkTlist.length <= 2) {
|
|
|
+ // obj.more = false;
|
|
|
+ // }
|
|
|
|
|
|
// 保存结束时间
|
|
|
obj.seckillObj.stopTime = goods.stop_time * 1000;
|
|
@@ -605,7 +627,7 @@
|
|
|
top: 0;
|
|
|
right: 0;
|
|
|
bottom: 0;
|
|
|
- z-index: 99;
|
|
|
+ z-index: 999;
|
|
|
|
|
|
&.show {
|
|
|
display: block;
|