<!-- 
<template>
	<view>
		<input class="input" type="text" v-model="date" />
		<button type="primary" @click="tel()">扫描</button>
	</view>
</template>
 
<script>
	export default {
		data() {
			return {
				date: 0,
			};
		},		
		methods:{
			tel(){
				var that = this;
				// 允许从相机和相册扫码
				uni.scanCode({
				    success(res) {
				        console.log('条码类型：' + res.scanType);
				        console.log('条码内容：' + res.result);
						that.date = res.result;
				    }
				});
			},
			
		}
	}
</script>
 
<style>
 
</style> -->