...
|
...
|
@@ -60,6 +60,8 @@ class Study extends Backend |
|
|
|
|
|
foreach ($list as $row) {
|
|
|
$row->visible(['id','avatar','name','gender','birthday','grade_id','school_id','sno','team_id','team_rank','earn_score','phone','unique','barcode']);
|
|
|
$path = "http://campus.shs.broing.cn/";
|
|
|
$row->visible([$path.'barcode']);
|
|
|
$row->visible(['grade']);
|
|
|
$row->getRelation('grade')->visible(['id','name']);
|
|
|
$row->visible(['school']);
|
...
|
...
|
@@ -182,9 +184,9 @@ class Study extends Backend |
|
|
$result = $this->model->allowField(true)->save($params);
|
|
|
$id = $this->model->id;
|
|
|
$unique = time();
|
|
|
//$brpath = Resource::StudyBar($unique);
|
|
|
$barpath = Resource::StudyBar($unique);
|
|
|
$time = date('YmdHi',time());
|
|
|
$this->model->save(['sno'=>$time,'unique'=>time()],['id'=>$id]);
|
|
|
$this->model->save(['barcode'=>$barpath,'sno'=>$time,'unique'=>time()],['id'=>$id]);
|
|
|
Db::commit();
|
|
|
} catch (ValidateException|PDOException|Exception $e) {
|
|
|
Db::rollback();
|
...
|
...
|
|