阶段更新
This commit is contained in:
4
modules/Configuration/.gitignore
vendored
4
modules/Configuration/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
.idea
|
||||
vendor
|
||||
.DS_Store
|
||||
composer.lock
|
||||
@@ -1,6 +0,0 @@
|
||||
# laravel-configuration-module
|
||||
|
||||
# 参数配置模块
|
||||
|
||||
## 需要config的模块配置
|
||||
|
||||
4
modules/Coupon/.gitignore
vendored
4
modules/Coupon/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
.idea
|
||||
vendor
|
||||
.DS_Store
|
||||
composer.lock
|
||||
@@ -1,10 +0,0 @@
|
||||
# 优惠券模块
|
||||
|
||||
> 1、发布config并配置相关模型
|
||||
|
||||
> 2、关联traits
|
||||
|
||||
```php
|
||||
Shop Model
|
||||
use HasStores,HasCoupons;
|
||||
```
|
||||
@@ -1,154 +0,0 @@
|
||||
# Notification
|
||||
|
||||
通知模块
|
||||
|
||||
## 1. 安装
|
||||
|
||||
```shell
|
||||
composer require getuilaboratory/getui-pushapi-php-client-v2
|
||||
```
|
||||
|
||||
## 2. 接口文档
|
||||
|
||||
### 1. 获取未读消息数量(不登陆返回0)
|
||||
|
||||
> GET: /api/notifications/counts
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": 16
|
||||
}
|
||||
```
|
||||
|
||||
### 2. 消息主页
|
||||
|
||||
> GET: /api/notifications
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": [
|
||||
{
|
||||
"type": "SystemNotification",
|
||||
"icon": "",
|
||||
"name": "系统通知",
|
||||
"count": 16,
|
||||
"title": "登录成功"
|
||||
},
|
||||
{
|
||||
"type": "OrderNotification",
|
||||
"icon": "",
|
||||
"name": "订单通知",
|
||||
"count": 0,
|
||||
"title": ""
|
||||
},
|
||||
{
|
||||
"type": "ActivityNotification",
|
||||
"icon": "",
|
||||
"name": "活动通知",
|
||||
"count": 0,
|
||||
"title": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 3. 分类消息的列表
|
||||
|
||||
> GET: /api/notifications/{type}/list
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": {
|
||||
"data": [
|
||||
{
|
||||
"notification_id": "91e31d1e-95e1-40ff-88d8-8049df974860",
|
||||
"type": "SystemNotification",
|
||||
"title": "登录成功",
|
||||
"content": "您于北京时间:2021-07-02 15:31:03,通过【账号密码】渠道,在IP:1.190.203.218成功登录系统。请注意保管好您的账号密码。",
|
||||
"read_at": "",
|
||||
"created_at": "2021-07-02 15:31:03"
|
||||
}
|
||||
],
|
||||
"page": {
|
||||
"current": 1,
|
||||
"total_page": 2,
|
||||
"per_page": 15,
|
||||
"has_more": true,
|
||||
"total": 16
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 4. 消息详情
|
||||
|
||||
> GET: /api/notifications/{notification_id}
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": {
|
||||
"notification_id": "91e31d1e-95e1-40ff-88d8-8049df974860",
|
||||
"type": "SystemNotification",
|
||||
"title": "登录成功",
|
||||
"content": "您于北京时间:2021-07-02 15:31:03,通过【账号密码】渠道,在IP:1.190.203.218成功登录系统。请注意保管好您的账号密码。",
|
||||
"read_at": "2021-07-02 16:27:07",
|
||||
"created_at": "2021-07-02 15:31:03"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5. 全部标记已读
|
||||
|
||||
> PUT: /api/notifications
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": ""
|
||||
}
|
||||
```
|
||||
|
||||
### 6. 全部标记已读(分类)
|
||||
|
||||
> PUT: /api/notifications/{type}
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": ""
|
||||
}
|
||||
```
|
||||
|
||||
### 7. 清空全部消息
|
||||
|
||||
> DELETE: /api/notifications
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": ""
|
||||
}
|
||||
```
|
||||
|
||||
### 8. 清空分类消息
|
||||
|
||||
> DELETE: /api/notifications/{type}
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "SUCCESS",
|
||||
"status_code": 200,
|
||||
"data": ""
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user