<template>
	<view class="">
		<navigation :showBack="true" :bgnum="false">
			<text class="big_title">
			Backup mnemonic
			</text>
		</navigation>
		<view class="main">

		
	<view class="title">
		Please keep your mnemonics. Anyone who gets your mnemonics can control your account, including transferring all funds
	</view>	
	<u-message-input @finish="finish" :inactive-color="info?'#F16063':'#E0E5F2'"  active-color="#5B53FF" :width="94" :maxlength="6" mode="box" :focus="fes"   :dot-fill="true"  @change="back"></u-message-input>
	<view class="infoText" v-if="info">
		Incorrect password 
	</view>
	
	</view>

	
	
		</view>
</view>



</template>

<script>
	import cont from "@/components/navigation/navigation.vue"
	export default {
		data() {
			return {
			password:'',
	        msg:'',
	        msgLength:0,
			fes:false,
			borNum:true,
			borNum2:false,
			info:false,
			word:{},
			walletInfo:{},
			userObj:{},
			}
		},
		 watch:{
		    
		    },
		
		methods: {
			// 删除触发
			back(e){
				if(e.length<6){
					this.info=false;
				}
			},
			// 比较
					// 第一次存密码
			finish(e) {
				this.password=e
				var that=this;
				if(e!=this.userObj.password){
					this.info=true
				}else{
					uni.showToast({
						title: 'The password is correct',
						icon: 'success',
						duration: 1500,
					})
					setTimeout(()=>{
						console.log(this.userObj,444)
						let item = JSON.stringify(this.userObj)
						uni.navigateTo({
							url:'../../backUp/backUp2/index?item='+item
						})
					},1500)
				}
		
		},
		},
	onLoad: function(option) {

				const item = JSON.parse(option.item);
				console.log(item,777)
				this.userObj = item
			}
	};
</script>
<style scoped>

</style>

<style>
	@import './index.css';
</style>
