Selaa lähdekoodia

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/pc-admin

张延森 5 vuotta sitten
vanhempi
commit
7ccf82d3e5

+ 8
- 5
src/views/carouselFigure/advertisementEdit.vue Näytä tiedosto

418
           this.form = res
418
           this.form = res
419
           this.imageUrl = res.image
419
           this.imageUrl = res.image
420
           this.showPlace = res.targetName
420
           this.showPlace = res.targetName
421
-        }).catch(() => {
421
+        }).catch((err) => {
422
+          this.$notify.error(err.msg || err.message);
422
           console.log('carouselFigure/getByIdExtendContent err')
423
           console.log('carouselFigure/getByIdExtendContent err')
423
         })
424
         })
424
       },
425
       },
425
       getBuildList() {
426
       getBuildList() {
426
         this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
427
         this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
427
           this.buildingList = res.records
428
           this.buildingList = res.records
428
-        }).catch(() => {
429
+        }).catch((err) => {
430
+          this.$notify.error(err.msg || err.message);
429
           console.log('building/getBuildings err')
431
           console.log('building/getBuildings err')
430
         })
432
         })
431
       },
433
       },
454
           this.$store.dispatch('carouselFigure/addExtendContent', this.form).then((res) => {
456
           this.$store.dispatch('carouselFigure/addExtendContent', this.form).then((res) => {
455
             this.$message.success('操作成功')
457
             this.$message.success('操作成功')
456
             this.$router.go(-1)
458
             this.$router.go(-1)
457
-          }).catch(() => {
458
-
459
+          }).catch((err) => {
460
+            this.$notify.error(err.msg || err.message);
459
           })
461
           })
460
           return
462
           return
461
         }
463
         }
464
         this.$store.dispatch('carouselFigure/updateExtendContent', this.form).then((res) => {
466
         this.$store.dispatch('carouselFigure/updateExtendContent', this.form).then((res) => {
465
           this.$message.success('操作成功')
467
           this.$message.success('操作成功')
466
           this.$router.go(-1)
468
           this.$router.go(-1)
467
-        }).catch(() => {
469
+        }).catch((err) => {
470
+          this.$notify.error(err.msg || err.message);
468
           console.log('carouselFigure/updateExtendContent err')
471
           console.log('carouselFigure/updateExtendContent err')
469
         })
472
         })
470
       },
473
       },

+ 8
- 5
src/views/carouselFigure/edit.vue Näytä tiedosto

418
         this.form = res
418
         this.form = res
419
         this.imageUrl = res.image
419
         this.imageUrl = res.image
420
         this.showPlace = res.targetName
420
         this.showPlace = res.targetName
421
-      }).catch(() => {
421
+      }).catch((err) => {
422
+        this.$notify.error(err.msg || err.message);
422
         console.log('carouselFigure/getByIdExtendContent err')
423
         console.log('carouselFigure/getByIdExtendContent err')
423
       })
424
       })
424
     },
425
     },
425
     getBuildList() {
426
     getBuildList() {
426
       this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
427
       this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
427
         this.buildingList = res.records
428
         this.buildingList = res.records
428
-      }).catch(() => {
429
+      }).catch((err) => {
430
+        this.$notify.error(err.msg || err.message);
429
         console.log('building/getBuildings err')
431
         console.log('building/getBuildings err')
430
       })
432
       })
431
     },
433
     },
454
         this.$store.dispatch('carouselFigure/addExtendContent', this.form).then((res) => {
456
         this.$store.dispatch('carouselFigure/addExtendContent', this.form).then((res) => {
455
           this.$message.success('操作成功')
457
           this.$message.success('操作成功')
456
           this.$router.go(-1)
458
           this.$router.go(-1)
457
-        }).catch(() => {
458
-
459
+        }).catch((err) => {
460
+          this.$notify.error(err.msg || err.message);
459
         })
461
         })
460
         return
462
         return
461
       }
463
       }
464
       this.$store.dispatch('carouselFigure/updateExtendContent', this.form).then((res) => {
466
       this.$store.dispatch('carouselFigure/updateExtendContent', this.form).then((res) => {
465
         this.$message.success('操作成功')
467
         this.$message.success('操作成功')
466
         this.$router.go(-1)
468
         this.$router.go(-1)
467
-      }).catch(() => {
469
+      }).catch((err) => {
470
+        this.$notify.error(err.msg || err.message);
468
         console.log('carouselFigure/updateExtendContent err')
471
         console.log('carouselFigure/updateExtendContent err')
469
       })
472
       })
470
     },
473
     },

+ 2
- 2
src/views/customer/customerDetails.vue Näytä tiedosto

