diff --git a/src/components/prejob-popup/index.tsx b/src/components/prejob-popup/index.tsx index d0c34e4..f21ac4c 100644 --- a/src/components/prejob-popup/index.tsx +++ b/src/components/prejob-popup/index.tsx @@ -22,7 +22,7 @@ const GET_CONTACT_TYPE_OPTIONS = [ { type: GET_CONTACT_TYPE.SHARE, icon: 'https://publiccdn.neighbourhood.com.cn/img/file.svg', - title: '完善资料', + title: '转发推广', desc: '转发给朋友可享推荐奖励', btnText: '分享', }, @@ -30,7 +30,7 @@ const GET_CONTACT_TYPE_OPTIONS = [ type: GET_CONTACT_TYPE.VIP, icon: 'https://publiccdn.neighbourhood.com.cn/img/diamond.svg', title: '播络会员', - desc: '开通会员每天可查看10个', + desc: '开通会员每天可查看5个', btnText: '开通', }, { diff --git a/src/components/product-dialog/job/index.tsx b/src/components/product-dialog/job/index.tsx index 5a942f2..bd629fa 100644 --- a/src/components/product-dialog/job/index.tsx +++ b/src/components/product-dialog/job/index.tsx @@ -15,7 +15,6 @@ import { DeclarationType, ProductType } from '@/constants/product'; import { JobDetails } from '@/types/job'; import { ProductInfo } from '@/types/product'; import { logWithPrefix } from '@/utils/common'; -import { getSkipPrejobAction, setSkipPrejobAction } from '@/utils/job'; import { requestAllBuyProduct, requestProductBalance, @@ -49,6 +48,7 @@ function ProductJobDialog(props: Omit) { const handleClosePrejob = useCallback(() => { setShowPrejob(false); + onClose(); }, []); const handleConfirmPrejob = useCallback(async (type: GET_CONTACT_TYPE) => { @@ -115,14 +115,9 @@ function ProductJobDialog(props: Omit) { const allowBuy = await requestAllBuyProduct(PRODUCT_CODE); setShowContact(true); setStatus(allowBuy ? DialogStatus.JOB_BUY : DialogStatus.JOB_UNABLE_UNLOCK); - } - // 创建模卡之后可以直接解锁一次, 分享后解锁一次 - else if (isPaidVip || getSkipPrejobAction() || skipPreAction) { + } else if (isPaidVip || skipPreAction) { const productInfo = await requestUseProduct(PRODUCT_CODE, { jobId: data.id }); setShowPrejob(false); - if (!skipPreAction) { - setSkipPrejobAction(false); - } handleContact(productInfo.declarationTypeResult); } else { setShowPrejob(true); diff --git a/src/constants/cache-key.ts b/src/constants/cache-key.ts index ed7eb19..5372eb2 100644 --- a/src/constants/cache-key.ts +++ b/src/constants/cache-key.ts @@ -15,5 +15,4 @@ export enum CacheKey { JOIN_GROUP_CARD_CLICKED = '__join_group_card_clicked__', SHARE_TO_GET_JOB_CONTACT = '__share_to_get_job_contract__', SHARE_TO_GET_ANCHOR_CONTACT = '__share_to_get_anchor_contract__', - SKIP_PREACTION = '__skip_preaction__', } diff --git a/src/http/constant.ts b/src/http/constant.ts index 9ef6683..4d73434 100644 --- a/src/http/constant.ts +++ b/src/http/constant.ts @@ -26,6 +26,7 @@ export enum RESPONSE_ERROR_CODE { INSUFFICIENT_BALANCE = 'INSUFFICIENT_BALANCE', // 聊天或者模卡查看超出限制 INSUFFICIENT_FREE_BALANCE = 'INSUFFICIENT_FREE_BALANCE', // 免费查看次数(未购买会员)超限 BOSS_VIP_EXPIRED = 'BOSS_VIP_EXPIRED', // 会员过期 + CHAT_MSG_SEND_NOT_ALLOW = 'CHAT_MSG_SEND_NOT_ALLOW', } export const RESPONSE_ERROR_INFO: { [key in RESPONSE_ERROR_CODE]?: string } = { diff --git a/src/pages/job-detail/index.tsx b/src/pages/job-detail/index.tsx index ab60e0c..3449828 100644 --- a/src/pages/job-detail/index.tsx +++ b/src/pages/job-detail/index.tsx @@ -271,9 +271,11 @@ export default function JobDetail() { }, []); useLoad(async () => { - switchRoleType(RoleType.Anchor); + const query = getPageQuery & { c: string; share: string }>(); - const query = getPageQuery & { c: string }>(); + if (query?.share === 'true') { + switchRoleType(RoleType.Anchor); + } getInviteCodeFromQueryAndUpdate(query); const jobId = query?.id; if (!jobId) { diff --git a/src/pages/material-create-profile/index.tsx b/src/pages/material-create-profile/index.tsx index 5b67cfe..57bbce3 100644 --- a/src/pages/material-create-profile/index.tsx +++ b/src/pages/material-create-profile/index.tsx @@ -15,7 +15,7 @@ import useLocation from '@/hooks/use-location'; import { MaterialProfile } from '@/types/material'; import { logWithPrefix } from '@/utils/common'; import { collectEvent } from '@/utils/event'; -import { isFullTimePriceRequired, isPartTimePriceRequired, setSkipPrejobAction } from '@/utils/job'; +import { isFullTimePriceRequired, isPartTimePriceRequired } from '@/utils/job'; import { updateProfile, subscribeMaterialMessage } from '@/utils/material'; import { navigateBack } from '@/utils/route'; import Toast from '@/utils/toast'; @@ -110,7 +110,6 @@ export default function MaterialCreateProfile() { // 发起订阅不能在异步任务中,保证是第一个 await Promise.all([subscribeMaterialMessage(), updateProfile(data)]); } - setSkipPrejobAction(); Taro.eventCenter.trigger(EventName.CREATE_PROFILE); nextType ? setGroupType(nextType) : navigateBack(2); } catch (e) { diff --git a/src/pages/message-chat/index.tsx b/src/pages/message-chat/index.tsx index 2d4a26d..679dba5 100644 --- a/src/pages/message-chat/index.tsx +++ b/src/pages/message-chat/index.tsx @@ -167,6 +167,9 @@ export default function MessageChat() { ) { tips = '今日申请交换联系方式次数已用完,当前每日限制为5次'; duration = 3000; + } else if (errorCode === RESPONSE_ERROR_CODE.CHAT_MSG_SEND_NOT_ALLOW) { + tips = '账号已在另一台设备上切换身份,本条消息未发送成功,请在本设备重新切换身份后,再发送消息'; + duration = 5000; } tips.length > 7 ? Toast.info(tips, duration) : Toast.error(tips, duration); } diff --git a/src/pages/user-batch-publish/index.less b/src/pages/user-batch-publish/index.less index 61bf3c5..0ea693b 100644 --- a/src/pages/user-batch-publish/index.less +++ b/src/pages/user-batch-publish/index.less @@ -21,9 +21,9 @@ padding-top: var(--tabs-wrap-height); } - .taroify-tabs__nav .taroify-tabs__tab:nth-child(2) .taroify-badge-wrapper { - left: 18px; - } + //.taroify-tabs__nav .taroify-tabs__tab:nth-child(2) .taroify-badge-wrapper { + // left: 18px; + //} } &__star { diff --git a/src/pages/user-batch-publish/index.tsx b/src/pages/user-batch-publish/index.tsx index 64d3d5c..89ea6eb 100644 --- a/src/pages/user-batch-publish/index.tsx +++ b/src/pages/user-batch-publish/index.tsx @@ -106,7 +106,7 @@ export default function BizService() { title={ <> 主播群 - + {/**/} } > diff --git a/src/utils/job.ts b/src/utils/job.ts index 9e5b812..b9422f7 100644 --- a/src/utils/job.ts +++ b/src/utils/job.ts @@ -132,14 +132,6 @@ export function postCloseJob(jobId: string) { return http.post(API.CLOSE_JOB, { data: { jobId }, contentType: 'application/x-www-form-urlencoded' }); } -export function setSkipPrejobAction(skip = true) { - Taro.setStorageSync(CacheKey.SKIP_PREACTION, skip); -} - -export function getSkipPrejobAction() { - return !!Taro.getStorageSync(CacheKey.SKIP_PREACTION); -} - export function setShareToGetContact(job = true) { Taro.setStorageSync(job ? CacheKey.SHARE_TO_GET_JOB_CONTACT : CacheKey.SHARE_TO_GET_ANCHOR_CONTACT, true); }