status.vue
3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<template>
<div class="wrapper">
<template v-if="status == 0">
<div class="image waiting"></div>
<div class="pane-body">
<h1>审核中</h1>
<p class="desc">您的资料已提交审核,认证成功后我们将会第一时间通知您。</p>
</div>
<div class="footer" @click="onFinishClick">返回</div>
</template>
<template v-else-if="status == 1">
<div class="pane-body">
<div class="image success"></div>
<h1>审核通过</h1>
<p class="desc">您的资料已审核通过,现您可以商家入驻。</p>
</div>
<div class="footer" @click="onCashClick">商家入驻</div>
</template>
<template v-else-if="status == 2">
<div class="image fail"></div>
<div class="pane-body">
<h1>审核不通过</h1>
<p class="desc">{{message}}</p>
</div>
<div class="footer" @click="onRepeatClick">重新提交</div>
</template>
<template v-else>
<div class="image waiting"></div>
<div class="pane-body">
<h1>未提交</h1>
<p class="desc">您的资料尚未提交审核。</p>
</div>
<div class="footer" @click="onFinishClick">返回</div>
</template>
</div>
</template>
<script>
import LayoutApp from '../../components/layout/layout-app';
import FixedBottom from '../components/fixed-bottom';
import { createNamespacedHelpers } from 'vuex';
const { mapState, mapActions, mapMutations } = createNamespacedHelpers(
'license/form'
);
export default {
props: {},
data() {
return {};
},
computed: {
...mapState(['status', 'message'])
},
methods: {
...mapActions(['getStoreStatus']),
onFinishClick() {
this.$yoho.finishPage({});
},
onRepeatClick() {
this.$store.commit('license/form/FETCH_UFO_STATUS_SUCCESS', {status: -1});
},
async onCashClick() {
const result = await this.getStoreStatus();
if (result.data === true || result.data.isStoredSeller) {
this.$yoho.goPage('go.ufo', {
pagename: 'merchantsSettled',
isnavhidden: 1,
});
} else if (result.data.storedBefore) {
this.$createToast({
txt: '您已退出入驻,没有入驻资格',
type: 'warn',
}).show();
} else {
this.$yoho.goPage('go.ufo', { pagename: 'MerchantEntry' });
}
}
},
components: {
LayoutApp,
FixedBottom
}
};
</script>
<style lang="scss" scoped>
h1 {
font-size: 40px;
margin: 20px 0;
}
.footer {
position: absolute;
bottom: 40%;
width: 600px;
height: 100px;
color: white;
text-align: center;
line-height: 100px;
font-size: 32px;
background-color: #002b47;
}
.pane-body {
height: 100%;
overflow: scroll;
text-align: center;
}
.image {
width: 120px;
height: 120px;
margin: 40px auto;
&.success {
background-image: url("~statics/image/auth/success.png");
background-size: 100% 100%;
}
&.waiting {
background-image: url("~statics/image/auth/waiting.png");
background-size: 100% 100%;
}
&.fail {
background-image: url("~statics/image/auth/fail.png");
background-size: 100% 100%;
}
}
.desc {
font-size: 28px;
line-height: 1.5;
}
.wrapper {
padding: 100px 76px 0;
text-align: center;
}
</style>