Browse Source

分享进入主页空白

许静 5 years ago
parent
commit
77cd842be1
1 changed files with 30 additions and 2 deletions
  1. 30
    2
      src/pages/project/index.js

+ 30
- 2
src/pages/project/index.js View File

@@ -132,9 +132,37 @@ export default class Index extends Component {
132 132
       this.updateCity(defaultCity)
133 133
     })
134 134
   }
135
+  updateCity(payload) {
136
+    const NanJing = {
137
+      citycode: "025",
138
+      id: 320100,
139
+      initial: "N",
140
+      lat: "32.041544",
141
+      leveltype: 2,
142
+      lng: "118.767413",
143
+      name: "南京市",
144
+      parentid: 320000,
145
+      pinyin: "Nanjing",
146
+      shortname: "南京",
147
+      status: 1,
148
+      zipcode: "320100"
149
+    }
150
+
151
+    const appId = accountInfo.miniProgram.appId;
152
+    let params;
153
+
154
+    switch (appId) {
155
+      // 知与行联调
156
+      case 'wxd9ee3a9480a4e544':
157
+        params = NanJing;
158
+        break;
159
+
160
+      default:
161
+        params = payload;
162
+        break;
163
+    }
135 164
 
136
-  updateCity (payload) {
137
-    this.props.dispatchCitySelected(payload).then(res => {
165
+    this.props.dispatchCitySelected(params).then(res => {
138 166
       this.loadData()
139 167
     })
140 168
   }