This commit is contained in:
songliang 2023-07-16 13:53:00 +08:00
parent c3e36b6155
commit c2193ab3a2

View File

@ -844,10 +844,10 @@ class ShopController extends BaseAuthedController
public function buyGoodsNormal() public function buyGoodsNormal()
{ {
$address = $this->_getAddress(); $address = $this->_getAddress();
// if (empty($address)) { if (empty($address)) {
// $this->_rspErr(4, 'address is empty'); $this->_rspErr(4, 'address is empty');
// return; return;
// } }
$id = getReqVal('id', 0); $id = getReqVal('id', 0);
$token_type = getReqVal('token_type', ''); $token_type = getReqVal('token_type', '');
$goods_num = getReqVal('goods_num', 0); $goods_num = getReqVal('goods_num', 0);
@ -1170,14 +1170,23 @@ class ShopController extends BaseAuthedController
public function buyGoodsDS() public function buyGoodsDS()
{ {
$idx = getReqVal('idx', 0); $idx = getReqVal('idx', 0);
$grid = getReqVal('grid', 0); if ($idx <= 0) {
$count = getReqVal('count', 0); $this->_rspErr(2, 'idx is invalid');
return;
}
$grid = getReqVal('grid', 0);
if ($grid < 1 || $grid > 6) { if ($grid < 1 || $grid > 6) {
$this->_rspErr(2, 'grid is invalid'); $this->_rspErr(2, 'grid is invalid');
return; return;
} }
$count = getReqVal('count', 0);
if ($count<=0) {
$this->_rspErr(2, 'count is invalid');
return;
}
$conn = $this->_getMysql(''); $conn = $this->_getMysql('');
$row = SqlHelper::selectOne( $row = SqlHelper::selectOne(