Commit 75354f8a authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent f8277b40
...@@ -3,6 +3,7 @@ import { _decorator, Button, Label, Node } from "cc"; ...@@ -3,6 +3,7 @@ import { _decorator, Button, Label, Node } from "cc";
import { sendWebNetWithToken, WebNetName } from "../Utils/WebNet/WebNet"; import { sendWebNetWithToken, WebNetName } from "../Utils/WebNet/WebNet";
import { showToast } from "../../Module/UIFast"; import { showToast } from "../../Module/UIFast";
import store from "../../store/store"; import store from "../../store/store";
import { _asyncThrottle } from "../Utils/Utils";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -37,12 +38,12 @@ export default class ToolBuyConfirmPanel extends Panel { ...@@ -37,12 +38,12 @@ export default class ToolBuyConfirmPanel extends Panel {
} }
/** 确认购买 */ /** 确认购买 */
async buyHandle() { buyHandle = _asyncThrottle(async () => {
const res = await sendWebNetWithToken(WebNetName.buyRichSp); const res = await sendWebNetWithToken(WebNetName.buyRichSp);
if (!res?.success) return; if (!res?.success) return;
showToast("购买成功~快去使用吧"); showToast("购买成功~快去使用吧");
this.hidePanel(); this.hidePanel();
} })
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment