Commit 09a575b6 authored by xinzhedeai's avatar xinzhedeai

登录跳转添加 内网ip更换

parent e384b9e2
NODE_ENV = 'production' NODE_ENV = 'production'
#VUE_APP_BASE_API = 'http://192.168.100.226:8080/production' #VUE_APP_BASE_API = 'http://192.168.100.226:8080/production'
#VUE_APP_BASE_API = 'http://39.98.150.124:8000/production' #VUE_APP_BASE_API = 'http://39.98.150.124:8000/production'
VUE_APP_BASE_API = 'http://120.224.103.84:9111/production' # VUE_APP_BASE_API = 'http://120.224.103.84:9111/production'
VUE_APP_BASE_API = 'http://10.185.163.57:8000/production'
outputDir = 'production' outputDir = 'production'
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -7,7 +7,8 @@ const service = axios.create({ ...@@ -7,7 +7,8 @@ const service = axios.create({
// baseURL: 'http://39.98.150.124:8000/', // baseURL: 'http://39.98.150.124:8000/',
// baseURL: 'http://192.168.1.123:8000/', // baseURL: 'http://192.168.1.123:8000/',
//baseURL: 'http://192.168.3.188:8000/', //baseURL: 'http://192.168.3.188:8000/',
baseURL: 'http://120.224.103.84:9111/', // baseURL: 'http://120.224.103.84:9111/',
baseURL: 'http://10.185.163.57:8000/',
timeout: 30000, timeout: 30000,
}) })
......
...@@ -5,7 +5,8 @@ import { Message, Notification } from 'element-ui' ...@@ -5,7 +5,8 @@ import { Message, Notification } from 'element-ui'
const service = axios.create({ const service = axios.create({
// baseURL: 'http://192.168.3.216:8000/', // 大龙 // baseURL: 'http://192.168.3.216:8000/', // 大龙
// baseURL: 'http://192.168.1.123:8000/', //小葱 // baseURL: 'http://192.168.1.123:8000/', //小葱
baseURL: 'http://120.224.103.84:9111/', // baseURL: 'http://120.224.103.84:9111/',
baseURL: 'http://10.185.163.57:8000/',
timeout: 30000, timeout: 30000,
......
<template> <template>
<div :class="{home: true}"> <div :class="{ home: true }">
<!-- <base-hint :class="[isRight ? 'fadeInRight' : 'fadeOutRight']"></base-hint> --> <!-- <base-hint :class="[isRight ? 'fadeInRight' : 'fadeOutRight']"></base-hint> -->
<div :class="{innerwrap: true, hidden:isShow}"> <div :class="{ innerwrap: true, hidden: isShow }">
<router-view name="homeHeader" /> <router-view name="homeHeader" />
<div class="wrap"> <div class="wrap">
...@@ -101,6 +101,7 @@ import videoai from '../components/videoai/videoai.vue' ...@@ -101,6 +101,7 @@ import videoai from '../components/videoai/videoai.vue'
import enterdynamicmonitor from '../components/enterdynamicmonitor/enterdynamicmonitor.vue' import enterdynamicmonitor from '../components/enterdynamicmonitor/enterdynamicmonitor.vue'
import targetrackingposition from '../components/targetrackingposition/targettrackingposition.vue' import targetrackingposition from '../components/targetrackingposition/targettrackingposition.vue'
import axios from 'axios'
export default { export default {
name: 'home', name: 'home',
...@@ -115,23 +116,69 @@ export default { ...@@ -115,23 +116,69 @@ export default {
is_fengxian: false, // 风险处置 is_fengxian: false, // 风险处置
is_yinhuan: false, // 隐患排查 is_yinhuan: false, // 隐患排查
is_sale: false, // 销售监管 is_sale: false, // 销售监管
is_bigdata: false is_bigdata: false,
} }
}, },
created() { created() {
this.$store.dispatch('typeOptions') this.$store.dispatch('typeOptions')
this.getUserInfo()
}, },
mounted() { mounted() {
// window.addEventListener('beforeunload', (e) => { // window.addEventListener('beforeunload', (e) => {
// console.log(e, 'beforeUnload beforeUnLoad') // console.log(e, 'beforeUnload beforeUnLoad')
// }) // })
console.log('beforeUnload beforeUnload beforeUnload') console.log('beforeUnload beforeUnload beforeUnload')
}, },
methods: { methods: {
getUserInfo() {
axios({
url: 'http://10.185.163.57:8000/auth/info',
method: 'get',
headers: {
Authorization: decodeURIComponent(this.getParameter('token')),
},
})
.then(res => {
// console.log('获取用户信息', res)
})
.catch(err => {
// console.log('用户信息错误',err)
location.href = 'http://10.185.163.57:8001/login?from=daping'
})
},
onRightImg() { onRightImg() {
this.$store.commit('SET_IS_Right', true) this.$store.commit('SET_IS_Right', true)
}, },
getParameter: function (name) {
var search = location.search
if (!search) {
return false
}
search = search.split('?')
var data = search[1].split('=')
if (search[1].indexOf(name) == -1) {
return ''
return
}
if (search[1].indexOf('&') == -1) {
data = search[1].split('=')
return data[1]
} else {
data = search[1].split('&')
for (var i = 0; i <= data.length - 1; i++) {
var l_data = data[i].split('=')
if (l_data[0] == name) {
return l_data[1]
break
} else {
continue
}
}
}
},
}, },
computed: { computed: {
...@@ -151,26 +198,26 @@ export default { ...@@ -151,26 +198,26 @@ export default {
isRight() { isRight() {
return this.$store.state.isRight return this.$store.state.isRight
}, },
showItem1 () { showItem1() {
console.log('showItem1') console.log('showItem1')
return this.$store.state.showSaleItem1 return this.$store.state.showSaleItem1
}, },
showItem2 () { showItem2() {
return this.$store.state.showSaleItem2 return this.$store.state.showSaleItem2
}, },
showItem3 () { showItem3() {
return this.$store.state.showSaleItem3 return this.$store.state.showSaleItem3
}, },
showItem4 () { showItem4() {
return this.$store.state.showSaleItem4 return this.$store.state.showSaleItem4
}, },
showItem5 () { showItem5() {
return this.$store.state.showSaleItem5 return this.$store.state.showSaleItem5
}, },
showItem6 () { showItem6() {
return this.$store.state.showSaleItem6 return this.$store.state.showSaleItem6
}, },
showItem7 () { showItem7() {
return this.$store.state.showSaleItem7 return this.$store.state.showSaleItem7
}, },
isShow() { isShow() {
...@@ -178,8 +225,7 @@ export default { ...@@ -178,8 +225,7 @@ export default {
}, },
isShowPotrait() { isShowPotrait() {
return this.$store.state.isShowEnterPortrait return this.$store.state.isShowEnterPortrait
} },
}, },
watch: { watch: {
...@@ -192,7 +238,7 @@ export default { ...@@ -192,7 +238,7 @@ export default {
this.is_yinhuan = false this.is_yinhuan = false
this.is_fengxian = false this.is_fengxian = false
this.is_sale = false this.is_sale = false
this.is_bigdata =false this.is_bigdata = false
if (e === false) return if (e === false) return
...@@ -207,7 +253,6 @@ export default { ...@@ -207,7 +253,6 @@ export default {
return return
} }
if (e.itemIndex == 3) { if (e.itemIndex == 3) {
this.$store.commit('SET_IS_Right', false) this.$store.commit('SET_IS_Right', false)
this.is_yinhuan = true this.is_yinhuan = true
...@@ -298,7 +343,7 @@ export default { ...@@ -298,7 +343,7 @@ export default {
bigdataleft, bigdataleft,
bigdataright, bigdataright,
enterdynamicmonitor, enterdynamicmonitor,
targetrackingposition targetrackingposition,
}, },
} }
</script> </script>
...@@ -436,7 +481,7 @@ export default { ...@@ -436,7 +481,7 @@ export default {
bottom: 0; bottom: 0;
right: 0; right: 0;
width: 12%; width: 12%;
min-width:188px; min-width: 188px;
background-color: #030c2a; background-color: #030c2a;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment