<template>
	<view class="content">
		<view class="collection-box">
			<view class="collection-item">
				<view class="left">
					<view class="img"><image src="../../static/user/mybank.png" mode=""></image></view>
					<view class="bank">银行卡</view>
				</view>
				<view class="gg" @click="nav('/pages/collection/bank')">
					<view class="status" v-if="bankData.fullname != null">{{ bankData.fullname}}</view>
					<view class="status" v-else>未添加</view>
					<view class="img1"><text class="iconfont iconenter"></text></view>
				</view>
			</view>
			<view class="collection-item">
				<view class="left">
					<view class="img"><image src="../../static/user/zfb.png" mode=""></image></view>
					<view class="bank">支付宝</view>
				</view>
				<view class="gg" @click="nav('/pages/collection/zfb')">
					<view class="status" v-if="aliData.fullname != null">{{aliData.fullname}}</view>
					<view class="status" v-else>未添加</view>
					<view class="img1"><text class="iconfont iconenter"></text></view>
				</view>
			</view>
			<!-- <view class="collection-item">
				<view class="left">
					<view class="img">
						<image src="../../static/user/wx.png" mode=""></image>
					</view>
					<view class="bank">
						微信
					</view>
				</view>
				<view class="gg" @click="nav('/pages/collection/wx')">
					<view class="status">
						未添加
					</view>
					<view class="img1">
						<text class="iconfont iconenter"></text>
					</view>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
import { mapState, mapMutations } from 'vuex';
export default {
	data() {
		return {
			aliData: {fullname:'',alino:''},
			bankData: {fullname:'',bank:'',bankno:''},
		};
	},
	computed: {
		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
	},
	onShow() {
		this.aliData.fullname = this.userInfo.alipay_name;
		console.log(this.aliData.fullname);
		this.aliData.alino = this.userInfo.alipay_code
		this.bankData.fullname = this.userInfo.bank_user_name;
		this.bankData.bank = this.userInfo.bank_name;
		this.bankData.bankno = this.userInfo.bank_code;
	},
	methods: {
		nav(url) {
			uni.navigateTo({
				url
			});
		}
	}
};
</script>
<style lang="scss">
page,
.content {
	height: 100%;
	margin: 0;
	height: 0;
}

.collection-box {
	background: #ffffff;
	margin: 50rpx 20rpx;
	width: 710rpx;
	display: flex;
	flex-direction: column;

	.collection-item {
		margin: 35rpx 30rpx;
		display: flex;
		justify-content: space-between;

		.left {
			display: flex;

			.img {
				height: 40rpx;
				width: 40rpx;

				image {
					height: 100%;
					width: 100%;
				}
			}

			.bank {
				margin-left: 25rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
			}
		}

		.gg {
			display: flex;

			.status {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
				margin-right: 20rpx;
			}

			.img1 {
				width: 15rpx;
				height: 25rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}
		}
	}
}
</style>
