Commit 0692e966 authored by youjie's avatar youjie

no message

parent c823eb44
......@@ -456,7 +456,7 @@ export default {
{
Name: '行程',
ID: 2,
val: 'title1',
val: 'title2',
top: 0,
},
{
......@@ -518,6 +518,25 @@ export default {
},
});
},
watch: {
d:{
handler(newVal,oldVal){
if(this.dataList&&this.dataList.dayNum>=0){
this.titlesList.forEach((x,index) => {
if(index==1) x.Name = `${this.dataList.dayNum}日行程`
const query = uni.createSelectorQuery().select(`#${x.val}`);
if(query) query.boundingClientRect((rect) => {
x.top = rect.top-130;
}).exec();
if(index==3) uni.hideLoading()
})
}
},
deep:true,
immediate:true
},
},
mounted() {
},
......@@ -529,10 +548,10 @@ export default {
this.scrollTop = item.top
});
},
formatDay() {
async formatDay() {
this.d = this.dataList.dayList
if (this.d.length > 0) {
this.d.forEach((x) => {
await this.d.forEach((x) => {
x.dayArray.forEach((y) => {
if (y.type == 7) {
x.title = y.childItem.title;
......@@ -559,15 +578,8 @@ export default {
});
setTimeout(() => {
this.titlesList.forEach((x,index) => {
if(index==1) x.Name = `${this.dataList.dayNum}日行程`
const query = uni.createSelectorQuery().select(`#${x.val}`);
query.boundingClientRect((rect) => {
x.top = rect.top-130;
}).exec();
})
uni.hideLoading()
}, 3000);
}, 5000);
}
},
formatTraffice(tras) {
......@@ -638,13 +650,13 @@ export default {
},
scroll(e) {
this.old.scrollTop = e.detail.scrollTop
this.boxOption = Math.floor((e.detail.scrollTop - 50) / 1.5);
this.boxOption = Math.floor((e.detail.scrollTop - 600) / 1.5);
this.titleStyle.opacity =
e.detail.scrollTop - 100 < 0 ?
e.detail.scrollTop - 600 < 0 ?
0 :
Math.floor(e.detail.scrollTop - 100) / 100 > 1 ?
Math.floor(e.detail.scrollTop - 600) / 100 > 1 ?
1 :
Math.floor(e.detail.scrollTop - 100) / 100;
Math.floor(e.detail.scrollTop - 600) / 100;
this.$forceUpdate();
},
downloadTripPlanHandler() {
......
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