wupengfei
13 小时以前 2500843dbffc841eeab2e0a91d735c56cb6ea357
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<template>
  <ContentView>
    <div class="promotion-qrcode-content" :style="barStyle">
      <div
        class="promotion-qrcode-content-qrcode"
        :style="{ backgroundImage: `url(${OssAssets.common.PromotionQrcodeContentBG})` }"
      >
        <ShareQrcodeView :channles-num="userChannles[0]?.channlesNum" :size="148" />
        <div class="promotion-qrcode-content-qrcode-tips">长按二维码分享好友</div>
      </div>
      <div class="promotion-qrcode-content-btn">点击下载二维码</div>
    </div>
  </ContentView>
</template>
 
<script setup lang="ts">
import { ShareQrcodeView, ResultWithoutBG } from '@life-payment/components';
import { useLifeRechargeContext } from '@life-payment/core-vue';
import { isWeb } from '@/utils/env';
import { useSystemStore } from '@/stores/modules/system';
import { CSSProperties } from 'vue';
import { OssAssets } from '@/constants';
 
defineOptions({
  name: 'InnerPage',
});
 
// const { virtualUserInfo } = useUser();
const { blLifeRecharge } = useLifeRechargeContext();
 
const userChannles = computed(() =>
  (blLifeRecharge.accountModel.userChannles ?? []).filter(
    (x) => x.switchType !== blLifeRecharge.constants.LifePaySwitchTypeEnum.微信小程序
  )
);
 
const channlesType = ref(userChannles.value[0]?.channlesNum ?? '');
 
watch(userChannles, (val) => {
  channlesType.value = val?.[0]?.channlesNum ?? '';
});
 
const systemStore = useSystemStore();
 
const barStyle = computed(
  () =>
    ({
      paddingTop: systemStore.info.statusBarHeight + 'px',
      backgroundImage: `url(${OssAssets.common.PromotionQrcodeContentBG})`,
    } as CSSProperties)
);
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.promotion-qrcode-page-wrapper {
  .promotion-qrcode-content {
    margin-top: 306px;
    width: 100%;
    height: 788px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
 
  .promotion-qrcode-content-qrcode {
    width: 432px;
    height: 432px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
  }
 
  .promotion-qrcode-content-qrcode-tips {
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    bottom: -22px;
    background: linear-gradient(0.25turn, #63654c 0%, #101f23 39%, #101f23 55%, #0082d3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
 
  .promotion-qrcode-content-btn {
    width: 432px;
    height: 96px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: boleGetCssVar('color', 'primary');
    margin-top: 70px;
    border-radius: 12px;
    font-size: 38px;
    font-weight: 500;
    color: #ffffff;
  }
 
  .share-qrcode-view {
    margin-top: 60px;
    padding: 0;
  }
}
</style>