wangfukang 1 month ago
parent
commit
7a1132e66f
  1. 1159
      components/tab-bar/homeGroupPending.vue
  2. 15
      components/tab-bar/tab-bar.vue

1159
components/tab-bar/homeGroupPending.vue

File diff suppressed because it is too large

15
components/tab-bar/tab-bar.vue

@ -43,7 +43,6 @@
}, {
tabName: '配送',
pageIndex: 1,
hideInSocial: true,
tabIcon: '/static/images/tabbar/peisong1.png',
tabIconSelect: '/static/images/tabbar/peisong.png',
isCheck: false,
@ -95,13 +94,17 @@
socialMode: {
type: Boolean,
default: false
},
socialDeliveryEnabled: {
type: Boolean,
default: true
}
},
computed: {
displayTabs() {
if (!this.socialMode) return this.tabList
return this.tabList
.filter((item) => !item.hideInSocial)
.filter((item) => this.socialDeliveryEnabled || item.pageIndex !== 1)
.map((item) => {
if (item.pageIndex === 2) {
return Object.assign({}, item, { tabName: '同城圈' })
@ -117,6 +120,9 @@
},
socialMode() {
this.syncTabCheck(this.currentIndex)
},
socialDeliveryEnabled() {
this.syncTabCheck(this.currentIndex)
}
},
mounted() {
@ -141,6 +147,9 @@
const token = uni.getStorageSync('hiver_token')
return !!(token && typeof token === 'string' && token.trim() && token !== 'null' && token !== 'undefined')
},
shouldRequestDeliveryCounts() {
return !this.socialMode || this.socialDeliveryEnabled
},
goLogin(index) {
const redirectKey = 'login_redirect_' + Date.now()
uni.setStorageSync(redirectKey, '/pages/index/index?tabIndex=' + index)
@ -233,7 +242,7 @@
uni.$emit('campusUnreadChange', result)
}
}).catch(() => {}))
if(worker){
if(worker && this.shouldRequestDeliveryCounts()){
const area = uni.getStorageSync('area') ? JSON.parse(uni.getStorageSync('area')) : {}
tasks.push(this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:worker.workerId,regionId:area.id}, false, true).then((res) => {
if (res.code == 200) {

Loading…
Cancel
Save