diff --git a/src/tools/apiTools copy.js b/src/tools/apiTools copy.js deleted file mode 100644 index f91d2556..00000000 --- a/src/tools/apiTools copy.js +++ /dev/null @@ -1,53 +0,0 @@ -import { - searchPendingOrderByObject, - searchPendingOrderByHash, -} from "@/assets/api.js"; -import { Sweetalert } from "zent"; -// === 公用接口函数 === - -/** - * - * @param { - * type值: 1key批次 2兑换码批次 3优惠券批次 4key码 - * object_value:兑换id - * } data - * @param {0批量作废--文件上传, 1批量作废--列表选中 2普通查询(默认)} apiType - * @returns 0用户取消作废。1订单下面没有待领取订单,直接作废。 2订单下面有待领取订单,弹窗告知用户是否继续。 - */ -const commonSearchOrder = (data, apiType = 2) => { - return new Promise(async (res, rej) => { - let res = null; - if (apiType === 1) { - } - - searchPendingOrderByObject(data).then((searchRes) => { - console.log("searchRes =>", searchRes); - if (searchRes.code === 200) { - if (searchRes.data.have === true) { - Sweetalert.confirm({ - type: "warning", - closeBtn: true, - title: "确认操作", - content: ( -

该key批次(key、兑换码),下面有待领取订单,是否继续作废 ?

- ), - onConfirm() { - res(2); - }, - onCancel() { - res(0); - }, - className: "questModal", - parentComponent: this, - }); - } else { - res(1); - } - } else { - rej(searchRes); - } - }); - }); -}; - -export { commonSearchOrder };