| | |
| | | ] |
| | | } |
| | | }, |
| | | "libVersion": "3.10.0" |
| | | "libVersion": "3.10.3" |
| | | } |
| | |
| | | 'bindBankCard/bindBankCard', |
| | | 'unboundBankCard/unboundBankCard', |
| | | 'unboundAlipay/unboundAlipay', |
| | | 'bindAlipay/bindAlipay', |
| | | 'incomeDetail/incomeDetail', |
| | | 'incomeDetailInfo/incomeDetailInfo', |
| | | 'withdraw/withdraw', |
| | |
| | | |
| | | mineWallet = '/subpackages/wallet/mineWallet/mineWallet', |
| | | unboundBankCard = '/subpackages/wallet/unboundBankCard/unboundBankCard', |
| | | unboundAlipay = '/subpackages/wallet/unboundAlipay/unboundAlipay', |
| | | bindBankCard = '/subpackages/wallet/bindBankCard/bindBankCard', |
| | | unboundAlipay = '/subpackages/wallet/unboundAlipay/unboundAlipay', |
| | | bindAlipay = '/subpackages/wallet/bindAlipay/bindAlipay', |
| | | incomeDetail = '/subpackages/wallet/incomeDetail/incomeDetail', |
| | | incomeDetailInfo = '/subpackages/wallet/incomeDetailInfo/incomeDetailInfo', |
| | | withdraw = '/subpackages/wallet/withdraw/withdraw', |
| New file |
| | |
| | | <template> |
| | | <BindWalletView |
| | | :type="EnumUserBankCardAccess.AliPay" |
| | | :detail="detail" |
| | | @Unbind="handleUnbind" |
| | | ></BindWalletView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | 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'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const switchTab = useSwitchTab(); |
| | | |
| | | const { detail } = usePersonalUserBankCard({ |
| | | access: EnumUserBankCardAccess.AliPay, |
| | | }); |
| | | |
| | | async function handleUnbind() { |
| | | try { |
| | | await Message.confirm({ message: '确定要解绑支付宝吗?' }); |
| | | let params: API.DeletePersonalUserBankCardCommand = { |
| | | access: EnumUserBankCardAccess.AliPay, |
| | | }; |
| | | let res = await userServices.deletePersonalUserBankCard(params); |
| | | if (res) { |
| | | Message.success('解绑成功', { |
| | | onClosed() { |
| | | switchTab({ |
| | | url: RouterPath.mine, |
| | | }); |
| | | }, |
| | | }); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | </style> |
| New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
| New file |
| | |
| | | <template> |
| | | <PageLayout class="bindAlipay-page-wrapper" :title="'绑定支付宝'"> |
| | | <InnerPage></InnerPage> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'bindAlipay', |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | </style> |
| | |
| | | <template> |
| | | <ContentScrollView> |
| | | <div class="bind-bank-card"> |
| | | <div class="bind-bank-card-wrapper"> |
| | | <div class="bg-left-top"></div> |
| | | <div class="bind-bank-card-content"> |
| | | <div class="bank-card-name">{{ detail?.bank ?? '' }}</div> |
| | | <div class="bank-card-number"> |
| | | <div class="bank-card-number-text" @click="changeBankCodeShow"> |
| | | {{ hideBankCode ? showBankCodeForEnd4(detail?.code ?? '') : detail?.code ?? '' }} |
| | | </div> |
| | | </div> |
| | | <!-- <div class="bank-card-type">{{ '储蓄卡' }}</div> --> |
| | | </div> |
| | | <div class="bg-right-bottom"></div> |
| | | </div> |
| | | <div class="bind-bank-card-tips">目前只支持一张银行卡,如需换卡请先解绑</div> |
| | | </div> |
| | | </ContentScrollView> |
| | | <PageFooter :isOnlyAction="false"> |
| | | <PageFooterBtn type="primary" @click="handleUnbind()">解绑银行卡</PageFooterBtn> |
| | | </PageFooter> |
| | | <BindWalletView |
| | | :type="EnumUserBankCardAccess.AliPay" |
| | | :detail="detail" |
| | | @Unbind="handleUnbind" |
| | | ></BindWalletView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { Message, showBankCodeForEnd4 } from '@12333/utils'; |
| | | import { Message } from '@12333/utils'; |
| | | import * as userServices from '@12333/services/apiV2/user'; |
| | | import Taro from '@tarojs/taro'; |
| | | import { EnumUserBankCardAccess } from '@12333/constants'; |
| | | import { BindWalletView } from '@12333/components'; |
| | | import { usePersonalUserBankCard } from '../hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | |
| | | |
| | | const switchTab = useSwitchTab(); |
| | | |
| | | const hideBankCode = ref(true); |
| | | |
| | | function changeBankCodeShow() { |
| | | hideBankCode.value = !hideBankCode.value; |
| | | } |
| | | |
| | | const { |
| | | isLoading, |
| | | isError, |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['userServices/getPersonalUserBankCard'], |
| | | queryFn: async () => { |
| | | return await userServices.getPersonalUserBankCard( |
| | | { access: EnumUserBankCardAccess.Bank }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetPersonalUserBankCardQueryResult), |
| | | onSuccess(data) {}, |
| | | const { detail } = usePersonalUserBankCard({ |
| | | access: EnumUserBankCardAccess.Bank, |
| | | }); |
| | | |
| | | async function handleUnbind() { |
| | |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .bindBankCard-page-wrapper { |
| | | .bind-bank-card { |
| | | padding-top: 40px; |
| | | |
| | | .bind-bank-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-bank-card-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | 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> |
| | |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as userServices from '@12333/services/apiV2/user'; |
| | | import { MaybeRef, unref } from 'vue'; |
| | | import { EnumUserBankCardAccess } from '@12333/constants'; |
| | | |
| | | type UsePersonalUserTransactionOptions = { |
| | | id?: MaybeRef<string>; |
| | |
| | | detail, |
| | | }; |
| | | } |
| | | |
| | | type UsePersonalUserBankCardOptions = { |
| | | access?: EnumUserBankCardAccess; |
| | | }; |
| | | |
| | | export function usePersonalUserBankCard(options: UsePersonalUserBankCardOptions = {}) { |
| | | const { access } = options; |
| | | |
| | | const { |
| | | isLoading, |
| | | isError, |
| | | data: detail, |
| | | refetch, |
| | | } = useQuery({ |
| | | queryKey: ['userServices/getPersonalUserBankCard'], |
| | | queryFn: async () => { |
| | | return await userServices.getPersonalUserBankCard( |
| | | { access: access }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | placeholderData: () => ({} as API.GetPersonalUserBankCardQueryResult), |
| | | onSuccess(data) {}, |
| | | }); |
| | | |
| | | return { |
| | | detail, |
| | | }; |
| | | } |
| | |
| | | const goBankAlipay = useAccessReal( |
| | | () => { |
| | | Taro.navigateTo({ |
| | | url: `${isBindAlipay.value ? RouterPath.bindBankCard : RouterPath.unboundAlipay}`, |
| | | url: `${isBindAlipay.value ? RouterPath.bindAlipay : RouterPath.unboundAlipay}`, |
| | | }); |
| | | }, |
| | | { message: '完成实名认证后才可进行支付宝绑定' } |
| New file |
| | |
| | | <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> |
| | |
| | | export { default as SignCard } from './Card/SignCard.vue'; |
| | | export { default as FlexJobCard } from './Card/FlexJobCard.vue'; |
| | | export { default as BusinessCardHolderCard } from './Card/BusinessCardHolderCard.vue'; |
| | | export { default as BindWalletView } from './Card/BindWalletView.vue'; |
| | | export { default as TaskPrice } from './Card/TaskPrice.vue'; |
| | | export { default as TaskDetailWelfareItem } from './Card/TaskDetailWelfareItem.vue'; |
| | | export { default as FlexJobTopView } from './Card/FlexJobTopView.vue'; |
| | |
| | | import { EnumEnterpriseWalletAccess } from './apiEnum'; |
| | | import { EnumEnterpriseWalletAccess, EnumUserBankCardAccess } from './apiEnum'; |
| | | |
| | | export const EnumEnterpriseWalletAccessTextOnlyAlipay = { |
| | | [EnumEnterpriseWalletAccess.Alipay]: '支付宝', |
| | |
| | | [EnumEnterpriseWalletAccess.PingAnPay]: '平安银行结算', |
| | | [EnumEnterpriseWalletAccess.WeChatPay]: '微信结算', |
| | | }; |
| | | |
| | | export const EnumUserBankCardAccessText = { |
| | | [EnumUserBankCardAccess.Bank]: '银行卡', |
| | | [EnumUserBankCardAccess.AliPay]: '支付宝', |
| | | [EnumUserBankCardAccess.WeChatPay]: '微信', |
| | | }; |