| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- let pre = new Vue({
- el: "#pre",
- data: {
- imgUrl: '',
- ho: ''
- },
- computed: {
- },
- methods: {
- //获取当前国家编码
- async getCountryMsg() {
- axios.get(this.imgUrl + '/country/get', {
- //参数
- }).then(res => {//请求成功后的处理函数
-
- if (res.data.code == 200) {
-
- if ((res.data.msg == "GB"||res.data.msg == "IE")&&res.data.data.indexOf('//195.224.141.218') == -1) {
- // window.location.href = 'https://www.cwgmarkets.co.uk';
- window.location.href = 'https://www.cwgmarkets.co.uk'
- } else {
- setTimeout(function() {
- document.getElementById("pre").style.display = 'none';
- }, 500);
-
- // document.getElementById("preIframe").style.display = 'none';
- }
- // document.getElementById("preIframe").style.display = 'none';
- } else {
- document.getElementById("pre").style.display = 'none'
- // document.getElementById("preIframe").style.display = 'none';
- this.$message.error(res.data.msg);
- }
- }).catch(err => {//请求失败后的处理函数
- })
- },
- },
- mounted() {
- this.ho = window.location.host.split('.')[1];
- this.imgUrl = window.location.origin;
- // this.imgUrl = 'http://193.134.208.211:8000';
-
- this.getCountryMsg()
- },
- destroyed() {
-
- },
- });
|