|
@@ -9,9 +9,22 @@ use think\Db;
|
|
|
*/
|
|
|
class Index extends Api
|
|
|
{
|
|
|
- protected $noNeedLogin = [];
|
|
|
+ protected $noNeedLogin = ['info'];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
+
|
|
|
+ //进行中的唯一一个投票活动
|
|
|
+ public function info(){
|
|
|
+
|
|
|
+ $find = Db::name('vote_subject')->where('id',1)->find();
|
|
|
+ if(!$find){
|
|
|
+ $this->error('没有进行中的投票活动');
|
|
|
+ }
|
|
|
+ $find = info_domain_image($find,['image','paihang_image']);
|
|
|
+
|
|
|
+ $this->success(1,$find);
|
|
|
+ }
|
|
|
+
|
|
|
//结束后的首页
|
|
|
public function index(){
|
|
|
|