Kaynağa Gözat

修改门户首页

chencc 1 yıl önce
ebeveyn
işleme
8d5706274c
2 değiştirilmiş dosya ile 17 ekleme ve 2 silme
  1. 16 1
      src/views/home/cgIndex.vue
  2. 1 1
      vue.config.js

+ 16 - 1
src/views/home/cgIndex.vue

@@ -30,7 +30,22 @@
     },
     methods: {
       openUrl(item) {
-        let url = window.open(item.linkUrl, '_blank');
+        // let url = window.open(item.linkUrl, '_blank');
+        if(item.architType==='1'){
+           // bs门户配置
+          window.open(item.linkUrl);
+        }else{
+          let url = item.linkUrl.split('//');
+          window.open(url[1], '_blank');
+           // cs门户配置
+
+          //  const link = document.createElement('a');
+          //   // 6. 设置链接属性
+          //   link.href = url;
+          //   link.download = '自定义文件名.zip'; // 可以设置不同的下载文件名
+          //   link.style.display = 'none';
+        }
+
       },
       async getPages() {
         let { list } = await getList({ pageNum: 1, size: 9999 });

+ 1 - 1
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001', // 测试环境
         // target: 'http://124.71.68.31:50001',
 
-        target: 'http://192.168.1.116:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
         changeOrigin: true, // 只有这个值为true的情况下 s才表示开启跨域
         pathRewrite: {