修改主页样式

master
ihzero 2025-05-28 11:20:33 +08:00
parent fcc4e21c36
commit 6497852f80
24 changed files with 73 additions and 20 deletions

View File

@ -1,3 +1,3 @@
ENV = 'development'
VUE_APP_BASE_API = 'http://36.133.205.221:81'
VUE_APP_BASE_API = 'https://lcny-api.peidikeji.cn'

View File

@ -8,20 +8,26 @@
></image>
</view>
<view class="content-box">
<view
class="menus-section"
v-for="(menu, index) in menus"
:key="index"
>
<view class="title-t" v-if="menu.parent && menu.children.length>0"
<view class="menus-section" v-for="(menu, index) in menus" :key="index">
<view class="title-t" v-if="menu.parent && menu.children.length > 0"
>{{ menu.parent }}-{{ menu.label }}</view
>
<view class="title-t" v-if="!menu.parent && menu.children.length>0">{{ menu.label }}</view>
<view class="title-t" v-if="!menu.parent && menu.children.length > 0">{{
menu.label
}}</view>
<view class="menu-ul">
<view class="menu-li" v-for="(cdm, i) in menu.children" :key="i">
<view class="menu_item" @click="linknavFn(cdm)">
<view class="icon"></view>
<view class="name">{{ cdm.label }}</view>
<view class="menu_item_content">
<view class="icon">
<image
class="icon_img"
v-if="cdm.icon"
:src="require(`@/static/img/${cdm.icon}`)"
></image>
</view>
<view class="name">{{ cdm.label }}</view>
</view>
</view>
</view>
</view>
@ -44,36 +50,43 @@ export default {
label: '气象监测',
url: '/pages/index/meteorological',
permission: 'endpoint.weather.index',
icon: 'moon-cloudy-line.png',
},
{
label: '智能监控',
url: '/pages/index/monitor',
permission: 'endpoint.camera.index',
icon: 'live-line.png',
},
{
label: '土壤监控',
url: '/pages/index/soil-monitoring',
permission: 'endpoint.soil.index',
icon: 'map-pin-range-line.png',
},
{
label: '水质监控',
url: '/pages/index/water-quality',
permission: 'endpoint.water.index',
icon: 'contrast-drop-line.png',
},
{
label: '昆虫性诱监测',
url: '/pages/index/insect-monitors',
permission: 'endpoint.insect.index',
icon: 'bug-line.png',
},
{
label: '虫情监测',
url: '/pages/index/pests',
permission: 'endpoint.worm_statics.index',
icon: 'bug-2-line.png',
},
{
label: '杀虫灯检测',
url: '/pages/index/insecticidal-lamp',
permission: 'endpoint.insecticidal_lamp.index',
icon: 'alarm-warning-line.png',
},
],
},
@ -85,16 +98,19 @@ export default {
label: '城镇数据',
url: '/pages/basics/town-base',
permission: 'endpoint.town_street.index',
icon: 'building-4-line.png',
},
{
label: '基地数据',
url: '/pages/basics/basics-base',
permission: 'endpoint.agricultural_basic.index',
icon: 'home-4-line.png',
},
{
label: '基地概况',
url: '/pages/basics/profile',
permission: 'endpoint.agricultural_base_overview.index',
icon: 'home-3-line.png',
},
],
},
@ -106,11 +122,13 @@ export default {
label: '城镇农作物',
url: '/pages/crop/town-crop',
permission: 'endpoint.town_crops.index',
icon: 'plant-line.png',
},
{
label: '基地农作物',
url: '/pages/crop/basics-crop',
permission: 'endpoint.crops.index',
icon: 'leaf-line.png',
},
],
},
@ -122,11 +140,13 @@ export default {
label: '城镇产量',
url: '/pages/yield/town-yield',
permission: 'endpoint.town_crops_output.index',
icon: 'box-1-line.png',
},
{
label: '基地产量',
url: '/pages/yield/basics-yield',
permission: 'endpoint.crops_output.index',
icon: 'instance-line.png',
},
],
},
@ -138,26 +158,31 @@ export default {
label: '稻虾价格',
url: '/pages/estate/estate-price',
permission: 'endpoint.rice_shrimp_prices.index',
icon: 'price-tag-3-line.png',
},
{
label: '稻虾每周价格',
url: '/pages/estate/estate-week-price',
permission: 'endpoint.rice_shrimp_weekly_prices.index',
icon: 'price-tag-2-line.png',
},
{
label: '稻虾产业',
url: '/pages/estate/estate-industry',
permission: 'endpoint.rice_shrimp_industries.index',
icon: 'collage-line.png',
},
{
label: '稻虾流向',
url: '/pages/estate/estate-flows',
permission: 'endpoint.rice_shrimp_flows.index',
icon: 'flow-chart.png',
},
{
label: '大宗物资',
url: '/pages/estate/estate-materiels',
permission: 'endpoint.materiels.index',
icon: 'shopping-basket-2-line.png',
},
],
},
@ -168,11 +193,13 @@ export default {
label: '设备管理',
url: '/pages/device/index',
permission: 'endpoint.device.index',
icon: 'robot-2-line.png',
},
{
label: '警报明细',
url: '/pages/device/warning',
permission: 'endpoint.warnings.index',
icon: 'feedback-line.png',
},
],
},
@ -181,10 +208,12 @@ export default {
},
computed: {
...mapGetters(['userInfo']),
menus(){
return this.filterAsyncRoutes(this.menuList, this.userInfo?.permissions_slug ?? [])
}
menus() {
return this.filterAsyncRoutes(
this.menuList,
this.userInfo?.permissions_slug ?? []
)
},
},
onLoad() {},
methods: {
@ -222,11 +251,11 @@ export default {
.banner-section {
.banner_img {
width: 100%;
height: 280rpx;
height: 427rpx;
}
}
.index-page {
background-color: #f8f8f8;
background-color: #EEEBFE;
.content-box {
padding-top: 30rpx;
padding-bottom: 150rpx;
@ -239,7 +268,7 @@ export default {
.title-t {
margin-bottom: 24rpx;
padding: 0 10rpx;
font-size: 28rpx;
font-size: 34rpx;
font-weight: bold;
}
}
@ -251,16 +280,40 @@ export default {
text-align: center;
padding: 0 10rpx;
margin-bottom: 18rpx;
.menu_item {
background-color: #fff;
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.15);
min-height: 90rpx;
border-radius: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10rpx 15rpx;
height: 100%;
padding-top: 100%;
position: relative;
.menu_item_content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 24%;
.icon {
width: 40rpx;
height: 40rpx;
.icon_img {
width: 100%;
height: 100%;
}
}
.name{
font-size: 24rpx;
margin-top: 14rpx;
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B