[双节样式]
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/* 海报预览 */
|
||||
.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; }
|
||||
|
||||
BIN
static/icons/closeBig.png
Normal file
BIN
static/icons/closeBig.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user