panda 1 year ago
parent
commit
5be150e0b1
1 changed files with 20 additions and 2 deletions
  1. 20 2
      application/api/controller/Index.php

+ 20 - 2
application/api/controller/Index.php

@@ -791,7 +791,7 @@ class Index extends Api
 
         $this->success('操作成功', $gift_greet);
     }
-    
+
     //女号私信异性完成任务
     public function girlchattask() {
         if ($this->auth->gender != 0) { //只有女生可以
@@ -876,7 +876,7 @@ class Index extends Api
             }
         }
     }
-    
+
     //头条
     public function headlines() {
         $time = strtotime(date('Y-m-d', time()));
@@ -907,6 +907,24 @@ class Index extends Api
         //vip每天弹出搭讪框次数
         $data['vip_free_greet_num'] = config('site.vip_free_greet_num') > 0 ? config('site.vip_free_greet_num') : 5;
 
+        // 男性 非会员每天弹出搭讪框次数
+        $data['boy_free_greet_num'] = config('site.boy_free_greet_num') > 0 ? config('site.boy_free_greet_num') : 1;
+        // 男性 vip每天弹出搭讪框次数
+        $data['boy_vip_free_greet_num'] = config('site.boy_vip_free_greet_num') > 0 ? config('site.boy_vip_free_greet_num') : 1;
+
+        $this->success('success', $data);
+    }
+
+    /**
+     * 男性打招呼内容
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function greetBoy()
+    {
+        $data = Db::name('user_greet_boy')->select();
         $this->success('success', $data);
     }