Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
c98e4a98
提交
c98e4a98
authored
11月 10, 2025
作者:
吴佳伟
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 金刚区图标优化
上级
bacbcda4
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
60 行删除
+14
-60
shouye.vue
src/pages/shouye/shouye.vue
+14
-60
没有找到文件。
src/pages/shouye/shouye.vue
浏览文件 @
c98e4a98
...
...
@@ -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
:
694
rpx
;
// margin-right: 28rpx;
padding
:
28
rpx
;
padding
:
2
0
rpx
28
rpx
5
8
rpx
;
background
-
image
:
linear
-
gradient
(
180
deg
,
#
dcfce7
0
%
,
#
f8fef9
100
%
);
border
-
radius
:
16
rpx
;
mix
-
blend
-
mode
:
NOTTHROUGH
;
...
...
@@ -1081,12 +1034,12 @@
}
.
section_5
{
flex
-
wrap
:
wrap
;
margin
-
right
:
28
rpx
;
margin
-
top
:
-
34
rpx
;
padding
:
30
rpx
0
40.76
rpx
;
padding
:
30
rpx
0
30
rpx
;
background
-
color
:
#
ffffff
;
border
-
radius
:
16
rpx
;
mix
-
blend
-
mode
:
NOTTHROUGH
;
.
image_11
{
border
-
radius
:
88
rpx
;
...
...
@@ -1095,6 +1048,7 @@
}
.
group_10
{
margin
-
bottom
:
15
rpx
;
flex
:
1
1
173.5
rpx
;
.
text_50
{
...
...
@@ -1204,7 +1158,7 @@
border
-
radius
:
16
rpx
;
mix
-
blend
-
mode
:
NOTTHROUGH
;
width
:
32
rpx
;
height
:
40
rpx
;
height
:
32
rpx
;
}
.
codefun
-
mr
-
4
{
margin
-
right
:
10
rpx
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论