作者 郭盛
1 个管道 的构建 通过 耗费 7 秒

修改图片路径

... ... @@ -198,16 +198,16 @@ class Order extends Backend
$data = Db::name('summarize')
->where('order_id',$ids)
->find();
$name = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->where('a.id',$ids)
->field('b.name')
->find();
$data['teacher_name'] = $name['name'];
if(empty($data)){
$this->error('暂无总结');
}else{
$name = Db::name('order')
->alias('a')
->join('teacher b','a.teacher_id = b.id')
->where('a.id',$ids)
->field('b.name')
->find();
$data['teacher_name'] = $name['name'];
$data['createtime'] = date('Y-m-d H:i:s',$data['createtime']);
$this->assign('data',$data);
return $this->view->fetch();
... ...
... ... @@ -74,7 +74,7 @@ class Common extends Api
}
$url2 = '';
// $fan = '';
$host = "http://q3veqhmi6.bkt.clouddn.com";
$host = get_addon_config('qiniu')['cdnurl'];
foreach ($files as $file){
//移动到框架应用根目录/public/uploads/ 目录下
$moveUrl = ROOT_PATH . 'public' . DS . 'uploads';
... ...
... ... @@ -32,7 +32,7 @@ class Index extends Api
*/
public function pic()
{
$domain_name = $this->request->domain();//域名
$host = get_addon_config('qiniu')['cdnurl'];//域名
$data = Db::name('pic')
->field('id,thumbnail,createtime')
->order('id desc')
... ... @@ -40,7 +40,7 @@ class Index extends Api
->select();
foreach ($data as &$v){
$v['createtime'] = date('Y-m-d H:i:s',$v['createtime']);
$v['thumbnail'] = $domain_name.$v['thumbnail'];
$v['thumbnail'] = $host.$v['thumbnail'];
}
$this->success('请求成功',$data);
}
... ...
... ... @@ -7345,7 +7345,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-01-17 18:03:30 </div>
Generated on 2020-01-18 09:43:49 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...