|  |  | 
 |  |  | <template> | 
 |  |  |   <ContentScrollView> | 
 |  |  |     <div class="bind-bank-card-wrapper"> | 
 |  |  |       <div class="bg-left-top"></div> | 
 |  |  |       <div class="bind-bank-card-content"> | 
 |  |  |         <div class="bank-card-name">{{ '招商银行' }}</div> | 
 |  |  |         <div class="bank-card-number">{{ '**** **** **** 1234' }}</div> | 
 |  |  |         <div class="bank-card-type">{{ '储蓄卡' }}</div> | 
 |  |  |       </div> | 
 |  |  |       <div class="bg-right-bottom"></div> | 
 |  |  |     </div> | 
 |  |  |     <div class="bind-bank-card-tips">目前只支持一张银行卡,如需换卡请先解绑</div> | 
 |  |  |   </ContentScrollView> | 
 |  |  |   <PageFooter :isOnlyAction="false"> | 
 |  |  |     <PageFooterBtn type="primary" @click="handleUnbind()">解绑银行卡</PageFooterBtn> | 
 |  |  |   </PageFooter> | 
 |  |  |   <BindWalletView | 
 |  |  |     :type="EnumUserBankCardAccess.Bank" | 
 |  |  |     :detail="detail" | 
 |  |  |     @Unbind="handleUnbind" | 
 |  |  |   ></BindWalletView> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | <script setup lang="ts"> | 
 |  |  | import { useUserStore } from '@/stores/modules/user'; | 
 |  |  | import Taro from '@tarojs/taro'; | 
 |  |  | import { Message } from '@12333/utils'; | 
 |  |  | import * as userServices from '@12333/services/apiV2/user'; | 
 |  |  | import { EnumUserBankCardAccess } from '@12333/constants'; | 
 |  |  | import { BindWalletView } from '@12333/components'; | 
 |  |  | import { usePersonalUserBankCard } from '../hooks'; | 
 |  |  | import { goBack } from '@/utils'; | 
 |  |  |  | 
 |  |  | defineOptions({ | 
 |  |  |   name: 'InnerPage', | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const userStore = useUserStore(); | 
 |  |  | const { updateUserInfo } = useUser(); | 
 |  |  |  | 
 |  |  | function handleUnbind() {} | 
 |  |  | const { detail } = usePersonalUserBankCard({ | 
 |  |  |   access: EnumUserBankCardAccess.Bank, | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | async function handleUnbind() { | 
 |  |  |   try { | 
 |  |  |     await Message.confirm({ message: '确定要解绑银行卡吗?' }); | 
 |  |  |     let params: API.DeletePersonalUserBankCardCommand = { | 
 |  |  |       access: EnumUserBankCardAccess.Bank, | 
 |  |  |     }; | 
 |  |  |     let res = await userServices.deletePersonalUserBankCard(params); | 
 |  |  |     if (res) { | 
 |  |  |       Message.success('解绑成功', { | 
 |  |  |         onClosed() { | 
 |  |  |           updateUserInfo(); | 
 |  |  |           goBack(); | 
 |  |  |         }, | 
 |  |  |       }); | 
 |  |  |     } | 
 |  |  |   } catch (error) {} | 
 |  |  | } | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | <style lang="scss"> | 
 |  |  | @import '@/styles/common.scss'; | 
 |  |  |  | 
 |  |  | .bindBankCard-page-wrapper { | 
 |  |  |   .bind-bank-card-wrapper { | 
 |  |  |     margin: 20px auto 0; | 
 |  |  |     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-bank-card-content { | 
 |  |  |       display: flex; | 
 |  |  |       flex-direction: column; | 
 |  |  |       justify-content: space-between; | 
 |  |  |       height: 100%; | 
 |  |  |       position: relative; | 
 |  |  |       z-index: 1; | 
 |  |  |  | 
 |  |  |       .bank-card-name { | 
 |  |  |         font-size: 40px; | 
 |  |  |         font-weight: 600; | 
 |  |  |         color: #ffffff; | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       .bank-card-number { | 
 |  |  |         font-size: 32px; | 
 |  |  |         color: #ffffff; | 
 |  |  |         font-weight: 600; | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       .bank-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-bank-card-tips { | 
 |  |  |     margin: 66px auto 0; | 
 |  |  |     font-size: 22px; | 
 |  |  |     font-weight: 400; | 
 |  |  |     text-align: center; | 
 |  |  |     color: boleGetCssVar('text-color', 'secondary'); | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | </style> |