<template>
	<div class="phone-wrap">

	</div>
</template>
<script>
import router from '@system.router';
import storage from '@system.storage';
export default {
	public: {
		send_order_id: "",
		push_id: "",
		showtoast: false
	},
	async onInit() {
		if (this.push_id) {
			await storage.set({ key: "push_id", value: this.push_id });
		}
		if (this.send_order_id) {
			await storage.set({ key: "send_order_id", value: this.send_order_id });
		}
		this.getLastCharpt();
	},

	async getLastCharpt() {
		let params = (await storage.get({ key: "lastCapter" })).data;
		if (params) {
			router.replace({
				uri: "/views/Reader",
				params: JSON.parse(params)
			})
		} else {
			router.replace({
				uri: "/views/Index",
			})
		}

	}

} 
</script>
