style step I

This commit is contained in:
ogerly 2021-02-26 11:53:19 +01:00
parent da1cb4e7b6
commit ceb4dda6fa
6 changed files with 103 additions and 52 deletions

View File

@ -22,7 +22,7 @@ export default {
this.$router.push('/KontoOverview') this.$router.push('/KontoOverview')
// } // }
}else { }else {
this.$router.push("/Landing") this.$router.push("/Login")
} }
//var user = { id:1, name:'Journal',session:'25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX' }; //var user = { id:1, name:'Journal',session:'25j_7Sl6xDq2Kc3ym0fmrSSk2xV2XkUkX' };

View File

@ -11,17 +11,21 @@ const routes = [
redirect: 'landing', redirect: 'landing',
component: AuthLayoutGDD, component: AuthLayoutGDD,
children: [ children: [
{
path: '/login',
name: 'login',
component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Login.vue')
},
{ {
path: '/Landing', path: '/Landing',
name: 'Landing', name: 'Landing',
component: () => import(/* webpackChunkName: "demo" */ '../views/Landing.vue') component: () => import(/* webpackChunkName: "demo" */ '../views/Landing.vue')
}, },
{ {
path: '/login', path: '/register',
name: 'login', name: 'register',
component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Login.vue') component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Register.vue')
}, },
] ]
}, },
{ {
@ -41,12 +45,7 @@ const routes = [
path: '/profile', path: '/profile',
name: 'profile', name: 'profile',
component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/UserProfile.vue') component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/UserProfile.vue')
}, }
{
path: '/register',
name: 'register',
component: () => import(/* webpackChunkName: "demo" */ '../views/Pages/Register.vue')
},
] ]
}, },
, ,

View File

