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

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mohuishou committed Mar 12, 2018
1 parent b6a184d commit e67d6df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/my/feedbackDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</view>
</repeat>
</view>
<view wx:if="{{ id > 0 }}" class="new-comment">
<view wx:if="{{ id > 0 && issue.state == 'open' }}" class="new-comment">
<textarea value="{{commentVal.val}}" @input="commentChange" name="content" placeholder="请输入内容" />
<mview @mtap.user="newComment" :arg.sync="commentVal" class="mview">
<view slot="content" class="btn">提交评论</view>
Expand Down
13 changes: 12 additions & 1 deletion src/pages/schedule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,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 @@ -143,14 +143,24 @@
}
}
async onLoad() {
// 初始化数据
this.initData()
// 获取本学期开学时间
await this.InitTerm()
// 计算本周周次
const now = new Date()
this.week = await this.GetWeek(now.getFullYear(), now.getMonth() + 1, now.getDate())
// 获取课程表数据
await this.Init("scheduleItems", 24 * 30)
// 渲染数据
this.initSchedules(this.scheduleItems)
// 获取今天星期几
this.day = (new Date()).getDay() || 7
this.$apply()
const update_time = db.Get("update_time." + "schedules") || 0
if ((now.getTime() - update_time) / 1000 / 3600 > (3 * 24)) {
this.InitSet("schedules", this.schedules)
}
}
async get() {
const resp = await this.GetWithBind('/user/schedule', {
Expand All @@ -169,6 +179,7 @@
await this.initData()
await this.initSchedules(this.scheduleItems)
this.$apply()
this.InitSet("schedules", this.schedules)
} catch (error) {
console.log(error);
}
Expand Down

0 comments on commit e67d6df

Please sign in to comment.