This commit is contained in:
yixu
2025-09-15 16:51:19 +08:00
parent 4c8051e45c
commit c158f92829
4 changed files with 38 additions and 11 deletions

View File

@@ -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
}