<template>
  <b-page @bPageLoaded="voiceCallback"></b-page>
  <count-down times=300 bottomOffset="10" rightOffset="10" fontSize="24" ref="child"></count-down>
  <div class="material">
    <div style="padding-top: 5%;">
		<div style="margin-top: 20px;">
			<img src="../assets/images/ico/ico_remind.png" >
		</div>
		<div style="margin-top: 30px;">
			<font size="6" color="#FFFFFF">请您先仔细阅读资料的扫描要求！
			<br>如您已阅读请点击"我已阅读"按钮继续办理。
			<br>给您带来不便请谅解！</font>
		</div>
    </div>
	<div  style="height: 20px;">
	    &nbsp;
	</div>
	<div style="position: absolute;bottom: 80px;width: 98%;">
		<div style="position: absolute;margin-left: 250px;">
			<img style="width: 80%;" :src="cancelSrc" @click="cancelClick" id="cancel">
		</div>
		<div style="position: absolute;margin-left: 530px;">
			<img style="width: 80%;" src="../assets/images/btn/btnRead.png" @click="confirmClick" id="confirm">
		</div>
	</div>
  </div>
</template>
<style scoped>
	.material{
		background-image: url('../assets/images/background.png');
		background-repeat: no-repeat;
		background-size: cover;
		overflow:auto;
		margin-bottom: 20px;
		padding: 0 70px;
		height:100%;
	}
</style>
<script>
import { layer } from "@layui/layer-vue";
import BPage from "@/components/registerVoice";

export default{
  components: {
    BPage,
  },

	data() {
	  return {
		  count:1,
		  projectId: '',
      projectName:'',
      serviceId:''
	  }
	},
	created() {
      this.projectId = this.$LocalStorage.SessionGet("projectId");
      this.serviceId = this.$LocalStorage.SessionGet("serviceId");
      this.projectName=this.$LocalStorage.SessionGet("projectName");
	},
	computed:{
		cancelSrc(){
			return this.count%2==0?	require('../assets/images/btn/btnCancel.png'):require('../assets/images/btn/btnCancel_Not.png')
		}
	},
	methods:{
		cancelClick() {
			// alert("你点击了取消");
			this.count++;
			this.$router.go(-1);
		},

		confirmClick() {
			//进入扫描页面
			this.$router.push({ path: '/scanMaterial'});
		},

    //语音回调（只处理退出）
    voiceCallback(res){
      if (res=="quit"){
        if(robotType){
          robotsdk.closeExternalApp({
            mode:0
          });
        }
      }
    }

	}
}
</script>