guideList.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="organsList">
  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="1" />
  9. <view class="dataList">
  10. <view class="item" v-for="(item,index) in dataList" :key="index" @click="showDeital(item)"
  11. style="background-color: #fff;">
  12. <view class="thumb">
  13. <!-- -->
  14. <image class="img"
  15. :src="item.photo?item.photo:'https://www.geidcp.com/api/file/pub//def/projectdefault.png'"
  16. @error="showErrorImg(item)" mode="widthFix">
  17. </image>
  18. </view>
  19. <view class="info">
  20. <view class="title">{{item.name}}</view>
  21. <view class="des">
  22. <view class="desdetail" v-html="item.introduction"></view>
  23. </view>
  24. <view class="country" v-if="item.countries&&item.countries!=null &&item.countries!=undefined">
  25. <text>{{$t('common.FocusCountry')}}:</text>
  26. <text style="color:#0091FF">{{item.countriesName}}</text>
  27. </view>
  28. <view class="language">
  29. <view class="lang">
  30. <text v-if="languageList[item.baseEntityId].entityZh == 1"> {{$t('common.Chinese')}}</text>
  31. <text v-if="languageList[item.baseEntityId].entityEn == 1"> |
  32. {{$t('common.English')}}</text>
  33. <text v-if="languageList[item.baseEntityId].entityFr == 1"> | {{$t('common.French')}}</text>
  34. <text v-if="languageList[item.baseEntityId].entityDe == 1"> | {{$t('common.German')}}</text>
  35. <text v-if="languageList[item.baseEntityId].entityEs == 1"> |
  36. {{$t('common.Spanish')}}</text>
  37. <text v-if="languageList[item.baseEntityId].entityJa == 1"> |
  38. {{$t('common.Japanese')}}</text>
  39. <text v-if="languageList[item.baseEntityId].entityAr == 1"> | {{$t('common.Arabic')}}</text>
  40. <text v-if="languageList[item.baseEntityId].entityRu == 1"> |
  41. {{$t('common.Russian')}}</text>
  42. </view>
  43. <view class="date">{{formatDate(item.publishDate)}}</view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- <scroll-view class="dataList"
  49. :scroll-x="false"
  50. :scroll-y="true"
  51. @scrolltolower="lower"> -->
  52. <!-- </scroll-view> -->
  53. <!-- <view class="loademore" v-if="listNum>5">
  54. <u-loadmore :status="status" icon-type="flower" font-size="24" margin-top="20" />
  55. </view> -->
  56. <rf-back-top :scrollTop="scrollTop2"></rf-back-top>
  57. </view>
  58. </template>
  59. <script>
  60. import rfSearchBar from '@/components/rf-search-bar-xiangmu';
  61. import BackTop from '@/components/rf-back-top'
  62. import PageMenu from '../dom/pageMenu';
  63. import {
  64. getBaseInvestmentGuidelinesInfos
  65. } from '@/api/financialService/baseInvestmentGuidelinesInfo';
  66. import {
  67. getDicts
  68. } from "@/api/dict";
  69. export default {
  70. name: 'FinanicalOrgans',
  71. components: {
  72. rfSearchBar,
  73. PageMenu,
  74. BackTop
  75. },
  76. data() {
  77. return {
  78. scrollTop: 0,
  79. old: {
  80. scrollTop: 0
  81. },
  82. scrollTop2: 0,
  83. status: 'loadmore',
  84. page: 0,
  85. dataList: [],
  86. listNum: 0,
  87. languageList: [],
  88. dictList: [],
  89. }
  90. },
  91. computed: {
  92. },
  93. created() {
  94. this.getDataList();
  95. this.getDict()
  96. },
  97. onPageScroll(e) {
  98. this.scrollTop2 = e.scrollTop;
  99. },
  100. methods: {
  101. //路由后退
  102. back() {
  103. // #ifdef H5
  104. history.back()
  105. // #endif
  106. // #ifndef H5
  107. uni.navigateBack({})
  108. // #endif
  109. },
  110. //搜索
  111. navToSearch(keyword) {
  112. uni.navigateTo({
  113. url: '/pages/index/search/search?data=' + keyword
  114. })
  115. },
  116. //滚动到底的时候执行,实现加载更多
  117. lower(e) {
  118. this.status = 'loading';
  119. setTimeout(() => {
  120. this.status = 'loadmore';
  121. }, 2000)
  122. console.log(e)
  123. },
  124. //查看详情
  125. showDeital(item) {
  126. uni.navigateTo({
  127. url: '/pages/financialService/investmentGuide/guideDetial?id=' + item.baseEntityId
  128. })
  129. },
  130. //获取投资指引
  131. async getDataList() {
  132. let params = {
  133. language: this.$i18n.locale.toUpperCase(),
  134. statusDict: '2'
  135. }
  136. const res = await this.$myRequest({
  137. url: '/project/baseInvestmentGuidelinesInfos/',
  138. data: params
  139. });
  140. if (res.data.baseInvestmentGuidelinesInfos) {
  141. this.dataList = res.data.baseInvestmentGuidelinesInfos;
  142. this.languageList = res.data.investmentGuidelinesEntitiesMap;
  143. this.listNum = res.data.baseInvestmentGuidelinesInfos.length;
  144. for (let i = 0; i < this.dataList.length; i++) {
  145. this.$set(this.dataList[i], 'photo', 'https://m.geidcp.com/api/file/pub/' + this.dataList[
  146. i]
  147. .photo)
  148. }
  149. }
  150. },
  151. //查询国家字典
  152. async getDict() {
  153. const res = await this.$myRequest({
  154. url: '/sys/sysDicts/',
  155. data: {
  156. type: this.$i18n.locale == "zh" ? 'UNIT_COUNTRY_DICT' : 'unit_country_dict_en',
  157. }
  158. });
  159. if (res.data) {
  160. this.dictList = res.data[0];
  161. } else {
  162. this.dictList = []
  163. }
  164. },
  165. // 错误图像加载显示
  166. showErrorImg(item) {
  167. this.$set(item, 'photo', 'https://www.geidcp.com/api/file/pub//def/projectdefault.png')
  168. },
  169. i18n(data) {
  170. return this.$t('common.' + data);
  171. },
  172. }
  173. }
  174. </script>
  175. <style lang="scss" scoped>
  176. .icoStyle {
  177. display: flex;
  178. align-items: center;
  179. .leftArrow {
  180. /* #ifdef APP-PLUS */
  181. padding-top: calc(28upx + var(--status-bar-height));
  182. /* #endif */
  183. .text {
  184. color: #fff;
  185. }
  186. }
  187. }
  188. .organsList {
  189. .loademore {
  190. position: fixed;
  191. bottom: 0;
  192. z-index: 999;
  193. margin: 0 auto;
  194. width: 100%;
  195. height: 80upx;
  196. line-height: 80upx;
  197. background-color: #fff;
  198. }
  199. .dataList {
  200. position: absolute;
  201. height: 100%;
  202. // background-color:#fff;
  203. // padding:0 0 30upx;
  204. .item {
  205. padding: 20upx;
  206. display: flex;
  207. // margin:0 0 0 20upx;
  208. border-bottom: 20upx solid #f2f2f2;
  209. .thumb {
  210. width: 240upx;
  211. position: relative;
  212. margin-right: 20upx;
  213. .img {
  214. width: 100%;
  215. margin-top: 8upx;
  216. }
  217. }
  218. .info {
  219. flex: 1;
  220. color: #888;
  221. .title {
  222. font-weight: 600;
  223. font-size: 28upx;
  224. color: #333;
  225. }
  226. .des {
  227. font-size: 24upx;
  228. margin-top: 16upx;
  229. // overflow: hidden;
  230. // text-overflow: ellipsis;
  231. // display: -webkit-box;
  232. // -webkit-box-orient: vertical;
  233. // -webkit-line-clamp: 2;
  234. }
  235. .des .desdetail {
  236. height: 80upx;
  237. overflow: hidden;
  238. }
  239. .country {
  240. font-size: 24upx;
  241. margin-top: 18upx;
  242. }
  243. .language {
  244. margin-top: 16upx;
  245. display: flex;
  246. align-items: center;
  247. justify-content: space-between;
  248. .lang,
  249. .date {
  250. font-size: 24upx;
  251. }
  252. }
  253. }
  254. }
  255. }
  256. }
  257. </style>