码迷,mamicode.com
首页 > 微信 > 详细

微信小程序云开发更换云开发环境

时间:2018-10-09 20:36:57      阅读:1195      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!