diff --git a/App.vue b/App.vue
index 622310b..98337fa 100644
--- a/App.vue
+++ b/App.vue
@@ -8,8 +8,8 @@
uni.setStorageSync('SHFlag', true)
this.Post({id:2388},'/api/multimedia/detail').then(res => {
if (res && res.data) {
- // let SHFlag = res.data.company_name == 1 ? true : false
- let SHFlag = res.data.ext_link == 1 ? true : false
+ let SHFlag = res.data.company_name == 1 ? true : false
+ // let SHFlag = res.data.ext_link == 1 ? true : false
uni.setStorageSync('SHFlag', SHFlag)
return
} else {
diff --git a/mixins/myMixins.js b/mixins/myMixins.js
index 3c74eac..aa61b53 100644
--- a/mixins/myMixins.js
+++ b/mixins/myMixins.js
@@ -1,5 +1,11 @@
export const myMixins ={
+ data() {
+ return {
+ shareParam: {},
+ }
+ },
+
onLoad(option) {
console.log('option',option)
if(option && option.wechat_qrcode){
@@ -25,19 +31,23 @@ export const myMixins ={
const pages = getCurrentPages(); // 获取加载的页面
const view = pages[pages.length - 1]; // 获取当前页面的对象
let url = '';
+ let shareParam = {}
console.log(view)
if (view.$page.fullPath) {
url = view.options.fullPath;
} else {
url = uni.getStorageSync('webUrl');
}
-
+ if (view.data && view.data.shareParam) {
+ shareParam = view.data.shareParam
+ }
console.log(111,url,`${view.route}?url=${url}`)
return {
title: '时味苏州', // 分享的名称
path: `${view.$page.fullPath}`,
- imageUrl: "https://static.ticket.sz-trip.com/uploads/20250818/5ea2c18a15db8a438f2ce642194b6051.jpg",
- mpId: 'wx699ed131345cf8dd' // 此处配置微信小程序的 AppId
+ // imageUrl: "https://static.ticket.sz-trip.com/uploads/20250818/5ea2c18a15db8a438f2ce642194b6051.jpg",
+ mpId: 'wx699ed131345cf8dd', // 此处配置微信小程序的 AppId
+ ...shareParam
};
}
}
\ No newline at end of file
diff --git a/subPackages/food/detail.vue b/subPackages/food/detail.vue
index 6e1982b..de4b2b5 100644
--- a/subPackages/food/detail.vue
+++ b/subPackages/food/detail.vue
@@ -75,26 +75,35 @@
-
加入购物车
立即购买
-
+
@@ -222,6 +231,7 @@
} catch(e) {}
this.info = resData
this.sku = resData.sku
+ this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
@@ -844,4 +854,21 @@
button::after {
border: none;
}
+
+ .cartNum{
+ width: 28rpx;
+ height: 28rpx;
+ background: #DC2525;
+ border-radius: 50%;
+ border: 1px solid #DC2525;
+ font-weight: normal;
+ font-size: 23rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ top: -10rpx;
+ right: -6rpx;
+ }
diff --git a/subPackages/homestay/detail.vue b/subPackages/homestay/detail.vue
index ccdb684..6629eb6 100644
--- a/subPackages/homestay/detail.vue
+++ b/subPackages/homestay/detail.vue
@@ -299,6 +299,7 @@
let info = res.data;
this.info = info
console.log(info)
+ this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
// 根据景点id获取规格列表
diff --git a/subPackages/search/result.vue b/subPackages/search/result.vue
index 142080c..fecd6e6 100644
--- a/subPackages/search/result.vue
+++ b/subPackages/search/result.vue
@@ -89,6 +89,10 @@
this.getList();
},
pushHis(keywords) {
+ if (!keywords.trim()) {
+ return
+ }
+
let history = JSON.parse(uni.getStorageSync('tz_trip_keyowrds')) || [];
let index = history.findIndex(item => item == keywords);
if (index >= 0) history.splice(index, 1);
diff --git a/subPackages/search/techanResult.vue b/subPackages/search/techanResult.vue
index 3350eb1..15fd9bf 100644
--- a/subPackages/search/techanResult.vue
+++ b/subPackages/search/techanResult.vue
@@ -162,6 +162,9 @@
this.getList()
},
pushHis(keywords) {
+ if (!keywords.trim()) {
+ return
+ }
let history = JSON.parse(uni.getStorageSync('tz_trip_keyowrds')) || [];
let index = history.findIndex(item => item == keywords);
if (index >= 0) history.splice(index, 1);
diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue
index 665afb7..d5e6343 100644
--- a/subPackages/techan/detail.vue
+++ b/subPackages/techan/detail.vue
@@ -69,16 +69,22 @@
-
+
+
+
+ 店铺
+
-
-
- 客服
-
+
+ 客服
+
+
+ 购物车
+ {{cartNum}}
+
@@ -87,13 +93,6 @@
-
-
-
-
-
-
-
-
-
-
- 客服
+
+
+
+
+
+ 客服
+
+
+
+
+
+
+ 购物车
+ {{cartNum}}
+
-
+
加入购物车
-
+
@@ -301,6 +311,7 @@
title: this.info.title
})
}
+ this.shareParam = {title: this.info.title, imageUrl: this.info.headimg}
});
},
@@ -440,6 +451,21 @@
// 预定选择日期分时
changeSku(itemSku,goods) {
+ // 如果是产品酒景套餐,进入酒景套餐下单页
+ console.log(itemSku, goods)
+ if(goods.is_package == 1) {
+ let orderInfo = [{
+ pInfo: goods,
+ sInfo: {...itemSku, buyNum: 1},
+ }]
+
+ this.$store.commit("changeFoodOrderList", orderInfo);
+ uni.navigateTo({
+ url: '/subPackages/food/order'
+ });
+ return
+ }
+
this.skuInfo = itemSku
this.selectGoods = goods
this.getPriceCal(itemSku,goods)
@@ -1308,4 +1334,20 @@
button::after {
border: none;
}
+ .cartNum{
+ width: 28rpx;
+ height: 28rpx;
+ background: #DC2525;
+ border-radius: 50%;
+ border: 1px solid #DC2525;
+ font-weight: normal;
+ font-size: 23rpx;
+ color: #FFFFFF;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: absolute;
+ top: -10rpx;
+ right: -6rpx;
+ }