Market.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view>
  3. <view class="title" >
  4. <view class="title_text">{{info.title}}</view>
  5. <view class="title_more" @click="clicktoMore">更多></view>
  6. </view>
  7. <view class="box" >
  8. <view @click="clicktabs(menuslist[0])" v-if="menuslist[0]" class="leftbox" >
  9. <u--image width="280rpx" height="340rpx" :src="menuslist[0].imgUrl" ></u--image>
  10. </view>
  11. <view class="rightbox">
  12. <view @click="clicktabs(menuslist[1])" v-if="menuslist[1]" class="rightbox_item">
  13. <u--image width="406rpx" height="162rpx" :src="menuslist[1].imgUrl" ></u--image>
  14. </view>
  15. <view @click="clicktabs(menuslist[2])" v-if="menuslist[2]" style="margin-top: 20rpx;" class="rightbox_item">
  16. <u--image width="406rpx" height="162rpx" :src="menuslist[2].imgUrl" ></u--image>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. import {moduleByThree} from '@/http/api/common.js'
  24. export default {
  25. data() {
  26. return {
  27. menuslist:[],
  28. info:{
  29. title:'信息行情'
  30. }
  31. }
  32. },
  33. async mounted() {
  34. this.getmoduleByThree()
  35. },
  36. methods: {
  37. async getmoduleByThree(){
  38. //获取模块3
  39. let res = await moduleByThree()
  40. this.menuslist = []
  41. if (res.data.code == 200) {
  42. this.info = res.data.data
  43. this.menuslist = res.data.data.subList.map(v =>{
  44. return {
  45. ...v,
  46. imgUrl:v.coverList[0].fileUrl
  47. }
  48. })
  49. }
  50. },
  51. clicktabs(item){
  52. let data = {
  53. curNowid:item.columnId,
  54. curNowsubid:item.subId,
  55. }
  56. uni.setStorageSync('curNowdata',JSON.stringify(data) );
  57. uni.switchTab({
  58. url: '/pages/home/Information',
  59. });
  60. },
  61. clicktoMore(){
  62. if (this.info?.moreToSubId && this.info?.moreToColumnId) {
  63. let data = {
  64. curNowid:this.info?.moreToColumnId,
  65. curNowsubid:this.info?.moreToSubId,
  66. }
  67. uni.setStorageSync('curNowdata',JSON.stringify(data) );
  68. uni.switchTab({
  69. url: '/pages/home/Information',
  70. });
  71. }
  72. },
  73. }
  74. }
  75. </script>
  76. <style>
  77. .title{
  78. display: flex;
  79. width: 90vw;
  80. justify-content: space-between;
  81. margin: 0 auto;
  82. }
  83. .title_text{
  84. width: 128rpx;
  85. height: 45rpx;
  86. font-size: 32rpx;
  87. font-weight: bold;
  88. color: #333333;
  89. line-height: 45rpx;
  90. }
  91. .title_more{
  92. width: 80rpx;
  93. height: 40rpx;
  94. font-size: 28rpx;
  95. font-weight: 500;
  96. color: #999999;
  97. line-height: 40rpx;
  98. }
  99. .box{
  100. display: flex;
  101. margin: 20rpx 0;
  102. justify-content: center;
  103. }
  104. .leftbox{
  105. width: 280rpx;
  106. height: 340rpx;
  107. /* background: #FFE9CC;
  108. border-radius: 16rpx 16rpx 16rpx 16rpx;
  109. opacity: 1; */
  110. background: linear-gradient(180deg, #FFEDD6 0%, #FECE8F 100%);
  111. border-radius: 16rpx 16rpx 16rpx 16rpx;
  112. opacity: 1;
  113. }
  114. .rightbox{
  115. margin-left: 20rpx;
  116. width: 406rpx;
  117. height: 340rpx;
  118. background: white;
  119. opacity: 1;
  120. }
  121. .rightbox_item{
  122. height: 162rpx;
  123. border-radius: 16rpx 16rpx 16rpx 16rpx;
  124. background: #FFEDD6;
  125. }
  126. </style>