-
{{this.$cookie.get('username')}}
+
{{this.$cookie.get('username')}}
- {{this.$cookie.get('username')}}
- Lv.1
+ {{this.$cookie.get('username')}}
+ Lv.1
@@ -44,6 +44,7 @@ export default {
},
methods:{
signOut(){
+ this.$cookie.delete('username');
// deletecookie
var that=this;
axios({
@@ -54,7 +55,6 @@ export default {
params: {
}
});
- this.$cookie.delete('username');
if(this.$cookie.get('username')===null){
Vue.prototype.$notify({
title: '成功',
@@ -63,10 +63,17 @@ export default {
offset: 50
});
setTimeout(()=>{
- this.$router.push({
- path:'/home',
- })
- },1000)
+ window.location.reload();
+ },800)
+
+
+ }else{
+ Vue.prototype.$notify.error({
+ title: '错误',
+ message: ('i', {style: 'color: teal'}, "退出失败!"),
+ type: 'success',
+ offset: 50
+ });
}
diff --git a/vue.config.js b/vue.config.js
index 1cffedf..1d46f08 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -4,6 +4,7 @@ require('@vue/cli-service')
// lintOnSave: false
// })
module.exports = {
+ runtimeCompiler: true,
// 关闭语法检查
lintOnSave:false,
devServer: {