浏览代码

信息修改

1002884655 3 年前
父节点
当前提交
7486329386
共有 3 个文件被更改,包括 34 次插入3 次删除
  1. 2
    2
      config/dev.js
  2. 1
    1
      project.config.json
  3. 31
    0
      src/pages/index/buildingAround/index.jsx

+ 2
- 2
config/dev.js 查看文件

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"https://xlk.njyz.tech"',
7
-    // HOST: '"https://www.newhousehold.cn"',
6
+    // HOST: '"https://xlk.njyz.tech"',
7
+    HOST: '"https://www.newhousehold.cn"',
8 8
     // HOST: '"http://127.0.0.1:8567"',
9 9
     // WSS_HOST: '"wss://www.newhousehold.cn"',
10 10
     WSS_HOST: '"wss://xlk.njyz.tech"',

+ 1
- 1
project.config.json 查看文件

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "miniapp",
4 4
 	"description": "",
5
-	"appid": "wxe44244d1a5ea3364",
5
+	"appid": "wxc96058d57e77f373",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 31
- 0
src/pages/index/buildingAround/index.jsx 查看文件

@@ -99,6 +99,37 @@ export default withLayout((props) => {
99 99
         setDetailInfo(res || {})
100 100
         if (res.mapJson) {
101 101
           const pois = JSON.parse(res.mapJson).map(poi => ({ ...poi, data: JSON.parse(poi.data) }))
102
+          pois.map((item) => {
103
+            let target = []
104
+            if(item.key === 'Transport') {
105
+              target = (res.buildingTransport || '').split(',').map((subItem) => {
106
+                return { name: subItem }
107
+              })
108
+            } else if(item.key === 'Mall') {
109
+              target = (res.buildingMall || '').split(',').map((subItem) => {
110
+                return { name: subItem }
111
+              })
112
+            } else if(item.key === 'Edu') {
113
+              target = (res.buildingEdu || '').split(',').map((subItem) => {
114
+                return { name: subItem }
115
+              })
116
+            } else if(item.key === 'Hospital') {
117
+              target = (res.buildingHospital || '').split(',').map((subItem) => {
118
+                return { name: subItem }
119
+              })
120
+            } else if(item.key === 'Bank') {
121
+              target = (res.buildingBank || '').split(',').map((subItem) => {
122
+                return { name: subItem }
123
+              })
124
+            } else if(item.key === 'Restaurant') {
125
+              target = (res.buildingRestaurant || '').split(',').map((subItem) => {
126
+                return { name: subItem }
127
+              })
128
+            }
129
+            item.data = item.data.concat(target)
130
+          })
131
+          console.log(`pois is`, pois)
132
+          console.log(res)
102 133
           setNavList(pois)
103 134
         }
104 135