yuantianjiao 6 years ago
parent
commit
5da8976182
2 changed files with 6 additions and 4 deletions
  1. 2
    2
      src/pages/bodyCheck/index/index.vue
  2. 4
    2
      src/store/bodyCheck/index.js

+ 2
- 2
src/pages/bodyCheck/index/index.vue View File

@@ -4,12 +4,12 @@
4 4
     <div v-if="result && result.length">
5 5
       <div class="userInfo flex-h">
6 6
         <div class="flex-item">
7
-          <span>{{user.Username}}</span>
7
+          <span>{{user.Name}}</span>
8 8
           <span>{{user.Sex=='0' ? '先生' : '女士'}}</span>
9 9
         </div>
10 10
         <div>
11 11
           <span>体检时间</span>
12
-          <span>{{toolClass.dateFormat(user.CreateTime)}}</span>
12
+          <span>{{toolClass.dateFormat(mainInfo.CreateDate)}}</span>
13 13
         </div>
14 14
       </div>
15 15
       <ul>

+ 4
- 2
src/store/bodyCheck/index.js View File

@@ -10,7 +10,9 @@ export default {
10 10
   },
11 11
   mutations: {
12 12
     updateState(state, payload) {
13
-      Object.keys(payload).forEach(k => (state[k] = payload[k]))
13
+      state.result = payload.Message
14
+      state.user = payload.UserInfo
15
+      state.mainInfo = payload.Info[0]
14 16
     }
15 17
   },
16 18
   actions: {
@@ -19,7 +21,7 @@ export default {
19 21
         Ajax({
20 22
           ...api.bodyCheck.bodyCheck
21 23
         }).then(res => {
22
-          context.commit('setgymCardList', res)
24
+          context.commit('updateState', res)
23 25
           resolve(res)
24 26
         }).catch((err) => {
25 27
           reject(err)