Browse Source

地图打点

1.0
396316021 2 years ago
parent
commit
13f0e4a59e
  1. 53
      components/FooterNav/index.vue
  2. 990
      pages/Index/components/ShopPage/index.vue
  3. 45
      pages/Index/index.vue

53
components/FooterNav/index.vue

@ -1,7 +1,7 @@
<template>
<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">
<image mode="heightFix" class="img" :src="item.image+((item.name === footCheck)?'-active':'')+'.png'"/>
</view>
@ -16,63 +16,38 @@
import {
imghost
} from '@/config/host.js'
import api from "@/utils/functions";
export default {
props: {},
props: {
button:{
type:Object,
default:[],
}
},
data() {
return {
footCheck: 'home',
title: 'Hello',
loading: true,
buttonGroup: [{
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: '我的',
},
],
marginTop:0,
}
},
onLoad() {
},
methods: {
commitFootCheck(item) {
let that = this;
if (item.name === 'order' || item.name === 'chat') {
this.$refs.uToast.show({
type: 'default',
message: "暂未开放,敬请期待",
})
return false;
if(item.name !== 'disabled'){
that.footCheck = item.name;
}
this.$store.commit('footCheck', item.name);
this.$store.commit('title', item.title);
that.$emit('change',item)
},
isFootCheck() {
// return this.;
}
},
watch: {
"$store.state.footCheck": {
handler(newVal, oldVal) {
this.footCheck = newVal;
}
}
}
}
</script>

990
pages/Index/components/ShopPage/index.vue

File diff suppressed because it is too large Load Diff

45
pages/Index/index.vue

@ -25,10 +25,12 @@
@change="change1"
>
<FooterNav style="width:100%;"></FooterNav>
<FooterNav :button="buttonGroup" style="width:100%;" @change="footSelect"></FooterNav>
</u-tabbar>
<u-modal :show="show" title="登录" content="当前未登录是否前往登录" @confirm="userLogin" @cancel="this.show = false;"
:closeOnClickOverlay="true" showCancelButton></u-modal>
<u-notify ref="uNotify" message="Hi uview-plus"></u-notify>
</template>
<script>
@ -56,21 +58,62 @@
},
data() {
return {
marginTop:0,
value1: 0,
footCheck: 'home',
show: false,
title: '标题',
buttonGroup:[{
image: imghost + "/static/image/foot-1",
name: 'home',
title: '暖新人',
},
{
image: imghost + "/static/image/foot-2",
name: 'disabled',
title: '暖新活动',
},
{
image: imghost + "/static/image/foot-3",
name: 'shop',
title: '暖新商城',
},
{
image: imghost + "/static/image/foot-4",
name: 'user',
title: '我的',
},],
}
},
onLoad() {
},
onReady() {
let that = this;
// let height = api.wxSystemInfo().system.windowHeight
this.marginTop = (uni.$u.getPx(44) + uni.$u.sys().statusBarHeight)
},
onReachBottom() {
if(this.footCheck === 'shop'){
this.$refs.shop.getRoomList();
}
},
methods: {
footSelect(item){
if(item.name === 'disabled'){
this.$refs.uNotify.show({
top: this.marginTop+'px',
type: 'warning',
message: '暂未开放,敬请期待',
duration: 1000 * 5,
fontSize: 32,
safeAreaInsetTop:false
})
return false;
}
this.footCheck = item.name;
this.title = item.title;
},
change1(e) {
this.value1=e
},

Loading…
Cancel
Save