feat:小程序

This commit is contained in:
2026-07-23 14:02:58 +08:00
committed by charles
parent 0d2c0d2bde
commit 21225998e5
5 changed files with 52 additions and 86 deletions
+7 -45
View File
@@ -20,11 +20,10 @@
<text class="text-24 text-zu1">{{item}}</text>
</view>
<!-- #endif -->
</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>
<view class="share-bottom" @click="onClose">
@@ -50,15 +49,13 @@
<script>
import Func from '/utils/func'
import tkiQrcode from './tki-qrcode/tki-qrcode.vue'
import {SHARE_URL} from '@/utils/config.js'
export default {
components:{tkiQrcode},
data() {
return {
btnList:['微信','朋友圈'],
appBtnList:['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
qrvalue:''
}
},
props:{
@@ -84,48 +81,14 @@
}
},
mounted(){
this.qrvalue = `${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id}`
this.$nextTick(()=>{
if(this.qrvalue){
this.creatQrcode();
}
})
},
methods: {
creatQrcode() {
this.$refs.qrcode._makeCode();
},
onWxBtn(index){
console.log('微信分享',index);
this.$emit('wxShare',index)
},
onBtn(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)
},
onClose(){
this.$emit('close');
},
@@ -188,8 +151,7 @@
}
.share-popup-view{
width:100%;
height:796rpx;
min-height:796rpx;
height:400rpx;
display: flex;
flex-direction: column;
align-items: center;