| | |
| | | </div> |
| | | <div class="topright"> |
| | | <a href="">首页</a> |
| | | <a href="http://fai365.com:9080/login">智慧工厂</a> |
| | | <a :href="link">智慧工厂</a> |
| | | <a href="">管理中心</a> |
| | | <a href="">算法</a> |
| | | <a href="">应用</a> |
| | |
| | | export default { |
| | | props: {}, |
| | | data() { |
| | | return {}; |
| | | return { |
| | | link:"" |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | created() {}, |
| | | created() { |
| | | this.link=this.getApsPage() |
| | | }, |
| | | mounted() {}, |
| | | watch: {}, |
| | | methods: {}, |
| | | methods: { |
| | | environmentType(){ |
| | | let type |
| | | if (location.href.includes('192.168.20.119')) { |
| | | type = 'test' |
| | | } else if (location.href.includes('192.168') || location.href.includes('localhost')) { |
| | | type = 'dev' |
| | | } else { |
| | | type = 'prod' |
| | | } |
| | | return type |
| | | }, |
| | | getApsPage(){ |
| | | const loginPathMap = { |
| | | prod:`//${window.location.hostname}:9080`, |
| | | test:`//192.168.20.119:9080`, |
| | | dev: `//192.168.8.117:8080` |
| | | } |
| | | return loginPathMap[this.environmentType()] |
| | | }, |
| | | }, |
| | | components: {}, |
| | | }; |
| | | </script> |