<template>
	<view class="passwordset-content" :style="{'--status-bar-': statusBarHeight}">
		<view class="passwordset-content-info">
			<!-- 头部主要内容 开始 -->
			<view class="passwordset-content-header">	
				<customNavbar 
				title="支付密码设置" 
				bgColor="var(--gd-bgm-color)"
				:contentStyle="{color: '#fff'}"
				:leftStyle="{color: '#fff'}"
				></customNavbar>
			</view>
			<!-- 头部主要内容 结束 -->
			
			<!-- userInfo内容 开始 -->
			
			<view class="passwordset-content-password">
				<text>{{ tip[actionIndex] }}</text>
				<view>
					<u-code-input v-model="value" @finish="finish" :focus="true" dot></u-code-input>
				</view>
			</view>
			<!-- userInfo内容 结束 -->
		</view>
	</view>
</template>

<script>
	import { navigateTo } from "@/utils/util.js"
	export default {
		data() {
			return {
				title: '这是我的',
				statusBarHeight: 0, // 状态栏安全距离
				value: "",
				tip: ["输入当前密码，已确认身份","设置六位数数字密码","再次输入"],
				actionIndex: 0
			}
		},
		onLoad() {

		},
		onShow() {
			this.statusBarHeight = getApp().globalData.statusBarHeight
		},
		methods: {
			/**
			 * @author ygh
			 * @data 2023-12-20
			 */
			navigateToFun(item){
				navigateTo(item.url)
			},
			finish(){
				uni.showLoading({
					title: "认证中..."
				})
				setTimeout(()=>{
					this.actionIndex += 1
					this.value = ''
					uni.hideLoading({
						
					})
				},2000)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.passwordset-content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		--header-h: 90rpx;
		.passwordset-content-info {
			width: 100%;
			box-sizing: border-box;
		}
	}
	/** 头部主要内容 开始 */
	.passwordset-content-header {
		width: 100%;
		height: var(--header-h);
		box-sizing: border-box;
		::v-deep .u-search {
			padding: 0 30rpx !important;
		}
		::v-deep .u-search__action {
			color: #fff !important;
		}
	}
	/** 头部主要内容 结束  **/
	
	/** password内容 开始 */
	.passwordset-content-password {
		width: 100%;
		padding: 40rpx 40rpx 0;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: center;
		>text {
			text-align: center;
		}
		>view {
			margin-top: 40rpx;
			display: flex;
			justify-content: center;
		}
	}
	/** password内容 结束  */
</style>
