优化调整
This commit is contained in:
@@ -265,7 +265,7 @@ export default {
|
||||
},
|
||||
getNameAndCheck() {
|
||||
if (this.form.url === null) {
|
||||
return;
|
||||
return false;
|
||||
} else {
|
||||
this.splitUrl();
|
||||
this.isExist();
|
||||
@@ -358,7 +358,13 @@ export default {
|
||||
}).then((res)=>{
|
||||
that.avatar_url=res.data.owner.avatar_url;
|
||||
// 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 UserInfo from "@/components/User/UserInfo.vue";
|
||||
import LoginDialog from "@/components/Home/LoginDialog.vue";
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
name: "HomeComponent",
|
||||
@@ -169,9 +170,7 @@ export default {
|
||||
created() {
|
||||
|
||||
this.categoryList();
|
||||
setTimeout(()=>{
|
||||
this.getProjectTotal();
|
||||
},1000)
|
||||
this.getUserTotal();
|
||||
},
|
||||
computed: {
|
||||
@@ -212,7 +211,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.projectLists=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
projectListsByCount(index,name){
|
||||
var that=this;
|
||||
@@ -284,7 +289,13 @@ export default {
|
||||
}).then((res)=>{
|
||||
// console.log(res);
|
||||
that.tags=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
getUserTotal(){
|
||||
@@ -295,7 +306,13 @@ export default {
|
||||
url: '/api/userNum',
|
||||
}).then((res)=>{
|
||||
that.userTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getProjectTotal(){
|
||||
var that=this;
|
||||
@@ -306,9 +323,14 @@ export default {
|
||||
// URL 中的查询参数
|
||||
}).then((res)=>{
|
||||
that.projectTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
},
|
||||
|
||||
)}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -275,7 +275,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -319,7 +325,13 @@ export default {
|
||||
});
|
||||
}
|
||||
// console.log(res);
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
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
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
// searchRequest() {
|
||||
// const params = {
|
||||
@@ -151,7 +157,13 @@ export default {
|
||||
}).then((res)=>{
|
||||
that.historySearch=res.data;
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
handleClose(tag){
|
||||
var that=this;
|
||||
@@ -181,7 +193,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
searchByInput(){
|
||||
var that=this;
|
||||
@@ -217,7 +235,13 @@ export default {
|
||||
that.gethistorySearch();
|
||||
}, 200);
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}else{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<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;">
|
||||
<el-avatar :size="50" :src="searchResult.projectIco"></el-avatar>
|
||||
<el-avatar v-if="searchResult.projectIco" :size="50" :src="searchResult.projectIco"></el-avatar>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction: column;flex-wrap: nowrap">
|
||||
<div style="margin-left:10px;display: flex;flex-direction: row;flex-wrap: nowrap">
|
||||
@@ -15,14 +15,14 @@
|
||||
<span>{{formatTime}}</span>
|
||||
</div>
|
||||
<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 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 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>
|
||||
<span style="margin-left: 5px">{{searchResult.categoryName}}</span>
|
||||
<span style="margin-left: 5px" v-if="searchResult.categoryName">{{searchResult.categoryName}}</span>
|
||||
</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
|
||||
},
|
||||
goToProjectDeatil(){
|
||||
if (this.searchResult.projectId){
|
||||
this.$router.push({
|
||||
path:'/ProjectDetail',
|
||||
query: {
|
||||
id: this.searchResult.projectId,
|
||||
refresh: true
|
||||
}})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// console.log(this.$route.query.id)
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 对时间进行格式化
|
||||
formatTime: function() {
|
||||
if (this.searchResult) {
|
||||
if (this.searchResult.submitTime) {
|
||||
const dt = new Date(this.searchResult.submitTime)
|
||||
const year=dt.getFullYear()
|
||||
const month = dt.getMonth()
|
||||
@@ -80,10 +85,20 @@ export default {
|
||||
},
|
||||
// 截取文章内容的前 35 个字,并加上省略号
|
||||
briefContent: function() {
|
||||
if (this.searchResult.projectDescription){
|
||||
return this.searchResult.projectDescription.substr(0, 17) + '...';
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
briefTitle: function() {
|
||||
if(this.searchResult.projectTitle){
|
||||
return this.searchResult.projectTitle.substr(0, 10) + '...';
|
||||
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
@@ -163,15 +163,22 @@ export default {
|
||||
this.getLabel();
|
||||
},
|
||||
methods: {
|
||||
backtoHome(){
|
||||
this.$router.push(
|
||||
{
|
||||
path:'/home'
|
||||
}
|
||||
)
|
||||
},
|
||||
// drawPage(){
|
||||
// var that = this;
|
||||
// var fac = document.getElementsByClassName("3");
|
||||
// fac.style.backgroundImage = that.currentImg;
|
||||
// },
|
||||
test(index){
|
||||
// var that = this;
|
||||
// console.log(index);
|
||||
},
|
||||
// test(index){
|
||||
// // var that = this;
|
||||
// // console.log(index);
|
||||
// },
|
||||
goBack() {
|
||||
window.history.go(-1);
|
||||
},
|
||||
@@ -186,7 +193,13 @@ export default {
|
||||
}).then((res)=>{
|
||||
that.ProjectNum = parseInt(res.data);
|
||||
// console.log(res.data);
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
// 获取月刊总数
|
||||
getMonely(){
|
||||
@@ -199,6 +212,12 @@ export default {
|
||||
}).then(function (res){
|
||||
that.Monely = parseInt(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'];
|
||||
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 axios from "axios";
|
||||
import RightTools from "@/components/Home/RightTools.vue";
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
name: "MonthlyByTags",
|
||||
@@ -144,6 +145,12 @@ export default {
|
||||
that.labelItem.push(tmp);
|
||||
}
|
||||
console.log(that.labelItem);
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getList(index,name){
|
||||
@@ -160,7 +167,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.projectLists=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}else{
|
||||
axios({
|
||||
method: 'post',
|
||||
@@ -173,7 +186,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.projectLists=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
@@ -96,6 +96,7 @@
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import MonthlyItems from "@/components/Monthly/MonthlyItems.vue"
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
name: "MonthlyDetailComponent",
|
||||
@@ -231,6 +232,12 @@ export default {
|
||||
}).then(function (res){
|
||||
that.Monely = parseInt(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.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{
|
||||
return false;
|
||||
@@ -176,6 +182,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.tableData=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@@ -125,7 +125,13 @@ export default {
|
||||
params: {
|
||||
id:this.$route.query.id
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getOneFileDetail(){
|
||||
var that=this;
|
||||
@@ -148,6 +154,12 @@ export default {
|
||||
that.content=res.data.content;
|
||||
that.userName=res.data.userName;
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
goTo(url){
|
||||
|
@@ -100,7 +100,7 @@ export default {
|
||||
that.ArticleTitle=res.data.ArticleTitle;
|
||||
that.articleico=res.data.articleico;
|
||||
|
||||
});
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@@ -55,6 +55,7 @@
|
||||
import axios from "axios";
|
||||
import ArticleList from "@/components/Paper/ArticleList.vue";
|
||||
import RightTools from "@/components/Home/RightTools.vue";
|
||||
import Vue from "vue";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -105,6 +106,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.articleList=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
getArticleListBylast(){
|
||||
@@ -120,6 +127,12 @@ export default {
|
||||
}).then(function (res) {
|
||||
// console.log(res)
|
||||
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">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="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="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="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="text-align: center;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="text-align: center;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>
|
||||
<td v-if="github.starNum" style="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.language!==null" style="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="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.starNum" style="text-align: center;font-size: 20px;color: black;font-weight: bold">{{formatNumber(github.starNum)}}</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="text-align: center;font-size: 20px;color: black;font-weight: bold">{{brief}}</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="text-align: center;font-size: 20px;color: black;font-weight: bold">否</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>
|
||||
</table>
|
||||
</template>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="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="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="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">Issues</th>
|
||||
<th style="text-align: center;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="text-align: center;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">协议</th>
|
||||
</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.organization==='Organization'" style="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-if="github.default_branch" style="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.license" style="font-size: 20px;color: black;font-weight: bold">{{github.license}}</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="text-align: center;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="text-align: center;font-size: 20px;color: black;font-weight: bold">{{github.default_branch}}</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="text-align: center;font-size: 20px;color: black;font-weight: bold">{{github.license}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -463,6 +463,12 @@ export default {
|
||||
that.changeAvatarByLocal();
|
||||
}
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
reload() {
|
||||
@@ -493,6 +499,12 @@ export default {
|
||||
that.tabCheckedHot=true;
|
||||
that.tabCheckedLast=false;
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
publishComment(){
|
||||
@@ -528,6 +540,12 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else{
|
||||
Vue.prototype.$notify.error({
|
||||
@@ -595,7 +613,13 @@ export default {
|
||||
that.getLastComment();
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
getHotComment(){
|
||||
var that=this;
|
||||
@@ -610,6 +634,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.commentContent=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
getLastComment(){
|
||||
@@ -628,6 +658,12 @@ export default {
|
||||
that.commentContent=res.data;
|
||||
that.commentNum=Object.keys(that.commentContent).length;
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
isStart(){
|
||||
@@ -643,6 +679,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.Like=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
addStar(){
|
||||
@@ -671,7 +713,13 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
cancleStar(){
|
||||
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;
|
||||
}
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
@@ -785,7 +845,13 @@ export default {
|
||||
protocol:this.github.license,
|
||||
version:'0',
|
||||
}
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
changeAvatarByLocal(){
|
||||
@@ -802,7 +868,13 @@ export default {
|
||||
responseType:'blob'
|
||||
}).then((res)=>{
|
||||
that.imageUrl = window.URL.createObjectURL(res.data)//这里也是关键,调用window的这个方法URL方法
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
@@ -856,6 +928,12 @@ export default {
|
||||
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:{
|
||||
goProjectDetail(){
|
||||
if (this.projectLists.projectId){
|
||||
this.$router.push({
|
||||
path:'/ProjectDetail',
|
||||
query: {
|
||||
id: this.projectLists.projectId, refresh: true
|
||||
}})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// console.log(this.$route.query.id)
|
||||
},
|
||||
formatNumber(num) {
|
||||
|
@@ -26,6 +26,7 @@
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
name: "RandomProjects",
|
||||
@@ -63,6 +64,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.randomProjectList=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
formatNumber(num) {
|
||||
|
@@ -151,16 +151,40 @@ export default {
|
||||
var that = this;
|
||||
this.$axios.get("/gh-star-event.json").then(res => {
|
||||
that.starNum = res.data;
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
this.$axios.get("/gh-push-event.json").then(res => {
|
||||
that.pushNum = res.data;
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
this.$axios.get("/gh-pull-request.json").then(res => {
|
||||
that.pullNum = res.data;
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
this.$axios.get("/github-licenses.json").then(res => {
|
||||
that.licensesNum = res.data;
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.initPage();
|
||||
|
@@ -210,7 +210,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.loginTime=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getUserTotal(){
|
||||
var that=this;
|
||||
@@ -223,7 +229,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.userTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getProjectTotal(){
|
||||
var that=this;
|
||||
@@ -236,7 +248,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.projectTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getArticleTotal(){
|
||||
var that=this;
|
||||
@@ -249,7 +267,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.ArticleTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getAdminTotal(){
|
||||
var that=this;
|
||||
@@ -262,7 +286,13 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.AdminTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getCommentTotal(){
|
||||
var that=this;
|
||||
@@ -275,9 +305,16 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.CommentTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
getCategoryTotal(){
|
||||
if (this.$cookie.get('adminName')){
|
||||
var that=this;
|
||||
axios({
|
||||
method: 'post',
|
||||
@@ -288,9 +325,20 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.CategoryTotal=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
getProjectByTime(){
|
||||
if(this.$cookie.get('adminName')){
|
||||
var that=this;
|
||||
axios({
|
||||
method: 'post',
|
||||
@@ -303,10 +351,17 @@ export default {
|
||||
|
||||
that.eChart2(that.date,'echart2');
|
||||
|
||||
|
||||
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
eChart2(Date,id){
|
||||
var myChart = echarts.init(document.getElementById(id));
|
||||
@@ -417,7 +472,13 @@ export default {
|
||||
that.echart_Pie(xData,yData,'echart1');
|
||||
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
echart_Pie(xData, yData, id) {
|
||||
var chartDom = document.getElementById(id);
|
||||
@@ -471,7 +532,7 @@ export default {
|
||||
series: [{
|
||||
name: '统计',
|
||||
type: 'pie',
|
||||
radius: ['25%', '65%'],
|
||||
radius: ['25%', '55%'],
|
||||
center: ['50%', '50%'],
|
||||
color: [
|
||||
'#2CEDED',
|
||||
@@ -496,7 +557,7 @@ export default {
|
||||
}, {
|
||||
name: '统计',
|
||||
type: 'pie',
|
||||
radius: ['25%', '65%'],
|
||||
radius: ['25%', '55%'],
|
||||
center: ['50%', '50%'],
|
||||
color: [
|
||||
'transparent',
|
||||
|
@@ -25,7 +25,7 @@
|
||||
style="width: 175px"
|
||||
></el-input>
|
||||
<!-- <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>
|
||||
@@ -65,7 +65,6 @@ export default {
|
||||
this.imageUrl = "http://localhost:8082/helloGithub_war_exploded/VerifycodeServlet?" + new Date().getTime();
|
||||
},
|
||||
submit(formName){
|
||||
console.log(this.login);
|
||||
var _this=this;
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -103,7 +102,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@@ -167,7 +167,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
@@ -202,7 +208,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
GetData(){
|
||||
@@ -214,6 +226,12 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.List = res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
// /selectAllArticleByadmin
|
||||
},
|
||||
@@ -315,15 +333,26 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
toDetailPage(row){
|
||||
if(row.articleId){
|
||||
this.$router.push({
|
||||
path:'/ArticleDetail',
|
||||
query: {
|
||||
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 {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
@@ -212,7 +218,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
GetData(){
|
||||
@@ -224,6 +236,12 @@ export default {
|
||||
}
|
||||
}).then(function(res){
|
||||
that.List = res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
// /selectAllArticleByadmin
|
||||
},
|
||||
@@ -296,7 +314,7 @@ export default {
|
||||
axios({
|
||||
method: 'post',
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateArticleByAdmin',
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/updateCategoryByAdmin',
|
||||
// URL 中的查询参数
|
||||
params: {
|
||||
articleId: this.form.categoryId,
|
||||
@@ -323,7 +341,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
addCategory(){
|
||||
var _this = this;
|
||||
@@ -357,8 +381,14 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -192,12 +192,17 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
toDetailPage(row){
|
||||
if (row.projectId){
|
||||
this.$router.push({
|
||||
path:'/ProjectDetail',
|
||||
query: {
|
||||
id: row.projectId,
|
||||
refresh: true
|
||||
}})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
editForm(){
|
||||
this.isEdit=false;
|
||||
@@ -237,7 +242,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
@@ -272,7 +283,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
closeDialog() {
|
||||
@@ -293,6 +310,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.dataTable=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
openDialog(){
|
||||
@@ -330,7 +353,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
handleDelete(index) {
|
||||
var that=this;
|
||||
|
@@ -224,7 +224,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
@@ -259,7 +265,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
GetData(){
|
||||
@@ -271,6 +283,12 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
that.List = res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
// /selectAllArticleByadmin
|
||||
},
|
||||
@@ -374,15 +392,26 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
toDetailPage(row){
|
||||
if(row.id){
|
||||
this.$router.push({
|
||||
path:'/oneFileDetail',
|
||||
query: {
|
||||
id: row.id,
|
||||
refresh: true
|
||||
}})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -240,12 +240,17 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
toDetailPage(row){
|
||||
if (row.projectId){
|
||||
this.$router.push({
|
||||
path:'/ProjectDetail',
|
||||
query: {
|
||||
id: row.projectId,
|
||||
refresh: true
|
||||
}})
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
handleChangeStatus($event, id){
|
||||
if ($event === 1) { // 这里判断一下
|
||||
@@ -282,7 +287,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
@@ -317,7 +328,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
editForm(){
|
||||
@@ -341,6 +358,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.dataTable=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
@@ -370,7 +393,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
openDialog(){
|
||||
this.dialogVisible=true;
|
||||
|
@@ -225,6 +225,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.dataTable=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
submit(){
|
||||
@@ -257,7 +263,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '提示',
|
||||
|
@@ -64,7 +64,7 @@
|
||||
label="头像"
|
||||
width="120">
|
||||
<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>
|
||||
</el-table-column>
|
||||
|
||||
@@ -229,7 +229,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
this.$confirm('确认禁用吗?', '操作确认', {
|
||||
@@ -264,7 +270,13 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
getAllUser(){
|
||||
@@ -278,6 +290,12 @@ export default {
|
||||
}
|
||||
}).then(function (res) {
|
||||
that.dataTable=res.data;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
resetForm(formName) {
|
||||
@@ -325,7 +343,13 @@ export default {
|
||||
offset: 50
|
||||
});
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
handleEdit(index) {
|
||||
@@ -365,7 +389,7 @@ export default {
|
||||
that.getAllUser();
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
// 点击取消:不删除了
|
||||
this.$message({
|
||||
|
@@ -64,6 +64,12 @@ export default {
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/deletesession',
|
||||
// URL 中的查询参数
|
||||
params: {}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
if (this.$cookie.get('username') === null) {
|
||||
Vue.prototype.$notify({
|
||||
@@ -95,6 +101,7 @@ export default {
|
||||
|
||||
},
|
||||
toUserPage() {
|
||||
if (this.$cookie.get('username')){
|
||||
this.$router.push({
|
||||
path: '/UserInfoPage',
|
||||
query: {
|
||||
@@ -102,6 +109,10 @@ export default {
|
||||
refresh: true
|
||||
}
|
||||
})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
getContributionValue() {
|
||||
var that = this;
|
||||
@@ -119,6 +130,12 @@ export default {
|
||||
that.ContributionValue = res.data;
|
||||
}
|
||||
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
@@ -136,6 +153,12 @@ export default {
|
||||
that.userLevel=res.data.userLevel;
|
||||
// that.imageUrl = res.data.userAvatar;
|
||||
// console.log(res);
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else{
|
||||
return;
|
||||
@@ -151,6 +174,12 @@ export default {
|
||||
params: {
|
||||
|
||||
}
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else{
|
||||
return;
|
||||
|
@@ -212,6 +212,12 @@ export default {
|
||||
that.userId=res.data.userId;
|
||||
// that.imageUrl=res.data.userAvatar;
|
||||
that.userLevel=res.data.userLevel;
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else {
|
||||
return false;
|
||||
@@ -235,6 +241,12 @@ export default {
|
||||
that.commentList=JSON.parse(res.data.comment);
|
||||
that.like=JSON.parse(res.data.like)
|
||||
that.article=JSON.parse(res.data.article);
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else {
|
||||
return false;
|
||||
@@ -248,6 +260,12 @@ export default {
|
||||
// 请求的地址
|
||||
url: 'http://localhost:8082/helloGithub_war_exploded/levelup',
|
||||
// URL 中的查询参数
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
}else{
|
||||
return;
|
||||
@@ -333,7 +351,13 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}).catch((error)=>{
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 50
|
||||
});
|
||||
});
|
||||
},
|
||||
// changeAvatarByLocal(){
|
||||
// var that=this;
|
||||
|
Reference in New Issue
Block a user