|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
|
|
|
|
|
|
|
|
<view class="footer-nav row"> |
|
|
|
<view class="footer-nav row"> |
|
|
|
<view class="nav-item col-3 row" v-for="(item,index) in buttonGroup" @click="commitFootCheck(item)"> |
|
|
|
<view class="nav-item col-3 row" v-for="(item,index) in button" @click="commitFootCheck(item)"> |
|
|
|
<view class="nav-ico col-12"> |
|
|
|
<view class="nav-ico col-12"> |
|
|
|
<image mode="heightFix" class="img" :src="item.image+((item.name === footCheck)?'-active':'')+'.png'"/> |
|
|
|
<image mode="heightFix" class="img" :src="item.image+((item.name === footCheck)?'-active':'')+'.png'"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -16,63 +16,38 @@ |
|
|
|
import { |
|
|
|
import { |
|
|
|
imghost |
|
|
|
imghost |
|
|
|
} from '@/config/host.js' |
|
|
|
} from '@/config/host.js' |
|
|
|
|
|
|
|
import api from "@/utils/functions"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: {}, |
|
|
|
props: { |
|
|
|
|
|
|
|
button:{ |
|
|
|
|
|
|
|
type:Object, |
|
|
|
|
|
|
|
default:[], |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
footCheck: 'home', |
|
|
|
footCheck: 'home', |
|
|
|
title: 'Hello', |
|
|
|
title: 'Hello', |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
buttonGroup: [{ |
|
|
|
marginTop:0, |
|
|
|
image: imghost + "/static/image/foot-1", |
|
|
|
|
|
|
|
name: 'home', |
|
|
|
|
|
|
|
title: '暖新人', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
image: imghost + "/static/image/foot-2", |
|
|
|
|
|
|
|
name: 'order', |
|
|
|
|
|
|
|
title: '暖新活动', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
image: imghost + "/static/image/foot-3", |
|
|
|
|
|
|
|
name: 'shop', |
|
|
|
|
|
|
|
title: '暖新商城', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
image: imghost + "/static/image/foot-4", |
|
|
|
|
|
|
|
name: 'user', |
|
|
|
|
|
|
|
title: '我的', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
commitFootCheck(item) { |
|
|
|
commitFootCheck(item) { |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
if (item.name === 'order' || item.name === 'chat') { |
|
|
|
if(item.name !== 'disabled'){ |
|
|
|
this.$refs.uToast.show({ |
|
|
|
that.footCheck = item.name; |
|
|
|
type: 'default', |
|
|
|
|
|
|
|
message: "暂未开放,敬请期待", |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.$store.commit('footCheck', item.name); |
|
|
|
that.$emit('change',item) |
|
|
|
this.$store.commit('title', item.title); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
isFootCheck() { |
|
|
|
|
|
|
|
// return this.; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
"$store.state.footCheck": { |
|
|
|
|
|
|
|
handler(newVal, oldVal) { |
|
|
|
|
|
|
|
this.footCheck = newVal; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|