Commit b1001144 by 陈超

A

parent bbf743f9
<include file="__THEME__/public_header_w3g"/> <include file="__THEME__/public_header_w3g"/>
<style> <style>
body { .info{line-height: 20px;}
padding: 0 !important; .info i{transform: translateY(2px);font-size:18px;padding-right:5px;}
} .newslist h3{min-height: 40px;}
</style> </style>
<div id="app"> <div class="min-height-wrap">
<!--content start-->
<van-sticky> <div class="body">
<div class="tabs_container"> <div id="slideBox" class="slideBox">
<div @click="onChange(idx)" v-for="(opt, idx) in options" :key="idx" :class="idx == tab ? 'tab_item_selected' : 'tab_item_normal'" > <div class="bd">
<span>{{opt.title}}</span> <ul>
</div> <volist name="ad_list" id="vo" offset="0" length="5">
</div> <li>
</van-sticky> <a target="_blank" href="{$vo.bannerurl}">
<img src="{:getCover($vo['banner'],640,320)}" title="{$vo.banner_title}" alt="{$vo.banner_title}" class="lazyloading"/>
<van-list </a>
v-model="loading" </li>
:finished="finished" </volist>
finished-text="没有更多了" </ul>
@load="onLoad"> </div>
<div class="hd">
<template v-if="tab == 0"> <ul></ul>
<div v-for="(item, index) in options[0].items" class="layout_h news_hire_info"> </div>
<van-image height="72" width="72" :src="item.cover" fit="cover" ></van-image> </div>
<div class="layout_v_b weight_full" style="margin-left: 0.75rem;"> <script type="text/javascript">
<div class="text_14_600 color_333333">{{item.title}}</div> // TouchSlide({
<div class="layout_h_b" style="align-items: flex-end;"> // slideCell:"#slideBox",
<div class="layout_h"> // titCell:".hd ul", //开启自动分页 autoPage:true ,此时设置 titCell 为导航元素包裹层
<span class="text_12_400 color_999999" style="margin-right: 0.75rem;">{{item.location}}</span> // mainCell:".bd ul",
<span class="text_12_400 color_999999" style="margin-right: 0.75rem;">{{item.type}}</span> // effect:"leftLoop",
<span class="text_12_400 color_999999">{{item.date}}</span> // autoPage:true,//自动分页
</div> // autoPlay:true //自动播放
<div class="layout_h_r weight_full"> // });
<div @click="onItem(item)" class="news_see_button layout_center text_12_400 color_white">查看</div> </script>
</div> <ul class="newsnav">
</div> <li><a href="{:U('news/Topic/index')}" <if condition="$_GET['cate'] eq ''">style="color: #00BED4;"</if> >全部资讯</a></li>
</div> <volist name="cate" id="vo">
</div> <li><a href="{:U('news/Topic/index',['cate'=>$vo['zy_topic_category_id']])}" <if condition="$_GET['cate'] eq $vo['zy_topic_category_id']">style="color: #00BED4;border-bottom: 2px solid #00BED4;"</if> >{:t($vo['title'])}</a></li>
</template> </volist>
</ul>
<template v-if="tab == 1"> <!--<div class="searchdiv"><if condition="$cate_name_one">在“<span>{$cate_name_one}</span>”分类下,</if>找到{$topic_data.count}条资讯</div>-->
<ul class="newslist more_newslist">
</template> <volist name="topic_data.data" id="vo">
<li><a href="{:U('news/Topic/view',array('id'=>$vo['id']))}">
<template v-if="tab == 2"> <img src="{:getCover($vo['image'],150,90)}" />
<h3>{$vo.title|mStr=###,'25'}</h3>
</template> <!-- <p>{$vo.desc|mStr=###,'85'}</p> -->
<div class="info"><span><i class="iconfontNEW">&#xe6e6;</i>{$vo.readcount}浏览</span><span style="float:right;transform: translateY(1px)">{$vo.dateline|friendlyDate}</span></div>
</van-list> </a></li>
</volist>
</ul>
</div>
<div class="loadding">
<php>if($topic_data['data']){</php>
<if condition="$topic_data['nowPage'] eq $topic_data['totalPages']">
<div>再拉也没有了。。</div><else/>正在加载更多。。
</if></div>
<php>}else{</php>
<div>再拉也没有了。。</div>
<php>}</php>
</div>
<a class="backtop"></a>
</div> </div>
<script> <script>
var p = 1;
new Vue({ $(window).scroll(function () {
el: "#app",
data: function() { //已经滚动到上面的页面高度
return { var scrollTop = $(this).scrollTop();
tab: 0, //页面高度
loading: false, var scrollHeight = $(document).height();
finished: false, //浏览器窗口高度
options: [{ var windowHeight = $(this).height();
title: "招聘信息", //此处是滚动条到底部时候触发的事件,在这里写要加载的数据,或者是拉动滚动条的操作
items: [{ if (scrollHeight-(scrollTop + windowHeight)<60) {
title: "2020年西藏高校毕业生公开考录公务员计划及职位信息公告", if(!p || p >= "{$topic_data['totalPages']}"){
location: "西藏", return false;
type: "公务员",
date: "2020-02-20" }else{
}], p = p + 1;
page: 0, ajaxBang();
finished: false }
},{ }
title: "平台公告", });
items: [],
page: 0, //请求事件
finished: false function ajaxBang(){
},{ $.ajax({
title: "考试信息", type: "GET",
items: [], url:"{:U('news/Topic/getTopicList')}",
page: 0, data:"p="+p+"&cate={$_GET['cate']}",
finished: false dataType:"json",
}] success:function(data){
} appendHtml(data);
}, }
methods: { });
onChange: function(tab) { }
this.tab = tab //追加html
}, function appendHtml(data){
onLoad: function() { $(".more_newslist").append(data.data);
if(!p || p >= data.totalPages){
}, $('.loadding').html('<div>再拉也没有了。。</div>')
onItem: function(item) { return false;
}else{
} p = data.nowPage;//下一页
} }
}) }
</script> </script>
<!--footer--> <!--footer-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment