tianyi 1 week ago
parent
commit
391b9b3a57
  1. 29
      pages/index/index.vue

29
pages/index/index.vue

@ -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){

Loading…
Cancel
Save