master
parent
abc3f0e394
commit
4621c3756d
|
@ -8,6 +8,7 @@ export {}
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ButtonRepo: typeof import('./src/components/ButtonRepo.vue')['default']
|
ButtonRepo: typeof import('./src/components/ButtonRepo.vue')['default']
|
||||||
|
Copy: typeof import('./src/components/Header - Copy.vue')['default']
|
||||||
Footer: typeof import('./src/components/Footer.vue')['default']
|
Footer: typeof import('./src/components/Footer.vue')['default']
|
||||||
Header: typeof import('./src/components/Header.vue')['default']
|
Header: typeof import('./src/components/Header.vue')['default']
|
||||||
'Header - Copy': typeof import('./src/components/Header - Copy.vue')['default']
|
'Header - Copy': typeof import('./src/components/Header - Copy.vue')['default']
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
<route lang="json">
|
|
||||||
{
|
|
||||||
"meta": {
|
|
||||||
"title": "Home"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</route>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
@ -15,7 +7,7 @@
|
||||||
<!-- <div v-if="loading" class="loading">Loading...</div> -->
|
<!-- <div v-if="loading" class="loading">Loading...</div> -->
|
||||||
<!-- <div v-if="error" class="error">{{ error }}</div> -->
|
<!-- <div v-if="error" class="error">{{ error }}</div> -->
|
||||||
|
|
||||||
<div v-if="ecomm55Banner.data" class="w-full" >
|
<div v-if="ecomm55Banner" class="w-full" >
|
||||||
<div v-for="(item, index) in ecomm55Banner.data" class=" pb-8">
|
<div v-for="(item, index) in ecomm55Banner.data" class=" pb-8">
|
||||||
<router-link :to="'/item/' + item.slug">
|
<router-link :to="'/item/' + item.slug">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
|
@ -24,7 +16,6 @@
|
||||||
<div class="flex justify-left" >
|
<div class="flex justify-left" >
|
||||||
<div class="place-self-center p-4 rounded-md" >
|
<div class="place-self-center p-4 rounded-md" >
|
||||||
<button class="rounded mx-auto uppercase text-xs text-white font-bold py-2 px-14 mb-4" style="background-color: aliceblue; color: rgb(32, 168, 126);"> {{item.name}} </button>
|
<button class="rounded mx-auto uppercase text-xs text-white font-bold py-2 px-14 mb-4" style="background-color: aliceblue; color: rgb(32, 168, 126);"> {{item.name}} </button>
|
||||||
<!-- <p class="text-2xl font-bold uppercase " style="color: black;">{{item.name}} </p> -->
|
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<button class="rounded mx-auto uppercase text-xs text-white font-bold py-2 px-14 " style="background-color: rgb(32, 168, 126);"> {{item.btn}} </button>
|
<button class="rounded mx-auto uppercase text-xs text-white font-bold py-2 px-14 " style="background-color: rgb(32, 168, 126);"> {{item.btn}} </button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,7 +30,7 @@
|
||||||
<h1 class="font-medium text-center leading-tight text-4xl p-4 text-black-600"> SHOP BY CATEGORY</h1>
|
<h1 class="font-medium text-center leading-tight text-4xl p-4 text-black-600"> SHOP BY CATEGORY</h1>
|
||||||
<hr class="">
|
<hr class="">
|
||||||
|
|
||||||
<div v-if="ecom55Cat.data" style="width: 100%; overflow:scroll;" >
|
<div v-if="ecom55Cat" style="width: 100%; overflow:scroll;" >
|
||||||
<table style="width: 140%; overflow:scroll;" >
|
<table style="width: 140%; overflow:scroll;" >
|
||||||
<tr>
|
<tr>
|
||||||
<td v-for="(item, index) in ecom55Cat.data" class="">
|
<td v-for="(item, index) in ecom55Cat.data" class="">
|
||||||
|
@ -61,7 +52,7 @@
|
||||||
|
|
||||||
<h1 class="font-medium text-center leading-tight text-4xl p-4 text-black-600">@amigo_official </h1>
|
<h1 class="font-medium text-center leading-tight text-4xl p-4 text-black-600">@amigo_official </h1>
|
||||||
<hr class="">
|
<hr class="">
|
||||||
<div v-if="ecom55Official.data" style="width: 100%; overflow:hidden;" >
|
<div v-if="ecom55Official" style="width: 100%; overflow:hidden;" >
|
||||||
<table style="width: 140%; overflow:scroll;" class=" animate-marquee" >
|
<table style="width: 140%; overflow:scroll;" class=" animate-marquee" >
|
||||||
<tr>
|
<tr>
|
||||||
<td v-for="(item, index) in ecom55Official.data" class="">
|
<td v-for="(item, index) in ecom55Official.data" class="">
|
||||||
|
@ -122,18 +113,18 @@
|
||||||
// // console.log(this.$route.params.id);
|
// // console.log(this.$route.params.id);
|
||||||
|
|
||||||
// },
|
// },
|
||||||
created() {
|
mounted() {
|
||||||
fetch("https://api8.siliconpin.com/items/ecomm55banner")
|
fetch("https://api8.siliconpin.com/items/ecomm55banner")
|
||||||
.then(async response => {
|
.then(async response => {
|
||||||
const data = await response.json();
|
const bannerData = await response.json();
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const error = (data && data.message) || response.statusText;
|
const error = (bannerData && bannerData.message) || response.statusText;
|
||||||
this.err=error
|
this.err=error
|
||||||
// return Promise.reject(error);
|
// return Promise.reject(error);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.ecomm55Banner=data
|
this.ecomm55Banner=bannerData
|
||||||
console.log(data)
|
console.log(bannerData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -141,15 +132,15 @@
|
||||||
});
|
});
|
||||||
fetch("https://api8.siliconpin.com/items/ecom55cat")
|
fetch("https://api8.siliconpin.com/items/ecom55cat")
|
||||||
.then(async response => {
|
.then(async response => {
|
||||||
const data = await response.json();
|
const catData = await response.json();
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const error = (data && data.message) || response.statusText;
|
const error = (catData && catData.message) || response.statusText;
|
||||||
this.err=error
|
this.err=error
|
||||||
// return Promise.reject(error);
|
// return Promise.reject(error);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.ecom55Cat=data
|
this.ecom55Cat=catData
|
||||||
// console.log(data)
|
// console.log(catData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -157,15 +148,15 @@
|
||||||
});
|
});
|
||||||
fetch("https://api8.siliconpin.com/items/ecom55official")
|
fetch("https://api8.siliconpin.com/items/ecom55official")
|
||||||
.then(async response => {
|
.then(async response => {
|
||||||
const data = await response.json();
|
const offiData = await response.json();
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const error = (data && data.message) || response.statusText;
|
const error = (offiData && offiData.message) || response.statusText;
|
||||||
this.err=error
|
this.err=error
|
||||||
// return Promise.reject(error);
|
// return Promise.reject(error);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.ecom55Official=data
|
this.ecom55Official=offiData
|
||||||
// console.log(data)
|
// console.log(offiData)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|
Loading…
Reference in New Issue