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

150 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 { id, state, shareId } = option
  58. if (shareId) {
  59. uni.setStorageSync('shareId', shareId)
  60. }
  61. if (state) {
  62. uni.setStorageSync('state', state)
  63. }
  64. if (id) {
  65. uni.setStorageSync('id', id)
  66. }
  67. if (shareId && !uni.getStorageSync('token')) {
  68. uni.navigateTo({
  69. url: '/pages_order/auth/wxLogin'
  70. })
  71. return
  72. }
  73. if (uni.getStorageSync('token') && !this.userInfo?.id) {
  74. this.$store.commit('getUserInfo')
  75. }
  76. },
  77. methods: {
  78. onClick(url) {
  79. if (!uni.getStorageSync('token')) {
  80. uni.navigateTo({
  81. url: '/pages_order/auth/wxLogin'
  82. })
  83. return
  84. }
  85. this.$utils.navigateTo(url)
  86. }
  87. },
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .page{
  92. & /deep/ .uv-icon__icon{
  93. font-size: 30rpx !important;
  94. }
  95. position: relative;
  96. height: 100vh;
  97. overflow: hidden;
  98. .btns {
  99. display: grid;
  100. grid-column-gap: 34rpx;
  101. grid-row-gap: 34rpx;
  102. grid-template-columns: repeat(2, 1fr);
  103. position: absolute;
  104. bottom: 360rpx;
  105. width: 100%;
  106. padding: 0 58rpx;
  107. box-sizing: border-box;
  108. }
  109. .btn {
  110. color: $uni-text-color-highlight;
  111. border-color: #04D6A3;
  112. width: 100%;
  113. padding: 55rpx 0;
  114. }
  115. }
  116. .bg {
  117. width: 100vw;
  118. height: 100vh;
  119. }
  120. .content {
  121. position: absolute;
  122. width: 100vw;
  123. height: 100vh;
  124. top: 0;
  125. }
  126. </style>