<template>
	<view class="">
		<view class="box flew flew-center flew-align-center border border-radius-10" @click="uploadImage" v-if="imageVlaue == ''">
			<text style="font-size: 60rpx;color: #C0C0C0;">+</text>
		</view>
		<image class="box dis-block" :src="imageVlaue" mode="" v-else  @click="uploadImage"></image>
		<text style="color: #EA0606;font-size:30rpx">请上传png/jpg图片，且不超过50MB</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imageVlaue: ''
			}
		},
		methods:{
			uploadImage () {
				let _that = this
				console.log(_that)
				uni.chooseImage({
					count: 1,
					sourceType: 'album ',
					success(res){
						_that.imageVlaue = res.tempFilePaths[0]
					}
				})
			}
		},
		mounted() {
			this.imageVlaue = ''
		}
	}
</script>

<style scoped lang="scss">
	.box{
		width: 120rpx;
		height: 120rpx;
	}
</style>
