|
@@ -10,38 +10,33 @@ use think\Db;
|
|
|
*/
|
|
|
class Userset extends Api
|
|
|
{
|
|
|
- protected $noNeedLogin = [];
|
|
|
+ protected $noNeedLogin = ['chargeconfig'];
|
|
|
protected $noNeedRight = '*';
|
|
|
|
|
|
//用户详细资料
|
|
|
public function userinfo(){
|
|
|
$field = [
|
|
|
-/* 'id','real_status','idcard_status','open_match_video','open_match_audio','open_match_typing','free_video','free_audio','free_typing'*/
|
|
|
'id','mobile','wechat_openid','real_status','idcard_status','open_match_video','open_match_audio','chat_price','voice_price','video_price', 'is_hideaddress'
|
|
|
];
|
|
|
$info = Db::name('user')->field($field)->where('id',$this->auth->id)->find();
|
|
|
|
|
|
-// $rs['userinfo'] = $info;
|
|
|
$rs = $info;
|
|
|
$rs['mobile'] = $info['mobile'] ? 1 : 0; //手机号
|
|
|
$rs['wechat_openid'] = $info['wechat_openid'] ? 1 : 0; //微信
|
|
|
$rs['alipay'] = Db::name('user_bank')->where(['user_id' => $this->auth->id, 'type' => 1])->count('id'); //支付宝绑定
|
|
|
$rs['bank'] = Db::name('user_bank')->where(['user_id' => $this->auth->id, 'type' => 2])->count('id'); //银行卡绑定
|
|
|
- $rs['intro_gold'] = config('site.intro_gold') ? : 0; //邀请注册赠送金币
|
|
|
+
|
|
|
+ $rs['new_user_intro_gold'] = config('site.new_user_intro_gold') ? : 0; //邀请注册赠送金币
|
|
|
$rs['intro_recharge_rebate_rate'] = $this->auth->is_agent == 1 ? $this->auth->h_intro_recharge_rebate_rate : config('site.intro_recharge_rebate_rate'); //邀请人充值返利比率
|
|
|
- $rs['intro_withdrawal_rebate_rate'] = config('site.intro_withdrawal_rebate_rate') ? : 0; //邀请人提现返利比率
|
|
|
$rs['intro_income_rebate_rate'] = $this->auth->is_agent == 1 ? $this->auth->h_intro_income_rebate_rate : config('site.intro_income_rebate_rate'); //邀请人收益返利比率
|
|
|
- $rs['cash_banner'] = '';//one_domain_image(config('site.cash_banner')); //提现页面图片
|
|
|
-// $rs['video_min_price'] = config('site.video_min_price');
|
|
|
-// $rs['audio_min_price'] = config('site.audio_min_price');
|
|
|
-// $rs['typing_min_price'] = config('site.typing_min_price');
|
|
|
+
|
|
|
$this->success('success',$rs);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 修改会员状态信息
|
|
|
+ * 修改会员状态信息 , APP验证过,没用到
|
|
|
*/
|
|
|
- public function set_status_switch()
|
|
|
+ /*public function set_status_switch()
|
|
|
{
|
|
|
if($this->auth->idcard_status != 1){
|
|
|
$this->error('未通过实名认证');
|
|
@@ -73,9 +68,9 @@ class Userset extends Api
|
|
|
|
|
|
Db::name('user')->where('id',$this->auth->id)->update($data);
|
|
|
$this->success();
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
- //文字语音视频收费设置
|
|
|
+ //文字语音视频收费配置
|
|
|
public function chargeconfig() {
|
|
|
$type = input('type', 0, 'intval'); //类型:0=文字,1=语音,2=视频
|
|
|
if (!in_array($type, [0, 1, 2])) {
|