Commit aa0ee60f by 李嘉林

加购弹窗

parent d125e8f4
......@@ -11,7 +11,7 @@ export default {
},
// 查询所有产品规格详情
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) {
......
......@@ -185,7 +185,7 @@ export default {
async init() {
let productInfoId = this.productInfoId;
await live
.getProductGoodsByProductInfo(productInfoId)
.getProductGoodsByProductInfo({productInfoId})
.then(res => {
if (res.data.code == 200) {
this.getProductInfos = res.data.data;
......
......@@ -97,6 +97,10 @@ mpApp.indexBgCallBack = function () { }
mpApp.openFilterGoods = function () { }
// 筛选弹窗点击确认
mpApp.getFilterGoodsData = function () { }
// 打开选择商品规格弹窗
mpApp.openSelectGoods = function () { }
// 打开选择商品规格(2B)弹窗
mpApp.openTwoBAddCart = function () { }
/**
* 组件点击行为收集
......
......@@ -132,6 +132,10 @@
<couponPopup></couponPopup>
<!-- 商品筛选 -->
<GoodsFliters></GoodsFliters>
<!-- 选规格 -->
<SelectGoods></SelectGoods>
<!-- 选规格(开启了企业要货) -->
<TwoBAddCart></TwoBAddCart>
</div>
</template>
......@@ -163,6 +167,8 @@ import customList from "../../components/custom-list";
import richText from "../../components/basicTool/rich-text";
import memberInfo from "../../components/basicTool/member-info";
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 indexApi from "@/api/index.js";
import { throttle, concatUrl } from "../../utils/index.js"
......@@ -199,6 +205,7 @@ export default {
isShowBirth: false, // 是否展示生日礼品
birthGifts: "",
showbottomCont: false, //展示底部logo
showSpe: false,
};
},
components:{
......@@ -224,7 +231,9 @@ export default {
'custom-list':customList,
'rich-text':richText,
'member-info':memberInfo,
GoodsFliters
GoodsFliters,
SelectGoods,
TwoBAddCart
},
computed: {
applySucessEntryFlag() {
......
......@@ -9,6 +9,7 @@
"time-limited-discount": "/static/nativeComponents/TimeLimitedDiscount/index",
"waterfall-flow": "/static/nativeComponents/module/WaterfallFlow/index",
"van-button": "/static/vant/button/index",
"van-stepper": "/static/vant/stepper/index",
"area-navigation":"/static/nativeComponents/AreaNavigation/index",
"cube-nav":"/static/nativeComponents/CubeNav/index",
"float-button":"/static/nativeComponents/FloatButton/index",
......
......@@ -103,6 +103,7 @@ const componentOptions = {
},
onclickBuynow(e) {
let { btnType } = this.data.datas.componentData;
let _this = this;
let {
minProductGoodsMixid,
minProductGoodsId,
......@@ -114,7 +115,15 @@ const componentOptions = {
if (btnType < 6) {
// 加入购物车
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 {
// 进入确认订单
linkVal = `/order/orderConfirm?productGoodsMixId=${minProductGoodsMixid}&productGoodsId=${minProductGoodsId}&goodsId=${minGoodsId}&qty=1&goodsString=null&source=3`;
......
......@@ -560,6 +560,7 @@ const componentOptions = {
return
}
wx.createSelectorQuery().selectAll(`.goodsListItemIndex${that.data.datasIndex}>>>.${type}`).boundingClientRect(function(rects){
console.log(rects.length,'------rectslength')
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) {
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