wupengfei
2025-06-05 f730b212e0cfbe94039f48201562eed859126b0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<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 { goBack } from '@/utils';
import type { ComponentExposed } from 'vue-component-type-helpers';
 
defineOptions({
  name: 'generatePromotionCode',
});
 
const generatePromotionCodeViewRef = useTemplateRef<
  ComponentExposed<typeof GeneratePromotionCodeView>
>('generatePromotionCodeViewRef');
 
function handleSubmit() {
  generatePromotionCodeViewRef.value?.handleSubmit?.();
}
 
function submit() {
  RouteHelper.navigateTo({
    url: RouterPath.applyResult,
  });
}
</script>