混凝土运输管理微信小程序、替班
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

2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
1 week ago
2 months ago
2 months ago
1 week ago
  1. <template>
  2. <view>
  3. <user-hall ref="us" v-if="+this.role===0"></user-hall>
  4. <staff-hall ref="ss" v-if="+this.role>0"></staff-hall>
  5. </view>
  6. </template>
  7. <script>
  8. import UserHall from '/pages/user/hall.vue'
  9. import StaffHall from '/pages/staff/hall.vue'
  10. export default {
  11. components: {
  12. UserHall, StaffHall
  13. },
  14. data() {
  15. return {
  16. role: "1"
  17. }
  18. },
  19. onShow() {
  20. this.role = uni.getStorageSync("role");
  21. try{
  22. if(+this.role===1){
  23. this.$refs.ss.loadPage()
  24. } else {
  25. this.$refs.us.loadPage()
  26. }
  27. }catch(e){
  28. //TODO handle the exception
  29. }
  30. if (+this.role===0){ uni.setNavigationBarTitle({ title: "抢单大厅" }) }
  31. else if (+this.role===1){ uni.setNavigationBarTitle({ title: "我的订单" }) }
  32. else if (+this.role===2){ uni.setNavigationBarTitle({ title: "员工订单" }) }
  33. else if (+this.role===3){ uni.setNavigationBarTitle({ title: "区域订单" }) }
  34. },
  35. methods: {
  36. }
  37. }
  38. </script>
  39. <style>
  40. page {
  41. background-color: #f5f5f5;
  42. }
  43. </style>