作者 王智

baoxiu

@@ -95,7 +95,7 @@ class Index extends Api @@ -95,7 +95,7 @@ class Index extends Api
95 } 95 }
96 if ($user['level'] == 5) { 96 if ($user['level'] == 5) {
97 $bool = $this->time(); 97 $bool = $this->time();
98 - if ($bool == true) { 98 + if ($bool == 1) {
99 $today = strtotime(date('Y-m-d', time())); 99 $today = strtotime(date('Y-m-d', time()));
100 $is_p = Db::name('month_talk')->where('user_id', $user)->where('createtime', 'GT', $today)->find(); 100 $is_p = Db::name('month_talk')->where('user_id', $user)->where('createtime', 'GT', $today)->find();
101 if (empty($is_p)) { 101 if (empty($is_p)) {
@@ -103,7 +103,7 @@ class Index extends Api @@ -103,7 +103,7 @@ class Index extends Api
103 } else { 103 } else {
104 $bools = false; 104 $bools = false;
105 } 105 }
106 - }else{ 106 + } else {
107 $bools = false; 107 $bools = false;
108 } 108 }
109 } else { 109 } else {
@@ -853,7 +853,7 @@ class Index extends Api @@ -853,7 +853,7 @@ class Index extends Api
853 'taidu_star' => $param['taidu_star'], 853 'taidu_star' => $param['taidu_star'],
854 'talk_num' => $param['talk_num'], 854 'talk_num' => $param['talk_num'],
855 'talk_con' => $param['talk_con'], 855 'talk_con' => $param['talk_con'],
856 - 'user_id'=>$user_id 856 + 'user_id' => $user_id
857 ]; 857 ];
858 $res = Db::name('month_talk')->insert($data); 858 $res = Db::name('month_talk')->insert($data);
859 if ($res) { 859 if ($res) {
@@ -368,10 +368,10 @@ class Api @@ -368,10 +368,10 @@ class Api
368 $today = date("Y-m-d"); 368 $today = date("Y-m-d");
369 $day = getthemonth($today); 369 $day = getthemonth($today);
370 if ($day[0] == $day[1]) { 370 if ($day[0] == $day[1]) {
371 - echo 1; 371 + return 1;
372 } else { 372 } else {
373 // return False; 373 // return False;
374 - echo 2; 374 + return 2;
375 } 375 }
376 } 376 }
377 } 377 }