@ -18,6 +18,14 @@ export const store = new Vuex.Store({
email:"", email:"",
sessionID: 0, sessionID: 0,
balance: 0 balance: 0
},
ajaxCreateData: {
session_id : '',
email: "max.musterman@gmail.de",
amount: 10000000,
target_date:"2021-02-19T13:25:36+00:00",
memo:"AGE",
auto_sign: true
} }
}, },
mutations: { mutations: {
@ -68,7 +76,7 @@ export const store = new Vuex.Store({
console.log("Im Store creatUser() axios then ", ldata); console.log("Im Store creatUser() axios then ", ldata);
// this.ldata = ldata.data; // this.ldata = ldata.data;
return true router.push('/Login')
}, (error) => { }, (error) => {
console.log(error); console.log(error);
@ -88,16 +96,25 @@ export const store = new Vuex.Store({
$cookies.set('gdd_is_auth','false'); $cookies.set('gdd_is_auth','false');
$cookies.remove('gdd_email'); $cookies.remove('gdd_email');
$cookies.remove('gdd_session_id'); $cookies.remove('gdd_session_id');
router.push('/Landing') router.push('/Login')
}, (error) => { }, (error) => {
console.log(error); console.log(error);
}); });
}, },
accountBalance0(state) { ajaxCreate(state){
console.log("accountBalance0 => START") state.ajaxCreateData.session_id = state.user.sessionID
axios.get("http://localhost/state-balances/ajaxGetBalance/739420303").then((req) => { console.log(" state.ajaxCreateData => ", state.ajaxCreateData)
console.log("accountBalance => ", req) axios.post(" http://localhost/transaction-creations/ajaxCreate/", state.ajaxCreateData).then((req) => {
console.log("ajaxCreate => ", req)
}, (error) => {
console.log(error);
});
},
ajaxListTransactions(state) {
console.log("ajaxListTransactions => START")
axios.get("http://localhost/state-balances/ajaxListTransactions/"+ state.user.sessionID).then((req) => {
console.log("ajaxListTransactions => ", req)
}, (error) => { }, (error) => {
console.log(error); console.log(error);
}); });

View File

@ -30,7 +30,8 @@
</div> </div>
</base-header> </base-header>
<div @click="$store.commit('accountBalance0')">this.$store.commit('accountBalance0')</div> <div @click="$store.commit('ajaxCreate')">this.$store.commit('ajaxCreate')</div>
<div @click="$store.commit('ajaxListTransactions')">this.$store.commit('ajaxListTransactions')</div>
<div @click="$store.commit('accountBalance')">this.$store.commit('accountBalance')</div> <div @click="$store.commit('accountBalance')">this.$store.commit('accountBalance')</div>
<hr> <hr>
<h3>User Balanace</h3> <h3>User Balanace</h3>

View File

@ -1,13 +1,23 @@
<template> <template>
<div> <div>
<!-- Header --> <!-- Header -->
<div class="header bg-gradient-success py-7 py-lg-8 pt-lg-9"> <div class="header bg-gradient-success py-7 py-lg-5 pt-lg-1">
<b-container class="container">
<div class="header-body text-center mb-7">
<b-row class="justify-content-center">
<b-col xl="5" lg="6" md="8" class="px-5">
<h1 class="text-white">Gradido Wallet</h1>
<p class="text-lead text-white">Du bist die Community</p>
</b-col>
</b-row>
</div>
</b-container>
<div class="separator separator-bottom separator-skew zindex-100"> <div class="separator separator-bottom separator-skew zindex-100">
<svg x="0" y="0" viewBox="0 0 2560 100" preserveAspectRatio="none" version="1.1" <svg x="0" y="0" viewBox="0 0 2560 100" preserveAspectRatio="none" version="1.1"
xmlns="http://www.w3.org/2000/svg"> xmlns="http://www.w3.org/2000/svg">
<polygon class="fill-default" points="2560 0 2560 100 0 100"></polygon> <polygon class="fill-default" points="2560 0 2560 100 0 100"></polygon>
</svg> </svg>
</div> </div>
</div> </div>
<!-- Page content --> <!-- Page content -->
@ -15,21 +25,12 @@
<b-row class="justify-content-center"> <b-row class="justify-content-center">
<b-col lg="5" md="7"> <b-col lg="5" md="7">
<b-card no-body class="bg-secondary border-0 mb-0"> <b-card no-body class="bg-secondary border-0 mb-0">
<b-card-header class="pb-1" >
<video width="450" height="300" autoplay loop>
<source src="/img/brand/cube.webm" type="video/webm">
Your browser does not support the video tag.
</video>
</b-card-header>
<b-card-body class="px-lg-5 py-lg-5"> <b-card-body class="px-lg-5 py-lg-5">
<div class="text-center text-muted mb-4"> <div class="text-center text-muted mb-4">
<h2>Login Gradido Wallet</h2> <small>login</small>
</div> </div>
<div class="text-center text-muted mb-4"> <validation-observer v-slot="{handleSubmit}" ref="formValidator">
<h4>Login Server 1</h4>
</div>
<!--<validation-observer v-slot="{handleSubmit}" ref="formValidator">
<b-form role="form" @submit.prevent="handleSubmit(onSubmit)"> <b-form role="form" @submit.prevent="handleSubmit(onSubmit)">
<base-input alternative <base-input alternative
class="mb-3" class="mb-3"
@ -55,7 +56,7 @@
<base-button type="primary" native-type="submit" class="my-4">Sign in</base-button> <base-button type="primary" native-type="submit" class="my-4">Sign in</base-button>
</div> </div>
</b-form> </b-form>
</validation-observer> --> </validation-observer>
</b-card-body> </b-card-body>
</b-card> </b-card>
<b-row class="mt-3"> <b-row class="mt-3">
@ -78,14 +79,23 @@
model: { model: {
email: '', email: '',
password: '', password: '',
rememberMe: false rememberMe: false,
rfname: '',
rlname: '',
remail: '',
rpwd: ''
} }
}; };
}, },
methods: { methods: {
onSubmit() { onSubmit() {
// this will be called only after form is valid. You can do api call here to login console.log("onSubmit() ")
console.log("this.email ",this.model.email)
console.log("this.password ",this.model.password)
//console.log("landingpage login() lemail ", this.lemail)
//console.log("landingpage login() lpwd ", this.lpwd)
this.$store.commit('login', {"email": this.model.email, "password": this.model.password})
}
} }
} }
};
</script> </script>

