收藏
回答

wx.request 方法 请求地址是一个网络json文件地址,一直无法相应,什么问题?

onLoad(options) {
    let that = this
    wx.showLoading({
      title: '加载中',
      mask: true
    })
    wx.request({
      url: 'https://toyspace-test.oss-cn-beijing.aliyuncs.com/public/config/cityData.json',
      header: {
        'content-type': 'application/json'
      },
      success(res) {
        wx.hideLoading();
        console.log(res.data)
        that.setData({
          areaData: res.data
        })
      }
    })
  }

地区三级联动的数据是一个网络的json地址,开发工具,真机模拟都没问题,发布到体验版就一直loading,无法加载成功,怎么回事?
回答关注问题邀请回答
收藏
登录 后发表内容