Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
9fd89fae
提交
9fd89fae
authored
11月 03, 2025
作者:
guolinhua
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:更新
上级
c7c8d68a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
130 行增加
和
29 行删除
+130
-29
nongjifuwu.ts
src/api/model/nongjifuwu.ts
+59
-0
pages.json
src/pages.json
+1
-0
form.vue
src/pages/nongjifuwu/form.vue
+0
-0
nongjifuwu.vue
src/pages/nongjifuwu/nongjifuwu.vue
+70
-29
没有找到文件。
src/api/model/nongjifuwu.ts
0 → 100644
浏览文件 @
9fd89fae
// 上传请求
import
{
otherHttp
}
from
'/@/utils/http/axios'
enum
Api
{
farmMachineList
=
'/farmMachine/machineWork/app/list'
,
// 农机服务列表列表
farmMachineDetails
=
'/farmMachine/machineWork/queryById'
,
// 农机服务详情
farmMachineAdd
=
'/farmMachine/machineWork/app/register'
,
// 发布农机服务
farmMachineEdit
=
'/farmMachine/machineWork/edit'
,
// 编辑农机服务
}
/**
* @param params 请求参数
* @description: 农机服务列表列表
*/
export
function
farmMachineList
(
params
=
{})
{
return
otherHttp
.
get
({
url
:
Api
.
farmMachineList
,
params
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
})
}
/**
* @param params 请求参数
* @description: 农机服务详情
*/
export
function
farmMachineDetails
(
params
=
{})
{
return
otherHttp
.
get
({
url
:
Api
.
farmMachineDetails
,
params
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
})
}
/**
* @param params 请求参数
* @description: 发布农机服务
*/
export
function
farmMachineAdd
(
params
=
{})
{
return
otherHttp
.
post
({
url
:
Api
.
farmMachineAdd
,
params
,
})
}
/**
* @param params 请求参数
* @description: 编辑农机服务
*/
export
function
farmMachineEdit
(
params
=
{})
{
return
otherHttp
.
post
({
url
:
Api
.
farmMachineEdit
,
params
,
})
}
src/pages.json
浏览文件 @
9fd89fae
...
@@ -161,6 +161,7 @@
...
@@ -161,6 +161,7 @@
"navigationBarBackgroundColor"
:
"#5DB66F"
,
"navigationBarBackgroundColor"
:
"#5DB66F"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarTextStyle"
:
"white"
,
"backgroundColorBottom"
:
"#F2F2F2"
,
"backgroundColorBottom"
:
"#F2F2F2"
,
"onReachBottomDistance"
:
50
,
"app-plus"
:
{
"app-plus"
:
{
"titleNView"
:
{}
"titleNView"
:
{}
}
}
...
...
src/pages/nongjifuwu/form.vue
0 → 100644
浏览文件 @
9fd89fae
差异被折叠。
点击展开。
src/pages/nongjifuwu/nongjifuwu.vue
浏览文件 @
9fd89fae
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
reactive
}
from
'vue'
import
{
reactive
}
from
'vue'
import
{
onPullDownRefresh
,
onLoad
,
onShow
,
onReachBottom
}
from
'@dcloudio/uni-app'
import
*
as
NongjifuwuAPI
from
'@/api/model/nongjifuwu'
import
Navigate
from
'@/utils/page/navigate'
onLoad
((
option
)
=>
{
pageData
.
search
.
serviceType
=
Number
(
option
.
type
)
||
1
})
onShow
(()
=>
{
pageData
.
search
.
pageNo
=
1
pageData
.
farmMachineList
=
[]
getFarmMachineList
()
})
const
pageData
=
reactive
({
const
pageData
=
reactive
({
// 分类标签
// 分类标签
...
@@ -7,15 +20,39 @@
...
@@ -7,15 +20,39 @@
{
id
:
1
,
name
:
'找农机'
},
{
id
:
1
,
name
:
'找农机'
},
{
id
:
2
,
name
:
'干农活'
},
{
id
:
2
,
name
:
'干农活'
},
],
],
currentCategoryId
:
1
,
search
:
{
pageNo
:
1
,
pageSize
:
10
,
serviceType
:
1
,
},
farmMachineList
:
[],
total
:
0
,
})
})
function
getFarmMachineList
()
{
NongjifuwuAPI
.
farmMachineList
(
pageData
.
search
).
then
((
res
)
=>
{
const
{
records
,
total
}
=
res
pageData
.
farmMachineList
=
[...
pageData
.
farmMachineList
,
...
records
]
pageData
.
total
=
total
})
}
// 分类标签点击事件
// 分类标签点击事件
function
onCategoryTabClick
(
tab
:
any
)
{
function
onCategoryTabClick
(
tab
:
any
)
{
console
.
log
(
'点击分类标签:'
,
tab
)
console
.
log
(
'点击分类标签:'
,
tab
)
pageData
.
currentCategoryId
=
tab
.
id
pageData
.
search
.
serviceType
=
tab
.
id
// 在这里添加具体的分类标签点击逻辑
// 在这里添加具体的分类标签点击逻辑
pageData
.
search
.
pageNo
=
1
pageData
.
farmMachineList
=
[]
getFarmMachineList
()
}
}
onReachBottom
(()
=>
{
console
.
log
(
'触底了'
)
if
(
pageData
.
total
<=
pageData
.
farmMachineList
.
length
)
return
pageData
.
search
.
pageNo
++
getFarmMachineList
()
})
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -36,36 +73,40 @@
...
@@ -36,36 +73,40 @@
v-for=
"item in pageData.categoryTabs"
v-for=
"item in pageData.categoryTabs"
:key=
"item.id"
:key=
"item.id"
class=
"codefun-flex-col codefun-justify-start codefun-items-center text-50p"
class=
"codefun-flex-col codefun-justify-start codefun-items-center text-50p"
:class=
"item.id === pageData.
currentCategoryId
? 'text-wrapper' : ''"
:class=
"item.id === pageData.
search.serviceType
? 'text-wrapper' : ''"
@
click=
"onCategoryTabClick(item)"
@
click=
"onCategoryTabClick(item)"
>
>
<text
class=
"font_2"
:class=
"item.id === pageData.
currentCategoryId
? 'text_4' : 'text_5'"
>
{{
<text
class=
"font_2"
:class=
"item.id === pageData.
search.serviceType
? 'text_4' : 'text_5'"
>
{{
item
.
name
item
.
name
}}
</text>
}}
</text>
</view>
</view>
</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"
>
<view
class=
"codefun-flex-row group_6"
v-for=
"item in pageData.farmMachineList"
:key=
"item.id"
>
<image
<image
class=
"codefun-shrink-0 codefun-self-center image_8"
:src=
"item.picture"
/>
class=
"codefun-shrink-0 codefun-self-center image_8"
<view
style=
"width: 75%"
>
src=
"https://ide.code.fun/api/image?token=6902c43a9520a30011f4e723&name=1f4e4111336d0f182201176d8c761a37.png"
<view
class=
"codefun-flex-col codefun-items-start codefun-flex-1 codefun-self-center"
>
/>
<text
class=
"font text_6"
>
{{
item
.
name
}}
</text>
<view
class=
"codefun-flex-col codefun-items-start codefun-flex-1 codefun-self-center group_4"
>
<text
class=
"font_3 text_7 ellipsis"
style=
"width: 100%; margin: 26rpx 0"
<text
class=
"font text_6"
>
大联合收割机
</text>
>
服务范围:
{{
item
.
scope
}}{{
item
.
scope
}}{{
item
.
scope
}}{{
item
.
scope
<text
class=
"font_3 text_7"
>
服务范围:市区及周边20公里
</text>
}}{{
item
.
scope
}}
</text
<view
class=
"group_5"
>
>
<text
class=
"font_6"
>
¥
</text>
</view>
<text
class=
"font_4 text_8"
>
60
</text>
<view
class=
"flex justify-between"
style=
"width: 100%"
>
<text
class=
"font_7"
>
/亩
</text>
<view
class=
"group_5"
>
<text
class=
"font_6"
>
¥
</text>
<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"
>
<text
class=
"font_5"
>
我有需要
</text>
</view>
</view>
</view>
</view>
<view
class=
"codefun-flex-col codefun-justify-start codefun-items-center codefun-shrink-0 codefun-self-start text-wrapper_2 view"
>
<text
class=
"font_5"
>
我有需要
</text>
</view>
</view>
</view>
</view>
<view
class=
"codefun-flex-row group_6"
>
<
!--
<
view
class=
"codefun-flex-row group_6"
>
<view
class=
"codefun-flex-row codefun-items-center codefun-flex-1 codefun-self-center"
>
<view
class=
"codefun-flex-row codefun-items-center codefun-flex-1 codefun-self-center"
>
<image
<image
class=
"codefun-shrink-0 image_8"
class=
"codefun-shrink-0 image_8"
...
@@ -108,15 +149,15 @@
...
@@ -108,15 +149,15 @@
>
>
<text
class=
"font_5"
>
我有需要
</text>
<text
class=
"font_5"
>
我有需要
</text>
</view>
</view>
</view>
</view>
-->
<view
class=
"codefun-flex-col codefun-justify-start codefun-relative section_5"
>
<
!--
<
view
class=
"codefun-flex-col codefun-justify-start codefun-relative section_5"
>
<view
class=
"codefun-shrink-0 section_6"
/>
<view
class=
"codefun-shrink-0 section_6"
/>
<text
class=
"font_8 text_15 pos_4"
>
夏收专享:收割机服务8折优惠
</text>
<text
class=
"font_8 text_15 pos_4"
>
夏收专享:收割机服务8折优惠
</text>
<view
class=
"codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3 pos_3"
>
<view
class=
"codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3 pos_3"
>
<text
class=
"font_2 text_16"
>
立即预约
</text>
<text
class=
"font_2 text_16"
>
立即预约
</text>
</view>
</view>
</view>
</view>
-->
<view
class=
"codefun-flex-row group_10"
>
<
!--
<
view
class=
"codefun-flex-row group_10"
>
<view
class=
"codefun-flex-row codefun-items-center codefun-flex-1 codefun-self-center"
>
<view
class=
"codefun-flex-row codefun-items-center codefun-flex-1 codefun-self-center"
>
<image
<image
class=
"codefun-shrink-0 image_8"
class=
"codefun-shrink-0 image_8"
...
@@ -137,9 +178,9 @@
...
@@ -137,9 +178,9 @@
>
>
<text
class=
"font_5"
>
我有需要
</text>
<text
class=
"font_5"
>
我有需要
</text>
</view>
</view>
</view>
</view>
-->
</view>
</view>
<view
class=
"codefun-flex-col section_7"
>
<
!--
<
view
class=
"codefun-flex-col section_7"
>
<view
class=
"grid"
>
<view
class=
"grid"
>
<view
class=
"codefun-flex-row codefun-justify-between codefun-items-center grid-item"
>
<view
class=
"codefun-flex-row codefun-justify-between codefun-items-center grid-item"
>
<text
class=
"font_3 text_19"
>
农机类型
</text>
<text
class=
"font_3 text_19"
>
农机类型
</text>
...
@@ -196,7 +237,7 @@
...
@@ -196,7 +237,7 @@
<text
class=
"font_8 text_24"
>
发布需求
</text>
<text
class=
"font_8 text_24"
>
发布需求
</text>
</view>
</view>
</view>
</view>
</view>
</view>
-->
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论