index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="container">
  3. <view class="header">
  4. <text class="title">社区</text>
  5. </view>
  6. <view class="content">
  7. <view class="placeholder">
  8. <text class="placeholder-text">🏘️</text>
  9. <text class="placeholder-title">社区功能</text>
  10. <text class="placeholder-desc">酒友交流社区正在建设中...</text>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. // 移除权限检查,游客可正常访问社区页面
  17. export default {
  18. name: 'Community',
  19. onLoad() {
  20. console.log('社区页面加载')
  21. },
  22. onShow() {
  23. // 更新自定义tabBar选中状态
  24. this.updateTabBar()
  25. },
  26. methods: {
  27. // 更新tabBar选中状态
  28. updateTabBar() {
  29. try {
  30. if (typeof this.getTabBar === 'function' && this.getTabBar()) {
  31. this.getTabBar().updateSelected(1) // 社区索引为1
  32. }
  33. } catch (error) {
  34. console.log('更新tabBar状态失败:', error)
  35. }
  36. },
  37. // 移除权限检查方法,游客可正常访问社区页面
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .container {
  43. min-height: 100vh;
  44. background: #f5f5f5;
  45. padding: 20rpx;
  46. }
  47. .header {
  48. padding: 30rpx 0;
  49. text-align: center;
  50. .title {
  51. font-size: 36rpx;
  52. font-weight: bold;
  53. color: #333;
  54. }
  55. }
  56. .content {
  57. flex: 1;
  58. display: flex;
  59. align-items: center;
  60. justify-content: center;
  61. min-height: 60vh;
  62. }
  63. .placeholder {
  64. text-align: center;
  65. padding: 60rpx;
  66. .placeholder-text {
  67. font-size: 120rpx;
  68. display: block;
  69. margin-bottom: 30rpx;
  70. }
  71. .placeholder-title {
  72. font-size: 32rpx;
  73. color: #333;
  74. font-weight: bold;
  75. display: block;
  76. margin-bottom: 20rpx;
  77. }
  78. .placeholder-desc {
  79. font-size: 28rpx;
  80. color: #666;
  81. display: block;
  82. }
  83. }
  84. </style>