<template>
	<view>
		<CustomCamera ref="CustomCamera" @takePhoto="takePhoto"   @getImage="getImage" />
	</view>
</template>

<script>
	// #ifdef MP-WEIXIN
	import CustomCamera from "@/components/CustomCamera/WeChat/index.vue"
	// #endif
	export default {
		components: {
			CustomCamera
		},
		data() {
			return {
				coverImageType: 'side'
			}
		},
		onLoad(options) {
			this.coverImageType = options.coverImageType
		},
		onShareAppMessage(res) {
			return {
				title: "AI舌诊",
			}
			
		},
		//分享到朋友圈
		onShareTimeline(res) {
			return {
				title: "AI舌诊",
			}
			
		},
		methods: {
			back() {
				uni.switchTab({
					url:"/pages/index/index"
				})
			},
			takePhoto(){
				var url=uni.getStorageSync("tongueUrl")
				console.log(url)
				uni.navigateTo({
					url:"/pages_user/tongue/photoPreview?url="+url
				})
			},
			getImage(res) {
				var url=uni.getStorageSync("tongueUrl")
				console.log(url)
				uni.navigateTo({
					url:"/pages_user/tongue/photoPreview?url="+url
				})
			}
		}
	}
</script>

<style>

</style>
