fundIdeasList.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="rf-category">
  3. <view class="icoStyle">
  4. <view style="width:90%;height:99upx">
  5. <rf-search-bar @search="navToSearch" icon="iconkuaijiecaidan" style="z-index: 99;" />
  6. </view>
  7. </view>
  8. <PageMenu :currentIndex="3" />
  9. <!-- <view class="ListBox" v-for="(item,index) in FundList" @click="gopage(index,item)"> -->
  10. <view class="ListBox" v-for="(item,index) in FundList"
  11. @click="gopage('financialFundIdeas/fundIdeasDetailsTwo',item)">
  12. <!-- <view class="ListBox" v-for="(item,index) in FundList" @click="gopage(index,item)"> -->
  13. <view class="imgBox">
  14. <image :src="websiteUrl+item.photo" mode="" class="imgPhoto"></image>
  15. <!-- <image v-show="flag==false" :src="'../../../static/img/finance/fund'+(index+1)+'.png'" mode="" class="imgPhoto"></image> -->
  16. </view>
  17. <view class="imgList">
  18. <text class="fundName">{{item.title}}</text>
  19. <text style="margin-top: 30upx;display: block;">{{item.subtitle}}</text>
  20. <view style="margin: 30upx 0;">
  21. <text v-for="listItem in mark[index]" class="listItem">{{listItem}}</text>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import rfSearchBar from '@/components/rf-search-bar-xiangmu';
  29. import PageMenu from '../dom/pageMenu';
  30. import {
  31. getBaseFundIdeasInfos
  32. } from '@/api/financialService/baseFundIdeasInfo'
  33. export default {
  34. components: {
  35. rfSearchBar,
  36. PageMenu
  37. },
  38. data() {
  39. return {
  40. FundList: [],
  41. mark: [],
  42. flag: true,
  43. }
  44. },
  45. onShow() {
  46. this.getData();
  47. },
  48. methods: {
  49. back() {
  50. uni.navigateBack();
  51. },
  52. gopage(path, item) {
  53. let key = this.FundList.baseEntityId;
  54. uni.navigateTo({
  55. url: '/pages/financialService/' + path + '?key=' + item.baseEntityId
  56. })
  57. },
  58. // gopage(pathnumber,item){
  59. // let path = '';
  60. // if(pathnumber == 1){
  61. // path = 'financialFundIdeas/fundIdeasDetailsOne'
  62. // }else if(pathnumber == 0){
  63. // path = 'financialFundIdeas/fundIdeasDetailsTwo'
  64. // }
  65. // let key = this.FundList.baseEntityId;
  66. // uni.navigateTo({
  67. // url:'/pages/financialService/'+path +'?key='+item.baseEntityId
  68. // })
  69. // },
  70. async getData() {
  71. let params = {
  72. pageSize: "5",
  73. pageNo: "1",
  74. language: this.$i18n.locale.toUpperCase(),
  75. statusDict: '2'
  76. }
  77. const res = await this.$myRequest({
  78. url: '/project/baseFundIdeasInfos/',
  79. data: {
  80. ...params
  81. }
  82. });
  83. // let res = await getBaseFundIdeasInfos(params);
  84. if (res.data) {
  85. this.FundList = res.data.baseFundIdeasInfos;
  86. this.mark = [];
  87. for (let i = 0; i < this.FundList.length; i++) {
  88. this.mark.push(this.FundList[i].keyword.split(','));
  89. }
  90. }
  91. },
  92. //搜索
  93. navToSearch(keyword) {
  94. uni.navigateTo({
  95. url: '/pages/index/search/search?data=' + keyword
  96. })
  97. },
  98. // imgErro(){
  99. // this.flag = true
  100. // },
  101. imageError: function(e) {
  102. this.flag = true
  103. console.error('image发生error事件,携带值为' + e.detail.errMsg)
  104. },
  105. i18n(data) {
  106. return this.$t('common.' + data);
  107. },
  108. }
  109. }
  110. </script>
  111. <style lang="scss" scoped>
  112. page {
  113. background: #fff;
  114. width: 750upx;
  115. overflow-x: hidden;
  116. }
  117. .rf-category {
  118. background-color: $color-white;
  119. padding-bottom: 40upx;
  120. /* #ifdef APP-PLUS */
  121. // margin-top: calc(20upx + var(--status-bar-height));
  122. /* #endif */
  123. .icoStyle {
  124. display: flex;
  125. align-items: center;
  126. .leftArrow {
  127. /* #ifdef APP-PLUS */
  128. padding-top: calc(28upx + var(--status-bar-height));
  129. /* #endif */
  130. .text {
  131. color: #fff;
  132. }
  133. }
  134. }
  135. .imgBox {
  136. width: 100%;
  137. height: 340upx;
  138. .imgPhoto {
  139. width: 100%;
  140. height: 100%;
  141. }
  142. }
  143. .fundName {
  144. margin-top: 30upx;
  145. display: block;
  146. font-size: 30upx;
  147. font-weight: 700;
  148. color: rgba(11, 11, 17, .7);
  149. }
  150. .ListBox {
  151. // margin-top: 80upx;
  152. margin-bottom: 74upx;
  153. color: #666666;
  154. .imgList {
  155. margin-top: 20upx;
  156. font-size: 18upx;
  157. padding: 0 40upx;
  158. .listItem {
  159. margin-right: 40upx;
  160. font-size: 24upx;
  161. color: rgba(11, 11, 17, .7);
  162. }
  163. }
  164. }
  165. }
  166. </style>