Commit ed9df7eb by 杨树贤

添加红包码验证

parent b53c7874
......@@ -47,7 +47,9 @@ class CodesController extends Controller
$amount = array_get($integral, 'amount');
$res['data']['amount'] = $amount;
return $this->Export(0, 'ok',$res);
return $this->Export(0, 'ok', $res);
} elseif ($result['errcode'] === self::EXCHANGED_CODE) {
return $this->Export(self::EXCHANGED_CODE);
} else {
return $this->Export(self::EXCHANGE_CODE_FAIL);
}
......
......@@ -17,6 +17,8 @@ class Controller extends BaseController
const CAN_NOT_EXCHANGE = 109005;
//红包码无效
const INVALID_CODE = 109006;
//已经兑换过红包码,不能再兑换
const EXCHANGED_CODE = 109007;
const EXCHANGED_TODAY = 109100;
//这个是服务那边返回的错误码,代表已经超出了每日每人可领取的对应项的数额(比如每人每天只能签到一次)
......
......@@ -14,6 +14,7 @@ return [
109004 => '请求参数不正确',
109005 => '用户无法兑换,用户未认证',
109006 => '红包码无效',
109007 => '已经兑换过红包码,不能再兑换',
109100 => '今天已经兑换过了,请明天再来吧',
109101 => '兑换名额被抢光了',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment