【类 型】:fix

【原  因】:预检查 可以 提供错误返回信息
【过  程】:商铺添加 更新时候 先检查商铺名称 最低消费 最大重量上限 默认运费 默认打包费字段 是否为空
【影  响】:
This commit is contained in:
sszdot 2024-12-12 15:05:14 +08:00
parent ca366bd837
commit bce0f82f7d

View File

@ -34,7 +34,7 @@ class AdminController extends PublicController
echo json_encode(array('status' => 0, 'msg' => '没有权限'));
exit;
}
if ($_REQUEST['name']) {
if ($_REQUEST['name'] && $_REQUEST['price_min'] && $_REQUEST['weight_max'] && $_REQUEST['default_transport_price'] && $_REQUEST['default_pack_price']) {
//生成shop_id随机值
$arr = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
$shop_id = "";
@ -83,7 +83,7 @@ class AdminController extends PublicController
//总管理员 可接收任何shop_id 非总管理员 只可以调用自身shop_id 否则会中断
$this->isPower();
if ($_REQUEST['shop_id'] && $_REQUEST['name']) {
if ($_REQUEST['shop_id'] && $_REQUEST['name'] && $_REQUEST['price_min'] && $_REQUEST['weight_max'] && $_REQUEST['default_transport_price'] && $_REQUEST['default_pack_price']) {
//data数据
$data['name'] = $_REQUEST['name'];
$data['waiter'] = $_REQUEST['waiter'];