side-nav添加交互
This commit is contained in:
parent
b1c1bd0da0
commit
f0d8e1da4d
@ -1,7 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="side-content">
|
<div class="side-content">
|
||||||
<ul class="side-nav">
|
<ul class="side-nav">
|
||||||
<li class="side-item" v-for="(item, index) in sideiItem" :key="index">
|
<li
|
||||||
|
class="side-item"
|
||||||
|
v-for="(item, index) in sideiItem"
|
||||||
|
:key="index"
|
||||||
|
@click="jump(item)"
|
||||||
|
>
|
||||||
<div class="side-label">
|
<div class="side-label">
|
||||||
<img :src="item.icon" :alt="item.label" />
|
<img :src="item.icon" :alt="item.label" />
|
||||||
<h4>{{ item.label }}</h4>
|
<h4>{{ item.label }}</h4>
|
||||||
@ -19,18 +24,28 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SideNav',
|
name: 'SideNav',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sideiItem: [
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState({
|
||||||
|
footerInfo: state => state.footerInfo
|
||||||
|
}),
|
||||||
|
sideiItem() {
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
icon: require('../assets/image/icon/contact.png'),
|
icon: require('../assets/image/icon/contact.png'),
|
||||||
label: this.$t('common.Contact'),
|
label: this.$t('common.Contact'),
|
||||||
desc: `<div>
|
url: `tel:${this.footerInfo.tel}`,
|
||||||
|
desc: `<div">
|
||||||
<h6>${this.$t('contactUs.contactUs')}</h6>
|
<h6>${this.$t('contactUs.contactUs')}</h6>
|
||||||
<p>0086 182 5311 2969</p>
|
<p>${this.footerInfo.tel}</p>
|
||||||
</div>`
|
</div>`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -40,15 +55,30 @@ export default {
|
|||||||
{
|
{
|
||||||
icon: require('../assets/image/icon/whats.png'),
|
icon: require('../assets/image/icon/whats.png'),
|
||||||
label: this.$t('common.Whats'),
|
label: this.$t('common.Whats'),
|
||||||
|
url: `https://wa.me/${this.footerInfo.whatsapp}`,
|
||||||
|
desc: `<div>
|
||||||
|
<h6>${this.$t('common.Whats')}</h6>
|
||||||
|
<p>${this.footerInfo.whatsapp}</p>
|
||||||
|
</div>`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: require('../assets/image/icon/email1.png'),
|
icon: require('../assets/image/icon/email1.png'),
|
||||||
label: this.$t('common.E-mail'),
|
label: this.$t('common.E-mail'),
|
||||||
|
url: `mailto:${this.footerInfo.email}`,
|
||||||
|
desc: `<div>
|
||||||
|
<h6>${this.$t('common.E-mail')}</h6>
|
||||||
|
<p>${this.footerInfo.email}</p>
|
||||||
|
</div>`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
jump(row) {
|
||||||
|
if (row.url) {
|
||||||
|
window.open(row.url)
|
||||||
|
}
|
||||||
|
},
|
||||||
goTop() {
|
goTop() {
|
||||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
4
env.js
4
env.js
@ -8,8 +8,8 @@ module.exports = {
|
|||||||
// 开发环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api
|
// 开发环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api
|
||||||
dev: {
|
dev: {
|
||||||
MODE: 'dev',
|
MODE: 'dev',
|
||||||
// VUE_APP_API_URL: 'http://114.132.197.85:8099/',
|
VUE_APP_API_URL: 'http://1.92.99.15:8099/',
|
||||||
VUE_APP_API_URL: 'http://192.168.1.13:8099/',
|
// VUE_APP_API_URL: 'http://192.168.1.13:8099/',
|
||||||
VUE_APP_WEBSOCKET: 'ws://192.168.1.13:8099/ws/asset/'
|
VUE_APP_WEBSOCKET: 'ws://192.168.1.13:8099/ws/asset/'
|
||||||
},
|
},
|
||||||
// 生产环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api 非独立部署默认为空
|
// 生产环境 接口请求地址 (http)或(https)://www.a.com(换成你的域名)/api 非独立部署默认为空
|
||||||
|
Loading…
Reference in New Issue
Block a user