Commit 888286cd authored by zhengke's avatar zhengke

修复微信登录

parent 50e209e1
......@@ -69,7 +69,7 @@
<template v-if="!multipleUsers || multipleUsers.length==0">
<div class="q-mb-md" style="padding: 0 50px;">
<passwordLogin v-if="currentLogin==1" @submitForm="(multUser)=> {multipleUsers=multUser}"></passwordLogin>
<wechatLogin v-if="currentLogin==2"></wechatLogin>
<wechatLogin :current="currentLogin" v-if="currentLogin==2"></wechatLogin>
<div class="q-pt-lg">
<el-divider class="q-pb-md"> <span class="fz12 PingFangSC" style="color:#7f8792">其他方式登录</span></el-divider>
</div>
......
......@@ -6,8 +6,8 @@
<div v-if="!qrCode" class="q-pt-md" style="position: absolute;left: 0;right: 0;">
<el-icon class="cursor-pointer">
<RefreshRight
v-if="!qrLoading"
@click="() => getQrcode()"
v-if="!RefreshLoading"
@click="() => getQrcode(1)"
/>
<Refresh v-else />
</el-icon></div>
......@@ -36,7 +36,15 @@ const qrLoading = ref(false)
const scene_id = ref('')
const queryTimer = ref<any>(null)
const props = defineProps({
current: {
type: Number,
required: 0,
},
})
watch(()=>props.current,(n,o)=>{
if(n==1) stopTimerHandler()
})
const beginTimerHandler = ()=>{
queryTimer.value = setInterval(async ()=>{
await userLoginHandler()
......@@ -50,8 +58,9 @@ const stopTimerHandler = ()=>{
}
}
const getQrcode = async () =>{
const getQrcode = async (type:any) =>{
qrLoading.value = true
if(type)RefreshLoading.value = true
const result = await UserServices.GetShowQrcode(0)
if(result.data.resultCode==ApiResult.SUCCESS){
if(result.data.data&&result.data.data.url) qrCode.value = result.data.data.url
......@@ -61,6 +70,7 @@ const getQrcode = async () =>{
}
}
qrLoading.value = false
if(type)RefreshLoading.value = false
}
const userLoginHandler = async ()=>{
......
......@@ -38,7 +38,7 @@
<div class="setting-item">
<div>
<div class="text-dark">邮箱</div>
<div class="">{{Mailbox?Mailbox:'绑定邮箱后,可以更方便的登录、管理稿定账号'}}</div>
<div class="">{{Mailbox?Mailbox:'绑定邮箱后,可以更方便的登录'}}</div>
</div>
<el-button @click="bindDatas(1)">{{Mailbox?'更换邮箱':'立即绑定'}}</el-button>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment