Commit bd31b865dd9aa4cee4ee641db9cd9e3dcd6c9f6c

Authored by 王彪总
1 parent 10525542

feat(config): 更新开发配置和地图组件功能

- 在 Claude 设置中添加多个 Bash 和 Read 权限用于本地开发调试
- 修改 ViewMap 组件的 closeMap 方法以支持回调函数
- 配置 vue.config.js 中的代理设置指向新的后端 API 地址
- 注释掉旧的本地开发服务器代理配置并启用生产环境 API 代理
.claude/settings.local.json
... ... @@ -9,7 +9,12 @@
9 9 "Bash(curl -sI \"https://webapi.amap.com/maps?v=1.4.15&key=3239bc04f77a5c89b2b5e628da96b6ed\")",
10 10 "Bash(npm run *)",
11 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 61 })
62 62 })
63 63 },
64   - closeMap() {
65   - this.viewMapInfo.showMap = false
  64 + closeMap(done) {
66 65 if (this.viewMapInfo.map) {
67 66 this.viewMapInfo.map.destroy()
68 67 this.viewMapInfo.map = null
69 68 }
  69 + this.viewMapInfo.showMap = false
  70 + if (typeof done === 'function') {
  71 + done()
  72 + }
70 73 },
71 74 wgs84togcj02(lng, lat) {
72 75 return { lon: lng, lat }
... ...
vue.config.js
... ... @@ -9,34 +9,34 @@ module.exports = {
9 9 port: 3000, // 设置开发服务器端口
10 10 open: true, // 自动打开浏览器
11 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 12 '/app': {
27   - target: 'http://localhost:8008/app', // 后端API地址
  13 + target: 'https://spms.xrparking.cn/app', // 后端API地址
28 14 changeOrigin: true,
29 15 pathRewrite: {
30 16 '^/app': ''
31 17 }
32 18 },
33 19 '/callComponent': {
34   - target: 'http://localhost:8008/callComponent', // 后端API地址
  20 + target: 'hhttps://spms.xrparking.cn/callComponent', // 后端API地址
35 21 changeOrigin: true,
36 22 pathRewrite: {
37 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 41 // 关键:禁止开发服务器对静态资源添加 hash
42 42 historyApiFallback: {
... ...