真机上开发版能正常显示数据 正式版就没有数据
发布于 6 年前 作者 tianjuan 15271 次浏览 来自 问答

点开开发版 数据正常

点开正式版 就没有数据了。。

有没有大佬帮看下什么原因啊

var host = “919395637.tzxh.xyz”

var config = {

host,

domain: `https://${host}`,

// 获取设置数据

settings_url: `https://${host}/?settings`,

//获取文章列表

article_list_url: `https://${host}?page=1&display=json`,

//获取文章详情

article_detail_url: `https://${host}/post/`,

};

//文章

wx.request({

url: article_list_url,

data: {

page_size: page_size,

page: page

},

header: {

‘content-type’: ‘application/json’

},

success: function (res) {

console.log("===data===" + JSON.stringify(res.data));

that.setData({

articles: res.data.data

});

if (res.data.current_page >= Math.ceil(res.data.total / res.data.per_page)) {

is_get = false

}

}

})

5 回复

console里有报错么

看有没有设置成合法域名

搞定了?  我看了下你这小程序 能正常显示数据呀

你的请求是https的吗

回到顶部