作者 景龙
1 个管道 的构建 通过 耗费 1 秒

上传明星访谈更多

... ... @@ -115,15 +115,15 @@ class RegionController extends HomeBaseController
->toArray();
$post_id = array_column($post_id,'post_id');
//查询文章
$res = Db::table($pre.'portal_post')
$res = Db::name('portal_post')
->whereIn('id',$post_id)
->where('delete_time', 0)
->field($field)
->page($page,$limit)
->order('weigh desc')
->select()
->toArray();
return $res;
->paginate(1);
$arr['data'] = $res;
$arr['page'] = $res->render();
return $arr;
}
//获取城市分类
... ... @@ -158,7 +158,9 @@ class RegionController extends HomeBaseController
$position['category_id'] = CityCategoryModel::mxft;
$field = 'id,thumbnail avatar,full_name,position,trade,post_excerpt';
$res = $this->getChildArticlePage($position,$field,$page,5);
$this->assign('res',$res);
$this->assign('res',$res['data']);
$this->assign('page',$res['page']);
return $this->fetch();
}
//明星访谈详情
... ...
... ... @@ -693,6 +693,7 @@
<include file="public@footer"/>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/swiper4/swiper.min.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
<script>
// 星球奇景
$('.africa p,.asia p,.north p,.south p,.antarctica p,.europe p,.oceania p').click(function() {
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>明星访谈更多</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/layui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/header.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/show.css">
</head>
<body>
<!--头部-->
<include file="public@header">
<!-- main 背景 -->
<div class="show_InMain show_3_Box">
<!-- 明星访谈盒子 -->
<div class="show_InMain_box">
<!-- 顶部标题 -->
<div class="show_INMain_tit clearfix">
<div class="show_IN1 clearfix">
<img src="__TMPL__/public/assets/starImg/aicon_48.png" alt="">
<p>明星<span>访谈</span></p>
<h2>Star Interview</h2>
</div>
<!-- 更多 -->
<!--<div class="show_IN2">-->
<!--<a href=""> MORE+ </a>-->
<!--</div>-->
</div>
<!-- 内容--1 -->
<div class="show_INMain_con clearfix">
<img class="show_INMain_con1" src="__TMPL__/public/assets/starImg/aicon_31.png" alt="">
<div class="show_INMain_con2 clearfix">
<img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt="">
<h2>胡歌</h2>
<h3>著名国际巨星 慈善家</h3>
<p>那年孩子们都上大学了,我孑然一身,几个老弟兄说出国走走看看,一个老嫂子会点外语,于是我们就自由行到了欧洲,法国,德国,意大利,几个国家转了一圈,外国的天气,气候真是清新,不去的时候不想,但是身临其境的时候就会感受到巨大的差异。巴黎车水马龙,意大利热情奔放,</p>
</div>
</div>
<!-- 内容--2 -->
<div class="show_3_list">
<ul class="clearfix">
<li>
<img src="__TMPL__/public/assets/starImg/bicon_24.png" alt="">
<div class="show_3_list_txt">
<h1>斯嘉丽·约翰逊</h1>
<h2>著名国际巨星 慈善家</h2>
<p>
这两位的婚礼这几天在微博上是大有刷屏之势,新娘新郎就算了,连参加婚礼的宾客们都轮番换着上热搜,那叫一个热闹。其实除了刘诗诗吴奇隆,之前杨幂和刘恺威的婚礼也是选在了巴厘岛。地处印度尼西亚的巴厘岛是著名的旅游海岛,岛上热带风情浓郁,风景绮丽无比,这里的细阔沙滩. 魂牵梦绕。
</p>
</div>
</li>
<li>
<img src="__TMPL__/public/assets/starImg/bicon_24.png" alt="">
<div class="show_3_list_txt">
<h1>斯嘉丽·约翰逊</h1>
<h2>著名国际巨星 慈善家</h2>
<p>
这两位的婚礼这几天在微博上是大有刷屏之势,新娘新郎就算了,连参加婚礼的宾客们都轮番换着上热搜,那叫一个热闹。其实除了刘诗诗吴奇隆,之前杨幂和刘恺威的婚礼也是选在了巴厘岛。地处印度尼西亚的巴厘岛是著名的旅游海岛,岛上热带风情浓郁,风景绮丽无比,这里的细阔沙滩. 魂牵梦绕。
</p>
</div>
</li>
<li>
<img src="__TMPL__/public/assets/starImg/bicon_24.png" alt="">
<div class="show_3_list_txt">
<h1>斯嘉丽·约翰逊</h1>
<h2>著名国际巨星 慈善家</h2>
<p>
这两位的婚礼这几天在微博上是大有刷屏之势,新娘新郎就算了,连参加婚礼的宾客们都轮番换着上热搜,那叫一个热闹。其实除了刘诗诗吴奇隆,之前杨幂和刘恺威的婚礼也是选在了巴厘岛。地处印度尼西亚的巴厘岛是著名的旅游海岛,岛上热带风情浓郁,风景绮丽无比,这里的细阔沙滩. 魂牵梦绕。
</p>
</div>
</li>
</ul>
</div>
<!-- 内容--3 -->
<div class="show_INMain_con show_3_con3 clearfix">
<img class="show_INMain_con1" src="__TMPL__/public/assets/starImg/aicon_31.png" alt="">
<div class="show_INMain_con2 clearfix">
<img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt="">
<h2>林允儿</h2>
<h3>著名国际巨星 慈善家</h3>
<p>那年孩子们都上大学了,我孑然一身,几个老弟兄说出国走走看看,一个老嫂子会点外语,于是我们就自由行到了欧洲,法国,德国,意大利,几个国家转了一圈,外国的天气,气候真是清新,不去的时候不想,但是身临其境的时候就会感受到巨大的差异。巴黎车水马龙,意大利热情奔放,</p>
</div>
</div>
<!-- 底部翻页 -->
<!-- <div class="show_3_nextPage clearfix">
<span> < </span>
<p>1</p>
<p>2</p>
<p>3</p>
<span> > </span>
</div> -->
</div>
<div class="pagination">
{$page|default=''}
</div>
<!--<div id="page">-->
<!--</div>-->
</div>
<!-- 底部 -->
<footer></footer>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/layui.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
<script>
// page 分页
$(function() {
var dataObj = {
dataList: [{
img: "__TMPL__/public/assets/starImg/bicon_24.png",
name: "121212",
name_tit: "按时大苏打啊实打",
content: "偶是女的芬兰首都基辅九分零四"
}, {
img: "__TMPL__/public/assets/starImg/bicon_24.png",
name: "121212",
name_tit: "按时大苏打啊实打",
content: "偶是女的芬兰首都基辅九分零四"
}, {
img: "__TMPL__/public/assets/starImg/bicon_24.png",
name: "121212",
name_tit: "按时大苏打啊实打",
content: "偶是女的芬兰首都基辅九分零四"
}, {
img: "__TMPL__/public/assets/starImg/bicon_24.png",
name: "121212",
name_tit: "按时大苏打啊实打",
content: "偶是女的芬兰首都基辅九分零四"
}, {
img: "__TMPL__/public/assets/starImg/bicon_24.png",
name: "121212",
name_tit: "按时大苏打啊实打",
content: "偶是女的芬兰首都基辅九分零四"
}]
}
var  currPage = 1; // 当前页
var  limit = 1; // 每页显示的条数
var count = dataObj.dataList.length;
console.log(count);
layui.use('laypage', function() {
var laypage = layui.laypage //分页
//执行一个laypage实例
laypage.render({ //layui分页 
elem: 'page',
  //分页容器id
    count: count, //总条数
  curr: currPage, //当前页
  limit: limit, //每页的条数
//     limits: 1, //可选择每页数目
  prev: "<", //上一页图标
  next: ">", //下一页图标
  theme: 'xxx', //分页主色
//   layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], //设置分页组件显示
    jump: function(obj, first) {        
if (!first) { //设置首次渲染分页无需走业务逻辑处理函数,不然会陷入死循环
console.log(obj);
currPage = obj.curr; 
console.log(currPage)       
limit = obj.limit;              
}          
}    
})
})
});
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -45,7 +45,7 @@
</div>
<!-- 更多 -->
<div class="show_IN2">
<a href="show_3.html"> MORE+ </a>
<a href="/portal/region/getMoreStar"> MORE+ </a>
</div>
</div>
<!-- 内容 -->
... ... @@ -116,6 +116,10 @@
<p>星球<span>画廊</span></p>
<h2>Star Gallery</h2>
</div>
<!-- 更多 -->
<div class="show_IN2">
<a href=""> MORE+ </a>
</div>
</div>
<!-- 内容 -->
<div class="show_INMain_con3_3 swiper-container">
... ... @@ -237,6 +241,7 @@
<include file="public@footer"/>
<script src="__TMPL__/public/assets/js/jquery-3.2.1.min.js"></script>
<script src="__TMPL__/public/assets/js/swiper4/swiper.min.js"></script>
<script src="__TMPL__/public/assets/js/public.js"></script>
<script>
// 星球画廊swiper
var swiper = new Swiper('.swiper-container', {
... ...
/** layui-v2.4.5 MIT License By https://www.layui.com */
;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.4.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;o<e.length&&!t.call(e[o],o,e[o]);o++);return n},n.prototype.sort=function(e,t,o){var n=JSON.parse(JSON.stringify(e||[]));return t?(n.sort(function(e,o){var n=/^-?\d+$/,r=e[t],i=o[t];return n.test(r)&&(r=parseFloat(r)),n.test(i)&&(i=parseFloat(i)),r&&!i?1:!r&&i?-1:r>i?1:r<i?-1:0}),o&&n.reverse(),n):n},n.prototype.stope=function(t){t=t||e.event;try{t.stopPropagation()}catch(o){t.cancelBubble=!0}},n.prototype.onevent=function(e,t,o){return"string"!=typeof e||"function"!=typeof o?this:n.event(e,t,null,o)},n.prototype.event=n.event=function(e,t,n,r){var i=this,a=null,u=t.match(/\((.*)\)$/)||[],l=(e+"."+t).replace(u[0],""),s=u[1]||"",c=function(e,t){var o=t&&t.call(i,n);o===!1&&null===a&&(a=!1)};return r?(o.event[l]=o.event[l]||{},o.event[l][s]=[r],this):(layui.each(o.event[l],function(e,t){return"{*}"===s?void layui.each(t,c):(""===e&&layui.each(t,c),void(s&&e===s&&layui.each(t,c)))}),a)},e.layui=new n}(window);
\ No newline at end of file
... ...
... ... @@ -32,4 +32,26 @@ $(function(){
$(this).text('查看更多评论');
}
});
//头部导航栏切换颜色
var str_url = window.location.pathname;
$('.home_nav_act,.slide_vo').children('a').removeClass('home_nav_act');
var star = 'star';//星球奇境
var region = 'region';//星域秀场
var enjoy = 'enjoy';//星享体验
var scout = 'scout';//星探推荐
var active = 'active';//星际活动
if(str_url.indexOf(star) != -1){
$('.slide_vo').eq(0).children('a').addClass('home_nav_act');
}else if(str_url.indexOf(region) != -1){
$('.slide_vo').eq(1).children('a').addClass('home_nav_act');
}else if(str_url.indexOf(enjoy) != -1){
$('.slide_vo').eq(2).children('a').addClass('home_nav_act');
}else if(str_url.indexOf(scout) != -1){
$('.slide_vo').eq(3).children('a').addClass('home_nav_act');
}else if(str_url.indexOf(active) != -1){
$('.slide_vo').eq(4).children('a').addClass('home_nav_act');
}else{
$('.home_nav_act').children('a').addClass('home_nav_act');
}
});
\ No newline at end of file
... ...
... ... @@ -11,7 +11,7 @@
<a class="home_nav_act" href="/">首页</a>
</li>
<volist name="slide" id="vo">
<li>
<li class="slide_vo">
<a class="home_nav_act_A" href="{$vo.url}">{$vo.name}</a>
<div class="home_nav_down">
<div class="home_nav_down2">
... ...