<template>
	<view class="content">

		 <view class="item flex-y-center ft26" v-for="(item,index) of countryList" :key='index' @click="bindCountry"  :data-id='item.id' :data-name="item.name">
		 	 {{index+1}}.{{item.name}}
		 </view>

	</view>

</template>

<script>
	
	export default {
		data() {
			return {
			  countryList: [],
			  type:null,
			}
		},
		
		onLoad(e) {
			this.request({
				url: "Advertiser/bank",
				data: {
					token: uni.getStorageSync("token"),
				},
			  }).then(res => {
				console.log(res,"res")
				if (res.code === '200') {
					this.countryList=res.data;
				}
			});		
		},
		methods: {	
			bindCountry(event){
				var id = event.currentTarget.dataset.id;
				var name = event.currentTarget.dataset.name;
				uni.setStorageSync("bank-name",name);
				uni.navigateBack();
		   }
		   
		}
	}
</script>

<style>
		@import url("@/static/css/header.css");
	.disc{
		padding: 20rpx;
	}
	.item{
		padding: 0 20rpx;
		height: 80rpx;
		background: #FFFFFF;
		border-bottom: 1rpx solid #F5F6F9;
	}
	
</style>
