明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
jt_backend
Commits
e71b822f
Commit
e71b822f
authored
Feb 08, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ccd33ccf
Pipeline
#107112
passed with stage
in 3 seconds
Changes
8
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2078 additions
and
6 deletions
+2078
-6
a.md
a.md
+1151
-0
b.md
b.md
+742
-0
cc.md
cc.md
+82
-0
projectQtController.js
controller/projectQtController.js
+86
-0
index.js
db/index.js
+3
-0
qtCbgl.js
db/model/jt/qtCbgl.js
+9
-0
projectRouter.js
router/projectRouter.js
+5
-5
resourceRouter.js
router/resourceRouter.js
+0
-1
No files found.
a.md
0 → 100644
View file @
e71b822f
This diff is collapsed.
Click to expand it.
b.md
0 → 100644
View file @
e71b822f
This diff is collapsed.
Click to expand it.
cc.md
0 → 100644
View file @
e71b822f
# 「好停车」小程序功能设计方案
## 一、核心功能架构
```
好停车小程序(极简版)
├── 核心功能:快速找到最近距离的最便宜停车场
└── 辅助功能:停车导航、订单管理
```
## 二、详细页面设计(极简版)
### 1. **首页(唯一核心页面)**
-
**当前位置自动获取**
-
首次打开申请位置权限
-
自动显示"您在这里"
-
**极简地图展示**
-
只显示周边3km内停车场
-
停车场标记用颜色区分:
-
🟢 最近+最便宜(主推)
-
🟡 次优选择
-
🔴 其他选择
-
**智能排序算法**
-
综合排序 = 距离权重(70%) + 价格权重(30%)
-
自动推荐最佳选择,无需手动筛选
---
### 2. **停车场卡片(点击地图标记弹出)**
-
**只显示核心信息**
```
名称:XX停车场
距离:500米(步行5分钟)
价格:4元/小时
剩余:23/120个车位
```
-
**两个核心按钮**
-
🚀 导航去这里(调起高德/百度地图)
-
✅ 我要停这里(记录选择,可选)
---
### 3. **我(用户中心)**
-
**极简菜单**
-
常用车牌(1-3个)
-
停车记录(最近10条)
-
关于
---
### ❌ 已删除的复杂功能(非核心)
-
❌ 预约车位功能(增加决策成本,停车场有空位即可)
-
❌ 用户评价系统(停车是刚需,评价参考价值低)
-
❌ 积分会员体系(过度设计)
-
❌ 收藏停车场(智能推荐即可)
-
❌ 实时停车计时/费用计算(由停车场系统完成)
-
❌ 在线支付(由停车场出入口收费完成)
-
❌ 充值/优惠券/月卡(简化流程)
---
## 三、关键交互流程(3步完成)
### 找停车场流程
1.
打开小程序 → 自动定位 + 加载地图(1秒)
2.
查看地图 → 绿色标记是最佳选择(已智能排序)
3.
点击导航 → 调起高德/百度地图出发
完成!
---
## 四、技术建议(最小化实现)
-
**地图服务**
:高德地图SDK(定位+显示+导航跳转)
-
**数据接口**
:
-
获取周边停车场列表(按距离+价格排序)
-
停车场实时车位数据
-
**本地存储**
:缓存常用车牌号
-
**无需**
:支付系统、订单系统、实时推送
\ No newline at end of file
controller/projectQtController.js
View file @
e71b822f
...
...
@@ -16,3 +16,89 @@ const _ = require("lodash");
const
{
Op
}
=
require
(
'sequelize'
);
const
projectModule
=
require
(
'../module/projectModule'
);
// ---------------- 其他 - 成本管理 (QtCbgl)
// 创建成本管理
async
function
createCbgl
(
req
,
res
,
next
)
{
try
{
// 如果需要记录创建者,可以启用下面一行
// req.body.creator = req.user.id;
let
ret
=
await
DB
.
QtCbgl
.
create
(
req
.
body
);
return
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
);
}
}
// 更新成本管理
async
function
updateCbgl
(
req
,
res
,
next
)
{
try
{
if
(
!
req
.
body
.
id
)
return
res
.
sendError
(
errorMessage
.
paramsError
);
let
ret
=
await
DB
.
QtCbgl
.
findOne
({
where
:
{
id
:
req
.
body
.
id
},
raw
:
true
});
if
(
!
(
ret
&&
ret
.
id
))
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
await
DB
.
QtCbgl
.
update
(
req
.
body
,
{
where
:
{
id
:
req
.
body
.
id
}
});
return
res
.
sendData
({});
}
catch
(
error
)
{
next
(
error
);
}
}
// 获取单个成本管理
async
function
getCbgl
(
req
,
res
,
next
)
{
try
{
if
(
!
req
.
body
.
id
)
return
res
.
sendError
(
errorMessage
.
paramsError
);
let
info
=
await
DB
.
QtCbgl
.
findOne
({
where
:
{
id
:
req
.
body
.
id
,
del
:
0
},
raw
:
true
});
if
(
!
(
info
&&
info
.
id
))
return
res
.
sendError
(
errorMessage
.
resourceNotFound
);
return
res
.
sendData
(
info
);
}
catch
(
error
)
{
next
(
error
);
}
}
// 获取成本管理列表
async
function
getCbglList
(
req
,
res
,
next
)
{
try
{
let
page
=
req
.
body
.
page
||
1
;
let
limit
=
req
.
body
.
pagesize
||
req
.
body
.
pageSize
||
10
;
let
offset
=
(
page
-
1
)
*
limit
;
let
search
=
{};
search
.
order
=
[[
'createdAt'
,
'DESC'
]];
search
.
limit
=
limit
;
search
.
offset
=
offset
;
let
where
=
{
del
:
0
};
if
(
req
.
body
.
projectName
)
{
where
.
projectName
=
{
[
Op
.
like
]:
`%
${
req
.
body
.
projectName
}
%`
};
}
if
(
req
.
body
.
projectId
)
{
where
.
projectId
=
req
.
body
.
projectId
;
}
search
.
where
=
where
;
if
(
req
.
body
.
attributes
&&
req
.
body
.
attributes
.
length
)
{
search
.
attributes
=
req
.
body
.
attributes
;
}
let
ret
=
await
DB
.
QtCbgl
.
findAndCountAll
(
search
);
return
res
.
sendData
(
ret
);
}
catch
(
error
)
{
next
(
error
);
}
}
// 删除成本管理(逻辑删除)
async
function
deleteCbgl
(
req
,
res
,
next
)
{
try
{
await
DB
.
QtCbgl
.
update
({
del
:
1
},
{
where
:
{
id
:
req
.
body
.
id
}
});
return
res
.
sendData
({});
}
catch
(
error
)
{
next
(
error
);
}
}
module
.
exports
=
{
createCbgl
,
updateCbgl
,
getCbgl
,
getCbglList
,
deleteCbgl
};
db/index.js
View file @
e71b822f
...
...
@@ -90,6 +90,8 @@ const RcTwhgl = require('./model/jt/rcTwhgl');
const
RcTzjh
=
require
(
'./model/jt/rcTzjh'
);
const
RcXxhjs
=
require
(
'./model/jt/rcXxhjs'
);
const
RcTzdagl
=
require
(
'./model/jt/rcTzdagl'
);
const
QtCbgl
=
require
(
'./model/jt/qtCbgl'
);
/**
* 业务表
*/
...
...
@@ -177,6 +179,7 @@ global.DB = {
RcTzjh
,
RcXxhjs
,
RcTzdagl
,
QtCbgl
,
}
...
...
db/model/jt/qtCbgl.js
View file @
e71b822f
...
...
@@ -15,6 +15,15 @@ const QtCbgl = sequelize.define('QtCbgl', {
},
yjzb
:
{
type
:
DataTypes
.
JSON
,
//{ztlx: 主题类型,zbmc:指标名称,zbkhnr: 指标考核内容,jyz: 建议值,sjz: 实际值}
comment
:
"一级指标"
,
},
ejzb
:
{
type
:
DataTypes
.
JSON
,
comment
:
"二级指标"
,
},
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
...
...
router/projectRouter.js
View file @
e71b822f
...
...
@@ -211,10 +211,10 @@ router.post('/deleteXxhjs', projectRcController.deleteXxhjs);
*/
//5.1 成本管理
//
router.post('/createCbgl', projectQtController.createCbgl);
//
router.post('/updateCbgl', projectQtController.updateCbgl);
//
router.post('/getCbgl', projectQtController.getCbgl);
//
router.post('/getCbglList', projectQtController.getCbglList);
//
router.post('/deleteCbgl', projectQtController.deleteCbgl);
router
.
post
(
'/createCbgl'
,
projectQtController
.
createCbgl
);
router
.
post
(
'/updateCbgl'
,
projectQtController
.
updateCbgl
);
router
.
post
(
'/getCbgl'
,
projectQtController
.
getCbgl
);
router
.
post
(
'/getCbglList'
,
projectQtController
.
getCbglList
);
router
.
post
(
'/deleteCbgl'
,
projectQtController
.
deleteCbgl
);
module
.
exports
=
router
;
\ No newline at end of file
router/resourceRouter.js
View file @
e71b822f
...
...
@@ -26,5 +26,4 @@ router.post('/saveAllResourceInfo', resourceController.saveAllResourceInfo);
router
.
post
(
'/listResourceAll'
,
resourceController
.
listResourceAll
);
module
.
exports
=
router
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment