合并分支 'dev_20230526_Mobile' 到 'master'
Dev 20230526 mobile 查看合并请求 laws-nio/laws-weilai!343
This commit is contained in:
Vendored
+33
-30
@@ -268,36 +268,39 @@
|
|||||||
</style>
|
</style>
|
||||||
<!-- 全局配置 -->
|
<!-- 全局配置 -->
|
||||||
<script>
|
<script>
|
||||||
// 判断当前设备
|
localStorage.removeItem('isPhone')
|
||||||
function isMobile() {
|
localStorage.setItem('isPhone', 'yes')
|
||||||
var userAgentInfo = navigator.userAgent
|
window.loginUrl = 'https://grp.nioint.com'
|
||||||
|
// // 判断当前设备
|
||||||
var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
|
// function isMobile() {
|
||||||
|
// var userAgentInfo = navigator.userAgent
|
||||||
var mobile_flag = false
|
//
|
||||||
|
// var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
|
||||||
//根据userAgent判断是否是手机
|
//
|
||||||
for (var v = 0; v < mobileAgents.length; v++) {
|
// var mobile_flag = false
|
||||||
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
//
|
||||||
mobile_flag = true
|
// //根据userAgent判断是否是手机
|
||||||
break
|
// for (var v = 0; v < mobileAgents.length; v++) {
|
||||||
}
|
// if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
||||||
}
|
// mobile_flag = true
|
||||||
var screen_width = window.screen.width
|
// break
|
||||||
var screen_height = window.screen.height
|
// }
|
||||||
|
// }
|
||||||
//根据屏幕分辨率判断是否是手机
|
// var screen_width = window.screen.width
|
||||||
if (screen_width < 500 && screen_height < 800) {
|
// var screen_height = window.screen.height
|
||||||
mobile_flag = true
|
//
|
||||||
}
|
// //根据屏幕分辨率判断是否是手机
|
||||||
return mobile_flag
|
// if (screen_width < 500 && screen_height < 800) {
|
||||||
}
|
// mobile_flag = true
|
||||||
|
// }
|
||||||
if (isMobile()) {
|
// return mobile_flag
|
||||||
if (location.pathname == '/dashboard/analysis' || location.pathname == '/') {
|
// }
|
||||||
window.location.href = 'http://10.10.10.46:8102/phoneSearch'
|
//
|
||||||
}
|
// if (isMobile()) {
|
||||||
}
|
// if (location.pathname == '/dashboard/analysis' || location.pathname == '/') {
|
||||||
|
// window.location.href = 'http://10.10.10.46:8102/phoneSearch'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,13 @@
|
|||||||
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
||||||
import { triggerWindowResizeEvent } from '@/utils/util'
|
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||||
|
|
||||||
const indexKey = '/dashboard/analysis'
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
let indexKey = ''
|
||||||
|
if (isPhone == 'yes') {
|
||||||
|
indexKey = '/phoneSearch'
|
||||||
|
} else {
|
||||||
|
indexKey = '/dashboard/analysis'
|
||||||
|
}
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||||
|
|
||||||
|
|||||||
@@ -10,37 +10,39 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import router from '../../router'
|
||||||
|
|
||||||
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: '',
|
name: '',
|
||||||
breadList: [],
|
breadList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created() {
|
||||||
this.getBreadcrumb()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getBreadcrumb() {
|
|
||||||
|
|
||||||
console.log('this.$route.matched', this.$route.matched)
|
|
||||||
|
|
||||||
this.breadList = []
|
|
||||||
this.breadList.push({ name: 'dashboard-analysis', path: '/dashboard/analysis', meta: { title: '首页' } })
|
|
||||||
|
|
||||||
this.name = this.$route.name
|
|
||||||
this.$route.matched.forEach((item) => {
|
|
||||||
// item.meta.name === 'dashboard' ? item.path = '/dashboard' : this.$route.path === item.path
|
|
||||||
this.breadList.push(item)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route() {
|
|
||||||
this.getBreadcrumb()
|
this.getBreadcrumb()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getBreadcrumb() {
|
||||||
|
this.breadList = []
|
||||||
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
if (isPhone == 'yes') {
|
||||||
|
} else {
|
||||||
|
this.breadList.push({ name: 'dashboard-analysis', path: '/dashboard/analysis', meta: { title: '首页' } })
|
||||||
|
}
|
||||||
|
this.name = this.$route.name
|
||||||
|
this.$route.matched.forEach((item) => {
|
||||||
|
// item.meta.name === 'dashboard' ? item.path = '/dashboard' : this.$route.path === item.path
|
||||||
|
this.breadList.push(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route() {
|
||||||
|
this.getBreadcrumb()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ export const asyncRouterMap = [
|
|||||||
* 基础路由
|
* 基础路由
|
||||||
* @type { *[] }
|
* @type { *[] }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const constantRouterMap = [
|
export const constantRouterMap = [
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
@@ -605,3 +606,119 @@ export const constantRouterMap = [
|
|||||||
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const phoneConstantRouterMap = [
|
||||||
|
{
|
||||||
|
path: '/user',
|
||||||
|
component: UserLayout,
|
||||||
|
redirect: '/user/login',
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'login',
|
||||||
|
name: 'login',
|
||||||
|
component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'register',
|
||||||
|
name: 'register',
|
||||||
|
component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'register-result',
|
||||||
|
name: 'registerResult',
|
||||||
|
component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/RegisterResult')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'alteration',
|
||||||
|
name: 'alteration',
|
||||||
|
component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
/* 手机端开始 */
|
||||||
|
//搜索
|
||||||
|
{
|
||||||
|
path: '/phoneSearch',
|
||||||
|
name: 'phoneSearch',
|
||||||
|
component: () => import('@/views/phoneView/search')
|
||||||
|
},
|
||||||
|
//待办中心
|
||||||
|
{
|
||||||
|
path: '/phoneToDoCenter',
|
||||||
|
name: 'phoneToDoCenter',
|
||||||
|
component: () => import('@/views/phoneView/toDoCenter')
|
||||||
|
},
|
||||||
|
//任务数据
|
||||||
|
{
|
||||||
|
path: '/phoneTaskData',
|
||||||
|
name: 'phoneTaskData',
|
||||||
|
component: () => import('@/views/phoneView/taskData')
|
||||||
|
},
|
||||||
|
//我的
|
||||||
|
{
|
||||||
|
path: '/phoneHome',
|
||||||
|
name: 'phoneHome',
|
||||||
|
component: () => import('@/views/phoneView/home')
|
||||||
|
},
|
||||||
|
//搜索列表
|
||||||
|
{
|
||||||
|
path: '/phoneSearchList',
|
||||||
|
name: 'phoneSearchList',
|
||||||
|
component: () => import('@/views/phoneView/searchList')
|
||||||
|
},
|
||||||
|
//文档详情
|
||||||
|
{
|
||||||
|
path: '/phoneDocumentDetails',
|
||||||
|
name: 'phoneDocumentDetails',
|
||||||
|
component: () => import('@/views/phoneView/documentDetails')
|
||||||
|
},
|
||||||
|
//流程
|
||||||
|
{
|
||||||
|
path: '/phoneProcessManagement',
|
||||||
|
name: 'phoneProcessManagement',
|
||||||
|
component: () => import('@/views/phoneView/processManagement')
|
||||||
|
},
|
||||||
|
//知识分享
|
||||||
|
{
|
||||||
|
path: '/phoneProblemKnowledgeBase',
|
||||||
|
name: 'phoneProblemKnowledgeBase',
|
||||||
|
component: () => import('@/views/phoneView/problemKnowledgeBase')
|
||||||
|
},
|
||||||
|
//办理页面
|
||||||
|
{
|
||||||
|
path: '/phoneHandlingPage',
|
||||||
|
name: 'phoneHandlingPage',
|
||||||
|
component: () => import('@/views/phoneView/handlingPage')
|
||||||
|
},
|
||||||
|
//我的收藏
|
||||||
|
{
|
||||||
|
path: '/phoneMyCollection',
|
||||||
|
name: 'phoneMyCollection',
|
||||||
|
component: () => import('@/views/phoneView/myCollection')
|
||||||
|
},
|
||||||
|
//最近预览
|
||||||
|
{
|
||||||
|
path: '/phoneRecentBrowsing',
|
||||||
|
name: 'phoneRecentBrowsing',
|
||||||
|
component: () => import('@/views/phoneView/recentBrowsing')
|
||||||
|
},
|
||||||
|
//我的订阅
|
||||||
|
{
|
||||||
|
path: '/phoneMySubscribe',
|
||||||
|
name: 'phoneMySubscribe',
|
||||||
|
component: () => import('@/views/phoneView/mySubscribe')
|
||||||
|
},
|
||||||
|
//perhome办理流程
|
||||||
|
{
|
||||||
|
path: '/phonePreHomoMangement',
|
||||||
|
name: 'phonePreHomoMangement',
|
||||||
|
component: () => import('@/views/phoneView/preHomoMangement')
|
||||||
|
},
|
||||||
|
/* 手机端结束 */
|
||||||
|
{
|
||||||
|
path: '/404',
|
||||||
|
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ require('@/components/onlineForm/onlineForm')
|
|||||||
require('@/components/onlineForm/OnlineForm.css')
|
require('@/components/onlineForm/OnlineForm.css')
|
||||||
|
|
||||||
import Antd, { version } from 'ant-design-vue'
|
import Antd, { version } from 'ant-design-vue'
|
||||||
|
|
||||||
console.log('ant-design-vue version:', version)
|
console.log('ant-design-vue version:', version)
|
||||||
|
|
||||||
import Viser from 'viser-vue'
|
import Viser from 'viser-vue'
|
||||||
@@ -54,6 +55,7 @@ import socketPublicOne from '@/utils/socketVuexOne.js'
|
|||||||
//挂载
|
//挂载
|
||||||
Vue.prototype.$socketPublic = socketPublic
|
Vue.prototype.$socketPublic = socketPublic
|
||||||
Vue.prototype.$socketPublicOne = socketPublicOne
|
Vue.prototype.$socketPublicOne = socketPublicOne
|
||||||
|
Vue.prototype.isPhone = false
|
||||||
import JDictSelectTag from './components/dict/index.js'
|
import JDictSelectTag from './components/dict/index.js'
|
||||||
import hasPermission from '@/utils/hasPermission'
|
import hasPermission from '@/utils/hasPermission'
|
||||||
import vueBus from '@/utils/vueBus'
|
import vueBus from '@/utils/vueBus'
|
||||||
@@ -65,16 +67,17 @@ import '@/components/JVxeCells/install'
|
|||||||
// 挂载全局使用的方法
|
// 挂载全局使用的方法
|
||||||
import VueDraggableResizable from 'vue-draggable-resizable'
|
import VueDraggableResizable from 'vue-draggable-resizable'
|
||||||
|
|
||||||
import Vant from 'vant';
|
import Vant from 'vant'
|
||||||
import 'vant/lib/index.css';
|
import 'vant/lib/index.css'
|
||||||
import 'amfe-flexible/index.js'
|
import 'amfe-flexible/index.js'
|
||||||
|
|
||||||
Vue.component('vue-draggable-resizable', VueDraggableResizable)
|
Vue.component('vue-draggable-resizable', VueDraggableResizable)
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.use(Storage, config.storageOptions)
|
Vue.use(Storage, config.storageOptions)
|
||||||
Vue.use(Antd)
|
Vue.use(Antd)
|
||||||
Vue.use(VueAxios, router)
|
Vue.use(VueAxios, router)
|
||||||
Vue.use(Viser)
|
Vue.use(Viser)
|
||||||
Vue.use(Vant);
|
Vue.use(Vant)
|
||||||
Vue.use(hasPermission)
|
Vue.use(hasPermission)
|
||||||
Vue.use(JDictSelectTag)
|
Vue.use(JDictSelectTag)
|
||||||
Vue.use(Print)
|
Vue.use(Print)
|
||||||
|
|||||||
+20
-16
@@ -10,6 +10,9 @@ import { JSEncrypt } from 'jsencrypt'
|
|||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
import { welcome } from '@/utils/util'
|
import { welcome } from '@/utils/util'
|
||||||
|
|
||||||
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
console.log(isPhone)
|
||||||
|
|
||||||
// 判断当前设备
|
// 判断当前设备
|
||||||
function isMobile() {
|
function isMobile() {
|
||||||
var userAgentInfo = navigator.userAgent
|
var userAgentInfo = navigator.userAgent
|
||||||
@@ -72,7 +75,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
store.commit('SET_AVATAR', res.result.userInfo.avatar)
|
store.commit('SET_AVATAR', res.result.userInfo.avatar)
|
||||||
let fullPath = ''
|
let fullPath = ''
|
||||||
if (to.fullPath == '/') {
|
if (to.fullPath == '/') {
|
||||||
if (mobile) {
|
if (isPhone == 'yes') {
|
||||||
fullPath = '/phoneSearch'
|
fullPath = '/phoneSearch'
|
||||||
} else {
|
} else {
|
||||||
fullPath = INDEX_MAIN_PAGE_PATH
|
fullPath = INDEX_MAIN_PAGE_PATH
|
||||||
@@ -95,7 +98,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
/* has token */
|
/* has token */
|
||||||
if (to.path === '/user/login') {
|
if (to.path === '/user/login') {
|
||||||
let fullPath = ''
|
let fullPath = ''
|
||||||
if (mobile) {
|
if (isPhone == 'yes') {
|
||||||
fullPath = '/phoneSearch'
|
fullPath = '/phoneSearch'
|
||||||
} else {
|
} else {
|
||||||
fullPath = INDEX_MAIN_PAGE_PATH
|
fullPath = INDEX_MAIN_PAGE_PATH
|
||||||
@@ -116,14 +119,17 @@ router.beforeEach((to, from, next) => {
|
|||||||
store.dispatch('UpdateAppRouter', { constRoutes }).then(() => {
|
store.dispatch('UpdateAppRouter', { constRoutes }).then(() => {
|
||||||
// 根据roles权限生成可访问的路由表
|
// 根据roles权限生成可访问的路由表
|
||||||
// 动态添加可访问路由表
|
// 动态添加可访问路由表
|
||||||
router.addRoutes(store.getters.addRouters)
|
|
||||||
let redirect = decodeURIComponent(from.query.redirect || to.path)
|
let redirect = decodeURIComponent(from.query.redirect || to.path)
|
||||||
if (mobile) {
|
if (isPhone == 'yes') {
|
||||||
if (redirect == '/' || redirect == '/dashboard/analysis'){
|
router.addRoutes([{
|
||||||
|
'path': '*', 'redirect': '/404', 'hidden': true
|
||||||
|
}])
|
||||||
|
if (redirect == '/') {
|
||||||
redirect = '/phoneSearch'
|
redirect = '/phoneSearch'
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
router.addRoutes(store.getters.addRouters)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (to.path === redirect) {
|
if (to.path === redirect) {
|
||||||
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
|
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
|
||||||
next({ ...to, replace: true })
|
next({ ...to, replace: true })
|
||||||
@@ -145,7 +151,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
|
|
||||||
let fullPath = ''
|
let fullPath = ''
|
||||||
if (to.fullPath == '/') {
|
if (to.fullPath == '/') {
|
||||||
if (mobile) {
|
if (isPhone == 'yes') {
|
||||||
fullPath = '/phoneSearch'
|
fullPath = '/phoneSearch'
|
||||||
} else {
|
} else {
|
||||||
fullPath = INDEX_MAIN_PAGE_PATH
|
fullPath = INDEX_MAIN_PAGE_PATH
|
||||||
@@ -153,13 +159,10 @@ router.beforeEach((to, from, next) => {
|
|||||||
} else {
|
} else {
|
||||||
fullPath = to.path
|
fullPath = to.path
|
||||||
}
|
}
|
||||||
// http://grp.nioint.com
|
|
||||||
// window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
|
|
||||||
// + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地
|
|
||||||
|
|
||||||
// TODO 在部署线上时解开此代码
|
// TODO 在部署线上时解开此代码
|
||||||
// window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
|
// window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
|
||||||
// + encodeURIComponent('https://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上
|
// + encodeURIComponent(window.loginUrl + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -176,16 +179,17 @@ router.beforeEach((to, from, next) => {
|
|||||||
|
|
||||||
let fullPath = ''
|
let fullPath = ''
|
||||||
if (to.fullPath == '/') {
|
if (to.fullPath == '/') {
|
||||||
fullPath = INDEX_MAIN_PAGE_PATH
|
if (isPhone == 'yes') {
|
||||||
|
fullPath = '/phoneSearch'
|
||||||
|
} else {
|
||||||
|
fullPath = INDEX_MAIN_PAGE_PATH
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fullPath = to.path
|
fullPath = to.path
|
||||||
}
|
}
|
||||||
// http://grp.nioint.com
|
|
||||||
// window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
|
|
||||||
// + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地
|
|
||||||
// TODO 在部署线上时解开此代码
|
// TODO 在部署线上时解开此代码
|
||||||
// window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
|
// window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri='
|
||||||
// + encodeURIComponent('https://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上
|
// + encodeURIComponent(window.loginUrl + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上
|
||||||
|
|
||||||
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Router from 'vue-router'
|
import Router from 'vue-router'
|
||||||
import { constantRouterMap } from '@/config/router.config'
|
|
||||||
|
import { constantRouterMap, phoneConstantRouterMap } from '@/config/router.config'
|
||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
let RouterMap = []
|
||||||
|
|
||||||
|
if (isPhone == 'yes') {
|
||||||
|
RouterMap = phoneConstantRouterMap
|
||||||
|
} else {
|
||||||
|
RouterMap = constantRouterMap
|
||||||
|
}
|
||||||
|
|
||||||
const originalPush = Router.prototype.push
|
const originalPush = Router.prototype.push
|
||||||
Router.prototype.push = function push(location, onResolve, onReject) {
|
Router.prototype.push = function push(location, onResolve, onReject) {
|
||||||
@@ -10,15 +19,17 @@ Router.prototype.push = function push(location, onResolve, onReject) {
|
|||||||
return originalPush.call(this, location).catch(err => err)
|
return originalPush.call(this, location).catch(err => err)
|
||||||
}
|
}
|
||||||
|
|
||||||
const createRouter = ()=> new Router({
|
const createRouter = () => new Router({
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
base: process.env.BASE_URL,
|
base: process.env.BASE_URL,
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRouterMap
|
routes: RouterMap
|
||||||
})
|
})
|
||||||
const router = createRouter()
|
const router = createRouter()
|
||||||
export function resetRouter () {
|
|
||||||
|
export function resetRouter() {
|
||||||
const newRouter = createRouter()
|
const newRouter = createRouter()
|
||||||
router.matcher = newRouter.matcher // reset router
|
router.matcher = newRouter.matcher // reset router
|
||||||
}
|
}
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<h1>{{ config[type].title }}</h1>
|
<h1>{{ config[type].title }}</h1>
|
||||||
<div class="desc">{{ config[type].desc }}</div>
|
<div class="desc">{{ config[type].desc }}</div>
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<a-button type="primary" @click="handleToHome">返回首页</a-button>
|
<a-button type="primary" @click="handleToHome">{{$t('backToHomePage')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -31,7 +31,12 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleToHome () {
|
handleToHome () {
|
||||||
this.$router.push({ name: 'dashboard' })
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
if (isPhone == 'yes'){
|
||||||
|
this.$router.push({ path: '/phoneSearch' })
|
||||||
|
}else{
|
||||||
|
this.$router.push({ name: 'dashboard' })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,15 @@
|
|||||||
resetRouter()
|
resetRouter()
|
||||||
let constRoutes = []
|
let constRoutes = []
|
||||||
constRoutes = generateIndexRouter(menuData)
|
constRoutes = generateIndexRouter(menuData)
|
||||||
router.addRoutes(constRoutes)
|
|
||||||
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
if (isPhone == 'yes') {
|
||||||
|
router.addRoutes([{
|
||||||
|
'path': '*', 'redirect': '/404', 'hidden': true
|
||||||
|
}])
|
||||||
|
} else {
|
||||||
|
router.addRoutes(constRoutes)
|
||||||
|
}
|
||||||
this.$root.Bus.$emit('switchLanguage', localeval)
|
this.$root.Bus.$emit('switchLanguage', localeval)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.localeval = localeval
|
this.localeval = localeval
|
||||||
|
|||||||
@@ -359,9 +359,10 @@
|
|||||||
localStorage.setItem('language', 'zh-cn')
|
localStorage.setItem('language', 'zh-cn')
|
||||||
}
|
}
|
||||||
let fullPath = ''
|
let fullPath = ''
|
||||||
if (this.mobile) {
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
if (isPhone == 'yes'){
|
||||||
fullPath = '/phoneSearch'
|
fullPath = '/phoneSearch'
|
||||||
} else {
|
}else{
|
||||||
fullPath = '/dashboard/analysis'
|
fullPath = '/dashboard/analysis'
|
||||||
}
|
}
|
||||||
this.$router.push({ path: fullPath }).catch((res) => {
|
this.$router.push({ path: fullPath }).catch((res) => {
|
||||||
|
|||||||
@@ -208,9 +208,10 @@ export const JeroThirdLoginMixin = {
|
|||||||
// this.loginBtn = false
|
// this.loginBtn = false
|
||||||
// update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
|
// update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
|
||||||
let fullPath = ''
|
let fullPath = ''
|
||||||
if (isMobile()) {
|
let isPhone = localStorage.getItem('isPhone')
|
||||||
|
if (isPhone == 'yes'){
|
||||||
fullPath = '/phoneSearch'
|
fullPath = '/phoneSearch'
|
||||||
} else {
|
}else{
|
||||||
fullPath = '/dashboard/analysis'
|
fullPath = '/dashboard/analysis'
|
||||||
}
|
}
|
||||||
this.$router.push({ path: fullPath }).catch(() => {
|
this.$router.push({ path: fullPath }).catch(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user