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