|
@@ -1,10 +1,11 @@
|
|
<script setup>
|
|
<script setup>
|
|
-import {bindPhone,loginOut,passwordChange} from '@/utils/common.js'
|
|
|
|
|
|
+import {bindPhone,loginOut,passwordChange,signUp} from '@/utils/common.js'
|
|
|
|
|
|
const props=defineProps({
|
|
const props=defineProps({
|
|
userInfo:{}
|
|
userInfo:{}
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+const yb_token = localStorage.getItem('yben_token')
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -15,10 +16,10 @@ const props=defineProps({
|
|
<template #reference>
|
|
<template #reference>
|
|
<div class="user-info-hover">
|
|
<div class="user-info-hover">
|
|
<img src="@/assets/icons/avatar.svg" />
|
|
<img src="@/assets/icons/avatar.svg" />
|
|
- <span>{{userInfo.Name}}</span>
|
|
|
|
|
|
+ <span>{{userInfo.Name||''}}</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <div class="user-info-message">
|
|
|
|
|
|
+ <div class="user-info-message" v-if="yb_token">
|
|
<div class="user-info-item">User Name:<span><span>{{userInfo.Name}}</span></span></div>
|
|
<div class="user-info-item">User Name:<span><span>{{userInfo.Name}}</span></span></div>
|
|
<div class="user-info-item">Email Address:<span>{{userInfo.Email}}</span></div>
|
|
<div class="user-info-item">Email Address:<span>{{userInfo.Email}}</span></div>
|
|
<div class="user-info-item">Mobile Phone No:
|
|
<div class="user-info-item">Mobile Phone No:
|
|
@@ -37,6 +38,13 @@ const props=defineProps({
|
|
<el-button plain @click="passwordChange" size="large" style="min-width: 100px;padding: 12px;">Update password</el-button>
|
|
<el-button plain @click="passwordChange" size="large" style="min-width: 100px;padding: 12px;">Update password</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="user-info-message" v-else>
|
|
|
|
+ <div class="user-info-item">Please log in/sign up first</div>
|
|
|
|
+ <div style="margin-top: 30px;display: flex;align-items: center;justify-content: space-between;">
|
|
|
|
+ <el-button type="primary" @click="loginOut" size="large" style="min-width: 100px;background-color:#1856A7 ;">Log In</el-button>
|
|
|
|
+ <el-button plain @click="signUp" size="large" style="min-width: 100px;padding: 12px;">Sign Up</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</el-popover>
|
|
</el-popover>
|
|
</template>
|
|
</template>
|
|
|
|
|