PageSourceSearch

https://www.tkww.hk/static/tkwwtemplate/js/api/model/epaper/index.js

js tkww.hk collected 2026-10-01 10:37:41 UTC 3,883 bytes, 127 lines download raw bytes

1import request from "../../request.js"
2import URL from "../../url/epaper/index.js"
3import Util from "../../../utils/util.js"
4import CONFIG from "../../../utils/config.js"
5class Epaper{
6  //获取電子報版面列表
7  static list({
8    bookId="tkp",
9    publishDate=Util.formatTimestamp(new Date().getTime(),"YYYYmmdd"),
10    page=0,
11    size=6,
12    categoryName=""
13  }){
14    // let bdzhUserId = Storage.getCookie({key:"login_user_id"})
15    // if(Util.isNull(bdzhUserId))return
16    // bdzhUserId = bdzhUserId.split('~')[1]
17    let url = `${URL.LIST}?bookId=${bookId}&publishDate=${publishDate}&page=${page}&size=${size}&categoryName=${categoryName}`
18    return request.get({
19      url
20    })
21  }
22  //获取電子報版面鏈接列表
23  static Link({
24    bookId="tkp",
25    sectionId,
26  }){
27    // let bdzhUserId = Storage.getCookie({key:"login_user_id"})
28    // if(Util.isNull(bdzhUserId))return
29    // bdzhUserId = bdzhUserId.split('~')[1]
30    let url = `${URL.LINK}?bookId=${bookId}&sectionId=${sectionId}`
31    return request.get({
32      url
33    })
34  }
35  //获取文匯報欄目列表
36  static columnList(){
37    // let bdzhUserId = Storage.getCookie({key:"login_user_id"})
38    // if(Util.isNull(bdzhUserId))return
39    // bdzhUserId = bdzhUserId.split('~')[1]
40    let baseURL=CONFIG.BASE_HOST_NAME
41    return request.get({
42      url:URL.COLUMN_LIST,
43      config: {
44        baseURL
45      }
46    })
47  }
48  //获取文匯報欄目稿件列表
49  static storyList({page=0,column}){
50    // let bdzhUserId = Storage.getCookie({key:"login_user_id"})
51    // if(Util.isNull(bdzhUserId))return
52    // bdzhUserId = bdzhUserId.split('~')[1]
53    let baseURL=CONFIG.BASE_HOST_NAME
54    return request.get({
55      url:`channels/wenweipo/todaywenwei/columns/${column}/tkww/stories/more_${page}.json`,
56      config: {
57        baseURL
58      }
59    })
60  }
61  //获取文匯報稿件數據
62  static storyData({url}){
63    // let bdzhUserId = Storage.getCookie({key:"login_user_id"})
64    // if(Util.isNull(bdzhUserId))return
65    // bdzhUserId = bdzhUserId.split('~')[1]
66    return request.get({
67      url,
68    })
69  }
70  static bookCategory({
71    bookId="tkp-os",
72    publishDate=Util.formatTimestamp(new Date().getTime(),"YYYYmmdd"),
73  }){
74    // let bdzhUserId = Storage.getCookie({key:"login_user_id"})
75    // if(Util.isNull(bdzhUserId))return
76    // bdzhUserId = bdzhUserId.split('~')[1]
77    let url = `${URL.BOOK_CATEGORY}?bookId=${bookId}&publishDate=${publishDate}`
78    return request.get({
79      url
80    })
81  }
82  static dateStoryList({
83    channel="takungpao",//僅支持"takungpao"與"wenweipo"
84    columnId,
85    publishTime=Util.formatTimestamp(new Date().getTime(),"YYYY-mm-dd"),
86    page,
87  }){
88    let url = ""
89    if(publishTime===""){
90      if(channel==="takungpao"){
91        url = `columns/${columnId}/tkww/stories/more_${page}.json`
92      }else{
93        url = `channels/${channel}/todaywenwei/columns/${columnId}/tkww/app/stories/more_${page}.json`//`channels/${channel}/columns/${columnId}/tkww/app/stories/more_${page}.json`
94      }
95    }else{
96      if(channel==="takungpao"){
97        url = `channels/${channel}/columns/${columnId}/date/stories.json?publishTime=${publishTime}&page=${page}&includeSubColumn=false&order=desc`
98      }else{
99        url = `channels/${channel}/todaywenwei/columns/${columnId}/date/stories.json?publishTime=${publishTime}&page=${page}&size=30&includeSubColumn=true&order=desc`
100      }
101    }
102    let baseURL=CONFIG.BASE_HOST_NAME
103    /*if(channel==='wenweipo'){
104      baseURL=CONFIG.BASE_WWP_URL
105    }*/
106    return request.get({
107      url,
108      config: {
109        baseURL
110      }
111    })
112  }
113  static getWwpColumnData({
114    columnId,
115  }){
116    let url = `channels/wenweipo/todaywenwei/column/${columnId}/columns.json`
117    let baseURL=CONFIG.BASE_HOST_NAME
118    return request.get({
119      url,
120      config: {
121        baseURL
122      }
123    })
124  }
125}
126
127export default Epaper

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.