View File

@ -1,12 +1,12 @@
<template> <template>
<div> <div>
<!-- Header --> <!-- Header -->
<div class="header bg-gradient-success py-7 py-lg-8 pt-lg-9"> <div class="header bg-gradient-success py-7 py-lg-5 pt-lg-1">
<b-container class="container"> <b-container class="container">
<div class="header-body text-center mb-7"> <div class="header-body text-center mb-7">
<b-row class="justify-content-center"> <b-row class="justify-content-center">
<b-col xl="5" lg="6" md="8" class="px-5"> <b-col xl="5" lg="6" md="8" class="px-5">
<h1 class="text-white">Erstelle eine Gradido Wallet</h1> <h1 class="text-white">Erstelle deine Gradido Wallet</h1>
<p class="text-lead text-white">Werde teil der Community</p> <p class="text-lead text-white">Werde teil der Community</p>
</b-col> </b-col>
</b-row> </b-row>
@ -25,23 +25,28 @@
<b-row class="justify-content-center"> <b-row class="justify-content-center">
<b-col lg="6" md="8" > <b-col lg="6" md="8" >
<b-card no-body class="bg-secondary border-0"> <b-card no-body class="bg-secondary border-0">
<b-card-header class="bg-transparent pb-5">
<div class="text-muted text-center mt-2 mb-4"><small>Sign up with</small></div>
</b-card-header>
<b-card-body class="px-lg-5 py-lg-5"> <b-card-body class="px-lg-5 py-lg-5">
<div class="text-center text-muted mb-4"> <div class="text-center text-muted mb-4">
<small>Or sign up with credentials</small> <small>sign up </small>
</div> </div>
<validation-observer v-slot="{handleSubmit}" ref="formValidator"> <validation-observer v-slot="{handleSubmit}" ref="formValidator">
<b-form role="form" @submit.prevent="handleSubmit(onSubmit)"> <b-form role="form" @submit.prevent="handleSubmit(onSubmit)">
<base-input alternative <base-input alternative
class="mb-3" class="mb-3"
prepend-icon="ni ni-hat-3" prepend-icon="ni ni-hat-3"
placeholder="Name" placeholder="Vorname"
name="Name" name="Vorname"
:rules="{required: true}" :rules="{required: true}"
v-model="model.name"> v-model="model.firstname">
</base-input>
<base-input alternative
class="mb-3"
prepend-icon="ni ni-hat-3"
placeholder="Nachname"
name="Nachname"
:rules="{required: true}"
v-model="model.lastname">
</base-input> </base-input>
<base-input alternative <base-input alternative
@ -82,6 +87,17 @@
</b-card> </b-card>
</b-col> </b-col>
</b-row> </b-row>
<div class="text-center py-lg-5" >
<b-button type="button" variant="success" class="mt-4" to="/Login">zurück</b-button>
</div>
<div>
<b-button v-b-modal.modal-1 variant="primary">Launch demo modal</b-button>
<b-modal id="modal-1" title="New message to undefined">
<p class="my-4">...</p>
</b-modal>
</div>
</b-container> </b-container>
</div> </div>
</template> </template>
@ -92,7 +108,8 @@
data() { data() {
return { return {
model: { model: {
name: '', firstname: '',
lastname: '',
email: '', email: '',
password: '', password: '',
agree: false agree: false
@ -102,9 +119,16 @@
methods: { methods: {
onSubmit() { onSubmit() {
// this will be called only after form is valid. You can do an api call here to register users // this will be called only after form is valid. You can do an api call here to register users
}
}
console.log("onSubmit() ")
console.log("landingpage login() email ", this.model.email)
console.log("landingpage login() firstname ", this.model.firstname)
console.log("landingpage login() lastname ", this.model.lastname)
console.log("landingpage login() password ", this.model.password)
this.$store.commit('creatUser', {"email":this.model.email, "first_name":this.model.firstname, "last_name":this.model.lastname , "emailType": 2, "password":this.model.password})
}
}
}; };
</script> </script>
<style></style> <style></style>