This commit is contained in:
zhutao
2025-12-15 18:03:24 +08:00
parent 05f2882e93
commit 2421ff666a
8 changed files with 84 additions and 12 deletions

View File

@@ -9,6 +9,7 @@ import toast, {Toaster} from "react-hot-toast";
import wxShare from "@/wx/wxShare";
import {enterpriseAnalyzeApi} from "@/api/service";
import {useUserStore} from "@/store/user-store";
import {uploadFileQoi} from "@/utils/upload/upload";
export default function App() {
const userStore = useUserStore()
@@ -27,18 +28,23 @@ export default function App() {
* 上传文件
*/
const handleUpload = async (file) => {
handleNextScreen()
let res = await enterpriseAnalyzeApi({
analys_image: file,
analys_type: null,
}) as any
if (res.analysis_result.analyze_ret != "success") {
toast.error("请重新上传结构清晰的组织架构图")
setCurrentScreen(prev => prev = 2)
return
try {
handleNextScreen()
let fileUrl = await uploadFileQoi(file, "/analyze")
let res = await enterpriseAnalyzeApi({
analys_image: fileUrl,
analys_type: null,
}) as any
if (res.analysis_result.analyze_ret != "success") {
toast.error("请重新上传结构清晰的组织架构图")
setCurrentScreen(prev => prev = 2)
return
}
userStore.setAnalysis(res)
handleNextScreen()
} catch (e) {
setCurrentScreen((prev => prev = 2))
}
userStore.setAnalysis(res)
handleNextScreen()
};
const handlePayment = () => {