|
@@ -4,31 +4,28 @@
|
|
<div class="header" v-show="showHeader">
|
|
<div class="header" v-show="showHeader">
|
|
<div class="navbar flex justify-between items-center">
|
|
<div class="navbar flex justify-between items-center">
|
|
<div class="logo flex items-center" @click="backHome">
|
|
<div class="logo flex items-center" @click="backHome">
|
|
- <img src="~/assets/theme-images/common/icon-logo.png" />
|
|
|
|
|
|
+ <img src="~/assets/theme-images/normal/pc/logo.png" />
|
|
<span>认证通</span>
|
|
<span>认证通</span>
|
|
</div>
|
|
</div>
|
|
- <div class="user-info">
|
|
|
|
- <template v-if="accessToken">
|
|
|
|
- <span v-text="userInfo.mobile"></span>
|
|
|
|
- <span class="underline logout" @click="logout">退出登录</span>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- <div class="flex justify-center">
|
|
|
|
- <div
|
|
|
|
- class="login pr-3 pl-3 rounded-sm border-white leading-6"
|
|
|
|
- @click="onLogin"
|
|
|
|
- >
|
|
|
|
- 登录
|
|
|
|
|
|
+ <div class="flex justify-center items-center">
|
|
|
|
+ <div class="user-info">
|
|
|
|
+ <template v-if="accessToken">
|
|
|
|
+ <div class="user-center">
|
|
|
|
+ <span class="icon el-icon-user-solid"></span>
|
|
|
|
+ <span class="icon el-icon-arrow-down"></span>
|
|
|
|
+ <div class="drop-down">
|
|
|
|
+ <ul class="nav">
|
|
|
|
+ <li @click.stop="onUserCenter">个人中心</li>
|
|
|
|
+ <li @click.stop="logout">退出登录</li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- |
|
|
|
|
- <div
|
|
|
|
- class="register pr-3 pl-3 rounded-sm border-white leading-6"
|
|
|
|
- @click="onRegister"
|
|
|
|
- >
|
|
|
|
- 注册
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <div class="login-btn" @click="onLogin">登录</div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ <span class="collapse-icon" @click="drawer = true"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -79,26 +76,6 @@ export default {
|
|
formType: 'login',
|
|
formType: 'login',
|
|
drawer: false,
|
|
drawer: false,
|
|
isMounted: false,
|
|
isMounted: false,
|
|
- list: [
|
|
|
|
- {
|
|
|
|
- id: 1,
|
|
|
|
- name: '授权申请',
|
|
|
|
- path: '/form/club-register',
|
|
|
|
- icon: 'icon-register',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 2,
|
|
|
|
- name: '产品资料',
|
|
|
|
- path: '/docs/0',
|
|
|
|
- icon: 'icon-doc',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 3,
|
|
|
|
- name: '意见反馈',
|
|
|
|
- path: '/feedback',
|
|
|
|
- icon: 'icon-feedback',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -111,6 +88,32 @@ export default {
|
|
this.refreshCacheData()
|
|
this.refreshCacheData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 跳转
|
|
|
|
+ onJumpTo(item) {
|
|
|
|
+ this.drawer = false
|
|
|
|
+ const hasLogin = this.$store.getters.accessToken
|
|
|
|
+ // 保存登录重定向路由
|
|
|
|
+ this.$setStorage(
|
|
|
|
+ this.routePrefix,
|
|
|
|
+ 'login_redicret',
|
|
|
|
+ this.routePrefix + item.path
|
|
|
|
+ )
|
|
|
|
+ if (item.id > 2 && !hasLogin) {
|
|
|
|
+ this.$toast({ message: '请先登录', duration: 1000 })
|
|
|
|
+ this.formType = 'login'
|
|
|
|
+ this.$store.commit('app/SHOW_LOGIN')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (item.id === 0) {
|
|
|
|
+ const url = this.routePrefix + item.path
|
|
|
|
+ this.$router.push(url)
|
|
|
|
+ } else {
|
|
|
|
+ const url = this.routePrefix + item.path
|
|
|
|
+ this.$router.push(url)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
// 点击登录
|
|
// 点击登录
|
|
onLoginClick(type) {
|
|
onLoginClick(type) {
|
|
this.formType = type
|
|
this.formType = type
|
|
@@ -160,8 +163,16 @@ export default {
|
|
|
|
|
|
// 回到首页
|
|
// 回到首页
|
|
backHome() {
|
|
backHome() {
|
|
- if (this.$route.path === this.routePrefix) return
|
|
|
|
- this.$router.replace(this.routePrefix)
|
|
|
|
|
|
+ // if (this.$route.path === this.routePrefix) return
|
|
|
|
+ // this.$router.replace(this.routePrefix)
|
|
|
|
+ window.location.href = window.location.origin + this.routePrefix
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 个人中心
|
|
|
|
+ onUserCenter() {
|
|
|
|
+ // const path = `${this.routePrefix}/center`
|
|
|
|
+ window.location.href =
|
|
|
|
+ window.location.origin + `${this.routePrefix}/center`
|
|
},
|
|
},
|
|
|
|
|
|
// 响应页面宽度变化
|
|
// 响应页面宽度变化
|
|
@@ -181,6 +192,18 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+@keyframes slide-down {
|
|
|
|
+ 0% {
|
|
|
|
+ top: 48px;
|
|
|
|
+ z-index: 9;
|
|
|
|
+ opacity: 0;
|
|
|
|
+ }
|
|
|
|
+ 100% {
|
|
|
|
+ top: 32px;
|
|
|
|
+ opacity: 1;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
// PC端
|
|
// PC端
|
|
@media screen and (min-width: 768px) {
|
|
@media screen and (min-width: 768px) {
|
|
.layout {
|
|
.layout {
|
|
@@ -223,9 +246,140 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .nav {
|
|
|
|
+ .link {
|
|
|
|
+ display: inline;
|
|
|
|
+ margin-left: 32px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ .text {
|
|
|
|
+ @include themify($themes) {
|
|
|
|
+ color: themed('color');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ &.icon-register {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/pc/link-entry-register-active.png);
|
|
|
|
+ }
|
|
|
|
+ &.icon-doc {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/pc/link-entry-doc-active.png);
|
|
|
|
+ }
|
|
|
|
+ &.icon-feedback {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/pc/link-entry-feedback-active.png);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ width: 20px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ vertical-align: -4px;
|
|
|
|
+ margin-right: 4px;
|
|
|
|
+
|
|
|
|
+ background-size: 20px;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-position: center;
|
|
|
|
+
|
|
|
|
+ &.icon-register {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/pc/link-entry-register.png);
|
|
|
|
+ }
|
|
|
|
+ &.icon-doc {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/pc/link-entry-doc.png);
|
|
|
|
+ }
|
|
|
|
+ &.icon-feedback {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/pc/link-entry-feedback.png);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .text {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
.user-info {
|
|
.user-info {
|
|
color: #fff;
|
|
color: #fff;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
|
+ margin-left: 48px;
|
|
|
|
+
|
|
|
|
+ .login-btn {
|
|
|
|
+ width: 80px;
|
|
|
|
+ height: 34px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ background: rgba(255, 255, 255, 0.39);
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 34px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ .user-center {
|
|
|
|
+ position: relative;
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ width: 32px;
|
|
|
|
+ height: 32px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 32px;
|
|
|
|
+
|
|
|
|
+ &.el-icon-user-solid {
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &.el-icon-arrow-down {
|
|
|
|
+ font-size: 22px;
|
|
|
|
+ transition: all 0.2s;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ .drop-down {
|
|
|
|
+ display: block;
|
|
|
|
+ animation: slide-down 0.4s linear forwards;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-icon-arrow-down {
|
|
|
|
+ transform: rotateZ(180deg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .drop-down {
|
|
|
|
+ display: none;
|
|
|
|
+ opacity: 0;
|
|
|
|
+ // z-index: -1;
|
|
|
|
+ right: 0;
|
|
|
|
+
|
|
|
|
+ position: absolute;
|
|
|
|
+ background: transparent;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding-top: 24px;
|
|
|
|
+
|
|
|
|
+ .nav {
|
|
|
|
+ width: 118px;
|
|
|
|
+ padding: 8px 0;
|
|
|
|
+ background: #fff;
|
|
|
|
+ box-shadow: 0px 6px 16px rgba(40, 40, 40, 0.1);
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ li {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #282828;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 40px;
|
|
|
|
+ transition: all 0.4s;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ @include themify($themes) {
|
|
|
|
+ color: themed('color');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
.login,
|
|
.login,
|
|
.register,
|
|
.register,
|
|
@@ -265,7 +419,7 @@ export default {
|
|
left: 0;
|
|
left: 0;
|
|
z-index: 999;
|
|
z-index: 999;
|
|
width: 100%;
|
|
width: 100%;
|
|
- padding: 0 2.4vw;
|
|
|
|
|
|
+ padding: 0 4vw;
|
|
height: 12.8vw;
|
|
height: 12.8vw;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
background: linear-gradient(90deg, #101010 0%, #404040 100%);
|
|
background: linear-gradient(90deg, #101010 0%, #404040 100%);
|
|
@@ -284,7 +438,7 @@ export default {
|
|
width: 12.2vw;
|
|
width: 12.2vw;
|
|
height: 3.9vw;
|
|
height: 3.9vw;
|
|
margin-right: 1.9vw;
|
|
margin-right: 1.9vw;
|
|
- transform: translateY(-1vw);
|
|
|
|
|
|
+ transform: translateY(-0.6vw);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
span {
|
|
span {
|
|
@@ -296,6 +450,88 @@ export default {
|
|
.user-info {
|
|
.user-info {
|
|
color: #fff;
|
|
color: #fff;
|
|
font-size: 3vw;
|
|
font-size: 3vw;
|
|
|
|
+
|
|
|
|
+ .logout {
|
|
|
|
+ margin: 0 1.6vw;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .login-btn {
|
|
|
|
+ width: 13.4vw;
|
|
|
|
+ height: 6.4vw;
|
|
|
|
+ color: #fff;
|
|
|
|
+ background: rgba(255, 255, 255, 0.39);
|
|
|
|
+ font-size: 3.4vw;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 6.4vw;
|
|
|
|
+ margin-right: 2.4vw;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .user-center {
|
|
|
|
+ position: relative;
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ width: 5.6vw;
|
|
|
|
+ height: 5.6vw;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 5.6vw;
|
|
|
|
+ margin-right: 4vw;
|
|
|
|
+
|
|
|
|
+ &.el-icon-user-solid {
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &.el-icon-arrow-down {
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ .drop-down {
|
|
|
|
+ display: block;
|
|
|
|
+ animation: slide-down 0.4s linear forwards;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-icon-arrow-down {
|
|
|
|
+ transform: rotateZ(180deg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .drop-down {
|
|
|
|
+ display: none;
|
|
|
|
+ opacity: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+
|
|
|
|
+ position: absolute;
|
|
|
|
+ background: transparent;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding-top: 1.2vw;
|
|
|
|
+
|
|
|
|
+ .nav {
|
|
|
|
+ width: 26vw;
|
|
|
|
+ padding: 1vw 0;
|
|
|
|
+ background: #fff;
|
|
|
|
+ box-shadow: 0px 0.6vw 20vw rgba(40, 40, 40, 0.1);
|
|
|
|
+ border-radius: 0.4vw;
|
|
|
|
+ li {
|
|
|
|
+ font-size: 3.4vw;
|
|
|
|
+ color: #282828;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 8.6vw;
|
|
|
|
+ transition: all 0.4s;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .collapse-icon {
|
|
|
|
+ display: block;
|
|
|
|
+ width: 5.6vw;
|
|
|
|
+ height: 5.6vw;
|
|
|
|
+ background: url(~assets/theme-images/common/h5-icon-collapse.png)
|
|
|
|
+ no-repeat center;
|
|
|
|
+ background-size: 5.6vw;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.content {
|
|
.content {
|
|
@@ -309,5 +545,42 @@ export default {
|
|
font-size: 3vw;
|
|
font-size: 3vw;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .nav {
|
|
|
|
+ width: 63vw;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 0 6.4vw;
|
|
|
|
+ .link {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-bottom: 0.1vw solid #c2c2c2;
|
|
|
|
+ padding-bottom: 3vw;
|
|
|
|
+ padding-top: 6vw;
|
|
|
|
+ .icon {
|
|
|
|
+ width: 5.6vw;
|
|
|
|
+ height: 5.6vw;
|
|
|
|
+ vertical-align: -1.2vw;
|
|
|
|
+ margin-right: 2.4vw;
|
|
|
|
+ background-size: 5.6vw;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-position: center;
|
|
|
|
+
|
|
|
|
+ &.icon-register {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/h5/link-entry-register-active.png);
|
|
|
|
+ }
|
|
|
|
+ &.icon-doc {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/h5/link-entry-doc-active.png);
|
|
|
|
+ }
|
|
|
|
+ &.icon-feedback {
|
|
|
|
+ background-image: url(~assets/theme-images/normal/h5/link-entry-feedback-active.png);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .text {
|
|
|
|
+ font-size: 3.4vw;
|
|
|
|
+ color: #282828;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|