|
|
@@ -0,0 +1,86 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ {{errMsg}}
|
|
|
+ </div>
|
|
|
+ <div v-show="showSuccess" class="login-success">
|
|
|
+ <div class="main-box">
|
|
|
+ <div class="icon-wrapper">
|
|
|
+ <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="icon-success">
|
|
|
+ <path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"></path>
|
|
|
+ </svg>
|
|
|
+ <div class="result_title">
|
|
|
+ <p>扫码成功</p>
|
|
|
+ <van-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ size="small"
|
|
|
+ block
|
|
|
+ @click="closeWindow"
|
|
|
+ >
|
|
|
+ 关闭
|
|
|
+ </van-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import router from "@/router";
|
|
|
+import {onMounted, ref} from "vue";
|
|
|
+import {selfMachineLogin} from "@/api/isolations/self-machine";
|
|
|
+
|
|
|
+const id = router.currentRoute.value.params.id
|
|
|
+const errMsg = ref('')
|
|
|
+const showSuccess = ref(false)
|
|
|
+
|
|
|
+function closeWindow() {
|
|
|
+ WeixinJSBridge.call('closeWindow')
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ selfMachineLogin(id).then(() => {
|
|
|
+ showSuccess.value = true
|
|
|
+ }).catch((e) => {
|
|
|
+ errMsg.value = e;
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.login-success {
|
|
|
+ height: 100vh;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .main-box {
|
|
|
+ margin-top: -160px;
|
|
|
+ }
|
|
|
+ .nav-bar-text {
|
|
|
+ color: #1989fa;
|
|
|
+ margin-left: 4px;
|
|
|
+ }
|
|
|
+ .icon-wrapper {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .icon-success {
|
|
|
+ color: #67c23a;
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
+ }
|
|
|
+ .result_title {
|
|
|
+ margin-top: 8px;
|
|
|
+ width: 128px;
|
|
|
+ > p {
|
|
|
+ margin: 0 0 32px 0;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #303133;
|
|
|
+ line-height: 1.3;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|