fix
This commit is contained in:
@@ -24,18 +24,22 @@ const confirmBtn = () => {
|
||||
},
|
||||
body: {}
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.message === '您已经有一张发布的照片,不能再次发布') {
|
||||
weui.alert('您已经有一张发布的照片,不能再次发布')
|
||||
return
|
||||
.then(async response => {
|
||||
const data = await response.json()
|
||||
if (response.status == 200 || response.status == 201) {
|
||||
if (data.message === '您已经有一张发布的照片,不能再次发布') {
|
||||
weui.alert('您已经有一张发布的照片,不能再次发布')
|
||||
return
|
||||
}
|
||||
ElMessage.success('打榜成功!');
|
||||
console.log('Success:', data);
|
||||
return { success: true, data };
|
||||
} else {
|
||||
ElMessage.error(data.message);
|
||||
}
|
||||
ElMessage.success('打榜成功!');
|
||||
console.log('Success:', data);
|
||||
return { success: true, data };
|
||||
})
|
||||
.catch((error) => {
|
||||
ElMessage.success('打榜失败!');
|
||||
ElMessage.error('打榜失败!');
|
||||
return { success: false, error };
|
||||
});
|
||||
emit('update:show', false);
|
||||
|
||||
Reference in New Issue
Block a user