feat: update of partner
This commit is contained in:
@ -6,5 +6,17 @@
|
||||
--tabs-active-color: @blHighlightColor;
|
||||
--tabs-nav-background-color: #fff;
|
||||
--tabs-wrap-height: 98px;
|
||||
|
||||
> .taroify-tabs__wrap {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
> .taroify-tabs__content {
|
||||
padding-top: var(--tabs-wrap-height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,35 +1,38 @@
|
||||
import { useShareAppMessage } from '@tarojs/taro';
|
||||
|
||||
import { Tabs } from '@taroify/core';
|
||||
import { useState } from 'react';
|
||||
|
||||
import PartnerIntro, { PartnerIntroFooter } from '@/components/partner-intro';
|
||||
import PartnerIntro from '@/components/partner-intro';
|
||||
import PartnerInviteList from '@/components/partner-invite-list';
|
||||
import PartnerProfit from '@/components/partner-profit';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import { getCommonShareMessage } from '@/utils/share';
|
||||
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'partner';
|
||||
|
||||
export default function Partner() {
|
||||
const [tab, setTab] = useState(0);
|
||||
const inviteCode = useInviteCode();
|
||||
|
||||
useShareAppMessage(() => {
|
||||
return getCommonShareMessage(false);
|
||||
console.log('Partner inviteCode', inviteCode);
|
||||
return getCommonShareMessage(false, inviteCode);
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<Tabs swipeable className={`${PREFIX}__tabs`} value={tab} onChange={setTab}>
|
||||
<Tabs className={`${PREFIX}__tabs`}>
|
||||
<Tabs.TabPane value={0} title="简介">
|
||||
<PartnerIntro />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane value={1} title="邀请名单">
|
||||
邀请名单
|
||||
<PartnerInviteList />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane value={2} title="我的收益">
|
||||
我的收益
|
||||
<PartnerProfit />
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
{tab === 0 && <PartnerIntroFooter />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user