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, name: item.name,
description: item.description, description: item.description,
type: item.type, type: item.type,
price: item.size, price: item.price,
specialPrice: item.specialPrice, specialPrice: item.specialPrice,
isNew: item.isNew, isNew: item.isNew,
slug: item.slug, slug: item.slug,

View File

@ -53,7 +53,8 @@ export default defineComponent({
setup({ price, discount }) { setup({ price, discount }) {
const isLoaded = ref(false); const isLoaded = ref(false);
const percent = +discount / 100; const percent = +discount / 100;
const priceWithoutLetter = ~~price.replaceAll("€", ""); //const priceWithoutLetter = ~~price.replaceAll("", "");
const priceWithoutLetter = price;
const finalValue = ~~(priceWithoutLetter - priceWithoutLetter * percent); const finalValue = ~~(priceWithoutLetter - priceWithoutLetter * percent);
const onLoad = () => { const onLoad = () => {
@ -81,7 +82,7 @@ export default defineComponent({
<img <img
class="card-img" class="card-img"
:class="[imgClass]" :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" :alt="alt"
:key="imgSrc" :key="imgSrc"
@load="onLoad" @load="onLoad"
@ -104,8 +105,8 @@ export default defineComponent({
<div class="card-values"> <div class="card-values">
<p class="price" v-if="finalValue">{{ finalValue }}</p> <p class="price" v-if="finalValue">{{ finalValue }}</p>
<p class="price offer tachado" v-if="priceWithoutLetter !== finalValue"> <p class="price offer tachado" v-if="price !== finalValue">
{{ priceWithoutLetter }} {{ price }}
</p> </p>
</div> </div>
</div> </div>