# 商城模块

控制层 TypechoShopController @author buxia97 @date 2022/01/27

**类路径**：`ShopController`
**前缀**：`/typechoShop`

## 1. shopList

**接口路径**：`GET/POST /typechoShop/shopList`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：商品列表

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| searchParams | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| page | Integer | 否 | 1 |  |
| searchKey | String | 否 | - |  |
| order | String | 否 | created |  |
| limit | Integer | 否 | 15 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopList()  （https://api.ruletree.club/typechoShop/shopList）

---

## 2. shopInfo

**接口路径**：`GET/POST /typechoShop/shopInfo`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：查询商品详情

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| key | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopInfo()  （https://api.ruletree.club/typechoShop/shopInfo）

---

## 3. addShop

**接口路径**：`GET/POST /typechoShop/addShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：添加商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |
| text | String | 否 | - |  |
| isSpace | Integer | 否 | 0 |  |
| isMd | Integer | 否 | 1 |  |
| verifyCode | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.addShop()  （https://api.ruletree.club/typechoShop/addShop）

---

## 4. editShop

**接口路径**：`GET/POST /typechoShop/editShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：修改商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |
| text | String | 否 | - |  |
| isMd | Integer | 否 | 1 |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.editShop()  （https://api.ruletree.club/typechoShop/editShop）

---

## 5. deleteShop

**接口路径**：`GET/POST /typechoShop/deleteShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：删除商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| key | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.deleteShop()  （https://api.ruletree.club/typechoShop/deleteShop）

---

## 6. addRecommend

**接口路径**：`GET/POST /typechoShop/addRecommend`

**权限**：需要超级管理员权限

**接口说明**：商品推荐

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| isRecommend | Integer | 否 | 1 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.addRecommend()  （https://api.ruletree.club/typechoShop/addRecommend）

---

## 7. auditShop

**接口路径**：`GET/POST /typechoShop/auditShop`

**权限**：需要管理员或编辑权限

**接口说明**：审核商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| key | String | 否 | - |  |
| token | String | 否 | - |  |
| type | Integer | 否 | - |  |
| reason | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.auditShop()  （https://api.ruletree.club/typechoShop/auditShop）

---

## 8. buyShop

**接口路径**：`GET/POST /typechoShop/buyShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：购买商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| sid | String | 否 | - |  |
| quantity | Integer | 否 | 1 |  |
| isIntegral | Integer | 否 | 0 |  |
| address | String | 否 | - |  |
| remark | String | 否 | - |  |
| model | Integer | 否 | 0 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.buyShop()  （https://api.ruletree.club/typechoShop/buyShop）

---

## 9. unlockByAd

**接口路径**：`POST /typechoShop/unlockByAd`

**权限**：需要登录（普通用户及以上）

**接口说明**：广告解锁付费内容

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |
| sid | Integer | 否 | - |  |
| logid | Integer | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.unlockByAd()  （https://api.ruletree.club/typechoShop/unlockByAd）

---

## 10. buyVIP

**接口路径**：`GET/POST /typechoShop/buyVIP`

**权限**：需要登录（普通用户及以上）

**接口说明**：购买VIP

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| day | Integer | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.buyVIP()  （https://api.ruletree.club/typechoShop/buyVIP）

---

## 11. vipInfo

**接口路径**：`GET/POST /typechoShop/vipInfo`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：VIP信息

**请求参数**：

无请求参数

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.getVipInfo()  （https://api.ruletree.club/typechoShop/vipInfo）

---

## 12. mountShop

**接口路径**：`GET/POST /typechoShop/mountShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：文章挂载商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| cid | String | 否 | - |  |
| sid | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.mountShop()  （https://api.ruletree.club/typechoShop/mountShop）

---

## 13. isBuyShop

**接口路径**：`GET/POST /typechoShop/isBuyShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：查询商品是否已经购买过

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| sid | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.buyShop()  （https://api.ruletree.club/typechoShop/buyShop）
- 前端调用：this.$API.isBuyShop()  （https://api.ruletree.club/typechoShop/isBuyShop）

