Commit e82d7242 by fengzhaoyu

Merge branch 'dev' into release/1.0.0

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