<template>
	<view class="wb-page">
		<view class="wb-section">
			<view class="wb-row">
				<text class="wb-label">银行名称</text>
				<text class="wb-value">{{ detail.bankName || '-' }}</text>
			</view>
			<view class="wb-row">
				<text class="wb-label">银行卡号</text>
				<text class="wb-value">{{ maskCard(detail.bankCardNum) }}</text>
			</view>
			<view class="wb-row">
				<text class="wb-label">开户行</text>
				<text class="wb-value">{{ detail.openingBank || '-' }}</text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			detail: {},
		}
	},
	onLoad(query) {
		this.detail = { ...query }
	},
	methods: {
		maskCard(num) {
			if (!num) return '-'
			const str = String(num)
			return `**** **** **** ${str.slice(-4)}`
		},
	},
}
</script>

<style lang="scss" scoped>
@import '../common/page.scss';
</style>
