Browse Source

退出登录清除登录信息

Qukaidi 4 years ago
parent
commit
f2f367b8d0
1 changed files with 9 additions and 6 deletions
  1. 9 6
      pages/me/setting/setting.vue

+ 9 - 6
pages/me/setting/setting.vue

@@ -42,7 +42,7 @@
 						<u-cell-item title="隐私政策">
 							<u-icon slot="icon" size="42" name="info-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx;"></u-icon>
 						</u-cell-item>
-						<u-cell-item title="版本检测" value="1.29" :arrow="false"  :border-bottom="false">
+						<u-cell-item title="版本检测" value="1.29" :arrow="false" :border-bottom="false">
 							<u-icon slot="icon" size="42" name="setting-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx;"></u-icon>
 						</u-cell-item>
 					</u-cell-group>
@@ -54,6 +54,7 @@
 </template>
 
 <script>
+	import {mapMutations} from 'vuex'
 	export default {
 		data() {
 			return {
@@ -61,11 +62,13 @@
 			}
 		},
 		methods: {
-			exit(){
-			this.$u.route({
-				url: "pages/login/index",
-				type:"reLaunch"
-			})	
+			...mapMutations(['logout']),
+			exit() {
+				this.logout()
+				this.$u.route({
+					url: "pages/login/index",
+					type: "reLaunch"
+				})
 			}
 		}
 	}