mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-28 05:54:24 +08:00
tidy apis
This commit is contained in:
@@ -110,7 +110,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const returnURL = `${location.protocol}//${location.host}/login/callback`
|
||||
httpGet("/api/user/clogin/request?return_url="+returnURL).then(res => {
|
||||
httpGet("/api/user/clogin?return_url="+returnURL).then(res => {
|
||||
wechatLoginURL.value = res.data.url
|
||||
}).catch(e => {
|
||||
console.error(e)
|
||||
@@ -132,7 +132,7 @@ const login = function () {
|
||||
}
|
||||
|
||||
httpPost('/api/user/login', {username: username.value.trim(), password: password.value.trim()}).then((res) => {
|
||||
setUserToken(res.data)
|
||||
setUserToken(res.data.token)
|
||||
if (isMobile()) {
|
||||
router.push('/mobile')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user