4
       <el-col :span="9">
4
       <el-col :span="9">
5
         <div class="grid-content">
5
         <div class="grid-content">
6
           <p class="title">置业顾问信息</p>
6
           <p class="title">置业顾问信息</p>
7
-          <img class="touxiang" src="http://img1.imgtn.bdimg.com/it/u=1022041283,4133755956&fm=26&gp=0.jpg" alt="">
7
+          <img class="touxiang" :src="customerDetail.consultant === null ? '' :  customerDetail.consultant.picture" alt="">
8
           <p class="name">{{  customerDetail.consultant === null ? '' :  customerDetail.consultant.name }}</p>
8
           <p class="name">{{  customerDetail.consultant === null ? '' :  customerDetail.consultant.name }}</p>
9
           <p class="phone">{{ customerDetail.consultant === null ? '' :  customerDetail.consultant.phone }}</p>
9
           <p class="phone">{{ customerDetail.consultant === null ? '' :  customerDetail.consultant.phone }}</p>
10
           <div class="info">
10
           <div class="info">
22
         <div class="grid-content">
22
         <div class="grid-content">
23
           <p class="title">客户信息</p>
23
           <p class="title">客户信息</p>
24
           <div style="display:flex">
24
           <div style="display:flex">
25
-            <img class="touxiang" src="http://img1.imgtn.bdimg.com/it/u=1022041283,4133755956&fm=26&gp=0.jpg" alt="">
25
+            <img class="touxiang" :src="customerDetail.picture" alt="">
26
             <div style="width:100%">
26
             <div style="width:100%">
27
               <p class="info-box">用户名称:<span>{{ customerDetail.name }}</span></p>
27
               <p class="info-box">用户名称:<span>{{ customerDetail.name }}</span></p>
28
               <p class="info-box">国家:<span>{{ customerDetail.country }}</span></p>
28
               <p class="info-box">国家:<span>{{ customerDetail.country }}</span></p>

+ 5
- 2
src/views/customer/editCustomer.vue Näytä tiedosto

155
             this.detail = data;
155
             this.detail = data;
156
             this.dialogImageUrl = data.picture
156
             this.dialogImageUrl = data.picture
157
             this.imageUrl = data.picture
157
             this.imageUrl = data.picture
158
+          }).catch((err) => {
159
+            this.$notify.error(err.msg || err.message);
158
           });
160
           });
159
         }
161
         }
160
       },
162
       },
220
                 })
222
                 })
221
                 .catch(err => {
223
                 .catch(err => {
222
                   this.hideLoadding();
224
                   this.hideLoadding();
223
-                  this.$notify.error(err.message);
225
+                  this.$notify.error(err.msg || err.message);
224
                 });
226
                 });
225
       },
227
       },
226
 
228
 
242
           this.dialogForm.pageNumber = res.current
244
           this.dialogForm.pageNumber = res.current
243
           this.dialogForm.pageSize = res.size
245
           this.dialogForm.pageSize = res.size
244
           this.dialogTotal = res.total
246
           this.dialogTotal = res.total
245
-        }).catch(()=> {
247
+        }).catch((err)=> {
248
+          this.$notify.error(err.msg || err.message);
246
           console.log('persons/getConsultants err')
249
           console.log('persons/getConsultants err')
247
         })
250
         })
248
       },
251
       },

+ 5
- 2
src/views/customer/editRecommend.vue Näytä tiedosto

176
           this.detail = data;
176
           this.detail = data;
177
           this.dialogImageUrl = data.picture
177
           this.dialogImageUrl = data.picture
178
           this.imageUrl = data.picture
178
           this.imageUrl = data.picture
179
+        }).catch((err) => {
180
+          this.$notify.error(err.msg || err.message);
179
         });
181
         });
180
       }
182
       }
181
     },
183
     },
241
         })
243
         })
242
         .catch(err => {
244
         .catch(err => {
243
           this.hideLoadding();
245
           this.hideLoadding();
244
-          this.$notify.error(err.message);
246
+          this.$notify.error(err.msg || err.message);
245
         });
247
         });
246
     },
248
     },
247
 
249
 
263
         this.dialogForm.pageNumber = res.current
265
         this.dialogForm.pageNumber = res.current
264
         this.dialogForm.pageSize = res.size
266
         this.dialogForm.pageSize = res.size
265
         this.dialogTotal = res.total
267
         this.dialogTotal = res.total
266
-      }).catch(()=> {
268
+      }).catch((err)=> {
269
+        this.$notify.error(err.msg || err.message);
267
         console.log('persons/getConsultants err')
270
         console.log('persons/getConsultants err')
268
       })
271
       })
