- (2020/04/12) [+] 首页榜单进去提示登陆,页面空白:,还有这种总数操作也会就跳转到授权页面,应该是又问题的这快 - (2020/04/12) [+] 全部商品,右边有错误截图如下 - (2020/04/12) [+] 秒杀列表数据不显示;公众号15点的就有数据,但是小程序没有 - (2020/04/12) [+] 7、砍价可以改下,看下最新H5代码,首次进来不自动砍价,自己点击才砍价一次,而且里面详情是乱的 - (2020/04/12) [+] 为啥我也没退出,就取截个图,再进来,点击商品详情,又让登陆,登陆失效怎么这么快,mpvue小程序就没这个问题,这个问题非常严重,一会让让跳转到授权页面登陆!! - (2020/04/12) [+] 1、商品购买选择规格,这个开始进去点可以,点到后面花色的规格点不动了 - (2020/04/12) [+] 2、拼团客服隐藏掉,下面按钮太那个了,把商品详情那个收藏功能放进来,他们收藏功能都是一样的 - (2020/04/12) [+] 商品详情海报一直海报生成中 - (2020/04/12) [+] 砍价弹窗修改 - (2020/04/11) [+] 1、购买选择规格属性点不了 - (2020/04/11) [+] 12、拼团详情客服功能隐藏去掉,其他地方有客服功能的都去掉 - (2020/04/11) [+] 11、分类点击 会分类Tab页分类一级比一级低 - (2020/04/11) [+] 10、我的推广,里面样式有问题,点击海报里面空白 - (2020/04/11) [+] 9、小程序订单核销没上 你那边先根据路径判断隐藏下 - (2020/04/11) [+] 8、订单点击评价没反应 - (2020/04/11) [+] 6、个人中心我的余额点进去点击账单记录一直正在加载中,点击下全部就出来了,应该你没带默认参数 - (2020/04/11) [+] 5、添加地址选择地区无效 - (2020/04/11) [+] 4、待收货 列表查看物流点击没反应,详情查看物流可以点 - (2020/04/11) [+] 3、下单点击积分抵扣没反应 - (2020/04/11) [+] 2、购物车列表点击管理 点击收藏功能去掉
180 lines
4.2 KiB
Vue
180 lines
4.2 KiB
Vue
<template>
|
|
<view v-if="posterImageStatus" class="poster-first">
|
|
<div class="posterCanvasWarp">
|
|
<canvas class="posterCanvas" canvas-id="myCanvas"></canvas>
|
|
</div>
|
|
<!-- <view class="poster-pop" v-show="!canvasStatus">
|
|
<image
|
|
src="@/static/images/poster-close.png"
|
|
class="close"
|
|
@click="posterImageClose"
|
|
/>
|
|
<view class="canvas" ref="poster">
|
|
<image class="image" :src="posterData.image" alt="商品图片" />
|
|
<view class="text black">
|
|
<text v-text="posterData.title"></text>
|
|
</view>
|
|
<view class="text rad">
|
|
<text v-text="'¥' + posterData.price"></text>
|
|
</view>
|
|
<view class="code">
|
|
<view class="code-img">
|
|
<image :src="posterData.code" show-menu-by-longpress mode="widthFix" alt="二维码" />
|
|
</view>
|
|
<view class="code-text">
|
|
<text>长按识别二维码 立即购买</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="save-poster" @click="savePosterPath">生成图片</view>
|
|
</view>-->
|
|
<view class="poster-pop" v-show="canvasStatus">
|
|
<img
|
|
src="@/static/images/poster-close.png"
|
|
class="close"
|
|
@click="posterImageClose"
|
|
mode="widthFix"
|
|
/>
|
|
<image
|
|
:src="posterImage"
|
|
alt="tp"
|
|
class="poster-image"
|
|
show-menu-by-longpress
|
|
mode="widthFix"
|
|
/>
|
|
<view class="keep">长按图片可以保存到手机</view>
|
|
</view>
|
|
<view class="mask"></view>
|
|
</view>
|
|
</template>
|
|
<style scoped lang="less" lang="less">
|
|
.poster-first {
|
|
overscroll-behavior: contain;
|
|
}
|
|
.poster-pop {
|
|
width: 4.5 * 100rpx;
|
|
height: 8 * 100rpx;
|
|
position: fixed;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 99;
|
|
top: 50%;
|
|
margin-top: -4.6 * 100rpx;
|
|
}
|
|
.poster-pop .canvas {
|
|
background-color: #ffffff;
|
|
height: 8 * 100rpx;
|
|
}
|
|
.poster-pop .poster-image {
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
.poster-pop .canvas .image {
|
|
width: 4.5 * 100rpx;
|
|
height: 4.5 * 100rpx;
|
|
display: block;
|
|
}
|
|
.poster-pop .canvas .text {
|
|
text-align: center;
|
|
color: #000000;
|
|
margin-top: 0.32 * 100rpx;
|
|
}
|
|
.poster-pop .canvas .text.black {
|
|
height: 0.68 * 100rpx;
|
|
}
|
|
.poster-pop .canvas .text.rad {
|
|
color: #ff0000;
|
|
}
|
|
.poster-pop .canvas .code {
|
|
height: 1.4 * 100rpx;
|
|
display: flex;
|
|
}
|
|
.poster-pop .canvas .code .code-img {
|
|
width: 33%;
|
|
padding: 0.06 * 100rpx;
|
|
}
|
|
.poster-pop .canvas .code .code-img image {
|
|
width: 100%;
|
|
}
|
|
.poster-pop .canvas .code .code-text {
|
|
width: 60%;
|
|
font-size: 0.12 * 100rpx;
|
|
line-height: 1.64 * 100rpx;
|
|
}
|
|
.poster-pop .close {
|
|
width: 0.46 * 100rpx;
|
|
height: 0.75 * 100rpx;
|
|
position: fixed;
|
|
right: 0;
|
|
top: -0.73 * 100rpx;
|
|
display: block;
|
|
}
|
|
.poster-pop .save-poster {
|
|
background-color: #df2d0a;
|
|
font-size: 0.22 * 100rpx;
|
|
color: #fff;
|
|
text-align: center;
|
|
height: 0.76 * 100rpx;
|
|
line-height: 0.76 * 100rpx;
|
|
width: 100%;
|
|
margin-top: -0.04 * 100rpx;
|
|
}
|
|
.poster-pop .keep {
|
|
color: #fff;
|
|
text-align: center;
|
|
font-size: 0.25 * 100rpx;
|
|
margin-top: 0.1 * 100rpx;
|
|
}
|
|
.mask {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.6);
|
|
z-index: 9;
|
|
}
|
|
</style>
|
|
<script>
|
|
// import html2canvas from "html2canvas";
|
|
import { PosterCanvas } from "@/utils";
|
|
|
|
export default {
|
|
name: "StorePoster",
|
|
props: {
|
|
posterImageStatus: Boolean,
|
|
posterData: Object
|
|
},
|
|
data: function() {
|
|
return {
|
|
canvasStatus: false,
|
|
posterImage: ""
|
|
};
|
|
},
|
|
watch: {
|
|
posterImageStatus: function() {
|
|
var that = this;
|
|
if (that.posterImageStatus === true) {
|
|
that.$nextTick(function() {
|
|
that.savePosterPath();
|
|
});
|
|
}
|
|
}
|
|
},
|
|
mounted: function() {},
|
|
methods: {
|
|
posterImageClose: function() {
|
|
this.posterImageStatus = false;
|
|
this.canvasStatus = false;
|
|
this.$emit("setPosterImageStatus");
|
|
},
|
|
savePosterPath: function() {
|
|
PosterCanvas(this.posterData, posterImage => {
|
|
this.canvasStatus = true;
|
|
this.posterImage = posterImage;
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|