Commit 0db31637 by fengzhaoyu

fix: 日程页面标题和定位问题

parent 1a1a4142
......@@ -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();
},
......@@ -855,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") {
......@@ -870,7 +868,7 @@ create.Page({
this.setData({
offset: "stop"
});
} else if (!this.isFirstLoad) {
} else if (!this.isNeverShowSchedulePage) {
this.setData({
offset: this.lastOffset
});
......
......@@ -503,7 +503,6 @@ create.Page({
},
// 选择完水平 HList 的回调
selectComHList(event) {
console.log(event)
switch (event.currentTarget.dataset.item.id) {
case 0:
this.addParticipator()
......
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