269
     },
272
     },

+ 2
- 2
src/views/customer/list.vue Näytä tiedosto

55
       </el-table-column>
55
       </el-table-column>
56
       <el-table-column  label="置业顾问">
56
       <el-table-column  label="置业顾问">
57
         <template slot-scope="scope">
57
         <template slot-scope="scope">
58
-          <span>{{scope.row.name}}</span>
59
-          <p>{{scope.row.phone}}</p>
58
+          <span>{{scope.row.consultantName}}</span>
59
+          <p>{{scope.row.consultTel}}</p>
60
         </template>
60
         </template>
61
       </el-table-column>
61
       </el-table-column>
62
       <el-table-column fixed="right"  width="200" label="操作">
62
       <el-table-column fixed="right"  width="200" label="操作">

+ 2
- 2
src/views/customer/recommendCustomer.vue Näytä tiedosto

66
       </el-table-column>
66
       </el-table-column>
67
       <el-table-column  label="推荐人">
67
       <el-table-column  label="推荐人">
68
         <template slot-scope="scope">
68
         <template slot-scope="scope">
69
-          <span>{{scope.row.name}}</span>
70
-          <p>{{scope.row.phone}}</p>
69
+          <span>{{scope.row.recommendName }}</span>
70
+          <p>{{scope.row.recommendTel}}</p>
71
         </template>
71
         </template>
72
       </el-table-column>
72
       </el-table-column>
73
       <el-table-column
73
       <el-table-column

+ 10
- 5
src/views/news/edi/index.vue Näytä tiedosto

134
             getTypeList() {
134
             getTypeList() {
135
                 this.$store.dispatch('news/getTypeList', this.typeForm).then((res) => {
135
                 this.$store.dispatch('news/getTypeList', this.typeForm).then((res) => {
136
                     this.typeList = res.records
136
                     this.typeList = res.records
137
-                }).catch(() => {
137
+                }).catch((err) => {
138
+                    this.$notify.error(err.msg || err.message);
138
                     console.log('news/getTypeList err')
139
                     console.log('news/getTypeList err')
139
                 })
140
                 })
140
             },
141
             },
141
             getBuildList() {
142
             getBuildList() {
142
                 this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
143
                 this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
143
                     this.buildingList = res.records
144
                     this.buildingList = res.records
144
-                }).catch(() => {
145
+                }).catch((err) => {
146
+                    this.$notify.error(err.msg || err.message);
145
                     console.log('building/getBuildings err')
147
                     console.log('building/getBuildings err')
146
                 })
148
                 })
147
             },
149
             },
151
                         this.$message.success('操作成功!')
153
                         this.$message.success('操作成功!')
152
                         this.$router.go(-1)
154
                         this.$router.go(-1)
153
                         // console.log(res)
155
                         // console.log(res)
154
-                    }).catch(() => {
156
+                    }).catch((err) => {
157
+                        this.$notify.error(err.msg || err.message);
155
                         console.log('news/add err')
158
                         console.log('news/add err')
156
                     })
159
                     })
157
 
160
 
163
                     this.$message.success('操作成功!')
166
                     this.$message.success('操作成功!')
164
                     this.$router.go(-1)
167
                     this.$router.go(-1)
165
                     // console.log(res)
168
                     // console.log(res)
166
-                }).catch(() => {
169
+                }).catch((err) => {
170
+                    this.$notify.error(err.msg || err.message);
167
                     console.log('news/update err')
171
                     console.log('news/update err')
168
                 })
172
                 })
169
 
173
 
181
                     this.imageUrl = res.newsImg
185
                     this.imageUrl = res.newsImg
182
                     this.form.buildingId = res.buildingId
186
                     this.form.buildingId = res.buildingId
183
                     this.form.newsDetail = res.newsDetail
187
                     this.form.newsDetail = res.newsDetail
184
-                }).catch(() => {
188
+                }).catch((err) => {
189
+                    this.$notify.error(err.msg || err.message);
185
                     console.log('news/getById err')
190
                     console.log('news/getById err')
186
                 })
191
                 })
187
             }
192
             }

+ 2
- 1
src/views/news/type/edi/index.vue Näytä tiedosto

98
                         this.$message.success('操作成功!')
98
                         this.$message.success('操作成功!')
99
                         this.$router.go(-1)
99
                         this.$router.go(-1)
100
                         // console.log(res)
100
                         // console.log(res)
101
-                    }).catch(() => {
101
+                    }).catch((err) => {
102
+                        this.$notify.error(err.msg || err.message);
102
                         console.log('news/addType err')
103
                         console.log('news/addType err')
103
                     })
104
                     })
104
 
105