修改手机端返回跳到pc的首页

This commit is contained in:
范强强
2023-06-30 11:31:06 +08:00
parent 65a33c6970
commit 84dd129f60
4 changed files with 7 additions and 13 deletions
+3
View File
@@ -268,6 +268,9 @@
</style>
<!-- 全局配置 -->
<script>
localStorage.removeItem('isPhone')
localStorage.setItem('isPhone', 'yes')
window.loginUrl = 'https://grp.nioint.com'
// // 判断当前设备
// function isMobile() {
// var userAgentInfo = navigator.userAgent
+1 -4
View File
@@ -234,12 +234,9 @@
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
// TODO 在部署线上时注掉以下代码
that.$router.push({ path: '/user/login' })
// window.location.href = 'https://signin-test.nio.com/logout?client_id=100679&redirect_uri=' +
// encodeURIComponent('http://localhost:3000/dashboard/analysis') + '&response_type=code' //本地
// TODO 在部署线上时解开以下代码
// window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' +
// encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上
// encodeURIComponent(window.loginUrl) + '&response_type=code' //线上
localStorage.removeItem('language')
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
+1 -1
View File
@@ -20,7 +20,7 @@ require('@/components/onlineForm/OnlineForm.css')
import Antd, { version } from 'ant-design-vue'
console.log('ant-design-vue version:', version)
localStorage.setItem('isPhone','yes')
import Viser from 'viser-vue'
import 'ant-design-vue/dist/antd.less' // or 'ant-design-vue/dist/antd.less'
+2 -8
View File
@@ -159,13 +159,10 @@ router.beforeEach((to, from, next) => {
} else {
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 在部署线上时解开此代码
// 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 {
@@ -190,12 +187,9 @@ router.beforeEach((to, from, next) => {
} else {
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 在部署线上时解开此代码
// 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
}