|
@@ -0,0 +1,172 @@
|
|
|
+<template>
|
|
|
+ <div class="search-camera" :style="{paddingLeft: split+'px'}" :class="{active: active}" ref="layout">
|
|
|
+ <router-link :to="item.to" tag="a" class="camera" v-for="(item,i) in arr" :key="i" :style="{transitionDelay: i*50+'ms'}">
|
|
|
+ <vcenter>
|
|
|
+ <i class="iconfont" :class="item.icon"></i>
|
|
|
+ <div style="margin-top:10px;">{{item.name}}</div>
|
|
|
+ </vcenter>
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import vcenter from '@/components/vcenter'
|
|
|
+const setting = {
|
|
|
+ 'product': [
|
|
|
+ {
|
|
|
+ icon: 'icon-icon_cam_lite',
|
|
|
+ name: '双目相机',
|
|
|
+ to: {name: 'product'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-icon_cam_pro',
|
|
|
+ name: '即将上市',
|
|
|
+ to: {name: 'product'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-icon_cam_fitting',
|
|
|
+ name: '即将上市',
|
|
|
+ to: {name: 'product'}
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'service': [
|
|
|
+ {
|
|
|
+ icon: 'icon-tutorial',
|
|
|
+ name: '使用教程',
|
|
|
+ to: {name: 'service_list', params: {id: 'use'}}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-faq',
|
|
|
+ name: '常见问题',
|
|
|
+ to: {name: 'service_list', params: {id: 'qa'}}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-appdown',
|
|
|
+ name: 'app下载',
|
|
|
+ to: {name: 'service_down'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-service',
|
|
|
+ name: '维修服务',
|
|
|
+ to: {name: 'service_support'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-protocol',
|
|
|
+ name: '网站条款',
|
|
|
+ to: {name: 'service_list', params: {id: 'clause'}}
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 'case': [
|
|
|
+ {
|
|
|
+ icon: 'icon-industry_realty',
|
|
|
+ name: '房地产',
|
|
|
+ to: {name: 'service_list', params: {id: 'use'}}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-industry_museum',
|
|
|
+ name: '博物馆',
|
|
|
+ to: {name: 'service_list', params: {id: 'qa'}}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-industry_industry',
|
|
|
+ name: '工业',
|
|
|
+ to: {name: 'service_down'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-industry_gover',
|
|
|
+ name: '政务',
|
|
|
+ to: {name: 'service_support'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-industry_ecom',
|
|
|
+ name: '电商',
|
|
|
+ to: {name: 'service_support'}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-industry_catering',
|
|
|
+ name: '餐饮',
|
|
|
+ to: {name: 'service_list', params: {id: 'clause'}}
|
|
|
+ }, {
|
|
|
+ icon: 'icon-industry_app',
|
|
|
+ name: 'app',
|
|
|
+ to: {name: 'service_list', params: {id: 'clause'}}
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ 'split': {
|
|
|
+ default: 0
|
|
|
+ },
|
|
|
+ 'origin': {
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ active: false,
|
|
|
+ arr: undefined
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ vcenter
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ origin: {
|
|
|
+ handler (newVal, oldVal) {
|
|
|
+ if (oldVal) {
|
|
|
+ this.active = false
|
|
|
+ setTimeout(() => {
|
|
|
+ this.showNav()
|
|
|
+ }, 400 + 50 * setting[oldVal].length)
|
|
|
+ } else {
|
|
|
+ this.active = false
|
|
|
+ this.showNav()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showNav () {
|
|
|
+ this.arr = setting[this.origin]
|
|
|
+ setTimeout(() => {
|
|
|
+ this.active = true
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+$lHeight: 145px;
|
|
|
+
|
|
|
+.search-camera {
|
|
|
+ background-color: #fff;
|
|
|
+ height: $lHeight;
|
|
|
+ border-bottom: 1px solid #e5e5e5;
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .camera {
|
|
|
+ max-width: 120px;
|
|
|
+ flex: 1;
|
|
|
+ padding: 0 30px;
|
|
|
+ line-height: 1;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #b6b6b6;
|
|
|
+ cursor: pointer;
|
|
|
+ height: 100%;
|
|
|
+ transition: all .7s cubic-bezier(.77, 0, .175, 1);
|
|
|
+ transform: translateX(100px);
|
|
|
+ opacity: 0;
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+
|
|
|
+ i {
|
|
|
+ font-size: 60px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ .camera {
|
|
|
+ opacity: 1;
|
|
|
+ transform: translateX(0)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|