|
@@ -10,7 +10,10 @@
|
|
|
欢迎来到吉林省计算中心科技平台
|
|
|
</p>
|
|
|
<p class="username">
|
|
|
- <span v-if="user && user.name" @click="stnmae">{{ user.name }}</span>
|
|
|
+ <span v-if="user && user.name"
|
|
|
+ >{{ user.name }}
|
|
|
+ <button type="button" class="logininfo" @click="zhuxiao">注销</button>
|
|
|
+ </span>
|
|
|
<span v-else>
|
|
|
{{ user.name }}
|
|
|
<button type="button" class="logininfo" @click="btnLogin">登录</button>
|
|
@@ -62,6 +65,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
export default {
|
|
|
name: 'heads',
|
|
|
props: {},
|
|
@@ -74,6 +78,7 @@ export default {
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
+ ...login({ logout: 'logout', transactiondtetle: 'delete' }),
|
|
|
fuwu() {
|
|
|
this.$router.push({ path: '/live/service' });
|
|
|
},
|
|
@@ -94,6 +99,17 @@ export default {
|
|
|
this.$router.push({ path: '/enterprise/enterprisejb' });
|
|
|
}
|
|
|
},
|
|
|
+ async zhuxiao() {
|
|
|
+ this.logout();
|
|
|
+ this.$message({
|
|
|
+ message: '注销成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ this.toLogin();
|
|
|
+ },
|
|
|
+ async toLogin() {
|
|
|
+ this.$router.push({ path: '/platlive' });
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|