| | |
| | | <template> |
| | | <PageLayout title="代理招募" class="applyAgent-page-wrapper" hasBgColor :needAuth="false"> |
| | | <ContentScrollView hasPaddingTop style="background-color: transparent"> |
| | | <div>AgentRecruitment</div> |
| | | <PageLayout title="代理招募" class="agentRecruitment-page-wrapper" hasBgColor :needAuth="false"> |
| | | <ContentScrollView :paddingH="false"> |
| | | <div class="agentRecruitment-page-content"> |
| | | <Image |
| | | :src="OssAssets.mine.AgentRecruitmentBg" |
| | | class="agentRecruitment-page-bg" |
| | | mode="widthFix" |
| | | /> |
| | | <div class="agentRecruitment-page-main"> |
| | | <Image |
| | | class="agentRecruitment-page-img-item retail" |
| | | :src="OssAssets.mine.AgentRecruitmentRetail" |
| | | alt="" |
| | | mode="widthFix" |
| | | /> |
| | | <Image |
| | | class="agentRecruitment-page-img-item brand" |
| | | :src="OssAssets.mine.AgentRecruitmentBrand" |
| | | alt="" |
| | | mode="widthFix" |
| | | /> |
| | | <Image |
| | | class="agentRecruitment-page-img-item" |
| | | :src="OssAssets.mine.AgentRecruitmentArea" |
| | | alt="" |
| | | mode="widthFix" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </ContentScrollView> |
| | | <PageFooter> |
| | | <PageFooterBtn type="primary" @click="submit">立即申请</PageFooterBtn> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import { RouterPath } from '@/constants'; |
| | | import { RouterPath, OssAssets } from '@/constants'; |
| | | import { Image } from '@tarojs/components'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { useLifeRechargeContext } from '@life-payment/core-vue'; |
| | | import { useUser } from '@/hooks'; |
| | | import { isH5, isInWeChat } from '@/utils/env'; |
| | | |
| | | defineOptions({ |
| | | name: 'AgentRecruitment', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | |
| | | const promoterIdNumber = router.params?.promoterIdNumber ?? ''; |
| | | //微信网页授权code 需要重定向获取 会导致多次触发onMounted |
| | | const code = router.params.code ?? ''; |
| | | |
| | | onMounted(() => { |
| | | if (promoterIdNumber) { |
| | | if (isH5 && isInWeChat) { |
| | | if (!code) setClickCount(); |
| | | } else { |
| | | setClickCount(); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | function submit() { |
| | | RouteHelper.navigateTo({ |
| | | url: RouterPath.applyAgent, |
| | | url: promoterIdNumber |
| | | ? `${RouterPath.applyAgent}?promoterIdNumber=${promoterIdNumber}` |
| | | : RouterPath.applyAgent, |
| | | }); |
| | | } |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | async function setClickCount() { |
| | | try { |
| | | let res = await blLifeRecharge.services.setClickCount({ |
| | | idnumber: promoterIdNumber, |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .agentRecruitment-page-content { |
| | | width: 100%; |
| | | position: relative; |
| | | |
| | | .agentRecruitment-page-bg { |
| | | width: 100%; |
| | | object-fit: cover; |
| | | } |
| | | |
| | | .agentRecruitment-page-main { |
| | | position: absolute; |
| | | top: 930px; |
| | | left: 0; |
| | | width: 100%; |
| | | |
| | | .agentRecruitment-page-img-item { |
| | | width: 100%; |
| | | height: auto; |
| | | object-fit: cover; |
| | | |
| | | &.retail { |
| | | margin-bottom: 32px; |
| | | } |
| | | |
| | | &.brand { |
| | | margin-bottom: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |