fix: 问题修复

This commit is contained in:
2025-11-15 19:08:19 +08:00
parent 93f08d5a9f
commit 79b2e9869f
24 changed files with 872 additions and 529 deletions

View File

@@ -23,4 +23,35 @@ export const sceneRedirectLogic = (options, defaultPage: string) => {
} catch (e) {
console.error(e);
}
};
};
export function navto(url) {
Taro.navigateTo({
url: url,
});
}
export function toast(message) {
Taro.showToast({ title: message, icon: "none" });
}
// 将·作为连接符插入到标签文本之间
export function insertDotInTags(tags: string[]) {
if (!tags) return [];
return tags.join("-·-").split("-");
}
function formatNtrpDisplay(val) {
return Number(val).toFixed(1)
}
export function genNTRPRequirementText(min, max) {
if (min && max && min !== max) {
return `${formatNtrpDisplay(min)} - ${formatNtrpDisplay(max)} 之间`;
} else if (max === "1") {
return "无要求";
} else if (max) {
return `${formatNtrpDisplay(max)} 以上`;
}
return "-";
}