免密登录

This commit is contained in:
梁州 2025-03-02 17:30:55 +08:00
parent e449dc70ee
commit bbac7b8a33

View File

@ -19,7 +19,7 @@
</template> </template>
<script setup> <script setup>
import { getUser, loginWithAuth } from '@/api/login.js' import { getUser, loginWithAuth, loginWithoutAuth } from '@/api/login.js'
import { postToGetToken } from "@/api/kateLogin.js"; import { postToGetToken } from "@/api/kateLogin.js";
import { ElMessage, ElLoading } from 'element-plus' import { ElMessage, ElLoading } from 'element-plus'
import { reactive, onMounted } from 'vue'; import { reactive, onMounted } from 'vue';
@ -70,7 +70,7 @@ const login = () => {
text: 'Loading', text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)', background: 'rgba(0, 0, 0, 0.7)',
}) })
loginWithAuth(loginForm).then(res => { loginWithoutAuth(loginForm).then(res => {
loading.close() loading.close()
if (res.data.code == 0) { if (res.data.code == 0) {
store.commit('mutationUser', res.data.returnData.user)// store.commit('mutationUser', res.data.returnData.user)//