financialService.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <template>
  2. <view class="rf-category">
  3. <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle" back-icon-color="#fff" title-color="#fff"
  4. :title="i18n('FinancialServices')" :background="background">
  5. </u-navbar>
  6. <!-- Banner -->
  7. <view class="bannerbox">
  8. <image :src="bannerImg" class="bannerImg" mode="widthFix"></image>
  9. </view>
  10. <view class="finanContentBox">
  11. <view class="contentOne" v-for="(item,index) in menuList" :key="index" @click="gopage(item)">
  12. <view class="thumb">
  13. <image class="img" :src="item.thumb" mode="widthFix"></image>
  14. </view>
  15. <view class="title" :style="{color:item.color}">{{$t(item.label)}}</view>
  16. </view>
  17. </view>
  18. <view class="informations">
  19. <view class="zoneTitle">{{$t('common.relatedNews')}}</view>
  20. <view class="infoList">
  21. <view class="item" v-for="(infoItem,index) in infomationList" :key="index" @click="toDetails(infoItem)">
  22. <view class="thumb" v-if="infoItem.pictureUrl&&infoItem.pictureUrl != null">
  23. <image class="thumbimg" :src="websiteUrl+infoItem.pictureUrl" mode="widthFix"></image>
  24. </view>
  25. <view class="info">
  26. <view class="title">{{infoItem.title}}</view>
  27. <view class="date">{{formatDate(infoItem.publishDate)}}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import rfSearchBar from '@/components/rf-search-bar-xiangmu';
  36. import {
  37. financeInfoList
  38. } from "@/api/financialService/cmsInformationViews";
  39. export default {
  40. name: 'financialService',
  41. components: {
  42. rfSearchBar,
  43. },
  44. data() {
  45. return {
  46. indicatorDots: true,
  47. autoplay: true,
  48. interval: 2000,
  49. duration: 500,
  50. circular: true,
  51. background: {
  52. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  53. },
  54. backStyle: {
  55. color: '#fff'
  56. },
  57. bannerImg: '../../static/img/finance/financeBanner.png',
  58. menuList: [{
  59. id: 0,
  60. label: 'common.FinancialInstitutions',
  61. thumb: '../../static/img/finance/institution.png',
  62. path: '/pages/financialService/financialOrgans/organsList',
  63. color: '#3D4887',
  64. }, {
  65. id: 1,
  66. label: 'common.InvestmentGuide',
  67. thumb: '../../static/img/finance/investment.png',
  68. path: '/pages/financialService/investmentGuide/guideList',
  69. color: '#965738',
  70. }, {
  71. id: 2,
  72. label: 'common.ProjectAppraisal',
  73. thumb: '../../static/img/finance/evaluation.png',
  74. path: '/pages/financialService/projectEvaluation/evaluationList',
  75. color: '#19BA83',
  76. }, {
  77. id: 3,
  78. label: 'common.FundIdeas',
  79. thumb: '../../static/img/finance/GEIFund.png',
  80. path: '/pages/financialService/financialFundIdeas/fundIdeasList',
  81. color: '#884939',
  82. }],
  83. infomationList: [],
  84. }
  85. },
  86. onShow() {
  87. this.getInfomation();
  88. },
  89. created() {
  90. },
  91. methods: {
  92. back() {
  93. uni.navigateBack();
  94. },
  95. gopage(item) {
  96. uni.navigateTo({
  97. url: item.path
  98. })
  99. },
  100. navToSearch(keyword) {
  101. uni.navigateTo({
  102. url: '/pages/index/search/search?data=' + keyword
  103. })
  104. },
  105. async getInfomation() {
  106. let infoParams = {
  107. language: this.$i18n.locale.toUpperCase(),
  108. }
  109. let res = await this.$myRequest({
  110. url: '/cms/cmsInformationViews/financeInfoList/',
  111. data: infoParams
  112. });
  113. for (let i = 0; i < 10; i++) {
  114. this.infomationList.push(res.data[i]);
  115. }
  116. },
  117. toDetails(item) {
  118. let key = item.baseEntityId;
  119. uni.navigateTo({
  120. url: '/pages/information/components/rankDetail?key=' + key
  121. });
  122. },
  123. // formatDate(stamp){
  124. // return (new Date(stamp).toLocaleDateString()).replace(new RegExp('\/','mg'),'-');
  125. // },
  126. i18n(data) {
  127. return this.$t('common.' + data);
  128. },
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped>
  133. /deep/ .swiper .uni-swiper-dots {
  134. left: initial;
  135. right: 40upx;
  136. bottom: 34upx;
  137. }
  138. .rf-category {
  139. background-color: $color-white;
  140. /* #ifdef APP-PLUS */
  141. // margin-top: calc(20upx + var(--status-bar-height));
  142. /* #endif */
  143. // .icoStyle {
  144. // display:flex;
  145. // align-items:center;
  146. // height:120upx;
  147. // .leftArrow {
  148. // width:120upx;
  149. // height:120upx;
  150. // position: fixed;
  151. // z-index:99;
  152. // /* #ifdef APP-PLUS */
  153. // padding-top: calc(28upx + var(--status-bar-height));
  154. // /* #endif */
  155. // .text{
  156. // color:#fff;
  157. // }
  158. // }
  159. // }
  160. .uni-padding-wrap {
  161. /* #ifdef APP-PLUS */
  162. margin-top: 60upx;
  163. /* #endif */
  164. }
  165. .bannerbox {
  166. width: 100%;
  167. height: 320upx;
  168. margin-top: 30upx;
  169. .bannerImg {
  170. width: 100%;
  171. height: 100%;
  172. }
  173. }
  174. .finanContentBox {
  175. display: flex;
  176. flex-wrap: wrap;
  177. width: 100%;
  178. margin: 20upx auto;
  179. position: relative;
  180. padding: 0 16upx;
  181. .contentOne {
  182. width: 48%;
  183. height: 102px;
  184. margin-top: 20upx;
  185. margin: 1%;
  186. border-radius: 10upx;
  187. position: relative;
  188. .thumb {
  189. width: 100%;
  190. height: 102upx;
  191. .img {
  192. display: block;
  193. border-radius: 10upx;
  194. }
  195. }
  196. .title {
  197. height: 60upx;
  198. line-height: 60upx;
  199. font-size: 30upx;
  200. // font-weight: 600;
  201. width: 300upx;
  202. position: absolute;
  203. top: 20px;
  204. left: 15px;
  205. z-index: 99;
  206. }
  207. }
  208. }
  209. .informations {
  210. padding: 3%;
  211. .zoneTitle {
  212. height: 60upx;
  213. line-height: 60upx;
  214. font-weight: bold;
  215. position: relative;
  216. margin-left: 10upx;
  217. color: #666;
  218. &:before {
  219. content: "";
  220. width: 6upx;
  221. height: 30upx;
  222. background: #2d6;
  223. position: absolute;
  224. left: -10upx;
  225. top: 60%;
  226. margin-top: -22upx;
  227. }
  228. }
  229. .infoList {
  230. .item {
  231. display: flex;
  232. margin: 20upx 0;
  233. border-bottom: 1px solid #eee;
  234. padding: 20upx 0;
  235. &:last-of-type {
  236. border: none;
  237. }
  238. .thumb {
  239. width: 218upx;
  240. height: 128upx;
  241. position: relative;
  242. overflow: hidden;
  243. margin-right: 20upx;
  244. .thumbimg {
  245. display: block;
  246. width: 100%;
  247. height: 100%;
  248. margin-top: 10upx;
  249. }
  250. }
  251. .info {
  252. flex: 1;
  253. .title {
  254. margin-bottom: 10upx;
  255. }
  256. .date {
  257. font-size: 20upx;
  258. color: #aaa;
  259. }
  260. }
  261. }
  262. }
  263. }
  264. }
  265. </style>