feat: 微信分享区分环境

This commit is contained in:
黄泽群
2026-07-23 14:02:58 +08:00
committed by charles
parent 2129d7ee2b
commit 4b52120145
+13 -1
View File
@@ -13,6 +13,13 @@
<image :src="`https://static.tbmall.xin/static/new/share_${index}.png`" class="share-img"></image> <image :src="`https://static.tbmall.xin/static/new/share_${index}.png`" class="share-img"></image>
<text class="text-24 text-zu1">{{item}}</text> <text class="text-24 text-zu1">{{item}}</text>
</view> </view>
<!-- #endif -->
<!-- #ifdef APP-PLUS || H5 -->
<view class="share-box" @click="onBtn(index)" v-for="(item,index) in appBtnList" :key="index">
<image :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/share_${index}.png`" class="share-img"></image>
<text class="text-24 text-zu1">{{item}}</text>
</view>
<!-- #endif -->
</view> </view>
<view class="share-line" style="margin-top:40rpx;"></view> <view class="share-line" style="margin-top:40rpx;"></view>
<view class="qr-view" v-if="qrvalue"> <view class="qr-view" v-if="qrvalue">
@@ -49,7 +56,8 @@
components:{tkiQrcode}, components:{tkiQrcode},
data() { data() {
return { return {
btnList:['微信','朋友圈','复制链接','保存图片','QQ'], btnList:['微信','朋友圈'],
appBtnList:['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
qrvalue:'' qrvalue:''
} }
}, },
@@ -89,6 +97,10 @@
creatQrcode() { creatQrcode() {
this.$refs.qrcode._makeCode(); this.$refs.qrcode._makeCode();
}, },
onWxBtn(index){
console.log('微信分享',index);
this.$emit('share',index)
},
onBtn(index){ onBtn(index){
if(index == 2){ if(index == 2){
let tmp = `【信任桥】消费共享数字化权益 ${this.qrvalue} ${this.text}`; let tmp = `【信任桥】消费共享数字化权益 ${this.qrvalue} ${this.text}`;