feat: 新增拼团

This commit is contained in:
2026-09-23 10:29:41 +08:00
parent f7b9e66172
commit 67f8b3f352
33 changed files with 7491 additions and 858 deletions
+21 -6
View File
@@ -379,9 +379,9 @@ export default {
// #ifdef MP
const hasSeenGuide = uni.getStorageSync("has_seen_home_guide");
if (hasSeenGuide) {
uni.showTabBar({ animation: false, fail: () => {} });
uni.showTabBar({ animation: false, fail: () => { } });
} else {
uni.hideTabBar({ animation: false, fail: () => {} });
uni.hideTabBar({ animation: false, fail: () => { } });
}
// #endif
this.refreshKefuUnread();
@@ -721,7 +721,9 @@ export default {
uni.getClipboardData({
success: function (res) {
// http://localhost:5173/#/pages/other_package/productInfo/productInfo?id=1038
console.log(res.data); // 剪贴板内容
console.log('剪贴板内容', res.data, res.data.indexOf(
`${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=`,
) != -1); // 剪贴板内容
if (
res.data.indexOf(
`${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=`,
@@ -732,12 +734,25 @@ export default {
content: "当前APP想要粘贴商品详情,是否继续?",
success: (res1) => {
if (res1.confirm) {
let id = res.data.match(/=(.*?)\s/);
_this.curId = Number(id[1]);
_this.getShop();
// https://h.o.tbmall.xin/#/pages/other_package/productInfo/productInfo?id=53641&activedType=groupBuy&activityId=1
const match = res.data.match(/[?&]id=([^& \s]+)/);
const id = match ? match[1] : "";
console.log("获取id", id, res.data.indexOf('activedType=groupBuy&activityId=1') != -1)
// 拼团
if (res.data.indexOf('activedType=groupBuy&activityId=1') != -1) {
uni.navigateTo({
url: `/pages/other_package/productInfo/productInfo?id=${id}&activedType=groupBuy&activityId=1`,
});
} else {
_this.curId = Number(id);
_this.getShop();
}
uni.setClipboardData({
data: "",
});
}
},
fail: (res2) => {