index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. price: 20000,
  37. list: [],
  38. revenueList: [
  39. '5人x2000元=1万元',
  40. '25人x2000元=5万元',
  41. '125人x2000元=25万元 ',
  42. '625人x2000元=125万元',
  43. '3125人x2000元=625万元 ',
  44. '15625人x2000元=3125万元 ',
  45. '78125人x2000元=1.5625亿元'
  46. ]
  47. };
  48. },
  49. onShow() {
  50. this.loadData();
  51. },
  52. methods: {
  53. baodan(id) {
  54. if(!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit){
  55. console.log(this.userInfo,"11111")
  56. uni.showModal({
  57. title: '提示',
  58. content: '您当前未填写银行卡信息和所属银行是否前往填写',
  59. success: function (res) {
  60. if (res.confirm) {
  61. uni.navigateTo({
  62. url:'/pages/set/userinfo'
  63. })
  64. } else if (res.cancel) {
  65. console.log('用户点击取消');
  66. }
  67. }
  68. });
  69. }else {
  70. uni.navigateTo({
  71. url:'/pages/index/info?id='+ id
  72. });
  73. }
  74. },
  75. loadData(){
  76. activityList({}).then(({data}) =>{
  77. this.list = data.list
  78. })
  79. }
  80. }
  81. };
  82. </script>
  83. <style lang="scss" scoped>
  84. page {
  85. padding: 0;
  86. margin: 0;
  87. // width: 750rpx;
  88. min-height: 100%;
  89. }
  90. .content {
  91. display: flex;
  92. position: relative;
  93. flex-direction: column;
  94. .bg {
  95. position: absolute;
  96. width: 100%;
  97. height: 6000rpx;
  98. }
  99. .box {
  100. margin-top: 1480rpx;
  101. }
  102. .discounts {
  103. margin: 0 30rpx;
  104. display: flex;
  105. justify-content: center;
  106. position: relative;
  107. width: 690rpx;
  108. height: 890rpx;
  109. .discounts1 {
  110. width: 100%;
  111. height: 100%;
  112. }
  113. .money {
  114. margin: 0 auto;
  115. display: flex;
  116. justify-content: center;
  117. align-items: center;
  118. top: 0;
  119. margin-top: 250rpx;
  120. font-size: 36rpx;
  121. font-family: Source Han Sans CN;
  122. font-weight: bold;
  123. color: #c63535;
  124. line-height: 30rpx;
  125. position: absolute;
  126. text {
  127. font-size: 116rpx;
  128. font-family: Source Han Sans CN;
  129. font-weight: 800;
  130. color: #c63535;
  131. line-height: 115rpx;
  132. }
  133. }
  134. .baodan {
  135. position: absolute;
  136. top: 690rpx;
  137. width: 300rpx;
  138. height: 80rpx;
  139. image {
  140. width: 100%;
  141. height: 100%;
  142. }
  143. }
  144. }
  145. .earnings-box {
  146. position: relative;
  147. margin: 40rpx 30rpx;
  148. width: 690rpx;
  149. height: 1140rpx;
  150. .earnings {
  151. width: 100%;
  152. height: 100%;
  153. }
  154. .text-box {
  155. position: absolute;
  156. top: 184rpx;
  157. left: 110rpx;
  158. .textDetail {
  159. min-height: 134rpx;
  160. max-height: 140rpx;
  161. overflow: hidden;
  162. padding-bottom: 64rpx;
  163. .textDetail-title {
  164. font-size: 28rpx;
  165. font-family: PingFang SC;
  166. font-weight: bold;
  167. color: #4e2c0e;
  168. line-height: 30rpx;
  169. padding-bottom: 10rpx;
  170. }
  171. .textDetail-content {
  172. font-size: 30rpx;
  173. font-family: PingFang SC;
  174. font-weight: bold;
  175. color: #4e2c0e;
  176. line-height: 30rpx;
  177. }
  178. }
  179. }
  180. }
  181. }
  182. </style>