diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 798841a..77ca273 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -2,7 +2,7 @@
-
+
diff --git a/pages/user/code/code.js b/pages/user/code/code.js
index 3d5966d..5337913 100644
--- a/pages/user/code/code.js
+++ b/pages/user/code/code.js
@@ -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,
diff --git a/pages/user/code/code.wxss b/pages/user/code/code.wxss
index ca606bb..849443a 100644
--- a/pages/user/code/code.wxss
+++ b/pages/user/code/code.wxss
@@ -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 */
diff --git a/static/icons/closeBig.png b/static/icons/closeBig.png
new file mode 100644
index 0000000..547f350
Binary files /dev/null and b/static/icons/closeBig.png differ