作者 Cool
1 个管道 的构建 通过 耗费 13 秒

h5查看图片详情修改

... ... @@ -230,6 +230,7 @@ class Index extends Frontend
$qiniu = get_addon_config('qiniu')['cdnurl'];
$user_id = $this->request->param('user_id');
$file_id = $this->request->param('file_id');
$img_id = $this->request->param('img_id',0,'intval');
$info_res = Db::name('folder')->where('id',$file_id)->find();
if($info_res['is_open'] == 2){
$this->error('该文件夹为私密,请在APP内打开');
... ... @@ -266,10 +267,16 @@ class Index extends Frontend
$pic = $this->myfile(2,$pic);
$zhuan_pic = $this->zhuan(2,$pic_tiao);
$data['pic'] = $this->gong(2,$pic,$zhuan_pic);
$index = 0;
foreach ($data['pic'] as $k=>&$v) {
if($v['id'] == $img_id) {
$index = $k;
}
}
$text = Db::name('official')->where('id',1)->find();
$data['introduce'] = $text['introduce'];
$this->assign('index',$index);
$this->assign('data',$data);
return $this->view->fetch();
}
... ...
... ... @@ -90,7 +90,7 @@
<div class="file-item-bottom pic">
{foreach $vo.info as $val}
<a href="{:url('index/image_detail',array('file_id'=>$file_id,'user_id'=>$user_id))}">
<a href="{:url('index/image_detail',array('file_id'=>$file_id,'user_id'=>$user_id,'img_id'=>$val.id))}">
<div class="file_item_icon">
<img src="{$val.images}" alt="">
</div>
... ...
... ... @@ -83,6 +83,7 @@
<!-- Initialize Swiper -->
<script>
var mySwiper = new Swiper('.swiper-container',{
initialSlide :{$index},
on:{
}
});
... ...