Blame view

src/components/LandingPage.vue 4.32 KB
8a0dd59d9   Digvijay Singh   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <template>
    <main class="landing-page">
      <div class="container-fluid main-wrp">
        <nav class="navbar navbar-expand-sm spotLight-nav">
          <a class="navbar-brand" href="#"
            ><img src="../assets/images/logo.png"
          /></a>
          <button
            class="navbar-toggler"
            type="button"
            data-toggle="collapse"
            data-target="#navbarsExample03"
            aria-controls="navbarsExample03"
            aria-expanded="false"
            aria-label="Toggle navigation"
          >
            <span class="navbar-toggler-icon"></span>
            <span class="navbar-toggler-icon"></span>
            <span class="navbar-toggler-icon"></span>
          </button>
  
          <div class="collapse navbar-collapse" id="navbarsExample03">
            <ul class="navbar-nav mr-auto">
              <li class="nav-item active">
640c12320   Digvijay Singh   update module added
25
                <a class="nav-link" href="#"></a>
8a0dd59d9   Digvijay Singh   first commit
26
27
              </li>
              <li class="nav-item">
640c12320   Digvijay Singh   update module added
28
                <a class="nav-link" href="#"></a>
8a0dd59d9   Digvijay Singh   first commit
29
30
              </li>
              <li class="nav-item">
640c12320   Digvijay Singh   update module added
31
                <a class="nav-link" href="#"></a>
8a0dd59d9   Digvijay Singh   first commit
32
33
34
              </li>
              <li class="nav-item spotLight-img">
                <a class="nav-link" href="#"
640c12320   Digvijay Singh   update module added
35
36
37
38
                  >
                  <!-- <img src="../assets/images/SPOTLight.svg"
                /> -->
                </a>
8a0dd59d9   Digvijay Singh   first commit
39
40
              </li>
              <li class="nav-item">
640c12320   Digvijay Singh   update module added
41
                <a class="nav-link" href="#"></a>
8a0dd59d9   Digvijay Singh   first commit
42
43
44
45
46
              </li>
            </ul>
          </div>
        </nav>
        <!-- menu wrapper -->
de0f96bc5   Gurvinder Singh   new files
47
           <div class="sign-wrp">
8a0dd59d9   Digvijay Singh   first commit
48
49
50
51
52
53
54
55
56
57
58
59
60
        <div class="row col-reverse">
          <div class="col-sm-3 col-md-1 col-lg-1 col-xl-3"></div>
          <!-- users land image -->
          <div class="col-sm-5 col-md-6 col-lg-7 col-xl-4 wc-spc-lf-tp">
            <h1 class="welcome-hd-back">
              Welcome <br />
              back
            </h1>
          </div>
          <!-- users land image -->
          <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4">
            <div class="form-layout signup-frm-spc">
              <form>
0ad3ed4de   Digvijay Singh   adin panel changes
61
                <h5> LogIn with email</h5>
8a0dd59d9   Digvijay Singh   first commit
62
63
64
65
66
67
68
                <div class="fill-form">
                  <label for="inputEmail" class="sr-only">Email address</label>
                  <input
                    type="email"
                    id="inputEmail"
                    class="form-control"
                    placeholder="Your Email ID"
5684145ce   Digvijay Singh   reset password,ot...
69
                    v-model="userData.email"
8a0dd59d9   Digvijay Singh   first commit
70
71
72
73
74
75
76
                  />
                  <label for="inputPassword" class="sr-only">Password</label>
                  <input
                    type="password"
                    id="inputPassword"
                    class="form-control"
                    placeholder="Password"
5684145ce   Digvijay Singh   reset password,ot...
77
                    v-model="userData.password"
8a0dd59d9   Digvijay Singh   first commit
78
                  />
5684145ce   Digvijay Singh   reset password,ot...
79
                  <a href="javascript:void(0);" class="btn btn-lg sb-button" type="submit" @click="loginWIthEmail">
8a0dd59d9   Digvijay Singh   first commit
80
                    <img src="../assets/images/key.svg" /> Log In to your account
5684145ce   Digvijay Singh   reset password,ot...
81
                  </a>
8a0dd59d9   Digvijay Singh   first commit
82
83
84
85
86
                </div>
              </form>
            </div>
          </div>
          <!-- sign up -->
de0f96bc5   Gurvinder Singh   new files
87
        </div>  </div>
8a0dd59d9   Digvijay Singh   first commit
88
89
90
91
92
93
94
95
96
97
        <!-- body wrapper -->
      </div>
    </main>
  </template>
  
  <script>
  
  import Vue from "vue";
  import router from "../router";
  import $ from "jquery";
5684145ce   Digvijay Singh   reset password,ot...
98
  import axios from "axios";
8a0dd59d9   Digvijay Singh   first commit
99
100
101
102
103
104
105
  
  export default {
    name: "LandingPage",
  
    data() {
      return {
        loggedinFlag: false,
5684145ce   Digvijay Singh   reset password,ot...
106
        userData:{},
8a0dd59d9   Digvijay Singh   first commit
107
108
      };
    },
298fff252   Digvijay Singh   new design added
109
     mounted() {
298fff252   Digvijay Singh   new design added
110
      localStorage.removeItem("spotlight_usertoken");
5684145ce   Digvijay Singh   reset password,ot...
111
      localStorage.removeItem("spotlight_email");
298fff252   Digvijay Singh   new design added
112
    },
8a0dd59d9   Digvijay Singh   first commit
113
    methods: {
5684145ce   Digvijay Singh   reset password,ot...
114
115
       loginWIthEmail(){
           axios
0ad3ed4de   Digvijay Singh   adin panel changes
116
          .post("/superAdmin/login", this.userData)
5684145ce   Digvijay Singh   reset password,ot...
117
118
119
120
121
          .then((response) => {
             console.log("login- response",response)
             this.$toaster.success(response.data.message)
              if(response.data.status == 'success'){
                  localStorage.setItem('spotlight_usertoken', JSON.stringify(response.data.data))
640c12320   Digvijay Singh   update module added
122
                  this.$router.push("/casestudy");
5684145ce   Digvijay Singh   reset password,ot...
123
124
125
126
127
128
129
130
131
132
133
134
              }
          })
          .catch( (error) =>{
            if (error.response) {
              this.$toaster.error(error.response.data.message)
              if(error.response.data.message == 'Email Not Verified'){
                 localStorage.setItem('spotlight_email', this.userData.email);
                  this.$router.push({ name: 'Otp', params: { flag: true }});
              }
            }
          });
      }
8a0dd59d9   Digvijay Singh   first commit
135
136
137
    },
  };
  </script>
d974d3228   Digvijay Singh   changes
138
139
140
141
142
143
144
  <style>
  .light-font-weight {
    font-weight: 400 !important;
  }
  
  
  </style>