Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
8dded24c
提交
8dded24c
authored
12月 29, 2025
作者:
王定
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 优化一些细节
上级
054cd02b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
263 行增加
和
54 行删除
+263
-54
.env.development
.env.development
+4
-4
public.less
src/common/public.less
+17
-0
detail.vue
src/pages/kexinnongzi/detail.vue
+7
-3
farm-form.vue
src/pages/nongjifuwu/farm-form.vue
+68
-11
nongjifuwu.vue
src/pages/nongjifuwu/nongjifuwu.vue
+165
-35
nongmaojiaoyi.vue
src/pages/nongmaojiaoyi/nongmaojiaoyi.vue
+2
-1
没有找到文件。
.env.development
浏览文件 @
8dded24c
# API 接口地址
#
VITE_GLOB_API_URL=http://111.22.182.169:49600
VITE_GLOB_API_URL=http://36.133.16.81:42111
VITE_GLOB_API_URL=http://111.22.182.169:49600
#
VITE_GLOB_API_URL=http://36.133.16.81:42111
# API 接口地址前缀
#
VITE_GLOB_API_URL_PREFIX=/jeecgboot
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
VITE_GLOB_API_URL_PREFIX=/jeecgboot
#
VITE_GLOB_API_URL_PREFIX=/jeecg-boot
src/common/public.less
浏览文件 @
8dded24c
...
...
@@ -74,3 +74,20 @@
.uni-picker-container .uni-picker-action.uni-picker-action-confirm {
color: #5DB66F !important;
}
.yr-select-area {
padding-top: 30rpx;
position: relative;
.fui-title {
font-size: 30rpx;
font-weight: bold;
text-align: center;
padding-bottom: 24rpx;
}
.fui-icon__close {
position: absolute;
top: 24rpx;
right: 24rpx;
}
}
src/pages/kexinnongzi/detail.vue
浏览文件 @
8dded24c
...
...
@@ -248,7 +248,7 @@
}
</
script
>
<
template
>
<view
class=
"w-full
h-95vh
bg-#E6F5E8 detail_page"
>
<view
class=
"w-full bg-#E6F5E8 detail_page"
>
<view
class=
"module_width top_content"
>
<view
class=
"enterprise_logo_view"
><image
class=
"enterprise_logo"
mode=
"heightFix"
:src=
"pageData.data.enterpriseLogoUrl"
/></view>
<view
class=
"enterprise_business"
>
主营:
{{
pageData
.
data
.
businessScope
}}
</view>
...
...
@@ -357,6 +357,7 @@
align-items
:
flex-start
;
align-content
:
flex-start
;
padding-bottom
:
40
rpx
;
min-height
:
calc
(
100vh
-
88
rpx
);
.module_width{
width
:
690
rpx
;
margin-top
:
24
rpx
;
...
...
@@ -454,7 +455,9 @@
}
}
.footer_content
{
margin-bottom
:
100
rpx
;
}
.module_business
{
display
:
flex
;
flex-wrap
:
wrap
;
...
...
@@ -468,8 +471,9 @@
border-radius
:
16
rpx
;
box-sizing
:
border-box
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
align-items
:
center
;
flex-direction
:
column
;
background
:
#F9FAFB
;
.business_img{
width
:
310
rpx
;
...
...
src/pages/nongjifuwu/farm-form.vue
浏览文件 @
8dded24c
...
...
@@ -3,6 +3,7 @@
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useGlobSetting
}
from
'/@/hooks/setting'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
import
*
as
nongjifuwu
from
'@/api/model/nongjifuwu'
import
{
getDictData
,
getText
}
from
'@/utils/dict/area'
...
...
@@ -17,15 +18,16 @@
}
else
{
pageData
.
title
=
'新增农活作业'
}
getProvince
(
43
,
null
);
uni
.
setNavigationBarTitle
({
title
:
pageData
.
title
,
})
})
onShow
(()
=>
{
/*
onShow(() => {
// 数据字典赋值
initDict()
})
})
*/
const
pageData
=
reactive
({
title
:
'农活表单'
,
...
...
@@ -35,9 +37,10 @@
time2
:
false
,
address
:
false
,
},
options
:
{
address
:
[],
},
options
:
[],
optionsVal
:[],
optionsValText
:
""
,
form
:
{
id
:
''
,
name
:
''
,
...
...
@@ -91,10 +94,51 @@
})
const
{
show
,
options
,
form
}
=
toRefs
(
pageData
)
async
function
initDict
()
{
pageData
.
options
.
address
=
await
getDictData
()
}
const
areaPopupRef
=
ref
(
null
);
// 选择地区完成
function
selectCompleteArea
(
e
){
let
text
=
e
.
text
;
let
value
=
e
.
value
;
let
areaText
=
""
,
areaVal
=
""
;
for
(
let
i
=
0
;
i
<
(
text
.
length
-
1
);
i
++
){
areaText
+=
text
[
i
]
+
'/'
;
areaVal
+=
value
[
i
]
+
','
;
}
pageData
.
form
.
scope
=
areaVal
.
slice
(
0
,
-
1
);;
// code
pageData
.
optionsValText
=
areaText
.
slice
(
0
,
-
1
);;
pageData
.
show
.
address
=
false
;
}
// 在选择地区
function
changeArea
(
e
){
let
val
=
e
.
value
;
getProvince
(
val
,
e
);
}
// 获取下一级地区
function
getProvince
(
code
,
e
)
{
LinghuoyonggongAPI
.
queryConditions
({
parentCode
:
code
}).
then
(
res
=>
{
if
(
res
.
length
){
let
dataArr
=
[];
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
let
obj
=
{
text
:
""
,
value
:
""
};
obj
.
text
=
res
[
i
].
name
;
obj
.
value
=
res
[
i
].
code
;
dataArr
.
push
(
obj
);
}
if
(
!
pageData
.
options
.
length
){
pageData
.
options
=
dataArr
;
}
else
{
console
.
log
(
"e.layer= "
+
e
.
layer
);
areaPopupRef
.
value
.
setRequestData
(
dataArr
,
e
.
layer
);
if
(
e
.
layer
>=
2
){
areaPopupRef
.
value
.
end
();
}
}
}
else
{
areaPopupRef
.
value
.
end
();
}
})
}
function
getDetails
(
id
)
{
pageData
.
loading
=
true
...
...
@@ -216,7 +260,7 @@
<text
class=
"label"
>
服务范围
</text>
<view
class=
"time-input"
@
click=
"show.address = true"
>
<text
class=
"select-text"
:class=
"
{ placeholder: !pageData.form.scope }">
{{
getText
(
pageData
.
form
.
scope
,
' / '
)
||
'请选择市/区县/乡镇'
}}
{{
pageData
.
optionsValText
||
'请选择市/区县/乡镇'
}}
</text>
</view>
</view>
...
...
@@ -258,7 +302,20 @@
<fui-date-picker
:show=
"show.time2"
type=
"3"
@
change=
"handleChangeTime2"
@
cancel=
"show.time2 = false"
:minDate=
"getCurrentDate()"
/>
<fui-toast
ref=
"toastRef"
/>
<fui-loading
isFixed
v-if=
"pageData.loading"
backgroundColor=
"rgba(0, 0, 0, 0.4)"
/>
<fui-picker
:show=
"show.address"
:options=
"options.address"
:linkage=
"true"
:layer=
"3"
@
change=
"handleChangeAddress"
@
cancel=
"show.address = false"
/>
<!--
<fui-picker
:show=
"show.address"
:options=
"options.address"
:linkage=
"true"
:layer=
"3"
@
change=
"handleChangeAddress"
@
cancel=
"show.address = false"
/>
-->
<fui-bottom-popup
:show=
"pageData.show.address"
>
<view
class=
"fui-scroll__wrap yr-select-area"
>
<view
class=
"fui-title"
>
请选择
</view>
<fui-cascader
ref=
"areaPopupRef"
:value=
"pageData.optionsVal"
stepLoading
@
change=
"changeArea"
@
complete=
"selectCompleteArea"
:options=
"pageData.options"
></fui-cascader>
<view
class=
"fui-icon__close"
@
tap
.
stop=
"pageData.show.address = false"
>
<fui-icon
name=
"close"
:size=
"48"
></fui-icon>
</view>
</view>
</fui-bottom-popup>
</view>
</view>
</
template
>
...
...
src/pages/nongjifuwu/nongjifuwu.vue
浏览文件 @
8dded24c
...
...
@@ -2,7 +2,7 @@
import
{
reactive
,
ref
}
from
'vue'
import
{
onLoad
,
onReachBottom
,
onShow
}
from
'@dcloudio/uni-app'
import
ApplyDialog
from
'./components/apply-dialog.vue'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
import
*
as
NongjifuwuAPI
from
'@/api/model/nongjifuwu'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
import
Navigate
from
'@/utils/page/navigate'
...
...
@@ -10,14 +10,15 @@
import
{
getDictData
,
getText
}
from
'@/utils/dict/area'
onLoad
((
option
)
=>
{
pageData
.
search
.
serviceType
=
Number
(
option
.
type
)
||
1
pageData
.
search
.
serviceType
=
Number
(
option
.
type
)
||
1
;
getProvince
(
43
,
null
);
})
onShow
(()
=>
{
pageData
.
search
.
pageNo
=
1
pageData
.
farmMachineList
=
[]
getFarmMachineList
()
getCascader
()
//
getCascader()
})
const
pageData
=
reactive
({
...
...
@@ -28,6 +29,8 @@
address
:
false
,
},
options
:
[],
optionsVal
:[],
optionsValText
:
""
,
// 分类标签
categoryTabs
:
[
{
id
:
1
,
name
:
'找农机'
},
...
...
@@ -38,12 +41,60 @@
pageSize
:
10
,
serviceType
:
1
,
scope
:
null
,
bizCategory
:
3
bizCategory
:
3
,
reviewStatus
:
1
},
farmMachineList
:
[],
total
:
0
,
})
const
areaPopupRef
=
ref
(
null
);
// 选择地区完成
function
selectCompleteArea
(
e
){
let
text
=
e
.
text
;
let
value
=
e
.
value
;
let
areaText
=
""
,
areaVal
=
""
;
for
(
let
i
=
0
;
i
<
(
text
.
length
-
1
);
i
++
){
areaText
+=
text
[
i
]
+
'/'
;
areaVal
+=
value
[
i
]
+
','
;
}
pageData
.
search
.
scope
=
areaVal
.
slice
(
0
,
-
1
);;
// code
pageData
.
optionsValText
=
areaText
.
slice
(
0
,
-
1
);;
pageData
.
show
.
address
=
false
;
// 触发搜索
search
();
}
// 在选择地区
function
changeArea
(
e
){
let
val
=
e
.
value
;
getProvince
(
val
,
e
);
}
// 获取下一级地区
function
getProvince
(
code
,
e
)
{
LinghuoyonggongAPI
.
queryConditions
({
parentCode
:
code
}).
then
(
res
=>
{
if
(
res
.
length
){
let
dataArr
=
[];
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
){
let
obj
=
{
text
:
""
,
value
:
""
};
obj
.
text
=
res
[
i
].
name
;
obj
.
value
=
res
[
i
].
code
;
dataArr
.
push
(
obj
);
}
if
(
!
pageData
.
options
.
length
){
pageData
.
options
=
dataArr
;
}
else
{
console
.
log
(
"e.layer= "
+
e
.
layer
);
areaPopupRef
.
value
.
setRequestData
(
dataArr
,
e
.
layer
);
if
(
e
.
layer
>=
2
){
areaPopupRef
.
value
.
end
();
}
}
}
else
{
areaPopupRef
.
value
.
end
();
}
})
}
function
getFarmMachineList
()
{
pageData
.
loading
=
true
if
(
pageData
.
search
.
serviceType
==
1
){
...
...
@@ -71,15 +122,27 @@
function
search
()
{
pageData
.
loading
=
true
NongjifuwuAPI
.
farmMachineList
(
pageData
.
search
)
.
then
((
res
)
=>
{
const
{
records
,
total
}
=
res
pageData
.
farmMachineList
=
records
pageData
.
total
=
total
})
.
finally
(()
=>
{
pageData
.
loading
=
false
})
if
(
pageData
.
search
.
serviceType
==
1
){
NongzhiAPI
.
getEnterpriseList
(
pageData
.
search
)
.
then
((
res
)
=>
{
const
{
records
,
total
}
=
res
pageData
.
farmMachineList
=
records
pageData
.
total
=
total
})
.
finally
(()
=>
{
pageData
.
loading
=
false
})
}
else
{
NongjifuwuAPI
.
farmMachineList
(
pageData
.
search
)
.
then
((
res
)
=>
{
const
{
records
,
total
}
=
res
pageData
.
farmMachineList
=
records
pageData
.
total
=
total
})
.
finally
(()
=>
{
pageData
.
loading
=
false
})
}
}
async
function
getCascader
()
{
...
...
@@ -88,12 +151,40 @@
// 分类标签点击事件
function
onCategoryTabClick
(
tab
:
any
)
{
console
.
log
(
'点击分类标签:'
,
tab
)
pageData
.
search
.
serviceType
=
tab
.
id
;
// 在这里添加具体的分类标签点击逻辑
pageData
.
search
.
pageNo
=
1
pageData
.
farmMachineList
=
[]
getFarmMachineList
()
pageData
.
search
.
serviceType
=
tab
.
id
;
// 在这里添加具体的分类标签点击逻辑
pageData
.
search
.
pageNo
=
1
pageData
.
farmMachineList
=
[];
getFarmMachineList
()
let
pages
=
getCurrentPages
();
let
page
=
pages
[
pages
.
length
-
1
];
if
(
pageData
.
search
.
serviceType
==
1
){
// #ifdef H5
document
.
querySelector
(
'.uni-page-head-ft .uni-page-head-btn .uni-btn-icon'
).
innerHTML
=
'申请入驻'
;
// #endif
// #ifdef APP-PLUS
var
currentVebview
=
page
.
$getAppWebview
();
var
tn
=
currentVebview
.
getStyle
().
titleNView
;
tn
.
buttons
[
0
].
text
=
'申请入驻'
;
// \ue... 字体图标
// tn.buttons[0].fontSrc = "/static/font/iconfont.ttf"
currentVebview
.
setStyle
({
titleNView
:
tn
})
// #endif
}
else
{
// #ifdef H5
document
.
querySelector
(
'.uni-page-head-ft .uni-page-head-btn .uni-btn-icon'
).
innerHTML
=
''
;
// #endif
// #ifdef APP-PLUS
var
currentVebview
=
page
.
$getAppWebview
();
var
tn
=
currentVebview
.
getStyle
().
titleNView
;
tn
.
buttons
[
0
].
text
=
''
;
currentVebview
.
setStyle
({
titleNView
:
tn
})
// #endif
}
}
function
handlePublish
()
{
...
...
@@ -133,10 +224,12 @@
}
onNavigationBarButtonTap
(()
=>
{
onNavigationBarButtonTap
((
e
)
=>
{
/* pageData.search.scope = null
search() */
Navigate
.
to
(
'/pages/nongjifuwu/shenqingruzhu'
)
if
(
pageData
.
search
.
serviceType
==
1
){
Navigate
.
to
(
'/pages/nongjifuwu/shenqingruzhu'
)
}
})
onReachBottom
(()
=>
{
...
...
@@ -152,7 +245,7 @@
<view
class=
"codefun-flex-row codefun-justify-between section_2"
>
<text
class=
"font_2 text_2"
>
服务区域
</text>
<view
class=
"codefun-flex-row codefun-items-center"
@
click=
"pageData.show.address = true"
>
<text
class=
"font_2 text_3"
>
{{
getText
(
pageData
.
search
.
scope
,
' / '
)
||
'选择市县乡镇'
}}
</text>
<text
class=
"font_2 text_3"
>
{{
pageData
.
optionsValText
||
'选择市县乡镇'
}}
</text>
<image
class=
"codefun-shrink-0 image_7 codefun-ml-4"
src=
"/static/images/codefun/774cfe989f8417dc655fb301635f5893.png"
...
...
@@ -180,12 +273,20 @@
<fui-empty
marginTop=
"100"
src=
"/static/images/no-data.png"
title=
"暂无数据"
/>
</view>
<view
class=
"codefun-flex-col codefun-relative section_4"
>
<template
v-if=
"
pageData.search.serviceType == 1"
>
<template
v-if=
"pageData.search.serviceType == 1"
>
<view
class=
"yr-item"
v-for=
"item in pageData.farmMachineList"
:key=
"item.id"
>
<view
class=
"text-ellipsis yr-item-name"
>
{{
item
.
enterpriseName
}}
</view>
<view
class=
"text-ellipsis yr-item-product"
>
公司主营:
{{
item
.
businessScope
}}
</view>
<view
class=
"item_top"
>
<image
class=
"enterprise_logo"
mode=
"aspectFit"
:src=
"item.enterpriseLogoUrl"
/>
<view
class=
"item_right"
>
<view
class=
"text-ellipsis yr-item-name"
>
{{
item
.
enterpriseName
}}
</view>
<view
class=
"text-ellipsis yr-item-product"
>
公司主营:
{{
item
.
businessScope
}}
</view>
</view>
</view>
<view
class=
"yr-item-info"
>
<view
class=
"text-ellipsis yr-item-address"
>
{{
item
.
provinceName
}}{{
item
.
cityName
}}{{
item
.
districtName
}}{{
item
.
townName
}}
</view>
<view
class=
"text-ellipsis yr-item-address"
>
<image
class=
"address_icon"
src=
"/static/images/linghuoyonggong/address.png"
/>
<text>
{{
item
.
provinceName
}}{{
item
.
cityName
}}{{
item
.
districtName
}}{{
item
.
townName
}}
</text>
</view>
<view
class=
"yr-item-detail"
@
click=
"toDetail(item)"
>
查看详情
</view>
</view>
</view>
...
...
@@ -227,20 +328,32 @@
</view>
</view>
</view>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"96"
@
click=
"handlePublish"
>
<fui-fab
v-show=
"pageData.search.serviceType != 1"
position=
"right"
distance=
"10"
bottom=
"240"
width=
"96"
@
click=
"handlePublish"
>
<view
class=
"text-white text-center"
>
<view
class=
"fab-icon"
/>
<view
style=
"font-size: 24rpx"
>
发布
</view>
</view>
</fui-fab>
<fui-picker
<!-- <fui-picker
:show="pageData.show.address"
:options="pageData.options"
:linkage="true"
:layer="3"
@change="handleChangeAddress"
@cancel="pageData.show.address = false"
/>
/> -->
<fui-bottom-popup
:show=
"pageData.show.address"
>
<view
class=
"fui-scroll__wrap yr-select-area"
>
<view
class=
"fui-title"
>
请选择
</view>
<fui-cascader
ref=
"areaPopupRef"
:value=
"pageData.optionsVal"
stepLoading
@
change=
"changeArea"
@
complete=
"selectCompleteArea"
:options=
"pageData.options"
></fui-cascader>
<view
class=
"fui-icon__close"
@
tap
.
stop=
"pageData.show.address = false"
>
<fui-icon
name=
"close"
:size=
"48"
></fui-icon>
</view>
</view>
</fui-bottom-popup>
<ApplyDialog
ref=
"applyDialogRef"
/>
<fui-loading
isFixed
v-if=
"pageData.loading"
backgroundColor=
"rgba(0, 0, 0, 0.4)"
/>
...
...
@@ -248,13 +361,14 @@
<
style
scoped
lang=
"scss"
>
.page
{
box-sizing
:
border-box
;
padding-bottom
:
12
rpx
;
background-color
:
#e6f5e8
;
mix-blend-mode
:
NOTTHROUGH
;
width
:
100%
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
height
:
100%
;
min-height
:
calc
(
100vh
-
88
rpx
)
;
.text-ellipsis
{
white-space
:
nowrap
;
overflow
:
hidden
;
...
...
@@ -265,8 +379,17 @@
border-bottom
:
2
rpx
solid
#EEEEEE
;
padding-left
:
8
rpx
;
padding-bottom
:
20
rpx
;
.item_top{
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
space-between
;
}
.enterprise_logo
{
width
:
160
rpx
;
max-height
:
120
rpx
;
}
.yr-item-name
{
width
:
64
0
rpx
;
width
:
48
0
rpx
;
height
:
40
rpx
;
font-size
:
32
rpx
;
line-height
:
40
rpx
;
...
...
@@ -275,7 +398,7 @@
}
.yr-item-product
{
margin-top
:
12
rpx
;
width
:
64
0
rpx
;
width
:
48
0
rpx
;
height
:
32
rpx
;
font-size
:
24
rpx
;
line-height
:
32
rpx
;
...
...
@@ -283,14 +406,21 @@
color
:
#555555
;
}
.yr-item-info
{
margin-top
:
24
rpx
;
margin-top
:
18
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.yr-item-address{
font-size
:
24
rpx
;
color
:
#
5DB66F
;
color
:
#
999999
;
width
:
480
rpx
;
display
:
flex
;
align-items
:
center
;
.address_icon{
width
:
24
rpx
;
height
:
26
rpx
;
margin-right
:
8
rpx
;
}
}
.yr-item-detail
{
width
:
136
rpx
;
...
...
src/pages/nongmaojiaoyi/nongmaojiaoyi.vue
浏览文件 @
8dded24c
...
...
@@ -127,9 +127,10 @@
function
getGoodsList
()
{
NongzhiAPI
.
goodsList
(
pageData
.
search
).
then
((
res
)
=>
{
console
.
log
(
"pageData.products******************"
)
console
.
log
(
res
)
const
{
records
,
total
}
=
res
pageData
.
products
=
[...
pageData
.
products
,
...
records
]
pageData
.
products
=
[...
pageData
.
products
,
...
records
]
;
pageData
.
total
=
total
})
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论