reactor:osName 的获取,从 getSystemInfoSync 迁移到 getDeviceInfo
reactor:pixelRatio/windowHeight/windowWidth 的获取,从 getSystemInfoSync 迁移到 getWindowInfo
This commit is contained in:
@@ -3,7 +3,8 @@ export const isBase64 = (path) => /^data:image\/(\w+);base64/.test(path);
|
||||
export function sleep(delay) {
|
||||
return new Promise(resolve => setTimeout(resolve, delay))
|
||||
}
|
||||
let {platform, SDKVersion} = uni.getSystemInfoSync()
|
||||
let platform = uni.getDeviceInfo().platform
|
||||
let SDKVersion = uni.getSystemInfoSync().SDKVersion
|
||||
export const isPC = /windows|mac/.test(platform)
|
||||
// 缓存图片
|
||||
let cache = {}
|
||||
@@ -316,7 +317,7 @@ export function getImageInfo(path, useCORS) {
|
||||
// #ifdef APP-PLUS
|
||||
// console.log('getImageInfo', +new Date() - time)
|
||||
// ios 比较严格 可能需要设置跨域
|
||||
if(uni.getSystemInfoSync().osName == 'ios' && useCORS) {
|
||||
if(uni.getDeviceInfo().osName === 'ios' && useCORS) {
|
||||
pathToBase64(image.path).then(base64 => {
|
||||
image.path = base64
|
||||
cache[path] = image
|
||||
|
||||
Reference in New Issue
Block a user