<template>
	<view class="">
		<navigation :showBack="true" :bgnum="true">
			<text class="big_title">
				Add to
			</text>
		</navigation>
		<view class="main">
       <view class="bot_con">
		<view class="item flexx" v-for="(item,index) in walletInfo" :key="index" @click="createW(item,index)">
		 <view class="left flex">
		 	<image :src="item[0].coinList[0].icon" mode="aspectFit" class="img1"></image>
		   <view class="textcon"> 
		   	<view class="text1">
		  {{item[0].coinList[0].xname}}
		   	</view>
			<view class="text2">
				 {{item[0].coinList[0].name}}
			</view>
		   </view>
		 </view>	
		 <view class="rig">
		 	<image src="../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="rimg"></image>
		 </view>
		</view>
		

		
		
		
       </view>
	</view>
	<u-mask :show="show"  z-index="10"></u-mask>
	<view class="bottom_con" v-if="show">
		<image src="../../../../static/tongyonh/xg.png" mode="aspectFit" class="xg" @click="show = false"></image>
		<view class="tiao"></view>
		<view class="title">
			{{title}}
		</view>
		<view class="white">
			<view class="item flexx" @click="goCreateW(title)">
				<view class="rig flex">
					<image src="../../../../static/tongyonh/profile1.png" mode="aspectFit" class="img"></image>
					<text class="text">Create a wallet</text>
				</view>
				<image src="../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="lef"></image>
			</view>
			<view class="item flexx" @click="goImportM(title)">
				<view class="rig flex">
					<image src="../../../../static/tongyonh/Frame669.png" mode="aspectFit" class="img"></image>
					<text class="text">Mnemonic import</text>
				</view>
				<image src="../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="lef"></image>
			</view>
			<view class="item flexx"  @click="goImportK(title)">
				<view class="rig flex">
					<image src="../../../../static/tongyonh/Frame69.png" mode="aspectFit" class="img"></image>
					<text class="text">Private key import</text>
				</view>
				<image src="../../../../static/tongyonh/chevron_right_24px.png" mode="aspectFit" class="lef"></image>
			</view>
		</view>
		
	</view>
		</view>
</template>

<script>
	import cont from "@/components/navigation/navigation.vue"
	import tabBar from "@/components/tabBar/tabBar.vue"
	export default {
		data() {
			return {
				show: false,
				walletInfo:{},
				title:'',
						}
		},
		methods: {
			goCreateW(item){
				console.log(item)
				uni.navigateTo({
					url:'../../../menu/backUp/index?name='+item
				})
			},
			goImportM(item){
				uni.navigateTo({
					url:'../../../menu/backUp/backUp4/index?name='+item
				})
			},
			goImportK(item){
				uni.navigateTo({
					url:'../../../menu/backUp/backUp5/index?name='+item
				})
			},
			setStorage() {
				// this.walletInfo.walletPassword = this.$store.state.noBackupWalletInfo.walletPassword
				this.walletInfo = uni.getStorageSync('walletInfo');
				console.log(this.walletInfo,111111)
			},
			createW(item,index){
				this.show=true;
				this.title=item[0].coinList[0].name
			}
		},
		onLoad(item) {
			var walletInfo = new Object();
			walletInfo =uni.getStorageSync('walletInfo')
			if(walletInfo == ''){
				uni.reLaunch({
					url:'/pages/register/index'
				})
			}
			this.setStorage();
		},
	};
</script>
<style scoped>
	page{
		background: #FAFAFA;
	}
</style>

<style>

	@import './index.css';

</style>
