This commit is contained in:
Jonathan Chevalier
2022-10-06 13:40:20 +02:00
parent c219e317b1
commit 206f766c69
14 changed files with 53 additions and 2253 deletions

View File

@@ -6,37 +6,10 @@ import Wizard from "./components/Wizard.vue";
</script>
<template>
<div class="app_vue_mmcm">
<main id="product">
<wizard v-if="$route.path !== '/'"></wizard>
<router-view></router-view>
</main>
</div>
</template>
<style lang="scss">
<style scoped>
@import 'https://fonts.googleapis.com/css?family=Montserrat';
.app_vue_mmcm{
font-family: 'Montserrat',sans-serif;
}
.step_title{
text-align: left;
font-size: 1.125rem;
font-weight: 700;
color: #000;
font-family: 'Montserrat',sans-serif;
margin-bottom: 30px
}
.step_title:after {
width: 85px;
height: 3px;
background-color: #f91ea9;
content: "";
display: block;
margin: 10px 0 0;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

Before

Width:  |  Height:  |  Size: 496 B

View File

@@ -19,7 +19,7 @@ export default {
setup() {
const stepList = [
{
class: 'fa-regular fa-location-dot fa-fw',
class: 'fa-solid fa-location-dot fa-fw',
name: 'Mon adresse',
path: '/address-check',
stepNumber: 1

View File

@@ -1,10 +1,12 @@
import { createApp } from 'vue'
import './style.css'
import './assets/common_css.css'
import './assets/bootstrap-para.css'
import fontawesome from '@fortawesome/fontawesome-free/css/fontawesome.css'
import brands from '@fortawesome/fontawesome-free/css/brands.css'
import solid from '@fortawesome/fontawesome-free/css/solid.css'
import regular from '@fortawesome/fontawesome-free/css/regular.css'
import App from './App.vue'
import router from "./router/index"

View File

@@ -41,7 +41,7 @@ const routes = [
]
const router = createRouter({
history: createWebHistory('/Mon-ordonnance-livree-a-domicile/p/4/11046/103652/'),
history: createWebHistory('/Mon-ordonnance-livree-a-domicile/p/3/11178/0/'),
routes,
})

View File

@@ -11,7 +11,7 @@ export const useMMCMStore = defineStore('counter', {
dateDelivery: null
}),
getters: {
fullAddress: (state) => state.street + ' ' + state.zipCode + '' + state.city,
fullAddress: (state) => state.street + ' ' + state.zipCode + ' ' + state.city,
deliveryMethod: (state) => state.productList.filter(p => p.id === state.idProduct)[0].name,
dateDeliveryString: (state) => new Date(state.dateDelivery).toLocaleDateString("fr-FR")
},

View File

@@ -2,10 +2,30 @@
/*@tailwind components;*/
/*@tailwind utilities;*/
@import 'https://fonts.googleapis.com/css?family=Montserrat';
.step_title{
text-align: left;
font-size: 1.125rem;
font-weight: 700;
color: #000;
font-family: 'Montserrat',sans-serif;
margin-bottom: 30px
}
.step_title:after {
width: 85px;
height: 3px;
background-color: #f91ea9;
content: "";
display: block;
margin: 10px 0 0;
}
#app {
max-width: 1280px;
margin: 0 auto;
margin: 1rem auto;
padding: 2rem;
text-align: center;
font-family: 'Montserrat',sans-serif;
background-color: #fff;;
}

View File

@@ -4,7 +4,7 @@
<div class="input-group mb-3">
<div class="input-group-text">
<i v-if="isSearching" class="fa-solid fa-circle-notch fa-spin fa-fw color-success"></i>
<i v-else class="fa-regular fa-location-dot fa-fw color-success"></i>
<i v-else class="fa-solid fa-location-dot fa-fw color-success"></i>
</div>
<input type="text" placeholder="Exemple : 2 rue de la Libération 78120 Rambouillet" class="form-control"
v-model="query"

View File

@@ -3,11 +3,10 @@
<div class="row">
<div class="col-lg-6" v-for="(product, i) in store.productList">
<div class="card">
<div class="card-header fw-bold">{{ product.name }}</div>
<div class="card-header fw-bold"><img :alt="product.name" :src="product.media_list[0].filename" class="me-2" height="50"/> {{ product.name }}</div>
<div class="card-body">
<p>{{ text[i].short }}</p>
<p>{{ text[i].long }}</p>
<button class="btn btn-primary" @click="goNexStep(product.id)">{{ formatPrice(product.price) }} TTC</button>
<div v-html="(store.withPrescription ? product.description1 : product.description2)"></div>
<button class="btn btn-primary" @click="goNexStep(product.id)">{{ formatPrice(store.withPrescription ? product.price : product.price2) }} TTC</button>
</div>
</div>
</div>
@@ -19,30 +18,11 @@ import {useMMCMStore} from '../stores/mmcm.js'
export default {
setup() {
const text = [{
short: 'Dès aujourdhui en moins de 2 h.',
long: '\n' +
'En express\n' +
'dès aujourdhui en moins de 2 h.\n' +
'La collecte de lordonnance originale et des documents de santé dans une enveloppe fermée et la livraison des médicaments sont réalisées en moins de 2 heures, du lundi au samedi.'
},
{
short: 'Dès aujourdhui en moins de 2 h.',
long: '\n' +
'En express\n' +
'dès aujourdhui en moins de 2 h.\n' +
'La collecte de lordonnance originale et des documents de santé dans une enveloppe fermée et la livraison des médicaments sont réalisées en moins de 2 heures, du lundi au samedi.'
}
]
const store = useMMCMStore()
console.log(store.productList)
return {
store,
text
store
}
},
name: "delivery-option-step-2",

View File

@@ -36,15 +36,16 @@ export default {
addToCart: async function (idProduct) {
this.suspens = true
const urlApi = '/php/api/v3/mmcm.php?EXEC=addToCart&ID_PRODUCT=' + this.store.idProduct
+ '&with_prescription=' + this.store.widthPrescription
+ '&with_prescription=' + this.store.withPrescription
+ '&date_delivery=' + this.store.dateDelivery
//+ '&ID_SESSION=0CuKKzvR'
;
const result = await fetch(urlApi)
.then(response => {
if (response.ok) {
this.suspens = false
this.$router.push({path : '/final-step'})
this.$router.push({path: '/final-step'})
return response.json();
}
})

View File

@@ -1,9 +1,9 @@
<template>
<h2 class="mb-4">Votre ordonnance livré à domicile a été ajoutée au panier</h2>
<button class="btn btn-secondary me-4" @click="exitVueApp('/')">Continuer mes achats</button>
<button class="btn btn-primary" @click="exitVueApp('/cart/p/AFF_COMM/0/0/')">Finaliser ma commande</button>
<div class="text-center">
<h2 class="mb-4">Votre ordonnance livré à domicile a été ajoutée au panier</h2>
<button class="btn btn-secondary me-4" @click="exitVueApp('/')">Continuer mes achats</button>
<button class="btn btn-primary" @click="exitVueApp('/cart/p/AFF_COMM/0/0/')">Finaliser ma commande</button>
</div>
</template>
<script>

View File

@@ -1,12 +1,12 @@
<template>
<h1 class="product_name_area primary_color">
Vous ne pouvez pas vous déplacer à votre pharmacie habituelle ?
Faites livrer vos médicaments à votre domicile !
</h1>
<h1>
Vous ne pouvez pas vous déplacer à votre pharmacie habituelle ?
Faites livrer vos médicaments à votre domicile !
</h1>
<div class="mb-3">
Livraison par La Poste en express en moins de 2 heures par coursier <br />
Livraison par La Poste en express en moins de 2 heures par coursier <br/>
ou le surlendemain par facteur dans les zones éligibles.
</div>

View File

@@ -9,6 +9,10 @@ export default defineConfig({
'/php': {
target: 'https://para-php7-dev.parapharmacie-et-medicament.com/',
changeOrigin: true,
},
'/client': {
target: 'https://para-php7-dev.parapharmacie-et-medicament.com/',
changeOrigin: true,
}
}
},