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">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<!-- <bigdata v-if="is_bigdata"></bigdata> --> <!-- <bigdata v-if="is_bigdata"></bigdata> -->
<bigdataleft v-if="is_bigdata"></bigdataleft> <bigdataleft v-if="is_bigdata"></bigdataleft>
<bigdataright v-if="is_bigdata"></bigdataright> <bigdataright v-if="is_bigdata"></bigdataright>
<home-map class="home--map" /> <home-map class="home--map" />
<router-view name="homeRight" :class="[isRight ? 'fadeInRight' : 'fadeOutRight']" class="home-right animated" /> <router-view name="homeRight" :class="[isRight ? 'fadeInRight' : 'fadeOutRight']" class="home-right animated" />
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
<CommVideo></CommVideo> <CommVideo></CommVideo>
</div> </div>
<saleitem1 v-show="showItem1"></saleitem1> <saleitem1 v-show="showItem1"></saleitem1>
<saleitem2 v-show="showItem2"></saleitem2> <saleitem2 v-show="showItem2"></saleitem2>
<saleitem3 v-show="showItem3"></saleitem3> <saleitem3 v-show="showItem3"></saleitem3>
<saleitem4 v-show="showItem4"></saleitem4> <saleitem4 v-show="showItem4"></saleitem4>
<saleitem5 v-show="showItem5"></saleitem5> <saleitem5 v-show="showItem5"></saleitem5>
<saleitem6 v-show="showItem6"></saleitem6> <saleitem6 v-show="showItem6"></saleitem6>
<saleitem7 v-show="showItem7"></saleitem7> <saleitem7 v-show="showItem7"></saleitem7>
<potrait v-if="isShowPotrait"></potrait> <potrait v-if="isShowPotrait"></potrait>
<videoai v-show="isShowVideo"></videoai> <videoai v-show="isShowVideo"></videoai>
<enterdynamicmonitor v-show="isShowEnterDynamicMonitor"></enterdynamicmonitor> <enterdynamicmonitor v-show="isShowEnterDynamicMonitor"></enterdynamicmonitor>
...@@ -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,35 +198,34 @@ export default { ...@@ -151,35 +198,34 @@ 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() {
return (this.is_sale && (this.showItem1 || this.showItem2 || this.showItem3 || this.showItem4 || this.showItem5 || this.showItem6 || this.showItem7)) || this.isShowPotrait || this.isShowVideo || this.isShowEnterDynamicMonitor || this.isShowTargetTrackingPosition return (this.is_sale && (this.showItem1 || this.showItem2 || this.showItem3 || this.showItem4 || this.showItem5 || this.showItem6 || this.showItem7)) || this.isShowPotrait || this.isShowVideo || this.isShowEnterDynamicMonitor || this.isShowTargetTrackingPosition
}, },
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
...@@ -287,18 +332,18 @@ export default { ...@@ -287,18 +332,18 @@ export default {
CommVideo, CommVideo,
sale, sale,
saleitem1, saleitem1,
saleitem2, saleitem2,
saleitem3, saleitem3,
saleitem4, saleitem4,
saleitem5, saleitem5,
saleitem6, saleitem6,
saleitem7, saleitem7,
potrait, potrait,
videoai, videoai,
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