...
This commit is contained in:
parent
41b027c384
commit
d74f2a645b
@ -197,15 +197,18 @@ class ShopController extends BaseAuthedController
|
|||||||
|
|
||||||
if ($goods_num <= 0) {
|
if ($goods_num <= 0) {
|
||||||
$this->_rspErr(1, 'goods_num is invalid');
|
$this->_rspErr(1, 'goods_num is invalid');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$goods = mt\ShopGoods::get($id);
|
$goods = mt\ShopGoods::get($id);
|
||||||
if (!$goods) {
|
if (!$goods) {
|
||||||
$this->_rspErr(1, "id is invalid. {$id}");
|
$this->_rspErr(1, "id is invalid. {$id}");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($goods['shop_id'] == 9 && $goods_num > 1) {
|
if ($goods['shop_id'] == 9 && $goods_num > 1) {
|
||||||
$this->_rspErr(1, 'goods_num is invalid');
|
$this->_rspErr(1, 'goods_num is invalid');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$conn = myself()->_getSelfMysql();
|
$conn = myself()->_getSelfMysql();
|
||||||
@ -213,6 +216,7 @@ class ShopController extends BaseAuthedController
|
|||||||
$address = myself()->_getAddress();
|
$address = myself()->_getAddress();
|
||||||
if (!$address) {
|
if (!$address) {
|
||||||
$this->_rspErr(1, 'address is empty');
|
$this->_rspErr(1, 'address is empty');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$goods_str = json_encode($goods);
|
$goods_str = json_encode($goods);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user