30 lines
736 B
JavaScript
Raw Normal View History

2025-07-15 16:18:34 +08:00
"use strict";
const common_vendor = require("../vendor.js");
function goto(url) {
common_vendor.index.navigateTo({ url, fail: () => common_vendor.index.switchTab({ url }) });
}
2025-07-15 18:34:34 +08:00
function showToastBack(label, delta = 1, back = true) {
common_vendor.index.showToast({
title: label || "提交成功!",
duration: 1e3,
icon: "none",
success() {
if (back) {
setTimeout(() => {
common_vendor.index.navigateBack({ delta });
}, 1e3);
}
}
});
}
2025-07-16 09:35:59 +08:00
function showToast(label) {
common_vendor.index.showToast({
title: label || "提交成功!",
duration: 1e3,
icon: "none"
});
}
2025-07-15 16:18:34 +08:00
exports.goto = goto;
2025-07-16 09:35:59 +08:00
exports.showToast = showToast;
2025-07-15 18:34:34 +08:00
exports.showToastBack = showToastBack;