|
@@ -108,6 +108,9 @@ Page({
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function () {
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let currPage = pages[pages.length - 1];
|
|
|
+ //当前页的options,啥意思呢,就是你可能某个函数需要刷新,但是他的参数正好是传过来的参数
|
|
|
let date = this.data.bd
|
|
|
if (date) {
|
|
|
let t = this;
|
|
@@ -167,6 +170,17 @@ Page({
|
|
|
o.et = o.endTime.substring(0, 5);
|
|
|
o.leaveFlag = this.canLeave(o)
|
|
|
})
|
|
|
+
|
|
|
+ if(this.data.newItem){
|
|
|
+ for(var i in list){
|
|
|
+ if(list[i].id == this.data.newItem.id){
|
|
|
+ list[i].leaveFlag = false
|
|
|
+ this.data.newItem = null
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.setData({
|
|
|
'date': v,
|
|
|
'week': week,
|