feat: implement miniapp C-group pages with real API calls and design tokens
This commit is contained in:
@@ -5,6 +5,13 @@ declare const wx: WechatMiniprogram.Wx;
|
||||
|
||||
function isDev(): boolean {
|
||||
try {
|
||||
const accountInfo = typeof wx.getAccountInfoSync === 'function'
|
||||
? wx.getAccountInfoSync()
|
||||
: null;
|
||||
if (accountInfo?.miniProgram?.envVersion === 'develop') {
|
||||
return true;
|
||||
}
|
||||
|
||||
const info = (wx.getDeviceInfo ? wx.getDeviceInfo() : wx.getSystemInfoSync()) as any;
|
||||
return info.platform === 'devtools';
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user