---

## 14. buyVIPpackage

**接口路径**：`GET/POST /typechoShop/buyVIPpackage`

**权限**：需要登录（普通用户及以上）

**接口说明**：购买VIP(新版，自定义套餐模式)

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.buyVIP()  （https://api.ruletree.club/typechoShop/buyVIP）
- 前端调用：this.$API.buyVIPpackage()  （https://api.ruletree.club/typechoShop/buyVIPpackage）

---

## 15. addShopType

**接口路径**：`GET/POST /typechoShop/addShopType`

**权限**：需要管理员或编辑权限

**接口说明**：添加商品分类

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.addShop()  （https://api.ruletree.club/typechoShop/addShop）
- 前端调用：this.$API.addShopType()  （https://api.ruletree.club/typechoShop/addShopType）

---

## 16. editShopType

**接口路径**：`GET/POST /typechoShop/editShopType`

**权限**：需要超级管理员权限

**接口说明**：修改商品分类

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.editShop()  （https://api.ruletree.club/typechoShop/editShop）
- 前端调用：this.$API.editShopType()  （https://api.ruletree.club/typechoShop/editShopType）

---

## 17. deleteShopType

**接口路径**：`GET/POST /typechoShop/deleteShopType`

**权限**：需要超级管理员权限

**接口说明**：删除分类

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.deleteShop()  （https://api.ruletree.club/typechoShop/deleteShop）
- 前端调用：this.$API.deleteShopType()  （https://api.ruletree.club/typechoShop/deleteShopType）

---

## 18. shopTypeList

**接口路径**：`GET/POST /typechoShop/shopTypeList`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：查询商品分类

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| searchParams | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| page | Integer | 否 | 1 |  |
| limit | Integer | 否 | 15 |  |
| searchKey | String | 否 | - |  |
| order | String | 否 | orderKey |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopTypeList()  （https://api.ruletree.club/typechoShop/shopTypeList）

---

## 19. shopTypeInfo

**接口路径**：`GET/POST /typechoShop/shopTypeInfo`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：商品分类信息

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopTypeInfo()  （https://api.ruletree.club/typechoShop/shopTypeInfo）

---

## 20. shopMark

**接口路径**：`GET/POST /typechoShop/shopMark`

**权限**：需要登录（普通用户及以上）

**接口说明**：商品收藏

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| type | Integer | 否 | 1 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopMark()  （https://api.ruletree.club/typechoShop/shopMark）

---

## 21. shopMarkList

**接口路径**：`GET/POST /typechoShop/shopMarkList`

**权限**：需要登录（普通用户及以上）

**接口说明**：商品收藏列表

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| page | Integer | 否 | 1 |  |
| limit | Integer | 否 | 15 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopMark()  （https://api.ruletree.club/typechoShop/shopMark）
- 前端调用：this.$API.shopMarkList()  （https://api.ruletree.club/typechoShop/shopMarkList）

---

## 22. setCart

**接口路径**：`GET/POST /typechoShop/setCart`

**权限**：需要登录（普通用户及以上）

**接口说明**：商品加入购物车

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| sid | Integer | 否 | 0 |  |
| num | Integer | 否 | 1 |  |
| model | Integer | 否 | 0 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.setCart()  （https://api.ruletree.club/typechoShop/setCart）

---

## 23. myCartNum

**接口路径**：`GET/POST /typechoShop/myCartNum`

**权限**：需要登录（普通用户及以上）

**接口说明**：购物车数量

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.myCartNum()  （https://api.ruletree.club/typechoShop/myCartNum）

---

## 24. deleteCart

**接口路径**：`GET/POST /typechoShop/deleteCart`

**权限**：需要登录（普通用户及以上）

**接口说明**：商品从购物车删除

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | 0 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.deleteCart()  （https://api.ruletree.club/typechoShop/deleteCart）

---

