WIP MMCM
This commit is contained in:
29
src/App.vue
29
src/App.vue
@@ -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
@@ -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 |
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
@@ -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")
|
||||
},
|
||||
|
||||
@@ -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;;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 aujourd’hui en moins de 2 h.',
|
||||
long: '\n' +
|
||||
'En express\n' +
|
||||
'dès aujourd’hui en moins de 2 h.\n' +
|
||||
'La collecte de l’ordonnance 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 aujourd’hui en moins de 2 h.',
|
||||
long: '\n' +
|
||||
'En express\n' +
|
||||
'dès aujourd’hui en moins de 2 h.\n' +
|
||||
'La collecte de l’ordonnance 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",
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user