%PDF- %PDF-
Direktori : /home/ugotscom/public_html/maputilities/ |
Current File : /home/ugotscom/public_html/maputilities/tool2.php |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <title>Maputilities</title> <meta content="" name="descriptison"> <meta content="" name="keywords"> <!-- Favicons --> <link href="assets/img/favicon.png" rel="icon"> <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon"> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet"> <!-- Vendor CSS Files --> <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/vendor/icofont/icofont.min.css" rel="stylesheet"> <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet"> <link href="assets/vendor/venobox/venobox.css" rel="stylesheet"> <link href="assets/vendor/animate.css/animate.min.css" rel="stylesheet"> <link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet"> <link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet"> <link href="assets/vendor/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet"> <!-- Template Main CSS File --> <link href="assets/css/style.css" rel="stylesheet"> <!-- ======================================================= * Template Name: Medilab - v2.0.0 * Template URL: https://bootstrapmade.com/medilab-free-medical-bootstrap-theme/ * Author: BootstrapMade.com * License: https://bootstrapmade.com/license/ ======================================================== --> <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> </head> <body> <?php include('header.php');?> <div class="container"> <form action="" id="app"> <section v-if="step==1"> <h3>Get your Quote</h3> <p>We'll use your address to find the best deals in your area.</p> <label for="postcode">Post Code</label> <input type="text" class="form-control" v-model="form.postcode"> <label for="Address">Address</label> <select v-model="form.address" class="form-control" :value="getAddress"> <option v-for="user in users" v-bind:value="user.address"> {{ user.address }} </option> </select> <label for="Email">Email</label> <input type="text" class="form-control" v-model="form.email"> <input type="checkbox" name="terms" > I Agree Terms & Coditions </section> <section v-if="step==2"> <h3>step 2</h3> <label for="energy">How much energy you use</label> <input type="text" class="form-control" v-model="form.energy"> <div class="d-flex" v-for="quote in quotes.tariffs"> <div class="p-2 flex-fill"><img :src=quote.supplierLogoUrl class="supplier-logo"></div> <div class="p-2 flex-fill">{{quote.tariffName}}</div> <div class="p-2 flex-fill">{{quote.supplierName}}</div> <div class="p-2 flex-fill">{{quote.annualCost}}</div> <div class="p-2 flex-fill"><button>click Info</button></div> </div> <div class="container"> <div class="row"> <div class="col">1</div> <div class="col">2</div> <div class="col">3</div> <div class="col">4</div> <div class="col">5</div> </div> </div> </section> <section v-if="step==3"> <h3>step 3</h3> </section> <button v-if="step != 1" @click.prevent="prevStep">Previous Step</button> <button v-if="step != totalsteps" @click.prevent="nextStep">Next Step</button> <button v-if="step == 3" @click.prevent="sendEnquiry">Send Enquiry</button> </form> </div> <?php include ('footer.php'); ?> <div id="preloader"></div> <a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a> <!-- Vendor JS Files --> <script src="assets/vendor/jquery/jquery.min.js"></script> <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Template Main JS File --> <script src="assets/js/main.js"></script> <script> const App =new Vue({ el:"#app", data: { step:1, totalsteps:3, form:{ postcode:null, email:null, energy:null, address:null, }, selected:null, users:[], quotes:[], }, methods:{ nextStep:function(){ this.step++; if(this.step == 2){ this.form.energy=580; axios.post('https://api-staging.switchcraft.co.uk/api/v1/energy/quote', { hasUserAcceptedTermsAndConditions:true, address:{ postcode:"pr18pj", addressLine1:"Nite Booze, 2 Christ Church Street " }, currentElecSpendPerMonth:33, }, { headers: { 'Authorization': 'znergi-test-key' } }).then(response => { this.quotes = response.data }) } }, prevStep:function(){ this.step--; }, sendEnquiry:function(){ alert('dfgdgd'); }, }, computed: { getAddress: function() { axios.get('http://localhost/maputilities/api.php?id='+this.form.postcode) .then(response => { this.users = response.data }) } }, }); </script> </body> </html>