feat:分享链接的问题

This commit is contained in:
2026-08-31 16:14:31 +08:00
parent 364b2b32f2
commit e9f07e8ede
5 changed files with 132 additions and 17 deletions
+18
View File
@@ -4,8 +4,12 @@
:round="24"
:closeOnClickOverlay="false"
mode="center"
@close="onClose"
>
<view class="home-popup-view" v-if="dataObj">
<view class="close-box" @click.stop="onClose">
<up-icon name="close" size="18" color="#999999"></up-icon>
</view>
<view class="home-popup-head">
<image src="https://static.tbmall.xin/static/new/logo.png" class="logo-img"></image>
<text class="text-28 text-zu" style="margin-left:14rpx">信任桥</text>
@@ -46,6 +50,9 @@
methods: {
onOk(){
this.$emit('jumpShop');
},
onClose(){
this.$emit('close');
}
}
}
@@ -63,6 +70,17 @@
position: relative;
padding: 32rpx;
box-sizing: border-box;
.close-box {
position: absolute;
top: 24rpx;
right: 24rpx;
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}
.home-popup-mid{
width:100%;
height:540rpx;
+1 -1
View File
@@ -215,7 +215,7 @@
</view>
</view>
</up-overlay>
<HomePopup :show="homeShow" :dataObj="curData" @jumpShop="onJumpShop"></HomePopup>
<HomePopup :show="homeShow" :dataObj="curData" @jumpShop="onJumpShop" @close="homeShow = false"></HomePopup>
<qiaobao-assistant page-key="pages/home/home" title="商城首页" />
</view>
</template>
+80 -11
View File
@@ -7,14 +7,16 @@
<view class="share-btn-view">
<!-- #ifndef APP-PLUS || H5 -->
<block v-for="(item, index) in filteredBtnList" :key="index">
<button v-if="item.originalIndex === 0" open-type="share" hover-class="none" class="share-box share-btn-clean"
@click="onBtn(item.originalIndex)">
<image :src="`https://static.tbmall.xin/static/new/share_${item.originalIndex}.png`" class="share-img">
<button v-if="item.originalIndex === 0" open-type="share" hover-class="none"
class="share-box share-btn-clean" @click="onBtn(item.originalIndex)">
<image :src="`https://static.tbmall.xin/static/new/share_${item.originalIndex}.png`"
class="share-img">
</image>
<text class="text-24 text-gray">{{ item.name }}</text>
</button>
<view v-else class="share-box" @click="onBtn(item.originalIndex)">
<image :src="`https://static.tbmall.xin/static/new/share_${item.originalIndex}.png`" class="share-img">
<image :src="`https://static.tbmall.xin/static/new/share_${item.originalIndex}.png`"
class="share-img">
</image>
<text class="text-24 text-gray">{{ item.name }}</text>
</view>
@@ -22,8 +24,10 @@
<!-- #endif -->
<!-- #ifdef APP-PLUS || H5 -->
<view class="share-box" @click="onShare(item.originalIndex)" v-for="(item, index) in filteredAppBtnList" :key="index">
<image :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/share_${item.originalIndex}.png`"
<view class="share-box" @click="onShare(item.originalIndex)" v-for="(item, index) in filteredAppBtnList"
:key="index">
<image
:src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/share_${item.originalIndex}.png`"
class="share-img"></image>
<text class="text-24 text-gray">{{ item.name }}</text>
</view>
@@ -31,6 +35,9 @@
</view>
<view class="share-line" style="margin-top:40rpx;"></view>
<view class="qr-view" v-if="qrvalue">
<tki-qrcode ref="qrcode" :val="qrvalue" :size="252" />
</view>
<view class="share-line" style="min-height:16rpx;height:16rpx">
</view>
@@ -38,12 +45,11 @@
<text class="text-32 text-fu1">取消</text>
</view>
<view class="share-top-image-view">
<image :src="tu" class="tu-img"></image>
<view class="image-view-bottom">
<view class="image-view-bottom-left" :style="{ borderRight: price ? '2rpx solid #EBEBEB' : 'none', flex: price ? 'none' : '1' }">
<view class="image-view-bottom-left"
:style="{ borderRight: price ? '2rpx solid #EBEBEB' : 'none', flex: price ? 'none' : '1' }">
<text class="text-24 text-gray text-overflow1">{{ text }}</text>
</view>
<view class="image-view-bottom-right" v-if="price">
@@ -57,15 +63,19 @@
<script>
import Func from '/utils/func'
import tkiQrcode from './tki-qrcode/tki-qrcode.vue'
import { SHARE_URL } from '@/utils/config.js'
export default {
data() {
return {
btnList: ['微信', '朋友圈'],
appBtnList: ['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
qrvalue: ''
}
},
components: { tkiQrcode },
props: {
show: {
type: Boolean,
@@ -92,6 +102,20 @@ export default {
default: false
}
},
mounted() {
// #ifdef APP-PLUS || H5
if (!this.isInvitePage) {
this.qrvalue = `${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id}`
this.$nextTick(() => {
if (this.qrvalue) {
this.creatQrcode();
}
})
}
// #endif
},
computed: {
isInvitePage() {
@@ -123,12 +147,57 @@ export default {
methods: {
creatQrcode() {
this.$refs.qrcode._makeCode();
},
onBtn(index) {
if (index == 2) {
let tmp = `【信任桥】消费共享数字化权益 ${this.qrvalue} ${this.text}`;
// #ifdef APP-PLUS
console.log("--11---", tmp)
uni.setClipboardData({
data: tmp,
success: function (res) {
uni.getClipboardData({
success: function (res) {
Func.myToast('复制成功')
}
})
}
})
// #endif
// #ifdef H5
this.$copyText(tmp).then(res => {
console.log('resresresres', res)
Func.myToast('复制成功')
})
// #endif
}
console.log('微信分享', index);
this.$emit('wxShare', index)
},
onShare(index) {
if (index == 2) {
let tmp = `【信任桥】消费共享数字化权益 ${this.qrvalue} ${this.text}`;
// #ifdef APP-PLUS
uni.setClipboardData({
data: tmp,
success: function (res) {
uni.getClipboardData({
success: function (res) {
Func.myToast('复制成功')
}
})
}
})
// #endif
// #ifdef H5
this.$copyText(tmp).then(res => {
console.log('resresresres', res)
Func.myToast('复制成功')
})
// #endif
}
this.$emit('share', index)
},
@@ -199,7 +268,7 @@ export default {
.share-popup-view {
width: 100%;
height: 400rpx;
// height: 400rpx;
display: flex;
flex-direction: column;
align-items: center;
@@ -64,9 +64,10 @@
</view>
<view class="content_data_series">
<!-- 暂时隐藏 -->
<view class="content_data_series_tag" v-if="orderInfo.contribution">
<view class="content_data_series_tag" v-if="orderInfo.contribution" @click="onContributionTip">
<image class="uni-image" src="https://static.tbmall.xin/static/mine-purse/vcoin.png"></image>
下单送{{ orderInfo.contribution }}贡献值
下单预计获得{{ orderInfo.contribution }}贡献值
<image src="/pages/rwa_package/static/tips.png" class="uni-image" style="margin-left: 5rpx;"></image>
</view>
<!-- 销量还需要改 -->
<view class="sales_count">全网销量{{ limit999(orderInfo.sales) }}件</view>
@@ -613,6 +614,14 @@ export default {
},
methods: {
assembleAddress,
onContributionTip() {
uni.showModal({
title: '提示',
content: '页面展示的贡献值为预估值。实际赠送的贡献值将根据订单实付金额及商品贡献系数综合计算,其中商品贡献系数由商品毛利等因素确定。使用优惠券、发生退款或售后时,贡献值可能相应调整,最终以订单完成后的实际到账为准。',
showCancel: false,
confirmText: '我知道了'
});
},
limit999(n) {
const num = Number(n);
if (isNaN(num) || num < 10000) {
+22 -3
View File
@@ -41,9 +41,7 @@
@click="jumpInfo(pItem)"></up-image>
<view class="content_info">
<view class="shopping_content_info_title" @click="jumpInfo(pItem)">{{ pItem.name }}</view>
<view class="content_info_description">
{{ pItem.goodsSpece }}
</view>
<view class="content_info_description">{{ pItem.goodsSpece }}</view>
<view class="shopping_info_amount">
<view>
<view style="color: #7934f6">
@@ -530,6 +528,27 @@ export default {
color: #272727;
}
.content_info_description {
font-size: 24rpx;
color: #999999;
margin-top: 6rpx;
overflow: hidden;
text-overflow: ellipsis;
/* #ifndef APP-NVUE */
display: -webkit-box;
/* autoprefixer: off */
-webkit-box-orient: vertical;
/* autoprefixer: on */
-webkit-line-clamp: 2;
line-clamp: 2;
box-orient: vertical;
/* #endif */
/* #ifdef APP-NVUE */
lines: 2;
/* #endif */
word-break: break-all;
}
.shopping_info_amount {
display: flex;
justify-content: space-between;