|
@@ -12,7 +12,7 @@ import NavBarPage from "../components/NavBarPage.vue";
|
|
|
import randarPage from "./result/randarPage.vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import { fetchTaskScore } from "./utils/api";
|
|
|
-import { Toast } from "vant";
|
|
|
+import { showToast } from 'vant';
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
@@ -45,8 +45,10 @@ const handleResult = async () => {
|
|
|
|
|
|
if (res.code !== 200) {
|
|
|
// 当返回错误时,停止调用接口
|
|
|
+ console.log(res);
|
|
|
loading.value = false
|
|
|
shouldContinue = false;
|
|
|
+ showToast(res.message);
|
|
|
} else if (res.body && Object.keys(res.body).length !== 0) {
|
|
|
// 当res.body有值时,停止调用接口
|
|
|
data.value = res.body;
|