Commit d07f6687 by zhangxw

fix(venus-usedcar-quality): 修改

1 parent b75b0c34
......@@ -262,7 +262,7 @@ function handleVehicleAction(isDraft = false) {
* 成功后的跳转逻辑
*/
function handleSuccessRedirect() {
if (pageQuery.value?.source === "3") {
if (pageQuery.value?.source === "3" || pageQuery.value?.source === "2") {
return backToMiniProgram();
}
// 否则返回上一页
......@@ -276,72 +276,6 @@ function onSaveDraft() {
handleVehicleAction(true);
}
// function onSubmit() {
// if (!validate()) return;
// setReportTrackData(0, "submitVehicle");
// const payload = buildSubmitPayload();
// if (pageQuery.value?.id) {
// showLoadingToast({ message: "加载中", forbidClick: true, duration: 0 });
// editSubmitVehicleDetail({ ...payload, sessionId: String(route.query.sessionId ?? ""), entryStatus: 1 } as any).then((res) => {
// closeToast();
// const { code, msg } = res as any;
// if (code != 0) {
// showToast(msg || "提交失败");
// return;
// }
// showToast("已提交车况");
// if (pageQuery.value?.source === "3") return backToMiniProgram();
// router.back();
// });
// } else {
// showLoadingToast({ message: "加载中", forbidClick: true, duration: 0 });
// submitVehicleDetail({ ...payload, sessionId: String(route.query.sessionId ?? ""), entryStatus: 1 } as any).then((res) => {
// closeToast();
// const { code, msg } = res as any;
// if (code == 0) {
// showToast("提交成功");
// if (pageQuery.value?.source === "3") return backToMiniProgram();
// router.back();
// } else {
// showToast(msg || "提交失败");
// }
// });
// }
// }
// function onSaveDraft() {
// const payload = buildSubmitPayload();
// setReportTrackData(0, "saveDraft");
// showLoadingToast({ message: "加载中", forbidClick: true, duration: 0 })
// if (pageQuery.value?.id) {
// showLoadingToast({ message: "加载中", forbidClick: true, duration: 0 });
// editSubmitVehicleDetail({ ...payload, sessionId: String(route.query.sessionId ?? ""), entryStatus: 0 } as any).then((res) => {
// closeToast();
// const { code, msg } = res as any;
// if (code != 0) {
// showToast(msg || "保存草稿失败");
// return;
// }
// showToast("已保存草稿");
// if (pageQuery.value?.source === "3") return backToMiniProgram();
// router.back();
// });
// } else {
// showLoadingToast({ message: "加载中", forbidClick: true, duration: 0 });
// submitVehicleDetail({ ...payload, sessionId: String(route.query.sessionId ?? ""), entryStatus: 0 } as any).then((res) => {
// closeToast();
// const { code, msg } = res as any;
// if (code == 0) {
// showToast("已保存草稿");
// if (pageQuery.value?.source === "3") return backToMiniProgram();
// router.back();
// } else {
// showToast(msg || "保存草稿失败");
// }
// });
// }
// }
async function copyToClipboard(text: string) {
try {
// @ts-ignore
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!