| | |
| | | <template> |
| | | <view class="footer flex"> |
| | | <view v-for="(item,index) in tabBar" :key="index" class="footer-item"> |
| | | <view class="item flex" :class="[flg==index?'cur':'']" @click="go(index,item)"> |
| | | <view class="footer flex farmer-footer"> |
| | | <view v-for="(item,index) in tabBar" :key="index" class="footer-item" :class="[flg==index?'cur':'']"> |
| | | <view class="item flex" @click="go(index,item)"> |
| | | |
| | | <view v-if="index==0"> |
| | | <image src="../../static/imgs/footer/footer-home-1.png" class="footer-icon" :class="(''+index)" v-if="flg==0"></image> |
| | | <image src="../../static/imgs/footer/footer-home-0.png" class="footer-icon" :class="(''+index)" v-if="flg!=0"></image> |
| | | <image src="../../static/imgs/footer/footer-home-1.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" |
| | | v-if="flg==0"></image> |
| | | <image src="../../static/imgs/footer/footer-home-0.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" |
| | | v-if="flg!=0"></image> |
| | | </view> |
| | | <view v-if="index==1"> |
| | | <image src="../../static/imgs/footer/footer-self-1.png" class="footer-icon" :class="(''+index)" v-if="flg==2"></image> |
| | | <image src="../../static/imgs/footer/footer-self-0.png" class="footer-icon" :class="(''+index)" v-if="flg!=2"></image> |
| | | <image src="../../static/imgs/footer/footer-self-1.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" |
| | | v-if="flg==2"></image> |
| | | <image src="../../static/imgs/footer/footer-self-0.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" |
| | | v-if="flg!=2"></image> |
| | | </view> |
| | | <view> |
| | | <view class="m-l-0 m-r-a"> |
| | | {{item.text}} |
| | | </view> |
| | | |
| | |
| | | </view> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tabBar: [ |
| | | |
| | | { |
| | | "pagePath": "/pages/home/shop-home", |
| | | "pagePath": "/pages/home/farmer-home", |
| | | "iconPath": "/static/tabbar/home.png", |
| | | "selectedIconPath": "/static/tabbar/home_s.png", |
| | | "text": "工作台" |
| | | }, |
| | | { |
| | | "pagePath": "/pages/user/shop-user", |
| | | "pagePath": "/pages/user/farmer-user", |
| | | "iconPath": "/static/tabbar/my.png", |
| | | "selectedIconPath": "/static/tabbar/my_s.png", |
| | | "text": "我的" |
| | |
| | | }, |
| | | methods: { |
| | | go(index, item) { |
| | | if (index == 1) { |
| | | return |
| | | } |
| | | if (this.flg == ('' + index)) { |
| | | return |
| | | } |