Quellcode durchsuchen

去掉rmb_money

lizhen_gitee vor 9 Monaten
Ursprung
Commit
c9d5d96741

+ 0 - 39
application/api/controller/Recharge.php

@@ -203,45 +203,6 @@ class Recharge extends Api
         $this->success('兑换成功');
     }
 
-    //兑换rmb
-    public function exchangermb() {
-        exit;//知音国际版才有钻石,这里用不到了
-        $freemoney = input_post('freemoney', 0, 'intval'); //自定义
-        $uid = $this->auth->id;
-        if(!$freemoney){
-            $this->error('请选择或填写兑换金额');
-        }
-        if ($freemoney) {
-            $money = $freemoney;
-            $bili = config('site.jewel_money') ?: 1;
-            $gold = bcdiv($money,$bili,2);
-        }
-        if($money<=0) {
-            $this->error('兑换金额必须大于0');
-        }
-        //验证余额
-        $user_info = model('wallet')->getWallet($this->auth->id);
-        if ($user_info['money'] < $money) {
-            $this->success('您的钻石不足', ['code' => 2]);
-        }
-
-        //开启事务
-        Db::startTrans();
-        //扣费
-        $wallet_rs = model('wallet')->lockChangeAccountRemain($uid,0,'money',-$money,25,'兑换人民币');
-        if($wallet_rs['status'] === false){
-            Db::rollback();
-            $this->error($wallet_rs['msg']);
-        }
-        //兑换人民币
-        $wallet_rs = model('wallet')->lockChangeAccountRemain($uid,0,'rmb_money',$gold,26,'钻石兑换人民币');
-        if($wallet_rs['status'] === false){
-            Db::rollback();
-            $this->error($wallet_rs['msg']);
-        }
-        Db::commit();
 
-        $this->success('兑换成功');
-    }
 
 }

+ 1 - 1
application/common/model/Wallet.php

@@ -81,7 +81,7 @@ class Wallet extends Model
         );
 
         //获取小数点
-        $point = in_array($accountType,['money','rmb_money']) ? 2 : 0;
+        $point = in_array($accountType,['money']) ? 2 : 0;
         bcscale($point);
 
         //钱包名称

+ 1 - 4
application/extra/wallet.php

@@ -22,9 +22,7 @@ return [
         21 => '视频通话收益',//money
         22 => '语音通话收益',//money
         23 => '文字聊天收益',//money
-        24 => 'RMB提现',//rmb_money 减少
-        25 => '兑换人民币',//money 减少
-        26 => '钻石兑换人民币',//rmb_money 增加
+
 
         31 => '购买装扮消费',
         41 => '签到赠送金币',
@@ -64,7 +62,6 @@ return [
         101 => 'vip充值金币赠送'
     ],
     'moneyname' => [
-        'rmb_money'=> '余额',
         'money'    => '余额',
         'gold'     => '金币',
     ],