<template>
|
<PageLayout
|
title="生成推广码"
|
class="generatePromotionCode-page-wrapper"
|
hasBgColor
|
:needAuth="false"
|
>
|
<ContentScrollView hasPaddingTop style="background-color: transparent">
|
<GeneratePromotionCodeView @submit="submit" ref="generatePromotionCodeViewRef" />
|
</ContentScrollView>
|
<PageFooter>
|
<PageFooterBtn type="primary" @click="handleSubmit">生成我的推广码</PageFooterBtn>
|
</PageFooter>
|
</PageLayout>
|
</template>
|
|
<script setup lang="ts">
|
import { PageLayout } from '@/components';
|
import { RouterPath } from '@/constants';
|
import { GeneratePromotionCodeView } from '@life-payment/components';
|
import type { ComponentExposed } from 'vue-component-type-helpers';
|
import Taro from '@tarojs/taro';
|
|
defineOptions({
|
name: 'generatePromotionCode',
|
});
|
|
const generatePromotionCodeViewRef = useTemplateRef<
|
ComponentExposed<typeof GeneratePromotionCodeView>
|
>('generatePromotionCodeViewRef');
|
|
function handleSubmit() {
|
generatePromotionCodeViewRef.value?.handleSubmit?.();
|
}
|
|
function submit(value: string) {
|
RouteHelper.navigateTo({
|
url: `${RouterPath.promotionQrcode}?promoterIdNumber=${value}`,
|
});
|
}
|
</script>
|