From f4f791776c52f6bb82d202ac9bd3cdbcf4e70acd Mon Sep 17 00:00:00 2001
From: wally <18603454788@163.com>
Date: Wed, 4 Mar 2020 19:16:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=BB=9F=E8=AE=A1?=
=?UTF-8?q?=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
main.js | 26 ++++++---
pages.json | 44 ++++++++------
pages/get-code/get-code.vue | 25 ++++++++
pages/index/components/home.vue | 13 +++--
pages/index/components/mine.vue | 2 +-
pages/index/index.vue | 11 +++-
pages/statistics/statistics.vue | 99 ++++++++++++++++++++++++++++++++
static/location.png | Bin 0 -> 770 bytes
8 files changed, 187 insertions(+), 33 deletions(-)
create mode 100644 pages/get-code/get-code.vue
create mode 100644 pages/statistics/statistics.vue
create mode 100644 static/location.png
diff --git a/main.js b/main.js
index 8a8632e..0c7b708 100644
--- a/main.js
+++ b/main.js
@@ -1,15 +1,25 @@
-import Vue from 'vue';
+import Vue from 'vue';
import { http } from 'plugins/request/index';
-import App from './App';
+import App from './App';
// import store from './store';
-Vue.config.productionTip = false
+Vue.config.productionTip = false;
Vue.prototype.$http = http;
-App.mpType = 'app'
+/**
+ * 打开某个页面
+ * @param {string} path 页面完成路径
+ * @param {string} query 参数字符串a=x&b=y
+ */
+Vue.prototype.openPage = function(path, query = '') {
+ let url = query ? `${path}?${query}` : path;
+ uni.navigateTo({ url });
+};
-const app = new Vue({
+App.mpType = 'app';
+
+const app = new Vue({
// store,
- ...App
-})
-app.$mount()
+ ...App,
+});
+app.$mount();
diff --git a/pages.json b/pages.json
index 26f426b..5fbf4b2 100644
--- a/pages.json
+++ b/pages.json
@@ -1,19 +1,29 @@
{
- "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
- {
- "path": "pages/index/index",
- "style": {
- "navigationBarTitleText": "uni-app"
- }
- }
- ],
- "globalStyle": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "uni-app",
- "navigationBarBackgroundColor": "#F8F8F8",
- "backgroundColor": "#F8F8F8"
- },
- "easycom": {
- "autoscan": true
+ "pages": [
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "山大健康码"
+ }
+ },
+ {
+ "path": "pages/statistics/statistics",
+ "style": { "navigationBarTitleText": "统计" }
+ },
+ {
+ "path": "pages/get-code/get-code",
+ "style": {
+ "navigationBarTitleText": "领取健康码"
+ }
+ }
+ ],
+ "globalStyle": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "山大健康码",
+ "navigationBarBackgroundColor": "#F8F8F8",
+ "backgroundColor": "#F8F8F8"
+ },
+ "easycom": {
+ "autoscan": true
}
-}
+}
diff --git a/pages/get-code/get-code.vue b/pages/get-code/get-code.vue
new file mode 100644
index 0000000..5d70ecd
--- /dev/null
+++ b/pages/get-code/get-code.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/pages/index/components/home.vue b/pages/index/components/home.vue
index 16c7a1c..ef49bdb 100644
--- a/pages/index/components/home.vue
+++ b/pages/index/components/home.vue
@@ -1,8 +1,9 @@
+
-
+
@@ -13,7 +14,7 @@
-
+
@@ -24,7 +25,7 @@
-
+
@@ -35,7 +36,7 @@
-
+
@@ -46,7 +47,7 @@
-
+
@@ -54,7 +55,7 @@
diff --git a/pages/index/components/mine.vue b/pages/index/components/mine.vue
index 856c49b..74ec854 100644
--- a/pages/index/components/mine.vue
+++ b/pages/index/components/mine.vue
@@ -1,5 +1,5 @@
- user
+ user1
+
+
diff --git a/static/location.png b/static/location.png
new file mode 100644
index 0000000000000000000000000000000000000000..2ef700431c6d2d6b400e8fccd9783a196ef16c14
GIT binary patch
literal 770
zcmV+d1O5DoP)o-!qXK&L18+b?4+gp|8a?PyJnBKCv|ES=#ZYeI
z$Ii!t@vj9+Mza1{_F2wh)a3q-d)X1pji=*NEmcU%Y
z&%Oims=iXQq%3k*bBRWAgdBlpS{WmRZabIr4mBBjS(O8!k$gQGyxEIq`>Ez9)dCWl(Mc!bLYhD^74rONf`e*plr&zet7irlNDc}1JB(nkNQt9TEr704#QUt;#>Aw>%`+W-In07*qoM6N<$f_=tU
A2LJ#7
literal 0
HcmV?d00001