feat: update
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
import Taro, { useLoad, useShareAppMessage } from '@tarojs/taro';
|
||||
import { useLoad, useShareAppMessage } from '@tarojs/taro';
|
||||
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import HomePage from '@/components/home-page';
|
||||
import SearchCity from '@/components/search-city';
|
||||
import { PageType, PageUrl, RoleType } from '@/constants/app';
|
||||
import useCityOperators from '@/hooks/use-city-operators';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import useServiceUrls from '@/hooks/use-service-urls';
|
||||
import { switchRoleType } from '@/utils/app';
|
||||
import { openCustomerServiceChat } from '@/utils/common';
|
||||
import { getCurrentCityCode } from '@/utils/location';
|
||||
@ -20,7 +20,7 @@ const PREFIX = 'group-v2-page';
|
||||
|
||||
export default function GroupV2() {
|
||||
const inviteCode = useInviteCode();
|
||||
const serviceUrls = useServiceUrls();
|
||||
const cityOperators = useCityOperators();
|
||||
|
||||
useLoad(() => {
|
||||
switchRoleType(RoleType.Anchor);
|
||||
@ -29,10 +29,6 @@ export default function GroupV2() {
|
||||
getInviteCodeFromQueryAndUpdate(query);
|
||||
});
|
||||
|
||||
Taro.showShareMenu({
|
||||
withShareTicket: true,
|
||||
});
|
||||
|
||||
useShareAppMessage(() =>
|
||||
getCommonShareMessage({ inviteCode, title: '邀请你加入本地主播求职招聘群', path: PageUrl.GroupV2 })
|
||||
);
|
||||
@ -42,12 +38,12 @@ export default function GroupV2() {
|
||||
if (!checkCityCode(cityCode)) {
|
||||
return;
|
||||
}
|
||||
const group = serviceUrls.find(g => String(g.cityCode) === cityCode);
|
||||
const group = cityOperators.find(g => String(g.cityCode) === cityCode);
|
||||
if (group) {
|
||||
openCustomerServiceChat(group.serviceUrl);
|
||||
openCustomerServiceChat(group.groupLink);
|
||||
}
|
||||
},
|
||||
[serviceUrls]
|
||||
[cityOperators]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user