优化调整
This commit is contained in:
@@ -265,7 +265,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getNameAndCheck() {
|
getNameAndCheck() {
|
||||||
if (this.form.url === null) {
|
if (this.form.url === null) {
|
||||||
return;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.splitUrl();
|
this.splitUrl();
|
||||||
this.isExist();
|
this.isExist();
|
||||||
@@ -356,9 +356,15 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.avatar_url=res.data.owner.avatar_url;
|
that.avatar_url=res.data.owner.avatar_url;
|
||||||
// that.saveGithubInfo();
|
// that.saveGithubInfo();
|
||||||
});
|
}).catch(()=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: '项目地址不合法或不存在!',
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -140,6 +140,7 @@ import axios from 'axios'
|
|||||||
import ProjectList from "@/components/Project/ProjectList.vue";
|
import ProjectList from "@/components/Project/ProjectList.vue";
|
||||||
import UserInfo from "@/components/User/UserInfo.vue";
|
import UserInfo from "@/components/User/UserInfo.vue";
|
||||||
import LoginDialog from "@/components/Home/LoginDialog.vue";
|
import LoginDialog from "@/components/Home/LoginDialog.vue";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "HomeComponent",
|
name: "HomeComponent",
|
||||||
@@ -169,9 +170,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
|
|
||||||
this.categoryList();
|
this.categoryList();
|
||||||
setTimeout(()=>{
|
this.getProjectTotal();
|
||||||
this.getProjectTotal();
|
|
||||||
},1000)
|
|
||||||
this.getUserTotal();
|
this.getUserTotal();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -212,7 +211,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.projectLists=res.data;
|
that.projectLists=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
projectListsByCount(index,name){
|
projectListsByCount(index,name){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -284,7 +289,13 @@ export default {
|
|||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
that.tags=res.data;
|
that.tags=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getUserTotal(){
|
getUserTotal(){
|
||||||
@@ -295,7 +306,13 @@ export default {
|
|||||||
url: '/api/userNum',
|
url: '/api/userNum',
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.userTotal=res.data;
|
that.userTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getProjectTotal(){
|
getProjectTotal(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -306,9 +323,14 @@ export default {
|
|||||||
// URL 中的查询参数
|
// URL 中的查询参数
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.projectTotal=res.data;
|
that.projectTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
)}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -275,7 +275,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -319,7 +325,13 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,124 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="container">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="6" :offset="1">
|
|
||||||
<el-progress :percentage="onePercentage" :color="oneCustomColors" :format="oneFormat" :stroke-width="3"></el-progress>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6" :offset="1">
|
|
||||||
<el-progress :percentage="twoPercentage" :color="twoCustomColors" :format="twoFormat" :stroke-width="3"></el-progress>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6" :offset="1">
|
|
||||||
<el-progress :percentage="ThreePercentage" :color="ThreeCustomColors" :format="ThreeFormat" :stroke-width="3"></el-progress>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="1" style="line-height: 15px;">
|
|
||||||
{{content}}
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "PasswordStrength",
|
|
||||||
model: {
|
|
||||||
event: 'change',
|
|
||||||
prop: 'password'
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
//密码
|
|
||||||
password: {
|
|
||||||
type: [String,Boolean,Number,Object],
|
|
||||||
required: true,
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch:{
|
|
||||||
password(newValue){
|
|
||||||
const mode = this.checkPasswordStrength(newValue);
|
|
||||||
//逻辑处理
|
|
||||||
switch (mode) {
|
|
||||||
//初始化状态
|
|
||||||
case 0:
|
|
||||||
this.content = '';
|
|
||||||
this.onePercentage = 0;
|
|
||||||
this.twoPercentage = 0;
|
|
||||||
this.ThreePercentage = 0;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
this.content = '弱';
|
|
||||||
this.onePercentage = 100;
|
|
||||||
this.twoPercentage = 0;
|
|
||||||
this.ThreePercentage = 0;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
this.content = '中';
|
|
||||||
this.onePercentage = 100;
|
|
||||||
this.twoPercentage = 100;
|
|
||||||
this.ThreePercentage = 0;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
this.content = '中';
|
|
||||||
this.onePercentage = 100;
|
|
||||||
this.twoPercentage = 100;
|
|
||||||
this.ThreePercentage = 0;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.content = '高';
|
|
||||||
this.onePercentage = 100;
|
|
||||||
this.twoPercentage = 100;
|
|
||||||
this.ThreePercentage = 100;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
content:"",
|
|
||||||
onePercentage:0,
|
|
||||||
twoPercentage:0,
|
|
||||||
ThreePercentage:0,
|
|
||||||
oneCustomColors: [
|
|
||||||
{color: '#f56c6c', percentage: 100}
|
|
||||||
],
|
|
||||||
twoCustomColors: [
|
|
||||||
{color: '#e6a23c', percentage: 100}
|
|
||||||
],
|
|
||||||
ThreeCustomColors: [
|
|
||||||
{color: '#67c23a', percentage: 100}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
oneFormat() {
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
twoFormat() {
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
ThreeFormat() {
|
|
||||||
return "";
|
|
||||||
},
|
|
||||||
//密码强度验证
|
|
||||||
checkPasswordStrength(value) {
|
|
||||||
let mode = 0;
|
|
||||||
//正则表达式验证符合要求的
|
|
||||||
if (value.length < 1) return mode;
|
|
||||||
if (/\d/.test(value)) mode++; //数字
|
|
||||||
if (/[a-z]/.test(value)) mode++; //小写
|
|
||||||
if (/[A-Z]/.test(value)) mode++; //大写
|
|
||||||
if (/\W/.test(value)) mode++; //特殊字符
|
|
||||||
return mode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.el-progress__text {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.el-progress-bar {
|
|
||||||
padding-right: 0px;
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@@ -129,7 +129,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// searchRequest() {
|
// searchRequest() {
|
||||||
// const params = {
|
// const params = {
|
||||||
@@ -151,7 +157,13 @@ export default {
|
|||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.historySearch=res.data;
|
that.historySearch=res.data;
|
||||||
|
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleClose(tag){
|
handleClose(tag){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -181,7 +193,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
searchByInput(){
|
searchByInput(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -217,7 +235,13 @@ export default {
|
|||||||
that.gethistorySearch();
|
that.gethistorySearch();
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
Vue.prototype.$notify.error({
|
Vue.prototype.$notify.error({
|
||||||
title: '错误',
|
title: '错误',
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="SearchResult" @click="goToProjectDeatil" style=";align-items:center;cursor: pointer;margin-top: 5px;display: flex;flex-direction: row;flex-wrap: nowrap">
|
<div class="SearchResult" @click="goToProjectDeatil" style=";align-items:center;cursor: pointer;margin-top: 5px;display: flex;flex-direction: row;flex-wrap: nowrap">
|
||||||
<div style="width: 50px;height: 50px;">
|
<div style="width: 50px;height: 50px;">
|
||||||
<el-avatar :size="50" :src="searchResult.projectIco"></el-avatar>
|
<el-avatar v-if="searchResult.projectIco" :size="50" :src="searchResult.projectIco"></el-avatar>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
||||||
<div style="margin-left:10px;display: flex;flex-direction: row;flex-wrap: nowrap">
|
<div style="margin-left:10px;display: flex;flex-direction: row;flex-wrap: nowrap">
|
||||||
@@ -15,14 +15,14 @@
|
|||||||
<span>{{formatTime}}</span>
|
<span>{{formatTime}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="align-items: center;font-size: 12px;color: #9ca3af">
|
<div style="align-items: center;font-size: 12px;color: #9ca3af">
|
||||||
<i class="el-icon-view"></i> <span>{{formatNumber(searchResult.lookCount)}}</span>
|
<i class="el-icon-view"></i> <span v-if="searchResult.lookCount">{{formatNumber(searchResult.lookCount)}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="align-items: center;font-size: 12px;color: #9ca3af">
|
<div style="align-items: center;font-size: 12px;color: #9ca3af">
|
||||||
<i class="el-icon-star-on"></i> <span>{{formatNumber(searchResult.startNum)}}</span>
|
<i class="el-icon-star-on"></i> <span v-if="searchResult.startNum">{{formatNumber(searchResult.startNum)}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 10px;justify-content: space-between;display: flex;flex-direction:row;flex-wrap: nowrap;align-items: center;font-size: 12px;color: #9ca3af">
|
<div style="margin-left: 10px;justify-content: space-between;display: flex;flex-direction:row;flex-wrap: nowrap;align-items: center;font-size: 12px;color: #9ca3af">
|
||||||
<div :style="{'background-color':colorlists[Math.floor(Math.random() * colorlists.length)]}" style="width: 8px;height: 8px;background-color: #ffba00;border-radius: 50px"></div>
|
<div :style="{'background-color':colorlists[Math.floor(Math.random() * colorlists.length)]}" style="width: 8px;height: 8px;background-color: #ffba00;border-radius: 50px"></div>
|
||||||
<span style="margin-left: 5px">{{searchResult.categoryName}}</span>
|
<span style="margin-left: 5px" v-if="searchResult.categoryName">{{searchResult.categoryName}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,19 +57,24 @@ export default {
|
|||||||
return num >= 1e3 && num < 1e4 ? (num / 1e3).toFixed(1) + 'k' : num >= 1e4 ? (num / 1e4).toFixed(1) + 'w' : num
|
return num >= 1e3 && num < 1e4 ? (num / 1e3).toFixed(1) + 'k' : num >= 1e4 ? (num / 1e4).toFixed(1) + 'w' : num
|
||||||
},
|
},
|
||||||
goToProjectDeatil(){
|
goToProjectDeatil(){
|
||||||
this.$router.push({
|
if (this.searchResult.projectId){
|
||||||
path:'/ProjectDetail',
|
this.$router.push({
|
||||||
query: {
|
path:'/ProjectDetail',
|
||||||
id: this.searchResult.projectId,
|
query: {
|
||||||
refresh: true
|
id: this.searchResult.projectId,
|
||||||
}})
|
refresh: true
|
||||||
|
}})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// console.log(this.$route.query.id)
|
// console.log(this.$route.query.id)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 对时间进行格式化
|
// 对时间进行格式化
|
||||||
formatTime: function() {
|
formatTime: function() {
|
||||||
if (this.searchResult) {
|
if (this.searchResult.submitTime) {
|
||||||
const dt = new Date(this.searchResult.submitTime)
|
const dt = new Date(this.searchResult.submitTime)
|
||||||
const year=dt.getFullYear()
|
const year=dt.getFullYear()
|
||||||
const month = dt.getMonth()
|
const month = dt.getMonth()
|
||||||
@@ -80,10 +85,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// 截取文章内容的前 35 个字,并加上省略号
|
// 截取文章内容的前 35 个字,并加上省略号
|
||||||
briefContent: function() {
|
briefContent: function() {
|
||||||
return this.searchResult.projectDescription.substr(0, 17) + '...';
|
if (this.searchResult.projectDescription){
|
||||||
|
return this.searchResult.projectDescription.substr(0, 17) + '...';
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
briefTitle: function() {
|
briefTitle: function() {
|
||||||
return this.searchResult.projectTitle.substr(0, 10) + '...';
|
if(this.searchResult.projectTitle){
|
||||||
|
return this.searchResult.projectTitle.substr(0, 10) + '...';
|
||||||
|
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@@ -163,15 +163,22 @@ export default {
|
|||||||
this.getLabel();
|
this.getLabel();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
backtoHome(){
|
||||||
|
this.$router.push(
|
||||||
|
{
|
||||||
|
path:'/home'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
// drawPage(){
|
// drawPage(){
|
||||||
// var that = this;
|
// var that = this;
|
||||||
// var fac = document.getElementsByClassName("3");
|
// var fac = document.getElementsByClassName("3");
|
||||||
// fac.style.backgroundImage = that.currentImg;
|
// fac.style.backgroundImage = that.currentImg;
|
||||||
// },
|
// },
|
||||||
test(index){
|
// test(index){
|
||||||
// var that = this;
|
// // var that = this;
|
||||||
// console.log(index);
|
// // console.log(index);
|
||||||
},
|
// },
|
||||||
goBack() {
|
goBack() {
|
||||||
window.history.go(-1);
|
window.history.go(-1);
|
||||||
},
|
},
|
||||||
@@ -186,7 +193,13 @@ export default {
|
|||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.ProjectNum = parseInt(res.data);
|
that.ProjectNum = parseInt(res.data);
|
||||||
// console.log(res.data);
|
// console.log(res.data);
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 获取月刊总数
|
// 获取月刊总数
|
||||||
getMonely(){
|
getMonely(){
|
||||||
@@ -199,6 +212,12 @@ export default {
|
|||||||
}).then(function (res){
|
}).then(function (res){
|
||||||
that.Monely = parseInt(res.data);
|
that.Monely = parseInt(res.data);
|
||||||
// console.log(res.data);
|
// console.log(res.data);
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取所有标签:
|
//获取所有标签:
|
||||||
@@ -215,6 +234,12 @@ export default {
|
|||||||
let tmp = res.data[i]['categoryName'];
|
let tmp = res.data[i]['categoryName'];
|
||||||
that.labelItem.push(tmp);
|
that.labelItem.push(tmp);
|
||||||
}
|
}
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 月刊详情页面跳转
|
// 月刊详情页面跳转
|
||||||
|
@@ -61,6 +61,7 @@
|
|||||||
import MonthlyItems from "@/components/Monthly/MonthlyItems.vue";
|
import MonthlyItems from "@/components/Monthly/MonthlyItems.vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import RightTools from "@/components/Home/RightTools.vue";
|
import RightTools from "@/components/Home/RightTools.vue";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MonthlyByTags",
|
name: "MonthlyByTags",
|
||||||
@@ -144,6 +145,12 @@ export default {
|
|||||||
that.labelItem.push(tmp);
|
that.labelItem.push(tmp);
|
||||||
}
|
}
|
||||||
console.log(that.labelItem);
|
console.log(that.labelItem);
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList(index,name){
|
getList(index,name){
|
||||||
@@ -160,7 +167,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.projectLists=res.data;
|
that.projectLists=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}else{
|
}else{
|
||||||
axios({
|
axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -173,7 +186,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.projectLists=res.data;
|
that.projectLists=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@@ -96,6 +96,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import MonthlyItems from "@/components/Monthly/MonthlyItems.vue"
|
import MonthlyItems from "@/components/Monthly/MonthlyItems.vue"
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MonthlyDetailComponent",
|
name: "MonthlyDetailComponent",
|
||||||
@@ -231,6 +232,12 @@ export default {
|
|||||||
}).then(function (res){
|
}).then(function (res){
|
||||||
that.Monely = parseInt(res.data);
|
that.Monely = parseInt(res.data);
|
||||||
// console.log(res.data);
|
// console.log(res.data);
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取该期月刊中项目列表
|
// 获取该期月刊中项目列表
|
||||||
@@ -250,7 +257,13 @@ export default {
|
|||||||
that.MonTypePro.push(that.MonList[key]);
|
that.MonTypePro.push(that.MonList[key]);
|
||||||
that.MonType.push(key);
|
that.MonType.push(key);
|
||||||
})
|
})
|
||||||
console.log(that.MonTypePro);
|
// console.log(that.MonTypePro);
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 月刊详情页面跳转
|
// 月刊详情页面跳转
|
||||||
|
@@ -147,6 +147,12 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
@@ -176,6 +182,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.tableData=res.data;
|
that.tableData=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -125,7 +125,13 @@ export default {
|
|||||||
params: {
|
params: {
|
||||||
id:this.$route.query.id
|
id:this.$route.query.id
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getOneFileDetail(){
|
getOneFileDetail(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -148,6 +154,12 @@ export default {
|
|||||||
that.content=res.data.content;
|
that.content=res.data.content;
|
||||||
that.userName=res.data.userName;
|
that.userName=res.data.userName;
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goTo(url){
|
goTo(url){
|
||||||
|
@@ -100,7 +100,7 @@ export default {
|
|||||||
that.ArticleTitle=res.data.ArticleTitle;
|
that.ArticleTitle=res.data.ArticleTitle;
|
||||||
that.articleico=res.data.articleico;
|
that.articleico=res.data.articleico;
|
||||||
|
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import ArticleList from "@/components/Paper/ArticleList.vue";
|
import ArticleList from "@/components/Paper/ArticleList.vue";
|
||||||
import RightTools from "@/components/Home/RightTools.vue";
|
import RightTools from "@/components/Home/RightTools.vue";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -105,6 +106,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.articleList=res.data;
|
that.articleList=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getArticleListBylast(){
|
getArticleListBylast(){
|
||||||
@@ -120,6 +127,12 @@ export default {
|
|||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
that.articleList=res.data;
|
that.articleList=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -167,6 +167,12 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -78,38 +78,38 @@
|
|||||||
<template slot="title">
|
<template slot="title">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">星数</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">星数</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">名称</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">名称</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">主语言</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">主语言</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">活跃</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">活跃</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">订阅者</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">订阅者</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td v-if="github.starNum" style="font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.starNum)}}</td>
|
<td v-if="github.starNum" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.starNum)}}</td>
|
||||||
<td v-if="github.name!==null" style="font-size: 20px;color: black;font-weight: bold;">{{briefName}}</td>
|
<td v-if="github.name!==null" style="text-align: center;font-size: 20px;color: black;font-weight: bold;">{{briefName}}</td>
|
||||||
<td v-if="github.language!==null" style="font-size: 20px;color: black;font-weight: bold">{{brief}}</td>
|
<td v-if="github.language!==null" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{brief}}</td>
|
||||||
<td v-if="github.allow_forking" style="font-size: 20px;color: black;font-weight: bold">是</td>
|
<td v-if="github.allow_forking" style="text-align: center;font-size: 20px;color: black;font-weight: bold">是</td>
|
||||||
<td v-if="!github.allow_forking" style="font-size: 20px;color: black;font-weight: bold">否</td>
|
<td v-if="!github.allow_forking" style="text-align: center;font-size: 20px;color: black;font-weight: bold">否</td>
|
||||||
<td v-if="github.subscribers_count" style="font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.subscribers_count)}}</td>
|
<td v-if="github.subscribers_count" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.subscribers_count)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">Issues</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">Issues</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">组织</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">组织</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">默认分支</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">默认分支</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">Forks</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">Forks</th>
|
||||||
<th style="width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">协议</th>
|
<th style="text-align: center;width: 10vw;color: #9ca3af;font-size: 15px;font-weight: bold">协议</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td v-if="github.open_issues_count" style="font-size: 20px;color: black;font-weight: bold">{{github.open_issues_count}}</td>
|
<td v-if="github.open_issues_count" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{github.open_issues_count}}</td>
|
||||||
<td v-if="github.organization==='Organization'" style="font-size: 20px;color: black;font-weight: bold">是</td>
|
<td v-if="github.organization==='Organization'" style="text-align: center;font-size: 20px;color: black;font-weight: bold">是</td>
|
||||||
<td v-else-if="github.organization!=='Organization'" style="font-size: 20px;color: black;font-weight: bold">否</td>
|
<td v-else-if="github.organization!=='Organization'" style="text-align: center;font-size: 20px;color: black;font-weight: bold">否</td>
|
||||||
<td v-if="github.default_branch" style="font-size: 20px;color: black;font-weight: bold">{{github.default_branch}}</td>
|
<td v-if="github.default_branch" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{github.default_branch}}</td>
|
||||||
<td v-if="github.forks_count" style="font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.forks_count)}}</td>
|
<td v-if="github.forks_count" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.forks_count)}}</td>
|
||||||
<td v-if="github.license" style="font-size: 20px;color: black;font-weight: bold">{{github.license}}</td>
|
<td v-if="github.license" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{github.license}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -463,6 +463,12 @@ export default {
|
|||||||
that.changeAvatarByLocal();
|
that.changeAvatarByLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reload() {
|
reload() {
|
||||||
@@ -493,6 +499,12 @@ export default {
|
|||||||
that.tabCheckedHot=true;
|
that.tabCheckedHot=true;
|
||||||
that.tabCheckedLast=false;
|
that.tabCheckedLast=false;
|
||||||
}
|
}
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
publishComment(){
|
publishComment(){
|
||||||
@@ -528,6 +540,12 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
Vue.prototype.$notify.error({
|
Vue.prototype.$notify.error({
|
||||||
@@ -595,7 +613,13 @@ export default {
|
|||||||
that.getLastComment();
|
that.getLastComment();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getHotComment(){
|
getHotComment(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -610,6 +634,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.commentContent=res.data;
|
that.commentContent=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getLastComment(){
|
getLastComment(){
|
||||||
@@ -628,6 +658,12 @@ export default {
|
|||||||
that.commentContent=res.data;
|
that.commentContent=res.data;
|
||||||
that.commentNum=Object.keys(that.commentContent).length;
|
that.commentNum=Object.keys(that.commentContent).length;
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isStart(){
|
isStart(){
|
||||||
@@ -643,6 +679,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.Like=res.data;
|
that.Like=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addStar(){
|
addStar(){
|
||||||
@@ -671,7 +713,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
cancleStar(){
|
cancleStar(){
|
||||||
axios({
|
axios({
|
||||||
@@ -700,7 +748,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -744,6 +798,12 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -785,7 +845,13 @@ export default {
|
|||||||
protocol:this.github.license,
|
protocol:this.github.license,
|
||||||
version:'0',
|
version:'0',
|
||||||
}
|
}
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
changeAvatarByLocal(){
|
changeAvatarByLocal(){
|
||||||
@@ -802,7 +868,13 @@ export default {
|
|||||||
responseType:'blob'
|
responseType:'blob'
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.imageUrl = window.URL.createObjectURL(res.data)//这里也是关键,调用window的这个方法URL方法
|
that.imageUrl = window.URL.createObjectURL(res.data)//这里也是关键,调用window的这个方法URL方法
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -856,6 +928,12 @@ export default {
|
|||||||
that.github.avatar_url=res.data.avatar;
|
that.github.avatar_url=res.data.avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -85,11 +85,16 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
goProjectDetail(){
|
goProjectDetail(){
|
||||||
this.$router.push({
|
if (this.projectLists.projectId){
|
||||||
|
this.$router.push({
|
||||||
path:'/ProjectDetail',
|
path:'/ProjectDetail',
|
||||||
query: {
|
query: {
|
||||||
id: this.projectLists.projectId, refresh: true
|
id: this.projectLists.projectId, refresh: true
|
||||||
}})
|
}})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// console.log(this.$route.query.id)
|
// console.log(this.$route.query.id)
|
||||||
},
|
},
|
||||||
formatNumber(num) {
|
formatNumber(num) {
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RandomProjects",
|
name: "RandomProjects",
|
||||||
@@ -63,6 +64,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.randomProjectList=res.data;
|
that.randomProjectList=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
formatNumber(num) {
|
formatNumber(num) {
|
||||||
|
@@ -151,16 +151,40 @@ export default {
|
|||||||
var that = this;
|
var that = this;
|
||||||
this.$axios.get("/gh-star-event.json").then(res => {
|
this.$axios.get("/gh-star-event.json").then(res => {
|
||||||
that.starNum = res.data;
|
that.starNum = res.data;
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
this.$axios.get("/gh-push-event.json").then(res => {
|
this.$axios.get("/gh-push-event.json").then(res => {
|
||||||
that.pushNum = res.data;
|
that.pushNum = res.data;
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
this.$axios.get("/gh-pull-request.json").then(res => {
|
this.$axios.get("/gh-pull-request.json").then(res => {
|
||||||
that.pullNum = res.data;
|
that.pullNum = res.data;
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
this.$axios.get("/github-licenses.json").then(res => {
|
this.$axios.get("/github-licenses.json").then(res => {
|
||||||
that.licensesNum = res.data;
|
that.licensesNum = res.data;
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
@@ -210,7 +210,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.loginTime=res.data;
|
that.loginTime=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getUserTotal(){
|
getUserTotal(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -223,7 +229,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.userTotal=res.data;
|
that.userTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getProjectTotal(){
|
getProjectTotal(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -236,7 +248,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.projectTotal=res.data;
|
that.projectTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getArticleTotal(){
|
getArticleTotal(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -249,7 +267,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.ArticleTotal=res.data;
|
that.ArticleTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getAdminTotal(){
|
getAdminTotal(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -262,7 +286,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.AdminTotal=res.data;
|
that.AdminTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getCommentTotal(){
|
getCommentTotal(){
|
||||||
var that=this;
|
var that=this;
|
||||||
@@ -275,38 +305,63 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.CommentTotal=res.data;
|
that.CommentTotal=res.data;
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getCategoryTotal(){
|
getCategoryTotal(){
|
||||||
var that=this;
|
if (this.$cookie.get('adminName')){
|
||||||
axios({
|
var that=this;
|
||||||
method: 'post',
|
axios({
|
||||||
// 请求的地址
|
method: 'post',
|
||||||
url: 'http://localhost:8082/helloGithub_war_exploded/countCategory',
|
// 请求的地址
|
||||||
// URL 中的查询参数
|
url: 'http://localhost:8082/helloGithub_war_exploded/countCategory',
|
||||||
params: {
|
// URL 中的查询参数
|
||||||
}
|
params: {
|
||||||
}).then((res)=>{
|
}
|
||||||
that.CategoryTotal=res.data;
|
}).then((res)=>{
|
||||||
});
|
that.CategoryTotal=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getProjectByTime(){
|
getProjectByTime(){
|
||||||
var that=this;
|
if(this.$cookie.get('adminName')){
|
||||||
axios({
|
var that=this;
|
||||||
method: 'post',
|
axios({
|
||||||
// 请求的地址
|
method: 'post',
|
||||||
url: 'http://localhost:8082/helloGithub_war_exploded/retProjectByTime',
|
// 请求的地址
|
||||||
}).then((res)=>{
|
url: 'http://localhost:8082/helloGithub_war_exploded/retProjectByTime',
|
||||||
that.date=res.data.Date;
|
}).then((res)=>{
|
||||||
that.Month=res.data.Month;
|
that.date=res.data.Date;
|
||||||
that.Year=res.data.Year;
|
that.Month=res.data.Month;
|
||||||
|
that.Year=res.data.Year;
|
||||||
|
|
||||||
that.eChart2(that.date,'echart2');
|
that.eChart2(that.date,'echart2');
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
eChart2(Date,id){
|
eChart2(Date,id){
|
||||||
var myChart = echarts.init(document.getElementById(id));
|
var myChart = echarts.init(document.getElementById(id));
|
||||||
@@ -417,7 +472,13 @@ export default {
|
|||||||
that.echart_Pie(xData,yData,'echart1');
|
that.echart_Pie(xData,yData,'echart1');
|
||||||
|
|
||||||
|
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
echart_Pie(xData, yData, id) {
|
echart_Pie(xData, yData, id) {
|
||||||
var chartDom = document.getElementById(id);
|
var chartDom = document.getElementById(id);
|
||||||
@@ -471,7 +532,7 @@ export default {
|
|||||||
series: [{
|
series: [{
|
||||||
name: '统计',
|
name: '统计',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['25%', '65%'],
|
radius: ['25%', '55%'],
|
||||||
center: ['50%', '50%'],
|
center: ['50%', '50%'],
|
||||||
color: [
|
color: [
|
||||||
'#2CEDED',
|
'#2CEDED',
|
||||||
@@ -496,7 +557,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
name: '统计',
|
name: '统计',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['25%', '65%'],
|
radius: ['25%', '55%'],
|
||||||
center: ['50%', '50%'],
|
center: ['50%', '50%'],
|
||||||
color: [
|
color: [
|
||||||
'transparent',
|
'transparent',
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
style="width: 175px"
|
style="width: 175px"
|
||||||
></el-input>
|
></el-input>
|
||||||
<!-- <span class="code">验证码</span> -->
|
<!-- <span class="code">验证码</span> -->
|
||||||
<img :src="imageUrl" @click="resetImg" class="vertify_img"/>
|
<img v-if="imageUrl" :src="imageUrl" @click="resetImg" class="vertify_img"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -65,7 +65,6 @@ export default {
|
|||||||
this.imageUrl = "http://localhost:8082/helloGithub_war_exploded/VerifycodeServlet?" + new Date().getTime();
|
this.imageUrl = "http://localhost:8082/helloGithub_war_exploded/VerifycodeServlet?" + new Date().getTime();
|
||||||
},
|
},
|
||||||
submit(formName){
|
submit(formName){
|
||||||
console.log(this.login);
|
|
||||||
var _this=this;
|
var _this=this;
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -103,7 +102,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -167,7 +167,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 禁用
|
// 禁用
|
||||||
this.$confirm('确认禁用吗?', '操作确认', {
|
this.$confirm('确认禁用吗?', '操作确认', {
|
||||||
@@ -202,7 +208,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
GetData(){
|
GetData(){
|
||||||
@@ -214,6 +226,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.List = res.data;
|
that.List = res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
// /selectAllArticleByadmin
|
// /selectAllArticleByadmin
|
||||||
},
|
},
|
||||||
@@ -315,15 +333,26 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
toDetailPage(row){
|
toDetailPage(row){
|
||||||
this.$router.push({
|
if(row.articleId){
|
||||||
path:'/ArticleDetail',
|
this.$router.push({
|
||||||
query: {
|
path:'/ArticleDetail',
|
||||||
id: row.articleId,
|
query: {
|
||||||
refresh: true
|
id: row.articleId,
|
||||||
}})
|
refresh: true
|
||||||
|
}})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -177,7 +177,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 禁用
|
// 禁用
|
||||||
this.$confirm('确认禁用吗?', '操作确认', {
|
this.$confirm('确认禁用吗?', '操作确认', {
|
||||||
@@ -212,7 +218,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
GetData(){
|
GetData(){
|
||||||
@@ -224,6 +236,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function(res){
|
}).then(function(res){
|
||||||
that.List = res.data;
|
that.List = res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
// /selectAllArticleByadmin
|
// /selectAllArticleByadmin
|
||||||
},
|
},
|
||||||
@@ -296,7 +314,7 @@ export default {
|
|||||||
axios({
|
axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
// 请求的地址
|
// 请求的地址
|
||||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateArticleByAdmin',
|
url: 'http://localhost:8082/helloGithub_war_exploded/updateCategoryByAdmin',
|
||||||
// URL 中的查询参数
|
// URL 中的查询参数
|
||||||
params: {
|
params: {
|
||||||
articleId: this.form.categoryId,
|
articleId: this.form.categoryId,
|
||||||
@@ -323,7 +341,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
addCategory(){
|
addCategory(){
|
||||||
var _this = this;
|
var _this = this;
|
||||||
@@ -357,8 +381,14 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
},
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -192,12 +192,17 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
toDetailPage(row){
|
toDetailPage(row){
|
||||||
this.$router.push({
|
if (row.projectId){
|
||||||
path:'/ProjectDetail',
|
this.$router.push({
|
||||||
query: {
|
path:'/ProjectDetail',
|
||||||
id: row.projectId,
|
query: {
|
||||||
refresh: true
|
id: row.projectId,
|
||||||
}})
|
refresh: true
|
||||||
|
}})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
editForm(){
|
editForm(){
|
||||||
this.isEdit=false;
|
this.isEdit=false;
|
||||||
@@ -237,7 +242,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 禁用
|
// 禁用
|
||||||
this.$confirm('确认禁用吗?', '操作确认', {
|
this.$confirm('确认禁用吗?', '操作确认', {
|
||||||
@@ -272,7 +283,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
@@ -293,6 +310,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.dataTable=res.data;
|
that.dataTable=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
openDialog(){
|
openDialog(){
|
||||||
@@ -330,7 +353,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleDelete(index) {
|
handleDelete(index) {
|
||||||
var that=this;
|
var that=this;
|
||||||
|
@@ -224,7 +224,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 禁用
|
// 禁用
|
||||||
this.$confirm('确认禁用吗?', '操作确认', {
|
this.$confirm('确认禁用吗?', '操作确认', {
|
||||||
@@ -259,7 +265,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
GetData(){
|
GetData(){
|
||||||
@@ -271,6 +283,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
that.List = res.data;
|
that.List = res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
// /selectAllArticleByadmin
|
// /selectAllArticleByadmin
|
||||||
},
|
},
|
||||||
@@ -374,15 +392,26 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
toDetailPage(row){
|
toDetailPage(row){
|
||||||
this.$router.push({
|
if(row.id){
|
||||||
path:'/oneFileDetail',
|
this.$router.push({
|
||||||
query: {
|
path:'/oneFileDetail',
|
||||||
id: row.id,
|
query: {
|
||||||
refresh: true
|
id: row.id,
|
||||||
}})
|
refresh: true
|
||||||
|
}})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -240,12 +240,17 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
toDetailPage(row){
|
toDetailPage(row){
|
||||||
this.$router.push({
|
if (row.projectId){
|
||||||
path:'/ProjectDetail',
|
this.$router.push({
|
||||||
query: {
|
path:'/ProjectDetail',
|
||||||
id: row.projectId,
|
query: {
|
||||||
refresh: true
|
id: row.projectId,
|
||||||
}})
|
refresh: true
|
||||||
|
}})
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleChangeStatus($event, id){
|
handleChangeStatus($event, id){
|
||||||
if ($event === 1) { // 这里判断一下
|
if ($event === 1) { // 这里判断一下
|
||||||
@@ -282,7 +287,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 禁用
|
// 禁用
|
||||||
this.$confirm('确认禁用吗?', '操作确认', {
|
this.$confirm('确认禁用吗?', '操作确认', {
|
||||||
@@ -317,7 +328,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editForm(){
|
editForm(){
|
||||||
@@ -341,6 +358,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.dataTable=res.data;
|
that.dataTable=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
@@ -370,7 +393,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
openDialog(){
|
openDialog(){
|
||||||
this.dialogVisible=true;
|
this.dialogVisible=true;
|
||||||
|
@@ -225,6 +225,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.dataTable=res.data;
|
that.dataTable=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit(){
|
submit(){
|
||||||
@@ -257,7 +263,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}else {
|
}else {
|
||||||
Vue.prototype.$notify.error({
|
Vue.prototype.$notify.error({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
label="头像"
|
label="头像"
|
||||||
width="120">
|
width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<img style="width: 50px;height: 50px" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+scope.row.userName"/>
|
<img v-if="scope.row.userName" style="width: 50px;height: 50px" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+scope.row.userName"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -229,7 +229,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// 禁用
|
// 禁用
|
||||||
this.$confirm('确认禁用吗?', '操作确认', {
|
this.$confirm('确认禁用吗?', '操作确认', {
|
||||||
@@ -264,7 +270,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAllUser(){
|
getAllUser(){
|
||||||
@@ -278,6 +290,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(function (res) {
|
}).then(function (res) {
|
||||||
that.dataTable=res.data;
|
that.dataTable=res.data;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm(formName) {
|
resetForm(formName) {
|
||||||
@@ -325,7 +343,13 @@ export default {
|
|||||||
offset: 50
|
offset: 50
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(index) {
|
handleEdit(index) {
|
||||||
@@ -365,7 +389,7 @@ export default {
|
|||||||
that.getAllUser();
|
that.getAllUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 点击取消:不删除了
|
// 点击取消:不删除了
|
||||||
this.$message({
|
this.$message({
|
||||||
|
@@ -64,6 +64,12 @@ export default {
|
|||||||
url: 'http://localhost:8082/helloGithub_war_exploded/deletesession',
|
url: 'http://localhost:8082/helloGithub_war_exploded/deletesession',
|
||||||
// URL 中的查询参数
|
// URL 中的查询参数
|
||||||
params: {}
|
params: {}
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
if (this.$cookie.get('username') === null) {
|
if (this.$cookie.get('username') === null) {
|
||||||
Vue.prototype.$notify({
|
Vue.prototype.$notify({
|
||||||
@@ -95,13 +101,18 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
toUserPage() {
|
toUserPage() {
|
||||||
this.$router.push({
|
if (this.$cookie.get('username')){
|
||||||
path: '/UserInfoPage',
|
this.$router.push({
|
||||||
query: {
|
path: '/UserInfoPage',
|
||||||
name: this.$cookie.get('username'),
|
query: {
|
||||||
refresh: true
|
name: this.$cookie.get('username'),
|
||||||
}
|
refresh: true
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getContributionValue() {
|
getContributionValue() {
|
||||||
var that = this;
|
var that = this;
|
||||||
@@ -119,6 +130,12 @@ export default {
|
|||||||
that.ContributionValue = res.data;
|
that.ContributionValue = res.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
@@ -136,6 +153,12 @@ export default {
|
|||||||
that.userLevel=res.data.userLevel;
|
that.userLevel=res.data.userLevel;
|
||||||
// that.imageUrl = res.data.userAvatar;
|
// that.imageUrl = res.data.userAvatar;
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
return;
|
return;
|
||||||
@@ -151,6 +174,12 @@ export default {
|
|||||||
params: {
|
params: {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
return;
|
return;
|
||||||
|
@@ -212,6 +212,12 @@ export default {
|
|||||||
that.userId=res.data.userId;
|
that.userId=res.data.userId;
|
||||||
// that.imageUrl=res.data.userAvatar;
|
// that.imageUrl=res.data.userAvatar;
|
||||||
that.userLevel=res.data.userLevel;
|
that.userLevel=res.data.userLevel;
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
return false;
|
return false;
|
||||||
@@ -235,6 +241,12 @@ export default {
|
|||||||
that.commentList=JSON.parse(res.data.comment);
|
that.commentList=JSON.parse(res.data.comment);
|
||||||
that.like=JSON.parse(res.data.like)
|
that.like=JSON.parse(res.data.like)
|
||||||
that.article=JSON.parse(res.data.article);
|
that.article=JSON.parse(res.data.article);
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
return false;
|
return false;
|
||||||
@@ -248,6 +260,12 @@ export default {
|
|||||||
// 请求的地址
|
// 请求的地址
|
||||||
url: 'http://localhost:8082/helloGithub_war_exploded/levelup',
|
url: 'http://localhost:8082/helloGithub_war_exploded/levelup',
|
||||||
// URL 中的查询参数
|
// URL 中的查询参数
|
||||||
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
return;
|
return;
|
||||||
@@ -333,7 +351,13 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
}).catch((error)=>{
|
||||||
|
Vue.prototype.$notify.error({
|
||||||
|
title: '错误',
|
||||||
|
message: error,
|
||||||
|
offset: 50
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// changeAvatarByLocal(){
|
// changeAvatarByLocal(){
|
||||||
// var that=this;
|
// var that=this;
|
||||||
|
Reference in New Issue
Block a user