From 5569d8f924d1835b41382b0bc8e7ce51033921c7 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期四, 18 一月 2024 14:55:28 +0800 Subject: [PATCH] # --- pages/home/home.vue | 59 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 49 insertions(+), 10 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index 8640219..c027f50 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -21,21 +21,44 @@ return { baseUrl: '', token: '', + icon: '', elements: [], - elements2: [{ + elements2: [ + { title: '缁勬墭鍏ュ簱', name: 'pakin', - color: 'cyan', + color: 'orange', cuIcon: 'pullup', url: '/pakin/pakin' }, { - title: '璁㈠崟鍏ュ簱', + title: '璁㈠崟缁勬墭', name: 'orderPakin', color: 'blue', cuIcon: 'pullup', url: '/order/orderPakin' }, + { + title: '缁勬墭涓婃灦', + name: 'putOn', + color: 'cyan', + cuIcon: 'pullup', + url: '/pakin/putOn' + }, + { + title: '璁㈠崟缁勬墭2', + name: 'putOn', + color: 'cyan', + cuIcon: 'pullup', + url: '/order/orderPutOn2' + }, + // { + // title: '璁㈠崟缁勬墭3', + // name: 'putOn', + // color: 'cyan', + // cuIcon: 'pullup', + // url: '/order/orderPutOn3' + // }, // { // title: '鎵撳嵃', // name: 'print', @@ -70,6 +93,13 @@ color: 'red', cuIcon: 'post', url: '/stock/stockCheck' + }, + { + title: '搴撲綅杞Щ', + name: 'locMove', + color: 'olive', + cuIcon: 'order', + url: '/loc/locMove' }, { title: '鍟嗗搧鎵撳嵃', @@ -136,11 +166,12 @@ if (res.data.length < 0) { break; } + that.getIcon(res.data[i].title) that.elements.unshift({ title: res.data[i].name, name: res.data[i].title, color: that.colorList[i], - cuIcon: 'safe', + cuIcon: that.icon, url: res.data[i].action }) } @@ -148,7 +179,8 @@ title: '閫�鍑虹櫥褰�', name: 'logOut', color: 'grey', - cuIcon: 'exit' + cuIcon: 'exit', + url: '/login/logOut' }) } else if (res.code === 403) { uni.showToast({ @@ -162,11 +194,12 @@ }); }, 1000); } else if(res.status === 404) { - uni.showToast({ - title: '404', - icon: "none", - position: 'top' - }) + that.elements = that.elements2 + // uni.showToast({ + // title: '榛樿涓婚〉', + // icon: "none", + // position: 'top' + // }) } else { uni.showToast({ title: res.msg, @@ -180,6 +213,12 @@ } }) }, + getIcon(e) { + const ways = ['pakin','orderPakin','orderPutOn'] + if (ways.includes(e)) { + this.icon = 'pullup' + } + } } } </script> -- Gitblit v1.9.1