提交 394deec8 作者: 宇宙超人

样式修改

上级 9d7d2c68
......@@ -2,8 +2,8 @@ import { otherHttp } from '/@/utils/http/axios'
enum Api {
zoneList = '/online/cgform/api/getData/01fd687ecb164aea914e92047e144d66', // 功能菜单数据
farmsList = '/farms/list', // 农场列表
farmsAdd = '/farms/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: '/farms/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: 农业模型数据
......
......@@ -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 聊天助手 ===
......
......@@ -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')
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论