<template>
  <view>
    <view class="section bg-white mt10">
      <view class="cu-list grid col-3 no-border">
        <view class="cu-item justify-center align-center" @tap="goSiteList(item.redirectUrl)" v-for="(item, index) in cuIconList" :key="index">
          <image :src="`${item.imgUrl}`" style="width: 100rpx; height: 100rpx"></image>
          <view class="cu-tag badge" v-if="item.badge != 0">
            <block class="cu-tag badge" v-if="item.badge != 1">{{ item.badge > 99 ? "99+" : item.badge }}</block>
          </view>
          <text>{{ item.name }}</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll, onBackPress, onUnload } from "@dcloudio/uni-app";
import { reactive, getCurrentInstance, toRefs, inject } from "vue";
import { useStores, commonStores } from "@/store/modules/index";

const useStore = useStores();
const { proxy } = getCurrentInstance();

const data = reactive({});

const {} = toRefs(data);

function goSiteList(url) {
  // console.log(url);
  uni.navigateTo({
    url: url,
    success: (res) => {},
    fail: () => {},
    complete: () => {},
  });
}
</script>

<style>
.cu-list.grid.no-border {
  padding: 30rpx 10rpx;
}
</style>
