diff --git a/app/data/controller/ShopPayment.php b/app/data/controller/ShopPayment.php index 09a96118b..d7999b6e2 100644 --- a/app/data/controller/ShopPayment.php +++ b/app/data/controller/ShopPayment.php @@ -84,13 +84,13 @@ class ShopPayment extends Controller foreach ($vo['bind'] as $api) if (isset(UserAdminService::TYPES[$api])) { $allow[$api] = UserAdminService::TYPES[$api]['name']; } - if (count($allow)) { - $this->payments[$k] = array_merge($vo, ['allow' => join('、', $allow)]); - } + if (empty($allow)) continue; + $this->payments[$k] = array_merge($vo, ['allow' => join('、', $allow)]); } $data['content'] = json_decode($data['content'] ?? '[]', true) ?: []; } else { - if (empty($data['type'])) $this->error('请选择支付参数并配置支付参数!'); + if (empty($data['type'])) $this->error('请选择支付通道并配置参数!'); + if (empty($data['cover'])) $this->error('请上传支付方式图标!'); $data['content'] = json_encode($this->request->post() ?: [], JSON_UNESCAPED_UNICODE); } } diff --git a/app/data/view/shop_goods/form.html b/app/data/view/shop_goods/form.html index 68d3e4a77..eed3482fd 100644 --- a/app/data/view/shop_goods/form.html +++ b/app/data/view/shop_goods/form.html @@ -213,25 +213,25 @@ 增加规则分组
请完成属性修改后再编辑下面的规格信息,否则规格数据会丢失!