【问题标题】:Image not displayed on some devices (Using Quasar Framework)某些设备上不显示图像(使用 Quasar 框架)
【发布时间】:2019-06-27 12:20:35
【问题描述】:

我正在尝试显示发布到服务器的法师,但是在浏览器上显示的图像和我的 android 设备华为 P30 上的某些设备没有显示,当我将链接复制到浏览器时,图像是有效的。

这是我的代码

<q-img
  :src="blogPost.image_url"
  :srcset="blogPost.image_url"
>
  <template v-slot:loading>
     <div class="text-subtitle1 text-white">
          <q-spinner-ios color="primary" />
             <div class="q-mt-md">Loading...</div>
     </div>
  </template>  
  <template v-slot:error>
    <div class="absolute-full flex flex-center bg-negative text-white">
        cannot display image
    </div>
  </template>

当我在某些安卓手机上运行应用程序时,图像显示完美,但在我的手机上却没有。我尝试使用来自 html 的普通 img 标签仍然是同样的问题。

【问题讨论】:

    标签: android laravel vue.js quasar


    【解决方案1】:

    终于得到了答案,问题不在于cordova、Vuejs和Quasar,我发现有些设备有额外的安全层,只允许提供请求或渲染来自安全服务器的图像,所以我的问题是我通过 HTTP 而不是 HTTPS 返回图像 URL。

    【讨论】:

      猜你喜欢
      • 2016-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-24
      • 2013-02-14
      • 2019-10-29
      • 1970-01-01
      • 2020-01-03
      相关资源
      最近更新 更多