Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
c44bd1b9
提交
c44bd1b9
authored
12月 26, 2025
作者:
王定
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 优化一些存在的问题
上级
ba786372
显示空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
175 行增加
和
36 行删除
+175
-36
pages.json
src/pages.json
+2
-5
fuwu.vue
src/pages/fuwu/fuwu.vue
+1
-1
detail.vue
src/pages/kexinnongzi/detail.vue
+16
-2
kexinnongzi.vue
src/pages/kexinnongzi/kexinnongzi.vue
+0
-2
shenqingruzhu.vue
src/pages/kexinnongzi/shenqingruzhu.vue
+4
-2
yonggongmap.vue
src/pages/linghuoyonggong/components/yonggongmap.vue
+97
-9
details.vue
src/pages/linghuoyonggong/details.vue
+17
-4
linghuoyonggong.vue
src/pages/linghuoyonggong/linghuoyonggong.vue
+9
-4
detail.vue
src/pages/nongjifuwu/detail.vue
+15
-2
nongjifuwu.vue
src/pages/nongjifuwu/nongjifuwu.vue
+0
-2
shenqingruzhu.vue
src/pages/nongjifuwu/shenqingruzhu.vue
+4
-2
nongyezhengce.vue
src/pages/nongyezhengce/nongyezhengce.vue
+9
-0
shouye.vue
src/pages/shouye/shouye.vue
+1
-1
address.png
src/static/images/linghuoyonggong/address.png
+0
-0
default-icon.png
src/static/images/linghuoyonggong/default-icon.png
+0
-0
没有找到文件。
src/pages.json
浏览文件 @
c44bd1b9
...
@@ -300,7 +300,6 @@
...
@@ -300,7 +300,6 @@
"buttons"
:
[
"buttons"
:
[
{
{
"text"
:
"申请入驻"
,
"text"
:
"申请入驻"
,
"fontSrc"
:
"/static/uni.ttf"
,
"color"
:
"#fff"
,
"color"
:
"#fff"
,
"fontSize"
:
"28rpx"
,
"fontSize"
:
"28rpx"
,
"width"
:
"auto"
"width"
:
"auto"
...
@@ -695,12 +694,10 @@
...
@@ -695,12 +694,10 @@
"titleNView"
:
{
"titleNView"
:
{
"buttons"
:
[
"buttons"
:
[
{
{
"text"
:
"
\u
E674 申请入驻"
,
"text"
:
"申请入驻"
,
"fontSrc"
:
"/static/fonts/tihuan.ttf"
,
"color"
:
"#fff"
,
"color"
:
"#fff"
,
"fontSize"
:
"26rpx"
,
"fontSize"
:
"26rpx"
,
"width"
:
"auto"
,
"width"
:
"auto"
"icon"
:
"map"
}
}
]
]
}
}
...
...
src/pages/fuwu/fuwu.vue
浏览文件 @
c44bd1b9
...
@@ -483,7 +483,7 @@
...
@@ -483,7 +483,7 @@
<view
<view
class=
"codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3"
class=
"codefun-flex-col codefun-justify-start codefun-items-center text-wrapper_3"
>
>
<text
class=
"font_13"
>
{{ product.labels_dictText.split(',')[0] }}
</text>
<text
v-if=
"product.labels_dictText"
class=
"font_13"
>
{{ product.labels_dictText.split(',')[0] }}
</text>
</view>
</view>
</view>
</view>
<text
<text
...
...
src/pages/kexinnongzi/detail.vue
浏览文件 @
c44bd1b9
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
import
{
useGlobSetting
}
from
'/@/hooks/setting'
import
{
useGlobSetting
}
from
'/@/hooks/setting'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
import
ConfirmDialog
from
'@/components/ConfirmDialog/index.vue'
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
globSetting
=
useGlobSetting
()
const
globSetting
=
useGlobSetting
()
let
enterpriseId
=
null
;
let
enterpriseId
=
null
;
...
@@ -41,6 +42,8 @@
...
@@ -41,6 +42,8 @@
categoryVal
:[],
categoryVal
:[],
enterpriseProduct
:[],
enterpriseProduct
:[],
contactName
:
""
,
showConfirmDialog
:
false
,
rules
:
[
rules
:
[
{
{
...
@@ -212,6 +215,7 @@
...
@@ -212,6 +215,7 @@
NongzhiAPI
.
getEnterpriseDetail
({
id
}).
then
((
res
)
=>
{
NongzhiAPI
.
getEnterpriseDetail
({
id
}).
then
((
res
)
=>
{
pageData
.
enterpriseCers
=
res
.
enterpriseCers
.
split
(
","
);
pageData
.
enterpriseCers
=
res
.
enterpriseCers
.
split
(
","
);
pageData
.
data
=
res
;
pageData
.
data
=
res
;
pageData
.
contactName
=
res
.
contactPerson
.
substring
(
0
,
1
)
+
new
Array
(
res
.
contactPerson
.
length
).
join
(
'*'
);
productInfo
.
unitCode
=
res
.
enterpriseCode
;
productInfo
.
unitCode
=
res
.
enterpriseCode
;
productInfo
.
enterpriseId
=
res
.
id
;
productInfo
.
enterpriseId
=
res
.
id
;
})
})
...
@@ -237,7 +241,7 @@
...
@@ -237,7 +241,7 @@
}
}
function
makePhoneCall
(){
function
makePhoneCall
(){
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
pageData
.
data
.
c
reateBy
phoneNumber
:
pageData
.
data
.
c
ontactMobile
});
});
}
}
</
script
>
</
script
>
...
@@ -271,10 +275,20 @@
...
@@ -271,10 +275,20 @@
</view>
</view>
<view
class=
"make-phone-view"
>
<view
class=
"make-phone-view"
>
<fui-button
text=
"我要购买"
bold
radius=
"96rpx"
@
click=
"
makePhoneCall()
"
height=
"80rpx"
/>
<fui-button
text=
"我要购买"
bold
radius=
"96rpx"
@
click=
"
pageData.showConfirmDialog=true;
"
height=
"80rpx"
/>
</view>
</view>
</view>
</view>
<!-- 确认对话框 -->
<ConfirmDialog
v-model:show=
"pageData.showConfirmDialog"
title=
"温馨提示"
:content=
"`你将与$
{pageData.contactName}进行电话沟通,若继续,请点击确认按钮!`"
cancelText="取消"
confirmText="确认"
@confirm="makePhoneCall"
/>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"120"
@
click=
"handlePublish"
>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"120"
@
click=
"handlePublish"
>
<view
class=
"text-white text-center"
>
<view
class=
"text-white text-center"
>
<view
class=
"fab-icon"
/>
<view
class=
"fab-icon"
/>
...
...
src/pages/kexinnongzi/kexinnongzi.vue
浏览文件 @
c44bd1b9
...
@@ -20,9 +20,7 @@
...
@@ -20,9 +20,7 @@
params
:
{
params
:
{
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
enterprise
:{
bizCategory
:
2
bizCategory
:
2
}
},
// 分页参数
},
// 分页参数
hasMore
:
true
,
// 是否还有更多数据
hasMore
:
true
,
// 是否还有更多数据
loading
:
false
,
// 是否正在加载
loading
:
false
,
// 是否正在加载
...
...
src/pages/kexinnongzi/shenqingruzhu.vue
浏览文件 @
c44bd1b9
...
@@ -239,6 +239,8 @@
...
@@ -239,6 +239,8 @@
}
}
const
formRef
=
ref
()
const
formRef
=
ref
()
function
submit
()
{
function
submit
()
{
const
{
lon
,
lat
}
=
uni
.
getStorageSync
(
'location'
)
pageData
.
position
=
[
lon
,
lat
];
pageData
.
form
.
enterpriseLogoUrl
=
pageData
.
enterpriseLogoArr
.
join
(
''
);
pageData
.
form
.
enterpriseLogoUrl
=
pageData
.
enterpriseLogoArr
.
join
(
''
);
pageData
.
form
.
enterpriseCers
=
pageData
.
cersImageArr
.
join
(
','
);
pageData
.
form
.
enterpriseCers
=
pageData
.
cersImageArr
.
join
(
','
);
if
(
pageData
.
position
.
length
==
0
)
{
if
(
pageData
.
position
.
length
==
0
)
{
...
@@ -292,7 +294,7 @@
...
@@ -292,7 +294,7 @@
</fui-form-item>
</fui-form-item>
</view>
</view>
<view
class=
"mt20"
>
<view
class=
"mt20"
>
<fui-input
required
label=
"地区"
placeholder=
"请选择地区"
v-model=
"form.areaText"
labelSize=
"28"
label-width=
"180"
@
click=
"show.area = true"
size=
"28"
/>
<fui-input
required
label=
"地区"
placeholder=
"请选择地区"
v-model=
"form.areaText"
labelSize=
"28"
label-width=
"180"
@
click=
"show.area = true"
size=
"28"
disabled
/>
<fui-input
required
label=
"详细地址"
placeholder=
"请输入详细地址"
v-model=
"form.addr"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"详细地址"
placeholder=
"请输入详细地址"
v-model=
"form.addr"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"联系人"
placeholder=
"请输入联系人"
v-model=
"form.contactPerson"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"联系人"
placeholder=
"请输入联系人"
v-model=
"form.contactPerson"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"联系电话"
placeholder=
"请输入联系电话"
v-model=
"form.contactMobile"
labelSize=
"28"
label-width=
"180"
size=
"28"
></fui-input>
<fui-input
required
label=
"联系电话"
placeholder=
"请输入联系电话"
v-model=
"form.contactMobile"
labelSize=
"28"
label-width=
"180"
size=
"28"
></fui-input>
...
@@ -318,7 +320,7 @@
...
@@ -318,7 +320,7 @@
<fui-text
class=
"fui-color__link"
>
《服务条款》
</fui-text>
<fui-text
class=
"fui-color__link"
>
《服务条款》
</fui-text>
</view>
</view>
<view
class=
"fui-btn__box"
v-if=
"!form.id"
style=
"margin-top: 30rpx"
>
<view
class=
"fui-btn__box"
v-if=
"!form.id"
style=
"margin-top: 30rpx"
>
<fui-button
text=
"
立即
申请"
bold
radius=
"96rpx"
@
click=
"submit"
/>
<fui-button
text=
"
提交
申请"
bold
radius=
"96rpx"
@
click=
"submit"
/>
</view>
</view>
</fui-form>
</fui-form>
</view>
</view>
...
...
src/pages/linghuoyonggong/components/yonggongmap.vue
浏览文件 @
c44bd1b9
...
@@ -70,7 +70,6 @@ const model = reactive({
...
@@ -70,7 +70,6 @@ const model = reactive({
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
model
.
id
=
options
.
id
;
model
.
id
=
options
.
id
;
model
.
currentEmploymentId
=
options
.
currentEmploymentId
;
model
.
currentEmploymentId
=
options
.
currentEmploymentId
;
console
.
log
(
"model.currentEmploymentId= "
+
model
.
currentEmploymentId
)
model
.
name
=
decodeURIComponent
(
options
.
name
)
model
.
name
=
decodeURIComponent
(
options
.
name
)
model
.
search
.
pageNo
=
1
model
.
search
.
pageNo
=
1
model
.
search
.
publishstatu
=
1
model
.
search
.
publishstatu
=
1
...
@@ -83,7 +82,7 @@ onLoad((options) => {
...
@@ -83,7 +82,7 @@ onLoad((options) => {
const
center
:
[
number
,
number
]
=
[
uni
.
getStorageSync
(
'location'
).
lon
,
uni
.
getStorageSync
(
'location'
).
lat
]
const
center
:
[
number
,
number
]
=
[
uni
.
getStorageSync
(
'location'
).
lon
,
uni
.
getStorageSync
(
'location'
).
lat
]
const
registerDialogRef
=
ref
()
const
registerDialogRef
=
ref
()
const
[
registerMap
,
map
]
=
useMapbox
({
const
[
registerMap
,
map
]
=
useMapbox
({
style
:
{
center
,
zoom
:
1
2
},
style
:
{
center
,
zoom
:
1
0
},
onLoaded
:
(
data
)
=>
{
onLoaded
:
(
data
)
=>
{
// 渲染用户当前位置
// 渲染用户当前位置
renderUserLocation
()
renderUserLocation
()
...
@@ -101,19 +100,51 @@ const [registerMap, map] = useMapbox({
...
@@ -101,19 +100,51 @@ const [registerMap, map] = useMapbox({
// 处理来自 renderjs 层的自定义事件
// 处理来自 renderjs 层的自定义事件
if
(
event
.
type
===
'custom'
&&
event
.
name
===
'navigateToDetail'
)
{
if
(
event
.
type
===
'custom'
&&
event
.
name
===
'navigateToDetail'
)
{
console
.
log
(
'接收到导航事件,id:'
,
event
)
console
.
log
(
'接收到导航事件,id:'
,
event
)
registerDialogRef
.
value
.
open
({
id
:
event
.
data
})
// Navigate.to(`/pages/linghuoyonggong/detail/index?id=${event.data}`)
// Navigate.to(`/pages/linghuoyonggong/detail/index?id=${event.data}`)
if
(
model
.
currentEmploymentId
==
2
){
getLaborAppDetail
(
event
.
data
);
}
else
{
registerDialogRef
.
value
.
open
({
id
:
event
.
data
})
}
}
}
}
},
})
})
async
function
getLaborAppDetail
(
id
)
{
await
LinghuoyonggongAPI
.
getLaborAppDetail
({
id
}).
then
((
res
)
=>
{
uni
.
makePhoneCall
({
phoneNumber
:
res
.
contactMobile
});
})
}
// 创建弹框HTML内容
// 创建弹框HTML内容
function
createPopupHTML
(
employment
)
{
function
createPopupHTML
(
employment
)
{
if
(
!
employment
)
return
''
if
(
!
employment
)
return
''
if
(
model
.
currentEmploymentId
==
2
){
return
`
<div style="width: 220px;background:#FFFFFF;padding: 12px;display: flex;flex-direction: column;">
<div style="display: flex;justify-content: space-between;line-height: 20px;">
<div style="font-size: 16px;color: #333333;">
${
employment
.
villageName
}
</div>
<div style="color: #5DB66F;font-size: 12px;display: flex;align-items: center;">
<image style="width:11px;height:13px;margin-right:7px;" src="./static/images/linghuoyonggong/distance.png" />
<div>
${
getDistanceText2
(
employment
)}
</div>
</div>
</div>
<div style="color: #5DB66F;margin-top: 6px;line-height: 20px;font-size: 12px;display: flex;align-items: center;">
<image style="width:12px;height:12px;margin-right:7px;" src="./static/images/linghuoyonggong/avatar.png" />
<div>待工人数
${
employment
.
workers
}
名</div>
</div>
<div style="color: #999999;margin-top: 4px;line-height: 20px;font-size: 12px;display: flex;align-items: center;">
<image style="width:11px;height:13px;margin-right:7px;" src="./static/images/linghuoyonggong/skill.png" />
<div>技能:
${
employment
.
skills
.
length
?
employment
.
skills
.
join
(
"、"
)
:
'未填写'
}
</div>
</div>
<a href="#" onclick="window.navigateToDetail('
${
employment
.
id
}
'); return false;" style="margin-top:8px;background: #5DB66F;text-decoration: none;border-radius: 200px;padding: 10px;text-align: center;color: #FFFFFF;font-size: 12px;display: flex;justify-content: center;align-items: center;">电话沟通</a>
</div>
`
;
}
else
{
const
distance
=
getDistanceText
(
employment
)
const
distance
=
getDistanceText
(
employment
)
const
stars
=
getStarsHTML
(
employment
)
const
stars
=
getStarsHTML
(
employment
)
console
.
log
(
'employment'
,
employment
)
return
`
return
`
<div style="
<div style="
max-width: 280px;
max-width: 280px;
...
@@ -188,6 +219,8 @@ function createPopupHTML(employment) {
...
@@ -188,6 +219,8 @@ function createPopupHTML(employment) {
</div>
</div>
</div>
</div>
`
`
}
}
}
// 渲染用户位置
// 渲染用户位置
...
@@ -225,11 +258,20 @@ function renderEmploymentMarkers() {
...
@@ -225,11 +258,20 @@ function renderEmploymentMarkers() {
console
.
log
(
'渲染用工标记数量:'
,
model
.
employmentList
.
length
)
console
.
log
(
'渲染用工标记数量:'
,
model
.
employmentList
.
length
)
console
.
log
(
'用工数据:'
,
model
.
employmentList
)
console
.
log
(
'用工数据:'
,
model
.
employmentList
)
let
longitude
=
null
,
latitude
=
null
;
// 使用 Marker 方式渲染带自定义图标的标记
// 使用 Marker 方式渲染带自定义图标的标记
model
.
employmentList
.
forEach
((
item
)
=>
{
model
.
employmentList
.
forEach
((
item
)
=>
{
if
(
item
.
longitude
&&
item
.
latitude
)
{
if
(
model
.
currentEmploymentId
==
2
){
longitude
=
item
.
lon
;
latitude
=
item
.
lat
;
}
else
{
longitude
=
item
.
longitude
;
latitude
=
item
.
latitude
;
}
if
(
longitude
&&
latitude
)
{
const
markerId
=
`employment-marker-
${
item
.
id
}
`
const
markerId
=
`employment-marker-
${
item
.
id
}
`
let
imageUrl
=
item
.
picture
||
'/static/images/linghuoyonggong/default-icon.png'
let
imageUrl
=
item
.
picture
||
'/static/images/linghuoyonggong/default-icon.png'
// let imageUrl = '/static/images/linghuoyonggong/default-icon.png'
const
iconSize
:
[
number
,
number
]
=
[
40
,
40
]
// 图标大小
const
iconSize
:
[
number
,
number
]
=
[
40
,
40
]
// 图标大小
// #ifdef APP-PLUS
// #ifdef APP-PLUS
...
@@ -242,7 +284,7 @@ function renderEmploymentMarkers() {
...
@@ -242,7 +284,7 @@ function renderEmploymentMarkers() {
// 使用 addMarker 添加到地图,带上 popup 和自定义图标
// 使用 addMarker 添加到地图,带上 popup 和自定义图标
map
.
addMarker
(
map
.
addMarker
(
markerId
,
markerId
,
[
item
.
longitude
,
item
.
latitude
],
[
longitude
,
latitude
],
createPopupHTML
(
item
),
createPopupHTML
(
item
),
false
,
// 不默认打开
false
,
// 不默认打开
imageUrl
,
// 自定义图标图片URL
imageUrl
,
// 自定义图标图片URL
...
@@ -273,7 +315,8 @@ function getEmploymentList() {
...
@@ -273,7 +315,8 @@ function getEmploymentList() {
}
}
model
.
loading
=
true
model
.
loading
=
true
try
{
try
{
LinghuoyonggongAPI
.
employmentList
(
model
.
search
).
then
(
async
(
res
)
=>
{
if
(
model
.
currentEmploymentId
==
2
){
LinghuoyonggongAPI
.
getLaborAppList
(
model
.
search
).
then
(
async
(
res
)
=>
{
const
{
records
,
total
}
=
res
const
{
records
,
total
}
=
res
// 批量处理数据,避免多次DOM操作
// 批量处理数据,避免多次DOM操作
const
processedRecords
=
records
.
map
((
item
)
=>
{
const
processedRecords
=
records
.
map
((
item
)
=>
{
...
@@ -299,12 +342,44 @@ function getEmploymentList() {
...
@@ -299,12 +342,44 @@ function getEmploymentList() {
}
}
model
.
total
=
total
model
.
total
=
total
// 数据加载完成后渲染地图标记
nextTick
(()
=>
{
renderEmploymentMarkers
()
})
})
}
else
{
LinghuoyonggongAPI
.
employmentList
(
model
.
search
).
then
(
async
(
res
)
=>
{
const
{
records
,
total
}
=
res
// 批量处理数据,避免多次DOM操作
const
processedRecords
=
records
.
map
((
item
)
=>
{
// 缓存区域处理结果
item
.
area
=
getText
(
item
.
area
,
' / '
)
// 计算天数并缓存结果
if
(
item
.
starttime
&&
item
.
estimatedendtime
)
{
item
.
daysDiff
=
getDaysDiff
(
item
.
starttime
,
item
.
estimatedendtime
)
}
return
item
})
// 一次性更新数据,避免多次响应式更新
if
(
model
.
search
.
pageNo
===
1
)
{
model
.
employmentList
=
processedRecords
}
else
{
// 避免重复数据加载
const
existingIds
=
new
Set
(
model
.
employmentList
.
map
((
item
)
=>
item
.
id
))
const
newRecords
=
processedRecords
.
filter
((
item
)
=>
!
existingIds
.
has
(
item
.
id
))
model
.
employmentList
=
[...
model
.
employmentList
,
...
newRecords
]
}
model
.
total
=
total
// 数据加载完成后渲染地图标记
// 数据加载完成后渲染地图标记
nextTick
(()
=>
{
nextTick
(()
=>
{
renderEmploymentMarkers
()
renderEmploymentMarkers
()
})
})
})
})
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
'获取用工列表失败:'
,
error
)
console
.
error
(
'获取用工列表失败:'
,
error
)
// 这里可以添加用户友好的错误提示
// 这里可以添加用户友好的错误提示
...
@@ -390,13 +465,26 @@ function closeEmploymentPopup() {
...
@@ -390,13 +465,26 @@ function closeEmploymentPopup() {
model
.
showEmploymentPopup
=
false
model
.
showEmploymentPopup
=
false
model
.
selectedEmployment
=
null
model
.
selectedEmployment
=
null
}
}
// 计算距离显示
function
getDistanceText2
(
item
)
{
if
(
!
item
||
!
item
.
lon
||
!
model
.
userLocation
.
longitude
)
{
return
'未知'
}
// 使用turf计算距离
const
from
=
turf
.
point
([
model
.
userLocation
.
longitude
,
model
.
userLocation
.
latitude
])
const
to
=
turf
.
point
([
item
.
lon
,
item
.
lat
])
const
distance
=
turf
.
distance
(
from
,
to
,
{
units
:
'kilometers'
})
if
(
distance
<
1
)
{
return
`
${
Math
.
round
(
distance
*
1000
)}
m`
;
}
return
`
${
distance
.
toFixed
(
1
)}
km`
;
}
// 计算距离显示
// 计算距离显示
function
getDistanceText
(
employment
)
{
function
getDistanceText
(
employment
)
{
if
(
!
employment
||
!
employment
.
longitude
||
!
employment
.
latitude
)
{
if
(
!
employment
||
!
employment
.
longitude
||
!
employment
.
latitude
)
{
return
'未知'
return
'未知'
}
}
// 使用turf计算距离
// 使用turf计算距离
const
from
=
turf
.
point
([
model
.
userLocation
.
longitude
,
model
.
userLocation
.
latitude
])
const
from
=
turf
.
point
([
model
.
userLocation
.
longitude
,
model
.
userLocation
.
latitude
])
const
to
=
turf
.
point
([
employment
.
longitude
,
employment
.
latitude
])
const
to
=
turf
.
point
([
employment
.
longitude
,
employment
.
latitude
])
...
...
src/pages/linghuoyonggong/details.vue
浏览文件 @
c44bd1b9
...
@@ -3,10 +3,14 @@
...
@@ -3,10 +3,14 @@
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
import
{
getCalculateAge
}
from
'@/utils/date'
import
{
getCalculateAge
}
from
'@/utils/date'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
;
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
;
import
ConfirmDialog
from
'@/components/ConfirmDialog/index.vue'
const
pageData
=
reactive
({
const
pageData
=
reactive
({
loading
:
false
,
loading
:
false
,
workersParam
:[],
workersParam
:[],
contactMobile
:
""
contactMobile
:
""
,
contactName
:
""
,
showConfirmDialog
:
false
,
})
})
// 字典值
// 字典值
const
DictData
=
reactive
({
const
DictData
=
reactive
({
...
@@ -30,6 +34,7 @@
...
@@ -30,6 +34,7 @@
await
LinghuoyonggongAPI
.
getLaborAppDetail
({
id
}).
then
((
res
)
=>
{
await
LinghuoyonggongAPI
.
getLaborAppDetail
({
id
}).
then
((
res
)
=>
{
pageData
.
workersParam
=
res
.
workers
;
pageData
.
workersParam
=
res
.
workers
;
pageData
.
contactMobile
=
res
.
contactMobile
;
pageData
.
contactMobile
=
res
.
contactMobile
;
pageData
.
contactName
=
res
.
contactName
.
substring
(
0
,
1
)
+
new
Array
(
res
.
contactName
.
length
).
join
(
'*'
);
})
})
}
}
// 返回字典中的中文值
// 返回字典中的中文值
...
@@ -76,10 +81,18 @@
...
@@ -76,10 +81,18 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
v-if=
"
!pageData.workersParam
"
class=
"make-phone-view"
>
<view
v-if=
"
pageData.workersParam.length
"
class=
"make-phone-view"
>
<fui-button
text=
"电话沟通"
bold
radius=
"96rpx"
@
click=
"
makePhoneCall()
"
height=
"80rpx"
/>
<fui-button
text=
"电话沟通"
bold
radius=
"96rpx"
@
click=
"
pageData.showConfirmDialog = true
"
height=
"80rpx"
/>
</view>
</view>
<!-- 确认对话框 -->
<ConfirmDialog
v-model:show=
"pageData.showConfirmDialog"
title=
"温馨提示"
:content=
"`你将与$
{pageData.contactName}进行电话沟通,若继续,请点击确认按钮!`"
cancelText="取消"
confirmText="确认"
@confirm="makePhoneCall"
/>
</view>
</view>
<fui-loading
isFixed
v-if=
"pageData.loading"
backgroundColor=
"rgba(0, 0, 0, 0.4)"
/>
<fui-loading
isFixed
v-if=
"pageData.loading"
backgroundColor=
"rgba(0, 0, 0, 0.4)"
/>
</
template
>
</
template
>
...
...
src/pages/linghuoyonggong/linghuoyonggong.vue
浏览文件 @
c44bd1b9
...
@@ -387,21 +387,26 @@
...
@@ -387,21 +387,26 @@
<view
class=
"d-flex j-sb"
>
<view
class=
"d-flex j-sb"
>
<view
class=
"left-width village_number_view"
>
<view
class=
"left-width village_number_view"
>
<view
class=
"village_view text_overflow_ellipsis"
>
{{
item
.
villageName
}}
</view>
<view
class=
"village_view text_overflow_ellipsis"
>
{{
item
.
villageName
}}
</view>
<view
class=
"d-flex align-center"
><image
class=
"avatar_icon"
src=
"/static/images/linghuoyonggong/avatar.png"
/><text
class=
"text-color"
>
待工人
员
{{
item
.
workers
}}
名
</text></view>
<view
class=
"d-flex align-center"
><image
class=
"avatar_icon"
src=
"/static/images/linghuoyonggong/avatar.png"
/><text
class=
"text-color"
>
待工人
数
{{
item
.
workers
}}
名
</text></view>
</view>
</view>
<view
class=
"d-flex align-center justify-center right-width village_distance"
>
<view
class=
"d-flex align-center justify-center right-width village_distance"
>
<image
class=
"distance_icon"
src=
"/static/images/linghuoyonggong/distance.png"
/>
<image
class=
"distance_icon"
src=
"/static/images/linghuoyonggong/distance.png"
/>
<text
class=
"distance_val text-color"
>
{{
getDistanceText
(
item
)
}}
</text>
<text
class=
"distance_val text-color"
>
{{
getDistanceText
(
item
)
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"d-flex j-sb skill_details_view"
>
<view
class=
"d-flex j-sb skill_details_view"
style=
"padding-bottom: 0px;"
>
<view
class=
"left-width d-flex j-sb align-center"
>
<view
class=
"left-width d-flex j-sb align-center"
>
<image
class=
"skill_icon"
src=
"/static/images/linghuoyonggong/skill.png"
/>
<image
class=
"skill_icon"
src=
"/static/images/linghuoyonggong/skill.png"
/>
<view
class=
"skill_view text_overflow_ellipsis"
>
技能:
{{
item
.
skills
.
length
?
item
.
skills
.
join
(
"、"
)
:
'未填写'
}}
</view>
<view
class=
"skill_view text_overflow_ellipsis"
>
技能:
{{
item
.
skills
.
length
?
item
.
skills
.
join
(
"、"
)
:
'未填写'
}}
</view>
</view>
</view>
</view>
<view
class=
"d-flex j-sb skill_details_view"
>
<view
class=
"left-width d-flex j-sb align-center"
>
<image
class=
"skill_icon"
src=
"/static/images/linghuoyonggong/address.png"
/>
<view
class=
"skill_view text_overflow_ellipsis"
>
地址:
{{
item
.
villageFullName
}}
</view>
</view>
<view
class=
"right-width see_details_btn"
@
click=
"onDetailsClick(item)"
>
查看详情
</view>
<view
class=
"right-width see_details_btn"
@
click=
"onDetailsClick(item)"
>
查看详情
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
</template>
</template>
...
@@ -726,7 +731,7 @@
...
@@ -726,7 +731,7 @@
height
:
26
rpx
;
height
:
26
rpx
;
}
}
.skill_view
{
.skill_view
{
width
:
4
16
rpx
;
width
:
4
40
rpx
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
...
...
src/pages/nongjifuwu/detail.vue
浏览文件 @
c44bd1b9
...
@@ -41,6 +41,8 @@
...
@@ -41,6 +41,8 @@
categoryVal
:[],
categoryVal
:[],
enterpriseProduct
:[],
enterpriseProduct
:[],
contactName
:
""
,
showConfirmDialog
:
false
,
rules
:
[
rules
:
[
{
{
...
@@ -204,6 +206,7 @@
...
@@ -204,6 +206,7 @@
NongzhiAPI
.
getEnterpriseDetail
({
id
}).
then
((
res
)
=>
{
NongzhiAPI
.
getEnterpriseDetail
({
id
}).
then
((
res
)
=>
{
pageData
.
enterpriseCers
=
res
.
enterpriseCers
.
split
(
","
);
pageData
.
enterpriseCers
=
res
.
enterpriseCers
.
split
(
","
);
pageData
.
data
=
res
;
pageData
.
data
=
res
;
pageData
.
contactName
=
res
.
contactPerson
.
substring
(
0
,
1
)
+
new
Array
(
res
.
contactPerson
.
length
).
join
(
'*'
);
productInfo
.
enterpriseId
=
res
.
id
;
productInfo
.
enterpriseId
=
res
.
id
;
})
})
}
}
...
@@ -230,7 +233,7 @@
...
@@ -230,7 +233,7 @@
}
}
function
makePhoneCall
(){
function
makePhoneCall
(){
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
pageData
.
data
.
c
reateBy
phoneNumber
:
pageData
.
data
.
c
ontactMobile
});
});
}
}
</
script
>
</
script
>
...
@@ -269,10 +272,20 @@
...
@@ -269,10 +272,20 @@
</view>
</view>
<view
class=
"make-phone-view"
>
<view
class=
"make-phone-view"
>
<fui-button
text=
"我要租赁"
bold
radius=
"96rpx"
@
click=
"
makePhoneCall()
"
height=
"80rpx"
/>
<fui-button
text=
"我要租赁"
bold
radius=
"96rpx"
@
click=
"
pageData.showConfirmDialog=true;
"
height=
"80rpx"
/>
</view>
</view>
</view>
</view>
<!-- 确认对话框 -->
<ConfirmDialog
v-model:show=
"pageData.showConfirmDialog"
title=
"温馨提示"
:content=
"`你将与$
{pageData.contactName}进行电话沟通,若继续,请点击确认按钮!`"
cancelText="取消"
confirmText="确认"
@confirm="makePhoneCall"
/>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"120"
@
click=
"handlePublish"
>
<fui-fab
position=
"right"
distance=
"10"
bottom=
"240"
width=
"120"
@
click=
"handlePublish"
>
<view
class=
"text-white text-center"
>
<view
class=
"text-white text-center"
>
<view
class=
"fab-icon"
/>
<view
class=
"fab-icon"
/>
...
...
src/pages/nongjifuwu/nongjifuwu.vue
浏览文件 @
c44bd1b9
...
@@ -38,9 +38,7 @@
...
@@ -38,9 +38,7 @@
pageSize
:
10
,
pageSize
:
10
,
serviceType
:
1
,
serviceType
:
1
,
scope
:
null
,
scope
:
null
,
enterprise
:{
bizCategory
:
3
bizCategory
:
3
}
},
},
farmMachineList
:
[],
farmMachineList
:
[],
total
:
0
,
total
:
0
,
...
...
src/pages/nongjifuwu/shenqingruzhu.vue
浏览文件 @
c44bd1b9
...
@@ -239,6 +239,8 @@
...
@@ -239,6 +239,8 @@
}
}
const
formRef
=
ref
()
const
formRef
=
ref
()
function
submit
()
{
function
submit
()
{
const
{
lon
,
lat
}
=
uni
.
getStorageSync
(
'location'
)
pageData
.
position
=
[
lon
,
lat
];
pageData
.
form
.
enterpriseLogoUrl
=
pageData
.
enterpriseLogoArr
.
join
(
''
);
pageData
.
form
.
enterpriseLogoUrl
=
pageData
.
enterpriseLogoArr
.
join
(
''
);
pageData
.
form
.
enterpriseCers
=
pageData
.
cersImageArr
.
join
(
','
);
pageData
.
form
.
enterpriseCers
=
pageData
.
cersImageArr
.
join
(
','
);
if
(
pageData
.
position
.
length
==
0
)
{
if
(
pageData
.
position
.
length
==
0
)
{
...
@@ -292,7 +294,7 @@
...
@@ -292,7 +294,7 @@
</fui-form-item>
</fui-form-item>
</view>
</view>
<view
class=
"mt20"
>
<view
class=
"mt20"
>
<fui-input
required
label=
"地区"
placeholder=
"请选择地区"
v-model=
"form.areaText"
labelSize=
"28"
label-width=
"180"
@
click=
"show.area = true"
size=
"28"
/>
<fui-input
required
label=
"地区"
placeholder=
"请选择地区"
v-model=
"form.areaText"
labelSize=
"28"
label-width=
"180"
@
click=
"show.area = true"
size=
"28"
disabled
/>
<fui-input
required
label=
"详细地址"
placeholder=
"请输入详细地址"
v-model=
"form.addr"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"详细地址"
placeholder=
"请输入详细地址"
v-model=
"form.addr"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"联系人"
placeholder=
"请输入联系人"
v-model=
"form.contactPerson"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"联系人"
placeholder=
"请输入联系人"
v-model=
"form.contactPerson"
labelSize=
"28"
label-width=
"180"
size=
"28"
/>
<fui-input
required
label=
"联系电话"
placeholder=
"请输入联系电话"
v-model=
"form.contactMobile"
labelSize=
"28"
label-width=
"180"
size=
"28"
></fui-input>
<fui-input
required
label=
"联系电话"
placeholder=
"请输入联系电话"
v-model=
"form.contactMobile"
labelSize=
"28"
label-width=
"180"
size=
"28"
></fui-input>
...
@@ -318,7 +320,7 @@
...
@@ -318,7 +320,7 @@
<fui-text
class=
"fui-color__link"
>
《服务条款》
</fui-text>
<fui-text
class=
"fui-color__link"
>
《服务条款》
</fui-text>
</view>
</view>
<view
class=
"fui-btn__box"
v-if=
"!form.id"
style=
"margin-top: 30rpx"
>
<view
class=
"fui-btn__box"
v-if=
"!form.id"
style=
"margin-top: 30rpx"
>
<fui-button
text=
"
立即
申请"
bold
radius=
"96rpx"
@
click=
"submit"
/>
<fui-button
text=
"
提交
申请"
bold
radius=
"96rpx"
@
click=
"submit"
/>
</view>
</view>
</fui-form>
</fui-form>
</view>
</view>
...
...
src/pages/nongyezhengce/nongyezhengce.vue
浏览文件 @
c44bd1b9
...
@@ -18,6 +18,15 @@
...
@@ -18,6 +18,15 @@
loading
:
false
,
// 是否正在加载
loading
:
false
,
// 是否正在加载
dataList
:[]
dataList
:[]
})
})
onLoad
((
options
)
=>
{
if
(
options
&&
options
.
category
){
pageData
.
params
.
news
.
category
=
options
.
category
;
currentTab
.
value
=
'redian'
;
}
else
{
pageData
.
params
.
news
.
category
=
2
;
currentTab
.
value
=
'nongye'
;
}
})
onShow
(()
=>
{
onShow
(()
=>
{
getListData
();
getListData
();
})
})
...
...
src/pages/shouye/shouye.vue
浏览文件 @
c44bd1b9
...
@@ -442,7 +442,7 @@ function onClickWarning(item) {
...
@@ -442,7 +442,7 @@ function onClickWarning(item) {
}
}
function toNewsList() {
function toNewsList() {
uni.navigateTo({
uni.navigateTo({
url: '/pages/n
ews/index
',
url: '/pages/n
ongyezhengce/nongyezhengce?category=1
',
})
})
}
}
...
...
src/static/images/linghuoyonggong/address.png
0 → 100644
浏览文件 @
c44bd1b9
497 Bytes
src/static/images/linghuoyonggong/default-icon.png
0 → 100644
浏览文件 @
c44bd1b9
1.1 KB
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论