index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view>
  3. <view class="section bg-white mt10">
  4. <view class="cu-list grid col-3 no-border">
  5. <view class="cu-item justify-center align-center" @tap="goSiteList(item.redirectUrl)" v-for="(item, index) in cuIconList" :key="index">
  6. <image :src="`${item.imgUrl}`" style="width: 100rpx; height: 100rpx"></image>
  7. <view class="cu-tag badge" v-if="item.badge != 0">
  8. <block class="cu-tag badge" v-if="item.badge != 1">{{ item.badge > 99 ? "99+" : item.badge }}</block>
  9. </view>
  10. <text>{{ item.name }}</text>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script setup>
  17. import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll, onBackPress, onUnload } from "@dcloudio/uni-app";
  18. import { reactive, getCurrentInstance, toRefs, inject } from "vue";
  19. import { useStores, commonStores } from "@/store/modules/index";
  20. const useStore = useStores();
  21. const { proxy } = getCurrentInstance();
  22. const data = reactive({});
  23. const {} = toRefs(data);
  24. function goSiteList(url) {
  25. // console.log(url);
  26. uni.navigateTo({
  27. url: url,
  28. success: (res) => {},
  29. fail: () => {},
  30. complete: () => {},
  31. });
  32. }
  33. </script>
  34. <style>
  35. .cu-list.grid.no-border {
  36. padding: 30rpx 10rpx;
  37. }
  38. </style>