160 lines
4.1 KiB
Vue
Executable File
160 lines
4.1 KiB
Vue
Executable File
<template>
|
||
<view class="page">
|
||
<view class="example-body">
|
||
<uni-search-bar radius="100" placeholder="请输入搜索内容" cancelButton="auto" @confirm="search" />
|
||
</view>
|
||
<scroll-view class="list" scroll-y="true" @scrolltolower="loadMore()">
|
||
<block v-for="(item,index) in list" :key="index">
|
||
<view class="list-row" @click="goDetail(item)">
|
||
<view class="list-row-img">
|
||
<image src="../../../static/com/apply.png" style="width: 70upx; height: 70upx;"></image>
|
||
</view>
|
||
<view class="list-row-sub">
|
||
<view class="sub-top">
|
||
<text class="sub-title">审批主题1</text>
|
||
<text class="sub-datetime">2019-09-09</text>
|
||
</view>
|
||
<text class="sub-date">审批时间:2019-03-29 17:30</text>
|
||
<text class="sub-addr">审批地点:江苏欧软信息科技有限公司</text>
|
||
<text class="sub-reason">审批说明:主要审批内容说明</text>
|
||
<text class="sub-status" :style="{color:statusColor}">审批失败</text>
|
||
</view>
|
||
</view>
|
||
<!--<media-list :options="newsitem" @close="close(index1,index2)" @click="goDetail(newsitem)"></media-list>-->
|
||
</block>
|
||
<view class="uni-tab-bar-loading">
|
||
{{loadingText}}
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import uniSearchBar from '@/components/uni-search-bar/uni-search-bar.vue'
|
||
|
||
const tpl = {
|
||
data0: {
|
||
"datetime": "40分钟前",
|
||
"article_type": 0,
|
||
"title": "uni-app行业峰会频频亮相,开发者反响热烈!",
|
||
"source": "DCloud",
|
||
"comment_count": 639
|
||
},
|
||
data1: {
|
||
"datetime": "一天前",
|
||
"article_type": 1,
|
||
"title": "DCloud完成B2轮融资,uni-app震撼发布!",
|
||
"image_url": "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/shuijiao.jpg?imageView2/3/w/200/h/100/q/90",
|
||
"source": "DCloud",
|
||
"comment_count": 11395
|
||
},
|
||
data2: {
|
||
"datetime": "一天前",
|
||
"article_type": 2,
|
||
"title": "中国技术界小奇迹:HBuilder开发者突破200万",
|
||
"image_url": "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/muwu.jpg?imageView2/3/w/200/h/100/q/90",
|
||
"source": "DCloud",
|
||
"comment_count": 11395
|
||
},
|
||
data3: {
|
||
"article_type": 3,
|
||
"image_list": [{
|
||
"url": "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/cbd.jpg?imageView2/3/w/200/h/100/q/90",
|
||
"width": 563,
|
||
"height": 316
|
||
}, {
|
||
"url": "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/muwu.jpg?imageView2/3/w/200/h/100/q/90",
|
||
"width": 641,
|
||
"height": 360
|
||
}, {
|
||
"url": "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/shuijiao.jpg?imageView2/3/w/200/h/100/q/90",
|
||
"width": 640,
|
||
"height": 360
|
||
}],
|
||
"datetime": "5分钟前",
|
||
"title": "uni-app 支持使用 npm 安装第三方包,生态更趋丰富",
|
||
"source": "DCloud",
|
||
"comment_count": 11
|
||
},
|
||
data4: {
|
||
"datetime": "2小时前",
|
||
"article_type": 4,
|
||
"title": "uni-app 支持原生小程序自定义组件,更开放、更自由",
|
||
"image_url": "https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/cbd.jpg?imageView2/3/w/200/h/100/q/90",
|
||
"source": "DCloud",
|
||
"comment_count": 69
|
||
}
|
||
};
|
||
export default {
|
||
components: {
|
||
uniSearchBar
|
||
},
|
||
data() {
|
||
return {
|
||
statusColor:'red',
|
||
scrollLeft: 0,
|
||
isClickChange: false,
|
||
list: [1,2,3,4],
|
||
loadingText:'加载更多...'
|
||
}
|
||
},
|
||
methods: {
|
||
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
|
||
.page{
|
||
height: 100%;
|
||
}
|
||
scroll-view{
|
||
height: 90%;
|
||
}
|
||
.swiper-tab-list{
|
||
width:33%;
|
||
}
|
||
.uni-tab-bar-loading {
|
||
text-align: center;
|
||
font-size: 28upx;
|
||
color: #999;
|
||
}
|
||
.list-row{
|
||
display: flex;
|
||
flex-direction: row;
|
||
border-bottom: 1upx solid #F2F2F2;
|
||
padding: 15upx;
|
||
}
|
||
.list-row-img{
|
||
display: flex;
|
||
flex: 1;
|
||
justify-content: center;
|
||
padding-top: 30upx;
|
||
}
|
||
.list-row-sub{
|
||
display: flex;
|
||
flex: 4;
|
||
flex-direction: column;
|
||
justify-content: flex-start;
|
||
}
|
||
.sub-top{
|
||
display: flex;
|
||
flex-direction: row;
|
||
}
|
||
.list-row-sub view text{
|
||
display: flex;
|
||
flex: 1;
|
||
align-items: center;
|
||
}
|
||
.sub-title{
|
||
justify-content: flex-start;
|
||
font-size: 35upx;
|
||
font-weight: bold;
|
||
}
|
||
.sub-datetime{
|
||
justify-content: flex-end;
|
||
padding-right: 5%;
|
||
}
|
||
</style>
|