index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view class="content">
  3. <image src="../../static/img/index/index.png" mode="" class="bg"></image>
  4. <view class="box">
  5. <view v-for="(item, index) in list" :key="index">
  6. <view class="discounts">
  7. <image src="../../static/img/index/youhui1.png" mode="" class="discounts1"></image>
  8. <view class="money">
  9. <text>{{ item.money }}</text>
  10. </view>
  11. <view class="baodan" @click="baodan(item.id)"><image src="../../static/img/index/baodan1.png" mode=""></image></view>
  12. </view>
  13. <view class="earnings-box">
  14. <image src="../../static/img/index/vip.png" mode="" class="earnings"></image>
  15. <view class="text-box">
  16. <view class="textDetail" v-for="(ls, index) in revenueList">
  17. <view class="textDetail-title">{{ index < 2 ? index + 1 + '层收益' : index + 1 + '层收益(黑钻VIP会员专属)' }}</view>
  18. <view class="textDetail-content">{{ ls }}</view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { mapState, mapMutations } from 'vuex';
  28. import { activityList } from '@/api/active.js';
  29. export default {
  30. components: {},
  31. computed:{
  32. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  33. },
  34. data() {
  35. return {
  36. list: [],
  37. revenueList: [
  38. '5人x2000元=1万元',
  39. '25人x2000元=5万元',
  40. '125人x2000元=25万元 ',
  41. '625人x2000元=125万元',
  42. '3125人x2000元=625万元 ',
  43. '15625人x2000元=3125万元 ',
  44. '78125人x2000元=1.5625亿元'
  45. ]
  46. };
  47. },
  48. onShow() {
  49. this.loadData();
  50. },
  51. methods: {
  52. baodan(id) {
  53. if(!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit){
  54. console.log(this.userInfo,"11111")
  55. uni.showModal({
  56. title: '提示',
  57. content: '您当前未填写银行卡信息和所属银行是否前往填写',
  58. success: function (res) {
  59. if (res.confirm) {
  60. uni.navigateTo({
  61. url:'/pages/set/userinfo'
  62. })
  63. } else if (res.cancel) {
  64. console.log('用户点击取消');
  65. }
  66. }
  67. });
  68. }else {
  69. uni.navigateTo({
  70. url:'/pages/index/info?id='+ id
  71. });
  72. }
  73. },
  74. loadData(){
  75. activityList({}).then(({data}) =>{
  76. this.list = data.list
  77. })
  78. }
  79. }
  80. };
  81. </script>
  82. <style lang="scss" scoped>
  83. page {
  84. height: auto;
  85. min-height: 100%;
  86. }
  87. .content {
  88. display: flex;
  89. position: relative;
  90. flex-direction: column;
  91. .bg {
  92. position: absolute;
  93. width: 100%;
  94. height: 6000rpx;
  95. }
  96. .box {
  97. margin-top: 1480rpx;
  98. }
  99. .discounts {
  100. margin: 0 30rpx;
  101. display: flex;
  102. justify-content: center;
  103. position: relative;
  104. width: 690rpx;
  105. height: 890rpx;
  106. .discounts1 {
  107. width: 100%;
  108. height: 100%;
  109. }
  110. .money {
  111. margin: 0 auto;
  112. display: flex;
  113. justify-content: center;
  114. align-items: center;
  115. top: 0;
  116. margin-top: 250rpx;
  117. font-size: 36rpx;
  118. font-family: Source Han Sans CN;
  119. font-weight: bold;
  120. color: #c63535;
  121. line-height: 30rpx;
  122. position: absolute;
  123. text {
  124. font-size: 116rpx;
  125. font-family: Source Han Sans CN;
  126. font-weight: 800;
  127. color: #c63535;
  128. line-height: 115rpx;
  129. }
  130. }
  131. .baodan {
  132. position: absolute;
  133. top: 690rpx;
  134. width: 300rpx;
  135. height: 80rpx;
  136. image {
  137. width: 100%;
  138. height: 100%;
  139. }
  140. }
  141. }
  142. .earnings-box {
  143. position: relative;
  144. margin: 40rpx 30rpx;
  145. width: 690rpx;
  146. height: 1140rpx;
  147. .earnings {
  148. width: 100%;
  149. height: 100%;
  150. }
  151. .text-box {
  152. position: absolute;
  153. top: 184rpx;
  154. left: 110rpx;
  155. .textDetail {
  156. min-height: 134rpx;
  157. max-height: 140rpx;
  158. overflow: hidden;
  159. padding-bottom: 64rpx;
  160. .textDetail-title {
  161. font-size: 28rpx;
  162. font-family: PingFang SC;
  163. font-weight: bold;
  164. color: #4e2c0e;
  165. line-height: 30rpx;
  166. padding-bottom: 10rpx;
  167. }
  168. .textDetail-content {
  169. font-size: 30rpx;
  170. font-family: PingFang SC;
  171. font-weight: bold;
  172. color: #4e2c0e;
  173. line-height: 30rpx;
  174. }
  175. }
  176. }
  177. }
  178. }
  179. </style>