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 0000000..2ef7004
Binary files /dev/null and b/static/location.png differ