修复移动端设备上传图片变为打开相机
This commit is contained in:
@@ -148,10 +148,12 @@ const formatTime = (timestamp, fmt) => {
|
||||
|
||||
const isMoible = () => {
|
||||
let is_mobile = navigator.userAgent.toLowerCase().match(/(ipad|ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null;
|
||||
// alert(navigator.userAgent.toLowerCase())
|
||||
var isiPad = /iPad/.test(navigator.platform) || (navigator.maxTouchPoints && navigator.maxTouchPoints > 2);
|
||||
if (is_mobile) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
return isiPad
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user