bug fix
This commit is contained in:
@@ -1278,8 +1278,8 @@ export async function authLogin(id:number, type: number, img: string = "") {
|
||||
}
|
||||
}
|
||||
|
||||
export async function accessToken(code:string) {
|
||||
const res = await get("accessToken", {code})
|
||||
export async function accessToken(code:string,type: number) {
|
||||
const res = await get("accessToken", {code, type})
|
||||
if(res.code == 0){
|
||||
return res.data
|
||||
}else{
|
||||
|
||||
@@ -311,12 +311,12 @@ export default {
|
||||
shouruguize: "Description of revenue rules",
|
||||
shouru1: "Live Revenue=Actual attendess x Actual duration x unit price",
|
||||
shouru2: "1 on 1, 20€/hour; 1 on N, 10€/hour/person, (1<N<=4)",
|
||||
shouru3: "Attention! You can only change the currency once!",
|
||||
shouru3: "Once the currency is confirmed, it cannot be changed!",
|
||||
shouru4: "Live broadcast earnings on the same day, the next day after successful background audit into the wallet.",
|
||||
shouru5: "The actual length of attendance shall not exceed the length of the teacher's broadcast of the live course.",
|
||||
tishi: "Tip",
|
||||
querentuichu: "You confirm to exit?",
|
||||
huobitishi: "Attention! You can only change the currency once on Beelink platform!",
|
||||
huobitishi: "Once the currency is confirmed, it cannot be changed!",
|
||||
zhuanmazhong: "Transcoding in",
|
||||
leixingcuowu:"File type error",
|
||||
zuida:"Maximum",
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
v-model:value="userinfo.muyu"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="lan.$t('jiaoshou')" class="form-item">
|
||||
<a-form-item :label="lan.$t('jiaoshou')" class="form-item">
|
||||
<a-select
|
||||
v-model:value="userinfo.jiaoshou"
|
||||
class="getcode"
|
||||
@@ -342,6 +342,9 @@ export default defineComponent({
|
||||
if (userinfo.value.emil == "") {
|
||||
message.error(lan.$t('youxiangweikong'));
|
||||
return false;
|
||||
}else if(!(/^\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/.test(userinfo.value.emil))){
|
||||
message.error(lan.$t('youxiangcuowu'));
|
||||
return false;
|
||||
}
|
||||
if (userinfo.value.muyu == "") {
|
||||
message.error(lan.$t('muyuweikong'));
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useRoute } from "vue-router";
|
||||
export default defineComponent(({
|
||||
setup(){
|
||||
const code: any = useRoute().query.code;
|
||||
accessToken(code).then((res: any)=>{
|
||||
accessToken(code, 0).then((res: any)=>{
|
||||
console.log(res)
|
||||
authLogin(res.uid, 2).then((res: any)=>{
|
||||
if(res.redirect == 1){
|
||||
|
||||
@@ -20,26 +20,29 @@ export default defineComponent(({
|
||||
setup(){
|
||||
const code: any = useRoute().query.code;
|
||||
console.log(code)
|
||||
// accessToken(code).then((res: any)=>{
|
||||
// console.log(res)
|
||||
// authLogin(res.uid, 2).then((res: any)=>{
|
||||
// if(res.redirect == 1){
|
||||
// sessionStorage.setItem('mid',res.memberid);
|
||||
// router.push("/sign")
|
||||
if(!code){
|
||||
router.push("/")
|
||||
}
|
||||
accessToken(code, 1).then((res: any)=>{
|
||||
console.log(res)
|
||||
authLogin(res.uid, 2).then((res: any)=>{
|
||||
if(res.redirect == 1){
|
||||
sessionStorage.setItem('mid',res.memberid);
|
||||
router.push("/sign")
|
||||
|
||||
// }else{
|
||||
// if(!saveValue("token", res.api_token) && !saveValue("memberid", res.memberid) ){
|
||||
// message.error("存储错误, 请允许网页使用本地存储!")
|
||||
// return false;
|
||||
// }else{
|
||||
// setToken();
|
||||
// store.commit("login", true);
|
||||
// store.dispatch("setUserInfo");
|
||||
// router.push("/mine/archives")
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
}else{
|
||||
if(!saveValue("token", res.api_token) && !saveValue("memberid", res.memberid) ){
|
||||
message.error("存储错误, 请允许网页使用本地存储!")
|
||||
return false;
|
||||
}else{
|
||||
setToken();
|
||||
store.commit("login", true);
|
||||
store.dispatch("setUserInfo");
|
||||
router.push("/mine/archives")
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
// window.location.href=`https://api.weibo.com/oauth2/access_token?client_id=2754574056&client_secret=2f16267634db2de14cda7891c49aa54a&grant_type=authorization_code&redirect_uri=https://beelink.theluyuan.com/wblogin&code=${code}`
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user