This commit is contained in:
parent
b203a4fc6b
commit
dae8717341
@ -7,5 +7,5 @@ module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
],
|
||||
plugins: [...build]
|
||||
plugins: []
|
||||
}
|
||||
|
@ -1187,4 +1187,18 @@ export async function setusername(src: string){
|
||||
|
||||
export async function logoutapi() {
|
||||
await get("logout");
|
||||
}
|
||||
}
|
||||
|
||||
export async function authLogin(id:number, type: number, img: string = "") {
|
||||
const res = await post("authLogin",{
|
||||
uid: id,
|
||||
type: 1,
|
||||
login_type: type,
|
||||
img: img
|
||||
})
|
||||
if(res.code == 0){
|
||||
return res.data
|
||||
}else{
|
||||
message.error(res.msg);
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,7 @@
|
||||
import { computed, defineComponent, onMounted, reactive, ref } from "vue";
|
||||
import LoginTab from "@/components/login/LoginTab.vue";
|
||||
import NavTop from "@/components/NavTop.vue"
|
||||
import { checksmscode, checkuser, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
|
||||
import { authLogin, checksmscode, checkuser, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
|
||||
import { message } from 'ant-design-vue';
|
||||
import router from '@/router';
|
||||
import { useI18n } from '@/utils/i18n';
|
||||
@ -271,6 +271,7 @@ export default defineComponent({
|
||||
window.FB.login(function(response: any){
|
||||
console.log(response, 121212)
|
||||
// handle the response
|
||||
authLogin(response.authResponse.userID, index)
|
||||
});
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user