reactor:platform 的获取,从 getSystemInfoSync 迁移到 getAppBaseInfo
This commit is contained in:
@@ -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':
|
||||
|
||||
@@ -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 获取系统信息同步接口
|
||||
|
||||
Reference in New Issue
Block a user