增加部分方法
This commit is contained in:
26
utils/app.js
Normal file
26
utils/app.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
export function openApp(url) {
|
||||||
|
// #ifdef H5
|
||||||
|
window.location.href = 'com.hnsiyao.duanju://'
|
||||||
|
// #endif
|
||||||
|
}
|
||||||
|
export function isAndroid() {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
const isA = systemInfo.platform === 'android'
|
||||||
|
isAndroid = () => {
|
||||||
|
return isA
|
||||||
|
}
|
||||||
|
isA
|
||||||
|
}
|
||||||
|
export function isIos() {
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
const isIOS = /iOS/.test(systemInfo.platform);
|
||||||
|
isIos = () => {
|
||||||
|
return isIOS
|
||||||
|
}
|
||||||
|
return isIOS
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前系统版本信息
|
||||||
|
export function getVeriosn() {
|
||||||
|
return plus.runtime.getProperty(plus.runtime.appid)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user