|
@@ -370,11 +370,11 @@ const showShare = ref<boolean>(false)
|
|
|
// 生成商品分享链接
|
|
|
function generateShareLink() {
|
|
|
// 基础域名 - 根据需求使用bandhubuy.shop.com
|
|
|
- const baseUrl = 'https://bandhubuy.shop.com'
|
|
|
- const productUrl = `${baseUrl}/abc123` // 示例链接格式,实际应该根据商品ID生成
|
|
|
+ const baseUrl = 'http://124.222.152.234:8078'
|
|
|
+ const productUrl = `${baseUrl}/pages/productDetail/productDetail?productId=${productId.value}`
|
|
|
|
|
|
// 分享文案格式:[BandhuBuy] + 商品链接 + 商品名称 + 邀请文案
|
|
|
- const productName = detail.value.storeName || 'BOLON Classic Aviator Polarized Sunglasses, Exclusive Eyewear Brand'
|
|
|
+ const productName = detail.value.storeName
|
|
|
const shareText = `[BandhuBuy] ${productUrl} ${productName}\nGet it on BandhuBuy now!`
|
|
|
|
|
|
return {
|
|
@@ -390,9 +390,6 @@ function copyToClipboard() {
|
|
|
uni.setClipboardData({
|
|
|
data: text,
|
|
|
success: () => {},
|
|
|
- fail: () => {
|
|
|
- toast.error('复制失败,请重试')
|
|
|
- },
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -438,7 +435,7 @@ function openSocialApp(platform: string) {
|
|
|
if (shareUrl) {
|
|
|
plus.runtime.openURL(shareUrl, (error) => {
|
|
|
console.error('打开APP失败:', error)
|
|
|
- toast.info('APP未安装,请先安装对应的社交媒体应用')
|
|
|
+ toast.info(t('share.appNotInstalled'))
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -452,7 +449,7 @@ function handleShare(platform: string) {
|
|
|
|
|
|
// 检查APP是否安装
|
|
|
if (!checkAppInstalled(platform)) {
|
|
|
- toast.info('APP未安装,请先安装对应的社交媒体应用')
|
|
|
+ toast.info(t('share.appNotInstalled'))
|
|
|
return
|
|
|
}
|
|
|
|