修改易购页面的分享 和 生成海报功能
This commit is contained in:
parent
ec51286a1e
commit
59c72ced9b
@ -333,6 +333,15 @@ image {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shadowBox1Item_btn{
|
||||
width: 150rpx;
|
||||
height: 170rpx;
|
||||
opacity:0;
|
||||
position: absolute;
|
||||
left: 100rpx;
|
||||
top: 40rpx;
|
||||
}
|
||||
|
||||
.shadowBox1Item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
@ -203,6 +203,7 @@
|
||||
<!-- 分享 -->
|
||||
<view class="shadow" @click.stop="changeShadow" v-if="boxshadow1">
|
||||
<view class="shadowBox1">
|
||||
<button class="shadowBox1Item_btn" open-type="share" bindtap="onShareButtonClick"/>
|
||||
<view class="shadowBox1Item" @click="shareFriend">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_WX.png"
|
||||
mode="aspectFill"></image>
|
||||
@ -221,15 +222,18 @@
|
||||
<view class="shadowBox_img">
|
||||
<view class="boxshadow_tit">今日商品推荐</view>
|
||||
<view class="boxshadow_img">
|
||||
<image
|
||||
<image v-if="currentGG && currentGG.commodity_pic && currentGG.commodity_pic.length > 0"
|
||||
:src="picUrl + currentGG.commodity_pic[0]">
|
||||
</image>
|
||||
<image v-else
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share_img.png">
|
||||
</image>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="shadowBoxInfo">
|
||||
<view class="shadowboxInfo_left">二维码</view>
|
||||
<image class="shadowboxInfo_left" :src="qrcodePath || 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/qrcode_placeholder.png'" mode="aspectFill"></image>
|
||||
<view class="shadowboxInfo_right">
|
||||
<view class="shadowboxInfo_right_1">正鲜生</view>
|
||||
<view class="shadowboxInfo_right_1">{{ currentGG && currentGG.goods_name ? currentGG.goods_name : '' }}</view>
|
||||
<view class="shadowboxInfo_right_2">
|
||||
长按识别小程序 <br />
|
||||
数量有限马上抢购
|
||||
@ -237,7 +241,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shadowBox_btn" @click.stop="saveImg">保存海报</view>
|
||||
<view class="shadowBox_btn" @click.stop="saveImg(picUrl + currentGG.commodity_pic[0])">保存海报</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -345,6 +349,7 @@ export default {
|
||||
changeName: "",
|
||||
changePrice: "",
|
||||
selectedGoods: null, // 保存传入的商品规格信息
|
||||
qrcodePath: null, // 存储当前页面的二维码路径
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -391,11 +396,11 @@ export default {
|
||||
this.boxshadow2 = true;
|
||||
},
|
||||
// 保存海报
|
||||
saveImg() {
|
||||
saveImg(picUrl) {
|
||||
this.boxshadow2 = false;
|
||||
// 微信小程序保存图片
|
||||
uni.downloadFile({
|
||||
url: "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share_img.png",
|
||||
url: picUrl,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user