press-plus
Version:
23 lines (20 loc) • 506 B
text/typescript
export const isProd = () => {
// #ifndef H5
const accountInfo = wx.getAccountInfoSync();
if (accountInfo.miniProgram.envVersion === 'develop' || accountInfo.miniProgram.envVersion === 'trial') {
// 体验版以及开发版
return false;
}
// #endif
return true;
};
export const isTrial = () => {
// #ifndef H5
const accountInfo = wx.getAccountInfoSync();
if (accountInfo.miniProgram.envVersion === 'trial') {
// 体验版
return true;
}
// #endif
return false;
};