index.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view>
  3. <home :cur="PageCur" v-if="PageCur=='home'" :key="commponent1Key"></home>
  4. <people v-if="PageCur=='people'" :key="commponent2Key"></people>
  5. <view class="cu-bar tabbar bg-white shadow foot">
  6. <view :class="PageCur=='home'?'action text-green':'action text-gray'" @click="NavChange" data-cur="home">
  7. <view class='cuIcon-homefill'></view>主页
  8. </view>
  9. <!-- <view :class="PageCur=='peoplelis'?'action text-green':'action text-gray'" @click="NavChange"
  10. data-cur="peoplelis">
  11. <view class='cuIcon-peoplelist'></view>审批
  12. </view>
  13. <view :class="PageCur=='profile'?'action text-green':'action text-gray'" @click="NavChange"
  14. data-cur="profile">
  15. <view class='cuIcon-profile'></view>发起
  16. </view> -->
  17. <view :class="PageCur=='people'?'action text-green':'action text-gray'" @click="NavChange"
  18. data-cur="people">
  19. <view class='cuIcon-people'></view>个人
  20. </view>
  21. </view>
  22. <uni-notice-bar show-icon scrollable style="position: fixed;bottom: 0rpx;"
  23. text="号外号外!罗湖网上委托平台上线啦!从此下单无忧,报告查询无忧,吃得好,睡得好,顶呱呱!" />
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. PageCur: 'home',
  31. commponent1Key: 0,
  32. commponent2Key: 0,
  33. }
  34. },
  35. onLoad: function() {
  36. console.log("登录成功,进入首页")
  37. this.PageCur = 'home'
  38. ++this.commponent1Key
  39. ++this.commponent2Key
  40. },
  41. methods: {
  42. NavChange: function(e) {
  43. this.PageCur = e.currentTarget.dataset.cur
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. </style>