Commit bd31b865dd9aa4cee4ee641db9cd9e3dcd6c9f6c
1 parent
10525542
feat(config): 更新开发配置和地图组件功能
- 在 Claude 设置中添加多个 Bash 和 Read 权限用于本地开发调试 - 修改 ViewMap 组件的 closeMap 方法以支持回调函数 - 配置 vue.config.js 中的代理设置指向新的后端 API 地址 - 注释掉旧的本地开发服务器代理配置并启用生产环境 API 代理
Showing
3 changed files
with
27 additions
and
19 deletions
.claude/settings.local.json
| @@ -9,7 +9,12 @@ | @@ -9,7 +9,12 @@ | ||
| 9 | "Bash(curl -sI \"https://webapi.amap.com/maps?v=1.4.15&key=3239bc04f77a5c89b2b5e628da96b6ed\")", | 9 | "Bash(curl -sI \"https://webapi.amap.com/maps?v=1.4.15&key=3239bc04f77a5c89b2b5e628da96b6ed\")", |
| 10 | "Bash(npm run *)", | 10 | "Bash(npm run *)", |
| 11 | "Read(//Users/wangbiao/.claude/**)", | 11 | "Read(//Users/wangbiao/.claude/**)", |
| 12 | - "Read(//Users/wangbiao/.claude/plugins/**)" | 12 | + "Read(//Users/wangbiao/.claude/plugins/**)", |
| 13 | + "Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:3000)", | ||
| 14 | + "Bash(curl -s \"https://spms.xrparking.cn/app/inspectionPlan.listInspectionPlans\" -H \"Content-Type: application/json\")", | ||
| 15 | + "Bash(python3 -m json.tool)", | ||
| 16 | + "Bash(open *)", | ||
| 17 | + "Bash(sips -z 800 1200 /Users/wangbiao/Downloads/qqqqqq.png --out /tmp/qqqqqq_small.png)" | ||
| 13 | ] | 18 | ] |
| 14 | } | 19 | } |
| 15 | } | 20 | } |
src/components/system/ViewMap.vue
| @@ -61,12 +61,15 @@ export default { | @@ -61,12 +61,15 @@ export default { | ||
| 61 | }) | 61 | }) |
| 62 | }) | 62 | }) |
| 63 | }, | 63 | }, |
| 64 | - closeMap() { | ||
| 65 | - this.viewMapInfo.showMap = false | 64 | + closeMap(done) { |
| 66 | if (this.viewMapInfo.map) { | 65 | if (this.viewMapInfo.map) { |
| 67 | this.viewMapInfo.map.destroy() | 66 | this.viewMapInfo.map.destroy() |
| 68 | this.viewMapInfo.map = null | 67 | this.viewMapInfo.map = null |
| 69 | } | 68 | } |
| 69 | + this.viewMapInfo.showMap = false | ||
| 70 | + if (typeof done === 'function') { | ||
| 71 | + done() | ||
| 72 | + } | ||
| 70 | }, | 73 | }, |
| 71 | wgs84togcj02(lng, lat) { | 74 | wgs84togcj02(lng, lat) { |
| 72 | return { lon: lng, lat } | 75 | return { lon: lng, lat } |
vue.config.js
| @@ -9,34 +9,34 @@ module.exports = { | @@ -9,34 +9,34 @@ module.exports = { | ||
| 9 | port: 3000, // 设置开发服务器端口 | 9 | port: 3000, // 设置开发服务器端口 |
| 10 | open: true, // 自动打开浏览器 | 10 | open: true, // 自动打开浏览器 |
| 11 | proxy: { | 11 | proxy: { |
| 12 | - // '/app': { | ||
| 13 | - // target: 'https://demo.homecommunity.cn/app', // 后端API地址 | ||
| 14 | - // changeOrigin: true, | ||
| 15 | - // pathRewrite: { | ||
| 16 | - // '^/app': '' | ||
| 17 | - // } | ||
| 18 | - // }, | ||
| 19 | - // '/callComponent': { | ||
| 20 | - // target: 'https://demo.homecommunity.cn/callComponent', // 后端API地址 | ||
| 21 | - // changeOrigin: true, | ||
| 22 | - // pathRewrite: { | ||
| 23 | - // '^/callComponent': '' | ||
| 24 | - // } | ||
| 25 | - // } | ||
| 26 | '/app': { | 12 | '/app': { |
| 27 | - target: 'http://localhost:8008/app', // 后端API地址 | 13 | + target: 'https://spms.xrparking.cn/app', // 后端API地址 |
| 28 | changeOrigin: true, | 14 | changeOrigin: true, |
| 29 | pathRewrite: { | 15 | pathRewrite: { |
| 30 | '^/app': '' | 16 | '^/app': '' |
| 31 | } | 17 | } |
| 32 | }, | 18 | }, |
| 33 | '/callComponent': { | 19 | '/callComponent': { |
| 34 | - target: 'http://localhost:8008/callComponent', // 后端API地址 | 20 | + target: 'hhttps://spms.xrparking.cn/callComponent', // 后端API地址 |
| 35 | changeOrigin: true, | 21 | changeOrigin: true, |
| 36 | pathRewrite: { | 22 | pathRewrite: { |
| 37 | '^/callComponent': '' | 23 | '^/callComponent': '' |
| 38 | } | 24 | } |
| 39 | } | 25 | } |
| 26 | + // '/app': { | ||
| 27 | + // target: 'http://localhost:8008/app', // 后端API地址 | ||
| 28 | + // changeOrigin: true, | ||
| 29 | + // pathRewrite: { | ||
| 30 | + // '^/app': '' | ||
| 31 | + // } | ||
| 32 | + // }, | ||
| 33 | + // '/callComponent': { | ||
| 34 | + // target: 'http://localhost:8008/callComponent', // 后端API地址 | ||
| 35 | + // changeOrigin: true, | ||
| 36 | + // pathRewrite: { | ||
| 37 | + // '^/callComponent': '' | ||
| 38 | + // } | ||
| 39 | + // } | ||
| 40 | }, | 40 | }, |
| 41 | // 关键:禁止开发服务器对静态资源添加 hash | 41 | // 关键:禁止开发服务器对静态资源添加 hash |
| 42 | historyApiFallback: { | 42 | historyApiFallback: { |