feat:分享链接的问题
This commit is contained in:
@@ -4,8 +4,12 @@
|
|||||||
:round="24"
|
:round="24"
|
||||||
:closeOnClickOverlay="false"
|
:closeOnClickOverlay="false"
|
||||||
mode="center"
|
mode="center"
|
||||||
|
@close="onClose"
|
||||||
>
|
>
|
||||||
<view class="home-popup-view" v-if="dataObj">
|
<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">
|
<view class="home-popup-head">
|
||||||
<image src="https://static.tbmall.xin/static/new/logo.png" class="logo-img"></image>
|
<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>
|
<text class="text-28 text-zu" style="margin-left:14rpx">信任桥</text>
|
||||||
@@ -46,6 +50,9 @@
|
|||||||
methods: {
|
methods: {
|
||||||
onOk(){
|
onOk(){
|
||||||
this.$emit('jumpShop');
|
this.$emit('jumpShop');
|
||||||
|
},
|
||||||
|
onClose(){
|
||||||
|
this.$emit('close');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,6 +70,17 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
box-sizing: border-box;
|
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{
|
.home-popup-mid{
|
||||||
width:100%;
|
width:100%;
|
||||||
height:540rpx;
|
height:540rpx;
|
||||||
|
|||||||
+1
-1
@@ -215,7 +215,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-overlay>
|
</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="商城首页" />
|
<qiaobao-assistant page-key="pages/home/home" title="商城首页" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,14 +7,16 @@
|
|||||||
<view class="share-btn-view">
|
<view class="share-btn-view">
|
||||||
<!-- #ifndef APP-PLUS || H5 -->
|
<!-- #ifndef APP-PLUS || H5 -->
|
||||||
<block v-for="(item, index) in filteredBtnList" :key="index">
|
<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"
|
<button v-if="item.originalIndex === 0" open-type="share" hover-class="none"
|
||||||
@click="onBtn(item.originalIndex)">
|
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 :src="`https://static.tbmall.xin/static/new/share_${item.originalIndex}.png`"
|
||||||
|
class="share-img">
|
||||||
</image>
|
</image>
|
||||||
<text class="text-24 text-gray">{{ item.name }}</text>
|
<text class="text-24 text-gray">{{ item.name }}</text>
|
||||||
</button>
|
</button>
|
||||||
<view v-else class="share-box" @click="onBtn(item.originalIndex)">
|
<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>
|
</image>
|
||||||
<text class="text-24 text-gray">{{ item.name }}</text>
|
<text class="text-24 text-gray">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -22,8 +24,10 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<!-- #ifdef APP-PLUS || H5 -->
|
<!-- #ifdef APP-PLUS || H5 -->
|
||||||
<view class="share-box" @click="onShare(item.originalIndex)" v-for="(item, index) in filteredAppBtnList" :key="index">
|
<view class="share-box" @click="onShare(item.originalIndex)" v-for="(item, index) in filteredAppBtnList"
|
||||||
<image :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/share_${item.originalIndex}.png`"
|
:key="index">
|
||||||
|
<image
|
||||||
|
:src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/new/share_${item.originalIndex}.png`"
|
||||||
class="share-img"></image>
|
class="share-img"></image>
|
||||||
<text class="text-24 text-gray">{{ item.name }}</text>
|
<text class="text-24 text-gray">{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -31,6 +35,9 @@
|
|||||||
|
|
||||||
</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>
|
||||||
@@ -38,12 +45,11 @@
|
|||||||
<text class="text-32 text-fu1">取消</text>
|
<text class="text-32 text-fu1">取消</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="share-top-image-view">
|
<view class="share-top-image-view">
|
||||||
<image :src="tu" class="tu-img"></image>
|
<image :src="tu" class="tu-img"></image>
|
||||||
<view class="image-view-bottom">
|
<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>
|
<text class="text-24 text-gray text-overflow1">{{ text }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="image-view-bottom-right" v-if="price">
|
<view class="image-view-bottom-right" v-if="price">
|
||||||
@@ -57,15 +63,19 @@
|
|||||||
|
|
||||||
<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 {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
btnList: ['微信', '朋友圈'],
|
btnList: ['微信', '朋友圈'],
|
||||||
appBtnList: ['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
|
appBtnList: ['微信', '朋友圈', '复制链接', '保存图片', 'QQ'],
|
||||||
|
qrvalue: ''
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
components: { tkiQrcode },
|
||||||
props: {
|
props: {
|
||||||
show: {
|
show: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -92,6 +102,20 @@ export default {
|
|||||||
default: false
|
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: {
|
computed: {
|
||||||
isInvitePage() {
|
isInvitePage() {
|
||||||
@@ -123,12 +147,57 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
creatQrcode() {
|
||||||
|
this.$refs.qrcode._makeCode();
|
||||||
|
},
|
||||||
onBtn(index) {
|
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);
|
console.log('微信分享', index);
|
||||||
this.$emit('wxShare', index)
|
this.$emit('wxShare', index)
|
||||||
},
|
},
|
||||||
onShare(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)
|
this.$emit('share', index)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -199,7 +268,7 @@ export default {
|
|||||||
|
|
||||||
.share-popup-view {
|
.share-popup-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 400rpx;
|
// height: 400rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -64,9 +64,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="content_data_series">
|
<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>
|
<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>
|
||||||
<!-- 销量还需要改 -->
|
<!-- 销量还需要改 -->
|
||||||
<view class="sales_count">全网销量{{ limit999(orderInfo.sales) }}件</view>
|
<view class="sales_count">全网销量{{ limit999(orderInfo.sales) }}件</view>
|
||||||
@@ -613,6 +614,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
assembleAddress,
|
assembleAddress,
|
||||||
|
onContributionTip() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '页面展示的贡献值为预估值。实际赠送的贡献值将根据订单实付金额及商品贡献系数综合计算,其中商品贡献系数由商品毛利等因素确定。使用优惠券、发生退款或售后时,贡献值可能相应调整,最终以订单完成后的实际到账为准。',
|
||||||
|
showCancel: false,
|
||||||
|
confirmText: '我知道了'
|
||||||
|
});
|
||||||
|
},
|
||||||
limit999(n) {
|
limit999(n) {
|
||||||
const num = Number(n);
|
const num = Number(n);
|
||||||
if (isNaN(num) || num < 10000) {
|
if (isNaN(num) || num < 10000) {
|
||||||
|
|||||||
@@ -41,9 +41,7 @@
|
|||||||
@click="jumpInfo(pItem)"></up-image>
|
@click="jumpInfo(pItem)"></up-image>
|
||||||
<view class="content_info">
|
<view class="content_info">
|
||||||
<view class="shopping_content_info_title" @click="jumpInfo(pItem)">{{ pItem.name }}</view>
|
<view class="shopping_content_info_title" @click="jumpInfo(pItem)">{{ pItem.name }}</view>
|
||||||
<view class="content_info_description">
|
<view class="content_info_description">{{ pItem.goodsSpece }}</view>
|
||||||
{{ pItem.goodsSpece }}
|
|
||||||
</view>
|
|
||||||
<view class="shopping_info_amount">
|
<view class="shopping_info_amount">
|
||||||
<view>
|
<view>
|
||||||
<view style="color: #7934f6">
|
<view style="color: #7934f6">
|
||||||
@@ -530,6 +528,27 @@ export default {
|
|||||||
color: #272727;
|
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 {
|
.shopping_info_amount {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
Reference in New Issue
Block a user