Commit aa0ee60f by 李嘉林

加购弹窗

parent d125e8f4
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
}, },
// 查询所有产品规格详情 // 查询所有产品规格详情
getProductGoodsByProductInfo(options) { getProductGoodsByProductInfo(options) {
return requestPOST1(`${process.env.OLSHOP_URL}/product/get_product_goods_by_product_info?productInfoId=${options}`); return requestPOST1(`${process.env.OLSHOP_URL}/product/get_product_goods_by_product_info`, options);
}, },
// 获取商品所有规格 // 获取商品所有规格
getProductGoodsSpecifications(options) { getProductGoodsSpecifications(options) {
......
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
async init() { async init() {
let productInfoId = this.productInfoId; let productInfoId = this.productInfoId;
await live await live
.getProductGoodsByProductInfo(productInfoId) .getProductGoodsByProductInfo({productInfoId})
.then(res => { .then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.getProductInfos = res.data.data; this.getProductInfos = res.data.data;
......
...@@ -97,6 +97,10 @@ mpApp.indexBgCallBack = function () { } ...@@ -97,6 +97,10 @@ mpApp.indexBgCallBack = function () { }
mpApp.openFilterGoods = function () { } mpApp.openFilterGoods = function () { }
// 筛选弹窗点击确认 // 筛选弹窗点击确认
mpApp.getFilterGoodsData = function () { } mpApp.getFilterGoodsData = function () { }
// 打开选择商品规格弹窗
mpApp.openSelectGoods = function () { }
// 打开选择商品规格(2B)弹窗
mpApp.openTwoBAddCart = function () { }
/** /**
* 组件点击行为收集 * 组件点击行为收集
......
...@@ -132,6 +132,10 @@ ...@@ -132,6 +132,10 @@
<couponPopup></couponPopup> <couponPopup></couponPopup>
<!-- 商品筛选 --> <!-- 商品筛选 -->
<GoodsFliters></GoodsFliters> <GoodsFliters></GoodsFliters>
<!-- 选规格 -->
<SelectGoods></SelectGoods>
<!-- 选规格(开启了企业要货) -->
<TwoBAddCart></TwoBAddCart>
</div> </div>
</template> </template>
...@@ -163,6 +167,8 @@ import customList from "../../components/custom-list"; ...@@ -163,6 +167,8 @@ import customList from "../../components/custom-list";
import richText from "../../components/basicTool/rich-text"; import richText from "../../components/basicTool/rich-text";
import memberInfo from "../../components/basicTool/member-info"; import memberInfo from "../../components/basicTool/member-info";
import GoodsFliters from "../../components/common/GoodsFliters"; import GoodsFliters from "../../components/common/GoodsFliters";
import SelectGoods from "../../components/common/SelectGoods";
import TwoBAddCart from "../../components/common/TwoBAddCart";
import { setTabBarActive, checkTabbarPage,themeColor, checkShowConditionIds } from "../../utils/mayi.js"; import { setTabBarActive, checkTabbarPage,themeColor, checkShowConditionIds } from "../../utils/mayi.js";
import indexApi from "@/api/index.js"; import indexApi from "@/api/index.js";
import { throttle, concatUrl } from "../../utils/index.js" import { throttle, concatUrl } from "../../utils/index.js"
...@@ -199,6 +205,7 @@ export default { ...@@ -199,6 +205,7 @@ export default {
isShowBirth: false, // 是否展示生日礼品 isShowBirth: false, // 是否展示生日礼品
birthGifts: "", birthGifts: "",
showbottomCont: false, //展示底部logo showbottomCont: false, //展示底部logo
showSpe: false,
}; };
}, },
components:{ components:{
...@@ -224,7 +231,9 @@ export default { ...@@ -224,7 +231,9 @@ export default {
'custom-list':customList, 'custom-list':customList,
'rich-text':richText, 'rich-text':richText,
'member-info':memberInfo, 'member-info':memberInfo,
GoodsFliters GoodsFliters,
SelectGoods,
TwoBAddCart
}, },
computed: { computed: {
applySucessEntryFlag() { applySucessEntryFlag() {
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"time-limited-discount": "/static/nativeComponents/TimeLimitedDiscount/index", "time-limited-discount": "/static/nativeComponents/TimeLimitedDiscount/index",
"waterfall-flow": "/static/nativeComponents/module/WaterfallFlow/index", "waterfall-flow": "/static/nativeComponents/module/WaterfallFlow/index",
"van-button": "/static/vant/button/index", "van-button": "/static/vant/button/index",
"van-stepper": "/static/vant/stepper/index",
"area-navigation":"/static/nativeComponents/AreaNavigation/index", "area-navigation":"/static/nativeComponents/AreaNavigation/index",
"cube-nav":"/static/nativeComponents/CubeNav/index", "cube-nav":"/static/nativeComponents/CubeNav/index",
"float-button":"/static/nativeComponents/FloatButton/index", "float-button":"/static/nativeComponents/FloatButton/index",
......
...@@ -103,6 +103,7 @@ const componentOptions = { ...@@ -103,6 +103,7 @@ const componentOptions = {
}, },
onclickBuynow(e) { onclickBuynow(e) {
let { btnType } = this.data.datas.componentData; let { btnType } = this.data.datas.componentData;
let _this = this;
let { let {
minProductGoodsMixid, minProductGoodsMixid,
minProductGoodsId, minProductGoodsId,
...@@ -114,7 +115,15 @@ const componentOptions = { ...@@ -114,7 +115,15 @@ const componentOptions = {
if (btnType < 6) { if (btnType < 6) {
// 加入购物车 // 加入购物车
console.log("加入购物车"); console.log("加入购物车");
$themeAddToCard(this.data.items); // $themeAddToCard(this.data.items);
console.log(app.globalData.shopInfo.whetherOpenEnterprisesWantGoods - 0,'app.globalData.shopInfo=')
if (app.globalData.shopInfo.whetherOpenEnterprisesWantGoods - 0 == 1) {
// 开启企业要货加购
app.openTwoBAddCart(_this.data.items);
} else {
app.openSelectGoods(_this.data.items);
}
} else { } else {
// 进入确认订单 // 进入确认订单
linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`; linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`;
......
...@@ -560,6 +560,7 @@ const componentOptions = { ...@@ -560,6 +560,7 @@ const componentOptions = {
return return
} }
wx.createSelectorQuery().selectAll(`.goodsListItemIndex${that.data.datasIndex}>>>.${type}`).boundingClientRect(function(rects){ wx.createSelectorQuery().selectAll(`.goodsListItemIndex${that.data.datasIndex}>>>.${type}`).boundingClientRect(function(rects){
console.log(rects.length,'------rectslength')
for (let index = 0; index < rects.length; index++) { for (let index = 0; index < rects.length; index++) {
if (rects[index].top == 0 && rects[index].bottom == 0 && rects[index].left == 0 && rects[index].right == 0) { if (rects[index].top == 0 && rects[index].bottom == 0 && rects[index].left == 0 && rects[index].right == 0) {
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment