|
|
@ -33,6 +33,7 @@ export default { |
|
|
|
window.scroll(0, 0); |
|
|
|
}, |
|
|
|
created() { |
|
|
|
console.log("this._isMobile();") |
|
|
|
this._isMobile(); |
|
|
|
|
|
|
|
// const userId = '1218763410024566784'; |
|
|
@ -47,8 +48,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
...mapActions('user', ['getUserId']), |
|
|
|
_isMobile(){ |
|
|
|
console.log("是否走到了_isMobile") |
|
|
|
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) |
|
|
|
// localStorage.setItem('isiphone',flag) |
|
|
|
// localStorage.setItem('ismobile',flag?1:0) |
|
|
|