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

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