|
@@ -44,17 +44,17 @@
|
|
|
<span>{{ $t('message.account.accountBtnText') }}</span>
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item class="login-animation4" v-if="from !== 'sso'">
|
|
|
+ <el-form-item class="login-animation4" v-if="from !== 'sso' && showSSO">
|
|
|
<div class="ssolist">
|
|
|
<img class="ssologo" :src="item.logo" v-for="item in ssoList" :key="item.name" @click="authLogin(item.name)">
|
|
|
</div>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>
|
|
|
<changePwd ref="changePwdRef"></changePwd>
|
|
|
</el-form>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { ref, toRefs, reactive, defineComponent, computed, onMounted, getCurrentInstance } from 'vue';
|
|
|
+import { ref, watch, toRefs, reactive, defineComponent, computed, onMounted, getCurrentInstance, h } from 'vue';
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
import changePwd from './changePwd.vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
@@ -81,10 +81,17 @@ export default defineComponent({
|
|
|
// sso 登录来源
|
|
|
from: String,
|
|
|
ssoInfo: Object,
|
|
|
+ showSSO: Boolean,
|
|
|
},
|
|
|
setup(props) {
|
|
|
- console.log(props.from)
|
|
|
- console.log(props.ssoInfo)
|
|
|
+ watch(() => props.showSSO, (showSSO) => {
|
|
|
+ if (showSSO) {
|
|
|
+ api.sso.list().then((res: any) => {
|
|
|
+ state.ssoList = res.providers
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }, { immediate: true })
|
|
|
+
|
|
|
const changePwdRef = ref();
|
|
|
const { t } = useI18n();
|
|
|
const store = useStore();
|
|
@@ -111,9 +118,6 @@ export default defineComponent({
|
|
|
captchaSrc: '',
|
|
|
});
|
|
|
|
|
|
- api.sso.list().then((res: any) => {
|
|
|
- state.ssoList = res.providers
|
|
|
- })
|
|
|
|
|
|
onMounted(() => {
|
|
|
getCaptcha();
|