|
|
@@ -102,13 +102,13 @@ class Pledge extends Api
|
|
|
//单品最大三个限制
|
|
|
if($pledge->type_id == $productPledges::Single && $count > config('pledge_single_max')) $this->error(__("单品最大三个限制"));
|
|
|
if (empty($pledge)) $this->error(__("质抵活动不存在"));
|
|
|
- if (empty($pledge->status) )$this->error(__("质抵活动已结束"));
|
|
|
+ if (empty($pledge->status))$this->error(__("质抵活动已结束"));
|
|
|
//余额判断
|
|
|
- if($pledge[$this->pay[$pay_type]] > 0){
|
|
|
- $user = $ledgerWalletModel::getWallet($this->auth->id);
|
|
|
- //判断余额是否足够
|
|
|
- if($pledgeLogic::isUserBalance($user, $pay_type, $pledge[$this->pay[$pay_type]]) == false) $this->error(__("余额不足"));
|
|
|
- }
|
|
|
+ if(empty($pledge[$this->pay[$pay_type]])) $this->error(__("无法使用此服务费方式支付"));
|
|
|
+ $user = $ledgerWalletModel::getWallet($this->auth->id);
|
|
|
+ //判断余额是否足够
|
|
|
+ if($pledgeLogic::isUserBalance($user, $pay_type, $pledge[$this->pay[$pay_type]]) == false) $this->error(__("余额不足"));
|
|
|
+
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
// 质抵押订单
|