|
@@ -50,7 +50,8 @@ class Lianmeng extends Api
|
|
|
if(!$decorate) {
|
|
|
$this->error("道具信息获取失败!");
|
|
|
}
|
|
|
- if($walletinfo['gold'] < $decorate['price']) {
|
|
|
+ $total_price = bcmul($decorate['price'],$number,0);
|
|
|
+ if($walletinfo['gold'] < $total_price) {
|
|
|
$this->error("您的金币不足,请先充值!");
|
|
|
}
|
|
|
// 进行购买逻辑
|
|
@@ -74,7 +75,7 @@ class Lianmeng extends Api
|
|
|
}
|
|
|
|
|
|
//扣钱
|
|
|
- $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$decorate['price'],31,'购买联盟道具','user_decorate_lianmeng',0);
|
|
|
+ $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$total_price,33,'购买联盟道具','user_decorate_lianmeng',0);
|
|
|
if($rs['status'] === false){
|
|
|
Db::rollback();
|
|
|
$this->error($rs['msg']);
|