浏览代码

增加校区

seimin 2 年之前
父节点
当前提交
a6ab3820c4
共有 2 个文件被更改,包括 6 次插入12 次删除
  1. 3 6
      src/views/my.vue
  2. 3 6
      src/views/supplementary.vue

+ 3 - 6
src/views/my.vue

@@ -303,12 +303,9 @@ export default {
303
                 area: {}
303
                 area: {}
304
               };
304
               };
305
             }
305
             }
306
-            that.loginUser.branch = {id: selectedVal[0]};
307
-            that.loginUser.place.id = selectedVal[1];
308
-            that.loginUser.place.area.id = selectedVal[0];
309
-            that.loginUser.branch.hosName = selectedText[0];
310
-            that.loginUser.place.place = selectedText[1];
311
-            that.loginUser.place.area.area = selectedText[0];
306
+            that.loginUser.branch = {id: selectedVal[0], hosName:selectedText[0]};
307
+            that.loginUser.place = {id:selectedVal[2], place:selectedText[2]};
308
+            that.loginUser.place.area = {id:selectedVal[1], area: selectedText[1]};
312
             var loginUserStr = JSON.stringify(that.loginUser);
309
             var loginUserStr = JSON.stringify(that.loginUser);
313
             localStorage.setItem("loginUser", loginUserStr);
310
             localStorage.setItem("loginUser", loginUserStr);
314
             that.areaData = selectedText[0] + " " + selectedText[1] + " " + selectedText[2];
311
             that.areaData = selectedText[0] + " " + selectedText[1] + " " + selectedText[2];

+ 3 - 6
src/views/supplementary.vue

@@ -254,12 +254,9 @@ export default {
254
                 area: {}
254
                 area: {}
255
               };
255
               };
256
             }
256
             }
257
-            that.loginUser.branch = {id: selectedVal[0]};
258
-            that.loginUser.place.id = selectedVal[2];
259
-            that.loginUser.place.area.id = selectedVal[1];
260
-            that.loginUser.branch.hosName = selectedText[0];
261
-            that.loginUser.place.place = selectedText[2];
262
-            that.loginUser.place.area.area = selectedText[1];
257
+            that.loginUser.branch = {id: selectedVal[0], hosName:selectedText[0]};
258
+            that.loginUser.place = {id:selectedVal[2], place:selectedText[2]};
259
+            that.loginUser.place.area = {id:selectedVal[1], area: selectedText[1]};
263
             var loginUserStr = JSON.stringify(that.loginUser);
260
             var loginUserStr = JSON.stringify(that.loginUser);
264
             localStorage.setItem("loginUser", loginUserStr);
261
             localStorage.setItem("loginUser", loginUserStr);
265
             that.areaData = selectedText[0] + " " + selectedText[1] + " " + selectedText[2];
262
             that.areaData = selectedText[0] + " " + selectedText[1] + " " + selectedText[2];