This commit is contained in:
unknown 2020-11-30 14:15:11 +08:00
parent b203a4fc6b
commit dae8717341
3 changed files with 18 additions and 3 deletions

View File

@ -7,5 +7,5 @@ module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [...build]
plugins: []
}

View File

@ -1188,3 +1188,17 @@ 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);
}
}

View File

@ -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)
});
}