|
@@ -64,7 +64,7 @@ class AiBlogController extends BaseController |
|
@@ -64,7 +64,7 @@ class AiBlogController extends BaseController |
|
64
|
if(!empty($lists) && !empty($lists['list'])){
|
64
|
if(!empty($lists) && !empty($lists['list'])){
|
|
65
|
foreach ($lists['list'] as $k => $v){
|
65
|
foreach ($lists['list'] as $k => $v){
|
|
66
|
$v['image'] = getImageUrl($v['image']);
|
66
|
$v['image'] = getImageUrl($v['image']);
|
|
67
|
- $v['route'] = $this->user['domain'] . '/ai_blog/' . $v['route'];
|
67
|
+ $v['route'] = $this->user['domain'] . '/' . $v['route'];
|
|
68
|
$lists['list'][$k] = $v;
|
68
|
$lists['list'][$k] = $v;
|
|
69
|
}
|
69
|
}
|
|
70
|
}
|
70
|
}
|
|
@@ -101,6 +101,13 @@ class AiBlogController extends BaseController |
|
@@ -101,6 +101,13 @@ class AiBlogController extends BaseController |
|
101
|
public function getAiBlogAuthor(AiBlogAuthor $aiBlogAuthor){
|
101
|
public function getAiBlogAuthor(AiBlogAuthor $aiBlogAuthor){
|
|
102
|
$field = ['id','route','author_id','title','image','created_at','updated_at'];
|
102
|
$field = ['id','route','author_id','title','image','created_at','updated_at'];
|
|
103
|
$lists = $aiBlogAuthor->lists($this->map,$this->page,$this->row,'id',$field);
|
103
|
$lists = $aiBlogAuthor->lists($this->map,$this->page,$this->row,'id',$field);
|
|
|
|
104
|
+ if(!empty($lists) && !empty($lists['list'])){
|
|
|
|
105
|
+ foreach ($lists['list'] as $k => $v){
|
|
|
|
106
|
+ $v['image'] = getImageUrl($v['image']);
|
|
|
|
107
|
+ $v['route'] = $this->user['domain'] . '/' . $v['route'];
|
|
|
|
108
|
+ $lists['list'][$k] = $v;
|
|
|
|
109
|
+ }
|
|
|
|
110
|
+ }
|
|
104
|
$this->response('success',Code::SUCCESS,$lists);
|
111
|
$this->response('success',Code::SUCCESS,$lists);
|
|
105
|
}
|
112
|
}
|
|
106
|
|
113
|
|
|
@@ -162,6 +169,12 @@ class AiBlogController extends BaseController |
|
@@ -162,6 +169,12 @@ class AiBlogController extends BaseController |
|
162
|
*/
|
169
|
*/
|
|
163
|
public function getAiBlogList(AiBlogList $aiBlogList){
|
170
|
public function getAiBlogList(AiBlogList $aiBlogList){
|
|
164
|
$lists = $aiBlogList->lists($this->map,$this->page,$this->row,'id',['id','route','created_at','updated_at']);
|
171
|
$lists = $aiBlogList->lists($this->map,$this->page,$this->row,'id',['id','route','created_at','updated_at']);
|
|
|
|
172
|
+ if(!empty($lists) && !empty($lists['list'])){
|
|
|
|
173
|
+ foreach ($lists['list'] as $k => $v){
|
|
|
|
174
|
+ $v['route'] = $this->user['domain'] . '/ai_blogs/' . $v['route'];
|
|
|
|
175
|
+ $lists['list'][$k] = $v;
|
|
|
|
176
|
+ }
|
|
|
|
177
|
+ }
|
|
165
|
$this->response('success',Code::SUCCESS,$lists);
|
178
|
$this->response('success',Code::SUCCESS,$lists);
|
|
166
|
}
|
179
|
}
|
|
167
|
|
180
|
|