读取数据时出现如下错误
发布于 8 年前 作者 love_me2016 3088 次浏览 来自 问答

WAService.js:1 thirdScriptError page is not defined Page pages/picture/picture catch error in lifeCycleMethod onLoad function ReferenceError: page is not defined

var app = getApp() var http = require( ‘…/…/utils/util’ ) var url = 'http://japi.juhe.cn/joke/img/text.from’ Page( { data: { page: 1, loadingHide: false, hideFooter: true, picList: [] }, onLoad: function( options ) { // 页面初始化 options为页面跳转所带来的参数 var that = this //请求笑话列表 wx.request({ url: url, method: ‘GET’, data: { key: app.globalData.appkey, page: page, pagesize: app.globalData.pagesize }, success:function(res) { that.setData({ picList: res.data.result.data, }) }

})

3 回复

很清楚的错误啊:page is not defined

对啊 这么清楚的报错 request里面 page:page undefined

回到顶部