Browse Source

page2修改

wangfei 6 years ago
parent
commit
a893caecea
2 changed files with 4 additions and 6 deletions
  1. 0
    1
      src/pages/index.vue
  2. 4
    5
      src/pages/page2.vue

+ 0
- 1
src/pages/index.vue View File

225
     },
225
     },
226
     getPersonList () {
226
     getPersonList () {
227
       this.getPerson().then(res => {
227
       this.getPerson().then(res => {
228
-        console.log(res)
229
         if (res) {
228
         if (res) {
230
           this.returnUserList({
229
           this.returnUserList({
231
             firstName: (res.classId || res.classId === 1) ? '' : res.personName,
230
             firstName: (res.classId || res.classId === 1) ? '' : res.personName,

+ 4
- 5
src/pages/page2.vue View File

6
         <div>
6
         <div>
7
           <ul class="centerLabel userList">
7
           <ul class="centerLabel userList">
8
             <li v-for="(item, index) in userList" :key="index" :class="{'active': item.show}">
8
             <li v-for="(item, index) in userList" :key="index" :class="{'active': item.show}">
9
-              <span>{{`${item.firstName}${item.gender - 0 === 1 ? '先生' : '女士'}`}}</span>
10
-              <span>欢迎光临 !</span>
9
+              <span>{{item.firstName}}</span>
10
+              <span>{{item.words}}</span>
11
             </li>
11
             </li>
12
           </ul>
12
           </ul>
13
         </div>
13
         </div>
175
     },
175
     },
176
     getPersonList () {
176
     getPersonList () {
177
       this.getPerson().then(res => {
177
       this.getPerson().then(res => {
178
-        console.log(res)
179
         if (res) {
178
         if (res) {
180
           this.returnUserList({
179
           this.returnUserList({
181
-            firstName: '111',
182
-            gender: '1',
180
+            firstName: (res.classId || res.classId === 1) ? '' : res.personName,
181
+            words: res.words.replace('{{name}}', res.personName),
183
             show: false
182
             show: false
184
           })
183
           })
185
         }
184
         }