|
@@ -43,7 +43,7 @@ function generateURL(file) {
|
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
|
formData.append('file', file);
|
|
formData.append('file', file);
|
|
|
uploadImage(formData).then(res => {
|
|
uploadImage(formData).then(res => {
|
|
|
- logoUrl = res.result;
|
|
|
|
|
|
|
+ logoUrl.value = res.result;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
let fileSrc = URL.createObjectURL(file);
|
|
let fileSrc = URL.createObjectURL(file);
|
|
@@ -67,7 +67,7 @@ function handleCreateStore() {
|
|
|
const payload = {
|
|
const payload = {
|
|
|
name: name.value,
|
|
name: name.value,
|
|
|
location: location.value,
|
|
location: location.value,
|
|
|
- logoUrl: logoUrl
|
|
|
|
|
|
|
+ logoUrl: logoUrl.value
|
|
|
};
|
|
};
|
|
|
createStore(payload).then(res => {
|
|
createStore(payload).then(res => {
|
|
|
console.log(res);
|
|
console.log(res);
|
|
@@ -77,6 +77,10 @@ function handleCreateStore() {
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
center: true,
|
|
center: true,
|
|
|
})
|
|
})
|
|
|
|
|
+ name.value = '';
|
|
|
|
|
+ location.value = '';
|
|
|
|
|
+ logoUrl.value = '';
|
|
|
|
|
+ files.value.splice(i, 1);
|
|
|
} else if (res.code === '400') {
|
|
} else if (res.code === '400') {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
message: res.msg,
|