Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
6 years ago
Commit
0d1c296c8aaf37eb2f1eb2e1a45419e3be7c1391
1 parent
12064874
add login
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
20 deletions
apps/pages/single/license/form/form.vue
apps/pages/single/license/license.vue
apps/pages/single/license/status/status.vue
apps/store/license/form/actions.js
apps/store/license/form/index.js
apps/store/license/form/mutations.js
apps/pages/single/license/form/form.vue
View file @
0d1c296
...
...
@@ -130,6 +130,11 @@ export default {
},
methods: {
async onSubmit() {
if (!this.$yoho.isLogin()) {
this.$yoho.goLogin();
return;
}
if (this.validate()) {
this.toast = this.$createToast({
type: 'loading',
...
...
@@ -144,7 +149,7 @@ export default {
this.toast && this.toast.hide();
if (result && result.code === 200) {
this.$store.commit('license/form/FETCH_UFO_STATUS_SUCCESS',
0
);
this.$store.commit('license/form/FETCH_UFO_STATUS_SUCCESS',
{status: 0}
);
} else {
this.$createToast({
type: 'error',
...
...
apps/pages/single/license/license.vue
View file @
0d1c296
...
...
@@ -36,9 +36,9 @@ export default {
},
mounted() {
if (this.needLogin) {
setTimeout
(() => {
this.$yoho.ready
(() => {
this.$yoho.goLogin({});
}
, 1000
);
});
}
}
};
...
...
apps/pages/single/license/status/status.vue
View file @
0d1c296
...
...
@@ -24,7 +24,7 @@
<div class="image fail"></div>
<div class="pane-body">
<h1>审核不通过</h1>
<p class="desc">
您提交的姓名和身份证不匹配。
</p>
<p class="desc">
{{message}}
</p>
</div>
<div class="footer" @click="onRepeatClick">重新提交</div>
...
...
@@ -58,7 +58,7 @@ export default {
return {};
},
computed: {
...mapState(['status'])
...mapState(['status'
, 'message'
])
},
methods: {
...mapActions(['getStoreStatus']),
...
...
@@ -66,7 +66,7 @@ export default {
this.$yoho.finishPage({});
},
onRepeatClick() {
this.$store.commit('license/form/FETCH_UFO_STATUS_SUCCESS',
-1
);
this.$store.commit('license/form/FETCH_UFO_STATUS_SUCCESS',
{status: -1}
);
},
async onCashClick() {
const result = await this.getStoreStatus();
...
...
apps/store/license/form/actions.js
View file @
0d1c296
...
...
@@ -30,17 +30,10 @@ export default {
},
async
saveLicense
({
commit
},
data
)
{
let
result
=
{};
try
{
result
=
await
this
.
$api
.
post
(
'/api/ufo/license/save'
,
_handleData
(
data
)
);
}
catch
(
e
)
{
commit
(
Types
.
FETCH_UFO_NEED_LOGIN
,
true
);
return
result
;
}
const
result
=
await
this
.
$api
.
post
(
'/api/ufo/license/save'
,
_handleData
(
data
)
);
return
result
;
},
...
...
@@ -58,7 +51,7 @@ export default {
}
if
(
result
.
code
===
200
)
{
commit
(
Types
.
FETCH_UFO_STATUS_SUCCESS
,
result
.
data
);
commit
(
Types
.
FETCH_UFO_STATUS_SUCCESS
,
{
status
:
result
.
data
,
message
:
result
.
message
}
);
}
else
{
commit
(
Types
.
FETCH_UFO_STATUS_SUCCESS
,
-
1
);
}
...
...
apps/store/license/form/index.js
View file @
0d1c296
...
...
@@ -8,6 +8,7 @@ export default function() {
fetching
:
false
,
token
:
false
,
status
:
-
1
,
message
:
''
,
needLogin
:
false
},
actions
,
...
...
apps/store/license/form/mutations.js
View file @
0d1c296
...
...
@@ -5,8 +5,9 @@ export default {
state
.
token
=
token
;
},
[
Types
.
FETCH_UFO_STATUS_SUCCESS
](
state
,
data
)
{
state
.
status
=
data
;
[
Types
.
FETCH_UFO_STATUS_SUCCESS
](
state
,
{
status
,
message
})
{
state
.
status
=
status
;
state
.
message
=
message
;
},
[
Types
.
FETCH_UFO_NEED_LOGIN
](
state
,
data
)
{
...
...
Please
register
or
login
to post a comment