index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. padding: 0;
  85. margin: 0;
  86. // width: 750rpx;
  87. min-height: 100%;
  88. }
  89. .content {
  90. display: flex;
  91. position: relative;
  92. flex-direction: column;
  93. .bg {
  94. position: absolute;
  95. width: 100%;
  96. height: 6000rpx;
  97. }
  98. .box {
  99. margin-top: 1480rpx;
  100. }
  101. .discounts {
  102. margin: 0 30rpx;
  103. display: flex;
  104. justify-content: center;
  105. position: relative;
  106. width: 690rpx;
  107. height: 890rpx;
  108. .discounts1 {
  109. width: 100%;
  110. height: 100%;
  111. }
  112. .money {
  113. margin: 0 auto;
  114. display: flex;
  115. justify-content: center;
  116. align-items: center;
  117. top: 0;
  118. margin-top: 250rpx;
  119. font-size: 36rpx;
  120. font-family: Source Han Sans CN;
  121. font-weight: bold;
  122. color: #c63535;
  123. line-height: 30rpx;
  124. position: absolute;
  125. text {
  126. font-size: 116rpx;
  127. font-family: Source Han Sans CN;
  128. font-weight: 800;
  129. color: #c63535;
  130. line-height: 115rpx;
  131. }
  132. }
  133. .baodan {
  134. position: absolute;
  135. top: 690rpx;
  136. width: 300rpx;
  137. height: 80rpx;
  138. image {
  139. width: 100%;
  140. height: 100%;
  141. }
  142. }
  143. }
  144. .earnings-box {
  145. position: relative;
  146. margin: 40rpx 30rpx;
  147. width: 690rpx;
  148. height: 1140rpx;
  149. .earnings {
  150. width: 100%;
  151. height: 100%;
  152. }
  153. .text-box {
  154. position: absolute;
  155. top: 184rpx;
  156. left: 110rpx;
  157. .textDetail {
  158. min-height: 134rpx;
  159. max-height: 140rpx;
  160. overflow: hidden;
  161. padding-bottom: 64rpx;
  162. .textDetail-title {
  163. font-size: 28rpx;
  164. font-family: PingFang SC;
  165. font-weight: bold;
  166. color: #4e2c0e;
  167. line-height: 30rpx;
  168. padding-bottom: 10rpx;
  169. }
  170. .textDetail-content {
  171. font-size: 30rpx;
  172. font-family: PingFang SC;
  173. font-weight: bold;
  174. color: #4e2c0e;
  175. line-height: 30rpx;
  176. }
  177. }
  178. }
  179. }
  180. }
  181. </style>