Browse Source

首页

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

Loading…
Cancel
Save