Ver Fonte

图片获取修改

xiaohaizhao há 1 ano atrás
pai
commit
aeb8a93857

+ 1 - 1
packageA/course/list.vue

@@ -77,7 +77,7 @@ export default {
         }).then(res => {
             console.log("获取课程详情", res)
             if (this.cutoff(res.msg)) return;
-            res.data.cover = this.getSpecifiedImage(res.data.attinfos[0] || {}) || uni.getStorageSync("site").logo || ''
+            res.data.cover = this.getSpecifiedImage(res.data.attinfos[0] || {}, 'compressed') || uni.getStorageSync("site").logo || ''
             this.detail = res.data;
             uni.setNavigationBarTitle({
                 title: res.data.title,

+ 1 - 1
packageA/fullView/detail.vue

@@ -133,7 +133,7 @@ export default {
                 console.log("设计实景详情", res)
                 if (this.cutoff(res.msg)) return;
                 this.files = formattedFiles(res.data.attinfos_pic.map(v => v.attinfos[0])).map(v => {
-                    if (v.fileType == 'image') v.cover = this.getSpecifiedImage(v)
+                    if (v.fileType == 'image') v.cover = this.getSpecifiedImage(v, 'compressed')
                     return v
                 })
                 this.detail = res.data;

+ 1 - 1
packageA/resourceLibrary/detail.vue

@@ -89,7 +89,7 @@ export default {
                         v.cover = this.getSpecifiedImage(v.attinfos[0], "cover")
                         v.url = this.getSpecifiedImage(v.attinfos[0], "hls")
                     } else {
-                        v.cover = this.getSpecifiedImage(v.attinfos[0])
+                        v.cover = this.getSpecifiedImage(v.attinfos[0], "compressed")
                     }
                     return v
                 })

+ 2 - 1
packageA/resourceLibrary/index.vue

@@ -136,7 +136,8 @@ export default {
             }
         },
         wapperClick(e) {
-            uni.navigateTo({ url: '/packageA/resourceLibrary/detail?id=' + e.sat_sharematerialid })
+            let url = e.ispicture ? '/packageA/resourceLibrary/picture?id=' : '/packageA/resourceLibrary/detail?id='
+            uni.navigateTo({ url: url + e.sat_sharematerialid })
         },
         openFiltrate() {
             this.$refs.Filtrate.changeShow();

+ 1 - 1
packageCase/imgs/detail.vue

@@ -89,7 +89,7 @@ export default {
                 this.detail = res.data;
                 this.slides = res.data.attinfos_pic.map(v => {
                     return {
-                        cover: this.getSpecifiedImage(v.attinfos[0]),
+                        cover: this.getSpecifiedImage(v.attinfos[0], 'compressed'),
                         url: v.attinfos[0].url
                     }
                 })

+ 1 - 1
packageCase/product/detail.vue

@@ -95,7 +95,7 @@ export default {
                 this.detail = res.data;
                 this.slides = res.data.attinfos_pic.map(v => {
                     return {
-                        cover: this.getSpecifiedImage(v.attinfos[0]),
+                        cover: this.getSpecifiedImage(v.attinfos[0], 'compressed'),
                         url: v.attinfos[0].url
                     }
                 })

+ 2 - 1
pages/index/cloud/dataBank.vue

@@ -55,7 +55,8 @@ export default {
                     resolve()
                     if (this.cutoff(res.msg)) return;
                     res.data = res.data.map(v => {
-                        v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => v.usetype == "avatar")) : uni.getStorageSync("site").logo || '';
+                        console.log("avatar", v.attinfos.find(s => s.usetype == "avatar"))
+                        v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "avatar")) : (uni.getStorageSync("site").logo || '');
                         return v
                     });
                     this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);

+ 1 - 1
pages/index/cloud/school.vue

@@ -57,7 +57,7 @@ export default {
                     resolve()
                     if (this.cutoff(res.msg)) return;
                     res.data = res.data.map(v => {
-                        v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => v.usetype == "avatar")) : uni.getStorageSync("site").logo || '';
+                        v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos.find(s => s.usetype == "avatar")) : uni.getStorageSync("site").logo || '';
                         return v
                     });
                     this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);