wupengfei
3 天以前 69b355fa959028502a0e663cc961b9e513ceb819
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<template>
  <ContentScrollView>
    <div class="bind-wallet-card">
      <div class="bind-wallet-card-wrapper">
        <div class="bg-left-top"></div>
        <div class="bind-wallet-card-content">
          <div class="wallet-card-name">{{ props.detail?.bank ?? '' }}</div>
          <div class="wallet-card-number">
            <div class="wallet-card-number-text" @click="changeBankCodeShow">
              {{
                hideBankCode
                  ? showBankCodeForEnd4(props.detail?.code ?? '')
                  : props.detail?.code ?? ''
              }}
            </div>
          </div>
        </div>
        <div class="bg-right-bottom"></div>
      </div>
      <div class="bind-wallet-card-tips">
        {{ `目前只支持绑定一个${EnumUserBankCardAccessText[props.type]}账号,如需更换请先解绑` }}
      </div>
    </div>
  </ContentScrollView>
  <PageFooter :isOnlyAction="false">
    <PageFooterBtn type="primary" @click="emit('Unbind')">{{
      `解绑${EnumUserBankCardAccessText[props.type]}`
    }}</PageFooterBtn>
  </PageFooter>
</template>
 
<script setup lang="ts">
import { showBankCodeForEnd4 } from '@12333/utils';
import { EnumUserBankCardAccess, EnumUserBankCardAccessText } from '@12333/constants';
import { ref } from 'vue';
 
defineOptions({
  name: 'BindWalletView',
});
 
type Props = {
  type: EnumUserBankCardAccess;
  detail: API.GetPersonalUserBankCardQueryResult;
};
 
const props = withDefaults(defineProps<Props>(), {});
 
const emit = defineEmits<{
  (e: 'Unbind'): void;
}>();
 
const hideBankCode = ref(true);
 
function changeBankCodeShow() {
  hideBankCode.value = !hideBankCode.value;
}
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.bind-wallet-card {
  padding-top: 40px;
 
  .bind-wallet-card-wrapper {
    margin: 0 auto;
    width: 660px;
    height: 360px;
    padding: 60px 72px;
    background: linear-gradient(134deg, #6c7ff6 0%, #7996f7 100%);
    box-shadow: 0px 4 10px 5px rgba(122, 151, 248, 0.3);
    border-radius: 22px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
 
    .bg-left-top {
      position: absolute;
      width: 148px;
      height: 130px;
      background-color: #7c8ef7;
      top: 0;
      left: 0;
      border-radius: 0 0 148px 0;
      z-index: 0;
    }
 
    .bind-wallet-card-content {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      height: 100%;
      position: relative;
      z-index: 1;
 
      .wallet-card-name {
        font-size: 40px;
        font-weight: 600;
        color: #ffffff;
      }
 
      .wallet-card-number {
        font-size: 32px;
        color: #ffffff;
        font-weight: 600;
      }
 
      .wallet-card-type {
        font-size: 24px;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.5);
      }
    }
 
    .bg-right-bottom {
      position: absolute;
      width: 306px;
      height: 306px;
      background: #7d98f7;
      left: 360px;
      top: 180px;
      border-radius: 50%;
      z-index: 0;
    }
  }
 
  .bind-wallet-card-tips {
    margin: 66px auto 0;
    font-size: 22px;
    font-weight: 400;
    text-align: center;
    color: boleGetCssVar('text-color', 'secondary');
  }
}
</style>