Blame view

pages/funerallaw/funerallaw.vue 2.04 KB
1f3f2378   起风了   我的第一次
1
2
3
4
5
6
7
8
9
10
11
  <template>
  	<view class="page">
  		<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
  		<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
  		<view class="content">
  		<view class="address-list">
  			<view class="list" v-for="(item,index) in list" :key="index">
  				<view class="name-phone">
  					<view class="name">
  						<text>{{item.title}}</text>
  					</view>
b958631b   李宇   2
12
  					<view class="edit" @click="tzdetail(item.id)">
1f3f2378   起风了   我的第一次
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  						<image src="../../static/right2.png"></image>
  					</view>
  				</view>
  				<view class="address">
  					<text>{{item.absrtact}}</text>
  				</view>
  			</view>
  		</view>
  		</view>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
  				nvConfig:{
  					title:"殡葬普法宣传",
  					bgColor:"#ffffff",
  					color:"#000000",
  					fixedAssist:{
  						hide:true,
  					},
  				},
  				page:{
  					pageNum:1,
  					pageSize:10,
  					category:"01"
  				},
  				total:0,
  				list:[]
  			};
  		},
  		onPageScroll(e) {this.$refs.nv.pageScroll(e)},
  		computed:{
  			pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
  		},
b958631b   李宇   2
51
  		onLoad() {
1f3f2378   起风了   我的第一次
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  			this.getfbgl();
  		},
  		methods: {
  			getfbgl(){
  				this.API.getfbgl(this.page).then(res=>{
  					this.fl(res.rows,"殡葬普法宣传")
  					console.log('获取发布信息',this.list);
  					this.total = res.total
  				})
  			},
  			fl(item,flid){
  				var info = []
  				for(let i = 0;i < item.length;i++){
  					if(item[i].category == flid){
  						this.list.push(item[i])
  					}
  				}
  				return info
  			},
  			tzdetail(item){
  				console.log("ress",item);
  				uni.navigateTo({
b958631b   李宇   2
74
  					url:'/pages/xxdetail/xxdetail?info=' + item
1f3f2378   起风了   我的第一次
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
  				})
  			}
  		},
  		onReachBottom() {
  			var page = parseInt(this.total / 10 );
  			var s = parseInt(this.total % 10 );
  			console.log(page,s);
  			if(s > 0){
  				page = page + 1
  			}
  			if(page > 0){
  				if(this.page.pageNum < page){
  					this.page.pageNum = this.page.pageNum + 1
  					this.getfbgl();
  				}else{
  					console.log("没有了");
  				}
  			}
  		},
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'funerallaw.scss';
  </style>