- 在utils文件夹下创建isdev.js文件
// 判断环境
// develop 开发版
// trial 体验版
// release 正式版
const accountInfo = wx.getAccountInfoSync();
const env = accountInfo.miniProgram.envVersion;
module.exports = env;
// 判断环境
// develop 开发版
// trial 体验版
// release 正式版
const accountInfo = wx.getAccountInfoSync();
const env = accountInfo.miniProgram.envVersion;
module.exports = env;