作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

职位开关

@@ -17,7 +17,7 @@ use think\Db; @@ -17,7 +17,7 @@ use think\Db;
17 */ 17 */
18 class Index extends Api 18 class Index extends Api
19 { 19 {
20 - protected $noNeedLogin = ['index','examList','newsList','newsInfo','startupPage','agreement']; 20 + protected $noNeedLogin = ['index','examList','newsList','newsInfo','startupPage','agreement','switchJob'];
21 protected $noNeedRight = ['*']; 21 protected $noNeedRight = ['*'];
22 22
23 public function _initialize() 23 public function _initialize()
@@ -319,4 +319,23 @@ class Index extends Api @@ -319,4 +319,23 @@ class Index extends Api
319 $content = Db::name('mobile_config')->where('id',1)->value('agreement'); 319 $content = Db::name('mobile_config')->where('id',1)->value('agreement');
320 $this->success('成功', $content); 320 $this->success('成功', $content);
321 } 321 }
  322 +
  323 + /**
  324 + * @ApiTitle (职位开关)
  325 + * @ApiSummary (职位开关)
  326 + * @ApiMethod (POST)
  327 + *
  328 + * @ApiReturn({
  329 + "code": 1,
  330 + "msg": "成功",
  331 + "time": "1599017563",
  332 + "data": {
  333 + "is_on": 0 //是否开启职位:0=否,1=是
  334 + }
  335 + })
  336 + */
  337 + public function switchJob()
  338 + {
  339 + $this->success('成功', ['is_on' => 0]);
  340 + }
322 } 341 }
此 diff 太大无法显示。