## 25. EditSumCart

**接口路径**：`GET/POST /typechoShop/editSumCart`

**权限**：需要登录（普通用户及以上）

**接口说明**：修改购物车里的商品数量

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | 0 |  |
| num | Integer | 否 | 0 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.editSumCart()  （https://api.ruletree.club/typechoShop/editSumCart）

---

## 26. myCartList

**接口路径**：`GET/POST /typechoShop/myCartList`

**权限**：需要登录（普通用户及以上）

**接口说明**：商品收藏列表

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| page | Integer | 否 | 1 |  |
| limit | Integer | 否 | 15 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.myCartList()  （https://api.ruletree.club/typechoShop/myCartList）

---

## 27. merchantEditOrder

**接口路径**：`GET/POST /typechoShop/merchantEditOrder`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户订单状态修改（商户操作）

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| orderId | Integer | 否 | 1 |  |
| status | String | 否 | Progress |  |
| trackingNumber | String | 否 | - |  |
| trackingType | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantEditOrder()  （https://api.ruletree.club/typechoShop/merchantEditOrder）

---

## 28. userEditOrder

**接口路径**：`GET/POST /typechoShop/userEditOrder`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户订单状态修改（用户操作）

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| orderId | Integer | 否 | 1 |  |
| status | String | 否 | Progress |  |
| trackingNumber | String | 否 | - |  |
| trackingType | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.userEdit()  （https://api.ruletree.club/typechoUsers/userEdit）
- 前端调用：this.$API.userEditOrder()  （https://api.ruletree.club/typechoShop/userEditOrder）

---

## 29. shopOrderList

**接口路径**：`GET/POST /typechoShop/shopOrderList`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：订单列表（新）

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| searchParams | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| page | Integer | 否 | 1 |  |
| searchKey | String | 否 | - |  |
| order | String | 否 | orderTime |  |
| limit | Integer | 否 | 15 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopOrderList()  （https://api.ruletree.club/typechoShop/shopOrderList）
- 前端调用：this.$API.orderList()  （https://api.ruletree.club/typechoUserlog/orderList）

---

## 30. urgeShipment

**接口路径**：`GET/POST /typechoShop/urgeShipment`

**权限**：需要登录（普通用户及以上）

**接口说明**：用户催发货

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.urgeShipment()  （https://api.ruletree.club/typechoShop/urgeShipment）

---

## 31. setArrived

**接口路径**：`GET/POST /typechoShop/setArrived`

**权限**：需要登录（普通用户及以上）

**接口说明**：商家标记/更新送达时间

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.setArrived()  （https://api.ruletree.club/typechoShop/setArrived）

---

## 32. storeList

**接口路径**：`GET/POST /typechoShop/storeList`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：店铺列表

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| searchParams | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| page | Integer | 否 | 1 |  |
| searchKey | String | 否 | - |  |
| order | String | 否 | created |  |
| limit | Integer | 否 | 15 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.storeList()  （https://api.ruletree.club/typechoShop/storeList）

---

## 33. storeInfo

**接口路径**：`GET/POST /typechoShop/storeInfo`

**权限**：需要登录（普通用户及以上）

**接口说明**：店铺详情

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.storeInfo()  （https://api.ruletree.club/typechoShop/storeInfo）

---

## 34. addStore

**接口路径**：`GET/POST /typechoShop/addStore`

**权限**：需要登录（普通用户及以上）

**接口说明**：创建店铺

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.addStore()  （https://api.ruletree.club/typechoShop/addStore）

---

## 35. editStore

**接口路径**：`GET/POST /typechoShop/editStore`

**权限**：需要登录（普通用户及以上）

**接口说明**：修改店铺

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.editStore()  （https://api.ruletree.club/typechoShop/editStore）

---

## 36. manageStoreEdit

**接口路径**：`GET/POST /typechoShop/manageStoreEdit`

**权限**：需要管理员或编辑权限

**接口说明**：管理员编辑店铺

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

---

