diff --git a/App.vue b/App.vue
index a0bfe21..81951a9 100644
--- a/App.vue
+++ b/App.vue
@@ -17,59 +17,50 @@ export default {
await this.login();
await this.getUserInfo();
- this.getSites();
},
computed: mapState('user', ['token']),
methods: {
- ...mapMutations('user', ['setUserInfo','setHealthCode']),
+ ...mapMutations('user', ['setUserInfo', 'setHealthCode']),
...mapActions('user', ['login']),
- ...mapActions('site', ['getSites']),
-
- /**
- * 查询个人信息
- */
- async getUserInfo() {
- try {
- const { token } = this;
- const params = {
- param: {
- token
- }
- };
- const res = await this.$http.post(GET_USER_INFO, params);
- const {
- success,
- code,
- msg,
- data
- } = res.data;
- if (success && code === 200) {
- this.setUserInfo(data);
- if(data.healthCodeList && data.healthCodeList.length>0){
- const oldCode = data.healthCodeList[0].healthCode;
- this.setHealthCode(oldCode)
- }
- this.success = true;
- } else {
- uni.showToast({
- title: msg || '查询个人信息成功',
- icon: 'none'
- });
- }
- } catch (error) {
- console.log('error: ', error);
- if (error.msg) {
- uni.showToast({
- title: error.msg || '查询个人信息失败',
- icon: 'none'
- });
- }
- }
- },
-
+ /**
+ * 查询个人信息
+ */
+ async getUserInfo() {
+ try {
+ const { token } = this;
+ const params = {
+ param: {
+ token,
+ },
+ };
+ const res = await this.$http.post(GET_USER_INFO, params);
+ const { success, code, msg, data } = res.data;
+ if (success && code === 200) {
+ this.setUserInfo(data);
+ if (data.healthCodeList && data.healthCodeList.length > 0) {
+ const oldCode = data.healthCodeList[0].healthCode;
+ this.setHealthCode(oldCode);
+ }
+ this.success = true;
+ } else {
+ uni.showToast({
+ title: msg || '查询个人信息成功',
+ icon: 'none',
+ });
+ }
+ } catch (error) {
+ console.log('error: ', error);
+ if (error.msg) {
+ uni.showToast({
+ title: error.msg || '查询个人信息失败',
+ icon: 'none',
+ });
+ }
+ }
+ },
},
};
diff --git a/components/timeline/timeline.vue b/components/timeline/timeline.vue
index 5e0735d..3014d25 100644
--- a/components/timeline/timeline.vue
+++ b/components/timeline/timeline.vue
@@ -1,32 +1,44 @@
-
-
- 昨天
-
-
- 22:22【广州市】快件已到达地球
-
-
-
- 这是第一次,我家的铲屎官走了这么久。久到足足有三天!!
-
-
-
-
- 06-17
-
-
- 01:30【喵星】 MX-12138 已揽收,准备发往银河系
-
-
-
-
+
+
+
+
+
+ {{ generateTime(item.time - 0) }}
+ 【 {{ item.siteName }} 】打卡
+
+
+
+
diff --git a/config/api/api.js b/config/api/api.js
index 0e001a8..ca8eb0b 100644
--- a/config/api/api.js
+++ b/config/api/api.js
@@ -28,6 +28,9 @@ export const USER_SIGNS = `${sites}/info`;
// 获取所有场景信息
export const SITES_INFO = `${sites}/siteInfo`;
+// 根据二维码的id获取场所的信息
+export const SITE = `${sites}/site`;
+
// 扫码统计
export const SCHOOL_SIGNS = `${sites}/statistics`;
diff --git a/pages/basic-info/basic-info.vue b/pages/basic-info/basic-info.vue
index afa24e3..2d4b7c5 100644
--- a/pages/basic-info/basic-info.vue
+++ b/pages/basic-info/basic-info.vue
@@ -1,209 +1,243 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/pages/my-signs/my-signs.vue b/pages/my-signs/my-signs.vue
index 61f20b4..eef36d0 100644
--- a/pages/my-signs/my-signs.vue
+++ b/pages/my-signs/my-signs.vue
@@ -13,7 +13,12 @@
-
+
@@ -21,6 +26,8 @@