diff --git a/config/api/api.js b/config/api/api.js
new file mode 100644
index 0000000..f910fe4
--- /dev/null
+++ b/config/api/api.js
@@ -0,0 +1,38 @@
+const HEALTH = '/health';
+const users = `${HEALTH}/users`;
+const health = `${HEALTH}/health`;
+const sites = `${HEALTH}/sites`;
+const journeys = `${HEALTH}/journeys`;
+
+// 保存个人信息
+const SUBMIT_USER_INFO = `${users}/addInfo`;
+
+// 获取个人信息
+const GET_USER_INFO = `${users}/info`;
+
+// 获取健康打卡记录
+const HEALTH_SIGN_HISTORY = `${health}/info`;
+
+// 健康类型统计
+const HEALTH_TYPE_STATISTICS = `${health}/statistics`;
+
+// 查询健康状态类型
+const HEALTH_TYPE_STATUS = `${health}/type`;
+
+// 健康打卡
+const HEALTH_SIGN = `${health}/upload`;
+
+// 查看自己的打卡记录
+const SCAN_SIGN_INFO = `${sites}/info`;
+
+// 扫码统计
+const SCAN_SIGN_HISTORY = `${sites}/statistics`;
+
+// 扫码打卡
+const SCAN_SIGN = `${sites}/upload`;
+
+// 查询行程
+const GET_JOURNEYS = `${journeys}/info`;
+
+// 上报行程
+const SUBMIT_JOURNEYS = `${sites}/upload`;
diff --git a/config/api/base.js b/config/api/base.js
index c662f23..0e61a94 100644
--- a/config/api/base.js
+++ b/config/api/base.js
@@ -1,5 +1,5 @@
// api基础地质
-export const BASE_URL = ``;
+export const BASE_URL = 'https://test.tall.wiki/gateway';
// 错误码
-export const ERR_CODE = 200;
\ No newline at end of file
+export const ERR_CODE = 200;
diff --git a/main.js b/main.js
index 6f428d4..f0cc62c 100644
--- a/main.js
+++ b/main.js
@@ -7,6 +7,11 @@ import App from './App';
Vue.config.productionTip = false;
Vue.prototype.$http = http;
Vue.prototype.$moment = moment;
+Vue.prototype.goHome = () => {
+ uni.reLaunch({
+ url: '/pages/index/index',
+ });
+};
moment.locale('zh-cn');
@@ -26,4 +31,4 @@ const app = new Vue({
// store,
...App,
});
-app.$mount();
\ No newline at end of file
+app.$mount();
diff --git a/pages.json b/pages.json
index 5fbf4b2..3eca2cd 100644
--- a/pages.json
+++ b/pages.json
@@ -1,5 +1,11 @@
{
"pages": [
+ {
+ "path": "pages/sign/sign",
+ "style": {
+ "navigationBarTitleText": "打卡"
+ }
+ },
{
"path": "pages/index/index",
"style": {
@@ -16,6 +22,7 @@
"navigationBarTitleText": "领取健康码"
}
}
+
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/sign/sign.vue b/pages/sign/sign.vue
new file mode 100644
index 0000000..96b5cce
--- /dev/null
+++ b/pages/sign/sign.vue
@@ -0,0 +1,85 @@
+
+
+
+
+ {{ address }}
+
+
+
+
+
+ 打卡成功
+
+
+
+
+
+
+
+
diff --git a/utils/util.js b/utils/util.js
new file mode 100644
index 0000000..5985513
--- /dev/null
+++ b/utils/util.js
@@ -0,0 +1,20 @@
+/**
+ * 格式化 querystring
+ * taskId=3&scene=1011 ->
+ * {taskId:3,scene:1011}
+ */
+export const formatQuery = str => {
+ if (!str) return;
+ const result = {};
+ if (str.includes('&')) {
+ const arr = str.split('&');
+ arr.forEach(item => {
+ const arr1 = item.split('=');
+ result[arr1[0]] = arr1[1];
+ });
+ } else {
+ const arr = str.split('=');
+ result[arr[0]] = arr[1];
+ }
+ return result;
+};