2023-11-20-1
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
<div class="header_user_icon"></div>
|
||||
<!-- <div class="header_icon icon iconfont icon-touxiang3"></div> -->
|
||||
<div class="header_user_content">
|
||||
<div class="username"><span>/</span> {{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div v-if="isTest" class="username"><span>/</span> {{$t('Header.hello')}}@{{ $t('isTest.userName') }}</div>
|
||||
<div v-else class="username"><span>/</span> {{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div
|
||||
:class="[
|
||||
'icon',
|
||||
@@ -146,7 +147,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script >
|
||||
import { defineComponent, createVNode } from "vue";
|
||||
import { defineComponent, createVNode, ref } from "vue";
|
||||
import { isEmail } from "@/tool/util";
|
||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
||||
@@ -165,10 +166,12 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const {t} = useI18n()
|
||||
const {locale} = useI18n()
|
||||
let isTest = ref()
|
||||
return {
|
||||
store,
|
||||
t,
|
||||
locale
|
||||
locale,
|
||||
isTest,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -201,6 +204,9 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let isTest = getCookie('isTest')
|
||||
this.isTest =JSON.parse(isTest)|| ''
|
||||
|
||||
this.userInfo = JSON.parse(getCookie("userInfo"));
|
||||
if (!this.userInfo) {
|
||||
this.$router.replace("/login");
|
||||
|
||||
Reference in New Issue
Block a user