feat: update material card
This commit is contained in:
@ -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({
|
||||
|
||||
Reference in New Issue
Block a user