1
2
3
4
5
6
7
8
9
10
11
12
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
| import { useLoading } from '../../../behaviors/loading';
| import { fetchNews } from '../../../services/news/fetchNews';
| import { openDoc } from '../../../utils/file';
|
| Page({
| behaviors: [useLoading],
| data: {
|
| },
|
| onLoad(options) {
| this._startLoad();
| },
|
| onPullDownRefresh() {
| this._startLoad();
| },
|
| onReachBottom() {
| this._loadMore();
| },
|
| _fetchData(page) {
| // 执法动态
| const sceneTypeId = '7';
| return fetchNews({
| page: page,
| data: { fileType: 1, sceneTypeId },
| }).then(res => {
| this.setData({
| infoList: page == 1 ? res.data : this.data.infoList.concat(res.data),
| });
| return res.head;
| });
| },
|
| navToInfoPage(e) {
| let { url, fileType } = e.detail;
| switch (fileType) {
| // office文档
| case 1:
| openDoc(url);
| break;
|
| default:
| break;
| }
| },
| })
|
|