123456789101112131415161718192021222324252627282930313233343536373839404142 |
- // import request from './request.js'
- const baseUrl = "https://data.cqna.gov.cn"
- const request = (options) => {
- return new Promise((resolve,reject) => {
- options.url = baseUrl + options.url
- wx.request({
- // 配置 "wx.request" 请求参数
- ...options,
- header: {
- 'content-type': 'application/json;charset=UTF-8'
- },
- success: function (res) {
- // console.log("network-res=>", res);
- // 返回成功信息
- resolve(res.data)
- },
- fail: function (error) {
- // console.log("network-err=>", error);
- // 返回错误信息
- reject(error)
- }
- })
- })
- }
- export function info(channelId,docId) {
- const params = {'channelId': channelId, 'docId': docId}
- return request({
- url: `/mini/hlw/info`,
- method: 'GET',
- data: params
- })
- }
- export function send(page,limit,channelId) {
- const params = {'page': page, 'limit': limit,'channelId': channelId}
- return request({
- url: `/mini/hlw/send`,
- method: 'GET',
- data: params
- })
- }
|