123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <template >
- <view>
- <u-tabbar v-model="myCurrent" :list="tabbarList"
- :before-switch="beforeSwitch" active-color="#1F4A99" inactive-color="#B3BED1" ></u-tabbar>
-
- </view>
- </template>
- <script>
- var img1=require('@/components/bar-chart-box-fill 1.png')
- var img2=require('@/components/bar-chart-box-fill 2.png')
- var img3=require('@/components/file-list-3-fill.png')
- var img4=require('@/components/file-list-3-fill (1).png')
- export default {
- name:"tabbarJob",
- props:{
- current: 0,
- elderStatus: false
- },
- data() {
- return {
- activeColor:"#1F4A99",
- oldindex:this.current,
- myCurrent:this.current,
- tabbarList: [
- {
-
- iconPath: img2,
- selectedIconPath: img1,
- text: '数据统计 ',
- pagePath2:"/pages/canteenManagement/dataStatistics/dataStatistics",
- login:false,
- },
- {
-
- iconPath: img4,
- selectedIconPath: img3,
- text: '消费明细 ',
- login:true,
- pagePath2:"/pages/canteenManagement/consumption/consumption",
-
-
- },
- {
- iconPath: "account",
- selectedIconPath: "account-fill",
- text: '个人中心',
- login:true,
- pagePath2:"/pages/canteenManagement/mine/mine",
- }
- ],
- };
-
- },methods:{
- setcount(c){
- //this.myCurrent=c
- },
- beforeSwitch(index){
-
- var bl=false
-
- if(index==this.current){
-
- return false
- }
- //this.myCurrent=index
- var url =this.tabbarList[index].pagePath2;
-
- if(this.tabbarList[index].login){
- var userInfo=this.carhelp.getPersonInfo()
- if(userInfo){
-
- }else{
- url="/pages/login/index"
- bl=true
- }
-
- }
- uni.navigateTo({
- url: url
- })
-
-
-
- },
-
- },
- mounted(){
-
- },destroyed(){
-
- }
-
-
- }
- </script>
- <style>
-
- </style>
|