|
|
|
@ -75,53 +75,35 @@ |
|
|
|
</view> |
|
|
|
<view class="flex-col section_4" v-show="visible"> |
|
|
|
<image src="/static/imgs/mall/close-icon.png" class="image_9" @click="closeShare" /> |
|
|
|
<!-- <view class="flex-col section_5"> |
|
|
|
<view class="flex-col section_6"> |
|
|
|
<view class="flex-col items-center group_13"> |
|
|
|
<image src="/static/imgs/mall/border-bg.png" class="image_10" /> |
|
|
|
<image :src="shareInfo.storeCodeImg" class="image_11" /> |
|
|
|
</view> |
|
|
|
<view class="flex-col items-center group_14"> |
|
|
|
<text class="text_15">{{ shareInfo.storeName }}</text> |
|
|
|
<text class="text_16">每天上新特价纸,库存有限先到先得</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<image style="width: 560rpx; height: 710rpx" :src="shareInfo.storeCodeImg"></image> |
|
|
|
<view class="bottom-group flex-row view_3"> |
|
|
|
<text>下载海报</text> |
|
|
|
<text class="text_18">下载二维码</text> |
|
|
|
<text class="text_19">分享</text> |
|
|
|
<view class="bottom-group flex-row justify-center view_3"> |
|
|
|
<text @click="downPoster">下载海报</text> |
|
|
|
<text @click="showShareArea" class="text_19">分享</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="share-area" v-if="visible" @click="closeShare"> |
|
|
|
<view class="share-content"> |
|
|
|
<image class="bg" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-bg.png"></image> |
|
|
|
<view class="flex-col-center-start code"> |
|
|
|
<view class="border flex-row-center-center"> |
|
|
|
<image style="width: 480rpx; height: 480rpx" :src="shareInfo.storeCodeImg"></image> |
|
|
|
</view> |
|
|
|
<view class="down-button flex-row-center-center" @click.stop="makeScreenShot"> |
|
|
|
<text class="text">下载二维码</text> |
|
|
|
</view> |
|
|
|
<text style="font-size: 46rpx; color: #333333">{{ shareInfo.storeName }}</text> |
|
|
|
<text style="font-size: 32rpx; color: #888888; margin-top: 14rpx">每天上新特价纸,库存有限先到先得</text> |
|
|
|
<view class="flex-col section_8" v-if="shareAreaVisible"> |
|
|
|
<view class="flex-row group_20"> |
|
|
|
<view class="flex-col items-center" @click="sharePoster('WXSceneSession')"> |
|
|
|
<image src="/static/imgs/general/wx-icon.png" class="image_13" /> |
|
|
|
<text class="text_33">微信</text> |
|
|
|
</view> |
|
|
|
<view class="flex-col group_22" @click="sharePoster('WXSceneTimeline')"> |
|
|
|
<image src="/static/imgs/general/wx-circle-icon.png" class="image_13 image_15" /> |
|
|
|
<text class="text_34">朋友圈</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<!-- <view v-if="visible" @click="closeShare"> |
|
|
|
<web-view :webview-styles="webviewStyles" src="/hybrid/html/share.html"></web-view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import notLogged from '@/components/not-logged/not-logged.vue' |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import { back, go2, loginGo2, saveImage } from '@/utils/hook.js' |
|
|
|
import { back, go2, loginGo2, saveImage, saveBase64ToTempFile } from '@/utils/hook.js' |
|
|
|
import { SupplierList, productStatus, storeDetail, getSupplierQrCode } from '@/apis/add-paper.js' |
|
|
|
import { getTimer } from '@/utils/index.js' |
|
|
|
import noData from './no-data.vue' |
|
|
|
import { H5_URL_STORE } from '@/enums/index.js' |
|
|
|
export default { |
|
|
|
components: { uGap, noData, notLogged }, |
|
|
|
filters: { |
|
|
|
@ -131,31 +113,31 @@ export default { |
|
|
|
abs = getTimer(value) |
|
|
|
} |
|
|
|
return abs |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
shareInfo: { |
|
|
|
storeCodeImg: '', |
|
|
|
storeName: '' |
|
|
|
storeName: '', |
|
|
|
}, |
|
|
|
visible: false, // 分享弹窗 |
|
|
|
canvasReady: false, |
|
|
|
shareAreaVisible: false, // 底部弹窗 |
|
|
|
storeInformation: { |
|
|
|
supplierId: null, |
|
|
|
name: null, |
|
|
|
productNumber: 0, |
|
|
|
currentProductNumber: 0 |
|
|
|
currentProductNumber: 0, |
|
|
|
}, |
|
|
|
option: { |
|
|
|
size: 10, |
|
|
|
auto: true, |
|
|
|
emptyText: '暂无数据~', |
|
|
|
disabled: false |
|
|
|
disabled: false, |
|
|
|
}, |
|
|
|
pattern: { |
|
|
|
backgroundColor: '#007AFF', |
|
|
|
buttonColor: '#007AFF' |
|
|
|
buttonColor: '#007AFF', |
|
|
|
}, |
|
|
|
content: [], |
|
|
|
horizontal: 'right', |
|
|
|
@ -166,12 +148,12 @@ export default { |
|
|
|
pageSize: 10, |
|
|
|
storeId: null, |
|
|
|
name: null, |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
}, |
|
|
|
listData: [], |
|
|
|
logo: '/static/imgs/mine/user-avatar.png', |
|
|
|
backgroundStyle: 'background: url("/static/imgs/mall/top-bg.png") no-repeat;', |
|
|
|
storeInfo: '' |
|
|
|
storeInfo: '', |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -180,12 +162,12 @@ export default { |
|
|
|
}, |
|
|
|
hasLogin() { |
|
|
|
return this.$store.state.qnToken != '' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if (this.hasCompany) { |
|
|
|
this.storeInformation = { |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
} |
|
|
|
this.downCallback() |
|
|
|
this.getSupplier(this.$store.state.supplierInfo.supplierId) |
|
|
|
@ -267,7 +249,7 @@ export default { |
|
|
|
// 按钮点击事件 |
|
|
|
nativeTo() { |
|
|
|
var params = { |
|
|
|
title: '添加纸品' |
|
|
|
title: '添加纸品', |
|
|
|
} |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
@ -275,7 +257,7 @@ export default { |
|
|
|
editPaper(item) { |
|
|
|
var params = { |
|
|
|
...item, |
|
|
|
title: '编辑纸品' |
|
|
|
title: '编辑纸品', |
|
|
|
} |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
@ -291,13 +273,13 @@ export default { |
|
|
|
productStatusChange(item) { |
|
|
|
var params = { |
|
|
|
id: item.id, |
|
|
|
status: item.status === 30111 ? 30112 : 30111 |
|
|
|
status: item.status === 30111 ? 30112 : 30111, |
|
|
|
} |
|
|
|
productStatus(params).then((res) => { |
|
|
|
if (res) { |
|
|
|
uni.showToast({ |
|
|
|
title: '状态修改成功', |
|
|
|
icon: 'success' |
|
|
|
icon: 'success', |
|
|
|
}) |
|
|
|
setTimeout(() => { |
|
|
|
this.orderPagination.pageNum = 1 |
|
|
|
@ -313,26 +295,49 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
getSupplierQrCode({ |
|
|
|
mallSupplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
mallSupplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
}).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.visible = true |
|
|
|
this.shareInfo.storeCodeImg = `data:image/png;base64,${res}` |
|
|
|
this.shareInfo.storeName = this.storeInformation.name |
|
|
|
saveImage(this.shareInfo.storeCodeImg) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '请先完善企业信息', |
|
|
|
icon: 'none' |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
closeShare() { |
|
|
|
this.visible = false |
|
|
|
} |
|
|
|
} |
|
|
|
this.shareAreaVisible = false |
|
|
|
}, |
|
|
|
downPoster() { |
|
|
|
saveImage(this.shareInfo.storeCodeImg) |
|
|
|
}, |
|
|
|
sharePoster(scene) { |
|
|
|
uni.share({ |
|
|
|
provider: 'weixin', |
|
|
|
type: 0, |
|
|
|
title: this.shareInfo.storeName, |
|
|
|
summary: '点击进入我的商城\n限时特价等你来抢!', |
|
|
|
scene: scene, // WXSceneTimeline,WXSceneSession |
|
|
|
imageUrl: 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/wx-share-store.png', |
|
|
|
href: H5_URL_STORE + `id=${this.$store.state.supplierInfo.supplierId}`, |
|
|
|
success: () => { |
|
|
|
console.log('分享成功') |
|
|
|
}, |
|
|
|
fail: (err) => { |
|
|
|
console.log('err', err) |
|
|
|
}, |
|
|
|
}) |
|
|
|
}, |
|
|
|
showShareArea() { |
|
|
|
this.shareAreaVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
@ -509,58 +514,6 @@ export default { |
|
|
|
height: 100rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.share-area { |
|
|
|
width: 750rpx; |
|
|
|
height: 100vh; |
|
|
|
background: #888888; |
|
|
|
position: fixed; |
|
|
|
z-index: 998; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
.share-content { |
|
|
|
width: 750rpx; |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
padding: 64rpx 34rpx 70rpx; |
|
|
|
position: relative; |
|
|
|
.bg { |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
width: 750rpx; |
|
|
|
height: 944rpx; |
|
|
|
} |
|
|
|
.code { |
|
|
|
position: relative; |
|
|
|
z-index: 10; |
|
|
|
background-color: #fff; |
|
|
|
width: 680rpx; |
|
|
|
border-radius: 20rpx; |
|
|
|
box-shadow: 0px 3rpx 13rpx 0px rgba(0, 0, 0, 0.1); |
|
|
|
padding: 40rpx 70rpx 64rpx; |
|
|
|
.border { |
|
|
|
width: 540rpx; |
|
|
|
height: 540rpx; |
|
|
|
background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') no-repeat center/cover; |
|
|
|
} |
|
|
|
} |
|
|
|
.down-button { |
|
|
|
width: 540rpx; |
|
|
|
height: 90rpx; |
|
|
|
margin: 40rpx 0 76rpx; |
|
|
|
background-image: linear-gradient(180deg, #6092ec 0%, #225dd4 100%); |
|
|
|
border-radius: 45rpx; |
|
|
|
.text { |
|
|
|
font-size: 48rpx; |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.section_4 { |
|
|
|
z-index: 100; |
|
|
|
padding: 252rpx 36rpx 403rpx 95rpx; |
|
|
|
@ -628,11 +581,9 @@ export default { |
|
|
|
} |
|
|
|
.bottom-group { |
|
|
|
padding: 0 32rpx; |
|
|
|
.text_18 { |
|
|
|
margin-left: 83rpx; |
|
|
|
} |
|
|
|
.text_19 { |
|
|
|
margin-left: 83rpx; |
|
|
|
margin-right: 62rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.view_3 { |
|
|
|
@ -644,9 +595,39 @@ export default { |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
} |
|
|
|
#posters { |
|
|
|
margin-top: 15px; |
|
|
|
padding: 60rpx 0; |
|
|
|
border-radius: 20rpx; |
|
|
|
.section_8 { |
|
|
|
position: fixed; |
|
|
|
z-index: 999; |
|
|
|
bottom: 0; |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
margin-top: 213rpx; |
|
|
|
padding: 32rpx 0 52rpx; |
|
|
|
color: rgb(0, 0, 0); |
|
|
|
font-size: 24rpx; |
|
|
|
line-height: 33rpx; |
|
|
|
white-space: nowrap; |
|
|
|
background-color: rgb(255, 255, 255); |
|
|
|
border-radius: 20rpx 20rpx 0px 0px; |
|
|
|
.group_20 { |
|
|
|
margin: 0 32rpx; |
|
|
|
.group_22 { |
|
|
|
margin-left: 36rpx; |
|
|
|
flex: 1 1 auto; |
|
|
|
.image_15 { |
|
|
|
margin-left: 4rpx; |
|
|
|
} |
|
|
|
.text_34 { |
|
|
|
margin-top: 10rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.text_33 { |
|
|
|
margin-top: 10rpx; |
|
|
|
} |
|
|
|
.image_13 { |
|
|
|
width: 64rpx; |
|
|
|
height: 64rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |