|
|
@@ -19,7 +19,16 @@ export default {
|
|
|
created() {
|
|
|
if (process.client) {
|
|
|
if (Cookies.get('x_app') || /(android|iphone|ipod)/i.test(window.navigator.userAgent)) {
|
|
|
- window.location.href = window.location.href.replace(location.host, MOB_HOST)
|
|
|
+ const source = window.location.href
|
|
|
+ let target
|
|
|
+
|
|
|
+ if (/\/(s|d)\/[0-9a-f]+/.test(source)) {
|
|
|
+ target = source.replace(location.host, MOB_HOST)
|
|
|
+ } else {
|
|
|
+ target = `https://${MOB_HOST}/`
|
|
|
+ }
|
|
|
+
|
|
|
+ window.location.href = target
|
|
|
}
|
|
|
}
|
|
|
}
|