1.提交缺失的东西
This commit is contained in:
@ -74,6 +74,15 @@ class UserController extends BaseApiController
|
|||||||
return $this->fail(UserLogic::getError());
|
return $this->fail(UserLogic::getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* note 我的钱包
|
||||||
|
* create_time 2020/11/27 16:58
|
||||||
|
*/
|
||||||
|
public function myWallet()
|
||||||
|
{
|
||||||
|
$info = UserLogic::myWallet($this->userId);
|
||||||
|
return $this->success('获取成功', $info);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 修改密码
|
* @notes 修改密码
|
||||||
|
|||||||
@ -21,9 +21,11 @@ use app\common\{enum\notice\NoticeEnum,
|
|||||||
logic\BaseLogic,
|
logic\BaseLogic,
|
||||||
model\user\User,
|
model\user\User,
|
||||||
model\user\UserAuth,
|
model\user\UserAuth,
|
||||||
|
service\ConfigServer,
|
||||||
service\FileService,
|
service\FileService,
|
||||||
service\sms\SmsDriver,
|
service\sms\SmsDriver,
|
||||||
service\wechat\WeChatMnpService};
|
service\wechat\WeChatMnpService};
|
||||||
|
use think\facade\Db;
|
||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,7 +82,17 @@ class UserLogic extends BaseLogic
|
|||||||
return $user->toArray();
|
return $user->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function myWallet($user_id)
|
||||||
|
{
|
||||||
|
$info = Db::name('user')
|
||||||
|
->where(['id' => $user_id])
|
||||||
|
->field('user_money,total_order_amount,total_recharge_amount,user_growth')
|
||||||
|
->find();
|
||||||
|
$info['open_racharge'] = ConfigServer::get('recharge', 'open_racharge', 0);
|
||||||
|
return $info;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @notes 设置用户信息
|
* @notes 设置用户信息
|
||||||
* @param int $userId
|
* @param int $userId
|
||||||
|
|||||||
Reference in New Issue
Block a user