Commit 50e209e1 authored by zhengke's avatar zhengke

登录

parent e0ed9182
......@@ -10,7 +10,7 @@ const router = createRouter({
})
const whiteList = ['/autoLogin','/login','/notfound','/regist','/','/forgot','/newpass','/notsupported','/denyAccess']
const whiteList = ['/autoLogin','/login','/login/2','/notfound','/regist','/','/forgot','/newpass','/notsupported','/denyAccess']
const managerMenu = ['/market','/editor_admin']
let loadingInstance:any = null
......
......@@ -40,7 +40,7 @@ const routes: RouteRecordRaw[] = [
]
},
{
path: '/login',
path: '/login/:Current?',
component: () => import('@/views/Auth/Login.vue'),
meta:{
title:'登录 Travel Design'
......
......@@ -68,14 +68,14 @@
<div class="text-info text-small text-center q-pt-xs">你的创作空间</div>
<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>
<passwordLogin v-if="currentLogin==1" @submitForm="(multUser)=> {multipleUsers=multUser}"></passwordLogin>
<wechatLogin 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>
<div class="otherLoading PingFangSC q-pb-lg">
<div v-if="currentLogin!=1" class="row flex-center items-center otherLoading-centwr cursor-pointer"
@click="currentLogin=1">
@click="loadingType">
<el-icon class="" size="14px" title="">
<IconMail theme="multi-color"
:fill="['#9DA3AC' ,'#9DA3AC' ,'#FFF' ,'#9DA3AC']"/>
......@@ -83,7 +83,7 @@
<span class="fz12 q-pl-sm" style="color: #9DA3AC;">账号/邮箱登录</span>
</div>
<div v-if="currentLogin!=2" class="row flex-center items-center otherLoading-centwr cursor-pointer"
@click="currentLogin=2">
@click="loadingType">
<el-icon class="" size="14px" title="">
<IconWechat theme="multi-color"
:fill="['#9DA3AC' ,'#9DA3AC' ,'#FFF' ,'#9DA3AC']"/>
......@@ -140,6 +140,7 @@
</div>
</template>
<script lang="ts" setup>
import { useRouter } from "vue-router";
import { ApiResult } from '@/configs/axios';
import UserServices from '@/services/UserService';
import { useUserStore } from '@/store/user';
......@@ -154,6 +155,12 @@ interface RuleForm {
account: string
password: string
}
const router = useRouter();
const parmas = ref({} as any)
const currentRoute = router.currentRoute.value
parmas.value = currentRoute.params
const model = ref<{account:string,password:string,tid:string}>({
account:'',
password:'',
......@@ -191,8 +198,10 @@ const LoginType = reactive([
])
const currentLogin = ref(1)
if(parmas.value.Current) currentLogin.value = parmas.value.Current
const loadingType = () =>{
if(!parmas.value.Current) return ElMessage({message:'开发中...'})
if(currentLogin.value==1) currentLogin.value = 2
else currentLogin.value = 1
}
......
<template>
<div class="wechatLoginForm text-center q-mt-lg" v-loading="qrLoading">
<img :src="qrCode" style="width: 164px;height: 164px;border: 1px solid #EBEBEB;border-radius: 8px;" v-if="!qrLoading"></img>
<div class="wechatLoginForm text-center q-mt-lg" v-loading="qrLoading"
style="position: relative;">
<img :src="qrCode" style="width: 164px;height: 164px;border: 1px solid #EBEBEB;border-radius: 12px;" v-if="!qrLoading"></img>
<QRCode value="http://www.viitto.com" style="width: 159px;height: 159px;border: 1px solid #EBEBEB;" v-if="qrLoading"></QRCode>
<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()"
/>
<Refresh v-else />
</el-icon></div>
</div>
</template>
<script lang="ts" setup>
......@@ -13,6 +22,7 @@ import { useUserStore } from '@/store/user';
const loading = ref(false)
const RefreshLoading = ref(false)
const multipleUsers = ref<any[]>([])
const inviteInfo = ref<any>()
if(localStorage.getItem("invite")){
......@@ -20,7 +30,7 @@ if(localStorage.getItem("invite")){
}
const user = useUserStore()
const qrCode = ref('none')
const qrCode = ref('')
const qrLoading = ref(false)
const scene_id = ref('')
......@@ -44,9 +54,11 @@ const getQrcode = async () =>{
qrLoading.value = true
const result = await UserServices.GetShowQrcode(0)
if(result.data.resultCode==ApiResult.SUCCESS){
qrCode.value = result.data.data.url
scene_id.value = result.data.data.scene_id
beginTimerHandler()
if(result.data.data&&result.data.data.url) qrCode.value = result.data.data.url
if(result.data.data&&result.data.data.scene_id) {
beginTimerHandler()
scene_id.value = result.data.data.scene_id
}
}
qrLoading.value = false
}
......
......@@ -76,11 +76,6 @@
<UploadPicture v-show="imgReplaceVisible"></UploadPicture>
<!-- 图片处理对比 -->
<!-- <imgArticContr1 v-if="DefinitionDatas"
:oldImg="handleImageElement.src"
:newImg="DefinitionDatas"
@close="DefinitionDatas=null"
@success="DefinitionDatas=null"></imgArticContr1> -->
<imgArticContr v-if="DefinitionDatas" :width="imgWidth" :height="imgHeigth"
:newImg="DefinitionDatas"
@close="DefinitionDatas=null"
......
......@@ -226,7 +226,7 @@
<!-- vip购买提示 -->
<vipFooter v-if="!userInfo.iv&&!userInfo.it&&!userInfo.OpenPrompt" @close="closeVip"></vipFooter>
<!-- 到顶部 -->
<BackTop v-if="dataList.length>0" :scrollTop="marketRef&&marketRef.scrollTop>=0?marketRef.scrollTop:0" @BackTop="goBackTop"></BackTop>
<BackTop v-if="dataList.length>10" :scrollTop="marketRef&&marketRef.scrollTop>=0?marketRef.scrollTop:0" @BackTop="goBackTop"></BackTop>
</template>
<script setup lang="ts">
......
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