first commit
This commit is contained in:
parent
96b870951a
commit
eeca69ce6d
@ -77,15 +77,14 @@
|
||||
password: _ts.user.password
|
||||
}
|
||||
|
||||
_ts.axios.post('/console/login', _ts.qs.stringify(data)).then(function (res) {
|
||||
if (res) {
|
||||
if (res.message) {
|
||||
_ts.$message(res.message);
|
||||
_ts.$axios.$post('/api/v1/console/login', data).then(function (res) {
|
||||
if (res.data) {
|
||||
if (res.data.message) {
|
||||
_ts.$message(res.data.message);
|
||||
return false;
|
||||
}
|
||||
_ts.$store.commit('initLogin', res.user);
|
||||
_ts.$router.push({
|
||||
name: 'home'
|
||||
name: 'index'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -61,9 +61,11 @@
|
||||
return false
|
||||
}
|
||||
let data = {
|
||||
email: encodeURI(email)
|
||||
email: email
|
||||
}
|
||||
_ts.$axios.$post('/api/v1/console/get-email-code', data).then(response => {
|
||||
_ts.$axios.$get('/api/v1/console/get-email-code', {
|
||||
params: data
|
||||
}).then(response => {
|
||||
if (response.data) {
|
||||
_ts.$message(response.data.message)
|
||||
}
|
||||
@ -78,10 +80,10 @@
|
||||
password: _ts.user.password,
|
||||
code: _ts.user.code
|
||||
}
|
||||
_ts.$axios.$post('/console/register', _ts.qs.stringify(data)).then(function (res) {
|
||||
if (res) {
|
||||
_ts.$message(res.message);
|
||||
if (res.flag && res.flag === 1) {
|
||||
_ts.$axios.$post('/api/v1/console/register', data).then(function (res) {
|
||||
if (res.data) {
|
||||
_ts.$message(res.data.message);
|
||||
if (res.data.flag && res.data.flag === 1) {
|
||||
setTimeout(function () {
|
||||
_ts.$router.push(
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user