Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
CS-Tao committed Oct 3, 2018
2 parents dea5392 + 83a3995 commit 073bf43
Show file tree
Hide file tree
Showing 13 changed files with 219 additions and 89 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
### 稳定版本下载

- Windows
- 链接: [v1.3.0](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.0/whu-library-seat-setup-1.3.0.exe)
- 链接: [whu-library-seat-setup-1.3.1.exe](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.1/whu-library-seat-setup-1.3.1.exe)

- Mac OS
- 链接: [v1.3.0](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.0/whu-library-seat-1.3.0.dmg)
- 链接: [whu-library-seat-1.3.1.dmg](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.1/whu-library-seat-1.3.1.dmg)

- Linux
- 链接: [v1.3.0](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.0/whu-library-seat-1.3.0-x86_64.AppImage)
- 链接: [whu-library-seat-1.3.1-x86_64.AppImage](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.1/whu-library-seat-1.3.1-x86_64.AppImage)

### 安装软件

Expand Down
8 changes: 6 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ actionLink: /#快速开始
features:
- title: 定时抢座
details: 软件提供了定时抢座的功能,用户可以指定时间开始抢座,也可以通过勾选"√使用当前时间"立即抢座
- title: 座位筛选
details: 用户除了可以根据场馆和房间选择筛选座位之外,还可以根据是否靠窗和是否有电源筛选座位
- title: 座位更改
details: 勾选"√使用当前时间"立即抢座,如果当前已有预约、正在使用、暂离状态的座位,软件会取消当前座位,重新预约
- title: 错误处理
details: 当位置已经被别人预约之后,软件会根据用户提供的时间段和房间信息,自动预约距离该位置较近的座位
footer: Copyright © 2018 CS-Tao
Expand All @@ -19,6 +19,10 @@ footer: Copyright © 2018 CS-Tao
您可以通过以下步骤快速使用本软件预约座位,查看详细使用说明请移步[用户手册](/specification/)
:::

#### 下载软件

链接: [https://github.com/CS-Tao/whu-library-seat#稳定版本下载](https://github.com/CS-Tao/whu-library-seat#稳定版本下载)

#### 登录

启动软件,输入用户名和密码(点击小锁图标可以记住用户名和密码),点击`登录`按钮登录到图书馆,如下图所示
Expand Down
6 changes: 3 additions & 3 deletions docs/specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#### 稳定版本下载

- Windows
- 链接: [v1.3.0](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.0/whu-library-seat-setup-1.3.0.exe)
- 链接: [whu-library-seat-setup-1.3.1.exe](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.1/whu-library-seat-setup-1.3.1.exe)

- Mac OS
- 链接: [v1.3.0](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.0/whu-library-seat-1.3.0.dmg)
- 链接: [whu-library-seat-1.3.1.dmg](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.1/whu-library-seat-1.3.1.dmg)

- Linux
- 链接: [v1.3.0](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.0/whu-library-seat-1.3.0-x86_64.AppImage)
- 链接: [whu-library-seat-1.3.1-x86_64.AppImage](https://github.com/CS-Tao/whu-library-seat/releases/download/v1.3.1/whu-library-seat-1.3.1-x86_64.AppImage)

### 安装软件

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whu-library-seat",
"version": "1.3.0",
"version": "1.3.1",
"author": "CS-Tao <[email protected]>",
"description": "武汉大学图书馆抢座软件",
"license": null,
Expand Down
37 changes: 20 additions & 17 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ const template = [
}
}
]
},
{
}, {
label: '设置',
submenu: [
{
Expand All @@ -106,15 +105,13 @@ const template = [
}
}}
]
},
{
}, {
label: '视图',
submenu: [
{ role: 'reload', label: '重新加载' },
{ role: 'forcereload', label: '强制重新加载' }
]
},
{
}, {
label: '窗口',
role: 'window',
submenu: [
Expand All @@ -140,15 +137,30 @@ const template = [
}
}
]
},
{
}, {
label: '权限',
submenu: [
{
label: '申请权限',
click () { require('electron').shell.openExternal('https://home.cs-tao.cc/whu-library-seat/specification/#申请软件使用权') }
},
{
label: '查看白名单',
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat/blob/user-validation/validation.json') }
}
]
}, {
label: '关于',
role: 'about',
submenu: [
{
label: '版本 v' + appVersion,
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat/releases/tag/v' + appVersion) }
},
{
label: '更新日志',
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat/releases') }
},
{ type: 'separator' },
{
label: '文档',
Expand All @@ -159,15 +171,6 @@ const template = [
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat') }
},
{ type: 'separator' },
{
label: '申请权限',
click () { require('electron').shell.openExternal('https://home.cs-tao.cc/whu-library-seat/specification/#申请软件使用权') }
},
{
label: '用户白名单',
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat/blob/user-validation/validation.json') }
},
{ type: 'separator' },
{
label: '问题反馈',
click () { require('electron').shell.openExternal('https://github.com/CS-Tao/whu-library-seat/issues/new') }
Expand Down
61 changes: 37 additions & 24 deletions src/renderer/api/usage.api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import axios from 'axios'
import { remote } from 'electron'
import urls from './urls'
import Store from 'electron-store'

const store = new Store({
name: 'whu-library-seat'
})

var service = axios.create({
baseURL: 'https://seat-records.cs-tao.cc',
Expand All @@ -12,31 +17,39 @@ const appVersion = remote.app.getVersion()

export default {
// 登录状态
loginState: (account, state, code) => {
return service({
url: urls.usage.loginState.url(),
method: urls.usage.loginState.method,
data: {
account,
state,
code,
version: appVersion,
time: new Date()
}
})
loginState: (account, state, code, message = null) => {
let usageRecordEnable = store.get('usageRecordEnable', true)
if (usageRecordEnable) {
service({
url: urls.usage.loginState.url(),
method: urls.usage.loginState.method,
data: {
account,
state,
code,
message: message || '',
version: appVersion,
time: new Date()
}
}).then(() => {}).catch(() => {})
}
},
// 抢座状态
grabState: (account, state, code) => {
return service({
url: urls.usage.grabState.url(),
method: urls.usage.grabState.method,
data: {
account,
state,
code,
version: appVersion,
time: new Date()
}
})
grabState: (account, state, code, message = null) => {
let usageRecordEnable = store.get('usageRecordEnable', true)
if (usageRecordEnable) {
service({
url: urls.usage.grabState.url(),
method: urls.usage.grabState.method,
data: {
account,
state,
code,
message: message || '',
version: appVersion,
time: new Date()
}
}).then(() => {}).catch(() => {})
}
}
}
14 changes: 12 additions & 2 deletions src/renderer/components/Body/Timer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ export default {
type: Date,
require: true
},
grabSeat: {
bookFunc: {
type: Function,
require: true
},
loginFunc: {
type: Function,
require: true
},
loginAndBookFunc: {
type: Function,
require: true
}
Expand Down Expand Up @@ -119,7 +127,9 @@ export default {
this.$emit('input', this.result)
this.$emit('btnClick', 'ok')
this.$store.dispatch('setTimer', {
bookFunc: this.grabSeat,
bookFunc: this.bookFunc,
loginFunc: this.loginFunc,
loginAndBookFunc: this.loginAndBookFunc,
time: this.result
})
this.$message({
Expand Down
Loading

0 comments on commit 073bf43

Please sign in to comment.