[双节样式]

This commit is contained in:
2023-09-28 13:37:23 +08:00
parent 3748f042cb
commit cd49194d3a
4 changed files with 9 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
<view class="haveBack" wx:if="{{haveimg}}" catchtouchmove></view>
<view class="haveCont" wx:if="{{haveimg}}" catchtouchmove>
<image class="haveCont-img" src="https://api.siyuankunlun.com/storage/images/2023/09/26/0a0d13f2ef6abe6275cc06eed53771d8.png" mode="widthFix"></image>
<image class="haveCont-close" src="/static/icons/close.png" mode="widthFix" bindtap="haveHIde"></image>
<image class="haveCont-close" src="/static/icons/closeBig.png" mode="widthFix" bindtap="haveHIde"></image>
</view>
<view class="page-section">

View File

@@ -19,7 +19,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onLoad() {
let miniShareFun = wx.$api.user.poster({ url: 'pages/mall/index' })
let miniShareFun = wx.$api.user.poster({ url: 'pages/index/index' })
// wx.$api.user.poster({ url: 'pages/mall/index' }).then(res => {
// console.log(res.data)
// this.setData({
@@ -35,11 +35,10 @@ Page({
})
Promise.all([miniShareFun]).then(res => {
console.log(res)
let miniShareData = res[0].data
this.setData({
posters : miniShareData.posters,
qrcode : miniShareData.code,
qrcode : miniShareData.qrcode,
invite : miniShareData.invite,
current : 0
})
@@ -133,8 +132,12 @@ Page({
// 绘制图片二维码
code.src = qrcodeSrc
code.onload = () => {
ctx.arc( posterX + qrcodeSize/2, posterY + qrcodeSize/2, qrcodeSize/2 + 5, 0, 2 * Math.PI );
ctx.fillStyle = "#ffffff";
ctx.fill();
ctx.drawImage(code, posterX, posterY, qrcodeSize, qrcodeSize)
// 保存海报
wx.canvasToTempFilePath({
canvas : canvas,

View File

@@ -4,13 +4,13 @@
/* 海报预览 */
.poster{ width: 550rpx; height: 900rpx; background: white; box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, .05); border-radius: 20rpx; overflow: hidden; }
.poster-item{ width: 550rpx; height: 900rpx; background-position: center; background-size: cover; position: relative; }
.poster-qrocde{ position: absolute; background-color: white; padding: 10rpx;}
.poster-qrocde{ position: absolute; background-color: white; padding: 10rpx; border-radius: 50%; }
/* 分享功能 */
.tool{ display: flex; align-items: center; justify-content: space-around; width: 70vw; margin-top: 80rpx; }
.tool-item{ text-align: center; }
.tool-item[size="mini"]{ padding: 0; margin: 0; background-color: transparent; }
.tool-icon{ background: #f7f8f9; width: 88rpx; height: 88rpx; border-radius: 50%; vertical-align: top; }
.tool-icon{ background: #f7f8f9; width: 88rpx; height: 88rpx; border-radius: 50%; vertical-align: top;}
.tool-text{ color: gray; font-size: 30rpx; line-height: 40rpx; margin-top: 10rpx; font-weight: normal;}
/* canvas */