feat:小程序
This commit is contained in:
@@ -394,6 +394,7 @@
|
||||
.header_ {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
|
||||
@@ -302,11 +302,18 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
margin: 0 15rpx;
|
||||
}
|
||||
|
||||
.purse_amount {
|
||||
::v-deep(.purse_amount) {
|
||||
margin-right: 15rpx;
|
||||
margin-top: 6rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.u-image__image{
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right_soild {
|
||||
@@ -369,6 +376,13 @@ export default {
|
||||
color: #999999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
::v-deep(.bottom_item_tip_title) {
|
||||
.u-image__image{
|
||||
margin-top: 8rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -229,6 +229,7 @@ export default {
|
||||
.history {
|
||||
width: 130rpx;
|
||||
height: 64rpx;
|
||||
margin-top: 100rpx;
|
||||
line-height: 64rpx;
|
||||
background: #000000;
|
||||
border-top-left-radius: 100rpx;
|
||||
@@ -246,5 +247,6 @@ export default {
|
||||
position: absolute;
|
||||
left: 40rpx;
|
||||
top: 40rpx;
|
||||
margin-top: 60rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -495,6 +495,20 @@ export default {
|
||||
timer && clearTimeout(timer);
|
||||
timer = null;
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
title: this.orderInfo.name || "商品分享",
|
||||
path: `/pages/other_package/productInfo/productInfo?id=${this.id}`,
|
||||
imageUrl: this.swiperList.length > 0 ? this.swiperList[0] : "",
|
||||
};
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
return {
|
||||
title: this.orderInfo.name || "商品分享",
|
||||
query: `id=${this.id}`,
|
||||
imageUrl: this.swiperList.length > 0 ? this.swiperList[0] : "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
assembleAddress,
|
||||
limit999(n) {
|
||||
@@ -554,45 +568,18 @@ export default {
|
||||
// 微信小程序环境分享
|
||||
onWxShare(index) {
|
||||
console.log("分享", index);
|
||||
// const shareParams = {
|
||||
// title: this.orderInfo.name || "商品分享",
|
||||
// path: `/pages/other_package/productInfo/productInfo?id=${this.id}${this.orderInfo.name}`,
|
||||
// imageUrl: this.swiperList.length > 0 ? this.swiperList[0] : "",
|
||||
// };
|
||||
// if (index == 0) {
|
||||
// uni.share({
|
||||
// provider: "weixin",
|
||||
// scene: "WXSceneSession", // 好友场景
|
||||
// title: shareParams.title,
|
||||
// path: shareParams.path,
|
||||
// imageUrl: shareParams.imageUrl,
|
||||
// success: (res) => {
|
||||
// console.log("分享好友成功", res);
|
||||
// uni.showToast({ title: "分享成功", icon: "success" });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log("分享好友失败", err);
|
||||
// uni.showToast({ title: "分享取消", icon: "none" });
|
||||
// },
|
||||
// });
|
||||
// } else {
|
||||
// // 分享到微信朋友圈
|
||||
// uni.share({
|
||||
// provider: "weixin",
|
||||
// scene: "WXSceneTimeline", // 朋友圈场景
|
||||
// title: shareParams.title,
|
||||
// path: shareParams.path,
|
||||
// imageUrl: shareParams.imageUrl,
|
||||
// success: (res) => {
|
||||
// console.log("分享朋友圈成功", res);
|
||||
// uni.showToast({ title: "分享成功", icon: "success" });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log("分享朋友圈失败", err);
|
||||
// uni.showToast({ title: "分享取消", icon: "none" });
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
if (index == 0) {
|
||||
// 微信好友,通过button open-type="share"触发,这里只需要关闭弹窗
|
||||
this.onClose();
|
||||
} else {
|
||||
// 分享到微信朋友圈
|
||||
// 小程序不支持API直接唤起朋友圈分享,提示用户点击右上角
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "请点击右上角...分享到朋友圈",
|
||||
showCancel: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
onShare(index) {
|
||||
let tmp = `【信任桥】消费共享数字化权益 ${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id} ${this.orderInfo.name}`;
|
||||
@@ -1372,7 +1359,7 @@ export default {
|
||||
|
||||
.img_comm {
|
||||
position: absolute;
|
||||
top: 140rpx;
|
||||
top: 170rpx;
|
||||
}
|
||||
|
||||
.left_warp {
|
||||
|
||||
Reference in New Issue
Block a user