...
|
...
|
@@ -3,6 +3,10 @@ |
|
|
namespace app\api\controller;
|
|
|
|
|
|
use app\common\controller\Api;
|
|
|
use app\common\model\Item;
|
|
|
use app\common\model\Study;
|
|
|
use app\common\model\StudyScoreLog;
|
|
|
use app\common\model\Team;
|
|
|
use think\Db;
|
|
|
use think\Exception;
|
|
|
use think\exception\PDOException;
|
...
|
...
|
@@ -192,6 +196,8 @@ class Bind extends Api |
|
|
if (empty($unique) && empty($id)) {
|
|
|
$this->error('参数错误', ['status' => 2]);
|
|
|
}
|
|
|
$model = new StudyScoreLog();
|
|
|
$model->addScore($id,$unique);
|
|
|
$study = db('study')->where('unique', $unique)->field('id,grade,name,team,earn_score')->find();
|
|
|
$item = db('item')->where('id', $id)->field('score,title,campus_id')->find();
|
|
|
$team = \db('team')->where('title', $study['team'])->field('title,score')->find();
|
...
|
...
|
@@ -340,7 +346,7 @@ class Bind extends Api |
|
|
$sid = \db('study')->where('user_id', $user['id'])->value('id');
|
|
|
//获取学生的信息
|
|
|
$data = \db('study')->where('id', $sid)->field('avatar,name,earn_score')->find();
|
|
|
$data['avatar'] = cdnurl( $data['avatar'], true);
|
|
|
$data['avatar'] = cdnurl($data['avatar'], true);
|
|
|
//获取雷达维度
|
|
|
$data['item'] = \db('study_score_log')
|
|
|
->distinct('item_id')
|
...
|
...
|
|