Browse Source

药房端切换科室BUG修复,增加sourceMap配置

seimin 3 years ago
parent
commit
2116bb74bc
2 changed files with 12 additions and 3 deletions
  1. 4 3
      pages/pharmacy/pharmacy.vue
  2. 8 0
      vue.config.js

+ 4 - 3
pages/pharmacy/pharmacy.vue

@@ -130,7 +130,7 @@ export default {
130 130
         },
131 131
       ],
132 132
       hosId: uni.getStorageSync("userData").user.currentHospital.id,//当前院区
133
-      loginUser: uni.getStorageSync("userData").user,
133
+      loginUser: uni.getStorageSync("userData"),
134 134
       currenDept: {},//当前登录人所属科室
135 135
     };
136 136
   },
@@ -251,7 +251,7 @@ export default {
251 251
           dept: {
252 252
             id: dept.id,
253 253
           },
254
-          id: this.loginUser.id,
254
+          id: this.loginUser.user.id,
255 255
         },
256 256
       };
257 257
       post("/data/updData/user", dataObj).then((res) => {
@@ -264,7 +264,8 @@ export default {
264 264
     getCurrentUserNow(){
265 265
       get("/user/data/getCurrentUser").then((res) => {
266 266
         if (res.status == 200) {
267
-          this.loginUser.dept = this.currenDept;
267
+          // this.loginUser.dept = this.currenDept;
268
+          this.loginUser.user = res.data;
268 269
           uni.setStorageSync('userData', this.loginUser);
269 270
         }
270 271
       })

+ 8 - 0
vue.config.js

@@ -0,0 +1,8 @@
1
+module.exports = {
2
+    productionSourceMap: false, // 生产打包时不输出map文件,增加打包速度
3
+    configureWebpack: config => {
4
+        if (process.env.NODE_ENV === 'development') {
5
+             config.devtool='source-map'    
6
+        }
7
+    }
8
+}