diff --git a/apis/interfaces/news.js b/apis/interfaces/news.js new file mode 100644 index 0000000..644d82f --- /dev/null +++ b/apis/interfaces/news.js @@ -0,0 +1,53 @@ +/** + * Web-zdx + * moduleName: 通知消息列表 + */ + +import {request} from '../index.js' + +// 消息列表 +const notificationsType = () => { + return request({ + url: 'notifications', + method: 'GET' + }) +} +// 根据type 获取具体消息列表 +const notificationsList = (type,data) => { + return request({ + url: 'notifications/'+type+'/list', + method: 'GET', + data:data + }) +} +// 根据type 全部已读 +const notificationsReaded = (type) => { + return request({ + url: 'notifications/'+type, + method: 'PUT' + }) +} +// 根据type 全部已读 +const notificationsDelete= () => { + return request({ + url: 'notifications', + method: 'DELETE' + }) +} +// 根据消息id获取消息详情 +const notificationsDetail= (id) => { + return request({ + url: 'notifications/'+id, + method: 'get' + }) +} + + + +export { + notificationsType, + notificationsList, + notificationsDetail, + notificationsReaded, + notificationsDelete +} diff --git a/pages.json b/pages.json index 643815a..9b7799b 100644 --- a/pages.json +++ b/pages.json @@ -129,7 +129,22 @@ "style": { "navigationBarTitleText": "企业认证" } - }], + },{ + "path": "pages/news/index", + "name": "news", + "auth": true, + "style": { + "navigationBarTitleText": "消息中心" + } + },{ + "path": "pages/news/detail", + "name": "newsDetail", + "auth": true, + "style": { + "navigationBarTitleText": "消息列表" + } + } + ], "globalStyle": { "navigationStyle": "custom", "backgroundColor": "#F5F5F5" diff --git a/pages/news/detail.vue b/pages/news/detail.vue new file mode 100644 index 0000000..3b283d0 --- /dev/null +++ b/pages/news/detail.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/pages/news/index.vue b/pages/news/index.vue new file mode 100644 index 0000000..ded065a --- /dev/null +++ b/pages/news/index.vue @@ -0,0 +1,179 @@ + + + + +