Browse Source

首页

hella_online_20240829
zhang_li 6 months ago
parent
commit
8241cb8888
  1. 65
      src/pages/index/index.vue

65
src/pages/index/index.vue

@ -127,7 +127,6 @@
this.tabbar.forEach(res => {
res.children.forEach(res => {
i++
console.log(res.name, i)
})
})
this.getDictory()
@ -156,30 +155,28 @@
},
onShow() {
if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) {
// uni.showModal({
// title: '',
// content: ' , ', //
// showCancel: !this.forcedLogin,
// success: (res) => {
// if (res.confirm) {
// //使reLanch
// if (this.forcedLogin) {
// uni.reLaunch({
// url: '../login/index'
// })
// } else {
// uni.navigateTo({
// url: '../login/index'
// })
// }
// }
// }
// })
uni.reLaunch({
url: '../login/index'
uni.showModal({
title: '未登录',
content: '您未登录 , 需要登录后才能继续', //
showCancel: !this.forcedLogin,
success: (res) => {
if (res.confirm) {
//使reLanch
if (this.forcedLogin) {
uni.reLaunch({
url: '../login/index'
})
} else {
uni.navigateTo({
url: '../login/index'
})
}
}
}
})
} else {
this.timerRefresh();
}
},
onUnload() {
@ -208,7 +205,28 @@
this.menusCount = res.data;
this.tabbar.forEach(item => {
item.children.forEach(rightItem => {
var count = this.menusCount[rightItem.component]
var count = 0
if(Array.isArray(this.menusCount[rightItem.component.split('-')[0]])&&this.menusCount[rightItem.component.split('-')[0]].length>0){
if(rightItem.component=='productionreturn'){
this.menusCount[rightItem.component].forEach((item)=>{
count += item.count
})
}else{
if(rightItem.component=='inventorymove-HoldToScrap'){
console.log(rightItem.component)
}
this.menusCount[rightItem.component.split('-')[0]].forEach((item)=>{
if(item.businessType ==rightItem.component.split('-')[1] ){
count = item.count
}
})
}
}else{
count =this.menusCount[rightItem.component]
}
if (count != undefined) {
rightItem.count = count;
}
@ -413,7 +431,6 @@
that.filterList = [];
},
input(v) {
console.log("222", v)
this.serchval = v
this.nomore = false
if (this.serchval == "") {

Loading…
Cancel
Save