|
@@ -167,7 +167,9 @@
|
|
|
<wx-open-launch-app
|
|
<wx-open-launch-app
|
|
|
id="launch-btn"
|
|
id="launch-btn"
|
|
|
appid="wx5f33a4ace799b661"
|
|
appid="wx5f33a4ace799b661"
|
|
|
- :extinfo="'/pages/group_buying/proDetail?id=' + id"
|
|
|
|
|
|
|
+ :extinfo="
|
|
|
|
|
+ '/pages/group_buying/proDetail?combinationId=' + combinationId
|
|
|
|
|
+ "
|
|
|
@error="goShuiBei"
|
|
@error="goShuiBei"
|
|
|
>
|
|
>
|
|
|
<component :is="'script'" v-bind="{ type: 'text/wxtag-template' }">
|
|
<component :is="'script'" v-bind="{ type: 'text/wxtag-template' }">
|
|
@@ -220,6 +222,12 @@ const initwxlaunch = () => {
|
|
|
jsApiList: ["wx-open-subscribe", "wx-open-launch-app"], // 必填,需要使用的JS接口列表,这个地方必须至少写一个,即使你一个都不想用'updateTimelineShareData',
|
|
jsApiList: ["wx-open-subscribe", "wx-open-launch-app"], // 必填,需要使用的JS接口列表,这个地方必须至少写一个,即使你一个都不想用'updateTimelineShareData',
|
|
|
openTagList: ["wx-open-subscribe", "wx-open-launch-app"],
|
|
openTagList: ["wx-open-subscribe", "wx-open-launch-app"],
|
|
|
// 可选,需要使用的开放标签列表
|
|
// 可选,需要使用的开放标签列表
|
|
|
|
|
+ success: function () {
|
|
|
|
|
+ console.log("wx.config success");
|
|
|
|
|
+ },
|
|
|
|
|
+ error: function (err) {
|
|
|
|
|
+ console.log("wx.config error:", err);
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
wx.checkJsApi({
|
|
wx.checkJsApi({
|
|
@@ -242,7 +250,6 @@ const goShuiBei = () => {
|
|
|
window.location.href = errUrl;
|
|
window.location.href = errUrl;
|
|
|
}, 3000);
|
|
}, 3000);
|
|
|
};
|
|
};
|
|
|
-initwxlaunch();
|
|
|
|
|
// const appStore = useAppStore();
|
|
// const appStore = useAppStore();
|
|
|
// const isLogin = computed(() => appStore.isLogin);
|
|
// const isLogin = computed(() => appStore.isLogin);
|
|
|
// const uid = computed(() => appStore.uid);
|
|
// const uid = computed(() => appStore.uid);
|
|
@@ -254,7 +261,7 @@ const productInfo = ref({});
|
|
|
const productValue = ref([]);
|
|
const productValue = ref([]);
|
|
|
const productAttr = ref([]);
|
|
const productAttr = ref([]);
|
|
|
const specExtraList = ref([]);
|
|
const specExtraList = ref([]);
|
|
|
-
|
|
|
|
|
|
|
+const combinationId = ref("");
|
|
|
const attr = ref({
|
|
const attr = ref({
|
|
|
cartAttr: false,
|
|
cartAttr: false,
|
|
|
productAttr: [],
|
|
productAttr: [],
|
|
@@ -290,24 +297,18 @@ onLoad((options) => {
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- if (options.id || options.scene) {
|
|
|
|
|
- if (options.scene) {
|
|
|
|
|
- const qrCodeValue = $util.getUrlParams(decodeURIComponent(options.scene));
|
|
|
|
|
- const mapeMpQrCodeValue = $util.formatMpQrCodeData(qrCodeValue);
|
|
|
|
|
- app.globalData.spread = mapeMpQrCodeValue.spread;
|
|
|
|
|
- id.value = mapeMpQrCodeValue.id;
|
|
|
|
|
- } else {
|
|
|
|
|
- id.value = options.id;
|
|
|
|
|
- }
|
|
|
|
|
- type.value = options.type ?? "normal";
|
|
|
|
|
|
|
+ if (options.combinationId || options.scene) {
|
|
|
|
|
+ combinationId.value = options.combinationId;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- getGoodsDetails(id.value);
|
|
|
|
|
|
|
+ getGoodsDetails(combinationId.value);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
onShow(() => {});
|
|
onShow(() => {});
|
|
|
|
|
|
|
|
-onReady(() => {});
|
|
|
|
|
|
|
+onReady(() => {
|
|
|
|
|
+ initwxlaunch();
|
|
|
|
|
+});
|
|
|
const iptCartNum = (e) => {
|
|
const iptCartNum = (e) => {
|
|
|
attr.value.productSelect.cart_num = e || 1;
|
|
attr.value.productSelect.cart_num = e || 1;
|
|
|
};
|
|
};
|