EagageController.php 730 字节
<?php
/**
 * Created by PhpStorm.
 * auther: sgj
 * Date: 2019/1/14
 * Time: 17:27
 */

namespace app\user\controller;


use cmf\controller\HomeBaseController;

class EagageController extends HomeBaseController
{
    /**
     * 提交信息
     */
        public function engagePost(){
            $data=input();
            $data['add_time']=time();
            $data['user_id']=cmf_get_current_user_id();

            $result=db('engage')->insert($data);
            if ($result==1){
                $site=cmf_get_option('site_info');
                addScore($data['user_id'],$site['engage'],'提交进行');
                $this->success('');
            }else{
                $this->error('');
            }
        }



}