fix: 问题修复
This commit is contained in:
@@ -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 "-";
|
||||
}
|
||||
Reference in New Issue
Block a user