resourceSharing2.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <template>
  2. <view class="rf-category" style="position: relative;">
  3. <!--搜索导航栏-->
  4. <view class="icoStyle">
  5. <view class="leftArrow" @tap="back">
  6. <u-icon name="arrow-left" color="#fff" size="36"></u-icon>
  7. </view>
  8. <view style="width:90%;height:99upx">
  9. <rf-search-bar @search="navToSearch" icon="iconkuaijiecaidan" />
  10. </view>
  11. </view>
  12. <!-- 可滑动标签 开始-->
  13. <!-- <view class="wrap">
  14. <view style="background-color: #fff;margin-top: 140upx;width: 100%;font-size: 24upx;">
  15. <u-tabs-swiper activeColor="rgb(24, 144, 255)" bar-width="130" ref="tabs" :list="tabList" :current="current" @change="change" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
  16. </view>
  17. <swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
  18. <swiper-item class="swiper-item">
  19. <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
  20. <view style="width: 100%;height: 595upx;background-color: #fff;margin-top: 20upx;">
  21. <view style="width: 100%;height: 83upx;padding: 0 30upx;">
  22. <text style="float: left;font-size: 26upx;font-weight: 600;line-height: 83upx;color: #333333;">
  23. 推荐
  24. </text>
  25. <view style="float: right;font-size: 24upx;font-weight: 400;line-height: 83upx;">
  26. <text style="color: #848485;">
  27. 更多
  28. </text>
  29. <u-icon name="arrow-right" color="#848485" size="20"
  30. style="font-size: 24upx;font-weight: 400;"></u-icon>
  31. </view>
  32. <view style="clear: both;"></view>
  33. </view>
  34. <view style="width: 100%;height: 410upx;padding: 0 30upx;">
  35. <view v-for="(item,index) in recommendList" style="float: left;"
  36. :style="{marginLeft:index%3==0?'0upx':'18upx'}">
  37. <view style="width: 218upx;height: 280upx;">
  38. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  39. </view>
  40. <view style="width: 218upx;height: 130upx;padding: 20upx 0;">
  41. <text style="font-size: 28upx; color: #0B0B11;" class="twoLine">
  42. {{item.name}}
  43. </text>
  44. </view>
  45. </view>
  46. <view style="clear: both;"></view>
  47. </view>
  48. <view style="width: 100%;height: 102upx;">
  49. <view style="width: 205upx;height: 72upx;border-radius: 36upx;background-color: #EBF3FF;margin: 0 auto;text-align: center;">
  50. <view>
  51. <text style="font-size: 28upx;font-weight: 400;color: #3D7FFF;line-height: 72upx;">
  52. <text>换一批</text>
  53. </text>
  54. <u-icon name="reload" color="#3D7FFF" size="20"></u-icon>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <view style="width: 100%;height: 353upx;background-color: #fff;margin-top: 20upx;">
  60. <view style="width: 100%;height: 83upx;padding: 0 30upx;">
  61. <text style="font-size: 26upx;font-weight: 600;line-height: 83upx;color: #333333;">
  62. 热度TOP10
  63. </text>
  64. </view>
  65. <view style="width: 100%;height: 410upx;padding: 0 30upx;">
  66. <view>
  67. <view v-for="(item,index) in recommendList" style="float: left;"
  68. :style="{marginLeft:index%3==0?'0upx':'18upx'}">
  69. <view style="width: 218upx;height: 280upx;">
  70. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  71. </view>
  72. <view style="width: 218upx;height: 130upx;padding: 20upx 0;">
  73. <text style="font-size: 28upx; color: #0B0B11;" class="twoLine">
  74. {{item.name}}
  75. </text>
  76. </view>
  77. </view>
  78. </view>
  79. <view style="clear: both;"></view>
  80. </view>
  81. </view>
  82. </scroll-view>
  83. </swiper-item>
  84. <swiper-item class="swiper-item">
  85. <scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
  86. </scroll-view>
  87. </swiper-item>
  88. </swiper>
  89. </view> -->
  90. <!-- 可滑动标签 结束-->
  91. <!-- 标签-->
  92. <view>
  93. <view style="background-color: #fff;width: 100%;font-size: 24upx;">
  94. <u-tabs :list="tabList" :is-scroll="false" :current="current" @change="change"
  95. swiperWidth="750" bar-width="130" activeColor="rgb(24, 144, 255)"></u-tabs>
  96. </view>
  97. <view v-show="current==0">
  98. <!-- 推荐 -->
  99. <view style="width: 100%;height: 595upx;background-color: #fff;margin-top: 20upx;">
  100. <view style="width: 100%;height: 83upx;padding: 0 30upx;">
  101. <text style="float: left;font-size: 26upx;font-weight: 600;line-height: 83upx;color: #333333;">
  102. {{i18n('Recommend')}}
  103. </text>
  104. <view style="float: right;font-size: 24upx;font-weight: 400;line-height: 83upx;" @click="toList('resultRecommend')">
  105. <text style="color: #848485;">
  106. {{i18n('MoreInfo')}}
  107. </text>
  108. <u-icon name="arrow-right" color="#848485" size="20"
  109. style="font-size: 24upx;font-weight: 400;"></u-icon>
  110. </view>
  111. <view style="clear: both;"></view>
  112. </view>
  113. <view style="width: 100%;height: 410upx;padding: 0 30upx;">
  114. <view v-for="(item,index) in recommendList" style="float: left;"
  115. :style="{marginLeft:index%3==0?'0upx':'18upx'}">
  116. <view style="width: 218upx;height: 280upx;">
  117. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  118. </view>
  119. <view style="width: 218upx;height: 130upx;padding: 20upx 0;">
  120. <text style="font-size: 28upx; color: #0B0B11;" class="twoLine">
  121. {{item.name}}
  122. </text>
  123. </view>
  124. </view>
  125. <view style="clear: both;"></view>
  126. </view>
  127. <view style="width: 100%;height: 102upx;">
  128. <view style="width: 205upx;height: 72upx;border-radius: 36upx;background-color: #EBF3FF;margin: 0 auto;text-align: center;">
  129. <view>
  130. <text style="font-size: 28upx;font-weight: 400;color: #3D7FFF;line-height: 72upx;">
  131. <text>{{i18n('ChangeTheBatch')}}</text>
  132. </text>
  133. <u-icon name="reload" color="#3D7FFF" size="28"></u-icon>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 热度top10 -->
  139. <view style="width: 100%;height: 353upx;background-color: #fff;margin-top: 20upx;">
  140. <view style="width: 100%;height: 83upx;padding: 0 30upx;">
  141. <text style="font-size: 26upx;font-weight: 600;line-height: 83upx;color: #333333;">
  142. {{i18n('resourceHeat')}}TOP10
  143. </text>
  144. </view>
  145. <view style="width: 100%;height: 270upx;padding: 0 30upx 60upx 30upx;">
  146. <!--列表横向滚动-->
  147. <scroll-view scroll-x="true" class="recommendScroll">
  148. <block>
  149. <view v-for="(item,index) in recommendList" class="item"
  150. :style="{marginLeft:index==0?'0upx':'20upx'}">
  151. <view style="width: 150upx;height: 193upx;float: left;margin: 8upx 13upx 9upx 8upx;">
  152. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  153. </view>
  154. <view style="width: 224upx;height: 100%;padding-top: 9upx;float: left;">
  155. <view style="width: 100%; ">
  156. <text style="font-size: 26upx; color: #0B0B11;" class="twoLine">
  157. {{item.name}}
  158. </text>
  159. </view>
  160. <view style="width: 100%;">
  161. <text style="font-size: 22upx; color: #666666; line-height: 25upx;display: inline-block;width: 100%;" class="oneLine">
  162. {{item.name}}
  163. </text>
  164. </view>
  165. <view style="width: 100%;">
  166. <text style="padding: 0 13upx; font-size: 22upx; color: #666666;border-radius: 22upx;display: inline-block;border: 2px solid #1777FE;color: #1777FE;">
  167. 战略研究
  168. </text>
  169. </view>
  170. </view>
  171. <view style="clear: both;"></view>
  172. </view>
  173. </block>
  174. </scroll-view>
  175. </view>
  176. </view>
  177. <!-- 列表 -->
  178. <view style="width: 100%;background-color: #fff;margin-top: 20upx;">
  179. <view style="width: 100%; height: 86upx;">
  180. <u-dropdown class="u-dropdown" style="background-color: #fff;width: 100%;">
  181. <u-dropdown-item v-model="value1" :title="i18n('Comprehensive')" @change="dropdownChange" :options="options1"></u-dropdown-item>
  182. <u-dropdown-item :title="i18n('resourceType')">
  183. <view >
  184. <view class="item-box">
  185. <view class="item" :class="[item.active ? 'active' : '']" @tap="tagClick(index)" v-for="(item, index) in options2" :key="index">
  186. {{item.label}}
  187. </view>
  188. </view>
  189. <u-button type="primary" @click="closeDropdown">确定</u-button>
  190. </view>
  191. </u-dropdown-item>
  192. </u-dropdown>
  193. </view>
  194. <view style="width: 100%;padding: 0 30upx;">
  195. <view v-for="(item,index) in recommendList" style="width: 100%;height: 280upx;"
  196. :style="{marginTop:index==0?'0upx':'60upx'}">
  197. <view style="width: 218upx;height: 280upx;float: left;border: 1px solid #979797;margin-right: 20upx">
  198. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  199. </view>
  200. <view style="width: 452upx;height: 100%;float: left;position: relative;">
  201. <view>
  202. <text style="font-size: 30upx; color: #0B0B11;" class="twoLine">
  203. {{item.name}}
  204. </text>
  205. </view>
  206. <view style="margin-top: 13upx;">
  207. <text style="font-size: 26upx; padding: 0 13upx; border: 2px solid #1777FE;
  208. display: inline-block;border-radius: 32upx;color: #1777FE;">
  209. {{item.name}}
  210. </text>
  211. </view>
  212. <view style="margin-top: 13upx;">
  213. <text style="font-size: 26upx; padding: 0 13upx; display: inline-block;
  214. border-radius: 12upx;background-color: rgba(61,127,255,0.1);color: #3D7FFF;">
  215. 会员
  216. </text>
  217. </view>
  218. <view style="position: absolute;bottom: 0;width: 100%;height: 35upx;color: #666;">
  219. <view style="float: left;height: 100%">
  220. <text style="font-size: 28upx;">2020/09/22</text>
  221. </view>
  222. <view style="float: right;">
  223. <view style="float: left;font-size: 28upx;font-weight: 400;">
  224. <u-icon name="heart" color="#848485" size="28" style="margin-right: 6upx"></u-icon>
  225. <text style="color: #666;">
  226. 666
  227. </text>
  228. </view>
  229. <view style="float: left;font-size: 28upx;font-weight: 400;margin-left: 70upx;">
  230. <u-icon name="arrow-right" color="#848485" size="28" style="margin-right: 6upx"></u-icon>
  231. <text style="color: #666;">
  232. 888
  233. </text>
  234. </view>
  235. </view>
  236. <view style="clear: both;"></view>
  237. </view>
  238. </view>
  239. <view style="clear: both;"></view>
  240. </view>
  241. </view>
  242. </view>
  243. </view>
  244. <view v-show="current==1">
  245. <!-- 推荐 -->
  246. <view style="width: 100%;height: 925upx;background-color: #fff;margin-top: 20upx;">
  247. <view style="width: 100%;height: 83upx;padding: 0 30upx;">
  248. <text style="float: left;font-size: 26upx;font-weight: 600;line-height: 83upx;color: #333333;">
  249. {{i18n('Recommend')}}
  250. </text>
  251. <view style="float: right;font-size: 24upx;font-weight: 400;line-height: 83upx;" @click="toList('resourceRecommend')">
  252. <text style="color: #848485;">
  253. {{i18n('MoreInfo')}}
  254. </text>
  255. <u-icon name="arrow-right" color="#848485" size="20"
  256. style="font-size: 24upx;font-weight: 400;"></u-icon>
  257. </view>
  258. <view style="clear: both;"></view>
  259. </view>
  260. <view style="width: 100%;height: 740upx;padding: 0 30upx;">
  261. <view v-for="(item,index) in recommendList" style="float: left;width: 335upx; height: 375upx;"
  262. :style="{marginLeft:index%2==0?'0upx':'20upx'}">
  263. <view style="width: 335upx;height: 280upx;">
  264. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  265. </view>
  266. <view style="width: 335upx;height: 95upx;padding: 20upx 0 30upx 0;">
  267. <text style="font-size: 28upx; color: #0B0B11;" class="twoLine">
  268. {{item.name}}
  269. </text>
  270. </view>
  271. </view>
  272. <view style="clear: both;"></view>
  273. </view>
  274. <view style="width: 100%;height: 102upx;">
  275. <view style="width: 205upx;height: 72upx;border-radius: 36upx;background-color: #EBF3FF;margin: 0 auto;text-align: center;">
  276. <view style="width: 100%;height: 100%;text-align: center;">
  277. <text style="font-size: 28upx;font-weight: 400;color: #3D7FFF;line-height: 72upx;">
  278. <text>{{i18n('ChangeTheBatch')}}</text>
  279. </text>
  280. <u-icon name="reload" color="#3D7FFF" size="20"></u-icon>
  281. </view>
  282. </view>
  283. </view>
  284. </view>
  285. <!-- 热度top10 -->
  286. <view style="width: 100%;height: 353upx;background-color: #fff;margin-top: 20upx;">
  287. <view style="width: 100%;height: 83upx;padding: 0 30upx;">
  288. <text style="font-size: 26upx;font-weight: 600;line-height: 83upx;color: #333333;">
  289. {{i18n('resourceHeat')}}TOP10
  290. </text>
  291. </view>
  292. <view style="width: 100%;height: 273upx;padding: 0 30upx;">
  293. <!-- <view style="width: 4000upx;"> -->
  294. <view style="width: 4000upx;">
  295. <view v-for="(item,index) in recommendList" class="scroll-view-item_H"
  296. style="float: left;width: 446upx;height: 160upx;border: 1px solid #979797;"
  297. :style="{marginLeft:index==0?'0upx':'20upx'}">
  298. <view style="width: 220upx;height: 140upx;float: left;margin: 10upx 20upx 10upx 10upx;">
  299. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  300. </view>
  301. <view style="width: 176upx;height: 100%;padding-top: 9upx;float: left;">
  302. <view style="width: 100%;height: 40upx;">
  303. <text style="font-size: 26upx; color: #0B0B11;display: inline-block;width: 100%;" class="oneLine">
  304. {{item.name}}
  305. </text>
  306. </view>
  307. <view style="width: 100%;height: 40upx;">
  308. <text style="font-size: 22upx; color: #666666; line-height: 25upx;display: inline-block;width: 100%;" class="oneLine">
  309. {{item.name}}
  310. </text>
  311. </view>
  312. <view style="width: 100%;">
  313. <text style="padding: 0 13upx; font-size: 22upx; color: #666666;border-radius: 22upx;display: inline-block;border: 2px solid #1777FE;color: #1777FE;">
  314. 战略研究
  315. </text>
  316. </view>
  317. </view>
  318. <view style="clear: both;"></view>
  319. </view>
  320. </view>
  321. <view style="clear: both;"></view>
  322. </view>
  323. </view>
  324. <!-- 列表 -->
  325. <view style="width: 100%;background-color: #fff;margin-top: 20upx;">
  326. <view style="width: 100%; height: 86upx;">
  327. <u-dropdown class="u-dropdown" style="background-color: #fff;width: 100%;">
  328. <u-dropdown-item v-model="value1" :title="i18n('Comprehensive')" @change="dropdownChange" :options="options1"></u-dropdown-item>
  329. <u-dropdown-item :title="i18n('resourceType')">
  330. <view >
  331. <view class="item-box">
  332. <view class="item" :class="[item.active ? 'active' : '']" @tap="tagClick(index)" v-for="(item, index) in options2" :key="index">
  333. {{item.label}}
  334. </view>
  335. </view>
  336. <u-button type="primary" @click="closeDropdown">确定</u-button>
  337. </view>
  338. </u-dropdown-item>
  339. </u-dropdown>
  340. </view>
  341. <view style="width: 100%;padding: 0 30upx;">
  342. <view v-for="(item,index) in recommendList" style="width: 100%;height: 280upx;"
  343. :style="{marginTop:index==0?'0upx':'60upx'}">
  344. <view style="width: 218upx;height: 280upx;float: left;">
  345. <image :src="item.src" mode="" style="width: 100%;height: 100%;"></image>
  346. </view>
  347. <view style="width: 452upx;height: 100%;float: left;">
  348. <view>
  349. <text style="font-size: 30upx; color: #0B0B11;" class="twoLine">
  350. {{item.name}}
  351. </text>
  352. </view>
  353. <view style="margin-top: 13upx;">
  354. <text style="font-size: 26upx; padding: 0 13upx; border: 2px solid #1777FE;
  355. display: inline-block;border-radius: 32upx;color: #1777FE;">
  356. {{item.name}}
  357. </text>
  358. </view>
  359. <view style="margin-top: 13upx;">
  360. <text style="font-size: 26upx; padding: 0 13upx; display: inline-block;
  361. border-radius: 12upx;background-color: rgba(61,127,255,0.1);color: #3D7FFF;">
  362. 会员
  363. </text>
  364. </view>
  365. </view>
  366. <view style="clear: both;"></view>
  367. </view>
  368. </view>
  369. </view>
  370. </view>
  371. </view>
  372. </view>
  373. </template>
  374. <script>
  375. import rfSearchBar from '@/components/rf-search-bar';
  376. import {getDicts,getDictByTypeValue} from '@/api/dict';
  377. export default {
  378. data() {
  379. return {
  380. classify1:'',
  381. classify2:'',
  382. tabList: [
  383. {
  384. name: this.i18n('resource')
  385. },
  386. {
  387. name: this.i18n('researchResource')
  388. },
  389. ],
  390. value1:'',
  391. value2:'',
  392. dx: 0,
  393. current: 0,
  394. swiperCurrent: 0,
  395. recommendList:[
  396. {
  397. name:'全球能源互联网促进全球环',
  398. src:'',
  399. },
  400. {
  401. name:'非洲能源互联网规划研究报告',
  402. src:'',
  403. },
  404. {
  405. name:'破解危机',
  406. src:'',
  407. },
  408. ],
  409. options1:[
  410. {
  411. label: '时间降序',
  412. value: 1,
  413. },
  414. {
  415. label: '时间升序',
  416. value: 2,
  417. },
  418. {
  419. label: '热度降序',
  420. value: 3,
  421. },
  422. {
  423. label: '热度升序',
  424. value: 4,
  425. }
  426. ],
  427. options2:[
  428. {
  429. label: '琪花瑶草',
  430. active: true,
  431. },
  432. {
  433. label: '清词丽句',
  434. active: false,
  435. },
  436. {
  437. label: '宛转蛾眉',
  438. active: false,
  439. },
  440. {
  441. label: '煦色韶光',
  442. active: false,
  443. },
  444. {
  445. label: '鱼沉雁落',
  446. active: false,
  447. },
  448. {
  449. label: '章台杨柳',
  450. active: false,
  451. },
  452. {
  453. label: '霞光万道',
  454. active: false,
  455. }
  456. ],
  457. }
  458. },
  459. async onShow() {
  460. this.getDict();
  461. // this.getList();
  462. },
  463. components: { rfSearchBar },
  464. methods: {
  465. navToSearch(){},
  466. dropdownChange(){},
  467. closeDropdown(){},
  468. // tab栏切换
  469. change(index) {
  470. this.current = index;
  471. /* this.swiperCurrent = index;
  472. this.getOrderList(index); */
  473. },
  474. transition({ detail: { dx } }) {
  475. this.$refs.tabs.setDx(dx);
  476. },
  477. animationfinish({ detail: { current } }) {
  478. this.$refs.tabs.setFinishCurrent(current);
  479. this.swiperCurrent = current;
  480. this.current = current;
  481. },
  482. //滚动到底部、右边, 会触发 scrolltolower 事件
  483. /* reachBottom() {
  484. // 此tab为空数据
  485. if(this.current != 2) {
  486. this.loadStatus.splice(this.current,1,"loading")
  487. setTimeout(() => {
  488. this.getOrderList(this.current);
  489. }, 1200);
  490. }
  491. }, */
  492. // 跳转列表
  493. toList(path){
  494. uni.navigateTo({
  495. url:'/pages/resourceSharing/'+path
  496. })
  497. },
  498. // 跳转详情
  499. async getDict(){
  500. // const res = await this.$myRequest({
  501. // url: '/sys/sysDicts/',
  502. // data: {
  503. // type:this.$i18n.locale=="zh"?'RESEARCH_RESULT_TYPE_DICT ,RESEARCH_RESOURCE_TYPE_DICT':'RESEARCH_RESULT_TYPE_DICT_EN,RESEARCH_RESOURCE_TYPE_DICT_EN',
  504. // }
  505. // });
  506. let res = await getDicts( "RESEARCH_RESULT_TYPE_DICT,RESEARCH_RESOURCE_TYPE_DICT" );
  507. if (res.data) {
  508. this.classify1 = res.data[0];
  509. this.classify2 = res.data[1];
  510. }
  511. let both={
  512. label:this.$t('common.All'),
  513. value:null
  514. };
  515. this.classify1=res.data[0];
  516. this.classify2=res.data[1];
  517. this.classify1.unshift(both);
  518. this.classify2.unshift(both);
  519. },
  520. async getRecommend(){
  521. // const res = await this.$myRequest({
  522. // url: '/sys/sysDicts/',
  523. // data: {
  524. // type:this.$i18n.locale=="zh"?'RESEARCH_RESULT_TYPE_DICT ,RESEARCH_RESOURCE_TYPE_DICT':'RESEARCH_RESULT_TYPE_DICT_EN,RESEARCH_RESOURCE_TYPE_DICT_EN',
  525. // }
  526. // });
  527. let res = await getDicts( "RESEARCH_RESULT_TYPE_DICT,RESEARCH_RESOURCE_TYPE_DICT" );
  528. if (res.data) {
  529. this.classify1 = res.data[0];
  530. this.classify2 = res.data[1];
  531. }
  532. let both={
  533. label:this.$t('common.All'),
  534. value:null
  535. };
  536. this.classify1=res.data[0];
  537. this.classify2=res.data[1];
  538. this.classify1.unshift(both);
  539. this.classify2.unshift(both);
  540. },
  541. async getList(num){
  542. let page ={
  543. pageNo:this.page,
  544. pageSize: 10,
  545. language:this.$i18n.locale.toUpperCase(),
  546. descStatus:this.value1,
  547. messageOpenType:'Y',
  548. status:1,
  549. technicalCategories:this.value3,
  550. continentCountry:this.value2,
  551. projectName:this.input
  552. };
  553. const res = await this.$myRequest({
  554. url: '/resourceshare/baseResearchResultViews/',
  555. data: {
  556. ...page
  557. }
  558. });
  559. this.total2=res.data.page.totalPage;
  560. if(res.data){
  561. if(this.page==1){
  562. this.ProjectList=res.data.baseProjectViews?res.data.baseProjectViews : [];
  563. }else {
  564. this.ProjectList=this.ProjectList.concat(res.data.baseProjectViews)
  565. }
  566. }
  567. if(this.ProjectList.length>=this.total2-0){
  568. this.status = 'nomore';
  569. }
  570. },
  571. back() {
  572. uni.navigateBack();
  573. },
  574. //中英文切换
  575. i18n (data) {
  576. return this.$t('common.'+data);
  577. },
  578. }
  579. }
  580. </script>
  581. <style lang="scss" scoped>
  582. .rf-category {
  583. background-color: #F3F4F5;
  584. /* #ifdef APP-PLUS */
  585. margin-top: calc(20upx + var(--status-bar-height));
  586. /* #endif */
  587. .icoStyle {
  588. display: flex;
  589. align-items:center;
  590. .leftArrow {
  591. width:36upx;
  592. height:36upx;
  593. position: fixed;
  594. z-index: 99;
  595. /* #ifdef APP-PLUS */
  596. padding-top: calc(20upx + var(--status-bar-height));
  597. /* #endif */
  598. }
  599. }
  600. .oneLine{
  601. /* 隐藏溢出元素 */
  602. overflow: hidden;
  603. /* 单行显示 */
  604. white-space: nowrap;
  605. /* 溢出显示省略号 */
  606. text-overflow: ellipsis;
  607. }
  608. .twoLine{
  609. overflow : hidden;
  610. text-overflow: ellipsis;
  611. display: -webkit-box;
  612. -webkit-line-clamp: 2;
  613. -webkit-box-orient: vertical;
  614. }
  615. .threeLine{
  616. overflow : hidden;
  617. text-overflow: ellipsis;
  618. display: -webkit-box;
  619. -webkit-line-clamp: 3;
  620. -webkit-box-orient: vertical;
  621. }
  622. .wrap {
  623. display: flex;
  624. flex-direction: column;
  625. height: calc(100vh - var(--window-top));
  626. width: 100%;
  627. }
  628. .swiper-box {
  629. flex: 1;
  630. }
  631. .swiper-item {
  632. height: 100%;
  633. }
  634. .item-box {
  635. margin-bottom: 50rpx;
  636. display: flex;
  637. flex-wrap: wrap;
  638. justify-content: space-between;
  639. }
  640. .item-box .item {
  641. border: 1px solid $u-type-primary;
  642. color: $u-type-primary;
  643. padding: 8rpx 40rpx;
  644. border-radius: 100rpx;
  645. margin-top: 30rpx;
  646. }
  647. .recommendScroll{
  648. overflow: hidden;
  649. white-space: nowrap; // 滚动必须加的属性
  650. width: 100%;
  651. height: 210upx;
  652. margin: 0 auto;
  653. }
  654. .recommendScroll .item{
  655. width: 400upx;
  656. height: 210upx;
  657. border: 1px solid #979797;
  658. display: inline-block;
  659. vertical-align: top;
  660. }
  661. }
  662. </style>