diff --git a/src/apps/AppResidentActivitie/Add.vue b/src/apps/AppResidentActivitie/Add.vue
index 63381ef9..711d609b 100644
--- a/src/apps/AppResidentActivitie/Add.vue
+++ b/src/apps/AppResidentActivitie/Add.vue
@@ -80,7 +80,6 @@ export default {
contactPhone: '',
},
-
showStartTime: false,
showEndTime: false,
flag: false,
diff --git a/src/apps/AppResidentActivitie/AppResidentActivities.vue b/src/apps/AppResidentActivitie/AppResidentActivities.vue
index cac9a182..c525a789 100644
--- a/src/apps/AppResidentActivitie/AppResidentActivities.vue
+++ b/src/apps/AppResidentActivitie/AppResidentActivities.vue
@@ -78,6 +78,7 @@ export default {
this.$dict.load(['villageActivityStatus']).then(() => {
this.getList()
})
+
uni.$on('updateList', () => {
this.current = 1
this.getList()
diff --git a/src/apps/AppResidentActivitie/Detail.vue b/src/apps/AppResidentActivitie/Detail.vue
index 69fcb46a..097aca6b 100644
--- a/src/apps/AppResidentActivitie/Detail.vue
+++ b/src/apps/AppResidentActivitie/Detail.vue
@@ -15,7 +15,7 @@
![]()
-
{{ user.name }}
+
{{ detail.contactPerson }}
@@ -28,7 +28,6 @@
活动人数
{{ detail.realNum }}
-
@@ -102,7 +101,7 @@
编辑活动
-
+
@@ -133,6 +132,8 @@ export default {
],
current: 0,
timeEndTime: '',
+ timeEnd: '',
+ timeNow: '',
}
},
onLoad(option) {
@@ -154,6 +155,16 @@ export default {
this.$http.post(`/app/appvillageactivityinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.detail = res.data
+ console.log('结束时间', this.detail.endTime)
+ this.timeEnd = new Date(this.detail.endTime).getTime()
+ console.log('过去时间戳', this.timeEnd)
+ this.timeNow = new Date().getTime()
+ console.log('当前时间戳', this.timeNow)
+ console.log('过去时间戳加上24小时', this.timeEnd * 1 + 24 * 60 * 60 * 1000)
+
+ if (this.timeNow * 1 - this.timeEnd * 1 < 24 * 60 * 60 * 1000) {
+ console.log('可以添加')
+ }
if (this.detail) {
if (this.detail.url) {
diff --git a/src/apps/AppResidentDocument/DetailCard.vue b/src/apps/AppResidentDocument/DetailCard.vue
index 526b90df..ccf77dcb 100644
--- a/src/apps/AppResidentDocument/DetailCard.vue
+++ b/src/apps/AppResidentDocument/DetailCard.vue
@@ -7,7 +7,8 @@
- {{ currentAddress }}
+ {{ resident.currentAreaName }}
+ {{ resident.currentAddress }}
@@ -59,13 +60,13 @@ export default {
return {
id: '',
data: [],
- currentAddress: '',
+ resident: {},
}
},
computed: {},
watch: {},
onLoad(o) {
- document.title = '居民档案'
+ document.title = '居民档案'
this.id = o.id
this.$dict.load('householdRelation', 'fileStatus').then(() => {
this.getDetail()
@@ -78,7 +79,7 @@ export default {
if (res.code == 0) {
this.data = res.data
this.$nextTick(() => {
- this.currentAddress = res.data.resident.currentAddress
+ this.resident = res.data.resident
})
}
})
diff --git a/src/apps/AppResidentFile/AppResidentFile.vue b/src/apps/AppResidentFile/AppResidentFile.vue
index cd80d654..07399788 100644
--- a/src/apps/AppResidentFile/AppResidentFile.vue
+++ b/src/apps/AppResidentFile/AppResidentFile.vue
@@ -129,7 +129,6 @@ export default {
iconPath: 'home',
selectedIconPath: 'home-fill',
text: '统计分析',
- isDot: true,
customIcon: false,
},
{
@@ -182,7 +181,7 @@ export default {
},
watch: {},
onLoad() {
- document.title = '居民信息管理'
+ document.title = '居民信息管理'
this.getEchart1()
this.areaId = this.user.areaId
},
diff --git a/src/apps/AppUniMsg/Add.vue b/src/apps/AppUniMsg/Add.vue
index bf6c06c0..dff100e8 100644
--- a/src/apps/AppUniMsg/Add.vue
+++ b/src/apps/AppUniMsg/Add.vue
@@ -7,7 +7,7 @@
-
+
diff --git a/src/common/util.js b/src/common/util.js
index c96b5e53..2b27480e 100644
--- a/src/common/util.js
+++ b/src/common/util.js
@@ -1,5 +1,5 @@
import dict from "./dict";
-import $moment from './monent';
+import dayjs from './monent';
const confirm = (content, title, config) => {
let ops = {content}
@@ -26,11 +26,11 @@ const confirm = (content, title, config) => {
const calcAge = (code) => {
let birthday
if (typeof code == 'string' && code.length == 18) {
- birthday = $moment(code.substring(6, 14), 'YYYYMMDD')
+ birthday = dayjs(code.substring(6, 14), 'YYYYMMDD')
} else if (typeof code == 'object') {
birthday = code
}
- return Math.ceil($moment().year() - $moment(birthday).year())
+ return Math.ceil(dayjs().year() - dayjs(birthday).year())
}
export default {
@@ -38,7 +38,7 @@ export default {
confirm,
calcAge,
dateFormat: (time, format) => {
- return $moment(time).format(format || 'YYYY-MM-DD').replace("Invalid Date", "")
+ return dayjs(time).format(format || 'YYYY-MM-DD').replace("Invalid Date", "")
},
formatName: (name) => {
return Array.from(name)?.slice(-2)?.toString() || "";
@@ -73,5 +73,6 @@ export default {
let hex = r << 16 | g << 8 | b;
return "#" + hex.toString(16);
}
- }
+ },
+ dayjs
}