提交 c98e4a98 作者: 吴佳伟

fix: 金刚区图标优化

上级 bacbcda4
......@@ -129,7 +129,6 @@
// 查询金刚区数据
getServiceItems()
getMenuItems()
// 查询天气信息
getWarningInfo()
// 查询热门产地行情
......@@ -184,15 +183,6 @@
}
})
})
WeatherAPI.alarm(`${pageData.weather.lat},${pageData.weather.lon}`).then((res) => {
console.log('WeatherAPI.alarm', res)
// pageData.weather.warning = res.data.alerts?.[0]?.description || ''
// TODO: 测试数据
pageData.weather.warning =
'雨花区气象台24日11时19分继续发布大风蓝色预警信号:预计未来24小时内临桂将出现6级(或阵风7级)以上大风,请做好防范。'
})
}
// 页面数据
......@@ -307,7 +297,7 @@
function getServiceItems() {
HomeAPI.zoneList({
pageNo: 1,
pageSize: 4,
pageSize: 8,
status: 1,
type: 1,
}).then((res) => {
......@@ -316,18 +306,6 @@
pageData.serviceItems = records
})
}
function getMenuItems() {
HomeAPI.zoneList({
pageNo: 1,
pageSize: 4,
status: 1,
type: 2,
}).then((res) => {
const { records } = res
pageData.menuItems = []
pageData.menuItems = records
})
}
function getWarningInfo() {
if (!pageData.weather.lon || !pageData.weather.lat) {
return
......@@ -384,13 +362,13 @@
}
// 农产品关注点击事件
function _onProductFollowClick(product: any) {
function onProductFollowClick(product: any) {
console.log('点击关注农产品:', product)
// 在这里添加具体的关注逻辑
}
// 查看更多农技课堂
function _onViewMoreClass() {
function onViewMoreClass() {
console.log('查看全部农技课堂')
// 在这里添加具体的查看逻辑
}
......@@ -398,7 +376,7 @@
// 轮播视频切换的时候触发
function handleChangeVideo(e: any) {
const currentIndex = e.detail.current
const _prevIndex = pageData.current
const prevIndex = pageData.current
pageData.current = currentIndex
pageData.agricultureClass.title = pageData.agricultureClass.videoList[currentIndex]?.title
......@@ -467,7 +445,7 @@
<view class="codefun-flex-col codefun-relative group_3">
<view class="codefun-flex-col">
<view class="codefun-flex-col codefun-self-stretch group_4">
<view class="codefun-flex-col section_3" :class="{ '!pb-6': !pageData.weather.warning }">
<view class="codefun-flex-col section_3">
<view class="codefun-flex-row codefun-justify-between" style="align-items: center">
<view
class="codefun-flex-row codefun-items-center codefun-relative codefun-overflow-hidden"
......@@ -483,7 +461,7 @@
style="width: 400rpx"
>
<up-notice-bar
v-if="pageData.weather.detailedLocation !== '获取中'"
v-if="pageData.weather.detailedLocation != '获取中'"
icon=""
bgColor="#FFFFFF00"
color="#5db66f"
......@@ -568,18 +546,7 @@
</view>
</view>
</view>
<view class="my-2" v-if="pageData.weather.warning">
<fui-notice-bar
:content="pageData.weather.warning"
scrollable
:padding="['0', '32rpx']"
>
<view class="fui-icon__box">
<fui-icon name="notice" :size="36" color="#FF2B2B" />
</view>
</fui-notice-bar>
</view>
<!-- <view class="codefun-flex-row section_4" v-if="pageData.weather.warning">
<view class="codefun-flex-row section_4" v-if="pageData.weather.warning">
<image
class="codefun-shrink-0 image_10"
src="/static/images/codefun/344155285176a7ac7ccd670a2a1daf19.png"
......@@ -589,22 +556,9 @@
>
<text class="text_12">{{ pageData.weather.warning }}</text>
</view>
</view> -->
</view>
<view class="codefun-flex-col codefun-relative section_5">
<view class="codefun-flex-row">
<view
v-show="item.status"
v-for="item in pageData.menuItems"
:key="item.id"
class="codefun-flex-col codefun-items-center group_10"
@click="onMenuItemClick(item)"
>
<image class="image_11" :src="item.icon_url" />
<text class="font_2 mt-11">{{ item.name }}</text>
</view>
</view>
<view class="codefun-flex-row codefun-mt-20">
</view>
<view class="codefun-flex-row section_5">
<view
v-show="item.status"
v-for="item in pageData.serviceItems"
......@@ -616,7 +570,6 @@
<text class="font_2 mt-11">{{ item.name }}</text>
</view>
</view>
</view>
<view class="codefun-flex-row codefun-justify-between codefun-items-center section_6">
<view class="codefun-flex-col">
<view class="codefun-flex-row codefun-items-baseline" style="align-items: center">
......@@ -904,7 +857,7 @@
.section_3 {
width: 694rpx;
// margin-right: 28rpx;
padding: 28rpx;
padding: 20rpx 28rpx 58rpx;
background-image: linear-gradient(180deg, #dcfce7 0%, #f8fef9 100%);
border-radius: 16rpx;
mix-blend-mode: NOTTHROUGH;
......@@ -1081,12 +1034,12 @@
}
.section_5 {
flex-wrap: wrap;
margin-right: 28rpx;
margin-top: -34rpx;
padding: 30rpx 0 40.76rpx;
padding: 30rpx 0 30rpx;
background-color: #ffffff;
border-radius: 16rpx;
mix-blend-mode: NOTTHROUGH;
.image_11 {
border-radius: 88rpx;
......@@ -1095,6 +1048,7 @@
}
.group_10 {
margin-bottom: 15rpx;
flex: 1 1 173.5rpx;
.text_50 {
......@@ -1204,7 +1158,7 @@
border-radius: 16rpx;
mix-blend-mode: NOTTHROUGH;
width: 32rpx;
height: 40rpx;
height: 32rpx;
}
.codefun-mr-4 {
margin-right: 10rpx;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论