【类 型】:fix

【主	题】:返回信息 不准确
【描	述】:
	[原因]:提交null 时 为解锁航线 而不是锁定航线
	[过程]:判断之后再返回 对应信息
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-06-17 17:56:49 +08:00
parent 612234eaa0
commit 851b9bcb93

View File

@ -167,13 +167,15 @@ class PlaneController extends PublicController
if ($_REQUEST['id'] && $_REQUEST['runing']) {
if ($_REQUEST['runing'] == "null") {
$data['runing'] = null;
$msg = "航线已解锁";
} else {
$data['runing'] = $_REQUEST['runing'];
$msg = "送餐点航线锁定成功";
}
$where['id'] = $_REQUEST['id'];
$rsDb = D('receive_site');
if ($rsDb->where($where)->save($data)) {
echo json_encode(array('status' => 1, 'msg' => '送餐点航线锁定成功'));
echo json_encode(array('status' => 1, 'msg' => $msg));
} else {
echo json_encode(array('status' => 0, 'msg' => '送餐点航线锁定失败'));
}