policeSecurity/collect_information/src/pages/police/index/index.vue

57 lines
1.7 KiB
Vue
Raw Normal View History

2024-09-25 10:21:43 +08:00
<template>
<view>
<view class="swiperDemo">
<nut-swiper ref="swiperRef" pagination-visible pagination-color="#e53e31" :auto-play="3000" :init-page="0">
2024-11-04 09:57:17 +08:00
<nut-swiper-item v-for="(item, index) in list" :key="index" style="height: 200px">
2024-11-08 16:18:15 +08:00
<image :src="item" alt="" style="height: 100%; width: 100%" draggable="false" />
2024-09-25 10:21:43 +08:00
</nut-swiper-item>
</nut-swiper>
</view>
<view class="swiperDemoItem">
<view class="swiperDemoIndex"></view>
<view>请选择</view>
</view>
<!--九宫格-->
<view>
<view class="subModule">
<view class="subModuleItem" v-for="item in subModuleList" :key="item.id" @click="subNavigation(item.url)">
<view class="subModuleIndex">
<image :src="item.icon"></image>
</view>
2024-11-08 16:18:15 +08:00
<view style="font-size: 12px; color: #414141; margin-top: 9px">{{ item.name }}</view>
2024-09-25 10:21:43 +08:00
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
2024-11-08 16:18:15 +08:00
import { ref } from 'vue'
import Taro from '@tarojs/taro'
2024-09-25 10:21:43 +08:00
import icon from '@/assets/images/project.png'
import './index.scss'
2024-11-08 16:18:15 +08:00
const list = ref([process.env.TARO_APP_MINIO_URL + '/police-security/2024/11/5/dunpai.jpg', process.env.TARO_APP_MINIO_URL + '/police-security/2024/11/5/xingqiu.jpg'])
2024-09-25 10:21:43 +08:00
const swiperRef = ref() //轮播图
const subModuleList = ref([
{
id: 0,
icon: icon,
name: '企事业单位',
2024-11-08 16:18:15 +08:00
url: '/subPages/police/myEnterprisesUnit/myEnterprisesUnit',
2024-09-25 10:21:43 +08:00
},
{
id: 1,
icon: icon,
2024-11-08 16:18:15 +08:00
name: '监督考核',
url: '/subPages/police/dailyInspection/dailyInspection',
2024-09-25 10:21:43 +08:00
},
{
id: 2,
icon: icon,
name: '待定',
2024-11-08 16:18:15 +08:00
url: '',
},
2024-09-25 10:21:43 +08:00
])
2024-11-08 16:18:15 +08:00
const subNavigation = async (url: string) => Taro.navigateTo({ url })
2024-09-25 10:21:43 +08:00
</script>