Exchange.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view>
  3. <view class="title" >
  4. <view class="title_text">{{title}}</view>
  5. <view class="title_more" @click="linkpath()">更多></view>
  6. </view>
  7. <view v-if="info">
  8. <exchangeItem :info="info" ></exchangeItem>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import exchangeItem from '@/pages/components/exchange-item.vue'
  14. import {moduleBySeven} from '@/http/api/common.js'
  15. export default {
  16. components: {
  17. exchangeItem,
  18. },
  19. data() {
  20. return {
  21. info:[],
  22. title:'互动天地',
  23. }
  24. },
  25. async mounted() {
  26. this.getmoduleBySeven()
  27. },
  28. methods: {
  29. async getmoduleBySeven(){
  30. //获取模块7
  31. let res = await moduleBySeven()
  32. if (res.data.code == 200) {
  33. this.title = res.data.data.title
  34. this.info = res.data.data.contentVoList
  35. }
  36. },
  37. linkpath(){
  38. uni.navigateTo({
  39. url: '/pages/home/exchange'
  40. });
  41. }
  42. }
  43. }
  44. </script>
  45. <style>
  46. .title{
  47. display: flex;
  48. width: 90vw;
  49. justify-content: space-between;
  50. margin: 0 auto;
  51. }
  52. .title_text{
  53. width: 128rpx;
  54. height: 45rpx;
  55. font-size: 32rpx;
  56. font-weight: bold;
  57. color: #333333;
  58. line-height: 45rpx;
  59. }
  60. .title_more{
  61. width: 80rpx;
  62. height: 40rpx;
  63. font-size: 28rpx;
  64. font-weight: 500;
  65. color: #999999;
  66. line-height: 40rpx;
  67. }
  68. </style>