diff --git a/pages/order/index.vue b/pages/order/index.vue
index daef0bf..967ee12 100644
--- a/pages/order/index.vue
+++ b/pages/order/index.vue
@@ -70,7 +70,7 @@
v-else-if="item1.isTemporary &&item1.productName=='签子'"
src="https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/5/b97054debd83486ab7ad8e20ca6a360a.png"
>
-
{{ item1.productName }}
@@ -151,7 +151,7 @@
uni.cache.set("shopId", item.shopId);
uni.navigateTo({
url: "/pages/product/index?type=beforehand&order_id=" + item.id +
- '&one_more_order=1',
+ '&one_more_order=1&shopId='+item.shopId,
});
}
})
diff --git a/pages/product/index.vue b/pages/product/index.vue
index 500fa54..1daec79 100644
--- a/pages/product/index.vue
+++ b/pages/product/index.vue
@@ -2456,10 +2456,10 @@
shareMixin,
handleMixinOnLoad,
returnQuery,
- jsonToUrl,wxShare,
+ jsonToUrl,
+ wxShare,
returnCommonQuery
} from '@/utils/share.js'
-import { onShareTimeline } from '@dcloudio/uni-app';
// defineOptions({
// mixins: [shareMixin],
// });
@@ -2470,21 +2470,22 @@ import { onShareTimeline } from '@dcloudio/uni-app';
function shareClick() {
isGoodsShare.value = true
}
-
- async function onShare(){
+
+ async function onShare() {
const queryJson = await returnCommonQuery()
let query = jsonToUrl(queryJson)
query += '&type=beforehand'
- let json={}
+ let json = {}
+ const shopName = uni.cache.get('shopInfo').shopName || ''
if (goodsModalList.value.length && isGoodsShare.value) {
const goods = goodsModalList.value[goodsModalList.value.length - 1].goods
query += '&showGoodsId=' + goods.id
- json.title = goods.name
+ json.title = goods.name + (shopName ? `-${shopName}` : '')
json.imageUrl = goods.coverImg
json.showGoodsId = goods.id
- }else{
- json.title=uni.cache.get('shopInfo').shopName||''
- json.imageUrl=uni.cache.get('shopInfo').logo||''
+ } else {
+ json.title = shopName
+ json.imageUrl = uni.cache.get('shopInfo').logo || ''
}
console.log('onShareAppMessage', {
query,
@@ -2497,9 +2498,9 @@ import { onShareTimeline } from '@dcloudio/uni-app';
path: '/pages/product/index' + '?' + query
})
}
-
+
onShareAppMessage(onShare)
-
+
onShareTimeline(onShare)
const pageOptions = reactive({})
@@ -2513,7 +2514,6 @@ import { onShareTimeline } from '@dcloudio/uni-app';
shopId: e.shopId || uni.cache.get('shopId')
})
const userInfo = userStore.userInfo
- const shopInfoRes = userStore.shopInfo
// //获取用户信息
// const userInfo = await APIshopUserInfo({
// shopId: uni.cache.get('shopId')
@@ -2522,9 +2522,7 @@ import { onShareTimeline } from '@dcloudio/uni-app';
// const shopInfoRes = await APIusershopInfodetail({
// shopId: uni.cache.get('shopId')
// });
- if (shopInfoRes && shopInfoRes.shopInfo) {
- Object.assign(shopInfo, shopInfoRes.shopInfo);
- }
+ Object.assign(shopInfo, userStore.shopInfo);
if (userInfo && typeof userInfo === 'object') {
@@ -2661,7 +2659,7 @@ import { onShareTimeline } from '@dcloudio/uni-app';
useSocket.setOnMessage(() => {});
}
onHide(() => {
- isGoodsShare.value=false
+ isGoodsShare.value = false
closeSocket();
});
onUnload(() => {
diff --git a/scoreShop/detail/index.vue b/scoreShop/detail/index.vue
index 74690f3..66606d0 100644
--- a/scoreShop/detail/index.vue
+++ b/scoreShop/detail/index.vue
@@ -27,7 +27,10 @@
剩余:{{item.quantity}}
- {{item.goodsName}}
+
+ {{item.goodsName}}
+
+
@@ -116,6 +119,7 @@