Commit e82d7242 by fengzhaoyu

Merge branch 'dev' into release/1.0.0

parents 45e09dc2 0db31637
......@@ -341,7 +341,6 @@ create.Page({
if (this.data.limitClick) {
return
}
console.log('我重复点击还是走到这了')
this.setData({ limitClick: true });
dd.showLoading({
content: '正在创建...',
......@@ -369,7 +368,8 @@ create.Page({
dd.hideLoading();
});
if (res.data.code === 0) {
this.$store.data.tabBarIndex = '1'
this.$store.data.tabBarIndex = '1';
this.update();
if (this.data.repeatable === 0) {
if (this.$store.addOnceMeeting) {
await this.$store.addOnceMeeting({
......
......@@ -56,7 +56,7 @@ create.Page({
firstPage: 1,
scheduleList: [],
timer: null,
isFirstLoad: true,
isNeverShowSchedulePage: true,
isLoaded: false,
blankDataLength: 0,
blankDataLengthAfter: 0,
......@@ -74,6 +74,19 @@ create.Page({
this.timer = setInterval(() => {
this.getData();
}, 30000);
// 设置标题
dd.setNavigationBar({
title: this.$store.data.tabBarIndex == 1 ? '日程' : '动态'
});
//定位
if (this.isNeverShowSchedulePage) {
if (this.$store.data.tabBarIndex == 1) {
this.backToToday('first')
this.isNeverShowSchedulePage = false;
}
}
},
onLoad(query) {
console.log(query);
......@@ -88,11 +101,8 @@ create.Page({
)}`
});
}
dd.setNavigationBar({
title: "动态"
});
this.isFirstLoad = true;
//获取动态列表
this.isNeverShowSchedulePage = true;
//获取动态列表s
this.getPages(1);
//获取日程列表
this.getData();
......@@ -111,9 +121,6 @@ create.Page({
//添加单次会议
async addOnceMeeting(content) {
await this.getData(true);
dd.setNavigationBar({
title: "日程"
});
this.getScheduleList(content, "once");
this.setData({
scheduleList: this.scheduleList.slice(
......@@ -157,7 +164,7 @@ create.Page({
}).then(res => {
//第一次加载
if (this.isFirstLoad && !this.isLoaded) {
if (!this.isLoaded) {
console.log('第一次加载')
this.getScheduleList(res.data.data);
this.getPagination(this.scheduleList);
......@@ -170,9 +177,6 @@ create.Page({
loading: false
});
this.isLoaded = true;
setTimeout(() => {
this.backToToday('first')
}, 300)
return;
}
......@@ -182,12 +186,6 @@ create.Page({
this.setData({
sign: res.data.data.sign
})
if (this.isFirstLoad) {
setTimeout(() => {
this.backToToday('first')
}, 300)
this.isFirstLoad = false;
}
return
}
......@@ -219,7 +217,7 @@ create.Page({
this.timer = null;
},
refresh() {
this.isFirstLoad = true;
this.isNeverShowSchedulePage = true;
this.isLoaded = false;
this.onLoad();
},
......@@ -801,10 +799,9 @@ create.Page({
},
nextDetail: throttle(function (e) {
const { item } = e.target.dataset;
const scheduleItem = { scheduleId: item.id || item.scheduleId, scheduleTemplateId: item.scheduleTemplateId, planDate: item.planDate }
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(item)
)}`
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(JSON.stringify(scheduleItem))}`
});
}, 1000),
backToToday(type) {
......@@ -856,9 +853,9 @@ create.Page({
title: title
});
if (this.isFirstLoad) {
if (this.isNeverShowSchedulePage) {
this.backToToday("first");
this.isFirstLoad = false;
this.isNeverShowSchedulePage = false;
}
if (lastTimeTabBarIndex == tabbar) {
if (tabbar == "1") {
......@@ -871,7 +868,7 @@ create.Page({
this.setData({
offset: "stop"
});
} else if (!this.isFirstLoad) {
} else if (!this.isNeverShowSchedulePage) {
this.setData({
offset: this.lastOffset
});
......
......@@ -331,16 +331,21 @@ create.Page({
},
// 跳转下一页
nextPage(event) {
const scheduleItem = {
id: this.data.scheduleItem.id,
scheduleTemplateId: this.data.scheduleTemplateId,
planDate: this.data.planDate
}
switch (event.target.dataset.nextPage) {
case 'location':
this.$store.data.updateInfo.updateType = 'modify_location'
this.update()
dd.navigateTo({ url: `./../place/place?scheduleItem=${encodeURIComponent(JSON.stringify(this.data.scheduleItem))}&repeatable=${this.data.repeatable}` })
dd.navigateTo({ url: `./../place/place?scheduleItem=${encodeURIComponent(JSON.stringify(scheduleItem))}&repeatable=${this.data.repeatable}` })
break
case 'participantsDetail':
this.$store.data.updateInfo.updateType = 'operate_user'
this.update()
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${encodeURIComponent(JSON.stringify(this.data.scheduleItem))}` })
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${encodeURIComponent(JSON.stringify(scheduleItem))}` })
break
}
},
......@@ -498,7 +503,6 @@ create.Page({
},
// 选择完水平 HList 的回调
selectComHList(event) {
console.log(event)
switch (event.currentTarget.dataset.item.id) {
case 0:
this.addParticipator()
......@@ -510,7 +514,12 @@ create.Page({
this.setData({
popupShow: false
})
dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${JSON.stringify(this.data.scheduleItem)}` })
const scheduleItem = {
id: this.data.scheduleItem.id,
scheduleTemplateId: this.data.scheduleTemplateId,
planDate: this.data.planDate
}
dd.navigateTo({ url: `./../outLookContact/outLookContact?scheduleItem=${JSON.stringify(scheduleItem)}` })
break;
}
},
......
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