-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
432 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "whu-library-seat", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"author": "CS-Tao <[email protected]>", | ||
"description": "武汉大学图书馆抢座软件", | ||
"license": null, | ||
|
@@ -66,10 +66,12 @@ | |
"electron-store": "^2.0.0", | ||
"electron-updater": "^3.0.3", | ||
"element-ui": "^2.4.4", | ||
"js-md5": "^0.7.3", | ||
"mockjs": "^1.0.1-beta3", | ||
"node-notifier": "^5.2.1", | ||
"vue": "^2.3.3", | ||
"vue-electron": "^1.0.6", | ||
"vue-markdown": "^2.2.4", | ||
"vue-router": "^2.5.3", | ||
"vuepress-theme-vue": "^1.0.3", | ||
"vuex": "^2.3.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,31 @@ export default { | |
] | ||
} | ||
} | ||
}, | ||
announce: config => { | ||
console.log('Mock: ' + config.url) | ||
return `### 公告 | ||
- 本软件的最新版本是 v1.3.2,点击菜单: \`关于 > 更新日志\`可以查看最新版本 | ||
- 短时间内向图书馆后台发送大量请求会被图书馆暂时性封号(30min),请节制使用本软件 | ||
- 如果有任何疑问可以联系我📧: [email protected] | ||
- 发现 bug 请点击: \`关于 > 问题反馈\` | ||
- 设置页面的软件使用数据可以帮助我改善软件,希望您可以把软件使用数据提交给我😋 | ||
- 移动端还要好几个月才会发布,敬请期待🤕 | ||
#### 如果您有多的钱,让我们支付宝见! | ||
<p align="center"><img alt="支付宝二维码.jpg" src="https://home.cs-tao.cc/blog/img/alipayimg.jpg" width="70%" height="70%"></p> | ||
#### 或者微信见! | ||
<p align="center"><img alt="微信二维码.jpg" src="https://home.cs-tao.cc/blog/img/wechatimg.jpg" width="70%" height="70%"></p> | ||
#### 祝您使用愉快,学习进步😉~ | ||
` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<template> | ||
<div class="flex-row"> | ||
<div class="warp"> | ||
<vue-markdown class="mark-down" html :source="source"/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import VueMarkdown from 'vue-markdown' | ||
import gitcontentsApi from '@/api/gitcontents.api' | ||
import Store from 'electron-store' | ||
import md5 from 'js-md5' | ||
const store = new Store({ | ||
name: 'whu-library-seat' | ||
}) | ||
export default { | ||
data () { | ||
return { | ||
source: '' | ||
} | ||
}, | ||
components: { | ||
VueMarkdown | ||
}, | ||
mounted () { | ||
gitcontentsApi.announce().then((response) => { | ||
if (response.status === 200) { | ||
this.source = response.data | ||
this.$store.dispatch('setAnnounceViewed', true) | ||
store.set('announceMd5', md5(response.data)) | ||
} | ||
}).catch(() => { | ||
this.showError('公告加载失败') | ||
}) | ||
}, | ||
methods: { | ||
showError (message) { | ||
this.$message({ | ||
type: 'error', | ||
duration: '0', | ||
showClose: true, | ||
dangerouslyUseHTMLString: true, | ||
message: '<p style="line-height:20px;">' + message + '</p>' | ||
}) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/styles/index.scss'; | ||
$warp-width: 280px; | ||
$warp-height: 300px; | ||
$warp-padding: 20px; | ||
.warp { | ||
width: $warp-width; | ||
height: $warp-height; | ||
margin: $layout-header-h ($layout-width - $warp-width)/2 - $warp-padding $layout-footer-h ($layout-width - $warp-width)/2 - $warp-padding; | ||
padding: $warp-padding; | ||
border: 1px solid $text-color; | ||
border-radius: 4px; | ||
overflow-y: scroll; | ||
cursor: default !important; | ||
.mark-down { | ||
color: white; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.