[TOC=2]
## 枚舉變量
### 工種類型:
| 可選值 | 說明 |
| --- | --- |
| crops | 需要選擇蔬菜 |
| others | 不需要選擇蔬菜 |
## 工種列表
~~~[api]
get:/jobCategory/list
<<<
success
{
"code": 0,
"data": [
{
"id": 1,
"name": "123",//工種名
"icon": "123",//工種圖標地址
"description": "123",//工種描述
"type": "others"//工種類型
}
]
}
~~~
## 添加工種
>[info] 添加工種會返回提交過來的數據,并且會多返回一個 id 。建議把返回的數據添加到數據的 data 里面,并且添加到首位,應為列表查詢的時候就是降序查詢的。
>圖標地址和描述沒有就填空字符串,表示可以為空的值。
~~~[api]
post:/jobCategory/add
*string:name=點種栽苗#工種名
string:icon=http://baidu.com#圖標地址
*string:description=""#描述
*string:type=others#工種類型
<<<
success
{
"code": 0,
"data": {
"name": "",//工種名
"icon": "",//工種的圖標
"description": "",//工種描述
"type": "others",//工種類型 詳情 見枚舉變量
"id": "3" //id
}
}
<<<
error
{
"code": -1,
"msg": "工種名2-16個字符"
}
~~~
## 修改工種
>[info] 修改工種會返回提交過來的信息,建議根據前端進行一個無刷新的修改,提高效率。
~~~[api]
post:/jobCategory/update
*int:id=1#id
*string:name=點種栽苗#工種名
string:icon=http://baidu.com#圖標地址
*string:description=""#描述
*string:type=others#工種類型
<<<
success
{
"code": 0,
"data": {
"id": 1,//id
"name": "",//工種名
"icon": "",//工種圖標地址
"description": "",//工種描述
"type": "others"//工種類型 詳情見 枚舉變量
}
}
<<<
error
{
"code": -1,
"msg": "工種名2-16個字符"
}
~~~
## 刪除工種
~~~[api]
post:/jobCategory/delete
*int:id=1#id
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "該項被依賴,不允許刪除"
}
~~~
## 非農作物下的工種詳情
~~~[api]
get:/jobCategory/firstJob
*int:id=6#工種id
<<<
success
{
"code": 0,
"data": {
"id": 3,
"name": "7",
"icon": "",
"description": "非農作物工種的直接工作項",
"specifications": [
{
"name": "糞肥類型",
"type": "choice",
"items": [
"干雞糞",
"干稻殼糞",
"干鴿子糞",
"濕糞",
"其他糞"
],
"choice_count": 1
},
{
"name": "包裝方式",
"type": "choice",
"items": [
"60公斤袋裝",
"80公斤袋裝",
"100公斤袋裝",
"散裝"
],
"choice_count": 1
},
{
"name": "服務內容",
"type": "choice",
"items": [
"推糞撒糞",
"包溝(挑溝、推糞、撒糞、包溝、包土)"
],
"choice_count": 1
},
{
"name": "工作量",
"type": "number",
"unit": "袋/立方"
}
],
"category_id": 7,
"category2_id": 1
}
}
<<<
error
{
"code": 0,
}
~~~
- 使用須知
- 共用數據
- 數據庫
- 管理員
- 管理--登錄注冊
- 管理--個人資料
- 管理--工種相關
- 管理--工作相關
- 管理--蔬菜分類
- 管理--訂單相關
- 管理--用戶相關
- 管理--消息相關
- 管理--banner
- 管理--認證相關
- 管理--蔬菜改版
- 雇主端
- 雇主--登錄注冊
- 雇主--個人資料
- 雇主--設備相關
- 雇主--控制設備
- 雇主--用工地址
- 雇主--我的收藏
- 雇主--工種相關
- 雇主--我的訂單
- 雇主--我的紅包
- 雇主--評價訂單
- 雇主--消息相關
- 雇主--積分相關
- 雇主--民工列表
- 雇主--banner
- 雇主--邀請注冊
- 雇主--分享民工
- 民工端
- 民工--登錄注冊
- 民工--個人資料
- 民工--我的紅包
- 民工--訂單相關
- 民工--我的訂單
- 民工--評價訂單
- 民工--消息相關
- 民工--積分相關
- 民工--認證相關
- 民工--工種相關
- 民工--會員相關
- 民工--分享相關
- 民工--服務區域
- 民工--服務技能
- 民工--邀請注冊