Pārlūkot izejas kodu

安防人员图片加载优化

tianyabing 2 gadi atpakaļ
vecāks
revīzija
b4b33f7a23

+ 7 - 0
src/components/security/person/components/securityPersonDuty.vue

@@ -40,6 +40,13 @@ export default {
       apiSecurityPerson.getPersonDuty({
         type: type
       }).then(res=>{
+        if (res) {
+          res.forEach(item => {
+            if (item.photo.indexOf('/')===0) {
+              item.photo = '/ioc-api'+item.photo;
+            }
+          })
+        }
         this.dutyPerson = res;
         this.oriDutyPerson = JSON.parse(JSON.stringify(this.dutyPerson));
         this.loading = false;