浏览代码

add unlogin page

jihuaqiang 2 年之前
父节点
当前提交
2983732b71
共有 2 个文件被更改,包括 56 次插入0 次删除
  1. 5 0
      nuxt.config.js
  2. 51 0
      pages/course/unLogin.vue

+ 5 - 0
nuxt.config.js

@@ -45,6 +45,11 @@ export default {
 					path: '/authlogin',
 					component: resolve(__dirname, 'pages/auth/authLogin.vue'),
 				},
+				{
+					name: 'Unlogin',
+					path: '/unlogin',
+					component: resolve(__dirname, 'pages/course/unLogin.vue'),
+				},
 				{
 					name: 'RedPackage',
 					path: '/:id?',

+ 51 - 0
pages/course/unLogin.vue

@@ -0,0 +1,51 @@
+<!-- 移动端 教程页面 -->
+<template>
+	<div class="course-page">
+		<button class="btn" @click="unlogin">退出Denet登录</button>
+	</div>
+</template>
+
+<script>
+import { removeStorage, storageKey } from '../../utils/help';
+
+export default {
+	name: 'course',
+
+	methods: {
+		unlogin() {
+			removeStorage(storageKey.userInfo);
+		},
+	},
+};
+</script>
+<style lang="scss">
+html,
+body,
+#__nuxt,
+#__layout {
+	width: 100%;
+	height: 100%;
+	padding: 0;
+	margin: 0;
+}
+</style>
+<style lang="scss" scoped>
+.course-page {
+	position: relative;
+	height: 100%;
+	.btn {
+		padding: 20px 30px;
+		border: 1px solid #000;
+		color: #000;
+		font-size: 18px;
+		text-align: center;
+		border-radius: 6px;
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		transform: translate(-50%, -50%);
+	}
+}
+.btn {
+}
+</style>