判断不允许重复发请求
This commit is contained in:
@@ -210,25 +210,31 @@ export default {
|
||||
methods: {
|
||||
uploadIcon() {
|
||||
let $this = this;
|
||||
let file = $('#iconFile').val();
|
||||
if (file) {
|
||||
$('#iconUploadBtn').click(function () {
|
||||
uploadFile('iconFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.icon = res.path;
|
||||
$('#iconUploadInfo').val('上传成功');
|
||||
$('#iconUploadInfo').html('上传成功');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
uploadUrl() {
|
||||
let $this = this;
|
||||
let file = $('#urlFile').val();
|
||||
if (file) {
|
||||
$('#urlUploadBtn').click(function () {
|
||||
uploadFile('urlFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.url = res.path;
|
||||
$('#urlUploadInfo').val('上传成功');
|
||||
$('#urlUploadInfo').html('上传成功');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
getRule() {
|
||||
getResourceRuleList({
|
||||
|
@@ -175,14 +175,17 @@ export default {
|
||||
methods: {
|
||||
uploadUrl() {
|
||||
let $this = this;
|
||||
let file = $('#urlFile').val();
|
||||
if (file) {
|
||||
$('#urlUploadBtn').click(function () {
|
||||
uploadFile('urlFile').then(res => {
|
||||
if (res.path) {
|
||||
$this.resource.url = res.path;
|
||||
$('#urlUploadInfo').val('上传成功');
|
||||
$('#urlUploadInfo').html('上传成功');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
getRule() {
|
||||
getResourceRuleList({
|
||||
|
Reference in New Issue
Block a user