#
whycq
2023-07-27 232e949dbfe8b7883f1952233de21037fb3fd71e
pages/home/home.vue
@@ -21,20 +21,43 @@
         return {
            baseUrl: '',
            token: '',
            icon: '',
            elements: [],
            elements2: [{
            elements2: [
               {
                  title: '组托入库',
                  name: 'pakin',
                  color: 'cyan',
                  color: 'orange',
                  cuIcon: 'pullup',
                  url: '/pakin/pakin'
               },
               // {
               //    title: '订单组托',
               //    name: 'orderPakin',
               //    color: 'blue',
               //    cuIcon: 'pullup',
               //    url: '/order/orderPakin'
               // },
               // {
               //    title: '组托上架',
               //    name: 'putOn',
               //    color: 'cyan',
               //    cuIcon: 'pullup',
               //    url: '/pakin/putOn'
               // },
               {
                  title: '订单入库',
                  name: 'orderPakin',
                  color: 'blue',
                  title: '订单组托2',
                  name: 'putOn',
                  color: 'cyan',
                  cuIcon: 'pullup',
                  url: '/order/orderPakin'
                  url: '/order/orderPutOn2'
               },
               {
                  title: '订单组托3',
                  name: 'putOn',
                  color: 'cyan',
                  cuIcon: 'pullup',
                  url: '/order/orderPutOn3'
               },
               // {
               //    title: '打印',
@@ -43,62 +66,62 @@
               //    cuIcon: 'text',
               //    url: '/print/print'
               // },
               {
                  title: '订单上架',
                  name: 'orderPutOn',
                  color: 'mauve',
                  cuIcon: 'pullup',
                  url: '/order/orderPutOn'
               },
               {
                  title: '订单下架',
                  name: 'orderPutDown',
                  color: 'pink',
                  cuIcon: 'pulldown',
                  url: '/order/orderPutDown'
               },
               {
                  title: '库存查询',
                  name: 'stockQuery',
                  color: 'brown',
                  cuIcon: 'check',
                  url: '/stock/stockQuery'
               },
               {
                  title: '盘点',
                  name: 'stockCheck',
                  color: 'red',
                  cuIcon: 'post',
                  url: '/stock/stockCheck'
               },
               {
                  title: '商品打印',
                  name: 'matList',
                  color: 'orange',
                  cuIcon: 'post',
                  url: '/mat/matList'
               },
               {
                  title: '补货',
                  name: 'restock',
                  color: 'yellow',
                  cuIcon: 'punch',
                  url: '/stock/restock'
               },
               {
                  title: '转全板',
                  name: 'piking',
                  color: 'olive',
                  cuIcon: 'order',
                  url: '/pakin/piking'
               },
               {
                  title: '换板绑定',
                  name: 'changePallet',
                  color: 'green',
                  cuIcon: 'order',
                  url: '/stock/changePallet'
               },
               // {
               //    title: '订单上架',
               //    name: 'orderPutOn',
               //    color: 'mauve',
               //    cuIcon: 'pullup',
               //    url: '/order/orderPutOn'
               // },
               // {
               //    title: '订单下架',
               //    name: 'orderPutDown',
               //    color: 'pink',
               //    cuIcon: 'pulldown',
               //    url: '/order/orderPutDown'
               // },
               // {
               //    title: '库存查询',
               //    name: 'stockQuery',
               //    color: 'brown',
               //    cuIcon: 'check',
               //    url: '/stock/stockQuery'
               // },
               // {
               //    title: '盘点',
               //    name: 'stockCheck',
               //    color: 'red',
               //    cuIcon: 'post',
               //    url: '/stock/stockCheck'
               // },
               // {
               //    title: '商品打印',
               //    name: 'matList',
               //    color: 'orange',
               //    cuIcon: 'post',
               //    url: '/mat/matList'
               // },
               // {
               //    title: '补货',
               //    name: 'restock',
               //    color: 'yellow',
               //    cuIcon: 'punch',
               //    url: '/stock/restock'
               // },
               // {
               //    title: '转全板',
               //    name: 'piking',
               //    color: 'olive',
               //    cuIcon: 'order',
               //    url: '/pakin/piking'
               // },
               // {
               //    title: '换板绑定',
               //    name: 'changePallet',
               //    color: 'green',
               //    cuIcon: 'order',
               //    url: '/stock/changePallet'
               // },
               {
                  title: '退出登录',
                  name: 'logOut',
@@ -136,11 +159,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 +172,8 @@
                        title: '退出登录',
                        name: 'logOut',
                        color: 'grey',
                        cuIcon: 'exit'
                        cuIcon: 'exit',
                        url: '/login/logOut'
                     })
                  } else if (res.code === 403) {
                     uni.showToast({
@@ -162,11 +187,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 +206,12 @@
               }
            })
         },
         getIcon(e) {
            const ways = ['pakin','orderPakin','orderPutOn']
            if (ways.includes(e)) {
               this.icon = 'pullup'
            }
         }
      }
   }
</script>