|
@@ -1,9 +1,10 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
- import {ElForm, ElFormItem} from "element-plus";
|
|
|
|
|
|
|
+ import {ElForm, ElFormItem } from "element-plus";
|
|
|
import { ref, computed } from 'vue';
|
|
import { ref, computed } from 'vue';
|
|
|
import {router} from '../router'
|
|
import {router} from '../router'
|
|
|
import {userLogin} from "../api/user.ts";
|
|
import {userLogin} from "../api/user.ts";
|
|
|
|
|
|
|
|
|
|
+
|
|
|
// 输入框值
|
|
// 输入框值
|
|
|
const tel = ref('')
|
|
const tel = ref('')
|
|
|
const password = ref('')
|
|
const password = ref('')
|
|
@@ -47,6 +48,25 @@
|
|
|
router.push({ path: "/home" })
|
|
router.push({ path: "/home" })
|
|
|
})
|
|
})
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
|
|
+
|
|
|
|
|
+ ElMessageBox.alert(
|
|
|
|
|
+ e.message,
|
|
|
|
|
+ '错误提示',
|
|
|
|
|
+ {
|
|
|
|
|
+ customClass: "customDialog",
|
|
|
|
|
+ confirmButtonText: '好的',
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: false,
|
|
|
|
|
+ roundButton: true,
|
|
|
|
|
+ center: true
|
|
|
|
|
+ }
|
|
|
|
|
+ ).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ // 清空用户密码
|
|
|
|
|
+ password.value = ''
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
console.log(e.message)
|
|
console.log(e.message)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -125,6 +145,14 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+<style>
|
|
|
|
|
+
|
|
|
|
|
+.customDialog {
|
|
|
|
|
+ @apply w-1/4 space-y-5 text-4xl font-semibold rounded-2xl pb-5
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+</style>
|
|
|
|
|
+
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
|
|
|
|
</style>
|
|
</style>
|