diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index e2fa73d79..c86841b73 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1955,7 +1955,7 @@ module.exports = { regulationListIssuance:'法规清单发布', designTheComplianceProcess:'设计符合性流程', verifyComplianceProcess:'验证符合性流程', - thePreHomeProcess:'Pre-home流程', + thePreHomeProcess:'Pre-Home流程', technicalAssessmentOfRegulations:'法规技术评估', legalOpinionCollection:'法规意见收集', authenticationParameterCollectionData:'认证参数收集数据', diff --git a/jero-web/src/components/layouts/UserLayout.vue b/jero-web/src/components/layouts/UserLayout.vue index ebb4b15bd..607454014 100644 --- a/jero-web/src/components/layouts/UserLayout.vue +++ b/jero-web/src/components/layouts/UserLayout.vue @@ -10,18 +10,18 @@ -
-
-
@@ -174,7 +174,7 @@
height: 100%;
.mobile{
position: absolute;
- top: 6rem;
+ top: 3rem;
width: 100%;
display: flex;
flex-direction: column;
diff --git a/jero-web/src/permission.js b/jero-web/src/permission.js
index e040aff0b..ab77712ff 100644
--- a/jero-web/src/permission.js
+++ b/jero-web/src/permission.js
@@ -10,6 +10,32 @@ import { JSEncrypt } from 'jsencrypt'
import { getAction } from '@/api/manage'
import { welcome } from '@/utils/util'
+// 判断当前设备
+function isMobile() {
+ var userAgentInfo = navigator.userAgent
+
+ var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
+
+ var mobile_flag = false
+
+ //根据userAgent判断是否是手机
+ for (var v = 0; v < mobileAgents.length; v++) {
+ if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
+ mobile_flag = true
+ break
+ }
+ }
+ var screen_width = window.screen.width
+ var screen_height = window.screen.height
+
+ //根据屏幕分辨率判断是否是手机
+ if (screen_width < 500 && screen_height < 800) {
+ mobile_flag = true
+ }
+ return mobile_flag
+}
+
+let mobile = isMobile()
NProgress.configure({ showSpinner: false }) // NProgress Configuration
// TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码
@@ -46,7 +72,11 @@ router.beforeEach((to, from, next) => {
store.commit('SET_AVATAR', res.result.userInfo.avatar)
let fullPath = ''
if (to.fullPath == '/') {
- fullPath = INDEX_MAIN_PAGE_PATH
+ if (mobile) {
+ fullPath = '/phoneSearch'
+ } else {
+ fullPath = INDEX_MAIN_PAGE_PATH
+ }
} else {
fullPath = to.path
}
@@ -64,7 +94,13 @@ router.beforeEach((to, from, next) => {
if (Vue.ls.get(ACCESS_TOKEN)) {
/* has token */
if (to.path === '/user/login') {
- next({ path: INDEX_MAIN_PAGE_PATH })
+ let fullPath = ''
+ if (mobile) {
+ fullPath = '/phoneSearch'
+ } else {
+ fullPath = INDEX_MAIN_PAGE_PATH
+ }
+ next({ path: fullPath })
NProgress.done()
} else {
if (store.getters.permissionList.length === 0) {
@@ -81,7 +117,11 @@ router.beforeEach((to, from, next) => {
// 根据roles权限生成可访问的路由表
// 动态添加可访问路由表
router.addRoutes(store.getters.addRouters)
- const redirect = decodeURIComponent(from.query.redirect || to.path)
+ let redirect = decodeURIComponent(from.query.redirect || to.path)
+ if (mobile) {
+ redirect = '/phoneSearch'
+ }
+ console.log(redirect)
if (to.path === redirect) {
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
next({ ...to, replace: true })
@@ -103,7 +143,11 @@ router.beforeEach((to, from, next) => {
let fullPath = ''
if (to.fullPath == '/') {
- fullPath = INDEX_MAIN_PAGE_PATH
+ if (mobile) {
+ fullPath = '/phoneSearch'
+ } else {
+ fullPath = INDEX_MAIN_PAGE_PATH
+ }
} else {
fullPath = to.path
}
diff --git a/jero-web/src/views/phoneView/preHomoMangement.vue b/jero-web/src/views/phoneView/preHomoMangement.vue
index 189e28a9f..e6c25d0a1 100644
--- a/jero-web/src/views/phoneView/preHomoMangement.vue
+++ b/jero-web/src/views/phoneView/preHomoMangement.vue
@@ -6,6 +6,125 @@
EDS1.2 EVO-G1.1-中国-03 Pre-Homo流程