Compare commits
11 Commits
feature/jo
...
b8b33841d4
| Author | SHA1 | Date | |
|---|---|---|---|
| b8b33841d4 | |||
| 828e9b7512 | |||
| 1d8a0d7a33 | |||
| 8e42fef4f7 | |||
| 6f7e78896a | |||
| b9cd0a3e6d | |||
| f2e7fd9d85 | |||
| 285db3f445 | |||
| 763a6245d2 | |||
| 2cb532c3d7 | |||
| 6a2c94c7cf |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
dist/
|
||||
dist-dev/
|
||||
deploy_versions/
|
||||
.temp/
|
||||
.rn_temp/
|
||||
|
||||
@ -12,6 +12,20 @@ const MockPlugin: PluginItem = [
|
||||
}
|
||||
];
|
||||
|
||||
const CIPluginOpt = () => {
|
||||
const brand = process.env.BRAND as 'prod' | 'dev'; // 取环境变量
|
||||
const map = {
|
||||
prod: { appid: 'wxf0724a83f8e377d2', privateKeyPath: 'keys/private.wxf0724a83f8e377d2.key' },
|
||||
dev: { appid: 'wx2d56597fd541f1a6', privateKeyPath: 'keys/private.wx2d56597fd541f1a6.key' },
|
||||
};
|
||||
return {
|
||||
weapp: map[brand] || map.prod,
|
||||
version: process.env.VERSION || '1.0.0',
|
||||
desc: `build for ${brand}`,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
||||
export default defineConfig(async (merge, _env: ConfigEnv) => {
|
||||
const baseConfig: UserConfigExport = {
|
||||
@ -25,13 +39,15 @@ export default defineConfig(async (merge, _env: ConfigEnv) => {
|
||||
828: 1.81 / 2
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
plugins: ['@tarojs/plugin-html'],
|
||||
outputRoot: process.env.OUTPUT_ROOT || 'dist',
|
||||
plugins: [['@tarojs/plugin-mini-ci', CIPluginOpt()], '@tarojs/plugin-html'],
|
||||
// plugins: ['@tarojs/plugin-html', MockPlugin],
|
||||
defineConstants: {
|
||||
'process.env.BRAND': JSON.stringify(process.env.BRAND),
|
||||
},
|
||||
copy: {
|
||||
patterns: [
|
||||
{from: 'project.config.dev.json',to: 'dist-dev/project.config.json'},
|
||||
],
|
||||
options: {
|
||||
}
|
||||
|
||||
27
keys/private.wx2d56597fd541f1a6.key
Normal file
27
keys/private.wx2d56597fd541f1a6.key
Normal file
@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEowIBAAKCAQEArjidDs/HGidBTzyOssyhX/Yvlr+BZxO3Qqe1iFBIJYWVXwiJ
|
||||
KFVZw14rPKnh6ORB9qpMq3+fYJ7VsodmobnVlTaFXxJ8yi+tVZSZyZPtHabu2JVO
|
||||
qu7LX709p5NTFcrmOY6+NJA827+hg6V0Nl3b4CWLsouPHgiIxpqnLeaOka3lbPMq
|
||||
vQuDeMCbQNFe5Jz7C0gc6dXwEpDExNX4WiVfi4UP5bcYiUKlbdben5i6qbFrZ4QK
|
||||
woYoAIhr60jQGfB6Jg7YkbbAyh42XR3BMkf2TPQqieZM1/IKNuw2evtA2BqLJuiz
|
||||
cQ1qNBBXczbJv9KjBVAzAJgT4InUyJF+QfFJ6wIDAQABAoIBAQCf2kohIPvqP0Jp
|
||||
VYMJA0C+L8CSbLxqu2hWvFKP9Dl+VAct30MZwtZNr8W0L5uceHMdxDv8z2iI2rPw
|
||||
ztOYaE5UTmYpSWk+imhcMbC5iAT0RAq6pqQ7qkboXVaIv2BoinabMSHMUNvGNRoZ
|
||||
FGKAz7XDADAhbnOudt4ofBYQw47kkko8vaDZBJS6UGN+QVJpyBtJKohaXKC6HRva
|
||||
2c8zDwVZlKMrPl4WB4cg0+WPv6vUZymv8U7flwY0xJBBWwZUxqbmjqbTg8BGb5Mu
|
||||
tpIZRvTGNxbDu9Ms7mdYdGGe/PFmqgj1hOomeXvBlnYz+fmWHu5ElyPGBHD92N7x
|
||||
Hdcopp4BAoGBANqQUfxzjGcBvSSSowehSvgVCnUFsTxSE8c9HQRX4LtMnLCo6c6m
|
||||
Hxf+l67FyY5704EW29PLu5ETdLBm6pCaIk8aJo467l8M9BOHmE/CwNciloHxXa4h
|
||||
/gUKex6EsFJoT+1gaCaDJeu0gDJl49QnpYOrma2CZ8vyG3+NCotuYturAoGBAMwP
|
||||
8G2ObLZUFPZAfhGZrobUom2dCtJXenYupxSvJ/rNd7zY+F3pcyi461eMIkKFaxQX
|
||||
bRyDi/LRCQRKrSDuw3Dt4Ne9gkpdlI/LUDTUUbWdDuCXxfsXSRAYHC1ae0rsiGQv
|
||||
PaTotkDSjdAIKdgd0bmeufFZ2Ozmid2lHzSZfwrBAoGAQXSVSSClvLeVmJ1du8w/
|
||||
MnrCrfctdB40lCemSAW1ZQJ1rqZ3lw7DIyF49buAOG63EeLxpMVQAAuul6HKv9GZ
|
||||
Us1HHLNjbg3oDu093S07KXLPVk0dvCer9oCEDMi6MYPR5ApKRrZiJevhtLY0+/V/
|
||||
qSY8GO2D/l0chR+NN+KwMo8CgYB4Y07s04G/b4uOXC4EJC6azQems2eXAJT29D8O
|
||||
LOfhRybE+xxMC1YtSCtP0xTDOgMaL1fn4pPGBRzUs1nAfBxBm5VyshMT3HGxA7ml
|
||||
8TzjcG0+g0wB/pLUM+UrvJ3QbgtpT5WGnOQpCg8wFCDbp3v7jnEUunUIDlp3sNrg
|
||||
JU6WAQKBgDjcfRDtnmSxSiejsZaZM7gCAYlZq6WBuvQ6WF+nD9mzEgzkw3F+1cHC
|
||||
Y905VPGb/vCPAV+JdN7LxnMn2G3JoWPqrhOIT6KgPgAYbVAq1hmLqXMjGi53n9uY
|
||||
39GL4UgJkywIdEkla/8zNFNKZgQulWPDJqb/MFcVo3/VegEfwdbk
|
||||
-----END RSA PRIVATE KEY-----
|
||||
27
keys/private.wxf0724a83f8e377d2.key
Normal file
27
keys/private.wxf0724a83f8e377d2.key
Normal file
@ -0,0 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEA1Tl6FYIIWB8b+OjYY9s6cOJf71Vn0J/u/kdq5CH/LMOdNrUh
|
||||
fq3shAwdDkXmuRIpHU7Noxisu71tB2EumigIwBDRVyrdwPu/p6QWyaMgrh0bdtaC
|
||||
LKW/j2teNU1MCSWyCDyEeZ9PJteK5+ieX+ZPDg17HLV2dISpB71AGyM461DIHCAV
|
||||
uaanUJ4MYCtp9t7OFgrD4dNzDMH0lBJBczRQAmnit0GpJD/y2rfgtL+HaKpDN8rc
|
||||
w80+3HVfhKq3niy/vBbI6alqFb1Mh9O5q6/c1tEWQKPn3TzneGIDhMupGzHEzrVR
|
||||
j87+1cyYi8PtBdNMPls+zPn7MoajjrASFyo1hQIDAQABAoIBABHu652zehAvTaL5
|
||||
snlzjs6/u2HdxQV+7hLk3tChK10QdsCLK24EIshYXHk+19Do/hxA7HqzMJP5spnU
|
||||
Sp8cjt/YikLSkCQTCGOJIYGD/tOmDxFHqVsn9ZySYzIIdkSurvKSZHH2PCoAJuaq
|
||||
Yeee7zc3WwtnF7dlEPJdsG6X38mqslzaLOuiftkHJ8hQ+1rWM9FFEp/S3pLfLB+7
|
||||
jEQhuVk0WjLTqmWmKvi0Nz5tUibBpF1OHtCfIhPjb1N8k/bcv1jumETx+2PDxA62
|
||||
zpPNGespBaET+jeEqNCqLO7Zq8+iUO8d4XpZsFCR2cyE6zzXK2mhQ+2pW2BRU/DI
|
||||
w/ZylmECgYEA6uPRJ4uk+NavoJlQCv7R9B8CGbwzbRaG8sg/NuwvTOO6D4FGUdcu
|
||||
f8qA2kCd8bSCuWrS1mVgPpvzwHt5Bh3k7FC/0SfW5ZDC5Lp1IssI0jeka39vfPOD
|
||||
ZdcvgJ3dUnHUrvb4L4PclgCa3KPXLTVDnK+4ExvaYOxNAaG6wROCGBsCgYEA6GMy
|
||||
nCsPr21kKmhybCrhcTYoENb45hz6CCnXr4MGnYzF9c2ss2KXjR/boCdhF+3wxmmm
|
||||
F4TKgcicOUfOJIXSIHBD9nphLa5CfrksLxfX0iIyNCG74aXIWl6M6QgQZdWqV4qC
|
||||
xYTtFYACELIb8qK/mraMP28c9BzDpwd909ZlAt8CgYEAmpXCIa+CrA3GWgBsMEBR
|
||||
9sKthDha8/E+cOuexsubuZOp8OhYWiYuwQWJ1ZlvGRJ+cf6+sUDYnXvPaJ8aIA9u
|
||||
iKQACWuZv02NJjEcRACxVoAuIl0lB2vPzydWaOP8M3UczuVUoxi6BLJzOMBPLb5/
|
||||
N9BhaZoMF3uMloVUvhrTpH8CgYA9sQfgeXYChjHPKEcn/AI5Qb1FKyyMOikOPb1q
|
||||
dIgvDw4GgQFV5diBuHFfhNS7u4jtw2I6YCA6b/05H5zUCUqNHgCM0FQ4AkjYx2O5
|
||||
ZMUAnd9iA4qTDqWvh+Y0ftWLkztTXgv1T6J40LC7qezNbvMaqVd2B5NSIsi18MEw
|
||||
mXvbVQKBgQC0Rh5TJEfeBWRoIixwFuDUgHYRsdk3SV1hymYO3aKBr0uD8Arv4v1M
|
||||
XO6DchFjcpKuwScjXX5yEot5PJOUTPG2T2uBPnJggtNig2dnRzQDLM+bK0vVecoz
|
||||
QL9YMOYv6DNH6Z2yEfMZHZLto9Oaqm9J62hZahZ2GukFLOMBGZAVhA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
31
package.json
31
package.json
@ -10,29 +10,10 @@
|
||||
"framework": "React"
|
||||
},
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
"build:h5": "taro build --type h5",
|
||||
"build:rn": "taro build --type rn",
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:jd": "taro build --type jd",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"build:harmony-hybrid": "taro build --type harmony-hybrid",
|
||||
"dev:weapp": "npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:jd": "npm run build:jd -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch",
|
||||
"test": "jest",
|
||||
"lint:format": "npx prettier --write",
|
||||
"lint:format-all": "npx prettier --write 'src/**/*.{ts,js,css,jsx,html,vue,tsx}'"
|
||||
"build:weapp": "BRAND=prod taro build --type weapp",
|
||||
"build:dev:weapp": "BRAND=dev OUTPUT_ROOT=dist-dev taro build --type weapp --upload",
|
||||
"dev:weapp": "BRAND=prod npm run build:weapp -- --watch",
|
||||
"dev:dev:weapp": "BRAND=dev OUTPUT_ROOT=dist-dev taro build --type weapp --watch"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 3 versions",
|
||||
@ -76,6 +57,7 @@
|
||||
"@babel/core": "^7.8.0",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
|
||||
"@tarojs/cli": "4.0.9",
|
||||
"@tarojs/plugin-mini-ci": "^4.1.5",
|
||||
"@tarojs/plugin-mock": "^0.0.9",
|
||||
"@tarojs/taro-loader": "4.0.9",
|
||||
"@tarojs/test-utils-react": "^0.1.1",
|
||||
@ -95,6 +77,7 @@
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"jest": "^29.3.1",
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
"miniprogram-ci": "^2.1.14",
|
||||
"postcss": "^8.4.18",
|
||||
"prettier": "^3.3.1",
|
||||
"react-refresh": "^0.11.0",
|
||||
@ -110,5 +93,5 @@
|
||||
"@tarojs/binding"
|
||||
]
|
||||
},
|
||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||
"packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184"
|
||||
}
|
||||
|
||||
5985
pnpm-lock.yaml
generated
5985
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
47
project.config.dev.json
Normal file
47
project.config.dev.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"miniprogramRoot": "./",
|
||||
"description": "boluo app",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": false,
|
||||
"enhance": false,
|
||||
"compileHotReLoad": false,
|
||||
"postcss": false,
|
||||
"minified": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"coverView": false,
|
||||
"showShadowRootInWxmlPanel": false,
|
||||
"packNpmRelationList": [],
|
||||
"ignoreUploadUnusedFiles": true,
|
||||
"compileWorklet": false,
|
||||
"uglifyFileName": false,
|
||||
"uploadWithSourceMap": true,
|
||||
"packNpmManually": false,
|
||||
"minifyWXSS": true,
|
||||
"minifyWXML": true,
|
||||
"localPlugins": false,
|
||||
"disableUseStrict": false,
|
||||
"useCompilerPlugins": false,
|
||||
"condition": false,
|
||||
"swc": false,
|
||||
"disableSWC": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"srcMiniprogramRoot": "dist/",
|
||||
"condition": {},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
},
|
||||
"libVersion": "3.4.6",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"appid": "wx2d56597fd541f1a6",
|
||||
"simulatorPluginLibVersion": {}
|
||||
}
|
||||
@ -9,7 +9,7 @@ import { PageUrl } from '@/constants/app';
|
||||
import { MaterialViewSource, WORK_YEAR_LABELS } from '@/constants/material';
|
||||
import { AnchorInfo } from '@/types/material';
|
||||
import { calcDistance } from '@/utils/location';
|
||||
import { getBasicInfo } from '@/utils/material';
|
||||
import { getBasicInfo, getSalary } from '@/utils/material';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
import { activeDate } from '@/utils/time';
|
||||
|
||||
@ -22,17 +22,6 @@ interface IProps {
|
||||
}
|
||||
|
||||
const PREFIX = 'anchor-card';
|
||||
const getSalary = (data: AnchorInfo) => {
|
||||
const { fullTimeMinPrice, fullTimeMaxPrice, partyTimeMinPrice, partyTimeMaxPrice } = data;
|
||||
const prices: string[] = [];
|
||||
if (fullTimeMinPrice && fullTimeMaxPrice) {
|
||||
prices.push(`${fullTimeMinPrice / 1000}-${fullTimeMaxPrice / 1000}K/月`);
|
||||
}
|
||||
if (partyTimeMinPrice && partyTimeMaxPrice) {
|
||||
prices.push(`${partyTimeMinPrice}-${partyTimeMaxPrice}/小时`);
|
||||
}
|
||||
return prices.filter(Boolean).join(' ');
|
||||
};
|
||||
|
||||
function AnchorCard(props: IProps) {
|
||||
const { data, jobId, validator } = props;
|
||||
|
||||
@ -5,34 +5,19 @@ import { isEqual } from 'lodash-es';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import PickerToolbar from '@/components/picker-toolbar';
|
||||
import {
|
||||
EmployType,
|
||||
ALL_EMPLOY_TYPES,
|
||||
FULL_PRICE_OPTIONS,
|
||||
PART_PRICE_OPTIONS,
|
||||
EMPLOY_TYPE_TITLE_MAP,
|
||||
} from '@/constants/job';
|
||||
import {
|
||||
ALL_ANCHOR_READ_TYPES,
|
||||
ALL_GENDER_TYPES,
|
||||
ANCHOR_READ_TITLE_MAP,
|
||||
AnchorReadType,
|
||||
GENDER_TYPE_TITLE_MAP,
|
||||
GenderType,
|
||||
} from '@/constants/material';
|
||||
import { FULL_PRICE_OPTIONS, PART_PRICE_OPTIONS } from '@/constants/job';
|
||||
import { ALL_ANCHOR_READ_TYPES, ANCHOR_READ_TITLE_MAP, AnchorReadType } from '@/constants/material';
|
||||
import { IAnchorFilters } from '@/types/material';
|
||||
import { isUndefined } from '@/utils/common';
|
||||
|
||||
import './index.less';
|
||||
|
||||
type MoreFilter = Omit<IAnchorFilters, 'employType' | 'gender'>;
|
||||
interface IProps {
|
||||
value: IAnchorFilters;
|
||||
onConfirm: (newValue: IAnchorFilters) => void;
|
||||
value: MoreFilter;
|
||||
onConfirm: (newValue: MoreFilter) => void;
|
||||
}
|
||||
|
||||
const PREFIX = 'anchor-picker';
|
||||
const getDefaultGender = (value: IAnchorFilters) => value.gender;
|
||||
const getDefaultEmploy = (value: IAnchorFilters) => value.employType;
|
||||
const getDefaultReadType = (value: IAnchorFilters) => value.readType;
|
||||
const getDefaultCategory = (value: IAnchorFilters) => value.category || '';
|
||||
const getSalaryValue = (value: IAnchorFilters, full: boolean) => {
|
||||
@ -47,9 +32,7 @@ const getSalaryValue = (value: IAnchorFilters, full: boolean) => {
|
||||
|
||||
function AnchorPicker(props: IProps) {
|
||||
const { value, onConfirm } = props;
|
||||
const [gender, setGender] = useState<GenderType | undefined>(getDefaultGender(value));
|
||||
const [readType, setReadType] = useState<AnchorReadType | undefined>(getDefaultReadType(value));
|
||||
const [employType, setEmployType] = useState<EmployType | undefined>(getDefaultEmploy(value));
|
||||
const [fullSalary, setFullSalary] = useState(getSalaryValue(value, true));
|
||||
const [partSalary, setPartSalary] = useState(getSalaryValue(value, false));
|
||||
const [category, setCategory] = useState(getDefaultCategory(value));
|
||||
@ -59,9 +42,7 @@ function AnchorPicker(props: IProps) {
|
||||
}, []);
|
||||
|
||||
const handleClickReset = useCallback(() => {
|
||||
setGender(undefined);
|
||||
setReadType(undefined);
|
||||
setEmployType(undefined);
|
||||
setFullSalary(null);
|
||||
setPartSalary(null);
|
||||
setCategory('');
|
||||
@ -83,10 +64,6 @@ function AnchorPicker(props: IProps) {
|
||||
|
||||
const handleClickConfirm = useCallback(() => {
|
||||
const filters: IAnchorFilters = {};
|
||||
if (!isUndefined(gender)) {
|
||||
filters.gender = gender === GenderType.All ? undefined : gender;
|
||||
}
|
||||
employType && (filters.employType = employType);
|
||||
readType && (filters.readType = readType);
|
||||
category && (filters.category = category);
|
||||
if (fullSalary) {
|
||||
@ -98,34 +75,10 @@ function AnchorPicker(props: IProps) {
|
||||
filters.highPriceForPartyTime = partSalary.maxSalary;
|
||||
}
|
||||
onConfirm(filters);
|
||||
}, [gender, employType, readType, category, fullSalary, partSalary, onConfirm]);
|
||||
}, [readType, category, fullSalary, partSalary, onConfirm]);
|
||||
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<div className={`${PREFIX}__title`}>性别</div>
|
||||
<div className={`${PREFIX}__container`}>
|
||||
{ALL_GENDER_TYPES.map((type: GenderType) => (
|
||||
<div
|
||||
key={type}
|
||||
onClick={() => setGender(type)}
|
||||
className={classNames(`${PREFIX}__item`, { selected: type === gender })}
|
||||
>
|
||||
{GENDER_TYPE_TITLE_MAP[type]}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className={`${PREFIX}__title`}>全职/兼职</div>
|
||||
<div className={`${PREFIX}__container`}>
|
||||
{ALL_EMPLOY_TYPES.map(type => (
|
||||
<div
|
||||
key={type}
|
||||
onClick={() => setEmployType(type)}
|
||||
className={classNames(`${PREFIX}__item`, { selected: type === employType })}
|
||||
>
|
||||
{EMPLOY_TYPE_TITLE_MAP[type]}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className={`${PREFIX}__title`}>已读/未读</div>
|
||||
<div className={`${PREFIX}__container`}>
|
||||
{ALL_ANCHOR_READ_TYPES.map(type => (
|
||||
|
||||
13
src/components/gender-select/index.tsx
Normal file
13
src/components/gender-select/index.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import Select, { ISelectProps } from '@/components/select';
|
||||
import { GENDER_OPTIONS, GenderType } from '@/constants/material';
|
||||
|
||||
interface IProps extends Omit<ISelectProps<GenderType>, 'options'> {
|
||||
value: GenderType;
|
||||
}
|
||||
|
||||
function GenderSelect(props: IProps) {
|
||||
const { value: selectValue, onSelect } = props;
|
||||
return <Select options={GENDER_OPTIONS} title="性别" value={selectValue} onSelect={onSelect} />;
|
||||
}
|
||||
|
||||
export default GenderSelect;
|
||||
@ -11,6 +11,16 @@
|
||||
border-radius: 16px;
|
||||
background: #FFFFFF;
|
||||
margin-bottom: 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&__mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
&__header {
|
||||
|
||||
@ -5,11 +5,11 @@ import React, { useCallback } from 'react';
|
||||
|
||||
import { CertificationStatusIcon } from '@/components/certification-status';
|
||||
import { PageUrl } from '@/constants/app';
|
||||
import { CITY_CODE_TO_NAME_MAP, COUNTY_CODE_TO_NAME_MAP } from '@/constants/city';
|
||||
// import { CITY_CODE_TO_NAME_MAP, COUNTY_CODE_TO_NAME_MAP } from '@/constants/city';
|
||||
import { CertificationStatusType } from '@/constants/company';
|
||||
import { EMPLOY_TYPE_TITLE_MAP, EmployType } from '@/constants/job';
|
||||
import { JobInfo } from '@/types/job';
|
||||
import { LocationInfo } from '@/types/location';
|
||||
// import { LocationInfo } from '@/types/location';
|
||||
import { getJobSalary, getJobTitle } from '@/utils/job';
|
||||
import { calcDistance } from '@/utils/location';
|
||||
import { navigateTo, redirectTo } from '@/utils/route';
|
||||
@ -23,16 +23,16 @@ interface IProps {
|
||||
}
|
||||
|
||||
const PREFIX = 'job-card';
|
||||
const getCityDes = (location: LocationInfo) => {
|
||||
if (!location) {
|
||||
return '';
|
||||
}
|
||||
let des = CITY_CODE_TO_NAME_MAP.get(location.cityCode);
|
||||
if (location.countyCode) {
|
||||
des += `-${COUNTY_CODE_TO_NAME_MAP.get(location.countyCode)}`;
|
||||
}
|
||||
return des;
|
||||
};
|
||||
// const getCityDes = (location: LocationInfo) => {
|
||||
// if (!location) {
|
||||
// return '';
|
||||
// }
|
||||
// let des = CITY_CODE_TO_NAME_MAP.get(location.cityCode);
|
||||
// if (location.countyCode) {
|
||||
// des += `-${COUNTY_CODE_TO_NAME_MAP.get(location.countyCode)}`;
|
||||
// }
|
||||
// return des;
|
||||
// };
|
||||
|
||||
function JobCard(props: IProps) {
|
||||
const { className, data, redirectOpen } = props;
|
||||
@ -84,12 +84,12 @@ function JobCard(props: IProps) {
|
||||
<div className={`${PREFIX}__summary`}>{jobDescription || sourceText}</div>
|
||||
<div className={`${PREFIX}__distance-wrapper`}>
|
||||
<div className={`${PREFIX}__detailed-address`}>{jobLocation?.address}</div>
|
||||
{/*{distance && (*/}
|
||||
{/* <>*/}
|
||||
{/* <Image className={`${PREFIX}__distance-icon`} src={require('@/statics/svg/location.svg')} />*/}
|
||||
{/* <div className={`${PREFIX}__distance`}>{calcDistance(distance)}</div>*/}
|
||||
{/* </>*/}
|
||||
{/*)}*/}
|
||||
{distance && (
|
||||
<>
|
||||
<Image className={`${PREFIX}__distance-icon`} src={require('@/statics/svg/location.svg')} />
|
||||
<div className={`${PREFIX}__distance`}>{calcDistance(distance)}</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__divider`} />
|
||||
@ -104,6 +104,7 @@ function JobCard(props: IProps) {
|
||||
</div>
|
||||
{/*<div className={`${PREFIX}__city`}>{getCityDes(jobLocation)}</div>*/}
|
||||
</div>
|
||||
{data.isRead && <div className={`${PREFIX}__mask`} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
import { List, PullRefresh } from '@taroify/core';
|
||||
import classNames from 'classnames';
|
||||
import { isEqual } from 'lodash-es';
|
||||
@ -5,6 +7,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
|
||||
import JobCard from '@/components/job-card';
|
||||
import ListPlaceholder from '@/components/list-placeholder';
|
||||
import { EventName } from '@/constants/app';
|
||||
import { JobType, EmployType, SortType } from '@/constants/job';
|
||||
import { JobInfo, GetJobsRequest } from '@/types/job';
|
||||
import { logWithPrefix } from '@/utils/common';
|
||||
@ -58,6 +61,23 @@ function JobList(props: IJobListProps) {
|
||||
const prevRequestProps = useRef<IRequestProps>({});
|
||||
const onListEmptyRef = useRef(onListEmpty);
|
||||
|
||||
const handleReadJob = useCallback(
|
||||
(jobId: string) => {
|
||||
const index = dataList.findIndex(d => String(d.id) === jobId);
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
const job = dataList[index];
|
||||
if (!job || job.isRead) {
|
||||
return;
|
||||
}
|
||||
log('auto mark read', jobId);
|
||||
dataList.splice(index, 1, { ...job, isRead: true });
|
||||
setDataList([...dataList]);
|
||||
},
|
||||
[dataList]
|
||||
);
|
||||
|
||||
const handleRefresh = useCallback(async () => {
|
||||
log('start pull refresh');
|
||||
try {
|
||||
@ -109,6 +129,13 @@ function JobList(props: IJobListProps) {
|
||||
onListEmptyRef.current = onListEmpty;
|
||||
}, [onListEmpty]);
|
||||
|
||||
useEffect(() => {
|
||||
Taro.eventCenter.on(EventName.VIEW_JOB_SUCCESS, handleReadJob);
|
||||
return () => {
|
||||
Taro.eventCenter.off(EventName.VIEW_JOB_SUCCESS, handleReadJob);
|
||||
};
|
||||
}, [handleReadJob]);
|
||||
|
||||
useEffect(() => {
|
||||
log('request params changed');
|
||||
requestProps.current = {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
.material-card {
|
||||
padding: 32px 24px;
|
||||
border-radius: 16px;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
|
||||
&__header {
|
||||
@ -16,6 +16,10 @@
|
||||
.flex-row();
|
||||
}
|
||||
|
||||
&__right {
|
||||
color: @blHighlightColor;
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 32px;
|
||||
line-height: 40px;
|
||||
@ -50,7 +54,7 @@
|
||||
|
||||
&__body {
|
||||
width: 100%;
|
||||
height: 156px;
|
||||
height: 160px;
|
||||
margin-top: 24px;
|
||||
.flex-column();
|
||||
justify-content: center;
|
||||
@ -80,38 +84,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
&__scroll-view {
|
||||
position: relative;
|
||||
&__info {
|
||||
.flex-row();
|
||||
gap: 24px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.flex-row();
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
&-left {
|
||||
width: 125px;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 102px;
|
||||
&-cover {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(91.41deg, rgba(255, 255, 255, 0) 1.86%, #FFFFFF 99.47%);
|
||||
border-radius: 12px;
|
||||
}
|
||||
&-right {
|
||||
.name {
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-size: 28px;
|
||||
line-height: 32px;
|
||||
color: @blColor;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.info,
|
||||
.worked {
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
line-height: 36px;
|
||||
color: @blColorG2;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.salary {
|
||||
font-weight: 500;
|
||||
font-size: 24px;
|
||||
line-height: 36px;
|
||||
color: @blColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__cover-list {
|
||||
height: 100%;
|
||||
.flex-row();
|
||||
}
|
||||
|
||||
&__cover-image {
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
margin-right: 24px;
|
||||
// 不知道为啥高度不对,可能 scroll-view 默认底部是滚动条高度?
|
||||
margin-top: 38px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
import { Image, ScrollView } from '@tarojs/components';
|
||||
import { Image } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
import { Loading } from '@taroify/core';
|
||||
@ -9,11 +9,12 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import LoginButton from '@/components/login-button';
|
||||
import { EventName, PageUrl } from '@/constants/app';
|
||||
import { CollectEventName, ReportEventId } from '@/constants/event';
|
||||
import { WORK_YEAR_LABELS } from '@/constants/material';
|
||||
import useUserInfo from '@/hooks/use-user-info';
|
||||
import { MaterialProfile } from '@/types/material';
|
||||
import { logWithPrefix } from '@/utils/common';
|
||||
import { collectEvent, reportEvent } from '@/utils/event';
|
||||
import { requestProfileDetail, sortVideos } from '@/utils/material';
|
||||
import { getBasicInfo, getSalary, requestProfileDetail, sortVideos } from '@/utils/material';
|
||||
import { navigateTo } from '@/utils/route';
|
||||
import Toast from '@/utils/toast';
|
||||
import { isValidUserInfo } from '@/utils/user';
|
||||
@ -34,8 +35,9 @@ function MaterialCard(props: IProps) {
|
||||
const userInfo = useUserInfo();
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [profile, setProfile] = useState<MaterialProfile | null>(null);
|
||||
const refreshRef = useRef((_f?: boolean) => { });
|
||||
const refreshRef = useRef((_f?: boolean) => {});
|
||||
const hasMaterial = !!profile;
|
||||
const firstCover = sortVideos(profile?.materialVideoInfoList || [])[0];
|
||||
|
||||
const handleGoCreateProfile = useCallback(() => {
|
||||
reportEvent(ReportEventId.CLICK_GO_TO_CREATE_MATERIAL);
|
||||
@ -44,7 +46,7 @@ function MaterialCard(props: IProps) {
|
||||
|
||||
const handleGoProfile = useCallback(() => {
|
||||
if (!hasMaterial) {
|
||||
realtimeLogger.info('handleGoProfile noMaterial')
|
||||
realtimeLogger.info('handleGoProfile noMaterial');
|
||||
return;
|
||||
}
|
||||
navigateTo(PageUrl.MaterialProfile).catch(err => {
|
||||
@ -67,7 +69,7 @@ function MaterialCard(props: IProps) {
|
||||
try {
|
||||
const profileDetail = await requestProfileDetail();
|
||||
if (!profileDetail) {
|
||||
realtimeLogger.info('getProfileDetail no profileDetail')
|
||||
realtimeLogger.info('getProfileDetail no profileDetail');
|
||||
}
|
||||
setProfile(profileDetail);
|
||||
} catch (e) {
|
||||
@ -90,8 +92,10 @@ function MaterialCard(props: IProps) {
|
||||
refreshRef.current?.(true);
|
||||
};
|
||||
Taro.eventCenter.on(EventName.CREATE_PROFILE, callback);
|
||||
Taro.eventCenter.on(EventName.UPDATE_PROFILE, callback);
|
||||
return () => {
|
||||
Taro.eventCenter.off(EventName.CREATE_PROFILE, callback);
|
||||
Taro.eventCenter.on(EventName.UPDATE_PROFILE, callback);
|
||||
};
|
||||
}, [userInfo]);
|
||||
|
||||
@ -100,16 +104,11 @@ function MaterialCard(props: IProps) {
|
||||
<div className={`${PREFIX}__header`}>
|
||||
<div className={`${PREFIX}__header__left`}>
|
||||
<div className={`${PREFIX}__header__title`}>我的模卡</div>
|
||||
{/* {profile && (
|
||||
<div
|
||||
className={`${PREFIX}__header__progress`}
|
||||
>{`完成度${Math.min((profile.progressBar || 0) * 100, 100)}%`}</div>
|
||||
)} */}
|
||||
</div>
|
||||
{profile && (
|
||||
<div className={`${PREFIX}__header__right`}>
|
||||
{/* <div className={`${PREFIX}__header__status`}>{profile?.isOpen ? '开放中' : '关闭'}</div> */}
|
||||
<ArrowRight className={`${PREFIX}__header__icon`} />
|
||||
<div>去分享</div>
|
||||
<ArrowRight color="#6D3DF5" className={`${PREFIX}__header__icon`} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@ -123,18 +122,21 @@ function MaterialCard(props: IProps) {
|
||||
</div>
|
||||
)}
|
||||
{!loading && hasMaterial && (
|
||||
<ScrollView className={`${PREFIX}__scroll-view`} showScrollbar={false} enableFlex enhanced scrollX>
|
||||
<div className={`${PREFIX}__cover-list`}>
|
||||
{sortVideos(profile?.materialVideoInfoList || []).map(video => (
|
||||
<Image
|
||||
className={`${PREFIX}__cover-image`}
|
||||
mode="aspectFit"
|
||||
key={video.coverUrl}
|
||||
src={video.coverUrl}
|
||||
/>
|
||||
))}
|
||||
<div className={`${PREFIX}__info`}>
|
||||
{firstCover && (
|
||||
<div className={`${PREFIX}__info-left`}>
|
||||
<Image className={`${PREFIX}__info-cover`} mode="aspectFill" src={firstCover.coverUrl} />
|
||||
</div>
|
||||
)}
|
||||
<div className={`${PREFIX}__info-right`}>
|
||||
<div className="name">{profile?.name}</div>
|
||||
<div className="info">
|
||||
{WORK_YEAR_LABELS[profile?.workedYear] || ''}·{getBasicInfo({ ...profile, shoeSize: null })}
|
||||
</div>
|
||||
<div className="worked">播过 {profile?.workedSecCategoryStr}</div>
|
||||
<div className="salary">{getSalary(profile)}</div>
|
||||
</div>
|
||||
</ScrollView>
|
||||
</div>
|
||||
)}
|
||||
{loading && <Loading />}
|
||||
</div>
|
||||
|
||||
@ -39,9 +39,7 @@ function JoinEntry({ onBindSuccess }: JoinEntryProps) {
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
{visible && (
|
||||
<LoginDialog disableCheck onCancel={() => setVisible(false)} onSuccess={onBindSuccess} needPhone={needPhone} />
|
||||
)}
|
||||
{visible && <LoginDialog onCancel={() => setVisible(false)} onSuccess={onBindSuccess} needPhone={needPhone} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@ -8,7 +8,51 @@
|
||||
background: #6d3df5;
|
||||
color: #fff;
|
||||
|
||||
&__simple {
|
||||
&-simple {
|
||||
padding: 39px 35px;
|
||||
height: 120px;
|
||||
box-sizing: border-box;
|
||||
&__bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
border-radius: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
&__content {
|
||||
.flex-row();
|
||||
line-height: 42px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 26px;
|
||||
color: #FFFFFF;
|
||||
|
||||
|
||||
}
|
||||
|
||||
&__money {
|
||||
font-weight: 800;
|
||||
margin-left: 12px;
|
||||
font-size: 44px;
|
||||
}
|
||||
&__button {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 44px;
|
||||
right: 24px;
|
||||
font-size: 28px;
|
||||
line-height: 32px;
|
||||
&-image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__bg {
|
||||
@ -28,20 +72,7 @@
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&__button {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 44px;
|
||||
right: 56px;
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
&-image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
|
||||
@ -144,24 +144,37 @@ export default function PartnerKanban({ simple }: PartnerKanbanProps) {
|
||||
useEffect(() => {
|
||||
getProfitStats();
|
||||
}, []);
|
||||
if (simple) {
|
||||
return (
|
||||
<div className={`${PREFIX} ${PREFIX}-simple`}>
|
||||
<Image
|
||||
className={`${PREFIX}-simple__bg`}
|
||||
src="https://publiccdn.neighbourhood.com.cn/img/partner_bg.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<div className={`${PREFIX}-simple__content`}>
|
||||
<div className={`${PREFIX}-simple__title`}>总收益(元)</div>
|
||||
<div className={`${PREFIX}-simple__money`}>{formatMoney(total)}</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}-simple__button`} onClick={handleNavigate}>
|
||||
详情
|
||||
<Image
|
||||
className={`${PREFIX}-simple__button-image`}
|
||||
mode="aspectFit"
|
||||
src={require('@/statics/svg/caret-right.svg')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className={`${PREFIX} ${simple ? `${PREFIX}__simple` : ''}`}>
|
||||
<div className={PREFIX}>
|
||||
<Image
|
||||
className={`${PREFIX}__bg`}
|
||||
src="https://publiccdn.neighbourhood.com.cn/img/partner_bg.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<div className={`${PREFIX}__content`}>
|
||||
{simple && (
|
||||
<div className={`${PREFIX}__button`} onClick={handleNavigate}>
|
||||
查看详情
|
||||
<Image
|
||||
className={`${PREFIX}__button-image`}
|
||||
mode="aspectFit"
|
||||
src={require('@/statics/svg/caret-right.svg')}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className={`${PREFIX}__total`}>
|
||||
<div className={`${PREFIX}__title`}>总收益(元)</div>
|
||||
<div className={`${PREFIX}__money`}>{formatMoney(total)}</div>
|
||||
@ -183,25 +196,21 @@ export default function PartnerKanban({ simple }: PartnerKanbanProps) {
|
||||
<div className={`${PREFIX}__money`}>{formatMoney(stats.availableProfit)}</div>
|
||||
</div>
|
||||
</div>
|
||||
{!simple && (
|
||||
<div className={`${PREFIX}__buttons`}>
|
||||
<Button className={`${PREFIX}__withdraw`} onClick={handleViewWithdraw}>
|
||||
提现
|
||||
</Button>
|
||||
<Button className={`${PREFIX}__record`} onClick={handleNavigateRecord}>
|
||||
提现记录
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<div className={`${PREFIX}__buttons`}>
|
||||
<Button className={`${PREFIX}__withdraw`} onClick={handleViewWithdraw}>
|
||||
提现
|
||||
</Button>
|
||||
<Button className={`${PREFIX}__record`} onClick={handleNavigateRecord}>
|
||||
提现记录
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{!simple && <TipDialog open={tipOpen} onClose={handleTipClose} />}
|
||||
{!simple && (
|
||||
<WithdrawDialog
|
||||
count={Math.min(Number(formatMoney(stats.availableBalance)), 200)}
|
||||
open={withdrawOpen}
|
||||
onClose={handleWithdrawClose}
|
||||
/>
|
||||
)}
|
||||
<TipDialog open={tipOpen} onClose={handleTipClose} />
|
||||
<WithdrawDialog
|
||||
count={Math.min(Number(formatMoney(stats.availableBalance)), 200)}
|
||||
open={withdrawOpen}
|
||||
onClose={handleWithdrawClose}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -226,6 +226,20 @@
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
&__hint {
|
||||
font-size: 24px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
color: @blColorG1;
|
||||
margin-top: 24px;
|
||||
|
||||
.highlight {
|
||||
color: @blHighlightColor;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ============================================= 群 ================================================= //
|
||||
|
||||
@ -152,6 +152,9 @@ export default function JobBuy(props: IProps) {
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<div className={`${PREFIX}__job-buy__hint`}>
|
||||
注:日会员有效期为 <div className="highlight">支付后24小时</div>
|
||||
</div>
|
||||
<Button className={`${PREFIX}__job-buy__button`} onClick={handleBuy}>
|
||||
{`支付 ${selectItem.amt} 元`}
|
||||
</Button>
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 0 24px;
|
||||
flex: 0 0 96px;
|
||||
|
||||
&.selected {
|
||||
color: @blHighlightColor;
|
||||
|
||||
13
src/components/top-category-select/index.tsx
Normal file
13
src/components/top-category-select/index.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import Select, { ISelectProps } from '@/components/select';
|
||||
import { JOB_TYPE_SELECT_OPTIONS_WITH_ALL, JobType } from '@/constants/job';
|
||||
|
||||
interface IProps extends Omit<ISelectProps<JobType>, 'options'> {
|
||||
value: JobType;
|
||||
}
|
||||
|
||||
function TopCategorySelect(props: IProps) {
|
||||
const { value: selectValue, onSelect } = props;
|
||||
return <Select options={JOB_TYPE_SELECT_OPTIONS_WITH_ALL} title="品类" value={selectValue} onSelect={onSelect} />;
|
||||
}
|
||||
|
||||
export default TopCategorySelect;
|
||||
@ -36,7 +36,7 @@ interface CityOption extends ISelectOption<CityValue> {
|
||||
const PREFIX = 'user-batch-publish';
|
||||
const log = logWithPrefix(PREFIX);
|
||||
const SERVICE_ILLUSTRATE = `服务方式:帮您把招聘需求发到众多同城合作主播群
|
||||
群发次数:每日1次,连发3天
|
||||
群发次数:杭州、广州发3次,其他城市1次
|
||||
内容要求:仅限带货主播招聘需求,其他不发
|
||||
主播联系:内容中留招聘方联系方式,主播直接联系`;
|
||||
const cityValues: CityValue[] = [
|
||||
|
||||
@ -24,6 +24,7 @@ export enum EventName {
|
||||
SELECT_MY_PUBLISH_JOB = 'select_my_publish_job',
|
||||
EXIT_CHAT_PAGE = 'exit_chat_page',
|
||||
VIEW_MATERIAL_SUCCESS = 'view_material_success',
|
||||
VIEW_JOB_SUCCESS = 'view_job_success',
|
||||
}
|
||||
|
||||
export enum OpenSource {
|
||||
@ -75,6 +76,7 @@ export enum PageUrl {
|
||||
Partner = 'pages/partner/index',
|
||||
WithdrawRecord = 'pages/withdraw-record/index',
|
||||
GroupDelegatePublish = 'pages/group-delegate-publish/index',
|
||||
GiveVip = 'pages/give-vip/index',
|
||||
}
|
||||
|
||||
export enum PluginUrl {
|
||||
|
||||
@ -7,6 +7,7 @@ export enum JobType {
|
||||
Jewelry = 'JEWELRY', // 珠宝
|
||||
Appliance = 'APPLIANCE', // 家电
|
||||
Furniture = 'FURNITURE', // 日用家具
|
||||
OutdoorSports = 'OUTDOOR_SPORTS',
|
||||
PetFamily = 'PET_FAMILY', // 母婴宠物
|
||||
Luxury = 'LUXURY', // 奢品
|
||||
LocalLive = 'LOCAL_LIVE', // 本地生活
|
||||
@ -87,6 +88,7 @@ export const JOB_TYPE_TITLE_MAP: { [key in JobType]: string } = {
|
||||
[JobType.Jewelry]: '珠宝',
|
||||
[JobType.Appliance]: '家电',
|
||||
[JobType.Furniture]: '日用家具',
|
||||
[JobType.OutdoorSports]: '户外运动',
|
||||
[JobType.PetFamily]: '母婴宠物',
|
||||
[JobType.Luxury]: '奢品',
|
||||
[JobType.LocalLive]: '本地生活',
|
||||
@ -173,6 +175,7 @@ export const JOB_TYPE_SELECT_OPTIONS = [
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.Jewelry], value: JobType.Jewelry },
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.Appliance], value: JobType.Appliance },
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.Furniture], value: JobType.Furniture },
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.OutdoorSports], value: JobType.OutdoorSports },
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.PetFamily], value: JobType.PetFamily },
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.Luxury], value: JobType.Luxury },
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.LocalLive], value: JobType.LocalLive },
|
||||
@ -181,6 +184,11 @@ export const JOB_TYPE_SELECT_OPTIONS = [
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.Other], value: JobType.Other },
|
||||
];
|
||||
|
||||
export const JOB_TYPE_SELECT_OPTIONS_WITH_ALL = [
|
||||
{ label: JOB_TYPE_TITLE_MAP[JobType.All], value: JobType.All },
|
||||
...JOB_TYPE_SELECT_OPTIONS,
|
||||
];
|
||||
|
||||
const MAX_SALARY = 10000000;
|
||||
export const PART_EMPLOY_SALARY_OPTIONS = [
|
||||
{ label: '不限' },
|
||||
|
||||
@ -84,14 +84,25 @@ export const WORK_YEAR_OPTIONS = [
|
||||
{ label: WORK_YEAR_LABELS[WorkedYears.MoreThreeYear], value: WorkedYears.MoreThreeYear },
|
||||
];
|
||||
|
||||
export const ALL_GENDER_TYPES = [GenderType.All, GenderType.MEN, GenderType.WOMEN];
|
||||
|
||||
export const GENDER_TYPE_TITLE_MAP = {
|
||||
[GenderType.All]: '不限',
|
||||
[GenderType.WOMEN]: '女',
|
||||
[GenderType.MEN]: '男',
|
||||
};
|
||||
|
||||
export const GENDER_OPTIONS = [
|
||||
{
|
||||
value: GenderType.All,
|
||||
label: GENDER_TYPE_TITLE_MAP[GenderType.All],
|
||||
},
|
||||
{
|
||||
value: GenderType.WOMEN,
|
||||
label: GENDER_TYPE_TITLE_MAP[GenderType.WOMEN],
|
||||
},
|
||||
{
|
||||
value: GenderType.MEN,
|
||||
label: GENDER_TYPE_TITLE_MAP[GenderType.MEN],
|
||||
},
|
||||
];
|
||||
export const ALL_ANCHOR_READ_TYPES = Object.values(AnchorReadType);
|
||||
|
||||
export const ANCHOR_READ_TITLE_MAP = {
|
||||
|
||||
@ -18,7 +18,8 @@ import {
|
||||
ALL_SORT_TYPES,
|
||||
EMPLOY_TYPE_TITLE_MAP,
|
||||
EmployType,
|
||||
JOB_TABS, JobSourceType,
|
||||
JOB_TABS,
|
||||
JobSourceType,
|
||||
JobType,
|
||||
SORT_TYPE_TITLE_MAP,
|
||||
SortType,
|
||||
@ -143,12 +144,7 @@ function JobFragment(props: IProps) {
|
||||
return (
|
||||
<div className={`${PREFIX}__container`}>
|
||||
<div className={`${PREFIX}__top-search-bar`}>
|
||||
<SearchInput
|
||||
disabled
|
||||
className={`${PREFIX}__search`}
|
||||
placeholder="试试 女装"
|
||||
onClick={handleClickSearch}
|
||||
/>
|
||||
<SearchInput disabled className={`${PREFIX}__search`} placeholder="试试 女装" onClick={handleClickSearch} />
|
||||
<div className={classNames(`${PREFIX}__employType-select`)} onClick={handleClickEmployTypeSelect}>
|
||||
<div className="title">
|
||||
{employType && employType !== EmployType.All ? EMPLOY_TYPE_TITLE_MAP[employType] : '类型'}
|
||||
|
||||
@ -98,6 +98,7 @@ export const APP_CONFIG: AppConfigType = {
|
||||
PageUrl.Partner,
|
||||
PageUrl.WithdrawRecord,
|
||||
PageUrl.GroupDelegatePublish,
|
||||
PageUrl.GiveVip,
|
||||
// PageUrl.DevDebug,
|
||||
],
|
||||
window: {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
// export const DOMAIN = 'http://192.168.60.191:8082';
|
||||
export const DOMAIN = 'https://neighbourhood.cn';
|
||||
export const DOMAIN = process.env.BRAND === 'dev' ? 'https://dev.neighbourhood.cn' : 'https://neighbourhood.cn';
|
||||
// export const DOMAIN = 'https://dev.neighbourhood.cn';
|
||||
export const BASE_URL = `${DOMAIN}/api`;
|
||||
|
||||
export enum API {
|
||||
|
||||
@ -52,7 +52,11 @@
|
||||
font-size: 28px;
|
||||
line-height: 32px;
|
||||
color: @blColor;
|
||||
gap: 20px;
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
}
|
||||
.title {
|
||||
margin-right: 5px;
|
||||
}
|
||||
@ -61,11 +65,17 @@
|
||||
padding: 0 24px;
|
||||
}
|
||||
&__overlay-outer {
|
||||
top: 82px;
|
||||
top: 72px;
|
||||
}
|
||||
|
||||
&__overlay-inner {
|
||||
width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
.bl-select__items-container {
|
||||
max-height: calc(100vh - 610rpx);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&__tips-container {
|
||||
@ -91,8 +101,6 @@
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
&__popup {
|
||||
&-content {
|
||||
.flex-column();
|
||||
|
||||
@ -5,11 +5,13 @@ import { Popup } from '@taroify/core';
|
||||
import { ArrowDown, ArrowUp } from '@taroify/icons';
|
||||
import classNames from 'classnames';
|
||||
import { isEqual } from 'lodash-es';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import AnchorList, { IAnchorListProps } from '@/components/anchor-list';
|
||||
import AnchorPicker from '@/components/anchor-picker';
|
||||
import CustomNavigationBar from '@/components/custom-navigation-bar';
|
||||
import EmployTypeSelect from '@/components/employ-type-select';
|
||||
import GenderSelect from '@/components/gender-select';
|
||||
import HomePage from '@/components/home-page';
|
||||
import Overlay from '@/components/overlay';
|
||||
import PageLoading from '@/components/page-loading';
|
||||
@ -17,8 +19,8 @@ import PartnerBanner from '@/components/partner-banner';
|
||||
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||
import SwitchBar from '@/components/switch-bar';
|
||||
import { APP_TAB_BAR_ID, EventName, OpenSource, PageType, PageUrl, RoleType } from '@/constants/app';
|
||||
import { EmployType } from '@/constants/job';
|
||||
import { ALL_ANCHOR_SORT_TYPES, ANCHOR_SORT_TYPE_TITLE_MAP, AnchorSortType } from '@/constants/material';
|
||||
import { EmployType, JobType } from '@/constants/job';
|
||||
import { ALL_ANCHOR_SORT_TYPES, ANCHOR_SORT_TYPE_TITLE_MAP, AnchorSortType, GenderType } from '@/constants/material';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import useListHeight, { IUseListHeightProps } from '@/hooks/use-list-height';
|
||||
import useLocation from '@/hooks/use-location';
|
||||
@ -36,6 +38,7 @@ import { getCommonShareMessage } from '@/utils/share';
|
||||
import Toast from '@/utils/toast';
|
||||
|
||||
import './index.less';
|
||||
import TopCategorySelect from '@/components/top-category-select';
|
||||
|
||||
const PREFIX = 'page-anchor';
|
||||
const LIST_CONTAINER_CLASS = `${PREFIX}__list-container`;
|
||||
@ -78,12 +81,22 @@ function ListWrapper(props: IAnchorListProps) {
|
||||
return <AnchorList listHeight={listHeight} {...props} onListEmpty={handleListEmpty} />;
|
||||
}
|
||||
|
||||
enum FilterType {
|
||||
gender,
|
||||
employType,
|
||||
topCategory,
|
||||
more,
|
||||
}
|
||||
|
||||
export default function AnchorPage() {
|
||||
const location = useLocation();
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [selectJob, setSelectJob] = useState<JobManageInfo | undefined>();
|
||||
const [filters, setFilters] = useState<IAnchorFilters>({ employType: EmployType.All });
|
||||
const [showFilter, setShowFilter] = useState<boolean>(false);
|
||||
const [moreFilters, setMoreFilters] = useState<IAnchorFilters>({});
|
||||
const [gender, setGender] = useState<GenderType>(GenderType.All);
|
||||
const [employType, setEmployType] = useState<EmployType>(EmployType.All);
|
||||
const [topCategory, setTopCategory] = useState<JobType>(JobType.All);
|
||||
const [showFilter, setShowFilter] = useState<FilterType | null>(null);
|
||||
const [sortType, setSortType] = useState<AnchorSortType>(AnchorSortType.Active);
|
||||
const [openPopup, setOpenPopup] = useState<boolean>(false);
|
||||
const [coordinate, setCoordinate] = useState<Coordinate>({
|
||||
@ -106,20 +119,35 @@ export default function AnchorPage() {
|
||||
[selectJob]
|
||||
);
|
||||
|
||||
const handleClickSalarySelect = useCallback(() => {
|
||||
setShowFilter(!showFilter);
|
||||
}, [showFilter]);
|
||||
const handleClickFilterSelect = (type: FilterType) => () => {
|
||||
setShowFilter(type === showFilter ? null : type);
|
||||
};
|
||||
|
||||
const handleHideFilter = useCallback(() => setShowFilter(false), []);
|
||||
const handleHideFilter = useCallback(() => setShowFilter(null), []);
|
||||
|
||||
const handleFilterChange = useCallback(
|
||||
(newFilters: IAnchorFilters) => {
|
||||
!isEqual(newFilters, filters) && setFilters(newFilters);
|
||||
setShowFilter(false);
|
||||
!isEqual(newFilters, moreFilters) && setMoreFilters(newFilters);
|
||||
setShowFilter(null);
|
||||
},
|
||||
[filters]
|
||||
[moreFilters]
|
||||
);
|
||||
|
||||
const handleChangeSelectGender = useCallback((value: GenderType) => {
|
||||
setGender(value);
|
||||
setShowFilter(null);
|
||||
}, []);
|
||||
|
||||
const handleChangeSelectEmployType = useCallback((value: EmployType) => {
|
||||
setEmployType(value);
|
||||
setShowFilter(null);
|
||||
}, []);
|
||||
|
||||
const handleChangeSelectTopCategory = useCallback((value: JobType) => {
|
||||
setTopCategory(value);
|
||||
setShowFilter(null);
|
||||
}, []);
|
||||
|
||||
const handleClickSortType = useCallback(async (type: AnchorSortType) => setSortType(type), []);
|
||||
|
||||
const handleJobChange = useCallback(
|
||||
@ -205,6 +233,15 @@ export default function AnchorPage() {
|
||||
|
||||
useDidShow(() => requestUnreadMessageCount());
|
||||
|
||||
const filters = useMemo(
|
||||
() => ({
|
||||
...moreFilters,
|
||||
topCategory: topCategory === JobType.All ? undefined : topCategory,
|
||||
gender: gender === -1 ? undefined : gender,
|
||||
employType,
|
||||
}),
|
||||
[moreFilters, gender, employType, topCategory]
|
||||
);
|
||||
return (
|
||||
<HomePage type={PageType.Anchor}>
|
||||
{!!loading && <PageLoading className={`${PREFIX}__loading`} />}
|
||||
@ -224,9 +261,23 @@ export default function AnchorPage() {
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className={classNames(`${PREFIX}__filter`)} onClick={handleClickSalarySelect}>
|
||||
<div className="title">筛选</div>
|
||||
{showFilter ? <ArrowUp /> : <ArrowDown />}
|
||||
<div className={classNames(`${PREFIX}__filter`)}>
|
||||
<div className={`${PREFIX}__filter-item`} onClick={handleClickFilterSelect(FilterType.gender)}>
|
||||
<div className="title">性别</div>
|
||||
{showFilter === FilterType.gender ? <ArrowUp /> : <ArrowDown />}
|
||||
</div>
|
||||
<div className={`${PREFIX}__filter-item`} onClick={handleClickFilterSelect(FilterType.employType)}>
|
||||
<div className="title">类型</div>
|
||||
{showFilter === FilterType.employType ? <ArrowUp /> : <ArrowDown />}
|
||||
</div>
|
||||
<div className={`${PREFIX}__filter-item`} onClick={handleClickFilterSelect(FilterType.topCategory)}>
|
||||
<div className="title">品类</div>
|
||||
{showFilter === FilterType.topCategory ? <ArrowUp /> : <ArrowDown />}
|
||||
</div>
|
||||
<div className={`${PREFIX}__filter-item`} onClick={handleClickFilterSelect(FilterType.more)}>
|
||||
<div className="title">更多</div>
|
||||
{showFilter === FilterType.more ? <ArrowUp /> : <ArrowDown />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__banner`}>
|
||||
@ -243,12 +294,36 @@ export default function AnchorPage() {
|
||||
className={LIST_CONTAINER_CLASS}
|
||||
/>
|
||||
<Overlay
|
||||
visible={showFilter}
|
||||
visible={showFilter === FilterType.gender}
|
||||
onClickOuter={handleHideFilter}
|
||||
outerClassName={`${PREFIX}__overlay-outer`}
|
||||
innerClassName={`${PREFIX}__overlay-inner`}
|
||||
>
|
||||
<AnchorPicker value={filters} onConfirm={handleFilterChange} />
|
||||
<GenderSelect value={gender} onSelect={handleChangeSelectGender} />
|
||||
</Overlay>
|
||||
<Overlay
|
||||
visible={showFilter === FilterType.employType}
|
||||
onClickOuter={handleHideFilter}
|
||||
outerClassName={`${PREFIX}__overlay-outer`}
|
||||
innerClassName={`${PREFIX}__overlay-inner`}
|
||||
>
|
||||
<EmployTypeSelect value={employType} onSelect={handleChangeSelectEmployType} />
|
||||
</Overlay>
|
||||
<Overlay
|
||||
visible={showFilter === FilterType.topCategory}
|
||||
onClickOuter={handleHideFilter}
|
||||
outerClassName={`${PREFIX}__overlay-outer`}
|
||||
innerClassName={`${PREFIX}__overlay-inner`}
|
||||
>
|
||||
<TopCategorySelect value={topCategory} onSelect={handleChangeSelectTopCategory} />
|
||||
</Overlay>
|
||||
<Overlay
|
||||
visible={showFilter === FilterType.more}
|
||||
onClickOuter={handleHideFilter}
|
||||
outerClassName={`${PREFIX}__overlay-outer`}
|
||||
innerClassName={`${PREFIX}__overlay-inner`}
|
||||
>
|
||||
<AnchorPicker value={moreFilters} onConfirm={handleFilterChange} />
|
||||
</Overlay>
|
||||
</div>
|
||||
<Popup
|
||||
|
||||
3
src/pages/give-vip/index.config.ts
Normal file
3
src/pages/give-vip/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '赠送会员',
|
||||
});
|
||||
1
src/pages/give-vip/index.less
Normal file
1
src/pages/give-vip/index.less
Normal file
@ -0,0 +1 @@
|
||||
.give-vip {}
|
||||
12
src/pages/give-vip/index.tsx
Normal file
12
src/pages/give-vip/index.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import { Button } from '@taroify/core';
|
||||
|
||||
import { logWithPrefix } from '@/utils/common';
|
||||
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'give-vip';
|
||||
const log = logWithPrefix(PREFIX);
|
||||
|
||||
export default function GiveVip() {
|
||||
return <div className={PREFIX}></div>;
|
||||
}
|
||||
@ -286,6 +286,7 @@ export default function JobDetail() {
|
||||
if (!jobId) {
|
||||
return;
|
||||
}
|
||||
Taro.eventCenter.trigger(EventName.VIEW_JOB_SUCCESS, jobId);
|
||||
try {
|
||||
const res = await requestJobDetail(jobId);
|
||||
setData(res);
|
||||
|
||||
@ -56,7 +56,27 @@
|
||||
&__icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
&__block {
|
||||
margin-top: 24px;
|
||||
.flex-row();
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
&__status {
|
||||
font-size: 28px;
|
||||
line-height: 32px;
|
||||
font-weight: 400;
|
||||
color: @blColorG1;
|
||||
|
||||
&.open {
|
||||
color: @blHighlightColor;
|
||||
}
|
||||
|
||||
&.error {
|
||||
color: #FF5051;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import classNames from 'classnames';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import { EventName, OpenSource } from '@/constants/app';
|
||||
import { JOB_MANAGE_STATUS_TITLE_MAP, JobManageStatus } from '@/constants/job';
|
||||
import { JobManageInfo } from '@/types/job';
|
||||
import { getJobLocation, requestJobManageList } from '@/utils/job';
|
||||
import { getPageQuery, navigateBack } from '@/utils/route';
|
||||
@ -15,7 +16,14 @@ import Toast from '@/utils/toast';
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'page-job-select-my-publish';
|
||||
|
||||
const STATUS_CLASS_MAP = {
|
||||
[JobManageStatus.WaitVerify]: 'pending',
|
||||
[JobManageStatus.Open]: 'open',
|
||||
[JobManageStatus.Pending]: 'pending',
|
||||
[JobManageStatus.Error]: 'error',
|
||||
[JobManageStatus.Close]: 'close',
|
||||
[JobManageStatus.Expire]: 'close',
|
||||
};
|
||||
export default function JobSelectMyPublish() {
|
||||
const [list, setList] = useState<JobManageInfo[]>([]);
|
||||
const [jobId, setJobId] = useState<string | null>('1');
|
||||
@ -57,13 +65,18 @@ export default function JobSelectMyPublish() {
|
||||
</div>
|
||||
<div className={`${PREFIX}__right`}>
|
||||
<div className={`${PREFIX}__right__time`}>{formatTime(item.updated)}</div>
|
||||
{item.id === jobId && (
|
||||
<Image
|
||||
mode="aspectFit"
|
||||
className={`${PREFIX}__right__icon`}
|
||||
src={require('@/statics/svg/success.svg')}
|
||||
/>
|
||||
)}
|
||||
<div className={`${PREFIX}__right__block`}>
|
||||
<div className={classNames(`${PREFIX}__right__status`, { [STATUS_CLASS_MAP[item.status]]: true })}>
|
||||
{JOB_MANAGE_STATUS_TITLE_MAP[item.status]}
|
||||
</div>
|
||||
{item.id === jobId && (
|
||||
<Image
|
||||
mode="aspectFit"
|
||||
className={`${PREFIX}__right__icon`}
|
||||
src={require('@/statics/svg/success.svg')}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@ -9,13 +9,17 @@ import PageLoading from '@/components/page-loading';
|
||||
import CompanyPublishJobBuy from '@/components/product-dialog/steps-ui/company-publish-job-buy';
|
||||
import SafeBottomPadding from '@/components/safe-bottom-padding';
|
||||
import { EventName, OpenSource, PageUrl, RoleType } from '@/constants/app';
|
||||
import { CertificationStatusType } from '@/constants/company';
|
||||
import { CollectEventName } from '@/constants/event';
|
||||
import { JobManageStatus } from '@/constants/job';
|
||||
import { MaterialViewSource } from '@/constants/material';
|
||||
import ProfileViewFragment from '@/fragments/profile/view';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import useUserInfo from '@/hooks/use-user-info';
|
||||
import { RESPONSE_ERROR_CODE } from '@/http/constant';
|
||||
import { HttpError } from '@/http/error';
|
||||
import store from '@/store';
|
||||
import { cacheJobId } from '@/store/actions';
|
||||
import { JobManageInfo } from '@/types/job';
|
||||
import { MaterialProfile } from '@/types/material';
|
||||
import { IJobMessage } from '@/types/message';
|
||||
@ -29,10 +33,6 @@ import { getInviteCodeFromQueryAndUpdate } from '@/utils/partner';
|
||||
import { getPageQuery, navigateBack, navigateTo, redirectTo } from '@/utils/route';
|
||||
import Toast from '@/utils/toast';
|
||||
import './index.less';
|
||||
import useUserInfo from '@/hooks/use-user-info';
|
||||
import { CertificationStatusType } from '@/constants/company';
|
||||
import store from '@/store';
|
||||
import { cacheJobId } from '@/store/actions';
|
||||
|
||||
const PREFIX = 'page-material-view';
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ export default function BizService() {
|
||||
<div className={`${PREFIX}__delegate-h5`}>服务说明</div>
|
||||
<div className={`${PREFIX}__delegate-card`}>
|
||||
<div className={`${PREFIX}__delegate-body`}>服务方式:帮您把招聘需求发到众多同城合作主播群</div>
|
||||
<div className={`${PREFIX}__delegate-body`}>群发次数:每日1次,连发3天</div>
|
||||
<div className={`${PREFIX}__delegate-body`}>群发次数:杭州、广州发3次,其他城市1次</div>
|
||||
<div className={`${PREFIX}__delegate-body`}>内容要求:仅限带货主播招聘需求,其他不发</div>
|
||||
<div className={`${PREFIX}__delegate-body`}>主播联系:内容中留招聘方联系方式,主播直接联系</div>
|
||||
</div>
|
||||
|
||||
@ -17,6 +17,7 @@ export interface JobInfo {
|
||||
distance?: number; // 距离。一期没有
|
||||
isAuthed?: boolean; // 是否认证
|
||||
companyName?: string;
|
||||
isRead?: boolean;
|
||||
}
|
||||
|
||||
export interface CreateJobInfo extends Pick<JobInfo, 'title' | 'employType' | 'jobDescription'> {
|
||||
|
||||
@ -101,6 +101,7 @@ export interface IAnchorFilters {
|
||||
lowPriceForPartyTime?: number;
|
||||
highPriceForPartyTime?: number;
|
||||
category?: string;
|
||||
topCategory?: string;
|
||||
readType?: AnchorReadType;
|
||||
}
|
||||
|
||||
|
||||
@ -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