2025-12-19 09:46:56 +08:00
|
|
|
"use strict";
|
|
|
|
|
const common_vendor = require("../vendor.js");
|
|
|
|
|
function goto(url) {
|
|
|
|
|
common_vendor.index.navigateTo({ url, fail: () => common_vendor.index.switchTab({ url }) });
|
|
|
|
|
}
|
|
|
|
|
function showToastBack(label, delta = 1, back = true, backFun) {
|
|
|
|
|
common_vendor.index.showToast({
|
|
|
|
|
title: label || "提交成功!",
|
|
|
|
|
duration: 1e3,
|
|
|
|
|
icon: "none",
|
|
|
|
|
success() {
|
|
|
|
|
if (back) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
common_vendor.index.navigateBack({ delta });
|
|
|
|
|
}, 1e3);
|
|
|
|
|
} else {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
return backFun == null ? void 0 : backFun();
|
|
|
|
|
}, 1e3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2026-01-30 09:54:46 +08:00
|
|
|
function showToast(label, fun) {
|
2025-12-19 09:46:56 +08:00
|
|
|
common_vendor.index.showToast({
|
|
|
|
|
title: label || "提交成功!",
|
|
|
|
|
duration: 1e3,
|
2026-01-30 09:54:46 +08:00
|
|
|
icon: "none",
|
|
|
|
|
success() {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
return fun == null ? void 0 : fun(true);
|
|
|
|
|
}, 1e3);
|
|
|
|
|
}
|
2025-12-19 09:46:56 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.goto = goto;
|
|
|
|
|
exports.showToast = showToast;
|
|
|
|
|
exports.showToastBack = showToastBack;
|