## 37. deleteStore

**接口路径**：`GET/POST /typechoShop/deleteStore`

**权限**：需要登录（普通用户及以上）

**接口说明**：删除店铺（管理员）

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.deleteStore()  （https://api.ruletree.club/typechoShop/deleteStore）

---

## 38. storeMargin

**接口路径**：`GET/POST /typechoShop/storeMargin`

**权限**：需要登录（普通用户及以上）

**接口说明**：缴纳/追加保证金

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| margin | BigDecimal | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.storeMargin()  （https://api.ruletree.club/typechoShop/storeMargin）

---

## 39. storeReview

**接口路径**：`GET/POST /typechoShop/storeReview`

**权限**：需要登录（普通用户及以上）

**接口说明**：店铺审核

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| type | Integer | 否 | 1 |  |
| msg | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.storeReview()  （https://api.ruletree.club/typechoShop/storeReview）

---

## 40. shopCommentList

**接口路径**：`GET/POST /typechoShop/shopCommentList`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：商品评论列表

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| searchParams | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| page | Integer | 否 | 1 |  |
| searchKey | String | 否 | - |  |
| order | String | 否 | created |  |
| limit | Integer | 否 | 15 |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopCommentList()  （https://api.ruletree.club/typechoShop/shopCommentList）

---

## 41. addShopComment

**接口路径**：`GET/POST /typechoShop/addShopComment`

**权限**：需要登录（普通用户及以上）

**接口说明**：添加评论

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| sid | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.addShop()  （https://api.ruletree.club/typechoShop/addShop）
- 前端调用：this.$API.addShopComment()  （https://api.ruletree.club/typechoShop/addShopComment）

---

## 42. deleteShopComment

**接口路径**：`GET/POST /typechoShop/deleteShopComment`

**权限**：需要登录（普通用户及以上）

**接口说明**：删除评论（只有用户或者管理员）

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.deleteShop()  （https://api.ruletree.club/typechoShop/deleteShop）
- 前端调用：this.$API.deleteShopComment()  （https://api.ruletree.club/typechoShop/deleteShopComment）

---

## 43. shopCommentReview

**接口路径**：`GET/POST /typechoShop/shopCommentReview`

**权限**：需要登录（普通用户及以上）

**接口说明**：评价审核

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| type | Integer | 否 | 1 |  |
| msg | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopCommentReview()  （https://api.ruletree.club/typechoShop/shopCommentReview）

---

## 44. userReplyComment

**接口路径**：`GET/POST /typechoShop/userReplyComment`

**权限**：需要登录（普通用户及以上）

**接口说明**：用户追评

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| reply | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.userReplyComment()  （https://api.ruletree.club/typechoShop/userReplyComment）

---

## 45. merchantReplyComment

**接口路径**：`GET/POST /typechoShop/merchantReplyComment`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户回复

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |
| reply | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantReplyComment()  （https://api.ruletree.club/typechoShop/merchantReplyComment）

---

## 46. shopCommentInfo

**接口路径**：`GET/POST /typechoShop/shopCommentInfo`

**权限**：需要登录（普通用户及以上）

**接口说明**：评论详情

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | Integer | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

---

## 47. shopStatistics

**接口路径**：`GET/POST /typechoShop/shopStatistics`

**权限**：需要超级管理员权限

**接口说明**：商城统计接口 返回内容包含： 1. 在售商品、商品总数、订单数量、成交金额 2. 活跃会员、最近七天销售情况 3. 财务统计数据、支付渠道占比 4. 总库存数量、店铺平均评分

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

---

## 48. myEarn

**接口路径**：`GET/POST /typechoShop/myEarn`

**权限**：需要登录（普通用户及以上）

**接口说明**：获取我赚到的

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.myEarn()  （https://api.ruletree.club/typechoShop/myEarn）

---

## 49. shopModelList

**接口路径**：`GET/POST /typechoShop/shopModelList`

**权限**：公开接口；但当系统配置 isLogin=1 时会强制要求登录

