|
@@ -287,6 +287,33 @@ class land_pic_path(Load):
|
|
|
state = self.service('common').update('farm_work_land_pic', id, update, cdate=False)
|
|
|
self.out('yes', {'id':state})
|
|
|
|
|
|
+ """
|
|
|
+ @api {delete} /work/land_pic 删除地块图片
|
|
|
+ @apiVersion 1.0.0
|
|
|
+ @apiName deleteWorkLandPic
|
|
|
+ @apiGroup Farm
|
|
|
+
|
|
|
+ @apiParam {String} id 图片ID
|
|
|
+
|
|
|
+ @apiSuccess {Bool} status 状态
|
|
|
+ @apiSuccess {String} msg 描述
|
|
|
+ @apiSuccess {Number} code 状态码
|
|
|
+
|
|
|
+ @apiErrorExample 操作成功
|
|
|
+ {"status": 1, "msg": "操作成功", "code": 0, "data": {}}
|
|
|
+ @apiErrorExample 操作失败
|
|
|
+ {"status": 2, "msg": "\u64cd\u4f5c\u5931\u8d25", "code": 0, "data": {}}
|
|
|
+ """
|
|
|
+ @auth
|
|
|
+ @Web.setting
|
|
|
+ def delete(self):
|
|
|
+ id = self.input('id')
|
|
|
+ if id:
|
|
|
+ model = Demeter.model('farm_work_land_pic')
|
|
|
+ model.id = id
|
|
|
+ model.delete()
|
|
|
+ self.out('yes', {'id':id})
|
|
|
+
|
|
|
class category_path(Load):
|
|
|
"""
|
|
|
@api {get} /work/category 获取农事分类列表
|