我们这开发了一个小程序,体验版访问数据API 没有问题。 但提交审核通过发布正式线上程序有问题。查看管理后台有错误
config is not defined;at "pages/user/classes/index" page lifeCycleMethod onLoad function
ReferenceError: config is not defined
at be.onGetList (app-service.js:1635:285)
at be.onLoad (app-service.js:1635:63)
at be.<anonymous> (WASubContext.js:2:1470934)
at be.p.__callPageLifeTime__ (WASubContext.js:2:1470679)
at Tt (WASubContext.js:2:1486210)
at At (WASubContext.js:2:1487719)
at Function.<anonymous> (WASubContext.js:2:1493622)
at i.<anonymous> (WASubContext.js:2:1462211)
at i.emit (WASubContext.js:2:453065)
at Object.emit (WASubContext.js:2:439273)
请教这是什么问题。为什么体验版都正常?
pages/user/classes/index这个页面 onLoad里的代码 截个图
const config = require("../../../utils/config.js")
Page({
/**
* 页面的初始数据
*/
data: {
dataList:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let _this=this
_this.onGetList(options.id)
},
/**
onGetList