zhangzengfei
2022-08-22 f14f98a263141d2f8ec0079866a758cc7a1c38d1
src/views/index/components/productLeft.vue
@@ -2,7 +2,7 @@
  <div
    class="productLeft"
    :style="{
      background: ` url(${data.pic})`,
      background: ` url(${pic})`,
      backgroundSize: '100% 100%',
      backgroundRepeat: 'no-repeat',
    }"
@@ -28,6 +28,19 @@
      type: Object,
    },
  },
  created() {
    var reg = /^[0-9]/;
    if (reg.test(this.data.pic)) {
      this.pic = "/httpImage/" + this.data.pic;
    } else {
      this.pic = this.data.pic;
    }
  },
  data() {
    return {
      pic: "",
    };
  },
};
</script>