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

146 lines
2.5 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month 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. <popupAuditMsg ref="popupAuditMsgRef"></popupAuditMsg>
  19. <tabber select="home"/>
  20. </view>
  21. </template>
  22. <script>
  23. import { mapState } from 'vuex'
  24. import tabber from '@/components/base/tabbar.vue'
  25. import popupAuditMsg from '@/components/home/popupAuditMsg.vue'
  26. export default {
  27. components : {
  28. tabber,
  29. popupAuditMsg,
  30. },
  31. data() {
  32. return {
  33. list: [
  34. {
  35. title: '个人分享',
  36. path: '/pages_order/record/personalSharing'
  37. },
  38. {
  39. title: '视频分享',
  40. path: '/pages_order/record/videoSharing'
  41. },
  42. {
  43. title: '群分享',
  44. path: '/pages_order/record/groupSharing'
  45. },
  46. {
  47. title: '文章分享',
  48. path: '/pages_order/record/articleSharing'
  49. },
  50. ],
  51. }
  52. },
  53. computed: {
  54. ...mapState(['userInfo']),
  55. },
  56. onLoad(option) {
  57. const { state, shareId } = option
  58. if (shareId) {
  59. uni.setStorageSync('shareId', shareId)
  60. }
  61. if (state) {
  62. uni.setStorageSync('state', state)
  63. }
  64. if (shareId && !uni.getStorageSync('token')) {
  65. uni.navigateTo({
  66. url: '/pages_order/auth/wxLogin'
  67. })
  68. return
  69. }
  70. if (uni.getStorageSync('token') && !this.userInfo?.id) {
  71. this.$store.commit('getUserInfo')
  72. }
  73. },
  74. methods: {
  75. onClick(url) {
  76. if (!uni.getStorageSync('token')) {
  77. uni.navigateTo({
  78. url: '/pages_order/auth/wxLogin'
  79. })
  80. return
  81. }
  82. this.$utils.navigateTo(url)
  83. }
  84. },
  85. }
  86. </script>
  87. <style scoped lang="scss">
  88. .page{
  89. & /deep/ .uv-icon__icon{
  90. font-size: 30rpx !important;
  91. }
  92. position: relative;
  93. height: 100vh;
  94. overflow: hidden;
  95. .btns {
  96. display: grid;
  97. grid-column-gap: 34rpx;
  98. grid-row-gap: 34rpx;
  99. grid-template-columns: repeat(2, 1fr);
  100. position: absolute;
  101. bottom: 360rpx;
  102. width: 100%;
  103. padding: 0 58rpx;
  104. box-sizing: border-box;
  105. }
  106. .btn {
  107. color: $uni-text-color-highlight;
  108. border-color: #04D6A3;
  109. width: 100%;
  110. padding: 55rpx 0;
  111. }
  112. }
  113. .bg {
  114. width: 100vw;
  115. height: 100vh;
  116. }
  117. .content {
  118. position: absolute;
  119. width: 100vw;
  120. height: 100vh;
  121. top: 0;
  122. }
  123. </style>