删除访客模式登录
This commit is contained in:
parent
fd599def31
commit
c4645b29e4
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user