<template>
	<view>
		<!-- 弹窗 -->
		<view class="bgbox" @click="getClose" v-if="type"></view>
		<!-- 健康码 -->
		<view v-if="type=='code'" class="codebox">
			<view>健康码</view>
			<image :src="closeimg"></image>
			<view>
				<image :src="downimg"></image>
				保存健康码至手机
			</view>
			<image :src="closeimg"></image>
		</view>
	</view>
</template>

<script>
	import config from '@/config'
	const baseUrl = config.baseUrl
	import { getToken } from '@/utils/auth'
	import {uploadmore} from '@/utils/common.js'
	export default{
		components:{},
		props:{
			type: {
				type: String,
				default () {
					return ''
				}
			},
			finshtype:{
				type: [String,Number],
				default () {
					return ''
				}
			}
		},
		data(){
			return{
				baseUrl:config.baseUrl,
				closeimg:require("@/static/images/close.png"),
				downimg:require("@/health/static/images/close.png"),
				syqxidx:'',
				datainfo:{
					iszc:""
				},
				sexs: [{
					text: '男',
					value: 0
				}, {
					text: '女',
					value: 1
				}],
				peoval:0,
				peolist:[{name:'王安安',val:"0",type:0},{name:'刘柠溪',val:"1",type:1},{name:'王合一',val:"2",type:0},]
			}
		},
		mounted() {
			this.baseUrl=baseUrl
		},
		watch:{
			type(val){
				// this.filelist=[];
				// this.shtext='';
				// this.isty='2';
				// this.phofile=[];
			}
		},
		methods:{
			bindDateChange(){
				var val=e.detail.value;
			},
			getClose(){
				this.$emit('getClose')
			},
			getSure(){
				this.$emit('getSure')
			},
			getChose(val){
				this.peoval=val
			},
			getPreviewImage(arr,idx){
				var newArr=[];
				arr.forEach(ite=>{
					var ds=this.baseUrl+ite
					newArr.push(ds)
				})
				uni.previewImage({
					urls: newArr,
					current:idx,
					success: function(data) {
						
					},
					fail: function(err) {
						
					}
				});
			},	
		}
	}
</script>

<style lang="scss" scoped>	
// 指派
.codebox{width: 470rpx;height: 620rpx;background: #FFFFFF;border-radius: 20rpx;
	padding: 44rpx 36rpx;position: fixed;left:140rpx;top: 40%;transform: translateY(-235rpx);

}
.closeimg{width: 32rpx;height: 32rpx;position: absolute;bottom: -62rpx;left: 50%;margin-left: -16rpx;}
</style>