PDA
dengjunjie
2024-12-24 45af2754d00347ec86492707e15b3884557ee851
´úÂë¹ÜÀí/»´°²PDA/pages/index/index.vue
@@ -3,9 +3,10 @@
   <view class="" slot="body">
      <!-- <view v-for="(item,index) in tree" :key="item.id"> -->
         <u-grid :col="3">
            <u-grid-item @tap="clickCoupon(item.url)" v-for="(item) in tree" :key="item.id">
               <u-icon name="coupon" :size="50"></u-icon>
               <view class="grid-text">{{item.name}}</view>
         <u-grid-item @tap="clickCoupon(item.url,item.menuId,item.description)" v-for="(item) in tree"
            :key="item.menuId">
            <u-icon name="home" :size="50"></u-icon>
            <view class="grid-text">{{item.menuName}}</view>
            </u-grid-item>
         </u-grid>
      <!-- </view> -->
@@ -16,7 +17,9 @@
</template>
<script>
   import { config } from '../../common/config.js'
   import {
      config
   } from '../../common/config.js'
   export default {
      data() {
         return {
@@ -60,7 +63,8 @@
                        duration: 5000,
                        icon: "none"
                     });
                     var dtask = plus.downloader.createDownload("http://10.1.211.101:9004/api/PDA/DownLoadApp", {},
                     var dtask = plus.downloader.createDownload(
                        "http://10.1.211.101:9004/api/PDA/DownLoadApp", {},
                        function(d, status) {
                           // ä¸‹è½½å®Œæˆ 
                           if (status == 200) {
@@ -89,8 +93,8 @@
               complete: () => {}
            });
         },
         getCurrentTree() {
            this.$u.post('/api/Sys_Menu/getTreeMenu', {}).then(result => {
         getCurrentTree(ParentId) {
            this.$u.post('/api/Sys_Menu/GetTreeMenuPDAStash?ParentId=' + ParentId, {}).then(result => {
                  this.tree = result;
            })
         },
@@ -111,10 +115,16 @@
            // return true;
            return this.datas.find(x => x.text == text);
         },
         clickCoupon(url) {
         clickCoupon(url, menuid, warehouseid) {
            // console.log("clickCoupon")
            if (this.hasLogin()) {
               this.$u.route(url)
               this.$u.route({
                  url: url,
                  params: {
                     menuId: menuid,
                     warehouseId: warehouseid
                  }
               })
            } else {
               this.$t.message.loading('登录失效请重新登录')
               uni.reLaunch({