后台管理框架搭建

This commit is contained in:
2023-07-09 19:05:48 +08:00
parent 42f2f6d503
commit 02b58972d6
23 changed files with 1001 additions and 99 deletions

View File

@@ -123,7 +123,7 @@
multiple>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">只能上传jpg/png文件且不超过500kb</div>
<div class="el-upload__tip" slot="tip">只能上传zip文件且不超过50mb</div>
</el-upload>
</div>
@@ -204,7 +204,6 @@ export default {
name: null,
tags: [],
tag: [],
fileList: [],
content: null,
},
rules: {
@@ -320,44 +319,54 @@ export default {
closeUploadFile(){
this.openPublishProject=false;
this.openUploadFile=false;
window.location.reload();
},
submitProject(){
if (this.form.tag) {
this.form.tag = this.form.tag.join(",");
if(this.avatar_url===null||this.form.name===null|| this.form.url===null||this.form.title===null||this.form.content===null||this.form.tag.length===0){
Vue.prototype.$notify.error({
title: '错误',
message: "请先填写相关信息!",
offset: 50
});
}else {
if (this.form.tag) {
this.form.tag = this.form.tag.join(",");
}
Object.assign({}, this.form);
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/commitProject',
// URL 中的查询参数
params: {
projectIco:this.avatar_url,
projectName:this.form.name,
projectUrl:this.form.url,
projectTitle:this.form.title,
projectDescription:this.form.content,
categoryIdList:this.form.tag
}
}).then( (res)=> {
if(res.data.code===200){
Vue.prototype.$notify({
title: '成功',
message: ('i', {style: 'color: teal'}, res.data.msg),
type: 'success',
offset: 50
});
this.openPublishProject=false;
that.openUploadFile=true
}else{
Vue.prototype.$notify.error({
title: '错误',
message: res.data.msg,
offset: 50
});
}
});
}
Object.assign({}, this.form);
var that=this;
axios({
method: 'post',
// 请求的地址
url: 'http://localhost:8082/helloGithub_war_exploded/commitProject',
// URL 中的查询参数
params: {
projectIco:this.avatar_url,
projectName:this.form.name,
projectUrl:this.form.url,
projectTitle:this.form.title,
projectDescription:this.form.content,
categoryIdList:this.form.tag
}
}).then( (res)=> {
if(res.data.code===200){
Vue.prototype.$notify({
title: '成功',
message: ('i', {style: 'color: teal'}, res.data.msg),
type: 'success',
offset: 50
});
this.openPublishProject=false;
that.openUploadFile=true
}else{
Vue.prototype.$notify.error({
title: '错误',
message: res.data.msg,
offset: 50
});
}
});
},
isExist(){
axios({