https://github.com/ipuppet/start-page
https://github.com/ipuppet/start-page
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ipuppet/start-page
- Owner: ipuppet
- License: mit
- Created: 2022-01-04T15:41:22.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-02T07:37:19.000Z (about 3 years ago)
- Last Synced: 2023-03-04T02:25:23.920Z (over 2 years ago)
- Language: Vue
- Size: 760 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# start-page
一个简单的起始页
# get 参数
- `backgroundImageApi`
base64 编码的图片 URL
- `bookmarkApi`
base64 编码的后端地址,默认为:
```js
const api = `${process.env.VUE_APP_TRANSFER_PROTOCOL}://${process.env.VUE_APP_DOMAIN}`
const bookmarkApi = Base64.encode(`${api}/api/bookmark`)
```- `bookmarkApiPassword`
后端接口所使用的密码,不要进行编码
# 书签接口
假设您的后端地址为 `https://yoursite.com/api/bookmark`,则向后端请求时的 URL 将会被拼接成如下形式:
`https://yoursite.com/api/bookmark?password=yourpassword`
您的后端需要验证 `query` 参数 `password`
- `get` 请求
获取书签
- `post` 请求
保存书签
返回值应为 `json` 对象:
```json
{
"status": true
}
```## 收发数据格式
```json
[
{
"title": "哔哩哔哩 (゜-゜)つロ 干杯~-bilibili",
"icon": "https://www.bilibili.com/favicon.ico?v=1",
"url": "https://www.bilibili.com"
},
{
"title": "Github",
"url": "https://github.com"
}
]
```其中 `icon` 为可选字段。