Skip to content

Commit

Permalink
添加课程时间
Browse files Browse the repository at this point in the history
  • Loading branch information
ZZJ34 committed Mar 29, 2020
1 parent 1ffb235 commit 7365323
Show file tree
Hide file tree
Showing 3 changed files with 2,122 additions and 1,856 deletions.
18 changes: 14 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
div.class(:class='{ selected: clazz.selected }' v-if='group.classes && group.classes.length' v-for='clazz in group.classes')
div.info
p.name {{ clazz.name }}
p.desc {{ clazz.desc }}
p.desc {{ clazz.desc }}
span(v-if='clazz.capacity - clazz.count') 剩余约{{ clazz.capacity - clazz.count }}个名额
span(v-else) 名额已满
button.pick(@click='deselect(clazz.cid)' v-if='clazz.selected') 退选
p.desc 周{{ weekday2Chinses[clazz.weekday] }} {{ clazz.startTime }} 至 {{ clazz.endTime }}
button.pick(@click='deselect(clazz.cid)' v-if='clazz.selected' ) 退选
button.pick(@click='select(clazz.cid)' v-else) 选择
div.empty(v-if='!group.classes.length')
p 该方向下没有课程
Expand Down Expand Up @@ -71,10 +72,19 @@
username: '',
list: [],
canRefresh: true,
isLoading: false
isLoading: false,
weekday2Chinses:{
'1':'',
'2':'',
'3':'',
'4':'',
'5':'',
'6':'',
'7':''
}
}
},
async created () {
async created() {
logger.bindAjax()
logger.bindXhrOpen(() => this.isLoading = true)
logger.bindXhrDone(() => this.isLoading = false)
Expand Down
6 changes: 3 additions & 3 deletions src/api.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axios from 'axios';
import axios from 'axios'

export default axios.create({
baseURL: '/jysserv/',
//baseURL:'http://localhost:8087/',
//baseURL: '/jysserv/',
baseURL:'http://localhost:8087/',
timeout: 20000,
validateStatus (status) {
if (status >= 400) {
Expand Down
Loading

0 comments on commit 7365323

Please sign in to comment.