...
|
...
|
@@ -6,6 +6,7 @@ use LibModels\Wap\Product\ShopData; |
|
|
use Plugin\Helpers;
|
|
|
use Product\ListModel;
|
|
|
use LibModels\Wap\Coupon\CouponData;
|
|
|
use Plugin\Encryption;
|
|
|
|
|
|
/**
|
|
|
* 商品列表相关的控制器
|
...
|
...
|
@@ -719,17 +720,21 @@ class IndexController extends AbstractAction |
|
|
* @return json
|
|
|
*/
|
|
|
public function userCouponAction() {
|
|
|
|
|
|
$data = array();
|
|
|
$appVersion = $this->post('app_version', 0);
|
|
|
$couponID = $this->post('couponID', 0);
|
|
|
|
|
|
if (empty($couponID)) {
|
|
|
exit(0);
|
|
|
}
|
|
|
|
|
|
if (empty($appVersion)){
|
|
|
$uid = $this->getUid();
|
|
|
} else {
|
|
|
$uid = $this->getCookie('appUid');
|
|
|
}
|
|
|
|
|
|
$data = array();
|
|
|
|
|
|
do {
|
|
|
|
|
|
if (empty($uid)) {
|
...
|
...
|
@@ -743,7 +748,7 @@ class IndexController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$data = CouponData::receiveCoupon($uid, $couponID);
|
|
|
$data = CouponData::receiveCoupon($uid, Encryption::decrypt($couponID));
|
|
|
} while(false);
|
|
|
|
|
|
$this->echoJson($data);
|
...
|
...
|
|