index.1.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <view class="page">
  3. <uni-list>
  4. <uni-list-item title="朋友圈"
  5. :show-arrow="true"
  6. :show-badge="true"
  7. badge-type="error"
  8. :badge-text="showTips"
  9. thumb="../../static/theme/default/push/circle.png"
  10. @click="goPath('circle')"
  11. />
  12. </uni-list>
  13. <uni-list>
  14. <uni-list-item title="扫一扫"
  15. :show-arrow="true"
  16. thumb="../../static/theme/default/push/scan.png"
  17. />
  18. <uni-list-item title="摇一摇"
  19. :show-arrow="true"
  20. :show-badge="true"
  21. badge-type="error"
  22. :badge-text="showTips"
  23. thumb="../../static/theme/default/push/icon_shake.png"
  24. @click="goPath('circle')"
  25. />
  26. </uni-list>
  27. <uni-list>
  28. <uni-list-item title="看一看"
  29. :show-arrow="true"
  30. thumb="../../static/theme/default/push/see.png"
  31. />
  32. <uni-list-item title="搜一搜"
  33. :show-arrow="true"
  34. thumb="../../static/theme/default/push/search.png"
  35. />
  36. </uni-list>
  37. <uni-list>
  38. <uni-list-item title="附近的人"
  39. :show-arrow="true"
  40. :show-badge="true"
  41. badge-type="error"
  42. :badge-text="showTips"
  43. thumb="../../static/theme/default/push/icon_nearby.png"
  44. @click="goPath('game_site')"
  45. />
  46. </uni-list>
  47. <uni-list>
  48. <uni-list-item title="游戏"
  49. :show-arrow="true"
  50. thumb="../../static/theme/default/push/game.png"
  51. @click="goPath('game_list')"
  52. />
  53. </uni-list>
  54. <uni-list>
  55. <uni-list-item title="小程序"
  56. :show-arrow="true"
  57. thumb="../../static/theme/default/push/program.png"
  58. />
  59. </uni-list>
  60. </view>
  61. </template>
  62. <script>
  63. import uniList from '../../components/uni-ui/uni-list/uni-list.vue';
  64. import uniListItem from '../../components/uni-ui/uni-list-item/uni-list-item.vue';
  65. import _get from '../../common/_get';
  66. import _hook from '../../common/_hook';
  67. export default {
  68. components: {
  69. uniList,
  70. uniListItem,
  71. },
  72. data() {
  73. return {
  74. }
  75. },
  76. onShow(){
  77. _hook.routeTabBarHook();
  78. },
  79. onLoad() {
  80. },
  81. computed: {
  82. showTips(){
  83. if(this.$store.state.no_reader_circle_chat_num){
  84. return this.$store.state.no_reader_circle_chat_num;
  85. }
  86. if(this.$store.state.no_reader_circle){
  87. return ' ';
  88. }
  89. return '';
  90. },
  91. },
  92. methods: {
  93. goPath(path){
  94. if(path){
  95. uni.navigateTo({
  96. url: path
  97. });
  98. }
  99. },
  100. },
  101. }
  102. </script>
  103. <style>
  104. .uni-list {
  105. margin-bottom: 30upx;
  106. }
  107. </style>