WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2024-02-20 3d261331e05d536a9724cb13a73adbab5577d8f7
forms/imagePicker/CImagePicker.vue
@@ -272,11 +272,22 @@
                        header,
                        name: 'file',
                        formData: { ...params },
                        timeout: 30 * 1000,
                        success(res) {
                            const res2 =
                                typeof res.data === 'string'
                                    ? JSON.parse(res.data)
                                    : res.data;
                            let res2;
                            try {
                                res2 =
                                    typeof res.data === 'string'
                                        ? JSON.parse(res.data)
                                        : res.data;
                            } catch (err) {
                                reject({
                                    ...requestFile,
                                    response: res,
                                    message: '上传图片异常!',
                                });
                                return;
                            }
                            // 上传成功
                            if (res2.state.code === 2000) {
                                const imgUrl = $fetchCommon.transImgPath(