<template>
	<view>
		<CustomCamera ref="CustomCamera" :coverImageType="type" @back="back" @getImage="getImage" />
	</view>
</template>

<script>
	// #ifdef APP
	import CustomCamera from "@/components/CustomCamera/APP/index.nvue"
	// #endif
	// #ifdef MP-WEIXIN
	import CustomCamera from "@/components/CustomCamera/WeChat/index.vue"
	// #endif
	export default {
		data() {
			return {
				type: 'side'
			}
		},
		components: {
			CustomCamera
		},
		onLoad(opt) {
			this.type = opt.type
		},
		methods: {
			back() {
				uni.navigateBack()
			},
			getImage(res) {
				this.$api.prePage().upimgg(res,this.type == 'side'?'sfzf':'sfzz');
				setTimeout(()=> {
					uni.navigateBack()
				})
				
				// console.log(res)
			}
		}
	}
</script>