diff --git a/api/index.js b/api/index.js index 246ee23..f832a2c 100644 --- a/api/index.js +++ b/api/index.js @@ -2,12 +2,21 @@ import BASE_URL from './base.js'; import useNetWork from '@/common/useNetWork.js'; -const GET_USER_INFO = BASE_URL + '/user/userLogin'; -export function getUserInfo(phone) { +const VERIFY_PHONE = BASE_URL + '/user/userLogin'; +const GET_USER_INFO = BASE_URL + '/user/getUserInfo'; + +//验证手机号是否为员工 +export function verifyPhone(phone) { useNetWork(); const params = { phoneCode: phone, }; - return fetch.post(GET_USER_INFO, params).then(res => res); + return fetch.post(VERIFY_PHONE, params).then(res => res); +} + +//获取用户信息 +export function getUserInfo(phone) { + useNetWork(); + return fetch.post(GET_USER_INFO).then(res => res); } \ No newline at end of file diff --git a/api/index.js b/api/index.js index 246ee23..f832a2c 100644 --- a/api/index.js +++ b/api/index.js @@ -2,12 +2,21 @@ import BASE_URL from './base.js'; import useNetWork from '@/common/useNetWork.js'; -const GET_USER_INFO = BASE_URL + '/user/userLogin'; -export function getUserInfo(phone) { +const VERIFY_PHONE = BASE_URL + '/user/userLogin'; +const GET_USER_INFO = BASE_URL + '/user/getUserInfo'; + +//验证手机号是否为员工 +export function verifyPhone(phone) { useNetWork(); const params = { phoneCode: phone, }; - return fetch.post(GET_USER_INFO, params).then(res => res); + return fetch.post(VERIFY_PHONE, params).then(res => res); +} + +//获取用户信息 +export function getUserInfo(phone) { + useNetWork(); + return fetch.post(GET_USER_INFO).then(res => res); } \ No newline at end of file diff --git a/api/message.js b/api/message.js new file mode 100644 index 0000000..d233cf0 --- /dev/null +++ b/api/message.js @@ -0,0 +1,25 @@ + +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; +import useNetWork from '@/common/useNetWork.js'; + + +const GET_MESSAGE_LIST = BASE_URL + '/visitor/getMessageList'; +const GET_MESSAGE_INFO = BASE_URL + '/visitor/getMessageInfo'; + +//消息列表 +export function getMessageList(phone) { + useNetWork(); + return fetch.post(GET_MESSAGE_LIST).then(res => res); +} + +//消息详情 +export function getMessageInfo(id) { + useNetWork(); + const params = { + messageId: id + } + return fetch.post(GET_MESSAGE_INFO).then(res => res); +} + +//管理员处理 diff --git a/api/index.js b/api/index.js index 246ee23..f832a2c 100644 --- a/api/index.js +++ b/api/index.js @@ -2,12 +2,21 @@ import BASE_URL from './base.js'; import useNetWork from '@/common/useNetWork.js'; -const GET_USER_INFO = BASE_URL + '/user/userLogin'; -export function getUserInfo(phone) { +const VERIFY_PHONE = BASE_URL + '/user/userLogin'; +const GET_USER_INFO = BASE_URL + '/user/getUserInfo'; + +//验证手机号是否为员工 +export function verifyPhone(phone) { useNetWork(); const params = { phoneCode: phone, }; - return fetch.post(GET_USER_INFO, params).then(res => res); + return fetch.post(VERIFY_PHONE, params).then(res => res); +} + +//获取用户信息 +export function getUserInfo(phone) { + useNetWork(); + return fetch.post(GET_USER_INFO).then(res => res); } \ No newline at end of file diff --git a/api/message.js b/api/message.js new file mode 100644 index 0000000..d233cf0 --- /dev/null +++ b/api/message.js @@ -0,0 +1,25 @@ + +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; +import useNetWork from '@/common/useNetWork.js'; + + +const GET_MESSAGE_LIST = BASE_URL + '/visitor/getMessageList'; +const GET_MESSAGE_INFO = BASE_URL + '/visitor/getMessageInfo'; + +//消息列表 +export function getMessageList(phone) { + useNetWork(); + return fetch.post(GET_MESSAGE_LIST).then(res => res); +} + +//消息详情 +export function getMessageInfo(id) { + useNetWork(); + const params = { + messageId: id + } + return fetch.post(GET_MESSAGE_INFO).then(res => res); +} + +//管理员处理 diff --git a/common/fetch.js b/common/fetch.js index 1efb372..b9d05fa 100644 --- a/common/fetch.js +++ b/common/fetch.js @@ -36,8 +36,8 @@ resolve('用户未注册'); } else { uni.showToast({ - title: "系统异常,请稍后再试!", - // title: `${data.data.message}`, + // title: "系统异常,请稍后再试!", + title: `${data.data.message}`, icon: "none", duration: 2000, }); diff --git a/api/index.js b/api/index.js index 246ee23..f832a2c 100644 --- a/api/index.js +++ b/api/index.js @@ -2,12 +2,21 @@ import BASE_URL from './base.js'; import useNetWork from '@/common/useNetWork.js'; -const GET_USER_INFO = BASE_URL + '/user/userLogin'; -export function getUserInfo(phone) { +const VERIFY_PHONE = BASE_URL + '/user/userLogin'; +const GET_USER_INFO = BASE_URL + '/user/getUserInfo'; + +//验证手机号是否为员工 +export function verifyPhone(phone) { useNetWork(); const params = { phoneCode: phone, }; - return fetch.post(GET_USER_INFO, params).then(res => res); + return fetch.post(VERIFY_PHONE, params).then(res => res); +} + +//获取用户信息 +export function getUserInfo(phone) { + useNetWork(); + return fetch.post(GET_USER_INFO).then(res => res); } \ No newline at end of file diff --git a/api/message.js b/api/message.js new file mode 100644 index 0000000..d233cf0 --- /dev/null +++ b/api/message.js @@ -0,0 +1,25 @@ + +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; +import useNetWork from '@/common/useNetWork.js'; + + +const GET_MESSAGE_LIST = BASE_URL + '/visitor/getMessageList'; +const GET_MESSAGE_INFO = BASE_URL + '/visitor/getMessageInfo'; + +//消息列表 +export function getMessageList(phone) { + useNetWork(); + return fetch.post(GET_MESSAGE_LIST).then(res => res); +} + +//消息详情 +export function getMessageInfo(id) { + useNetWork(); + const params = { + messageId: id + } + return fetch.post(GET_MESSAGE_INFO).then(res => res); +} + +//管理员处理 diff --git a/common/fetch.js b/common/fetch.js index 1efb372..b9d05fa 100644 --- a/common/fetch.js +++ b/common/fetch.js @@ -36,8 +36,8 @@ resolve('用户未注册'); } else { uni.showToast({ - title: "系统异常,请稍后再试!", - // title: `${data.data.message}`, + // title: "系统异常,请稍后再试!", + title: `${data.data.message}`, icon: "none", duration: 2000, }); diff --git a/pages/checkMessageDetail/checkMessageDetail.vue b/pages/checkMessageDetail/checkMessageDetail.vue index 9dadf09..dd5b803 100644 --- a/pages/checkMessageDetail/checkMessageDetail.vue +++ b/pages/checkMessageDetail/checkMessageDetail.vue @@ -23,7 +23,7 @@ class="content" v-for="item in list" :key="item.id" - v-if="status === '已提交' && isManager ? true : item.id === 'phone' || item.id === 'name' ? false : true"> + v-if="status === '已提交' && isManager ? true : item.id === 'staffPhone' || item.id === 'staffName' ? false : true"> {{item.name}} {{item.value}} @@ -54,30 +54,32 @@