Merge branch 'trunk' into feat/share-coupon

This commit is contained in:
chashaobao
2025-09-14 21:38:42 +08:00
5 changed files with 97 additions and 74 deletions

View File

@ -62,6 +62,28 @@ export const getBasicInfo = (profile: Pick<MaterialProfile, 'age' | 'height' | '
return result.join('·');
};
export const getSalary = (
data: Pick<MaterialProfile, 'fullTimeMaxPrice' | 'fullTimeMinPrice' | 'partyTimeMaxPrice' | 'partyTimeMinPrice'>
) => {
const { fullTimeMinPrice, fullTimeMaxPrice, partyTimeMinPrice, partyTimeMaxPrice } = data;
const prices: string[] = [];
if (fullTimeMinPrice && fullTimeMaxPrice) {
if (fullTimeMinPrice >= 50000) {
prices.push(`${fullTimeMinPrice / 1000}K以上/月`);
} else {
prices.push(`${fullTimeMinPrice / 1000}-${fullTimeMaxPrice / 1000}K/月`);
}
}
if (partyTimeMinPrice && partyTimeMaxPrice) {
if (partyTimeMinPrice >= 500) {
prices.push(`500以上/小时`);
} else {
prices.push(`${partyTimeMinPrice}-${partyTimeMaxPrice}/小时`);
}
}
return prices.filter(Boolean).join(' ');
};
export const chooseMedia = async (option: Taro.chooseMedia.Option = {}) => {
try {
const result = await Taro.chooseMedia({