Commit 0692e966 authored by youjie's avatar youjie

no message

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