<?php
/**
 * Created by PhpStorm.
 * User: sicilon_IT
 * Date: 2020/1/27
 * Time: 15:38
 */

namespace app\index\controller;
use app\index\logic\prjmanger;
use app\index\logic\headmanger;
use app\index\logic\workermanger;
use app\index\logic\contactlogic;
use app\index\logic\questionlogic;
use think\Controller;

class Question extends Controller {
    public function getquestionlist() {
        $queryinfo = request()->param();
        $l_q = new questionlogic();
        $result = $l_q->getquestionlist($queryinfo);
        if (empty($result['status'])) {
            $res_r['code'] = 0;
        } else {
            $res_r['code'] = 200;
        }
        $res_r['msg'] = $result['msg'];
        $res_r['data'] = $result['data'];
        return json_encode($res_r, 320);
    }

    public function saveanswer() {
        $queryinfo = request()->param();
        $l_q = new questionlogic();
        $result = $l_q->saveanswer($queryinfo);
        if (empty($result['status'])) {
            $res_r['code'] = 0;
        } else {
            $res_r['code'] = 200;
        }
        $res_r['msg'] = $result['msg'];
        $res_r['data'] = $result['data'];
        return json_encode($res_r, 320);
    }

}