From a2ba0c4546bf727ca0ec23bea7c6edf575883614 Mon Sep 17 00:00:00 2001
From: wally <18603454788@163.com>
Date: Fri, 6 Mar 2020 22:39:07 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=83=E9=99=90=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 10 +++++
manifest.json | 5 +++
pages.json | 15 ++++++-
pages/healthy-card/healthy-card.vue | 14 ++++++
pages/index/index.vue | 1 +
pages/sign/sign.vue | 2 +-
pages/statistics/components/health-data.vue | 48 +++++++++++++--------
pages/statistics/statistics.vue | 18 ++++----
pages/user-code/user-code.vue | 25 +++++++++++
9 files changed, 110 insertions(+), 28 deletions(-)
create mode 100644 pages/healthy-card/healthy-card.vue
create mode 100644 pages/user-code/user-code.vue
diff --git a/App.vue b/App.vue
index 02c7786..29e26ad 100644
--- a/App.vue
+++ b/App.vue
@@ -4,6 +4,16 @@ import { mapActions } from 'vuex';
export default {
async onLaunch() {
await this.login();
+ uni.getSetting({
+ success(res) {
+ if (!res.authSetting['scope.userLocation']) {
+ uni.authorize({
+ scope: 'scope.userLocation',
+ success() {},
+ });
+ }
+ },
+ });
},
methods: {
diff --git a/manifest.json b/manifest.json
index c0f4472..e81bf4b 100644
--- a/manifest.json
+++ b/manifest.json
@@ -64,6 +64,11 @@
"postcss" : true,
"minified" : true
},
+ "permission": {
+ "scope.userLocation": {
+ "desc": "你的位置信息将用于获取地理位置及地图展示"
+ }
+ },
"usingComponents" : true
},
"mp-alipay" : {
diff --git a/pages.json b/pages.json
index e19261a..75f7690 100644
--- a/pages.json
+++ b/pages.json
@@ -13,6 +13,11 @@
"navigationBarTitleText": "山大健康码"
}
},
+ {
+ "path": "pages/statistics/statistics",
+ "style": { "navigationBarTitleText": "统计" }
+ },
+
{
"path": "pages/my-signs/my-signs",
"style": { "navigationBarTitleText": "我的校园打卡" }
@@ -64,7 +69,15 @@
"navigationBarTitleText": "我的行程"
}
}
- ],
+ ,{
+ "path" : "pages/healthy-card/healthy-card",
+ "style" : {}
+ }
+ ,{
+ "path" : "pages/user-code/user-code",
+ "style" : {}
+ }
+ ],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "山大健康码",
diff --git a/pages/healthy-card/healthy-card.vue b/pages/healthy-card/healthy-card.vue
new file mode 100644
index 0000000..97fb425
--- /dev/null
+++ b/pages/healthy-card/healthy-card.vue
@@ -0,0 +1,14 @@
+
+ 扫别人的码
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 99e3a37..2d68c41 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -36,6 +36,7 @@ export default {
uni.scanCode({
onlyFromCamera: true,
success: res => {
+ console.log('res: ', res);
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
},
diff --git a/pages/sign/sign.vue b/pages/sign/sign.vue
index 7d69e59..114b115 100644
--- a/pages/sign/sign.vue
+++ b/pages/sign/sign.vue
@@ -25,7 +25,7 @@ export default {
address: '图书馆',
siteId: '',
siteName: '',
- success: true,
+ success: false,
};
},
diff --git a/pages/statistics/components/health-data.vue b/pages/statistics/components/health-data.vue
index 9bbd8dc..44bf7c2 100644
--- a/pages/statistics/components/health-data.vue
+++ b/pages/statistics/components/health-data.vue
@@ -11,21 +11,9 @@
-
- 100
- 正常
-
-
- 9
- 发烧
-
-
- 10
- 其他
-
-
- 50
- 未上报
+
+ {{ item.number }}
+ {{ item.name }}
@@ -33,15 +21,41 @@
diff --git a/pages/statistics/statistics.vue b/pages/statistics/statistics.vue
index d282278..e9700e0 100644
--- a/pages/statistics/statistics.vue
+++ b/pages/statistics/statistics.vue
@@ -43,7 +43,7 @@ export default {
this.$moment(end)
.endOf('day')
.format('x') - 0;
- console.log('startTime,endTime: ', startTime, endTime);
+ console.log('startTime, endTime: ', startTime, endTime);
// 获取校园打卡的数据
this.getSchoolSignsData(startTime, endTime);
// 获取健康上报数目数据
@@ -52,12 +52,12 @@ export default {
/**
* 获取校园打卡的数据
- * @param {number} start 开始时间
- * @param {number} end 截止时间
+ * @param {number} startTime 开始时间
+ * @param {number} endTime 截止时间
*/
- getSchoolSignsData(start, end) {
+ getSchoolSignsData(startTime, endTime) {
try {
- const params = { param: { start, end } };
+ const params = { param: { startTime, endTime } };
this.getSchoolSigns(params);
} catch (error) {
console.log('getSchoolSignsData error: ', error);
@@ -66,12 +66,12 @@ export default {
/**
* 获取健康上报的数目数据
- * @param {number} start 开始时间
- * @param {number} end 截止时间
+ * @param {number} startTime 开始时间
+ * @param {number} endTime 截止时间
*/
- getSchoolSignsNumberData(start, end) {
+ getSchoolSignsNumberData(startTime, endTime) {
try {
- const params = { param: { start, end } };
+ const params = { param: { startTime, endTime } };
this.getSchoolSignsNumber(params);
} catch (error) {
console.log('getSchoolSignsNumberData error: ', error);
diff --git a/pages/user-code/user-code.vue b/pages/user-code/user-code.vue
new file mode 100644
index 0000000..c43b673
--- /dev/null
+++ b/pages/user-code/user-code.vue
@@ -0,0 +1,25 @@
+
+ 扫了别人的码 看其健康状态
+
+
+
+
+