feat:小程序
This commit is contained in:
@@ -394,6 +394,7 @@
|
|||||||
.header_ {
|
.header_ {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: left;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -302,11 +302,18 @@ export default {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
margin: 0 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.purse_amount {
|
::v-deep(.purse_amount) {
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.u-image__image{
|
||||||
|
margin-top: 5rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right_soild {
|
.right_soild {
|
||||||
@@ -369,6 +376,13 @@ export default {
|
|||||||
color: #999999;
|
color: #999999;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
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>
|
<text class="text-24 text-zu1">{{item}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #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">
|
|
||||||
<tki-qrcode ref="qrcode" :val="qrvalue" :size="252" />
|
|
||||||
</view>
|
|
||||||
<view class="share-line" style="min-height:16rpx;height:16rpx">
|
<view class="share-line" style="min-height:16rpx;height:16rpx">
|
||||||
</view>
|
</view>
|
||||||
<view class="share-bottom" @click="onClose">
|
<view class="share-bottom" @click="onClose">
|
||||||
@@ -50,15 +49,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Func from '/utils/func'
|
import Func from '/utils/func'
|
||||||
import tkiQrcode from './tki-qrcode/tki-qrcode.vue'
|
|
||||||
import {SHARE_URL} from '@/utils/config.js'
|
import {SHARE_URL} from '@/utils/config.js'
|
||||||
export default {
|
export default {
|
||||||
components:{tkiQrcode},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
btnList:['微信','朋友圈'],
|
btnList:['微信','朋友圈'],
|
||||||
appBtnList:['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
|
appBtnList:['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
|
||||||
qrvalue:''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
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: {
|
methods: {
|
||||||
creatQrcode() {
|
|
||||||
this.$refs.qrcode._makeCode();
|
|
||||||
},
|
|
||||||
onWxBtn(index){
|
onWxBtn(index){
|
||||||
console.log('微信分享',index);
|
console.log('微信分享',index);
|
||||||
this.$emit('wxShare',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(){
|
onClose(){
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
},
|
},
|
||||||
@@ -188,8 +151,7 @@
|
|||||||
}
|
}
|
||||||
.share-popup-view{
|
.share-popup-view{
|
||||||
width:100%;
|
width:100%;
|
||||||
height:796rpx;
|
height:400rpx;
|
||||||
min-height:796rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ export default {
|
|||||||
.history {
|
.history {
|
||||||
width: 130rpx;
|
width: 130rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
|
margin-top: 100rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
background: #000000;
|
background: #000000;
|
||||||
border-top-left-radius: 100rpx;
|
border-top-left-radius: 100rpx;
|
||||||
@@ -246,5 +247,6 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 40rpx;
|
left: 40rpx;
|
||||||
top: 40rpx;
|
top: 40rpx;
|
||||||
|
margin-top: 60rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -495,6 +495,20 @@ export default {
|
|||||||
timer && clearTimeout(timer);
|
timer && clearTimeout(timer);
|
||||||
timer = null;
|
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: {
|
methods: {
|
||||||
assembleAddress,
|
assembleAddress,
|
||||||
limit999(n) {
|
limit999(n) {
|
||||||
@@ -554,45 +568,18 @@ export default {
|
|||||||
// 微信小程序环境分享
|
// 微信小程序环境分享
|
||||||
onWxShare(index) {
|
onWxShare(index) {
|
||||||
console.log("分享", index);
|
console.log("分享", index);
|
||||||
// const shareParams = {
|
if (index == 0) {
|
||||||
// title: this.orderInfo.name || "商品分享",
|
// 微信好友,通过button open-type="share"触发,这里只需要关闭弹窗
|
||||||
// path: `/pages/other_package/productInfo/productInfo?id=${this.id}${this.orderInfo.name}`,
|
this.onClose();
|
||||||
// imageUrl: this.swiperList.length > 0 ? this.swiperList[0] : "",
|
} else {
|
||||||
// };
|
// 分享到微信朋友圈
|
||||||
// if (index == 0) {
|
// 小程序不支持API直接唤起朋友圈分享,提示用户点击右上角
|
||||||
// uni.share({
|
uni.showModal({
|
||||||
// provider: "weixin",
|
title: "提示",
|
||||||
// scene: "WXSceneSession", // 好友场景
|
content: "请点击右上角...分享到朋友圈",
|
||||||
// title: shareParams.title,
|
showCancel: false,
|
||||||
// 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" });
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
onShare(index) {
|
onShare(index) {
|
||||||
let tmp = `【信任桥】消费共享数字化权益 ${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id} ${this.orderInfo.name}`;
|
let tmp = `【信任桥】消费共享数字化权益 ${SHARE_URL}/#/pages/other_package/productInfo/productInfo?id=${this.id} ${this.orderInfo.name}`;
|
||||||
@@ -1372,7 +1359,7 @@ export default {
|
|||||||
|
|
||||||
.img_comm {
|
.img_comm {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 140rpx;
|
top: 170rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left_warp {
|
.left_warp {
|
||||||
|
|||||||
Reference in New Issue
Block a user