<template>
    <view class="container">
        <!-- 自定义头部 -->
        <view class="custom-header">
            <view class="header-left" @click="navBack">
                <image class="back-icon" src="/static/icons/chevron_right_dark.svg" style="transform: rotate(180deg);"></image>
            </view>
            <text class="header-title">银行卡信息</text>
            <view class="header-right"></view>
        </view>
        <view class="header-placeholder"></view>

        <!-- 银行卡卡片 -->
        <view class="bank-card">
            <view class="card-top">
                <view class="bank-info">
                    <view class="bank-icon-circle">
                        <text class="bank-icon-text">招</text>
                    </view>
                    <text class="bank-name">招商银行</text>
                </view>
                <view class="card-type">储蓄卡</view>
            </view>
            <view class="card-number">622588******1234</view>
            <view class="card-bg-circle"></view>
        </view>

        <!-- 修改按钮 -->
        <button class="action-btn" @click="editBank">修改银行卡信息</button>

        <!-- 底部提示 -->
        <view class="security-tip">
            <image class="shield-icon" src="/static/icons/shield.svg" v-if="hasShieldIcon"></image>
            <text>信息已加密，仅用于收入发放</text>
        </view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            hasShieldIcon: false // 如果没有盾牌图标资源，暂时隐藏或用文字代替
        }
    },
    methods: {
        navBack() {
             uni.navigateBack({
                delta: 1
            });
        },
        editBank() {
            uni.showToast({ title: '跳转修改银行卡页', icon: 'none' });
        }
    }
}
</script>

<style>
page {
    background-color: #F8F8F8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 88rpx;
    padding-top: var(--status-bar-height);
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 30rpx;
    padding-right: 30rpx;
    box-sizing: content-box;
    z-index: 100;
}
.header-placeholder {
    height: calc(88rpx + var(--status-bar-height));
}
.back-icon {
    width: 40rpx;
    height: 40rpx;
}
.header-title {
    font-size: 28rpx;
    font-weight: bold;
    color: #333;
}
.header-right {
    width: 40rpx;
}

.container {
    padding: 30rpx;
}

.bank-card {
    background: linear-gradient(135deg, #E53935, #C62828);
    border-radius: 20rpx;
    padding: 40rpx;
    color: #fff;
    margin-bottom: 60rpx;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10rpx 30rpx rgba(229, 57, 53, 0.3);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60rpx;
    position: relative;
    z-index: 2;
}
.bank-info {
    display: flex;
    align-items: center;
}
.bank-icon-circle {
    width: 60rpx;
    height: 60rpx;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20rpx;
}
.bank-icon-text {
    color: #C62828;
    font-weight: bold;
    font-size: 32rpx;
}
.bank-name {
    font-size: 32rpx;
    font-weight: bold;
}
.card-type {
    font-size: 24rpx;
    border: 1px solid rgba(255,255,255,0.6);
    padding: 4rpx 12rpx;
    border-radius: 8rpx;
}

.card-number {
    font-size: 48rpx;
    font-family: monospace;
    letter-spacing: 4rpx;
    position: relative;
    z-index: 2;
    text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.2);
}

.card-bg-circle {
    position: absolute;
    top: -50rpx;
    right: -50rpx;
    width: 300rpx;
    height: 300rpx;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 1;
}

.action-btn {
    background-color: #FF5722;
    color: #fff;
    font-size: 32rpx;
    border-radius: 44rpx;
    height: 88rpx;
    line-height: 88rpx;
    margin-bottom: 30rpx;
}

.security-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24rpx;
    color: #999;
}
.shield-icon {
    width: 24rpx;
    height: 24rpx;
    margin-right: 10rpx;
}
</style>
