update
This commit is contained in:
@@ -191,7 +191,7 @@ const generateImage = async (options) => {
|
||||
}, 1000)
|
||||
|
||||
const mergeFetch = async (index)=> {
|
||||
const statusRes = await Request(`face/merge/${mergeData.merge_id}/status`, {}, 'GET', false)
|
||||
const statusRes = await Request(`face/merge/${mergeData.merge_id}/status`, {}, 'GET', true)
|
||||
|
||||
if (statusRes.res.status === 200) {
|
||||
if (statusRes.json.status === 'success') {
|
||||
@@ -334,6 +334,7 @@ const imagePosition = (index) => {
|
||||
|
||||
// 自定义上传方法
|
||||
const customUpload = async (options) => {
|
||||
const loading = weui.loading()
|
||||
const { file, data, onProgress, onSuccess, onError } = options
|
||||
|
||||
try {
|
||||
@@ -350,13 +351,16 @@ const customUpload = async (options) => {
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log('Success:', data);
|
||||
onSuccess(data);
|
||||
loading.hide();
|
||||
console.log('Success:', data);
|
||||
onSuccess(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
loading.hide();
|
||||
console.error('Error:', error);
|
||||
});
|
||||
} catch (error) {
|
||||
loading.hide();
|
||||
onError(error)
|
||||
throw error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user