Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
394deec8
提交
394deec8
authored
12月 04, 2025
作者:
宇宙超人
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
样式修改
上级
9d7d2c68
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
54 行增加
和
26 行删除
+54
-26
nongchang.ts
src/api/model/nongchang.ts
+24
-4
pages.json
src/pages.json
+3
-18
add.vue
src/pages/jidiguanli/add.vue
+0
-0
yonggongmap.vue
src/pages/linghuoyonggong/components/yonggongmap.vue
+25
-3
create-nongchang-form.vue
src/pages/nongchang/create-nongchang-form.vue
+0
-0
index.vue
src/pages/nongchang/detail/index.vue
+0
-0
farm-title-icon.png
src/static/images/nongchang/farm-title-icon.png
+0
-0
proxy.ts
src/utils/proxy.ts
+2
-1
没有找到文件。
src/api/model/nongchang.ts
浏览文件 @
394deec8
...
...
@@ -2,8 +2,8 @@ import { otherHttp } from '/@/utils/http/axios'
enum
Api
{
zoneList
=
'/online/cgform/api/getData/01fd687ecb164aea914e92047e144d66'
,
// 功能菜单数据
farmsList
=
'/farm
s
/list'
,
// 农场列表
farmsAdd
=
'/farm
s
/add'
,
// 添加农场
farmsList
=
'/farm/list'
,
// 农场列表
farmsAdd
=
'/farm/add'
,
// 添加农场
agricultureModelsList
=
'/online/cgform/api/getData/7b2983df6ddf416aba68db8b0ab234ab'
,
// 农业模型数据
baseManagementList
=
'/online/cgform/api/getData/e4e4e6c901254b60b1e7a005097999ec'
,
// 基地管理数据
commonToolsList
=
'/online/cgform/api/getData/3a7fbb877f304b7d83935caa454859c4'
,
// 常用工具数据
...
...
@@ -109,7 +109,7 @@ export function getFarmbaseList(params: any = {}) {
}
export
function
AllFarms
(
params
=
{})
{
return
otherHttp
.
get
({
url
:
'/farm
s
/getAllFarms'
,
url
:
'/farm/getAllFarms'
,
params
,
})
}
...
...
@@ -156,7 +156,27 @@ export function farmsAdd(params = {}) {
params
,
})
}
/**
* @param params
* @description: 编辑农场
* @returns
*/
export
function
farmsEdit
(
params
=
{})
{
return
otherHttp
.
post
({
url
:
'/farm/edit'
,
params
,
})
}
/**
* @param params 请求参数
* @description: id查询农场
*/
export
function
farmsGet
(
params
=
{})
{
return
otherHttp
.
get
({
url
:
'/farm/queryById'
,
params
,
})
}
/**
* @param params 请求参数
* @description: 农业模型数据
...
...
src/pages.json
浏览文件 @
394deec8
...
...
@@ -592,25 +592,10 @@
{
"path"
:
"pages/nongchang/detail/index"
,
"style"
:
{
"navigationBarTitleText"
:
"农场"
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#5DB66F"
,
"navigationBarTextStyle"
:
"white"
,
"navigationStyle"
:
"custom"
,
"backgroundColorTop"
:
"#5DB66F"
,
"backgroundColorBottom"
:
"#F2F2F2"
,
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"buttons"
:
[
{
"text"
:
"+ 添加基地"
,
"fontSrc"
:
"/static/uni.ttf"
,
"color"
:
"#fff"
,
"fontSize"
:
"26rpx"
,
"width"
:
"auto"
}
]
}
}
"enablePullDownRefresh"
:
false
}
},
//
===
AI
聊天助手
===
...
...
src/pages/jidiguanli/add.vue
浏览文件 @
394deec8
差异被折叠。
点击展开。
src/pages/linghuoyonggong/components/yonggongmap.vue
浏览文件 @
394deec8
...
...
@@ -108,6 +108,7 @@ function createPopupHTML(employment) {
if
(
!
employment
)
return
''
const
distance
=
getDistanceText
(
employment
)
const
stars
=
getStarsHTML
(
employment
)
console
.
log
(
'employment'
,
employment
)
return
`
<div style="
...
...
@@ -163,9 +164,8 @@ function createPopupHTML(employment) {
<div style="display: flex; align-items: center; justify-content: space-between;">
<div style="display: flex; align-items: center; gap: 4px;">
<span style="color: #FF9800; font-size: 16px;">★★★★</span>
<span style="color: #E0E0E0; font-size: 16px;">★</span>
<span style="font-size: 13px; color: #666666; margin-left: 4px;">4</span>
${
stars
.
html
}
<span style="font-size: 13px; color: #666666; margin-left: 4px;">
${
stars
.
rating
}
</span>
</div>
<a href="#" onclick="window.navigateToDetail('
${
employment
.
id
}
'); return false;" style="
display: inline-block;
...
...
@@ -403,6 +403,28 @@ function getDistanceText(employment) {
}
return
`
${
distance
.
toFixed
(
1
)}
km`
}
// 生成星级HTML
function
getStarsHTML
(
employment
)
{
// 获取紧急程度,默认为0
const
urgentdegree
=
Number
(
employment
.
urgentdegree
)
||
0
// 确保评级在0-5之间
const
rating
=
Math
.
max
(
0
,
Math
.
min
(
5
,
urgentdegree
))
let
html
=
''
for
(
let
i
=
1
;
i
<=
5
;
i
++
)
{
if
(
i
<=
rating
)
{
html
+=
'<span style="color: #FF9800; font-size: 16px;">★</span>'
}
else
{
html
+=
'<span style="color: #E0E0E0; font-size: 16px;">★</span>'
}
}
return
{
html
,
rating
}
}
// 发布用工
function
handlePublish
()
{
Navigate
.
to
(
'/pages/linghuoyonggong/form'
)
...
...
src/pages/nongchang/create-nongchang-form.vue
浏览文件 @
394deec8
差异被折叠。
点击展开。
src/pages/nongchang/detail/index.vue
浏览文件 @
394deec8
差异被折叠。
点击展开。
src/static/images/nongchang/farm-title-icon.png
0 → 100644
浏览文件 @
394deec8
589 Bytes
src/utils/proxy.ts
浏览文件 @
394deec8
...
...
@@ -11,7 +11,8 @@ const PROXY_LIST: [[string, string]?] = [
// [`http://192.168.0.100:18100`, `https://oss.beta.app.yiring.com`],
// 开发环境(预览)
[
`http://192.168.0.156:18100`
,
`http://111.22.182.169:49091`
],
// [`http://192.168.0.156:18100`, `http://111.22.182.169:49091`],
[
`http://192.168.0.156:18100`
,
`http://36.133.16.81:42111`
],
]
/**
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论