Commit 09a575b6 authored by xinzhedeai's avatar xinzhedeai

登录跳转添加 内网ip更换

parent e384b9e2
NODE_ENV = '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://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'
This diff is collapsed.
......@@ -7,7 +7,8 @@ const service = axios.create({
// baseURL: 'http://39.98.150.124:8000/',
// baseURL: 'http://192.168.1.123: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,
})
......
......@@ -5,7 +5,8 @@ import { Message, Notification } from 'element-ui'
const service = axios.create({
// baseURL: 'http://192.168.3.216: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,
......
<template>
<div :class="{home: true}">
<div :class="{ home: true }">
<!-- <base-hint :class="[isRight ? 'fadeInRight' : 'fadeOutRight']"></base-hint> -->
<div :class="{innerwrap: true, hidden:isShow}">
<div :class="{ innerwrap: true, hidden: isShow }">
<router-view name="homeHeader" />
<div class="wrap">
......@@ -27,7 +27,7 @@
<!-- <bigdata v-if="is_bigdata"></bigdata> -->
<bigdataleft v-if="is_bigdata"></bigdataleft>
<bigdataright v-if="is_bigdata"></bigdataright>
<home-map class="home--map" />
<router-view name="homeRight" :class="[isRight ? 'fadeInRight' : 'fadeOutRight']" class="home-right animated" />
......@@ -41,13 +41,13 @@
<CommVideo></CommVideo>
</div>
<saleitem1 v-show="showItem1"></saleitem1>
<saleitem2 v-show="showItem2"></saleitem2>
<saleitem3 v-show="showItem3"></saleitem3>
<saleitem4 v-show="showItem4"></saleitem4>
<saleitem5 v-show="showItem5"></saleitem5>
<saleitem6 v-show="showItem6"></saleitem6>
<saleitem7 v-show="showItem7"></saleitem7>
<saleitem1 v-show="showItem1"></saleitem1>
<saleitem2 v-show="showItem2"></saleitem2>
<saleitem3 v-show="showItem3"></saleitem3>
<saleitem4 v-show="showItem4"></saleitem4>
<saleitem5 v-show="showItem5"></saleitem5>
<saleitem6 v-show="showItem6"></saleitem6>
<saleitem7 v-show="showItem7"></saleitem7>
<potrait v-if="isShowPotrait"></potrait>
<videoai v-show="isShowVideo"></videoai>
<enterdynamicmonitor v-show="isShowEnterDynamicMonitor"></enterdynamicmonitor>
......@@ -101,6 +101,7 @@ import videoai from '../components/videoai/videoai.vue'
import enterdynamicmonitor from '../components/enterdynamicmonitor/enterdynamicmonitor.vue'
import targetrackingposition from '../components/targetrackingposition/targettrackingposition.vue'
import axios from 'axios'
export default {
name: 'home',
......@@ -115,23 +116,69 @@ export default {
is_fengxian: false, // 风险处置
is_yinhuan: false, // 隐患排查
is_sale: false, // 销售监管
is_bigdata: false
is_bigdata: false,
}
},
created() {
this.$store.dispatch('typeOptions')
this.getUserInfo()
},
mounted() {
// window.addEventListener('beforeunload', (e) => {
// console.log(e, 'beforeUnload beforeUnLoad')
// })
console.log('beforeUnload beforeUnload beforeUnload')
},
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() {
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: {
......@@ -151,35 +198,34 @@ export default {
isRight() {
return this.$store.state.isRight
},
showItem1 () {
console.log('showItem1')
return this.$store.state.showSaleItem1
},
showItem2 () {
return this.$store.state.showSaleItem2
},
showItem3 () {
return this.$store.state.showSaleItem3
},
showItem4 () {
return this.$store.state.showSaleItem4
},
showItem5 () {
return this.$store.state.showSaleItem5
},
showItem6 () {
return this.$store.state.showSaleItem6
},
showItem7 () {
return this.$store.state.showSaleItem7
},
showItem1() {
console.log('showItem1')
return this.$store.state.showSaleItem1
},
showItem2() {
return this.$store.state.showSaleItem2
},
showItem3() {
return this.$store.state.showSaleItem3
},
showItem4() {
return this.$store.state.showSaleItem4
},
showItem5() {
return this.$store.state.showSaleItem5
},
showItem6() {
return this.$store.state.showSaleItem6
},
showItem7() {
return this.$store.state.showSaleItem7
},
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
},
isShowPotrait() {
return this.$store.state.isShowEnterPortrait
}
},
},
watch: {
......@@ -192,7 +238,7 @@ export default {
this.is_yinhuan = false
this.is_fengxian = false
this.is_sale = false
this.is_bigdata =false
this.is_bigdata = false
if (e === false) return
......@@ -207,7 +253,6 @@ export default {
return
}
if (e.itemIndex == 3) {
this.$store.commit('SET_IS_Right', false)
this.is_yinhuan = true
......@@ -287,18 +332,18 @@ export default {
CommVideo,
sale,
saleitem1,
saleitem2,
saleitem3,
saleitem4,
saleitem5,
saleitem6,
saleitem7,
saleitem2,
saleitem3,
saleitem4,
saleitem5,
saleitem6,
saleitem7,
potrait,
videoai,
bigdataleft,
bigdataright,
enterdynamicmonitor,
targetrackingposition
targetrackingposition,
},
}
</script>
......@@ -436,7 +481,7 @@ export default {
bottom: 0;
right: 0;
width: 12%;
min-width:188px;
min-width: 188px;
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