【类 型】:feat
【原 因】:增加地图 排序字段设置接口 【过 程】: 【影 响】:
This commit is contained in:
parent
41df34dd38
commit
ffd14622cd
@ -1124,4 +1124,25 @@ class PlaneController extends PublicController
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 修改地图样式的排序字段
|
||||||
|
*/
|
||||||
|
public function orderMapStyle()
|
||||||
|
{
|
||||||
|
if (isset($_REQUEST['id']) && $_REQUEST['id'] !== '' && isset($_REQUEST['sort_order']) && $_REQUEST['sort_order'] !== '') {
|
||||||
|
$data['sort_order'] = (int)$_REQUEST['sort_order'];
|
||||||
|
// where 条件
|
||||||
|
$where['id'] = $_REQUEST['id'];
|
||||||
|
// 录入数据库
|
||||||
|
$mapStyleDb = D('map_styles');
|
||||||
|
if ($mapStyleDb->where($where)->save($data) !== false) {
|
||||||
|
echo json_encode(array('status' => 1, 'msg' => '更新成功'));
|
||||||
|
} else {
|
||||||
|
echo json_encode(array('status' => 0, 'msg' => '更新失败'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo json_encode(array('status' => 0, 'msg' => '参数有误'));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user