clay commit : 小修改
This commit is contained in:
@@ -4,7 +4,7 @@ ENV = 'development'
|
|||||||
# EBTS/开发环境
|
# EBTS/开发环境
|
||||||
#VUE_APP_BASE_API = '/dev-api'
|
#VUE_APP_BASE_API = '/dev-api'
|
||||||
#VUE_APP_BASE_API = 'http://localhost:8085/dev-api'
|
#VUE_APP_BASE_API = 'http://localhost:8085/dev-api'
|
||||||
VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
|
VUE_APP_BASE_API = '/dev-api'
|
||||||
SITE_TYPE = 'NEd5n92EMIpyyBslaNqsRgE'
|
SITE_TYPE = 'NEd5n92EMIpyyBslaNqsRgE'
|
||||||
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
||||||
|
|
||||||
|
|||||||
@@ -101,22 +101,32 @@ export function toArticle(news, width) {
|
|||||||
let routeData = null;
|
let routeData = null;
|
||||||
if (info.three == null) {
|
if (info.three == null) {
|
||||||
if (width) {
|
if (width) {
|
||||||
routeData = vm.$router.resolve("/pc/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
routeData = "/pc/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang");
|
||||||
} else {
|
} else {
|
||||||
routeData = vm.$router.resolve("/mobile/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
routeData = "/mobile/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log(info.three, "toArticle,info.three")
|
console.log(info.three, "toArticle,info.three")
|
||||||
if (width) {
|
if (width) {
|
||||||
routeData = vm.$router.resolve("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
|
routeData = "/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang");
|
||||||
} else {
|
} else {
|
||||||
routeData = vm.$router.resolve("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
|
routeData = "/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.open(routeData.href,"_blank")
|
linkTo(routeData)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function linkTo(routeData) {
|
||||||
|
let userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
|
||||||
|
if (userAgent.indexOf("Safari") > -1) {
|
||||||
|
window.location.href = window.location.origin + routeData
|
||||||
|
} else {
|
||||||
|
window.open(routeData.href, "_blank")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export function lookMoreComment(item, width) {
|
export function lookMoreComment(item, width) {
|
||||||
info(item.id).then(res => {
|
info(item.id).then(res => {
|
||||||
let info = null
|
let info = null
|
||||||
@@ -153,19 +163,23 @@ export function lookMoreFixedComment(id, width) {
|
|||||||
}
|
}
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
return
|
return
|
||||||
}
|
let routeData = null;
|
||||||
if (info.three == null) {
|
if (info.three == null) {
|
||||||
if (width) {
|
if (width) {
|
||||||
vm.$router.push("/pc/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
routeData = "/pc/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang");
|
||||||
|
} else {
|
||||||
|
routeData = "/mobile/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
vm.$router.push("/mobile/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
if (width) {
|
||||||
}
|
routeData = "/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang");
|
||||||
} else {
|
} else {
|
||||||
if (width) {
|
routeData = "/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang");
|
||||||
vm.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
}
|
||||||
} else {
|
|
||||||
vm.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
|
||||||
}
|
}
|
||||||
|
linkTo(routeData)
|
||||||
|
// window.location.href = window.location.origin + routeData.href
|
||||||
|
// window.open(window.location.origin + routeData.href, "_blank")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
linkClick(chile) {
|
linkClick(chile) {
|
||||||
if (chile.link != null && chile.link != "") {
|
if (chile.link!=null && chile.link != "" && chile.link != '""'){
|
||||||
window.open(chile.link);
|
window.open(chile.link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
linkClick(chile){
|
linkClick(chile){
|
||||||
if (chile.link!=null && chile.link != ""){
|
if (chile.link!=null && chile.link != "" && chile.link != '""'){
|
||||||
window.open(chile.link)
|
window.open(chile.link)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDateTime(date) {
|
getDateTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDateTime(date) {
|
getDateTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
|||||||
@@ -142,9 +142,7 @@ export default {
|
|||||||
window.open(routeData.href, "_blank")
|
window.open(routeData.href, "_blank")
|
||||||
},
|
},
|
||||||
menuCut(menu) {
|
menuCut(menu) {
|
||||||
console.log(menu)
|
window.open("/pc/" + menu.encodeId + "?type=" + menu.type + "&lang=" + sessionStorage.getItem("lang"))
|
||||||
// this.ch_logo_blue=false
|
|
||||||
this.$router.push("/pc/" + menu.encodeId + "?type=" + menu.type + "&lang=" + sessionStorage.getItem("lang"));
|
|
||||||
},
|
},
|
||||||
switchLang() {
|
switchLang() {
|
||||||
let lang = ''
|
let lang = ''
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<div class="academy_content" @click="getArticle(sciencesData[1])">
|
<div class="academy_content" @click="getArticle(sciencesData[2])">
|
||||||
<div class="academy_content_icontime">
|
<div class="academy_content_icontime">
|
||||||
<div class="img"></div>
|
<div class="img"></div>
|
||||||
<span>{{getDateTime(sciencesData[2].publishTime)}}</span>
|
<span>{{getDateTime(sciencesData[2].publishTime)}}</span>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<div class="academy_content" @click="getArticle(sciencesData[1])">
|
<div class="academy_content" @click="getArticle(sciencesData[3])">
|
||||||
<div class="academy_content_icontime">
|
<div class="academy_content_icontime">
|
||||||
<!-- <img :src="src" alt="">-->
|
<!-- <img :src="src" alt="">-->
|
||||||
<div class="img"></div>
|
<div class="img"></div>
|
||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
clickTo(link) {
|
clickTo(link) {
|
||||||
//console.log(link)
|
//console.log(link)
|
||||||
window.location.href = link;//当前标签页
|
window.location.href = window.location.origin + link; //当前标签页
|
||||||
},
|
},
|
||||||
getArticle(news) {
|
getArticle(news) {
|
||||||
toArticle(news, this.width);
|
toArticle(news, this.width);
|
||||||
@@ -150,6 +150,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getDateTime(date) {
|
getDateTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
@@ -164,6 +167,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getMonthTime(date) {
|
getMonthTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
if (month < 10){
|
if (month < 10){
|
||||||
|
|||||||
@@ -75,12 +75,18 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDateTime(date) {
|
getDateTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
return year + "-" + month;
|
return year + "-" + month;
|
||||||
},
|
},
|
||||||
getDayTime(date) {
|
getDayTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let day = time.getDate();
|
let day = time.getDate();
|
||||||
return day;
|
return day;
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDateTime(date) {
|
getDateTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
|||||||
@@ -67,7 +67,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
clickTo(link) {
|
clickTo(link) {
|
||||||
//console.log(link)
|
//console.log(link)
|
||||||
window.location.href = link;//当前标签页
|
if (/android/i.test(navigator.userAgent)) {
|
||||||
|
window.open(link, "_blank")
|
||||||
|
}
|
||||||
|
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
|
||||||
|
window.location.href = window.location.origin + link;//当前标签页
|
||||||
|
}
|
||||||
},
|
},
|
||||||
constructor() {
|
constructor() {
|
||||||
this.bannerWrap = document.getElementsByClassName("banner-card")[0];
|
this.bannerWrap = document.getElementsByClassName("banner-card")[0];
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getMonthTime(date) {
|
getMonthTime(date) {
|
||||||
|
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||||
|
date = date.replace(/-/g,'/');
|
||||||
|
}
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
if (month < 10) {
|
if (month < 10) {
|
||||||
|
|||||||
@@ -29,21 +29,21 @@ module.exports = {
|
|||||||
productionSourceMap: true,
|
productionSourceMap: true,
|
||||||
// webpack-dev-server 相关配置
|
// webpack-dev-server 相关配置
|
||||||
devServer: {
|
devServer: {
|
||||||
// host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
// // port: port,
|
// port: port,
|
||||||
// port: 8080,
|
port: 8080,
|
||||||
// open: true,
|
open: true,
|
||||||
// proxy: {
|
proxy: {
|
||||||
// // detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
// [process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
// target: `http://localhost:8085`,
|
target: `https://sist.swjtu.edu.cn/`,
|
||||||
// // target: `http://hchyunapi.tomey.live`,
|
// target: `http://hchyunapi.tomey.live`,
|
||||||
// changeOrigin: true,
|
changeOrigin: true,
|
||||||
// pathRewrite: {
|
pathRewrite: {
|
||||||
// ['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: '/dev-api'
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
disableHostCheck: true
|
disableHostCheck: true
|
||||||
},
|
},
|
||||||
// 强制内联CSS
|
// 强制内联CSS
|
||||||
|
|||||||
Reference in New Issue
Block a user