删除访客模式登录

This commit is contained in:
灌糖包子 2023-01-26 04:35:11 +08:00
parent fd599def31
commit c4645b29e4
Signed by: sookie
GPG Key ID: 691E688C160D3188

View File

@ -11,9 +11,6 @@
</el-form>
<div class="login-btn">
<el-button type="primary" @click="login">登录</el-button>
<el-tooltip content="无需账号密码,只有查询权限" placement="bottom">
<el-button @click="guestLogin">访客模式</el-button>
</el-tooltip>
</div>
</div>
</template>
@ -53,18 +50,6 @@ export default class Login extends Vue {
}
})
}
/**
* 访客模式
*/
async guestLogin() {
const data = await this.$http.post<never, any>('/api/v1/common/guestLogin')
if (data.status && data.data.token) {
this.$store.commit('login', data.data)
this.$router.push('/')
} else {
ElMessage.error(data.message)
}
}
}
type UserInfo = {
username: string | null,