1
This commit is contained in:
parent
31bb46b7c1
commit
8fc140ce5a
@ -62,7 +62,7 @@ class ShopController extends BaseAuthedController {
|
|||||||
|
|
||||||
public function buyGoods()
|
public function buyGoods()
|
||||||
{
|
{
|
||||||
$goodsUuid = getReqVal('goods_id', 0);
|
$goodsId = getReqVal('goods_id', 0);
|
||||||
$goodsNum = getReqVal('goods_num', 0);
|
$goodsNum = getReqVal('goods_num', 0);
|
||||||
|
|
||||||
if ($goodsNum < 1) {
|
if ($goodsNum < 1) {
|
||||||
@ -70,7 +70,7 @@ class ShopController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$goodsMeta = mt\ShopGoods::getByGoodsUuid($goodsUuid);
|
$goodsMeta = mt\ShopGoods::getByGoodsUuid($goodsId);
|
||||||
if (!$goodsMeta) {
|
if (!$goodsMeta) {
|
||||||
myself()->_rspErr(1, 'goods not found');
|
myself()->_rspErr(1, 'goods not found');
|
||||||
return;
|
return;
|
||||||
@ -219,15 +219,15 @@ class ShopController extends BaseAuthedController {
|
|||||||
|
|
||||||
public function inappPurchase()
|
public function inappPurchase()
|
||||||
{
|
{
|
||||||
$goodsUuid = getReqVal('goods_id', 0);
|
$goodsId = getReqVal('goods_id', 0);
|
||||||
$goodsNum = getReqVal('goods_num', 0);
|
$goodsNum = getReqVal('goods_num', 0);
|
||||||
$goods = mt\ShopGoods::getByGoodsUuid($goodsUuid);
|
$goods = mt\ShopGoods::getByGoodsUuid($goodsId);
|
||||||
if (!$goods) {
|
if (!$goods) {
|
||||||
$this->_rspErr(2, "start purchase failed");
|
$this->_rspErr(2, "inapp purchase failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($goods['shop_id'] != mt\Shop::INAPP_SHOP) {
|
if ($goods['shop_id'] != mt\Shop::INAPP_SHOP) {
|
||||||
$this->_rspErr(3, "start purchase failed");
|
$this->_rspErr(3, "inapp purchase failed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user