From 3eb218e8213acc487b4cc11fccad7479a5cf034e Mon Sep 17 00:00:00 2001
From: jiannibang <271381693@qq.com>
Date: Thu, 28 Jul 2022 16:19:34 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.mini-ide/compileMode.json | 10 ++++++++++
.mini-ide/project-ide.json | 4 +++-
app.js | 7 +++++--
app.json | 2 +-
pages/index/index.axml | 5 +----
pages/index/index.js | 14 +++++++++-----
6 files changed, 29 insertions(+), 13 deletions(-)
create mode 100644 .mini-ide/compileMode.json
diff --git a/.mini-ide/compileMode.json b/.mini-ide/compileMode.json
new file mode 100644
index 0000000..da8c383
--- /dev/null
+++ b/.mini-ide/compileMode.json
@@ -0,0 +1,10 @@
+{
+ "modes": [
+ {
+ "title": "测试二维码",
+ "page": "pages/index/index",
+ "chInfo": "ch_scan",
+ "query": "qrCode=https%3A%2F%2Fcdn.1000my.cn%2Fqrcode%2F423ca563-a82d-4ee6-a375-c5a80d138eb5%2F%3Fs%3D5_10_%E6%82%A8%E7%9A%84%E4%BD%8D%E7%BD%AE%26e%3DF5-04-05"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.mini-ide/project-ide.json b/.mini-ide/project-ide.json
index 6b73390..3413d9a 100644
--- a/.mini-ide/project-ide.json
+++ b/.mini-ide/project-ide.json
@@ -1,3 +1,5 @@
{
- "enableLegacyRemoteDebug": false
+ "enableLegacyRemoteDebug": false,
+ "ignoreWebViewDomainCheck": false,
+ "ignoreHttpDomainCheck": false
}
\ No newline at end of file
diff --git a/app.js b/app.js
index a8bb15e..fe8eddc 100644
--- a/app.js
+++ b/app.js
@@ -2,10 +2,13 @@ App({
onLaunch(options) {
// 第一次打开
// options.query == {number:1}
- console.info('App onLaunch');
+ console.info("App onLaunch", options);
+ if (options.query && options.query.qrCode) {
+ this.qrCode = options.query.qrCode.split("?")[1];
+ }
},
onShow(options) {
// 从后台被 scheme 重新打开
// options.query == {number:1}
- },
+ }
});
diff --git a/app.json b/app.json
index c8ddc95..403e961 100644
--- a/app.json
+++ b/app.json
@@ -3,6 +3,6 @@
"pages/index/index"
],
"window": {
- "defaultTitle": "My App"
+ "defaultTitle": "千目GO"
}
}
diff --git a/pages/index/index.axml b/pages/index/index.axml
index 0b4f933..ec61f8e 100644
--- a/pages/index/index.axml
+++ b/pages/index/index.axml
@@ -1,4 +1 @@
-
-
- this is a blank page
-
+
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index f225d33..c356dbf 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,7 +1,11 @@
Page({
+ data: {
+ query: ""
+ },
onLoad(query) {
- // 页面加载
console.info(`Page onLoad with query: ${JSON.stringify(query)}`);
+ const app = getApp();
+ this.setData({ query: `?t=${new Date().getTime()}#/?${app.qrCode}` });
},
onReady() {
// 页面加载完成
@@ -27,9 +31,9 @@ Page({
onShareAppMessage() {
// 返回自定义分享信息
return {
- title: 'My App',
- desc: 'My App description',
- path: 'pages/index/index',
+ title: "My App",
+ desc: "My App description",
+ path: "pages/index/index"
};
- },
+ }
});