Commit b3665fe3 authored by zhengke's avatar zhengke

修改跳转

parent c299eab8
...@@ -5,7 +5,7 @@ import md5 from 'js-md5' ...@@ -5,7 +5,7 @@ import md5 from 'js-md5'
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
domainUrl = "http://127.0.0.1"; domainUrl = "http://192.168.0.110";
let locationName = window.location.hostname; let locationName = window.location.hostname;
if (locationName.indexOf('testerp.oytour') !== -1) { if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com"; domainUrl = "http://testapi.oytour.com";
...@@ -66,3 +66,18 @@ Vue.prototype.getLocalStorage = function () { ...@@ -66,3 +66,18 @@ Vue.prototype.getLocalStorage = function () {
return null; return null;
} }
} }
//向外跳转
Vue.prototype.OpenNewUrl = function (URL){
if (URL != '') {
if (URL.indexOf("https") != -1) {
var str = 'http://' + URL.substring(8);
window.open(str, '_blank');
} else if (URL.indexOf("http") != -1) {
var str = 'http://' + URL.substring(7);
window.open(str, '_blank');
} else {
window.open("http://" + URL, '_blank');
}
}
}
...@@ -388,7 +388,7 @@ ...@@ -388,7 +388,7 @@
<div class="footer-watermark footer_Left"> <div class="footer-watermark footer_Left">
<template v-if="dataList&&dataList.AdLeftList"> <template v-if="dataList&&dataList.AdLeftList">
<div v-for="(item,index) in dataList.AdLeftList" :key="index"> <div v-for="(item,index) in dataList.AdLeftList" :key="index">
<a :href="item.AdLink" target="_blank"> <a @click="OpenNewUrl(item.AdLink)">
<img style="width:100%" :src="item.AdImg" /> <img style="width:100%" :src="item.AdImg" />
</a> </a>
</div> </div>
...@@ -397,7 +397,7 @@ ...@@ -397,7 +397,7 @@
<div class="footer-watermark footer_Right"> <div class="footer-watermark footer_Right">
<template v-if="dataList&&dataList.AdRightList"> <template v-if="dataList&&dataList.AdRightList">
<div v-for="(item,index) in dataList.AdRightList" :key="index"> <div v-for="(item,index) in dataList.AdRightList" :key="index">
<a :href="item.AdLink" target="_blank"> <a @click="OpenNewUrl(item.AdLink)">
<img style="width:100%" :src="item.AdImg" /> <img style="width:100%" :src="item.AdImg" />
</a> </a>
</div> </div>
...@@ -420,7 +420,9 @@ ...@@ -420,7 +420,9 @@
var myDate = new Date(); var myDate = new Date();
this.year = myDate.getFullYear(); this.year = myDate.getFullYear();
}, },
methods: {}, methods: {
},
}; };
</script> </script>
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