<template>
	<view>
		<view class="address-window" :class="show==true?'on':''">
			<view class="weikuan">
				<view class="title">
					请输入密码
				</view>
				
				<input style="border: 1px solid #333;padding: 20rpx;margin: 40rpx 20rpx;border-radius: 10rpx;" :placeholder='$t(`请输入密码`)' placeholder-class='placeholder' v-model="newPsd" type="password"
				></input>
				
				<view class="btnPay" @click="payHandle">
					支付尾款
				</view>
			</view>
		</view>
		<view class='mask' catchtouchmove="true" :hidden='show==false' @tap='close'></view>
	</view>
</template>

<script>
	import {
		HTTP_REQUEST_URL
	} from '@/config/app';
	export default {
		props: {
			show: {
				type: Boolean,
				default: true
			},
			info:{
				type:Object,
				default:()=>{
					return {}
				}
			}
			
			
		},
		data() {
			return {
				newPsd:null,
			};
		},

		methods: {
		
			close: function() {
				this.$emit("close")
			},
			payHandle(){
				if(!this.newPsd){
					uni.showToast({
						title:"请输入密码",
						icon: 'none',
						duration: 2000
					});
					return;
				}
				this.$emit("psdPay",this.newPsd)
				
			}
		
			
		},
		
	}
</script>

<style scoped lang="scss">
	.address-window {
		border-radius: 20rpx 20rpx 0 0;
		background-color: #fff;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		z-index: 1000;
		transform: translate3d(0, 100%, 0);
		transition: all .3s cubic-bezier(.25, .5, .5, .9);
	}

	.address-window.on {
		transform: translate3d(0, 0, 0);
	}
    .weikuan{
		padding:30rpx 24rpx 53rpx 24rpx;
		.title {
			text-align: center;
			font-family: Alibaba PuHuiTi;
			font-weight: 400;
			font-size: 34rpx;
			color: #333333;
		
		}
		
		.btnPay{
			margin-top:50rpx;
			line-height: 98rpx;
			height: 98rpx;
			background: #A8D178;
			border-radius: 49px;
			border: 1px solid #A8D178;
		
			font-family: Alibaba PuHuiTi;
			font-weight: 400;
			font-size: 30rpx;
			color: #FFFFFF;
			text-align: center;
		}
		
	}
	
	
</style>
