[双节样式]
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<view class="haveBack" wx:if="{{haveimg}}" catchtouchmove></view>
|
<view class="haveBack" wx:if="{{haveimg}}" catchtouchmove></view>
|
||||||
<view class="haveCont" wx:if="{{haveimg}}" catchtouchmove>
|
<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-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>
|
||||||
|
|
||||||
<view class="page-section">
|
<view class="page-section">
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onLoad() {
|
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 => {
|
// wx.$api.user.poster({ url: 'pages/mall/index' }).then(res => {
|
||||||
// console.log(res.data)
|
// console.log(res.data)
|
||||||
// this.setData({
|
// this.setData({
|
||||||
@@ -35,11 +35,10 @@ Page({
|
|||||||
})
|
})
|
||||||
|
|
||||||
Promise.all([miniShareFun]).then(res => {
|
Promise.all([miniShareFun]).then(res => {
|
||||||
console.log(res)
|
|
||||||
let miniShareData = res[0].data
|
let miniShareData = res[0].data
|
||||||
this.setData({
|
this.setData({
|
||||||
posters : miniShareData.posters,
|
posters : miniShareData.posters,
|
||||||
qrcode : miniShareData.code,
|
qrcode : miniShareData.qrcode,
|
||||||
invite : miniShareData.invite,
|
invite : miniShareData.invite,
|
||||||
current : 0
|
current : 0
|
||||||
})
|
})
|
||||||
@@ -133,8 +132,12 @@ Page({
|
|||||||
// 绘制图片二维码
|
// 绘制图片二维码
|
||||||
code.src = qrcodeSrc
|
code.src = qrcodeSrc
|
||||||
code.onload = () => {
|
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)
|
ctx.drawImage(code, posterX, posterY, qrcodeSize, qrcodeSize)
|
||||||
|
|
||||||
|
|
||||||
// 保存海报
|
// 保存海报
|
||||||
wx.canvasToTempFilePath({
|
wx.canvasToTempFilePath({
|
||||||
canvas : canvas,
|
canvas : canvas,
|
||||||
|
|||||||
@@ -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{ 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-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{ display: flex; align-items: center; justify-content: space-around; width: 70vw; margin-top: 80rpx; }
|
||||||
.tool-item{ text-align: center; }
|
.tool-item{ text-align: center; }
|
||||||
.tool-item[size="mini"]{ padding: 0; margin: 0; background-color: transparent; }
|
.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;}
|
.tool-text{ color: gray; font-size: 30rpx; line-height: 40rpx; margin-top: 10rpx; font-weight: normal;}
|
||||||
|
|
||||||
/* canvas */
|
/* canvas */
|
||||||
|
|||||||
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