标签:erro app.js OLE 小程序 this 初始化 function err 开发环境
小程序云开发环境初始化默认是第一个环境,但是我们可以指定环境id
//app.js
App({
onLaunch: function () {
if (!wx.cloud) {
console.error(‘请使用 2.2.3 或以上的基础库以使用云能力‘)
} else {
wx.cloud.init({
env: "kindear-fd77cd",
traceUser: true,
})
}
this.globalData = {}
}
})
就可以成功更换云开发环境。
标签:erro app.js OLE 小程序 this 初始化 function err 开发环境
原文地址:https://www.cnblogs.com/masterchd/p/9762534.html