feat: update tonggao
This commit is contained in:
@ -2,7 +2,7 @@ import Taro from '@tarojs/taro';
|
||||
|
||||
import { CacheKey } from '@/constants/cache-key';
|
||||
import { CollectEventName } from '@/constants/event';
|
||||
import { EmployType, JobManageStatus, UserJobType } from '@/constants/job';
|
||||
import { EmployType, JobManageStatus, JobSourceType, UserJobType } from '@/constants/job';
|
||||
import http from '@/http';
|
||||
import { API } from '@/http/api';
|
||||
import store from '@/store';
|
||||
@ -80,6 +80,7 @@ async function requestMyBrowsedJobList(data: GetUserJobRequest) {
|
||||
|
||||
export async function requestJobList(data: GetJobsRequest = {}) {
|
||||
const isGetMyJob = data.isOwner || data.isFollow;
|
||||
data.sourceType = data.sourceType === JobSourceType.All ? undefined : data.sourceType;
|
||||
const url = isGetMyJob ? API.GET_MY_JOB_LIST_V2 : API.GET_JOB_LIST;
|
||||
return await http.post<GetJobsResponse>(url, { data });
|
||||
}
|
||||
@ -116,8 +117,9 @@ export async function requestHasPublishedJob() {
|
||||
return data.jobResults.length > 0;
|
||||
}
|
||||
|
||||
export function postCreateJob(data: CreateJobInfo) {
|
||||
return http.post(API.CREATE_JOB, { data });
|
||||
export async function postCreateJob(data: CreateJobInfo): Promise<string> {
|
||||
const jobId = await http.post(API.CREATE_JOB, { data });
|
||||
return jobId;
|
||||
}
|
||||
|
||||
export function postUpdateJob(data: CreateJobInfo) {
|
||||
|
||||
@ -89,9 +89,9 @@ export const requestReadProfile = async (data: GetReadProfileRequest) => {
|
||||
return http.post<MaterialProfile>(API.READ_PROFILE, { data });
|
||||
};
|
||||
|
||||
export const requestProfileShareCode = async (resumeId: string) => {
|
||||
export const requestProfileShareCode = async (resumeId: string, jobId?: string) => {
|
||||
return http.post<MaterialProfile>(API.GET_PROFILE_SHARE_CODE, {
|
||||
data: { resumeId },
|
||||
data: { resumeId, jobId },
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
});
|
||||
};
|
||||
@ -142,14 +142,15 @@ export const requestAnchorList = async (data: GetAnchorListRequest) => {
|
||||
export const getMaterialShareMessage = async (
|
||||
profile?: MaterialProfile | null,
|
||||
needShareCode: boolean = true,
|
||||
inviteCode?: string
|
||||
inviteCode?: string,
|
||||
jobId?: string
|
||||
) => {
|
||||
if (!profile) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
const { id, name = '', workedSecCategoryStr } = profile;
|
||||
const shareCode = needShareCode ? await requestProfileShareCode(id) : undefined;
|
||||
const shareCode = needShareCode ? await requestProfileShareCode(id, jobId) : undefined;
|
||||
const title = `${name} ${workedSecCategoryStr ? `播过 ${workedSecCategoryStr}` : ''}`.trim();
|
||||
return {
|
||||
title,
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
GetProductIsUnlockRequest,
|
||||
PostUseProductRequest,
|
||||
GetProductIsUnlockResponse,
|
||||
CustomerServiceInfo,
|
||||
// CustomerServiceInfo,
|
||||
CreatePayInfoRequest,
|
||||
CreatePayInfoResponse,
|
||||
CreatePayOrderParams,
|
||||
@ -74,7 +74,7 @@ export async function requestAllBuyProduct(productCode: ProductType) {
|
||||
}
|
||||
|
||||
export async function requestCsQrCode(_type: QrCodeType) {
|
||||
const result = await http.post<CustomerServiceInfo>(API.CS_QR_CODE);
|
||||
// const result = await http.post<CustomerServiceInfo>(API.CS_QR_CODE);
|
||||
return 'https://publiccdn.neighbourhood.com.cn/img/bzQrcode.jpg';
|
||||
// return `${DOMAIN}/${result.vxQrCode}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user