裂变星小程序-25.03.04
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.

123 lines
2.0 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <image src="../../static/image/home/bg.png" class="bg" mode="scaleToFill"></image>
  4. <view class="content">
  5. <navbar title="首页" bgColor="transparent" color="#FFFFFF" />
  6. <view class="btns">
  7. <button
  8. v-for="item in list"
  9. :key="item.title"
  10. class="btn"
  11. plain
  12. @click="onClick(item.path)"
  13. >
  14. {{ item.title }}
  15. </button>
  16. </view>
  17. </view>
  18. <tabber select="home"/>
  19. </view>
  20. </template>
  21. <script>
  22. import { mapState } from 'vuex'
  23. import tabber from '@/components/base/tabbar.vue'
  24. export default {
  25. components : {
  26. tabber,
  27. },
  28. data() {
  29. return {
  30. list: [
  31. {
  32. title: '个人分享',
  33. path: '/pages_order/record/personalSharing'
  34. },
  35. {
  36. title: '视频分享',
  37. path: '/pages_order/record/videoSharing'
  38. },
  39. {
  40. title: '群分享',
  41. path: '/pages_order/record/groupSharing'
  42. },
  43. {
  44. title: '文章分享',
  45. path: '/pages_order/record/articleSharing'
  46. },
  47. ]
  48. }
  49. },
  50. computed: {
  51. ...mapState(['userInfo']),
  52. },
  53. onLoad() {
  54. if (uni.getStorageSync('token') && !this.userInfo?.id) {
  55. this.$store.commit('getUserInfo')
  56. }
  57. },
  58. methods: {
  59. onClick(url) {
  60. if (!uni.getStorageSync('token')) {
  61. uni.navigateTo({
  62. url: '/pages_order/auth/wxLogin'
  63. })
  64. return
  65. }
  66. this.$utils.navigateTo(url)
  67. }
  68. },
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .page{
  73. & /deep/ .uv-icon__icon{
  74. font-size: 30rpx !important;
  75. }
  76. position: relative;
  77. height: 100vh;
  78. overflow: hidden;
  79. .btns {
  80. display: grid;
  81. grid-column-gap: 34rpx;
  82. grid-row-gap: 34rpx;
  83. grid-template-columns: repeat(2, 1fr);
  84. position: absolute;
  85. bottom: 466rpx;
  86. width: 100%;
  87. padding: 0 58rpx;
  88. box-sizing: border-box;
  89. }
  90. .btn {
  91. color: $uni-text-color-highlight;
  92. border-color: #04D6A3;
  93. width: 100%;
  94. padding: 55rpx 0;
  95. }
  96. }
  97. .bg {
  98. width: 100vw;
  99. height: 100vh;
  100. }
  101. .content {
  102. position: absolute;
  103. width: 100vw;
  104. height: 100vh;
  105. top: 0;
  106. }
  107. </style>