#
whycq
2024-06-24 0e686b26dc3000eb2602929ba03c8429e9aa1517
pages/home/orderManage.vue
@@ -27,7 +27,7 @@
            elements2: [
               {
                  title: '采购入库单',
                  name: 'outPakin',
                  name: 'pakinOrder',
                  color: 'blue',
                  // cuIcon: 'pullup',
                  url: `/phyz/order/pakinOrderSelect`
@@ -93,11 +93,18 @@
            colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
         };
      },
      onShow() {
      // onShow() {
      //    this.baseUrl = uni.getStorageSync('baseUrl');
      //    this.token = uni.getStorageSync('token');
      //    this.project = uni.getStorageSync('project')
      //    // this.getAuth()
      //    this.backGroundRepeat()
      // },
      onLoad(option) {
         this.baseUrl = uni.getStorageSync('baseUrl');
         this.token = uni.getStorageSync('token');
         this.project = uni.getStorageSync('project')
         this.getAuth()
         this.getAuth(option.id)
         this.backGroundRepeat()
      },
      methods: {
@@ -112,11 +119,11 @@
               i++
            }
         },
         getAuth() {
         getAuth(id) {
            let that = this
            uni.request({
               url: that.baseUrl + '/menu/pda/auth',
               data: {},
               data: {level:2 ,id: id},
               header: { 'token': uni.getStorageSync('token') },
               method: 'POST',
               success(res) {
@@ -129,8 +136,11 @@
                  that.elements = []
                  if (res.code === 200) {
                     if (res.data == undefined || res.data == null || res.data == "") {
                        that.elements = that.elements2
                        return
                        if (res.data.length == 0) {
                           return
                        } else {
                           that.elements = that.elements2
                        }
                     }
                     for (var i = 0; i < res.data.length; i++) {
                        if (res.data.length < 0) {
@@ -142,16 +152,9 @@
                           name: res.data[i].title,
                           color: that.colorList[i],
                           cuIcon: that.icon,
                           url: `/${that.project}${res.data[i].action}`
                           url: `${res.data[i].code}`
                        })
                     }
                     that.elements.push({
                        title: '退出登录',
                        name: 'logOut',
                        color: 'grey',
                        cuIcon: 'exit',
                        url: '/login/logOut'
                     })
                  } else if (res.code === 403) {
                     uni.showToast({
                        title: res.msg,