|
|
@ -370,6 +370,9 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
pages:[{ |
|
|
pages:[{ |
|
|
|
|
|
name:'商家订单详情111', |
|
|
|
|
|
url:'/package2/shop/orderDetail' |
|
|
|
|
|
},{ |
|
|
name:'发布订单评价111', |
|
|
name:'发布订单评价111', |
|
|
url:'/package1/order/orderEvaluate' |
|
|
url:'/package1/order/orderEvaluate' |
|
|
},{ |
|
|
},{ |
|
|
@ -567,6 +570,19 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
|
|
|
this.indexInit() |
|
|
|
|
|
}, |
|
|
|
|
|
onReady() { |
|
|
|
|
|
// 记录分类栏相对页面的偏移量,用于上滑检测 |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
query.select('#menuList').boundingClientRect(rect => { |
|
|
|
|
|
if (rect) this.menuListOffsetTop = rect.top + this.lastScrollTop; |
|
|
|
|
|
}).exec(); |
|
|
|
|
|
}, 500); |
|
|
|
|
|
}, |
|
|
|
|
|
methods: { |
|
|
|
|
|
indexInit(){ |
|
|
let that = this |
|
|
let that = this |
|
|
uni.getSystemInfo({ |
|
|
uni.getSystemInfo({ |
|
|
success: function(info) { |
|
|
success: function(info) { |
|
|
@ -621,16 +637,6 @@ |
|
|
const info = uni.getSystemInfoSync(); |
|
|
const info = uni.getSystemInfoSync(); |
|
|
this.navBarHeight = info.statusBarHeight; |
|
|
this.navBarHeight = info.statusBarHeight; |
|
|
}, |
|
|
}, |
|
|
onReady() { |
|
|
|
|
|
// 记录分类栏相对页面的偏移量,用于上滑检测 |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
query.select('#menuList').boundingClientRect(rect => { |
|
|
|
|
|
if (rect) this.menuListOffsetTop = rect.top + this.lastScrollTop; |
|
|
|
|
|
}).exec(); |
|
|
|
|
|
}, 500); |
|
|
|
|
|
}, |
|
|
|
|
|
methods: { |
|
|
|
|
|
// 内部切换方法:带isSwitching保护,防止程序化滚动期间闪回 |
|
|
// 内部切换方法:带isSwitching保护,防止程序化滚动期间闪回 |
|
|
_switchCategory(index) { |
|
|
_switchCategory(index) { |
|
|
if (this.isSwitching) return; |
|
|
if (this.isSwitching) return; |
|
|
@ -925,6 +931,9 @@ |
|
|
this.lastIndex = this.currentIndex |
|
|
this.lastIndex = this.currentIndex |
|
|
this.currentIndex = index |
|
|
this.currentIndex = index |
|
|
switch (index) { |
|
|
switch (index) { |
|
|
|
|
|
case 0: |
|
|
|
|
|
this.indexInit() |
|
|
|
|
|
break; |
|
|
case 1: |
|
|
case 1: |
|
|
let worker = uni.getStorageSync('worker') |
|
|
let worker = uni.getStorageSync('worker') |
|
|
if(worker == '' || worker == undefined || worker == null){ |
|
|
if(worker == '' || worker == undefined || worker == null){ |
|
|
|