index.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <view class="box-data">
  3. <header class="header">
  4. <image class="hd-logo" src="/static/img/icon/logow.png" mode="aspectFill" />
  5. </header>
  6. <view class="mui-content">
  7. <swiper class="swiper-box"
  8. :indicator-dots="true"
  9. :autoplay="true"
  10. indicator-color="#FFFFFF"
  11. indicator-active-color="#007aff"
  12. >
  13. <swiper-item class="swiper-item" v-for="banner in bannerList">
  14. <image :src="banner.image" mode="aspectFill"></image>
  15. </swiper-item>
  16. </swiper>
  17. <view class="ln-notice">
  18. <image class="ln-notice-pic" src="/static/img/icon/notice.png" mode="aspectFill" />
  19. <view class="apple">
  20. <ul class="cy-wz-sco">
  21. <li v-for="noticeInfo in noticeList" >
  22. <text>{{noticeInfo.title}}</text>
  23. </li>
  24. </ul>
  25. </view>
  26. </view>
  27. <view class="ln-nav">
  28. <view class="ln-nav-item">
  29. <image class="lg-nav-pic" src="/static/img/icon/tj.png" />
  30. <view class="lg-nav-intro">
  31. 邀请好友
  32. </view>
  33. </view>
  34. <view class="ln-nav-item">
  35. <image class="lg-nav-pic" src="/static/img/icon/tp.png" />
  36. <view class="lg-nav-intro">
  37. 报单通道
  38. </view>
  39. </view>
  40. <view class="ln-nav-item">
  41. <image class="lg-nav-pic" src="/static/img/icon/lm.png" />
  42. <view class="lg-nav-intro">
  43. 查看团队
  44. </view>
  45. </view>
  46. </view>
  47. <view class="ln-banner">
  48. <view class="ln-bn-hd">
  49. 连续24小时未新进单,最后10名触发托底池
  50. </view>
  51. <view class="ln-bn-nav">
  52. <view class="ln-bn-nav-item">
  53. <view class="ln-bn-intro">均富池</view>
  54. <view class="ln-bn-num">3300.10</view>
  55. <view class="ln-bn-hline"></view>
  56. </view>
  57. <view class="ln-bn-nav-item">
  58. <view class="ln-bn-intro">托底池</view>
  59. <view class="ln-bn-num">300.01</view>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="ln-con">
  64. <view class="ln-con-tit">
  65. <view class="ln-list-iteam ln-list-iteam-36">
  66. 地址
  67. </view>
  68. <view class="ln-list-iteam ln-list-iteam-28">
  69. 数量
  70. </view>
  71. <view class="ln-list-iteam ln-list-iteam-36">
  72. 时间
  73. </view>
  74. </view>
  75. <view class="ln-list">
  76. <view class="list-item" v-for="coin in 10" >
  77. <view class="ln-list-iteam ln-list-iteam-36">
  78. <view><span>Lucky </span></view>
  79. </view>
  80. <view class="ln-list-iteam ln-list-iteam-28">
  81. <view><span>1000</span></view>
  82. </view>
  83. <view class="ln-list-iteam ln-list-iteam-36">
  84. <view class="ln-list-num">2022-10-18 11:41</view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import {banner, notices} from "@/api/news";
  94. import $ from 'jquery/src/jquery'
  95. export default {
  96. components: {
  97. },
  98. data() {
  99. return {
  100. bannerList:[],
  101. noticeList:[]
  102. }
  103. },
  104. watch: {
  105. },
  106. onLoad(query) {
  107. this.banner()
  108. this.notices()
  109. },
  110. mounted() {
  111. },
  112. methods: {
  113. banner(){
  114. banner().then((res)=>{
  115. if(res.code===1){
  116. this.bannerList=res.data
  117. }
  118. })
  119. },
  120. notices(){
  121. notices().then((res)=>{
  122. if(res.code===1){
  123. this.noticeList=res.data
  124. setTimeout(function() {
  125. let scroll = function(s, top, sp) {
  126. let wview = $(".apple ul li:first-child view").width();
  127. let wLi = $(".apple ul li").width();
  128. let wOffset = wview - wLi;
  129. let time = wOffset * 120;
  130. // alert(wOffset);
  131. if (wview > wLi) {
  132. $(".apple ul li:first-child view").animate({
  133. left: -wOffset
  134. }, time);
  135. setTimeout(function() {
  136. s.animate({
  137. marginTop: top + "px"
  138. }, sp, function() {
  139. s.css("marginTop", "0px");
  140. s.children("li:first").appendTo(s);
  141. s.clearQueue().delay(sp).queue(function() {
  142. $(".apple ul li view").css("left", 0);
  143. scroll(s, top, sp);
  144. });
  145. });
  146. }, time);
  147. } else {
  148. s.animate({
  149. marginTop: top + "px"
  150. }, sp, function() {
  151. s.css("marginTop", "0px");
  152. s.children("li:first").appendTo(s);
  153. s.clearQueue().delay(sp).queue(function() {
  154. scroll(s, top, sp);
  155. });
  156. });
  157. }
  158. };
  159. scroll($("ul.cy-wz-sco"), -30, 3000);
  160. }, 50);
  161. }
  162. })
  163. }
  164. },
  165. }
  166. </script>
  167. <style lang="scss" scoped>
  168. .box-data{
  169. background: #131E30;
  170. min-height: calc(100vh - 49px);
  171. .header{
  172. position: fixed; left: 0; top: 0; width: 100%; height: 54px; background: #131E30; z-index: 10; overflow: hidden;
  173. .hd-logo{ display: block; max-width: 50%; height: 34px; margin: 10px auto;}
  174. }
  175. .mui-content{
  176. color: #7388a7;
  177. padding: 0 20rpx;
  178. .swiper-box{
  179. height: 330rpx;
  180. .swiper-item{
  181. border-radius: 16rpx;
  182. image{
  183. width: calc(100vw - 40rpx);
  184. height: 330rpx;
  185. }
  186. }
  187. }
  188. .ln-notice{ position: relative; width: calc(100% - 20px); height: 30px; line-height: 30px; padding-left: 30px; margin: 10px auto; font-size: 14px;
  189. .ln-notice-pic{ display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 20px; height: 20px; margin: auto 0;}
  190. marquee{ width: 100%; height: 30px;}
  191. .apple{ width: 100%; height: 30px; overflow: hidden;}
  192. text{
  193. color: #7388a7;
  194. font-size: 14px;
  195. }
  196. }
  197. .ln-nav{
  198. width: 100%;
  199. padding-top: 10px;
  200. border-top: 1px solid #213141;
  201. overflow: auto;
  202. margin: 0 auto;
  203. display: flex;
  204. justify-content: space-between;
  205. .ln-nav-item{
  206. width: calc((100vw - 80px)/3);
  207. height: 75px;
  208. padding: 6px;
  209. border-radius: 6px;
  210. overflow: hidden;
  211. background: #1A2B3D;
  212. .lg-nav-pic{ display: block; width: 40px; height: 40px; margin: 0 auto;}
  213. .lg-nav-intro{ width: 100%; height: 24px; text-align: center; line-height: 24px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7388a7;font-size: 14px;}
  214. }
  215. }
  216. .ln-banner{
  217. position: relative; width: calc(100% - 40rpx); padding: 10px; padding-top: 15px; margin: 10px auto; border-radius: 6px; overflow: hidden; background: url(/static/img/bg/bnbg.png) no-repeat; background-size: 100% 100%;
  218. .ln-bn-hd{ width: 100%; line-height: 24px; color: rgb(217,228,246); font-size: 17px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
  219. .ln-bn-nav{ width: 100%; text-align: center; margin: 5px 0; margin-top: 15px; overflow: auto;
  220. .ln-bn-nav-item{ position: relative; width: 50%; float: left;
  221. .ln-bn-hline{ position: absolute; right: 0; top: 0; bottom: 0; width: 1px; height: 50%; margin: auto 0; background: #3469BD;}
  222. .ln-bn-num{ width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
  223. .ln-bn-intro{
  224. height: 21px;
  225. font-size: 12px;
  226. color: rgb(217,228,246);
  227. }
  228. .ln-bn-num{
  229. height: 28px;line-height: 28px;
  230. font-size: 18px;
  231. font-weight: 600;
  232. color: rgb(217,228,246);
  233. }
  234. }
  235. }
  236. }
  237. .ln-con{
  238. width: 100%; background: #1A2B3D;
  239. .ln-con-tit{
  240. width: calc(100% - 20px); height: 41px; line-height: 20px; border-bottom: 1px solid #213141; padding: 10px;
  241. .ln-list-iteam{ float: left; font-size: 13px; color: #7388a7;}
  242. }
  243. .ln-list{
  244. width: 100%;
  245. padding-bottom: 20rpx;
  246. .list-item{
  247. width: calc(100% - 20px); padding: 10px; border-bottom: 1px solid #213141; overflow: auto;
  248. display: flex;
  249. justify-content: space-between;
  250. .ln-list-iteam{ font-size: 12px; color: #d9e4f6;}
  251. .ln-list-iteam view{ width: 100%; height: 12px; line-height: 24px; color: #d9e4f6;}
  252. .ln-list-num{
  253. font-size: 14px;
  254. }
  255. .ln-list-iteam view span{ font-size: 16px; font-weight: 600; color: #d9e4f6;}
  256. }
  257. }
  258. .ln-list-iteam-36{ width: 36%;}
  259. .ln-list-iteam-28{ width: 28%;}
  260. }
  261. }
  262. }
  263. </style>