From 2d0fbac73b82e0e3d97ff3e53b6f99776c0edb02 Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Sat, 25 Sep 2021 10:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/news.js | 53 +++++++++ pages.json | 17 ++- pages/news/detail.vue | 248 ++++++++++++++++++++++++++++++++++++++++ pages/news/index.vue | 179 +++++++++++++++++++++++++++++ 4 files changed, 496 insertions(+), 1 deletion(-) create mode 100644 apis/interfaces/news.js create mode 100644 pages/news/detail.vue create mode 100644 pages/news/index.vue 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 @@ + + + + +