<template>
	<view><kingScan scanMode="scanCode" @handle='goto'></kingScan></view>
</template>

<script>
import kingScan from '@/components/king-scan/king-scan.vue';
export default {
	components: {
		kingScan
	},
	data() {
		return {
			flag: false,
		};
	},
	onLoad(e) {
		console.log("flag", e.flag)
		this.flag = e.flag
	},
	methods: {
		goto(money, id){
			console.log('money, id',money, id)
			if(this.flag){
				uni.navigateTo({
					url: '/pages/manage/account/adminData?money=' + money + '&id=' + id
				})
			}else{
				uni.navigateTo({
					url: '/pages/merchant/home/data?money=' + money + '&id=' + id
				})
			}
		}
	}
};
</script>

<style lang="scss"></style>
