Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
e49c9a30
提交
e49c9a30
authored
12月 24, 2025
作者:
王定
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 完成农机服务列表页面和申请入驻功能
上级
c8db9821
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
142 行增加
和
49 行删除
+142
-49
pages.json
src/pages.json
+9
-2
kexinnongzi.vue
src/pages/kexinnongzi/kexinnongzi.vue
+1
-2
nongjifuwu.vue
src/pages/nongjifuwu/nongjifuwu.vue
+132
-45
shenqingruzhu.vue
src/pages/nongjifuwu/shenqingruzhu.vue
+0
-0
没有找到文件。
src/pages.json
浏览文件 @
e49c9a30
...
@@ -288,7 +288,7 @@
...
@@ -288,7 +288,7 @@
{
{
"path"
:
"pages/nongjifuwu/nongjifuwu"
,
"path"
:
"pages/nongjifuwu/nongjifuwu"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"农机
作业预约
"
,
"navigationBarTitleText"
:
"农机
服务
"
,
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#5DB66F"
,
"navigationBarBackgroundColor"
:
"#5DB66F"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarTextStyle"
:
"white"
,
...
@@ -299,7 +299,7 @@
...
@@ -299,7 +299,7 @@
"titleSize"
:
"20"
,
"titleSize"
:
"20"
,
"buttons"
:
[
"buttons"
:
[
{
{
"text"
:
"
重置
"
,
"text"
:
"
申请入驻
"
,
"fontSrc"
:
"/static/uni.ttf"
,
"fontSrc"
:
"/static/uni.ttf"
,
"color"
:
"#fff"
,
"color"
:
"#fff"
,
"fontSize"
:
"28rpx"
,
"fontSize"
:
"28rpx"
,
...
@@ -720,6 +720,13 @@
...
@@ -720,6 +720,13 @@
{
{
"navigationBarTitleText"
:
"农贸入驻申请"
"navigationBarTitleText"
:
"农贸入驻申请"
}
}
},
{
"path"
:
"pages/nongjifuwu/shenqingruzhu"
,
"style"
:
{
"navigationBarTitleText"
:
"农机服务入驻申请"
}
}
}
],
],
"easycom"
:
{
"easycom"
:
{
...
...
src/pages/kexinnongzi/kexinnongzi.vue
浏览文件 @
e49c9a30
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
enterprise
:{
enterprise
:{
bizCategory
:
2
,
bizCategory
:
2
province
:
'湖南省'
}
}
},
// 分页参数
},
// 分页参数
hasMore
:
true
,
// 是否还有更多数据
hasMore
:
true
,
// 是否还有更多数据
...
...
src/pages/nongjifuwu/nongjifuwu.vue
浏览文件 @
e49c9a30
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
import
ApplyDialog
from
'./components/apply-dialog.vue'
import
ApplyDialog
from
'./components/apply-dialog.vue'
import
*
as
NongjifuwuAPI
from
'@/api/model/nongjifuwu'
import
*
as
NongjifuwuAPI
from
'@/api/model/nongjifuwu'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
import
Navigate
from
'@/utils/page/navigate'
import
Navigate
from
'@/utils/page/navigate'
import
{
s
}
from
'vite/dist/node/types.d-aGj9QkWt'
import
{
s
}
from
'vite/dist/node/types.d-aGj9QkWt'
import
{
getDictData
,
getText
}
from
'@/utils/dict/area'
import
{
getDictData
,
getText
}
from
'@/utils/dict/area'
...
@@ -37,6 +38,9 @@
...
@@ -37,6 +38,9 @@
pageSize
:
10
,
pageSize
:
10
,
serviceType
:
1
,
serviceType
:
1
,
scope
:
null
,
scope
:
null
,
enterprise
:{
bizCategory
:
3
}
},
},
farmMachineList
:
[],
farmMachineList
:
[],
total
:
0
,
total
:
0
,
...
@@ -44,15 +48,29 @@
...
@@ -44,15 +48,29 @@
function
getFarmMachineList
()
{
function
getFarmMachineList
()
{
pageData
.
loading
=
true
pageData
.
loading
=
true
NongjifuwuAPI
.
farmMachineList
(
pageData
.
search
)
if
(
pageData
.
search
.
serviceType
==
1
){
.
then
((
res
)
=>
{
NongzhiAPI
.
getEnterpriseList
(
pageData
.
search
)
const
{
records
,
total
}
=
res
.
then
((
res
)
=>
{
pageData
.
farmMachineList
=
[...
pageData
.
farmMachineList
,
...
records
]
console
.
log
(
"猎取到了企业"
);
pageData
.
total
=
total
console
.
log
(
res
);
})
const
{
records
,
total
}
=
res
.
finally
(()
=>
{
pageData
.
farmMachineList
=
[...
pageData
.
farmMachineList
,
...
records
]
pageData
.
loading
=
false
pageData
.
total
=
total
})
})
.
finally
(()
=>
{
pageData
.
loading
=
false
})
}
else
{
NongjifuwuAPI
.
farmMachineList
(
pageData
.
search
)
.
then
((
res
)
=>
{
const
{
records
,
total
}
=
res
pageData
.
farmMachineList
=
[...
pageData
.
farmMachineList
,
...
records
]
pageData
.
total
=
total
})
.
finally
(()
=>
{
pageData
.
loading
=
false
})
}
}
}
function
search
()
{
function
search
()
{
...
@@ -114,12 +132,12 @@
...
@@ -114,12 +132,12 @@
}
}
onNavigationBarButtonTap
(()
=>
{
onNavigationBarButtonTap
(()
=>
{
pageData
.
search
.
scope
=
null
/* pageData.search.scope = null
search
()
search() */
Navigate
.
to
(
'/pages/nongjifuwu/shenqingruzhu'
)
})
})
onReachBottom
(()
=>
{
onReachBottom
(()
=>
{
console
.
log
(
'触底了'
)
if
(
pageData
.
total
<=
pageData
.
farmMachineList
.
length
)
return
if
(
pageData
.
total
<=
pageData
.
farmMachineList
.
length
)
return
pageData
.
search
.
pageNo
++
pageData
.
search
.
pageNo
++
getFarmMachineList
()
getFarmMachineList
()
...
@@ -152,45 +170,58 @@
...
@@ -152,45 +170,58 @@
}}
</text>
}}
</text>
</view>
</view>
</view>
</view>
<view
<
!--
<
view
v-if=
"!pageData.farmMachineList || pageData.farmMachineList.length == 0"
v-if=
"!pageData.farmMachineList || pageData.farmMachineList.length == 0"
class=
"codefun-flex-col codefun-relative section_4"
class=
"codefun-flex-col codefun-relative section_4"
style=
"height: 700rpx"
style=
"height: 700rpx"
>
>
<fui-empty
marginTop=
"100"
src=
"/static/images/no-data.png"
title=
"暂无数据"
/>
<fui-empty
marginTop=
"100"
src=
"/static/images/no-data.png"
title=
"暂无数据"
/>
</view>
</view>
-->
<view
class=
"codefun-flex-col codefun-relative section_4"
>
<view
class=
"codefun-flex-col codefun-relative section_4"
>
<view
class=
"codefun-flex-row group_6"
v-for=
"item in pageData.farmMachineList"
:key=
"item.id"
>
<template
v-if=
" pageData.search.serviceType == 1"
>
<image
<view
class=
"yr-item"
v-for=
"item in pageData.farmMachineList"
:key=
"item.id"
>
class=
"codefun-shrink-0 codefun-self-center image_8"
<view
class=
"text-ellipsis yr-item-name"
>
{{
item
.
enterpriseName
}}
</view>
:src=
"item.picture"
<view
class=
"text-ellipsis yr-item-product"
>
公司主营:
{{
item
.
businessScope
}}
</view>
@
click=
"handleDetails(item)"
<view
class=
"yr-item-info"
>
/>
<view
class=
"text-ellipsis yr-item-address"
>
{{
item
.
provinceName
}}{{
item
.
cityName
}}{{
item
.
districtName
}}{{
item
.
townName
}}
</view>
<view
style=
"width: 70%"
>
<view
class=
"yr-item-detail"
>
查看详情
</view>
<view
</view>
class=
"codefun-flex-col codefun-items-start codefun-flex-1 codefun-self-center"
</view>
@
click=
"handleDetails(item)"
</
template
>
>
<
template
v-else
>
<text
class=
"font text_6"
>
{{
item
.
name
}}
</text>
<view
class=
"codefun-flex-row group_6"
v-for=
"item in pageData.farmMachineList"
:key=
"item.id"
>
<text
class=
"font_3 text_7 ellipsis"
style=
"width: 100%; margin: 26rpx 0"
<image
>
服务范围:
{{
getText
(
item
.
scope
,
' / '
)
}}
</text
class=
"codefun-shrink-0 codefun-self-center image_8"
>
:src=
"item.picture"
</view>
@
click=
"handleDetails(item)"
<view
class=
"flex justify-between"
style=
"width: 100%"
>
/>
<view
class=
"group_5"
@
click=
"handleDetails(item)"
>
<view
style=
"width: 70%"
>
<text
class=
"font_6"
>
¥
</text>
<view
<text
class=
"font_4 text_8"
>
{{
item
.
price
}}
</text>
class=
"codefun-flex-col codefun-items-start codefun-flex-1 codefun-self-center"
<text
class=
"font_7"
>
/亩
</text>
@
click=
"handleDetails(item)"
</view>
>
<view
<text
class=
"font text_6"
>
{{
item
.
name
}}
</text>
class=
"codefun-flex-col codefun-justify-start codefun-items-center codefun-shrink-0 codefun-self-start text-wrapper_2"
<text
class=
"font_3 text_7 ellipsis"
style=
"width: 100%; margin: 26rpx 0"
@
click=
"handleApply(item)"
>
服务范围:
{{
getText
(
item
.
scope
,
' / '
)
}}
</text
>
>
<text
class=
"font_5"
>
去预约
</text>
</view>
</view>
<view
class=
"flex justify-between"
style=
"width: 100%"
>
</view>
<view
class=
"group_5"
@
click=
"handleDetails(item)"
>
</view>
<text
class=
"font_6"
>
¥
</text>
</view>
<text
class=
"font_4 text_8"
>
{{
item
.
price
}}
</text>
<text
class=
"font_7"
>
/亩
</text>
</view>
<view
class=
"codefun-flex-col codefun-justify-start codefun-items-center codefun-shrink-0 codefun-self-start text-wrapper_2"
@
click=
"handleApply(item)"
>
<text
class=
"font_5"
>
去预约
</text>
</view>
</view>
</view>
</view>
</
template
>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -222,6 +253,62 @@
...
@@ -222,6 +253,62 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
height
:
100%
;
height
:
100%
;
.text-ellipsis
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.yr-item
{
margin-top
:
24
rpx
;
border-bottom
:
2
rpx
solid
#EEEEEE
;
padding-left
:
8
rpx
;
padding-bottom
:
20
rpx
;
.yr-item-name{
width
:
640
rpx
;
height
:
40
rpx
;
font-size
:
32
rpx
;
line-height
:
40
rpx
;
font-weight
:
500
;
color
:
#333333
;
}
.yr-item-product
{
margin-top
:
12
rpx
;
width
:
640
rpx
;
height
:
32
rpx
;
font-size
:
24
rpx
;
line-height
:
32
rpx
;
font-weight
:
500
;
color
:
#555555
;
}
.yr-item-info
{
margin-top
:
24
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.yr-item-address{
font-size
:
24
rpx
;
color
:
#5DB66F
;
width
:
480
rpx
;
}
.yr-item-detail
{
width
:
136
rpx
;
height
:
48
rpx
;
border-radius
:
200
rpx
;
background
:
#5DB66F
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
20
rpx
;
color
:
#FFFFFF
;
font-size
:
24
rpx
;
font-weight
:
400
;
}
}
}
.yr-item
:last-child
{
border-bottom
:
none
}
.section
{
.section
{
padding
:
24
rpx
24
rpx
24
rpx
32
rpx
;
padding
:
24
rpx
24
rpx
24
rpx
32
rpx
;
background-color
:
#5db66f
;
background-color
:
#5db66f
;
...
...
src/pages/nongjifuwu/shenqingruzhu.vue
0 → 100644
浏览文件 @
e49c9a30
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论