[TOC]
### 獲取平臺的圖片
#### URL
>web/index.php?c=utility&a=file&do=image&local=local
#### 請求方式
> GET
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | :-----: | ----------- |
| page | int | 否 | 分頁頁碼 | 默認1 |
| local | string | 否 | 圖片的源 | 默認wx的數據 local-本地 wx-微信平臺 |
| uniacid | int | 否 | 要獲取圖片所在的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要獲取圖片所在的平臺賬號UNIACID |
| year | int | 否 | 要查詢的單位-年|默認0 |
| month | int | 否 | 要查詢的單位-月|默認0 |
| dest_dir | string | 否 | 第三方應用傳遞的自定義上傳目錄(當需要獲取對應模塊上傳的圖片時該值為模塊名稱) | |
| group_id | int | 否 | 圖片分組id | -1默認是所有,0是獲取未分組的圖片,其他int值為相應分組的圖片 |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": {
"list": [//圖片列表
{
"id": "3740",
"uniacid": "851",
"filename": "1.jpg",
"attachment": "images/851/2019/08/eZRA1iHeM2ZYzgVGlIrZ2AW3Cwf1nh.jpg",
"type": "1",
"createtime": "1566459428",
"module_upload_dir": "",
"group_id": "-1",
"displayorder": "0",
"url": "https://ccceshi.w7.cc/images/851/2019/08/eZRA1iHeM2ZYzgVGlIrZ2AW3Cwf1nh.jpg"
},
{
"id": "3677",
"uniacid": "851",
"filename": "A2UWr0Fa0Flk14910euQtT61Ha61Lh",
"attachment": "images/851/2019/04/A2UWr0Fa0Flk14910euQtT61Ha61Lh.jpg",
"type": "1",
"createtime": "1554973951",
"module_upload_dir": "",
"group_id": "0",
"displayorder": "0",
"url": "https://ccceshi.w7.cc/images/851/2019/04/A2UWr0Fa0Flk14910euQtT61Ha61Lh.jpg"
}
],
"total": 20,
"page": 1,
"page_size": 24
}
},
"redirect": "",
"type": "ajax"
}
```
### 上傳圖片
#### URL
> web/index.php?c=utility&a=file&do=upload&upload_type=image
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| upload_type| string | 是 | 上傳類型 |默認為image( 'image', 'audio', 'video') |
| uniacid | int | 否 | 要上傳圖片所在的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要上傳圖片所在的平臺賬號UNIACID |
| dest_dir | string | 否 | 上傳的指定目標目錄 | |
| group_id | int | 是 | 分組id | 要上傳的分組id,默認-1為沒有分組 |
| $_FILES['file'] | string | 是 | 上傳的文件 | | |
#### 返回數據
正確:
```
{
"message": {
"errno": 0,
"message": "上傳成功!"
},
"redirect": "",
"type": "ajax"
}
```
失敗:
```
{
"message": {
"errno": -1,
"message": "上傳失敗, 請選擇要上傳的文件!"
},
"redirect": "",
"type": "ajax"
}
```
### 單獨/批量刪除圖片
#### URL
>web/index.php?c=utility&a=file&do=delete&local=local
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| local | string | 否 | 圖片的源 | 默認為wx: local-本地 wx-微信平臺 |
| uniacid | int | 否 | 要刪除圖片所在的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要刪除圖片所在的平臺賬號UNIACID |
| id | array/int | 是 | 刪除圖片的id數組/圖片id | id[0]:1,id[1]:2/1 |
| type | string | 是 | 要刪除的類型 | 圖片:image |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": "刪除成功"
},
"redirect": "",
"type": "ajax"
}
```
### 獲取圖片分組
#### URL
>/web/index.php?c=utility&a=file&do=group_list&local=local
#### 請求方式
> GET
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| local | string | 否 | 圖片的來源 | 默認為wx: local-本地 wx-微信平臺 |
| uniacid | int | 否 | 要獲取圖片分組的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要獲取的平臺賬號UNIACID |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": [
{
"id": "14",
"name": "wecaht-1",
"uniacid": "851",
"uid": "1",
"type": "0"
},
{
"id": "15",
"name": "wechat-2",
"uniacid": "851",
"uid": "1",
"type": "0"
},
{
"id": "19",
"name": "wjbear-1",
"uniacid": "851",
"uid": "1",
"type": "0"
}
]
},
"redirect": "",
"type": "ajax"
}
```
### 圖片移動分組
#### URL
>/web/index.php?c=utility&a=file&do=move_to_group&local=local
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| local | string | 否 | 圖片的源 | 默認為wx: local-本地 wx-微信平臺 |
| group_id | int | 是 | 分組的id | |
| id | array | 是 | 要移動的圖片id數組 | id[0]=1&id[1]=2... |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": "更新成功"
},
"redirect": "",
"type": "ajax"
}
```
### 新建分組
#### URL
> web/index.php?c=utility&a=file&do=add_group&local=local
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| local | string | 否 | 圖片的源 | 默認為wx: local-本地 wx-微信平臺 |
| uniacid | int | 否 | 要新建分組的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要新建分組的平臺賬號UNIACID |
| name | string | 是 | 分組名稱 | 默認為:未命名 |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": {
"id": "19" //新建的分組ID
}
},
"redirect": "",
"type": "ajax"
}
```
### 編輯分組
#### URL
> web/index.php?c=utility&a=file&do=change_group&local=local
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| local | string | 否 | 圖片的源 | 默認為wx: local-本地 wx-微信平臺 |
| uniacid | int | 否 | 要編輯分組的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要編輯分組的平臺賬號UNIACID |
| name | string | 是 | 分組名稱 | |
| id | int | 是 | 分組id | - |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": "更新成功"
},
"redirect": "",
"type": "ajax"
}
```
### 刪除分組
#### URL
> web/index.php?c=utility&a=file&do=del_group&local=local
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 | 值 |
| ----------- | :-----: | :-----: | ----------- |
| local | string | 否 | 圖片的源 | 默認為wx: local-本地 wx-微信平臺 |
| uniacid | int | 否 | 要刪除分組的平臺賬號UNIACID | 0:全局圖片;-1:默認當前$_W['unicid'];851:要刪除分組的平臺賬號UNIACID |
| group_id | int | 是 | 分組id | - |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": "刪除成功"
},
"redirect": "",
"type": "ajax"
}
```
### 圖片轉換
#### URL
> web/index.php?c=utility&a=file&do=networktowechat
#### 請求方式
> POST
#### 請求參數
| 名稱 | 類型 | 必填 | 描述 |
| ----------- | :-----: | :-----: | ----------- |
| url |sting | 是 | 網絡圖片的url地址 |
#### 返回數據
```
{
"message": {
"errno": 0,
"message": {
"uniacid": 2,
"uid": 1,
"acid": 0,
"media_id": "KQIqJ745oCZ4AKTdwOyPimOjBUesd_7h4j627V9QsV0",
"attachment": "http://mmbiz.qpic.cn/mmbiz_jpg/fzNMq3HIKHHjXA40YGIiaic2vwicbnGMTibAEm2HT5Eh91D5duyy4t2w2waYsLF8PhDDK7dbYUPdKGbUVNEQhqY0aQ/0?wx_fmt=jpeg",
"type": "image",
"tag": "http://mmbiz.qpic.cn/mmbiz_jpg/fzNMq3HIKHHjXA40YGIiaic2vwicbnGMTibAEm2HT5Eh91D5duyy4t2w2waYsLF8PhDDK7dbYUPdKGbUVNEQhqY0aQ/0?wx_fmt=jpeg",
"model": "perm",
"createtime": 1566557003,
"url": "http://we7.wjbear.cn/web/index.php?c=utility&a=wxcode&do=image&attach=http%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FfzNMq3HIKHHjXA40YGIiaic2vwicbnGMTibAEm2HT5Eh91D5duyy4t2w2waYsLF8PhDDK7dbYUPdKGbUVNEQhqY0aQ%2F0%3Fwx_fmt%3Djpeg",
"id": "7"
}
},
"redirect": "",
"type": "ajax"
}
```
- 空白目錄
- 公共
- 系統自定義常量
- 圖片組件
- 權限組相關
- 平臺管理
- 公共數據
- 添加平臺
- 平臺列表
- 平臺回收站
- 平臺基礎信息
- 平臺停用、恢復、刪除
- 微信開放平臺
- 公眾號短信
- 平臺自定義到期提示
- 平臺使用者
- 平臺使用者權限設置
- 可用模塊、模板
- 應用操作員管理
- 版本管理
- 新建小程序版本
- 用戶管理
- 用戶管理列表
- 審核用戶列表
- 用戶回收站列表
- 用戶屬性設置
- 自定義到期提示
- 添加用戶
- 編輯-基礎信息
- 編輯-應用模板權限
- 編輯-賬號創建權限
- 編輯-賬號使用權限
- 編輯-使用賬號列表
- 編輯-操作應用列表
- 權限組
- 應用權限組-列表
- 應用權限組-編輯、添加
- 應用權限組-刪除
- 賬號權限組-列表
- 賬號權限組-編輯、添加
- 賬號權限組-刪除
- 用戶權限組合-列表
- 用戶權限組合-編輯、添加
- 用戶權限組合-刪除
- 系統功能
- 系統信息
- 站內公告
- 站內公告分類
- 短信管理
- 系統新聞
- 系統新聞分類
- 系統檢測優化
- 數據庫
- 木馬查殺
- 更新緩存