zhouwenxuan
2023-08-02 9461caf2a459a7ed1eb16f8f439c02cfbcf1930b
pages/tabBar/current/current.vue
@@ -6,6 +6,7 @@
         <view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
         <!-- 真正的导航栏内容 -->
         <view class="navBar">
            <u-icon style=" margin-left: -25px;" name="arrow-left" color="black" size="17" @click="goBack" />
            <view class="barText">信息查看</view>
         </view>
      </view>
@@ -80,7 +81,7 @@
<script>
   import tabBar from '../tabBarIndex.vue'
   import { getPublished } from '../../../api/notice.js'
   import { getPublished, getResponseDetail } from '../../../api/notice.js'
   import tebBar from '../tabBarIndex.vue'
   export default {
      components:{
@@ -123,11 +124,11 @@
            ],
            selectedSaleAnalysis: 'all',
            InfoList: [],
            unitType: '',
            unitType: null,
         }
      },
      onLoad() {
         this.unitType = uni.getStorageSync('unittype');
         this.unitType = uni.getStorageSync('unittype') + 1;
         console.log("11",this.unitType)
         //获取手机状态栏高度
         this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
@@ -174,28 +175,33 @@
            this.getInfoList();
         },
         toDetail(item) {
            console.log("item",item)
            uni.navigateTo({
              url: `/pages/tabBar/notice/detail?data=` + encodeURIComponent(JSON.stringify(item))
            })
         },
         toResponsivity(item) {
            console.log("item",item)
            const param = {
               pageIndex: 1,
               pageSize: 100,
               searchParams: {
                  warnInfoId: item.id
               }
            }
            getResponseDetail(param).then(res => {
               if(res.code == 100){
                  console.log("res",res)
                     let data  = res.data.appPageResponseByIdRespDTOS;
                     res.data.appPageResponseByIdRespDTOS.forEach((item,index) => {
                        if(item.forwardRate){
                           data[index].forwardRate = item.forwardRate.replace(/%/g, '%25');
                        }
            
            // if(this.unitType == 2 || this.unitType == 1 ){
            //    uni.navigateTo({
            //      url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
            //    })
            // }else if(this.unitType == 3){
            //    uni.navigateTo({
            //      url: `/pages/tabBar/responsivity/cityResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
            //    })
            // }else if(this.unitType == 4){
            //    uni.navigateTo({
            //      url: `/pages/tabBar/responsivity/villageResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
            //    })
            // }
                     })
                  uni.navigateTo({
                    url: `/pages/tabBar/responsivity/countyResponsivity?data=` + encodeURIComponent(JSON.stringify(res.data))
                  })
               }
            })
         },
         //下拉刷新
         onPullDownRefresh() {
@@ -226,6 +232,11 @@
      scroll: function(e) {
        // console.log(e)
      },
        goBack() {
           uni.switchTab({
               url:'/pages/tabBar/firstPage/firstPage'
           });
        },
      }
   }