hacer que se vean las imagenes desde google drive #5

Merged
pablone merged 2 commits from develop into master 2024-01-22 06:52:58 +00:00
2 changed files with 6 additions and 5 deletions

View File

@ -13,7 +13,7 @@ class ProductController {
name: item.name,
description: item.description,
type: item.type,
price: item.size,
price: item.price,
specialPrice: item.specialPrice,
isNew: item.isNew,
slug: item.slug,

View File

@ -53,7 +53,8 @@ export default defineComponent({
setup({ price, discount }) {
const isLoaded = ref(false);
const percent = +discount / 100;
const priceWithoutLetter = ~~price.replaceAll("€", "");
//const priceWithoutLetter = ~~price.replaceAll("", "");
const priceWithoutLetter = price;
const finalValue = ~~(priceWithoutLetter - priceWithoutLetter * percent);
const onLoad = () => {
@ -81,7 +82,7 @@ export default defineComponent({
<img
class="card-img"
:class="[imgClass]"
:src="imgSrc ? imgSrc : '../../assets/empty-img.jpg'"
:src="imgSrc ? imgSrc.replace('https://drive.google.com/file/d/', 'https://drive.google.com/thumbnail?id=').replace('/view?usp=drive_link', '') : '../../assets/empty-img.jpg'"
:alt="alt"
:key="imgSrc"
@load="onLoad"
@ -104,8 +105,8 @@ export default defineComponent({
<div class="card-values">
<p class="price" v-if="finalValue">{{ finalValue }}</p>
<p class="price offer tachado" v-if="priceWithoutLetter !== finalValue">
{{ priceWithoutLetter }}
<p class="price offer tachado" v-if="price !== finalValue">
{{ price }}
</p>
</div>
</div>