From dc0d7d30ceff26a31a56485e530bc8b6ecb91ac3 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Thu, 25 Feb 2021 19:50:04 +0800
Subject: [PATCH] no message
---
pages/home/qrcode/index.js | 16 +++++++++++++---
pages/home/qrcode/index.json | 5 ++++-
pages/home/qrcode/index.wxml | 15 +++++++++++++++
pages/home/qrcode/index.wxss | 33 ++++++++++++++++++++++++++++++++-
pages/login/index.js | 3 +++
5 files changed, 67 insertions(+), 5 deletions(-)
diff --git a/pages/home/qrcode/index.js b/pages/home/qrcode/index.js
index f6d6b8c..bb27231 100644
--- a/pages/home/qrcode/index.js
+++ b/pages/home/qrcode/index.js
@@ -8,13 +8,23 @@ Page({
* 页面的初始数据
*/
data: {
-
+ userInfo: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.setData({ userInfo: app.userInfo})
+ },
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+ return {
+ title: '纸通宝工厂版——' + this.data.userInfo.factoryName,
+ path: 'pages/login/index?qrcode=562333739288498176',
+ imageUrl: '/assets/image/icon_logo.png',
+ success: function (res) {}
+ }
}
-
})
\ No newline at end of file
diff --git a/pages/home/qrcode/index.json b/pages/home/qrcode/index.json
index 8835af0..edb0418 100644
--- a/pages/home/qrcode/index.json
+++ b/pages/home/qrcode/index.json
@@ -1,3 +1,6 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "van-button": "/components/button/index",
+ "van-divider": "/components/divider/index"
+ }
}
\ No newline at end of file
diff --git a/pages/home/qrcode/index.wxml b/pages/home/qrcode/index.wxml
index 2385a63..e61210a 100644
--- a/pages/home/qrcode/index.wxml
+++ b/pages/home/qrcode/index.wxml
@@ -2,3 +2,18 @@
二维码名片
+
+
+
+
+ {{userInfo.factoryName || '未注册工厂'}}
+
+
+
+
+
+ 使用微信扫码可以注册成为工厂客户
+ 微信分享
+
+
+
diff --git a/pages/home/qrcode/index.wxss b/pages/home/qrcode/index.wxss
index 65eec81..86b83d3 100644
--- a/pages/home/qrcode/index.wxss
+++ b/pages/home/qrcode/index.wxss
@@ -1 +1,32 @@
-/* pages/home/qrcode/index.wxss */
\ No newline at end of file
+/* pages/home/qrcode/index.wxss */
+.semi-circle {
+ width: 100%;
+ height: 1000rpx;
+ position: relative;
+ background: #ffffff;
+ border-radius: 8px;
+}
+
+.semi-circle:after {
+ position: absolute;
+ content: "";
+ width: 20px;
+ height: 20px;
+ background: #f1f1f1;
+ border-radius: 100%;
+ right: 0;
+ top: 770rpx;
+ transform: translate(50%, -50%);
+}
+
+.semi-circle:before {
+ position: absolute;
+ content: "";
+ width: 20px;
+ height: 20px;
+ background: #f1f1f1;
+ border-radius: 100%;
+ left: 0;
+ top: 770rpx;
+ transform: translate(-50%, -50%);
+}
\ No newline at end of file
diff --git a/pages/login/index.js b/pages/login/index.js
index 617339b..c729c18 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -39,6 +39,9 @@ Page({
//扫二维码进入的,
let q = decodeURIComponent(options.q)
this.data.code = q.substring(q.indexOf('?'))
+ } else if(options.qrcode){
+ //分享进入
+ this.data.code = '?mark=ztb_saas&QrCodeRecordId=' + options.qrcode
}
this.wxLogin()
},