index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view>
  3. <ucenter v-if="page=='ucenter'"></ucenter>
  4. <res v-if="page=='res'"></res>
  5. <view class="cu-bar tabbar bg-white shadow foot">
  6. <view class="action" :class="page=='ucenter'?'text-green':'text-gray'" @click="goPage" data-cur="ucenter">
  7. <view class="cuIcon-homefill"></view> 首页
  8. </view>
  9. <view class="action" :class="page=='res'?'text-green':'text-gray'" @click="goPage" data-cur="res">
  10. <view class="cuIcon-similar"></view> 发现
  11. </view>
  12. <view class="action text-gray add-action">
  13. <button class="cu-btn cuIcon-add bg-green shadow"></button>
  14. 发布
  15. </view>
  16. <view class="action" :class="page=='protect'?'text-green':'text-gray'">
  17. <view class="cuIcon-my">
  18. <view class="cu-tag badge">99</view>
  19. </view>
  20. 守护
  21. </view>
  22. <view class="action text-gray">
  23. <view class="cuIcon-card">
  24. <view class="cu-tag badge"></view>
  25. </view>
  26. 时光
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. page: 'ucenter'
  36. }
  37. },
  38. onLoad: function(option) {
  39. //验证登录
  40. //this.Dever.checkLogin();
  41. //this.getList(1);
  42. },
  43. onShow: function() {},
  44. // 重新加载
  45. onPullDownRefresh: function() {
  46. },
  47. // 触底刷新
  48. onReachBottom: function() {
  49. //this.getList(2);
  50. //console.info(333);
  51. },
  52. methods: {
  53. goPage: function(e) {
  54. this.page = e.currentTarget.dataset.cur
  55. },
  56. }
  57. }
  58. </script>
  59. <style>
  60. </style>