|
@@ -2,7 +2,7 @@
|
|
|
<div class="header" :class="show && 'active'">
|
|
|
<div class="nav-content">
|
|
|
<div class="nav-left">
|
|
|
- <router-link :to="{name: 'home'}">
|
|
|
+ <a :href="apiDomain">
|
|
|
<div class="logo-title">
|
|
|
<picture>
|
|
|
<source type="image/png" media="(min-width: 430px)" srcset="../../../static/images/common/logo@2x.png">
|
|
@@ -11,21 +11,27 @@
|
|
|
</picture>
|
|
|
<span>ComPDFKit API</span>
|
|
|
</div>
|
|
|
- </router-link>
|
|
|
- <div class="line-container" :class="show && 'active'" @click="toggleMenu">
|
|
|
- <div class="line"></div>
|
|
|
- <div class="line"></div>
|
|
|
- <div class="line"></div>
|
|
|
+ </a>
|
|
|
+ <div class="min-nav-right">
|
|
|
+ <span @click="toggleDropdown">{{ user && user.name.slice(0, 1) }}</span>
|
|
|
+ <div class="line-container" :class="show && 'active'" @click="toggleMenu">
|
|
|
+ <div class="line"></div>
|
|
|
+ <div class="line"></div>
|
|
|
+ <div class="line"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<nav>
|
|
|
- <a class="link" href="http://test-pdf-pro.kdan.cn:3034">API Tools</a>
|
|
|
- <a class="link" href="http://test-pdf-pro.kdan.cn:3034/api/docs/introduction">Documentation</a>
|
|
|
- <a class="link" href="http://test-pdf-pro.kdan.cn:3034/api/contact">Pricing</a>
|
|
|
- <a class="link btn" href="http://test-pdf-pro.kdan.cn:3034/api/contact">Contact Us</a>
|
|
|
+ <a class="link" :href="apiDomain">API Tools</a>
|
|
|
+ <a class="link" :href="apiDomain + '/api/docs/introduction'">Documentation</a>
|
|
|
+ <a class="link" :href="apiDomain + '/api/contact'">Pricing</a>
|
|
|
+ <a class="link btn" :href="apiDomain + '/api/contact'">Contact Us</a>
|
|
|
</nav>
|
|
|
</div>
|
|
|
- <div class=""></div>
|
|
|
+ <div v-show="dropdownShow" class="dropdown-menu" :class="dropdownShow && 'active'">
|
|
|
+ <router-link @click.native="toggleDropdown" to="/dashboard" class="dropdown-item"><Dashboard /><span>Dashboard</span></router-link>
|
|
|
+ <div class="dropdown-item login-out" @click="loginOut"><Logout /><span>Log out</span></div>
|
|
|
+ </div>
|
|
|
<div v-if="$route.name !== 'login'" class="nav-right">
|
|
|
<el-popover ref="popover" placement="bottom-start" popper-class="dropdown-content" trigger="hover" :visible-arrow="false">
|
|
|
<router-link class="dropdown-item" to="/dashboard"><Dashboard /><span>Dashboard</span></router-link>
|
|
@@ -34,7 +40,7 @@
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
<div class="user-photo" v-popover:popover><p>{{ user && user.name.slice(0, 1) }}</p></div>
|
|
|
- <a class="link btn" href="http://test-pdf-pro.kdan.cn:3034/api/contact">Contact Us</a>
|
|
|
+ <a class="link btn" :href="apiDomain + '/api/contact'">Contact Us</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -63,10 +69,15 @@ export default Vue.extend({
|
|
|
data () {
|
|
|
return {
|
|
|
show: false,
|
|
|
- dropdownShow: false
|
|
|
+ dropdownShow: false,
|
|
|
+ apiDomain: process.env.VUE_APP_API_DOMAIN
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ toggleDropdown () {
|
|
|
+ this.dropdownShow = !this.dropdownShow
|
|
|
+ this.show = false
|
|
|
+ },
|
|
|
toggleMenu () {
|
|
|
this.show = !this.show
|
|
|
this.dropdownShow = false
|
|
@@ -75,7 +86,7 @@ export default Vue.extend({
|
|
|
apiLoginOut({}).then(res => {
|
|
|
loginStore().setAuth(false)
|
|
|
Cookie.remove('access_token')
|
|
|
- window.location.href = 'http://test-pdf-pro.kdan.cn:3034'
|
|
|
+ window.location.href = this.apiDomain
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -181,6 +192,25 @@ export default Vue.extend({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .min-nav-right {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ span {
|
|
|
+ flex: none;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 32px;
|
|
|
+ margin-right: 16px;
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 22px;
|
|
|
+ line-height: 32px;
|
|
|
+ color: #000000;
|
|
|
+ border-radius: 50%;
|
|
|
+ cursor: pointer;
|
|
|
+ background-color: #FFE248;
|
|
|
+ }
|
|
|
+ }
|
|
|
.nav-content {
|
|
|
.nav-left {
|
|
|
align-items: center;
|
|
@@ -249,6 +279,44 @@ export default Vue.extend({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .dropdown-menu {
|
|
|
+ position: fixed;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ width: 100%;
|
|
|
+ padding: 22px;
|
|
|
+ box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
|
|
|
+ background-color: #FFF;
|
|
|
+ border-bottom-right-radius: 8px;
|
|
|
+ border-bottom-left-radius: 8px;
|
|
|
+ .dropdown-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ & + .dropdown-item {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ cursor: pointer;
|
|
|
+ color: #43474D;
|
|
|
+ &.router-link-active {
|
|
|
+ color: #1460F3;
|
|
|
+ }
|
|
|
+ svg {
|
|
|
+ display: inline-block;
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ margin-left: 12px;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ &:active {
|
|
|
+ color: #1460F3;
|
|
|
+ background: rgba(20, 96, 243, 0.1);
|
|
|
+ border-radius: 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
@media screen and (max-width: 767px) {
|
|
|
.header {
|
|
@@ -259,7 +327,6 @@ export default Vue.extend({
|
|
|
}
|
|
|
@media screen and (max-width: 429px) {
|
|
|
.header {
|
|
|
- padding: 21px 16px 21px 27px;
|
|
|
.logo-title {
|
|
|
img {
|
|
|
width: 18.5px;
|
|
@@ -286,8 +353,8 @@ export default Vue.extend({
|
|
|
justify-content: space-between;
|
|
|
padding: 20px 40px;
|
|
|
}
|
|
|
- .line-container {
|
|
|
- display: none;
|
|
|
+ .min-nav-right, .dropdown-menu {
|
|
|
+ display: none !important;
|
|
|
}
|
|
|
.nav-content {
|
|
|
nav {
|