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

修改首页封面

此 diff 太大无法显示。
... ... @@ -48,26 +48,37 @@ class Order extends Backend
$id = $this->request->param('ids');
$time = Db::name('order')
->where('id',$id)
->field('createtime')
->field('pic_id,video_id,createtime,num')
->find();
$createtime = date('Y-m-d H:i:s',$time['createtime']);
$shou = Db::name('shou')
->whereLike('order_id',"%$id%")
->select();
foreach ($shou as &$v){
$v['order_id'] = explode(',',$v['order_id']);
if(in_array($id,$v['order_id'])){
}
}
$num = Db::name('order')->where('id',$data['order_id'])->field('num')->find();
if(!empty($data['pic_id'])){
$number = Db::name('pic')->where('id',$data['pic_id'])->field('number')->find();
$this->test_pdf($data['name'],$data['use'],$data['tel'],$number['number'],$num['num'],$createtime);
if(!empty($time['pic_id'])){
$pic_id = explode(',',$time['pic_id']);
$v['pic_num'] = Db::name('pic')
->whereIn('id',$pic_id)
->column('number');
//拼接所有素材的唯一编号
$str = '';
$pic_str = implode(',',$v['pic_num']);
$str .= $pic_str.',';
$this->test_pdf($shou[0]['name'],$shou[0]['use'],$shou[0]['tel'],$str,$time['num'],$createtime);
}
if(!empty($data['video_id'])){
$number = Db::name('video')->where('id',$data['video_id'])->field('number')->find();
$this->test_pdf($data['name'],$data['use'],$data['tel'],$number['number'],$num['num'],$createtime);
if(!empty($time['video_id'])){
$video_id = unserialize($time['video_id']);
$v_id = array_column($video_id,'id');
$v['video_num'] = Db::name('video')
->whereIn('id',$v_id)
->column('number');
//拼接所有素材的唯一编号
$str = '';
$video_str = implode(',',$v['video_num']);
$str .= $video_str.',';
$this->test_pdf($shou['name'],$shou['use'],$shou['tel'],$str,$time['num'],$createtime);
}
}
public function test_pdf($name='',$use='',$tel='',$number='',$order_num='',$time='') {
... ...
... ... @@ -100,42 +100,22 @@ class User extends Api
'msg':'返回成功',
"time": "1571492001",
"data": {
"video_thumbnail": http://mapwww.baidu.com 视频封面图地址
"pic_thumbnail": http://mapwww.baidu.com 图片地址
"wonderful_thumbnail": http://mapwww.baidu.com 精美大片地址
"thumbnail": //大片封面图地址
"iamge": //图片地址
"pic": //精美大片地址
}
})
*/
public function index()
{
$rule = config('verify.path');
$data = Db::name('video')
->field('id,thumbnail')
->where('is_top',1)
->order('createtime desc,id desc')
->limit('1')
->find();
$pic = Db::name('pic')
->field('id,thumbnail')
->where('is_top',1)
->order('createtime desc,id desc')
->limit('1')
$data = Db::name('feng')
->field('id,thumbnail,image,pic')
->find();
$wonderful = Db::name('wonderful')
->field('id,thumbnail')
->where('is_top',1)
->order('createtime desc,id desc')
->limit('1')
->find();
// $res['wonderful_thumbnail'] = [];
// foreach ($wonderful as &$v){
// $v['thumbnail'] = $rule.$v['thumbnail'];
// array_push($res['wonderful_thumbnail'],$v['thumbnail']);
// }
$this->auth;
$res['video_thumbnail'] = $rule.$data['thumbnail'];
$res['pic_thumbnail'] = $rule.$pic['thumbnail'];
$res['wonderful_thumbnail'] = $rule.$wonderful['thumbnail'];
$res['thumbnail'] = $rule.$data['thumbnail'];
$res['pic'] = $rule.$data['pic'];
$res['image'] = $rule.$data['image'];
$this->success('SUCCESS',$res);
}
... ...