Commit 98c50a1b authored by jie zhang's avatar jie zhang

优化

parent 87860bc5
......@@ -51,8 +51,6 @@ Page({
this.data.page = 0
this.httpRequest()
this.getSchedule()
this.getRecipe()
},
......@@ -66,6 +64,16 @@ Page({
this.setData({
selectedIndex: e.currentTarget.dataset.index
})
if (this.data.selectedIndex == 0) {
this.data.page = 0
this.httpRequest()
} else if (this.data.selectedIndex == 1){
this.getSchedule()
} else if (this.data.selectedIndex == 2) {
this.getRecipe()
}
},
......
......@@ -11,8 +11,8 @@ Page({
signIcon: "/src/img/signin.png",
userIcon: "",
records: [],
userName:'',
subTitle:'共0人'
userName: '',
subTitle: '共0人'
},
......@@ -41,6 +41,16 @@ Page({
for (var i = 0; i < this.data.records.length; i++) {
studentIds.push(this.data.records[i].id)
}
if (studentIds.length == 0) {
wx.showToast({
title: '请先点名或联系管理员~',
icon: 'none'
})
return
}
wx.navigateTo({
url: '/pages/add_record/index?studentIds=' + JSON.stringify(studentIds),
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment