混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

47 lines
1018 B

<template>
<view>
<user-hall ref="us" v-if="+this.role===0"></user-hall>
<staff-hall ref="ss" v-if="+this.role>0"></staff-hall>
</view>
</template>
<script>
import UserHall from '/pages/user/hall.vue'
import StaffHall from '/pages/staff/hall.vue'
export default {
components: {
UserHall, StaffHall
},
data() {
return {
role: "1"
}
},
onShow() {
this.role = uni.getStorageSync("role");
try{
if(+this.role===1){
this.$refs.ss.loadPage()
} else {
this.$refs.us.loadPage()
}
}catch(e){
//TODO handle the exception
}
if (+this.role===0){ uni.setNavigationBarTitle({ title: "抢单大厅" }) }
else if (+this.role===1){ uni.setNavigationBarTitle({ title: "我的订单" }) }
else if (+this.role===2){ uni.setNavigationBarTitle({ title: "员工订单" }) }
else if (+this.role===3){ uni.setNavigationBarTitle({ title: "区域订单" }) }
},
methods: {
}
}
</script>
<style>
page {
background-color: #f5f5f5;
}
</style>