Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="signupbutton">
- <button type = "button" class="button-style" @click="signupMethod">Sign Up</button>
- </div>
- signupMethod() {
- const signupObj = {
- username: this.enter_details.username,
- email: this.enter_details.email,
- contactNumber: this.enter_details.contactNumber,
- firstName: this.enter_details.firstName,
- lastName:this.enter_details.lastName,
- dob: this.enter_details.dob,
- password: this.enter_details.password,
- countryCode: this.active_language
- }
- this.$store.dispatch('signupUser' , signupObj).then(()=>{
- this.app.$router.push('/mistrecord')
- })
- },
- import vue from 'vue';
- import vuex from 'vuex';
- import axios from 'axios'
- import {User} from "../../../service/onBoarding";
- import {LocalData} from "../../../service/localData";
- // import router from "../../../router";
- vue.use(vuex);
- export default{
- signupUser ({commit}, signUpObj) {
- axios.post('https://dev-api.mysc.io/int/api/v1/user/signup', signUpObj)
- .then((response) => {
- console.log(response);
- commit('setAuthToken',response.data.result.authToken);
- // this.app.$router.push('/mistrecord')
- })
- .catch((error) => {
- console.log(error);
- })
- },
Add Comment
Please, Sign In to add comment