# 站台設定 API 文件
## GET **取得使用者資料**
***/api/backend/homeSet/setting***
<details>
<summary>Response Data</summary>
## *response*
```js
"code":200,
"status":true,
"message":'',
// type : object
"result": {
"accName": String, // 使用者帳號
// type : object
"basicSet": {
"fansName": String , // 粉絲團名稱 若無綁定則 value = 尚未綁定粉絲團
"settingName": String , // 站台名稱
"email": String , // Email
"currency": String , // 貨幣別
"expiryDate": String // 使用到期日
},
// type : object
"communityAccount": {
"lineSubscription": Boolean , // Line 訂閱 on/off
"email": String , // 訂閱Email
// type : array
"subOption": [
// type : object * 9 (固定)
{
"name": "開播通知", // Name為固定名稱
"value": String // 0 or 1
},
{
"name": "得標通知",
"value": "1"
},
{
"name": "結帳通知",
"value": "1"
},
{
"name": "預購到貨通知",
"value": "1"
},
{
"name": "店到店通知",
"value": "1"
},
{
"name": "出貨通知",
"value": "1"
},
{
"name": "社團入單通知",
"value": "1"
},
{
"name": "粉絲團收單通知",
"value": "1"
},
{
"name": "付款提醒通知",
"value": "1"
}
],
"remindPeriod": String, // ex:'17:00 - 18:00' 時間是固定的選項嗎?
"onlyCashFlow": String, // 0 or 1 僅發送使用金流的訂單
"serviceLink": Boolean, // Line 客服底部連結 on/off
// type : object
"liveNotice": {
"status": Boolean, // 直播通知 on/off
"content": String // 直播通知內文設定
},
"getBidMessage": String , // 每一標得標發送:single,統一發送:centralized
"checkOutKeyword": String // 結帳連結關鍵字設定
},
// type : object
"security": {
"whiteList": Boolean, // 白名單 on/off
// type : array
"whiteData": [
// type : object 存放白名單資料
{
"buildTime": String, // 建立時間
"location": String, // 位置名稱
"setIP": String, // IP 位置
"id": 1
},
{
"buildTime": "2022-01-23 10:00:51",
"location": "桃園辦公室",
"setIP": "139.175.10.20",
"id": 2
}
]
}
}
```
</details>
<details>
<summary>Example</summary>
```js
"result": {
"accName": "michael_wang",
"basicSet": {
"fansName": "粉絲團名稱",
"settingName": "站台名稱",
"email": "test@gmail.com",
"currency": "TWD",
"expiryDate": "使用到期日"
},
"communityAccount": {
"lineSubscription": false,
"email": "LINE訂閱EMAIL",
"subOption": [
{
"name": "開播通知",
"value": "0"
},
{
"name": "得標通知",
"value": "1"
},
{
"name": "結帳通知",
"value": "1"
},
{
"name": "預購到貨通知",
"value": "1"
},
{
"name": "店到店通知",
"value": "1"
},
{
"name": "出貨通知",
"value": "1"
},
{
"name": "社團入單通知",
"value": "1"
},
{
"name": "粉絲團收單通知",
"value": "1"
},
{
"name": "付款提醒通知",
"value": "1"
}
],
"remindPeriod": "",
"onlyCashFlow": "1",
"serviceLink": false,
"liveNotice": {
"status": false,
"content": "直播通知內文設定"
},
"getBidMessage": "",
"checkOutKeyword": "結帳連結關鍵字設定"
},
"security": {
"whiteList": true,
"whiteData": [
{
"buildTime": "2022-01-23 10:00:51",
"location": "桃園辦公室",
"setIP": "139.175.10.20",
"id": 1
}
]
}
}
```
</details>
***
## PUT **更新使用者資料**
***/api/backend/homeSet/setting***
<details>
<summary>Request Data</summary>
## *request*
```js
// type : object
{
"accName": String, // 使用者帳號
// type : object
"basicSet": {
"fansName": String , // 粉絲團名稱
"settingName": String , // 站台名稱
"email": String , // Email
"currency": String , // 貨幣別
"expiryDate": String // 使用到期日
},
// type : object
"communityAccount": {
"lineSubscription": Boolean , // Line 訂閱 on/off
"email": String , // 訂閱Email
// type : array
"subOption": [
// type : object * 9 (固定)
{
"name": "開播通知", // Name為固定名稱
"value": String // checkBox開關 0 or 1
},
{
"name": "得標通知",
"value": "1"
},
{
"name": "結帳通知",
"value": "1"
},
{
"name": "預購到貨通知",
"value": "1"
},
{
"name": "店到店通知",
"value": "1"
},
{
"name": "出貨通知",
"value": "1"
},
{
"name": "社團入單通知",
"value": "1"
},
{
"name": "粉絲團收單通知",
"value": "1"
},
{
"name": "付款提醒通知",
"value": "1"
}
],
"remindPeriod": String, // ex:'17:00 - 18:00' 時間是固定的選項嗎?
"onlyCashFlow": String, // 0 or 1 僅發送使用金流的訂單
"serviceLink": Boolean, // Line 客服底部連結 on/off
// type : object
"liveNotice": {
"status": Boolean, // 直播通知 on/off
"content": String // 直播通知內文設定
},
"getBidMessage": String , // 每一標得標發送:single,統一發送:centralized
"checkOutKeyword": String // 結帳連結關鍵字設定
},
// type : object
"security": {
"whiteList": Boolean, // 白名單 on/off
// type : array
"whiteData": [
// type : object 存放白名單資料
{
"buildTime": String, // ex:"2022-01-23 10:00:51"
"location": String, // 位置名稱
"setIP": String, // IP 位置 ex:139.175.10.20
"id": 1
},
{
"buildTime": "2022-01-23 10:00:51",
"location": "桃園辦公室",
"setIP": "139.175.10.20",
"id": 2
}
]
}
}
```
</details>
<details>
<summary>Response Data</summary>
## *response*
```js
{
"code":200
"status":true,
"message":'',
"result": 取得新的使用者資料
}
```
</details>
***
## PATCH **變更使用者密碼**
***/api/backend/homeSet/setting/changePassword***
<details>
<summary>Request Data</summary>
## *request*
```js
// type : object
{
"ori_password" : String , // 原始密碼
"new_password" : String , // 新密碼
"check_new" : String , // 確認新密碼
}
```
</details>
<details>
<summary>Response Data</summary>
## *response*
```js
{
"code":200,
"status":true,
"message":'',
"result":{}
}
```
</details>
***
## PATCH **解除綁定粉絲團**
***/api/backend/homeSet/setting/unboundle***
<details>
<summary>Request Data</summary>
## *request*
```js
{
// 清空粉絲團專頁value
"basicSet":{
"fansName":'尚未綁定粉絲團'
}
}
```
</details>
<details>
<summary>Response Data</summary>
## *response*
```js
{
"code": 200,
"status": true,
"message": '',
"result": 重新取得使用者資料
}
```
</details>
****
## POST **新增白名單**
***/api/backend/homeSet/setting/addWhiteList***
<details>
<summary>Request Data</summary>
## *request*
```js
{
"location": String, // 位置名稱
"setIP": String, // IP
"buildTime": String // 建立時間 ex:2022-01-23 10:00:51
}
```
</details>
<details>
<summary>Response Data</summary>
## *response*
```js
{
"code": 200,
"status": true,
"message": '',
"result": 重新取得使用者資料
}
```
</details>
****
## PUT **編輯白名單**
***/api/backend/homeSet/setting/editWhiteList/:id***
<details>
<summary>Request Data</summary>
## *request*
```js
{
"location": String, // 位置名稱
"setIP": String, // IP
"buildTime": String // 建立時間 ex:2022-01-23 10:00:51
}
```
</details>
<details>
<summary>Response Data</summary>
## *response*
```js
{
"code": 200,
"status": true,
"message": '',
"result": 重新取得使用者資料
}
```
</details>
****
## DELETE **刪除白名單**
***/api/backend/homeSet/setting/editWhiteList/:id***
<details>
<summary>Response Data</summary>
## *response*
```js
{
"code": 200,
"status": true,
"message": '',
"result": 重新取得使用者資料
}
```
</details>