reactor:platform 的获取,从 getSystemInfoSync 迁移到 getAppBaseInfo

This commit is contained in:
YunaiV
2025-04-29 19:58:27 +08:00
parent 90e22374ee
commit 04bb5e65d3
6 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export const TerminalEnum = {
* @return 终端
*/
export const getTerminal = () => {
const platformType = uni.getSystemInfoSync().uniPlatform;
const platformType = uni.getAppBaseInfo().uniPlatform;
// 与后端terminal枚举一一对应
switch (platformType) {
case 'app':
+1 -1
View File
@@ -45,7 +45,7 @@ export function sleep(value = 30) {
* @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台
*/
export function os() {
return uni.getSystemInfoSync().platform.toLowerCase();
return uni.getDeviceInfo().platform.toLowerCase();
}
/**
* @description 获取系统信息同步接口