diff --git a/api/list.js b/api/list.js
new file mode 100644
index 0000000..62e818a
--- /dev/null
+++ b/api/list.js
@@ -0,0 +1,14 @@
+import fetch from '@/common/fetch.js';
+import BASE_URL from './base.js';
+import useNetWork from '@/common/useNetWork.js';
+
+const List = BASE_URL + '/visitor/apply/list'
+
+/**
+ * 提交访客记录
+ * @param {*}
+ */
+export function getList(data) {
+ useNetWork();
+ return fetch.post(List,data).then(res => res);
+}
\ No newline at end of file
diff --git a/api/list.js b/api/list.js
new file mode 100644
index 0000000..62e818a
--- /dev/null
+++ b/api/list.js
@@ -0,0 +1,14 @@
+import fetch from '@/common/fetch.js';
+import BASE_URL from './base.js';
+import useNetWork from '@/common/useNetWork.js';
+
+const List = BASE_URL + '/visitor/apply/list'
+
+/**
+ * 提交访客记录
+ * @param {*}
+ */
+export function getList(data) {
+ useNetWork();
+ return fetch.post(List,data).then(res => res);
+}
\ No newline at end of file
diff --git a/common/formatTime.js b/common/formatTime.js
index e5d158e..6129cc2 100644
--- a/common/formatTime.js
+++ b/common/formatTime.js
@@ -3,4 +3,13 @@
var timestr = new Date(parseInt(unixtime) * 1000);
var datetime = timestr.toLocaleString().replace(/年|月/g,"-").replace(/日/g," ");
return datetime;
+}
+
+/*
+ 获取前几个月,默认前一个月的今天
+*/
+export function getLastMonth(monthNum = 1){
+ let today = new Date() //当天
+ today.setMonth(today.getMonth()-monthNum)
+ return today;
}
\ No newline at end of file
diff --git a/api/list.js b/api/list.js
new file mode 100644
index 0000000..62e818a
--- /dev/null
+++ b/api/list.js
@@ -0,0 +1,14 @@
+import fetch from '@/common/fetch.js';
+import BASE_URL from './base.js';
+import useNetWork from '@/common/useNetWork.js';
+
+const List = BASE_URL + '/visitor/apply/list'
+
+/**
+ * 提交访客记录
+ * @param {*}
+ */
+export function getList(data) {
+ useNetWork();
+ return fetch.post(List,data).then(res => res);
+}
\ No newline at end of file
diff --git a/common/formatTime.js b/common/formatTime.js
index e5d158e..6129cc2 100644
--- a/common/formatTime.js
+++ b/common/formatTime.js
@@ -3,4 +3,13 @@
var timestr = new Date(parseInt(unixtime) * 1000);
var datetime = timestr.toLocaleString().replace(/年|月/g,"-").replace(/日/g," ");
return datetime;
+}
+
+/*
+ 获取前几个月,默认前一个月的今天
+*/
+export function getLastMonth(monthNum = 1){
+ let today = new Date() //当天
+ today.setMonth(today.getMonth()-monthNum)
+ return today;
}
\ No newline at end of file
diff --git a/pages/information/information.vue b/pages/information/information.vue
index fac0620..b01bece 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -53,7 +53,6 @@
-
{{isForm ? '提交' : '完成'}}
@@ -130,7 +129,7 @@
icon: 'none',
duration: 2000,
})
- }else if(this.callerInfo.inTime === this.callerInfo.outTime){
+ }else if(this.callerInfo.inTime >= this.callerInfo.outTime){
return uni.showToast({
title: `访客结束时间未选择`,
icon: 'none',
diff --git a/api/list.js b/api/list.js
new file mode 100644
index 0000000..62e818a
--- /dev/null
+++ b/api/list.js
@@ -0,0 +1,14 @@
+import fetch from '@/common/fetch.js';
+import BASE_URL from './base.js';
+import useNetWork from '@/common/useNetWork.js';
+
+const List = BASE_URL + '/visitor/apply/list'
+
+/**
+ * 提交访客记录
+ * @param {*}
+ */
+export function getList(data) {
+ useNetWork();
+ return fetch.post(List,data).then(res => res);
+}
\ No newline at end of file
diff --git a/common/formatTime.js b/common/formatTime.js
index e5d158e..6129cc2 100644
--- a/common/formatTime.js
+++ b/common/formatTime.js
@@ -3,4 +3,13 @@
var timestr = new Date(parseInt(unixtime) * 1000);
var datetime = timestr.toLocaleString().replace(/年|月/g,"-").replace(/日/g," ");
return datetime;
+}
+
+/*
+ 获取前几个月,默认前一个月的今天
+*/
+export function getLastMonth(monthNum = 1){
+ let today = new Date() //当天
+ today.setMonth(today.getMonth()-monthNum)
+ return today;
}
\ No newline at end of file
diff --git a/pages/information/information.vue b/pages/information/information.vue
index fac0620..b01bece 100644
--- a/pages/information/information.vue
+++ b/pages/information/information.vue
@@ -53,7 +53,6 @@
-
{{isForm ? '提交' : '完成'}}
@@ -130,7 +129,7 @@
icon: 'none',
duration: 2000,
})
- }else if(this.callerInfo.inTime === this.callerInfo.outTime){
+ }else if(this.callerInfo.inTime >= this.callerInfo.outTime){
return uni.showToast({
title: `访客结束时间未选择`,
icon: 'none',
diff --git a/pages/list/list.vue b/pages/list/list.vue
index 0e5bbca..c4fb2bb 100644
--- a/pages/list/list.vue
+++ b/pages/list/list.vue
@@ -5,12 +5,14 @@
- 筛选时间
+ 筛选时间
- 筛选状态
+ 筛选状态
- {{item.time}}
- {{item.number}}
- {{item.name}}
+ {{item.inTime}}
+ {{item.remarks}}
+ {{item.visitorName}}
@@ -73,56 +75,69 @@
+
+
+
+
+
+