**接口说明**：商品型号列表

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| sid | Integer | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopModelList()  （https://api.ruletree.club/typechoShop/shopModelList）

---

## 50. shopModelAdd

**接口路径**：`GET/POST /typechoShop/shopModelAdd`

**权限**：需要登录（普通用户及以上）

**接口说明**：商品型号添加

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopModelAdd()  （https://api.ruletree.club/typechoShop/shopModelAdd）

---

## 51. shopModelEdit

**接口路径**：`GET/POST /typechoShop/shopModelEdit`

**权限**：需要登录（普通用户及以上）

**接口说明**：修改商品型号

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| params | String（JSON 字符串，需后端解析） | 否 | - | JSON 字符串，需后端解析 |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopModelEdit()  （https://api.ruletree.club/typechoShop/shopModelEdit）

---

## 52. shopModelDelete

**接口路径**：`GET/POST /typechoShop/shopModelDelete`

**权限**：需要登录（普通用户及以上）

**接口说明**：删除商品型号

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| id | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.shopModelDelete()  （https://api.ruletree.club/typechoShop/shopModelDelete）

---

## 53. buyCartShop

**接口路径**：`GET/POST /typechoShop/buyCartShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：购买商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| cartShop | String | 否 | - |  |
| isIntegral | Integer | 否 | 0 |  |
| address | String | 否 | - |  |
| remark | String | 否 | - |  |
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.buyCartShop()  （https://api.ruletree.club/typechoShop/buyCartShop）

---

## 54. followShop

**接口路径**：`GET/POST /typechoShop/followShop`

**权限**：需要登录（普通用户及以上）

**接口说明**：我关注的人的商品

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |
| page | Integer | 否 | 1 |  |
| limit | Integer | 否 | 15 |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.follow()  （https://api.ruletree.club/typechoUsers/follow）
- 前端调用：this.$API.followShop()  （https://api.ruletree.club/typechoShop/followShop）

---

## 55. merchantOverview

**接口路径**：`GET/POST /typechoShop/merchantOverview`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户经营概览：店铺健康度 + 收益总览 + 订单状态分布 + 待办计数

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantOverview()  （https://api.ruletree.club/typechoShop/merchantOverview）

---

## 56. merchantTrend

**接口路径**：`GET/POST /typechoShop/merchantTrend`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户收益趋势（按天）：days=7/30/90，返回收入/订单数/销量 序列

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |
| days | Integer | 否 | 7 |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantTrend()  （https://api.ruletree.club/typechoShop/merchantTrend）

---

## 57. merchantGoodsStats

**接口路径**：`GET/POST /typechoShop/merchantGoodsStats`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户商品分析：在售/售罄/草稿/待审核、库存预警、热销/收益 Top

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantGoodsStats()  （https://api.ruletree.club/typechoShop/merchantGoodsStats）

---

## 58. merchantFinancial

**接口路径**：`GET/POST /typechoShop/merchantFinancial`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户财务：已结算/待结算/退款/提现摘要

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantFinancial()  （https://api.ruletree.club/typechoShop/merchantFinancial）

---

## 59. merchantTodo

**接口路径**：`GET/POST /typechoShop/merchantTodo`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户待办：发货超时、退款超时、评价待回复

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |
| days | Integer | 否 | 0 |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantTodo()  （https://api.ruletree.club/typechoShop/merchantTodo）

---

## 60. merchantCommentOverview

**接口路径**：`GET/POST /typechoShop/merchantCommentOverview`

**权限**：需要登录（普通用户及以上）

**接口说明**：商户评价口碑：好评率、评分分布、待回复

**请求参数**：

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| token | String | 否 | - |  |

**响应说明**：
```json
{
  "code": 1,
  "msg": "",
  "data": ...
}
```

**前端调用参考**：
- 前端调用：this.$API.merchantCommentOverview()  （https://api.ruletree.club/typechoShop/merchantCommentOverview）

---
