stargazer

This commit is contained in:
huanqing.shao
2019-08-20 22:22:05 +08:00
parent aaf0bdafbb
commit 38461b6af3
3 changed files with 7 additions and 5 deletions

View File

@ -4,11 +4,12 @@
title="感谢阅读"
:visible.sync="dialogVisible"
width="50%"
:append-to-body ="true"
:before-close="handleClose">
<span>如果这篇文档有帮到您劳烦移步 github 给一个 star谢谢</span>
<span slot="footer" class="dialog-footer">
<el-button @click="waitAMoment">一会儿再说</el-button>
<el-button type="primary" @click="gotoStar">现在就去</el-button>
<el-button type="primary" @click="gotoStar">够义气现在就去</el-button>
</span>
</el-dialog>
</div>
@ -40,19 +41,19 @@ export default {
.catch(_ => {});
},
waitAMoment() {
if (localStorage.getItem('stared')) {
if (localStorage.getItem('stared') === 'true') {
return
}
this.dialogVisible = false
let _this = this
setTimeout(_ => {
_this.dialogVisible = true
}, 60000 * 5)
}, 60000 * 3)
},
gotoStar() {
this.dialogVisible = false
window.open('https://github.com/eip-work/kuboard-press')
localStorage.setItem('stared', true)
localStorage.setItem('stared', 'true')
}
}
}

View File

@ -1,3 +1,3 @@
module.exports = {
extend: '@vuepress/theme-default'
}
}

View File

@ -18,6 +18,7 @@
<a href="/support/" class="nav-link">支持</a>
</div> -->
</div>
<StarGazer/>
</div>
<div slot="page-bottom" class="bottom-description">Copyright © 2019-present <a href="http://www.eigpay.com" target="_blank">仁聚汇通</a> | 京ICP备19008693号-2</div>
</ParentLayout>