Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
修复课程表更新后数据不刷新的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mohuishou committed Mar 9, 2018
1 parent 3b6719f commit b565d88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/schedule.wpy
Expand Up @@ -62,7 +62,7 @@
<view class="row item" style="flex: {{item.flex}}; padding-bottom: {{item.flex-1}}px; background: {{item.color}};" wx:elif="{{item.flex > 0}}">
<text class="course-name">{{item.course_name}}</text>
<text class="address">
<text>{{item.building}}</text>
<text>{{item.building}}</text>
<text>{{item.classroom}}</text>
</text>
</view>
Expand Down Expand Up @@ -111,6 +111,7 @@
await this.PostWithBind('/user/schedule', {
term: 1
})
this.initData()
await this.get()
wepy.stopPullDownRefresh()
} catch (error) {
Expand Down Expand Up @@ -138,6 +139,9 @@
}
initData() {
// 初始化data
this.schedules = [
['', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
]
let title = ['一', '二', '三', '四', '五', '六', '日']
for (let i = 0; i < 7; i++) {
let tmpData = []
Expand Down

0 comments on commit b565d88

Please sign in to comment.