index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view class="content">
  3. <view class="top"><image src="../../static/img/index/index.png" mode="" class="bg"></image></view>
  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)">立即援助</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 class="index1">
  25. <image src="../../static/img/index/index1.png" mode=""></image>
  26. <!-- <view class="bottom"></view> -->
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import { mapState, mapMutations } from 'vuex';
  32. import { activityList } from '@/api/active.js';
  33. import { saveUrl, interceptor } from '@/utils/loginUtils.js';
  34. export default {
  35. components: {},
  36. computed: {
  37. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  38. },
  39. data() {
  40. return {
  41. list: [],
  42. revenueList: [
  43. '5人x2000元=1万元',
  44. '25人x2000元=5万元',
  45. '125人x2000元=25万元 ',
  46. '625人x2000元=125万元',
  47. '3125人x2000元=625万元 ',
  48. '15625人x2000元=3125万元 ',
  49. '78125人x2000元=1.5625亿元'
  50. ]
  51. };
  52. },
  53. onShow() {
  54. if (this.hasLogin) {
  55. this.loadData();
  56. } else {
  57. uni.showModal({
  58. title: '登录',
  59. content: '您未登录,是否马上登陆?',
  60. success: e => {
  61. if (e.confirm) {
  62. saveUrl();
  63. interceptor();
  64. }
  65. },
  66. fail: e => {
  67. console.log(e);
  68. }
  69. });
  70. }
  71. },
  72. methods: {
  73. baodan(id) {
  74. if (!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit) {
  75. console.log(this.userInfo, '11111');
  76. uni.showModal({
  77. title: '提示',
  78. content: '您当前未填写银行卡信息和所属银行是否前往填写',
  79. success: function(res) {
  80. if (res.confirm) {
  81. uni.navigateTo({
  82. url: '/pages/set/userinfo'
  83. });
  84. } else if (res.cancel) {
  85. console.log('用户点击取消');
  86. }
  87. }
  88. });
  89. } else {
  90. uni.navigateTo({
  91. url: '/pages/index/info?id=' + id
  92. });
  93. }
  94. },
  95. loadData() {
  96. activityList({}).then(({ data }) => {
  97. this.list = data.list;
  98. });
  99. }
  100. }
  101. };
  102. </script>
  103. <style lang="scss" scoped>
  104. page {
  105. height: auto;
  106. }
  107. .content {
  108. .top {
  109. position: relative;
  110. display: flex;
  111. flex-direction: column;
  112. z-index: 10;
  113. .bg {
  114. width: 100%;
  115. height: 1480rpx;
  116. }
  117. }
  118. .box {
  119. .discounts {
  120. margin: 0 30rpx;
  121. display: flex;
  122. justify-content: center;
  123. position: relative;
  124. width: 690rpx;
  125. height: 890rpx;
  126. .discounts1 {
  127. width: 100%;
  128. height: 100%;
  129. }
  130. .money {
  131. margin: 0 auto;
  132. display: flex;
  133. justify-content: center;
  134. align-items: center;
  135. top: 0;
  136. margin-top: 250rpx;
  137. font-size: 36rpx;
  138. font-family: Source Han Sans CN;
  139. font-weight: bold;
  140. color: #c63535;
  141. line-height: 30rpx;
  142. position: absolute;
  143. text {
  144. font-size: 116rpx;
  145. font-family: Source Han Sans CN;
  146. font-weight: 800;
  147. color: #c63535;
  148. line-height: 115rpx;
  149. }
  150. }
  151. .baodan {
  152. position: absolute;
  153. top: 690rpx;
  154. width: 300rpx;
  155. height: 80rpx;
  156. text-align: center;
  157. line-height: 80rpx;
  158. color: #FFFFFF;
  159. background: #4E2C0E;
  160. font-size: 40rpx;
  161. border-radius: 10rpx;
  162. }
  163. }
  164. .earnings-box {
  165. z-index: 100;
  166. position: relative;
  167. margin: 40rpx 30rpx;
  168. width: 690rpx;
  169. height: 1140rpx;
  170. .earnings {
  171. width: 100%;
  172. height: 100%;
  173. }
  174. .text-box {
  175. position: absolute;
  176. top: 184rpx;
  177. left: 110rpx;
  178. .textDetail {
  179. min-height: 134rpx;
  180. max-height: 140rpx;
  181. overflow: hidden;
  182. padding-bottom: 64rpx;
  183. .textDetail-title {
  184. font-size: 28rpx;
  185. font-family: PingFang SC;
  186. font-weight: bold;
  187. color: #4e2c0e;
  188. line-height: 30rpx;
  189. padding-bottom: 10rpx;
  190. }
  191. .textDetail-content {
  192. font-size: 30rpx;
  193. font-family: PingFang SC;
  194. font-weight: bold;
  195. color: #4e2c0e;
  196. line-height: 30rpx;
  197. }
  198. }
  199. }
  200. }
  201. }
  202. .index1 {
  203. margin-top: -400rpx;
  204. width: 100%;
  205. height: 713rpx;
  206. image {
  207. width: 100%;
  208. height: 100%;
  209. }
  210. .bottom {
  211. width: 100%;
  212. height: 100rpx;
  213. }
  214. }
  215. }
  216. </style>