<template> <!--打印完成--> <div class="complete"> <div class="box flex-center"> <div class="left"> <img src="../assets/complete.png" alt=""> <div>打印完成</div> <div>感谢您使用天章自助打印服务</div> </div> <div class="right"> <div class="title flex-center">温馨提示</div> <div class="content">请您立刻时,从出纸口取走您的打印件,并带齐您的资料和所有随身物品。</div> <div class="tip" v-show="false"> <div>本次打印您将获得:</div> <div class="flex-center"> <img src="../assets/points.png" alt=""><span>28积分</span> </div> </div> <div class="btn flex-center" @click="skip('device')">回到首页</div> </div> </div> </div> </template> <script> export default { name: "complete", data() { return { num: 0 } }, mounted() { this.num=0 this.load() }, destroyed() { // 销毁监听 // clearTimeout() this.num = -1 }, methods: { skip(href) { this.cite.fileNum = 0 this.$router.push({ name: href }) }, load() { let n = this.num if(n==-1) { return }else if(n<10) { this.num = n+1 setTimeout(()=>{ this.load() },1000) }else{ // this.quit() console.log('我触发的?complete',n) this.cite.fileNum = 0 this.$router.push({ name: 'device' }) } }, } } </script> <style scoped lang="less"> .box { width: 114.06rem; height: 49.25rem; background: #FFFFFF; box-shadow: 0rem 0.31rem 0.63rem 0.06rem rgba(0,0,0,0.14); border-radius: 1.63rem; margin: 3.75rem auto 0; font-size: 1.88rem; font-weight: bold; color: #323232; line-height: 2rem; .left { margin-right: 14.94rem; img { width: 26.88rem; margin-bottom: 5.06rem; } } .right { width: 42.13rem; text-align: left; .title { font-size: 2.88rem; font-weight: bold; color: #D41212; line-height: 4.06rem; } .content { font-size: 2.25rem; font-weight: bold; color: #323232; line-height: 3rem; margin: 2.94rem auto 6.25rem; } .tip { img { width: 7.38rem; margin-right: 1.13rem; } span { font-size: 2.13rem; font-weight: bold; color: #323232; line-height: 3rem; } } } .btn { width: 100%; height: 5.5rem; background: linear-gradient(132deg, #52A39D 0%, #A1C553 50%, #81D012 100%); border-radius: 1.25rem; font-size: 1.88rem; font-weight: 400; color: #FFFFFF; line-height: 2.63rem; cursor: pointer; } } </style>