diff --git a/src/components/prejob-popup/index.tsx b/src/components/prejob-popup/index.tsx
index 7de4e6a..212588b 100644
--- a/src/components/prejob-popup/index.tsx
+++ b/src/components/prejob-popup/index.tsx
@@ -9,7 +9,7 @@ import SafeBottomPadding from '@/components/safe-bottom-padding';
import { PageUrl } from '@/constants/app';
import { CacheKey } from '@/constants/cache-key';
import { GET_CONTACT_TYPE } from '@/constants/job';
-import { switchTab, navigateTo } from '@/utils/route';
+import { navigateTo, switchTab } from '@/utils/route';
import './index.less';
interface IProps {
@@ -42,6 +42,13 @@ const GET_CONTACT_TYPE_OPTIONS = [
// desc: '群内定期发放会员,免费报单',
// btnText: '进群',
// },
+ {
+ type: GET_CONTACT_TYPE.INVITE,
+ icon: '',
+ title: '邀请运营进群(进会员)',
+ desc: '每邀请进一个主播群送一个日会员',
+ btnText: '邀请',
+ },
];
export function PrejobPopup({ onCancel, isCreateResume, onConfirm }: IProps) {
@@ -53,6 +60,10 @@ export function PrejobPopup({ onCancel, isCreateResume, onConfirm }: IProps) {
navigateTo(PageUrl.MaterialUploadVideo);
onConfirm(type);
}
+ if (type === GET_CONTACT_TYPE.INVITE) {
+ navigateTo(PageUrl.InviteOperations);
+ onConfirm(type);
+ }
if (type === GET_CONTACT_TYPE.VIP) {
setOpenPopup(false);
setOpenDialog(true);
diff --git a/src/constants/app.ts b/src/constants/app.ts
index 80e295b..d9601e4 100644
--- a/src/constants/app.ts
+++ b/src/constants/app.ts
@@ -37,6 +37,7 @@ export enum OpenSource {
AnchorPage = 'anchor_page',
MaterialViewPage = 'material_view_page',
GroupOwnerCertificate = 'group_owner_certificate',
+ InviteOperations = 'invite_operations',
}
export enum PageUrl {
@@ -82,6 +83,7 @@ export enum PageUrl {
GiveVip = 'pages/give-vip/index',
GroupOwnerCertificate = 'pages/group-owner-certification/index',
PartnerShareVip = 'pages/partner-share-vip/index',
+ InviteOperations = 'pages/invite-operations/index',
}
export enum PluginUrl {
diff --git a/src/constants/job.ts b/src/constants/job.ts
index efb7f01..ef07746 100644
--- a/src/constants/job.ts
+++ b/src/constants/job.ts
@@ -214,4 +214,5 @@ export enum GET_CONTACT_TYPE {
VIP = 'vip',
MATERIAL = 'material',
GROUP = 'group',
+ INVITE = 'invite',
}
diff --git a/src/hooks/use-config.tsx b/src/hooks/use-config.tsx
index a190aaf..129c13f 100644
--- a/src/hooks/use-config.tsx
+++ b/src/hooks/use-config.tsx
@@ -101,6 +101,7 @@ export const APP_CONFIG: AppConfigType = {
PageUrl.GiveVip,
PageUrl.GroupOwnerCertificate,
PageUrl.PartnerShareVip,
+ PageUrl.InviteOperations,
PageUrl.AccelerateDelegatePublish,
// PageUrl.DevDebug,
],
diff --git a/src/pages/invite-operations/index.config.ts b/src/pages/invite-operations/index.config.ts
new file mode 100644
index 0000000..660d09e
--- /dev/null
+++ b/src/pages/invite-operations/index.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ navigationBarTitleText: '邀请运营',
+});
diff --git a/src/pages/invite-operations/index.less b/src/pages/invite-operations/index.less
new file mode 100644
index 0000000..829adc9
--- /dev/null
+++ b/src/pages/invite-operations/index.less
@@ -0,0 +1,156 @@
+@import '@/styles/variables.less';
+@import '@/styles/common.less';
+
+.invite-operations {
+ &__main {
+ padding-left: 24px;
+ padding-right: 24px;
+ position: relative;
+ }
+
+ &__block {
+ margin-bottom: 12px;
+ position: relative;
+ }
+
+ &__card {
+ background: #fff;
+ border-radius: 24px;
+ padding: 32px;
+ position: relative;
+ }
+
+ &__edging {
+ position: absolute;
+ font-weight: 400;
+ font-size: 26px;
+ line-height: 28px;
+ color: #946724;
+ padding: 18px 24px;
+ background: #FFF4F0;
+ border-radius:0 0 24px 24px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ }
+
+ &__lined-wrapper {
+ text-align: center;
+ margin-top: 40px;
+ }
+ &__lined-title {
+ text-align: center;
+ font-weight: 400;
+ font-size: 28px;
+ line-height: 40px;
+ color: #333333;
+ position: relative;
+ display: inline-block;
+
+ &:before {
+ content: '';
+ position: absolute;
+ left: -68px;
+ width: 56px;
+ height: 1px;
+ background: #ccc;
+ top: 50%;
+ }
+
+ &:after {
+ content: '';
+ position: absolute;
+ right: -68px;
+ width: 56px;
+ height: 1px;
+ background: #ccc;
+ top: 50%;
+ }
+ }
+
+
+ &__h1 {
+ font-weight: 500;
+ font-size: 32px;
+ line-height: 40px;
+ color: #1d2129;
+ margin-bottom: 16px;
+ margin-top: 32px;
+ position: relative;
+ z-index: 0;
+
+ &:first-child {
+ margin-top: 0;
+ }
+
+ &.center {
+ text-align: center;
+ }
+
+ .highlight {
+ color: @blHighlightColor;
+ display: inline-block;
+ }
+ }
+
+ &__body {
+ font-weight: 400;
+ font-size: 28px;
+ line-height: 40px;
+ color: @blColor;
+ }
+
+ &__title {
+ margin-bottom: 24px;
+ font-weight: 500;
+ font-size: 32px;
+ line-height: 32px;
+ color: #1d2129;
+
+ &:before {
+ left: -138px;
+ width: 120px;
+ }
+
+ &:after {
+ right: -138px;
+ width: 120px;
+ }
+ }
+
+ &__copy {
+ .button(@height: 72px; @width: 384px; @fontSize: 28px; @fontWeight: 400; @borderRadius: 44px; @highlight: 0);
+ margin-top: 32px;
+ }
+
+ &__city-select {
+ background: #F7F7F7;
+ border-radius: 16px;
+ padding: 34px 32px;
+ font-weight: 400;
+ font-size: 32px;
+ margin-top: 24px;
+ line-height: 32px;
+ color: #333333;
+ display: flex;
+ justify-content: space-between;
+ }
+ &__qrcode {
+ width: 280px;
+ height: 280px;
+ background: #6F7686;
+ display: block;
+ margin: auto auto 24px;
+ }
+
+ &__action-block {
+ background: #F7F7F7;
+ border-radius: 16px;
+ padding: 32px 0;
+ .flex-column();
+ text-align: center;
+ color: @blHighlightColor;
+ font-size: 28px;
+ font-weight: 400;
+ }
+}
diff --git a/src/pages/invite-operations/index.tsx b/src/pages/invite-operations/index.tsx
new file mode 100644
index 0000000..cfa09a3
--- /dev/null
+++ b/src/pages/invite-operations/index.tsx
@@ -0,0 +1,117 @@
+import { Button, Image } from '@tarojs/components';
+import Taro from '@tarojs/taro';
+
+import { Arrow } from '@taroify/icons';
+import { Fragment, useCallback, useEffect, useState } from 'react';
+
+import { EventName, OpenSource, PageUrl } from '@/constants/app';
+import { CITY_CODE_TO_NAME_MAP } from '@/constants/city';
+import useLocation from '@/hooks/use-location';
+import useUserInfo from '@/hooks/use-user-info';
+import { StaffInfo } from '@/types/partner';
+import { copy } from '@/utils/common';
+import { getStaffInfo } from '@/utils/partner';
+import { navigateTo } from '@/utils/route';
+import './index.less';
+
+const PREFIX = 'invite-operations';
+
+export default function InviteOperations() {
+ const location = useLocation();
+ const userInfo = useUserInfo();
+ const [cityCode, setCityCode] = useState
(location.cityCode);
+ const [staffInfo, setStaffInfo] = useState(null);
+
+ const handleClickCityMenu = useCallback(() => {
+ navigateTo(PageUrl.CitySearch, { city: cityCode || location.cityCode, source: OpenSource.InviteOperations });
+ }, [cityCode, location.cityCode]);
+
+ const handleCityChange = useCallback(data => {
+ console.log('handleCityChange', data);
+ const { openSource, cityCode: cCode } = data;
+ if (openSource !== OpenSource.InviteOperations) {
+ return;
+ }
+ setCityCode(cCode);
+ }, []);
+
+ const handleCopy = useCallback(() => {
+ copy(`我的ID是:${userInfo.userId},邀你进主播群`);
+ }, [userInfo.userId]);
+
+ useEffect(() => {
+ Taro.eventCenter.on(EventName.SELECT_CITY, handleCityChange);
+ return () => {
+ Taro.eventCenter.off(EventName.SELECT_CITY, handleCityChange);
+ };
+ }, [handleCityChange]);
+
+ useEffect(() => {
+ if (!cityCode) return;
+
+ getStaffInfo(cityCode)
+ .then(data => {
+ setStaffInfo(data);
+ })
+ .catch(() => {
+ setStaffInfo(null);
+ });
+ }, [cityCode]);
+
+ return (
+
+
+
+
+
+
邀请播络运营进带货主播群
+
+ 每邀请进一个群送一个日会员
+
+
注:只能邀请带货主播群,请勿邀请其他群
+
+
+
+
+
+
+
+
+
我的ID是:{userInfo.userId},邀你进主播群
+
+
+
+
+ {cityCode ? CITY_CODE_TO_NAME_MAP.get(cityCode) : '请选择城市'}
+
+
+ {staffInfo && (
+
+
+
+
+ )}
+
+
+
+
+
+ );
+}