修復圖片上傳

This commit is contained in:
liaozetao
2023-11-20 11:19:50 +08:00
parent 091adb4093
commit 1fea5ed803
2 changed files with 5 additions and 3 deletions

View File

@@ -210,7 +210,8 @@ export default {
this.$nextTick(function () {
let $this = this;
$('#iconUploadBtn').click(function () {
uploadFile('icon').then(res => {
uploadFile('iconFile').then(res => {
console.log(res);
if (res.path) {
$this.resource.icon = res.path;
$('#iconUploadInfo').val('上传成功');
@@ -218,7 +219,8 @@ export default {
});
});
$('#urlUploadBtn').click(function () {
uploadFile('url').then(res => {
uploadFile('urlFile').then(res => {
console.log(res);
if (res.path) {
$this.resource.url = res.path;
$('#urlUploadInfo').val('上传成功');

View File

@@ -178,7 +178,7 @@ export default {
this.$nextTick(function () {
let $this = this;
$('#urlUploadBtn').click(function () {
uploadFile('url').then(res => {
uploadFile('urlFile').then(res => {
if (res.path) {
$this.resource.url = res.path;
$('#urlUploadInfo').val('上传成功');