feat: 广告
This commit is contained in:
3
src/pages/partner-share/index.config.ts
Normal file
3
src/pages/partner-share/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '分享',
|
||||
});
|
||||
57
src/pages/partner-share/index.less
Normal file
57
src/pages/partner-share/index.less
Normal file
@ -0,0 +1,57 @@
|
||||
@import '@/styles/common.less';
|
||||
@import '@/styles/variables.less';
|
||||
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.partner-share {
|
||||
padding-top: 175px;
|
||||
&__money {
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
&__header {
|
||||
.flex-column();
|
||||
justify-content: center;
|
||||
font-weight: 500;
|
||||
font-size: 48px;
|
||||
line-height: 48px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
&__body {
|
||||
padding-top: 86px;
|
||||
.flex-column();
|
||||
}
|
||||
|
||||
&__item {
|
||||
.flex-row();
|
||||
margin-top: 72px;
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
line-height: 48px;
|
||||
width: 640px;
|
||||
|
||||
color: #000000;
|
||||
.highlight {
|
||||
color: @blHighlightColor;
|
||||
font-weight: 400;
|
||||
padding-left: 8px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
&__no {
|
||||
width: 74px;
|
||||
height: 46px;
|
||||
margin-right: 21px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
&__btn {
|
||||
.button(@width: 360px; @height: 72px;);
|
||||
margin-top: 150px;
|
||||
}
|
||||
}
|
||||
61
src/pages/partner-share/index.tsx
Normal file
61
src/pages/partner-share/index.tsx
Normal file
@ -0,0 +1,61 @@
|
||||
import { Button, Image } from '@tarojs/components';
|
||||
import Taro, { useDidShow, useShareAppMessage } from '@tarojs/taro';
|
||||
|
||||
import { EventName } from '@/constants/app';
|
||||
import useInviteCode from '@/hooks/use-invite-code';
|
||||
import { hasShareToGetContact, setShareToGetContact } from '@/utils/job';
|
||||
import { navigateBack } from '@/utils/route';
|
||||
import { getCommonShareMessage } from '@/utils/share';
|
||||
|
||||
import './index.less';
|
||||
|
||||
const PREFIX = 'partner-share';
|
||||
|
||||
export default function Partner() {
|
||||
const inviteCode = useInviteCode();
|
||||
useDidShow(() => {
|
||||
if (!hasShareToGetContact()) {
|
||||
Taro.eventCenter.trigger(EventName.PRE_ACTION_SHARE_SUCCESS);
|
||||
navigateBack(-1);
|
||||
}
|
||||
});
|
||||
useShareAppMessage(() => {
|
||||
setShareToGetContact();
|
||||
console.log('Partner inviteCode', inviteCode);
|
||||
return getCommonShareMessage({ useCapture: false, inviteCode });
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={PREFIX}>
|
||||
<div className={`${PREFIX}__header`}>
|
||||
<Image
|
||||
src="https://publiccdn.neighbourhood.com.cn/img/money.png"
|
||||
mode="aspectFit"
|
||||
className={`${PREFIX}__money`}
|
||||
/>
|
||||
<div>分享可获3重收益</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__body`}>
|
||||
<div className={`${PREFIX}__item`}>
|
||||
<Image src="https://publiccdn.neighbourhood.com.cn/img/01.svg" mode="aspectFit" className={`${PREFIX}__no`} />
|
||||
<div>
|
||||
直接获得被邀请人支付金额<div className="highlight">20%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__item`}>
|
||||
<Image src="https://publiccdn.neighbourhood.com.cn/img/02.svg" mode="aspectFit" className={`${PREFIX}__no`} />
|
||||
<div>邀请的主播被企业开聊,即可获得分润</div>
|
||||
</div>
|
||||
<div className={`${PREFIX}__item`}>
|
||||
<Image src="https://publiccdn.neighbourhood.com.cn/img/03.svg" mode="aspectFit" className={`${PREFIX}__no`} />
|
||||
<div>
|
||||
获得被邀请人再邀请他人收益的<div className="highlight">5%</div>
|
||||
</div>
|
||||
</div>
|
||||
<Button className={`${PREFIX}__btn`} openType="share">
|
||||
立即分享
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user