|
|
@@ -81,24 +81,46 @@
|
|
81
|
81
|
<span v-else>登 录 中...</span>
|
|
82
|
82
|
</el-button>
|
|
83
|
83
|
<div style="float: right" v-if="register">
|
|
84
|
|
- <router-link class="link-type" :to="'/register'">立即注册</router-link>
|
|
85
|
|
- <!-- <el-button type="text" @click="registrationLink('/register')"
|
|
86
|
|
- >立即注册</el-button> -->
|
|
|
84
|
+ <!-- <router-link class="link-type" :to="'/register'">立即注册</router-link> -->
|
|
|
85
|
+ <el-button
|
|
|
86
|
+ type="text"
|
|
|
87
|
+ v-if="buttonReg"
|
|
|
88
|
+ @click="registrationLink('/register')"
|
|
|
89
|
+ >立即注册</el-button
|
|
|
90
|
+ >
|
|
87
|
91
|
</div>
|
|
88
|
|
- <div class="registerImg" v-if="closeImgs">
|
|
|
92
|
+ <div class="registerImg" v-show="closeImgs">
|
|
89
|
93
|
<div class="closeImg" @click="closeImg">
|
|
90
|
94
|
<img
|
|
91
|
95
|
style="width: 25px; height: 25px"
|
|
92
|
96
|
src="../assets/images/closed.png"
|
|
93
|
97
|
alt=""
|
|
94
|
98
|
/>
|
|
|
99
|
+ <span style="padding-left: 100px">扫码人脸核验</span>
|
|
95
|
100
|
</div>
|
|
96
|
|
- <div id="qrcodeImg"></div>
|
|
|
101
|
+ <div id="qrcodeImg" style="padding-left: 76px"></div>
|
|
97
|
102
|
</div>
|
|
98
|
103
|
</el-form-item>
|
|
99
|
104
|
</el-form>
|
|
100
|
105
|
</div>
|
|
101
|
|
-
|
|
|
106
|
+ <!-- 注册时选择是否 -->
|
|
|
107
|
+ <div>
|
|
|
108
|
+ <el-dialog
|
|
|
109
|
+ title="是否需要人脸核实"
|
|
|
110
|
+ :visible.sync="centerDialogVisible"
|
|
|
111
|
+ width="30%"
|
|
|
112
|
+ center
|
|
|
113
|
+ >
|
|
|
114
|
+ <span slot="footer" class="dialog-footer">
|
|
|
115
|
+ <el-button @click="facialVerification('/register')" type="primary"
|
|
|
116
|
+ >是</el-button
|
|
|
117
|
+ >
|
|
|
118
|
+ <el-button @click="noFacialVerification('/register')" type="primary"
|
|
|
119
|
+ >否</el-button
|
|
|
120
|
+ >
|
|
|
121
|
+ </span>
|
|
|
122
|
+ </el-dialog>
|
|
|
123
|
+ </div>
|
|
102
|
124
|
<!-- 底部 -->
|
|
103
|
125
|
<div class="el-login-footer">
|
|
104
|
126
|
<div>Copyright © 2023 乙巢(上海)企业管理服务有限公司.</div>
|
|
|
@@ -123,8 +145,11 @@ export default {
|
|
123
|
145
|
return {
|
|
124
|
146
|
codeUrl: "",
|
|
125
|
147
|
closeImgs: false,
|
|
|
148
|
+ centerDialogVisible: false,
|
|
|
149
|
+ buttonReg: true,
|
|
|
150
|
+ eidTokens: {},
|
|
126
|
151
|
timer: null,
|
|
127
|
|
- pathVal:"",
|
|
|
152
|
+ pathVal: "",
|
|
128
|
153
|
loginForm: {
|
|
129
|
154
|
username: "admin",
|
|
130
|
155
|
password: "admin123",
|
|
|
@@ -214,36 +239,56 @@ export default {
|
|
214
|
239
|
}
|
|
215
|
240
|
});
|
|
216
|
241
|
},
|
|
|
242
|
+ // 生成二维码
|
|
|
243
|
+ qrcode(url) {
|
|
|
244
|
+ // 前端根据 URL 生成微信支付二维码
|
|
|
245
|
+ document.getElementById("qrcodeImg").innerHTML = "";
|
|
|
246
|
+ return new QRCode("qrcodeImg", {
|
|
|
247
|
+ width: 200,
|
|
|
248
|
+ height: 200,
|
|
|
249
|
+ text: url,
|
|
|
250
|
+ colorDark: "#000",
|
|
|
251
|
+ colorLight: "#fff",
|
|
|
252
|
+ });
|
|
|
253
|
+ },
|
|
217
|
254
|
registrationLink(path) {
|
|
|
255
|
+ this.centerDialogVisible = true;
|
|
|
256
|
+ },
|
|
|
257
|
+ // 是人脸核实
|
|
|
258
|
+ facialVerification(path) {
|
|
|
259
|
+ this.centerDialogVisible = false;
|
|
218
|
260
|
this.pathVal = path;
|
|
219
|
|
- clearInterval(this.timer);
|
|
|
261
|
+ // clearInterval(this.timer);
|
|
220
|
262
|
selectIdentityAuthenticaEIDtoken().then((res) => {
|
|
221
|
|
- // this.timer = setInterval(() => {
|
|
222
|
|
- // this.getSelectPCEIDtokenStatus(res.data.eidToken);
|
|
223
|
|
- // }, 1000);
|
|
224
|
263
|
this.closeImgs = true;
|
|
225
|
|
- let url = res.data.eidToken;
|
|
226
|
|
- document.getElementById("qrcodeImg").innerHTML = "";
|
|
227
|
|
- return new QRCode("qrcodeImg", {
|
|
228
|
|
- width: 200,
|
|
229
|
|
- height: 200,
|
|
230
|
|
- text: url,
|
|
231
|
|
- colorDark: "#000",
|
|
232
|
|
- colorLight: "#fff",
|
|
233
|
|
- });
|
|
|
264
|
+ this.buttonReg = false;
|
|
|
265
|
+ let url = res.data.Url;
|
|
|
266
|
+ this.eidTokens = {
|
|
|
267
|
+ eidToken: res.data.EidToken,
|
|
|
268
|
+ };
|
|
|
269
|
+ this.timer = setInterval(() => {
|
|
|
270
|
+ this.getSelectPCEIDtokenStatus(this.eidTokens);
|
|
|
271
|
+ }, 10000);
|
|
|
272
|
+ this.qrcode(url);
|
|
234
|
273
|
});
|
|
235
|
|
- // this.$router.push(path);
|
|
|
274
|
+ },
|
|
|
275
|
+ // 不用人脸核实
|
|
|
276
|
+ noFacialVerification(path) {
|
|
|
277
|
+ this.$router.push(path);
|
|
236
|
278
|
},
|
|
237
|
279
|
// H5轮询获取E证通Token状态
|
|
238
|
280
|
getSelectPCEIDtokenStatus(data) {
|
|
239
|
281
|
selectPCEIDtokenStatus(data).then((res) => {
|
|
240
|
|
- this.$router.push(this.pathVal);
|
|
|
282
|
+ if (res.data.Text.ErrCode == 0) {
|
|
|
283
|
+ this.$router.push(this.pathVal);
|
|
|
284
|
+ }
|
|
241
|
285
|
});
|
|
242
|
286
|
},
|
|
243
|
287
|
// 关闭弹框
|
|
244
|
288
|
closeImg() {
|
|
245
|
|
- clearInterval(this.timer)
|
|
|
289
|
+ clearInterval(this.timer);
|
|
246
|
290
|
this.closeImgs = false;
|
|
|
291
|
+ this.buttonReg = true;
|
|
247
|
292
|
},
|
|
248
|
293
|
},
|
|
249
|
294
|
beforeDestroy() {
|
|
|
@@ -251,7 +296,7 @@ export default {
|
|
251
|
296
|
if (this.timer) {
|
|
252
|
297
|
clearInterval(this.timer);
|
|
253
|
298
|
}
|
|
254
|
|
- }
|
|
|
299
|
+ },
|
|
255
|
300
|
};
|
|
256
|
301
|
</script>
|
|
257
|
302
|
|