<template>
	<view class="content">
		<view class="" v-for="(item,index) in 4" :key='index'>
			<view class="flex">
				<view class="">中国银行</view>
				<view>鲅鱼圈支行</view>
			</view>
			<view class="flex">收款人：张三</view>
			<view class="flex flex-end">112 312 312 3123 1231 3123</view>
			<view>
				<view>
					<radio :value="value" />
					<view>设为默认收款账户</view>
				</view>
				<view>
					<view @click="edit">修改</view>
					<view>删除</view>
				</view>
			</view>
		</view>
		<view @click="addBankCard">添加银行卡</view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
				value: '111'
			};
		},
		computed: {
			...mapState(['hasLogin', 'userInfo']),
		},
		onLoad() {
			if (!this.hasLogin) {
				uni.$u.route('/pages/public/login');
			}
		},
		methods: {
			addBankCard() {
				uni.$u.route('/pages/mine/manageBankCards/addBankCard');
			},
			edit() {
				uni.$u.route('/pages/mine/manageBankCards/editBankCard');
				let params = {
					type: 'success',
					message: "修改成功",
					iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
				}
				this.$refs.uToast.show({
					...params
				})
			},
		},

	}
</script>

<style lang="scss">

</style>
