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

162 lines
2.9 KiB

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