正在显示
2 个修改的文件
包含
6 行增加
和
4 行删除
@@ -60,6 +60,8 @@ class Study extends Backend | @@ -60,6 +60,8 @@ class Study extends Backend | ||
60 | 60 | ||
61 | foreach ($list as $row) { | 61 | foreach ($list as $row) { |
62 | $row->visible(['id','avatar','name','gender','birthday','grade_id','school_id','sno','team_id','team_rank','earn_score','phone','unique','barcode']); | 62 | $row->visible(['id','avatar','name','gender','birthday','grade_id','school_id','sno','team_id','team_rank','earn_score','phone','unique','barcode']); |
63 | + $path = "http://campus.shs.broing.cn/"; | ||
64 | + $row->visible([$path.'barcode']); | ||
63 | $row->visible(['grade']); | 65 | $row->visible(['grade']); |
64 | $row->getRelation('grade')->visible(['id','name']); | 66 | $row->getRelation('grade')->visible(['id','name']); |
65 | $row->visible(['school']); | 67 | $row->visible(['school']); |
@@ -182,9 +184,9 @@ class Study extends Backend | @@ -182,9 +184,9 @@ class Study extends Backend | ||
182 | $result = $this->model->allowField(true)->save($params); | 184 | $result = $this->model->allowField(true)->save($params); |
183 | $id = $this->model->id; | 185 | $id = $this->model->id; |
184 | $unique = time(); | 186 | $unique = time(); |
185 | - //$brpath = Resource::StudyBar($unique); | 187 | + $barpath = Resource::StudyBar($unique); |
186 | $time = date('YmdHi',time()); | 188 | $time = date('YmdHi',time()); |
187 | - $this->model->save(['sno'=>$time,'unique'=>time()],['id'=>$id]); | 189 | + $this->model->save(['barcode'=>$barpath,'sno'=>$time,'unique'=>time()],['id'=>$id]); |
188 | Db::commit(); | 190 | Db::commit(); |
189 | } catch (ValidateException|PDOException|Exception $e) { | 191 | } catch (ValidateException|PDOException|Exception $e) { |
190 | Db::rollback(); | 192 | Db::rollback(); |
-
请 注册 或 登录 后发表评论