NGTools/uni_modules/uts-openSchema/utssdk/app-ios/index.uts
liaody 3d90da2569 pages.json 分文件配置
uni-module 更新升级
2024-10-09 22:44:03 +08:00

14 lines
500 B
Plaintext

import { OpenSchema } from '../interface.uts'
export const openSchema: OpenSchema = function(url: string): void {
if (typeof url == 'string' && url.length > 0) {
let uri = new URL(string = url)
if (uri != null && UIApplication.shared.canOpenURL(uri!)) {
UIApplication.shared.open(uri!, options = new Map<UIApplication.OpenExternalURLOptionsKey, any>(), completionHandler = null)
}else {
console.error('url param Error: ', url)
}
}else {
console.error('url param Error: ', url)
}
}