From 1ce70dc9e7136ee90c1ff2a701205af2d0aef71d Mon Sep 17 00:00:00 2001 From: songsong428 Date: Mon, 9 Mar 2020 15:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=AF=8F=E6=97=A5=E5=81=A5?= =?UTF-8?q?=E5=BA=B7=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 7 +- pages.json | 6 + pages/basic-info/basic-info.vue | 1 - pages/index/components/home.vue | 2 +- pages/my-code/my-code.vue | 3 + pages/my-trips/my-trips.vue | 4 + pages/punch-the-clock/punch-the-clock.vue | 293 ++++++++++++++++++++++ 7 files changed, 312 insertions(+), 4 deletions(-) create mode 100644 pages/punch-the-clock/punch-the-clock.vue diff --git a/main.js b/main.js index 8458b43..904b195 100644 --- a/main.js +++ b/main.js @@ -21,11 +21,14 @@ Vue.prototype.goHome = () => { * @param {string} path 页面完成路径 * @param {string} query 参数字符串a=x&b=y */ + +// 白名单页面 +const whiteListPath = ['/pages/basic-info/basic-info','/pages/statistics/statistics','/pages/user-code/user-code'] + Vue.prototype.openPage = function(path, query = '') { let url = query ? `${path}?${query}` : path; store.commit('user/setPagePath',url) - // 白名单页面 - const whiteListPath = ['/pages/basic-info/basic-info','/pages/statistics/statistics','/pages/user-code/user-code'] + const choosePath = whiteListPath.indexOf(path) if(!store.state.user.userInfo.id && choosePath === -1) { url = '/pages/basic-info/basic-info'; diff --git a/pages.json b/pages.json index 3cbbcfa..163196b 100644 --- a/pages.json +++ b/pages.json @@ -32,6 +32,12 @@ "navigationBarTitleText": "领取健康码" } }, + { + "path": "pages/punch-the-clock/punch-the-clock", + "style": { + "navigationBarTitleText": "每日健康打卡" + } + }, { "path": "pages/basic-info/basic-info", "style": { diff --git a/pages/basic-info/basic-info.vue b/pages/basic-info/basic-info.vue index 3357b77..d7ecf4e 100644 --- a/pages/basic-info/basic-info.vue +++ b/pages/basic-info/basic-info.vue @@ -171,7 +171,6 @@ export default { }); this.success = true; this.setUserInfo(data); - console.log(pagePath) if(pagePath === '/pages/basic-info/basic-info'){ uni.reLaunch({ url: `/pages/index/index`, diff --git a/pages/index/components/home.vue b/pages/index/components/home.vue index 446c81b..fac8112 100644 --- a/pages/index/components/home.vue +++ b/pages/index/components/home.vue @@ -22,7 +22,7 @@ - + diff --git a/pages/my-code/my-code.vue b/pages/my-code/my-code.vue index e600ccd..02329e0 100644 --- a/pages/my-code/my-code.vue +++ b/pages/my-code/my-code.vue @@ -31,6 +31,9 @@ + + 您还没有申请健康码,请点击右下角加号申请健康码。 + diff --git a/pages/my-trips/my-trips.vue b/pages/my-trips/my-trips.vue index a36bb81..2b8db40 100644 --- a/pages/my-trips/my-trips.vue +++ b/pages/my-trips/my-trips.vue @@ -29,6 +29,10 @@ + + + 您还没有添加行程,请点击右下角加号添加行程。 + diff --git a/pages/punch-the-clock/punch-the-clock.vue b/pages/punch-the-clock/punch-the-clock.vue new file mode 100644 index 0000000..ff837d8 --- /dev/null +++ b/pages/punch-the-clock/punch-the-clock.vue @@ -0,0 +1,293 @@ + + + + +