Browse Source

常用文章描述,注销,签到

lizhen_gitee 1 year ago
parent
commit
e2b795e6e8

+ 4 - 1
application/api/controller/Baseconfig.php

@@ -17,7 +17,10 @@ class Baseconfig extends Api
 
         $config = [
             'kefu_user_ids'            => config('site.kefu_user_ids'),//在线客服人员
-
+            'teenage_rule'            => config('site.teenage_rule'),//青少年模式规则描述
+            'fangzhapian'            => config('site.fangzhapian'),//防诈骗提示
+            'changyongyu'            => config('site.changyongyu'),//常用语温馨提示
+            'zhanghaozhuxiao'            => config('site.zhanghaozhuxiao'),//账号注销
         ];
 
         $this->success('success',$config);

+ 7 - 4
application/api/controller/User.php

@@ -837,12 +837,15 @@ class User extends Api
 
     //假注销
     public function cancleUser(){
-        if (!$this->request->isPost()) {
+        $captcha = input('captcha','');
+
+        if (!$captcha) {
             $this->error(__('Invalid parameters'));
         }
-        //退出im
-//        $tenIm = new Tenim();
-//        $tenIm->loginoutim($this->auth->id);
+
+        if (!Sms::check($this->auth->mobile, $captcha, 'mobilelogin')) {
+            $this->error(__('Captcha is incorrect'));
+        }
 
         Db::name('user')->where('id',$this->auth->id)->update(['status'=>-1]);
 

+ 5 - 5
application/api/controller/Usersign.php

@@ -94,25 +94,25 @@ class Usersign extends Api
         }
 
         //加钱
-        $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',$data['goldnum'],41,'签到奖励','user_sign',$log_id);
+        $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'jewel',$data['goldnum'],41,'签到奖励','user_sign',$log_id);
         if($rs['status'] === false){
             Db::rollback();
             $this->error($rs['msg']);
         }
 
         //第七天赠送vip
-        $vip_rs = false;
+        /*$vip_rs = false;
         $user_sign_gift_vipdays = intval(config('site.user_sign_gift_vipdays'));
         if($data['times'] == 7 && $user_sign_gift_vipdays > 0){
 
             $vip_rs = $this->gift_vip($user_sign_gift_vipdays);
-        }
+        }*/
 
         Db::commit();
         $remark = '获得金币'.$data['goldnum'];
-        if($vip_rs){
+        /*if($vip_rs){
             $remark .= ',vip'.$user_sign_gift_vipdays.'天';
-        }
+        }*/
         $this->success('签到成功',$remark);
     }
 

+ 0 - 1
application/extra/site.php

@@ -45,7 +45,6 @@ return array (
     'category2' => '分类二',
     'custom' => '自定义',
   ),
-  'user_sign_gift_vipdays' => '1',
   'gift_plat_scale' => '50',
   'introsite_activeinfo' => '好友充值1000金币可得350金币
 好友收益1000金币可得100金币',

+ 1 - 1
application/extra/wallet.php

@@ -22,7 +22,7 @@ return [
 
 
         31 => '购买装扮消费', //gold -
-        41 => '签到赠送金币',
+        41 => '签到赠送金币',//jewel +
 
 
         53 => '聊天赠送礼物',//gold -