Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

rightList.vue 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class='right-contaienr'>
  3. <scroll-view scroll-y="true" :style='{height:scrollHeight}'>
  4. <view v-for="(item,index) in menuList" :key='index' class="item-box" @click="toNext(item.link,item.name)">
  5. <view class="l-img bg-blue" :style="{ '--background': bgBlue }">
  6. <image :src="`${fileURLList}${item.iconPath}`" mode="aspectFit" class='img' />
  7. </view>
  8. <view class="r-info">
  9. <view class="title-text">{{item.name}}</view>
  10. <view class="title-desc">查看{{item.name}}</view>
  11. </view>
  12. </view>
  13. </scroll-view>
  14. </view>
  15. </template>
  16. <script lang="ts" setup>
  17. import {
  18. ref,
  19. reactive, onMounted,
  20. getCurrentInstance,
  21. defineProps
  22. } from "vue";
  23. import {jumpOldMini} from "@/utils/utils";
  24. import {
  25. fileURL, fileURLList
  26. } from "@/datas/fileURL.js";
  27. const bgBlue = `url(${fileURL}image/newHome/more-bg.png) center center no-repeat`;
  28. defineProps({
  29. menuList: {
  30. type: Array,
  31. default: () => []
  32. },
  33. })
  34. const instance = getCurrentInstance();
  35. const scrollHeight = ref('100%')
  36. onMounted(() => {
  37. let windowHeight = uni.getSystemInfoSync().windowHeight
  38. const query = uni.createSelectorQuery().in(instance.proxy)
  39. query
  40. .select(".right-contaienr")
  41. .boundingClientRect((data) => {
  42. console.log("得到布局位置信息", data);
  43. console.log("节点离页面顶部的距离为" + data.top, windowHeight);
  44. scrollHeight.value = (windowHeight - data.top) + 'px'
  45. })
  46. .exec();
  47. })
  48. function toNext(url,name) {
  49. if(name=='更换设备' || name=='卡签续期'||name=='设备升级' || name=='卡签注销'|| name=='挂失解挂' || name=='欠费补缴' || name=='发票服务'|| name=='月结单查询' || name=='业务审核查询'|| name=='ETC通行流水记录' || name=='黑名单查询'){
  50. jumpOldMini()
  51. }else{
  52. uni.navigateTo({
  53. url: url,
  54. });
  55. }
  56. }
  57. </script>
  58. <style lang='scss' scoped>
  59. .right-contaienr {
  60. overflow: hidden;
  61. .scroll-Y {
  62. height: 100%;
  63. }
  64. .item-box {
  65. display: flex;
  66. padding-bottom: 30rpx;
  67. }
  68. .l-img {
  69. width: 105rpx;
  70. height: 105rpx;
  71. background-size: 100% 100%;
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. .img {
  76. width: 64rpx;
  77. height: 64rpx;
  78. }
  79. }
  80. .r-info {
  81. margin-left: 19rpx;
  82. font-family: MicrosoftYaHei;
  83. .title-text {
  84. font-size: 28rpx;
  85. color: #01243A;
  86. margin-top: 5rpx;
  87. }
  88. .title-desc {
  89. margin-top: 10rpx;
  90. font-size: 26rpx;
  91. color: #999999;
  92. }
  93. }
  94. }
  95. </style>