diff --git a/api/message.js b/api/message.js index 9980e0d..007f48c 100644 --- a/api/message.js +++ b/api/message.js @@ -20,11 +20,11 @@ const params = { messageId: id } - return fetch.post(GET_MESSAGE_INFO).then(res => res); + return fetch.get(GET_MESSAGE_INFO, params).then(res => res); } //管理员处理申请 -export function solveStatus(userId, status) { +export function solveStatus(status, userId) { useNetWork(); const params = { id: userId, diff --git a/api/message.js b/api/message.js index 9980e0d..007f48c 100644 --- a/api/message.js +++ b/api/message.js @@ -20,11 +20,11 @@ const params = { messageId: id } - return fetch.post(GET_MESSAGE_INFO).then(res => res); + return fetch.get(GET_MESSAGE_INFO, params).then(res => res); } //管理员处理申请 -export function solveStatus(userId, status) { +export function solveStatus(status, userId) { useNetWork(); const params = { id: userId, diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index fc69c1e..4d4ead6 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -29,7 +29,7 @@ - + 申请通过 @@ -67,57 +67,57 @@ { id: 'applyNo', name: '申请单号', - value: '1111111111' + value: '' }, { id: 'staffCode', name: '申请者工号', - value: '1111111111' + value: '' }, { id: 'staffName', name: '申请者姓名', - value: '张三' + value: '' }, { id: 'staffPhone', name: '申请者手机号', - value: '12345678912' + value: '' }, { id: 'visitorName', name: '访客姓名', - value: '12345678912' + value: '' }, { id: 'visitorIdCard', name: '访客身份证', - value: '123456789126415897' + value: '' }, { id: 'visitorPhone', name: '访客联系方式', - value: '123456789126415897' + value: '' }, { id: 'visitReason', name: '访问目的', - value: '商务会议' + value: '' }, { id: 'visitPosition', name: '访问区域', - value: '一期主楼' + value: '' }, { id: 'time', name: '访问时间', - value: '2022-12-12 05:45:12 ~ 2022-16-78 15:45:36' + value: '' }, { id: 'remarks', name: '备注', - value: '1212' + value: '' }, ], status: '已提交', @@ -129,13 +129,16 @@ }, mounted() { const id = getLocationParams('id'); - const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + if(uni.getStorageSync('userInfo')) { + const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + } this.userId = userInfo.id; if(userInfo.salt === '物业人员') { this.isManager = true; } else { this.isManager = false; } + this.fetchMessageInfo(id); }, methods: { handleClick(value, text) { @@ -144,7 +147,7 @@ } else { this.willchange = '3'; } - let index = this.list.findIndex(item => item.id === 'odd'); + let index = this.list.findIndex(item => item.id === 'applyNo'); if(index !== -1) { let number = this.list[index].value; this.content = `单号${number}访客访客申请${text}`; @@ -188,7 +191,7 @@ }, //管理员处理是否通过申请 async solveStatusData() { - const res = await solveStatus(this.willchange, this.userId); + await solveStatus(this.willchange, this.userId); } } } diff --git a/api/message.js b/api/message.js index 9980e0d..007f48c 100644 --- a/api/message.js +++ b/api/message.js @@ -20,11 +20,11 @@ const params = { messageId: id } - return fetch.post(GET_MESSAGE_INFO).then(res => res); + return fetch.get(GET_MESSAGE_INFO, params).then(res => res); } //管理员处理申请 -export function solveStatus(userId, status) { +export function solveStatus(status, userId) { useNetWork(); const params = { id: userId, diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index fc69c1e..4d4ead6 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -29,7 +29,7 @@ - + 申请通过 @@ -67,57 +67,57 @@ { id: 'applyNo', name: '申请单号', - value: '1111111111' + value: '' }, { id: 'staffCode', name: '申请者工号', - value: '1111111111' + value: '' }, { id: 'staffName', name: '申请者姓名', - value: '张三' + value: '' }, { id: 'staffPhone', name: '申请者手机号', - value: '12345678912' + value: '' }, { id: 'visitorName', name: '访客姓名', - value: '12345678912' + value: '' }, { id: 'visitorIdCard', name: '访客身份证', - value: '123456789126415897' + value: '' }, { id: 'visitorPhone', name: '访客联系方式', - value: '123456789126415897' + value: '' }, { id: 'visitReason', name: '访问目的', - value: '商务会议' + value: '' }, { id: 'visitPosition', name: '访问区域', - value: '一期主楼' + value: '' }, { id: 'time', name: '访问时间', - value: '2022-12-12 05:45:12 ~ 2022-16-78 15:45:36' + value: '' }, { id: 'remarks', name: '备注', - value: '1212' + value: '' }, ], status: '已提交', @@ -129,13 +129,16 @@ }, mounted() { const id = getLocationParams('id'); - const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + if(uni.getStorageSync('userInfo')) { + const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + } this.userId = userInfo.id; if(userInfo.salt === '物业人员') { this.isManager = true; } else { this.isManager = false; } + this.fetchMessageInfo(id); }, methods: { handleClick(value, text) { @@ -144,7 +147,7 @@ } else { this.willchange = '3'; } - let index = this.list.findIndex(item => item.id === 'odd'); + let index = this.list.findIndex(item => item.id === 'applyNo'); if(index !== -1) { let number = this.list[index].value; this.content = `单号${number}访客访客申请${text}`; @@ -188,7 +191,7 @@ }, //管理员处理是否通过申请 async solveStatusData() { - const res = await solveStatus(this.willchange, this.userId); + await solveStatus(this.willchange, this.userId); } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index ed2f629..adc4d34 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,92 +1,138 @@ //首页 + diff --git a/api/message.js b/api/message.js index 9980e0d..007f48c 100644 --- a/api/message.js +++ b/api/message.js @@ -20,11 +20,11 @@ const params = { messageId: id } - return fetch.post(GET_MESSAGE_INFO).then(res => res); + return fetch.get(GET_MESSAGE_INFO, params).then(res => res); } //管理员处理申请 -export function solveStatus(userId, status) { +export function solveStatus(status, userId) { useNetWork(); const params = { id: userId, diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index fc69c1e..4d4ead6 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -29,7 +29,7 @@ - + 申请通过 @@ -67,57 +67,57 @@ { id: 'applyNo', name: '申请单号', - value: '1111111111' + value: '' }, { id: 'staffCode', name: '申请者工号', - value: '1111111111' + value: '' }, { id: 'staffName', name: '申请者姓名', - value: '张三' + value: '' }, { id: 'staffPhone', name: '申请者手机号', - value: '12345678912' + value: '' }, { id: 'visitorName', name: '访客姓名', - value: '12345678912' + value: '' }, { id: 'visitorIdCard', name: '访客身份证', - value: '123456789126415897' + value: '' }, { id: 'visitorPhone', name: '访客联系方式', - value: '123456789126415897' + value: '' }, { id: 'visitReason', name: '访问目的', - value: '商务会议' + value: '' }, { id: 'visitPosition', name: '访问区域', - value: '一期主楼' + value: '' }, { id: 'time', name: '访问时间', - value: '2022-12-12 05:45:12 ~ 2022-16-78 15:45:36' + value: '' }, { id: 'remarks', name: '备注', - value: '1212' + value: '' }, ], status: '已提交', @@ -129,13 +129,16 @@ }, mounted() { const id = getLocationParams('id'); - const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + if(uni.getStorageSync('userInfo')) { + const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + } this.userId = userInfo.id; if(userInfo.salt === '物业人员') { this.isManager = true; } else { this.isManager = false; } + this.fetchMessageInfo(id); }, methods: { handleClick(value, text) { @@ -144,7 +147,7 @@ } else { this.willchange = '3'; } - let index = this.list.findIndex(item => item.id === 'odd'); + let index = this.list.findIndex(item => item.id === 'applyNo'); if(index !== -1) { let number = this.list[index].value; this.content = `单号${number}访客访客申请${text}`; @@ -188,7 +191,7 @@ }, //管理员处理是否通过申请 async solveStatusData() { - const res = await solveStatus(this.willchange, this.userId); + await solveStatus(this.willchange, this.userId); } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index ed2f629..adc4d34 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,92 +1,138 @@ //首页 + diff --git a/pages/message/message.vue b/pages/message/message.vue index 245e964..91853c8 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -4,7 +4,7 @@ {{item.date}} - + @@ -14,12 +14,13 @@ {{item.number}} - 申请{{item.status}} + 申请{{item.status}} {{item.startTime}} {{item.endTime}} + - + 申请通过 @@ -67,57 +67,57 @@ { id: 'applyNo', name: '申请单号', - value: '1111111111' + value: '' }, { id: 'staffCode', name: '申请者工号', - value: '1111111111' + value: '' }, { id: 'staffName', name: '申请者姓名', - value: '张三' + value: '' }, { id: 'staffPhone', name: '申请者手机号', - value: '12345678912' + value: '' }, { id: 'visitorName', name: '访客姓名', - value: '12345678912' + value: '' }, { id: 'visitorIdCard', name: '访客身份证', - value: '123456789126415897' + value: '' }, { id: 'visitorPhone', name: '访客联系方式', - value: '123456789126415897' + value: '' }, { id: 'visitReason', name: '访问目的', - value: '商务会议' + value: '' }, { id: 'visitPosition', name: '访问区域', - value: '一期主楼' + value: '' }, { id: 'time', name: '访问时间', - value: '2022-12-12 05:45:12 ~ 2022-16-78 15:45:36' + value: '' }, { id: 'remarks', name: '备注', - value: '1212' + value: '' }, ], status: '已提交', @@ -129,13 +129,16 @@ }, mounted() { const id = getLocationParams('id'); - const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + if(uni.getStorageSync('userInfo')) { + const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + } this.userId = userInfo.id; if(userInfo.salt === '物业人员') { this.isManager = true; } else { this.isManager = false; } + this.fetchMessageInfo(id); }, methods: { handleClick(value, text) { @@ -144,7 +147,7 @@ } else { this.willchange = '3'; } - let index = this.list.findIndex(item => item.id === 'odd'); + let index = this.list.findIndex(item => item.id === 'applyNo'); if(index !== -1) { let number = this.list[index].value; this.content = `单号${number}访客访客申请${text}`; @@ -188,7 +191,7 @@ }, //管理员处理是否通过申请 async solveStatusData() { - const res = await solveStatus(this.willchange, this.userId); + await solveStatus(this.willchange, this.userId); } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index ed2f629..adc4d34 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,92 +1,138 @@ //首页 + diff --git a/pages/message/message.vue b/pages/message/message.vue index 245e964..91853c8 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -4,7 +4,7 @@ {{item.date}} - + @@ -14,12 +14,13 @@ {{item.number}} - 申请{{item.status}} + 申请{{item.status}} {{item.startTime}} {{item.endTime}} + - + 申请通过 @@ -67,57 +67,57 @@ { id: 'applyNo', name: '申请单号', - value: '1111111111' + value: '' }, { id: 'staffCode', name: '申请者工号', - value: '1111111111' + value: '' }, { id: 'staffName', name: '申请者姓名', - value: '张三' + value: '' }, { id: 'staffPhone', name: '申请者手机号', - value: '12345678912' + value: '' }, { id: 'visitorName', name: '访客姓名', - value: '12345678912' + value: '' }, { id: 'visitorIdCard', name: '访客身份证', - value: '123456789126415897' + value: '' }, { id: 'visitorPhone', name: '访客联系方式', - value: '123456789126415897' + value: '' }, { id: 'visitReason', name: '访问目的', - value: '商务会议' + value: '' }, { id: 'visitPosition', name: '访问区域', - value: '一期主楼' + value: '' }, { id: 'time', name: '访问时间', - value: '2022-12-12 05:45:12 ~ 2022-16-78 15:45:36' + value: '' }, { id: 'remarks', name: '备注', - value: '1212' + value: '' }, ], status: '已提交', @@ -129,13 +129,16 @@ }, mounted() { const id = getLocationParams('id'); - const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + if(uni.getStorageSync('userInfo')) { + const userInfo = JSON.parse(uni.getStorageSync('userInfo')); + } this.userId = userInfo.id; if(userInfo.salt === '物业人员') { this.isManager = true; } else { this.isManager = false; } + this.fetchMessageInfo(id); }, methods: { handleClick(value, text) { @@ -144,7 +147,7 @@ } else { this.willchange = '3'; } - let index = this.list.findIndex(item => item.id === 'odd'); + let index = this.list.findIndex(item => item.id === 'applyNo'); if(index !== -1) { let number = this.list[index].value; this.content = `单号${number}访客访客申请${text}`; @@ -188,7 +191,7 @@ }, //管理员处理是否通过申请 async solveStatusData() { - const res = await solveStatus(this.willchange, this.userId); + await solveStatus(this.willchange, this.userId); } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index ed2f629..adc4d34 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,92 +1,138 @@ //首页 + diff --git a/pages/message/message.vue b/pages/message/message.vue index 245e964..91853c8 100644 --- a/pages/message/message.vue +++ b/pages/message/message.vue @@ -4,7 +4,7 @@ {{item.date}} - + @@ -14,12 +14,13 @@ {{item.number}} - 申请{{item.status}} + 申请{{item.status}} {{item.startTime}} {{item.endTime}} +