index.vue 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514
  1. <template>
  2. <view class="rf-index">
  3. <!-- <guideAD :show="guideAD" :time="5" @close="guideAD = false"></guideAD>-->
  4. <!--搜索导航栏-->
  5. <rf-search-bar @search="navToSearch" icon="iconkuaijiecaidan" @tab="tabClick"
  6. :placeholder="$i18n.locale == 'zh'? '请输入关键字': 'Please input keywords'" @showPage="showPage"
  7. :msgNumber="msgNumber" />
  8. <view style="clear: both;"></view>
  9. <!-- #ifdef APP-PLUS -->
  10. <view style="paddingTop:160upx">
  11. <!-- #endif -->
  12. <!-- #ifdef H5 -->
  13. <view style="paddingTop:90upx">
  14. <!-- #endif -->
  15. <block>
  16. <view style="background: linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%);
  17. height: 52vw;">
  18. <!-- <image src="../../static/img/index/1.png" style="width: 400upx;height: 70upx;margin-top: 20upx;"></image>
  19. <image src="../../static/img/index/2.png" style="width: 100%;height: 80upx;"></image> -->
  20. <image src="../../static/img/index/indexBACK.png" mode="" style="width: 100%;height: 100%;"
  21. v-if="$i18n.locale=='zh'"></image>
  22. <image src="../../static/img/index/indexBackEn.png" mode="" style="width: 100%;height: 100%;"
  23. v-else></image>
  24. </view>
  25. </block>
  26. <block>
  27. <!-- 分类列表 -->
  28. <view class="swiper" style="margin-top: 20upx;">
  29. <view class="swiper-box2">
  30. <swiper @change="handleDotChange" :indicator-dots="indicatorDots">
  31. <swiper-item>
  32. <view class="classification-list"
  33. :style="$i18n.locale=='zh'?'padding:0':'padding:0 0 15upx 0'">
  34. <view :class="$i18n.locale=='zh'?'module-classify-icon':'module-classify-icon2'"
  35. v-for="(item,index,trueindex) in initData"
  36. @click="navTo(item.value),changeIcon(trueindex)">
  37. <view :class="$i18n.locale=='zh'?'viewImg':'viewImg2'"
  38. style="width: 100upx;height: 100upx;" :style="{'backgroundImage':'url( '+ item.icon +' )',
  39. 'background-repeat':'no-repeat', backgroundSize:'100upx 100upx'}">
  40. <view class="newIcon"
  41. v-if="$i18n.locale=='zh'?newIcon[trueindex]>mynewIcon[trueindex]:newIcon[trueindex]>mynewIconEn[trueindex]">
  42. {{ $i18n.locale=='zh'?newIcon[trueindex] - mynewIcon[trueindex]:newIcon[trueindex] - mynewIconEn[trueindex] }}
  43. </view>
  44. </view>
  45. <text
  46. :style="$i18n.locale=='en'?'height: 45upx;display: block;':''">{{i18n(item.label)}}</text>
  47. </view>
  48. </view>
  49. </swiper-item>
  50. <swiper-item>
  51. <view class="classification-list2">
  52. <view :class="$i18n.locale=='zh'?'module-classify-icon':'module-classify-icon2'"
  53. v-for="(item,index,trueindex) in initData2"
  54. @click="navTo(item.value),changeIconEn(trueindex)">
  55. <view :class="$i18n.locale=='zh'?'viewImg':'viewImg2'"
  56. style="width: 100upx;height: 100upx;margin-left: 10upx;" :style="{'backgroundImage':'url( '+ item.icon +' )',
  57. 'background-repeat':'no-repeat', backgroundSize:'100upx 100upx'}">
  58. <view class="newIcon"
  59. v-if="$i18n.locale=='zh'?newIcon[trueindex+10] > mynewIcon[trueindex+10]:newIcon[trueindex+8] > mynewIconEn[trueindex+8]">
  60. {{ $i18n.locale=='zh'?newIcon[trueindex+10] - mynewIcon[trueindex+10]:newIcon[trueindex+8] - mynewIconEn[trueindex+8] }}
  61. </view>
  62. </view>
  63. <text :style="$i18n.locale=='en' || item.label == 'NationalregionalCommissions'?
  64. 'height: 45upx;display: block;':''">{{i18n(item.label)}}</text>
  65. </view>
  66. </view>
  67. </swiper-item>
  68. </swiper>
  69. </view>
  70. </view>
  71. <!-- 信息播报部分 -->
  72. <!-- <view class="broadcast" v-if="newSum!=0">
  73. <view class="testtest_one" :class="{'testtest_tow':broadcastFlag_one,'testtest_three':broadcastFlag_tow,}"> -->
  74. <!-- 信息播报 -->
  75. <!-- <view class="inforTitle" style="color:orange;margin-right:10rpx;">New </view >
  76. <view class="inforTitle" style="color:white;">{{$i18n.locale=='zh'?'信息播报':'Information broadcast'}} : </view> -->
  77. <!-- 播报滚动的情况 -->
  78. <!-- <view class="testtest_one scroll-up" id="scroll" style="display:inline-block" v-if="scrollArr.length>1">
  79. <ul style="width:300px;padding-left: 20rpx;">
  80. <li style="height:100%;width:100%;list-style: none;" v-for="(item,index) in broadcastList" :key="index">
  81. <template v-if="item.number != 0">
  82. <span style="color:white">{{item.title}}:</span> <span style="color:orange;margin-right:10px">{{item.number}}</span>
  83. </template>
  84. </li>
  85. </ul>
  86. <ul style="width:300px;padding-left: 20rpx;">
  87. <li style="height:100%;width:100%;list-style: none;" v-for="(item,index) in broadcastList" :key="index">
  88. <template v-if="item.number != 0">
  89. <span style="color:white">{{item.title}}:</span> <span style="color:orange;margin-right:10px">{{item.number}}</span>
  90. </template>
  91. </li>
  92. </ul>
  93. </view> -->
  94. <!-- 播报不滚动的情况 -->
  95. <!-- <view class="testtest_one scroll-up" style="display:inline-block" v-if="scrollArr.length<2">
  96. <ul style="width:300px;padding-left: 20rpx;">
  97. <li style="height:100%;width:100%;list-style: none;" v-for="(item,index) in broadcastList" :key="index">
  98. <template v-if="item.number != 0">
  99. <span style="color:white">{{item.title}}:</span> <span style="color:orange;margin-right:10px">{{item.number}}</span>
  100. </template>
  101. </li>
  102. </ul>
  103. </view> -->
  104. <!-- 信息播报 -->
  105. <!-- </view>
  106. </view> -->
  107. <!--新闻通知-->
  108. <rf-swiper-slide v-if="announceList.length > 0" :list="announceList" @navToList="navToList"
  109. style="margin-top: 20upx;">
  110. <view slot="header" class="swiper-slide-header">
  111. <text class="InformationTrends">{{i18n('InformationTrends')}}</text>
  112. </view>
  113. </rf-swiper-slide>
  114. <!-- 会议区域 -->
  115. <view class="swiper ">
  116. <view class="swiper-box">
  117. <swiper @change="handleDotChange" autoplay="true" circular="true">
  118. <swiper-item :key="index" v-for="(item, index) in recommendAppData" v-if="index <= 2">
  119. <view class="swiper-item" style="height: 300upx;" @click="toDetils(1,item)">
  120. <image :src="websiteUrl + item.meetingPicUrl + '?custom=600_390'" alt=""
  121. v-if="item.meetingPicUrl" style="width: 100%;height: 100%;">
  122. <image :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
  123. style="width: 100%;height: 100%;">
  124. </view>
  125. </swiper-item>
  126. </swiper>
  127. </view>
  128. </view>
  129. </block>
  130. <view style="background-color: #fff;">
  131. <scroll-view scroll-x class="index-cate">
  132. <text style="font-size: 35upx;color: #0B0B11;margin-left: 50upx;">{{i18n('recommend')}}</text>
  133. <view style="margin-left: 80upx;display: inline-block;">
  134. <view v-for="(item, index) in categoryList" :key="index" class="index-cate-item"
  135. :class="tabCurrentIndex === index ? `text-${themeColor.name} active` : ''"
  136. style="color: #000;" @tap.stop="tabClick(index, item.value)">
  137. {{ i18n(item.label) }}
  138. </view>
  139. </view>
  140. </scroll-view>
  141. </view>
  142. <view style="min-height: 1000upx;background-color: #F5F5F5;">
  143. <!-- 项目 -->
  144. <view v-if="tabCurrentIndex==0">
  145. <view
  146. style="margin: 10upx 20upx;height: 200upx;border-radius: 30upx;overflow: hidden;background-color: #fff;"
  147. v-for="(item,index) in ProjectList" @click="toDetils(tabCurrentIndex,item.projectId)">
  148. <img :src="websiteUrl + item.bannerList[0] + '?custom=370_220'" alt=""
  149. v-if="item.bannerList[0]" style="width: 200upx;height: 200upx;">
  150. <img :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
  151. style="width: 200upx;height: 200upx;">
  152. <view class="recommend-bottom">
  153. <view class="recommend-bottom-name">{{item.projectName}}</view>
  154. <!-- <view>{{i18n('Releasedate')}}:{{handlePublishTimeDesc(toDate,item.createDate,$i18n.locale)}} {{$t('common.release')}}</view> -->
  155. </view>
  156. </view>
  157. </view>
  158. <!-- 会议 -->
  159. <view v-if="tabCurrentIndex==1">
  160. <view
  161. style="margin: 10upx 20upx;height: 200upx;border-radius: 30upx;overflow: hidden;background-color: #fff;"
  162. v-for="(item,index) in recommendData" v-if="index<=9"
  163. @click="toDetils(tabCurrentIndex,item)">
  164. <img :src="websiteUrl+ item.meetingPicUrl + '?custom=600_390'" alt=""
  165. v-if="item.meetingPicUrl" style="width: 200upx;height: 200upx;">
  166. <img :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
  167. style="width: 200upx;height: 200upx;">
  168. <view class="recommend-bottom">
  169. <view class="recommend-bottom-name">
  170. {{$i18n.locale=='zh'?item.meetingName:item.meetingNameEn}}
  171. </view>
  172. <!-- <view>{{i18n('Releasedate')}}:{{handlePublishTimeDesc(toDate,item.createDate,$i18n.locale)}} {{$t('common.release')}}</view> -->
  173. </view>
  174. </view>
  175. </view>
  176. <!-- 活动 -->
  177. <view v-if="tabCurrentIndex==2">
  178. <view
  179. style="margin: 10upx 20upx;height: 200upx;border-radius: 30upx;overflow: hidden;background-color: #fff;"
  180. v-for="(item,index) in activityInfo"
  181. @click="toDetils(tabCurrentIndex,item.baseActivityEntityId)">
  182. <img :src="websiteUrl+ item.activityLogo + '?custom=840_350'" alt=""
  183. v-if="item.activityLogo" style="width: 200upx;height: 200upx;">
  184. <img :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
  185. style="width: 200upx;height: 200upx;">
  186. <view class="recommend-bottom">
  187. <view class="recommend-bottom-name">{{item.activityName}}</view>
  188. <!-- <view>{{i18n('Releasedate')}}:{{handlePublishTimeDesc(toDate,item.updateDate,$i18n.locale)}} {{$t('common.release')}}</view> -->
  189. </view>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. <!--页面加载动画-->
  195. <rfLoading isFullScreen :active="loading"></rfLoading>
  196. <rf-back-top :scrollTop="scrollTop"></rf-back-top>
  197. <!-- <rf-back-home></rf-back-home> -->
  198. <u-toast ref="uToast" />
  199. </view>
  200. </template>
  201. <script>
  202. var bitmap = null;
  203. import {
  204. indexList,
  205. productList
  206. } from '@/api/product';
  207. import {
  208. cmsInformationViews
  209. } from '@/api/baseUnitView';
  210. import {
  211. getDicts
  212. } from '@/api/dict';
  213. import {
  214. notifyAnnounceIndex
  215. } from '@/api/basic';
  216. import {
  217. getBaseProjectViews
  218. } from '@/api/project/baseProjectView';
  219. import {
  220. activityInfos
  221. } from '@/api/cooperation/baseCooperationUnit';
  222. import rfSearchBar from '@/components/rf-search-bar/indexMsg';
  223. // import rfSearchBar from '@/components/rf-search-bar/index';
  224. import rfSwiperSlide from '@/components/rf-swiper-slide';
  225. import {
  226. getConfrences
  227. } from "@/api/meeting/meetingOutInfo";
  228. import listCell from '@/components/rf-list-cell';
  229. import guideAD from "@/components/guideAD";
  230. import {
  231. mapMutations
  232. } from 'vuex';
  233. export default {
  234. components: {
  235. rfSearchBar,
  236. listCell,
  237. rfSwiperSlide,
  238. guideAD
  239. },
  240. data() {
  241. return {
  242. guideAD: true,
  243. indexImg: [],
  244. token: '',
  245. current: 0, // 轮播图index
  246. carouselList: {},
  247. hotProductList: [],
  248. recommendProductList: [], //
  249. guessYouLikeProductList: [], //
  250. newProductList: [], //
  251. productCateList: [], //
  252. indicatorDots: true,
  253. languageChangeShow: false,
  254. config: {}, //
  255. toDate: Date.parse(new Date()),
  256. announceList: [], // 公告列表
  257. share: {},
  258. loading: false,
  259. imgCdnUrl: '/static/img/index/',
  260. scrollTop: 0,
  261. kefuShow: true,
  262. loadingType: 'more',
  263. hotSearchDefault: '',
  264. newsBg: this.$mAssetsPath.newsBg,
  265. errorImage: this.$mAssetsPath.errorImage,
  266. appName: this.$mSettingConfig.appName,
  267. categoryProductList: [], // 分类列表
  268. page: 1,
  269. ProjectList: [], // 项目信息
  270. ProjectTotale: 0,
  271. recommendData: [], // 会议信息
  272. activityInfo: [], // 活动信息
  273. initData: {},
  274. tabCurrentIndex: 0,
  275. initData2: [],
  276. LoginShow: false,
  277. recommendAppData: [],
  278. categoryList: [{
  279. "label": 'Project',
  280. "value": "1"
  281. },
  282. {
  283. "label": 'Conference',
  284. "value": "2"
  285. },
  286. {
  287. "label": 'Events',
  288. "value": "3"
  289. },
  290. // {"label":'Achievements',"value":"4"},
  291. ],
  292. page: 0,
  293. msgNumber: 0,
  294. //==========================
  295. broadcastList: [], //新增数据播报
  296. newIcon: [], //new图标显示的flag
  297. mynewIcon: [0, 999, 999, 999, 999, 999, 999, 0, 999, 0, 0, 999], //默认用cookie存储的新增值
  298. mynewIconEn: [0, 999, 999, 999, 999, 999, 999, 0, 999, 0, 0, 999], //默认用cookie存储的新增值(英文)
  299. broadcastFlag_one: false, //信息播报是否滚动样式flag
  300. broadcastFlag_tow: false,
  301. newSum: 0,
  302. scrollArr: [], //用来判断新增条数,从而判断是否让播报滚动
  303. scrollArea: '',
  304. speed: 20,
  305. timer: null,
  306. delay: 1000,
  307. liHeight: '',
  308. };
  309. },
  310. watch: {
  311. '$i18n.locale'() {
  312. this.getDataBroadcastInfos()
  313. }
  314. },
  315. onPageScroll(e) {
  316. this.scrollTop = e.scrollTop;
  317. },
  318. onTabItemTap(e) {
  319. console.log(1111111111)
  320. console.log(e)
  321. },
  322. async onShow() {
  323. uni.setTabBarItem({
  324. index: 0,
  325. text: this.$t('common.Home')
  326. });
  327. uni.setTabBarItem({
  328. index: 1,
  329. text: this.$t('common.News')
  330. });
  331. uni.setTabBarItem({
  332. index: 2,
  333. text: this.$t('common.Find')
  334. });
  335. uni.setTabBarItem({
  336. index: 3,
  337. text: this.$t('common.Service')
  338. });
  339. uni.setTabBarItem({
  340. index: 4,
  341. text: this.$t('common.Account')
  342. });
  343. this.getcmsInformationList(); //资讯信息
  344. if (this.$i18n.locale == 'zh') {
  345. this.initData = await this.$api.json('initData');
  346. this.initData2 = await this.$api.json('initData2');
  347. } else {
  348. this.initData = await this.$api.json('initData_en');
  349. this.initData2 = await this.$api.json('initData2_en');
  350. }
  351. this.token = uni.getStorageSync('Auth-Token') ? 'Bearer ' + uni.getStorageSync('Auth-Token') : '';
  352. //临时代码
  353. // this.initData2.data10.path = "conference";
  354. this.indexImg = await this.$api.json('carouselList');
  355. this.getList();
  356. this.getActivityInfos(); // 获取会议广告位
  357. // var icon = plus.nativeObj.View.getViewById("icon"); //根据图标id取到图片
  358. // if(icon){
  359. // setTimeout( function(){
  360. // icon.show();
  361. // } , 100)
  362. // }
  363. this.hasNewMessage()
  364. },
  365. onLoad(option) {
  366. if (option.language) {
  367. uni.setStorageSync("language", option.language);
  368. this._i18n.locale = option.language;
  369. };
  370. },
  371. computed: {
  372. // 计算倒计时时间
  373. second() {
  374. return function(val) {
  375. return Math.floor(15 * 60 - (new Date() / 1000 - val));
  376. };
  377. },
  378. },
  379. methods: {
  380. async getActivityInfos() {
  381. // let page = {
  382. // pageSize:3,
  383. // pageNo:1,
  384. // language:this.$i18n.locale.toUpperCase(),
  385. // }
  386. // this.getBase(1,page);
  387. const res = await this.$myRequest({
  388. url: '/meeting/meetingBasicInfos/getAppList',
  389. data: {
  390. lang: this.$i18n.locale
  391. }
  392. })
  393. if (res.status == 200) {
  394. if (res.data) {
  395. if (res.data.meetingBasicInfos) this.recommendAppData = res.data.meetingBasicInfos
  396. } else this.recommendAppData = [];
  397. }
  398. },
  399. i18n(data) {
  400. return this.$t('common.' + data);
  401. },
  402. createtab: function() {
  403. //设置水平居中位置
  404. var leftPos = Math.ceil((plus.screen.resolutionWidth - 60) / 2);
  405. var view = new plus.nativeObj.View('icon', {
  406. bottom: '19px',
  407. left: leftPos + 'px',
  408. width: '50px',
  409. height: '50px'
  410. });
  411. view.drawBitmap(bitmap, { //使用canvas画布把图标画到tabbar对应位置上
  412. tag: 'font',
  413. id: 'icon',
  414. src: 'static/icons/selectedLu.png',
  415. position: {
  416. top: '0px',
  417. left: '5px',
  418. width: '50px',
  419. height: '100%'
  420. }
  421. });
  422. view.addEventListener("click", function(e) { //添加事件监听,点击触发
  423. uni.switchTab({ //连接到页面lu
  424. url: '/pages/notify/notify'
  425. })
  426. }, false);
  427. view.show();
  428. },
  429. getList(num) {
  430. let page = {
  431. pageNo: 1,
  432. pageSize: 10,
  433. language: this.$i18n.locale.toUpperCase(),
  434. descStatus: 0,
  435. messageOpenType: 'Y',
  436. status: 1
  437. };
  438. this.getBase('0', page); // 获取项目信息
  439. },
  440. //资讯信息
  441. async getcmsInformationList() {
  442. let list = {
  443. language: this.$i18n.locale.toUpperCase(),
  444. pageSize: 3,
  445. pageNo: 1,
  446. businessType: 'information'
  447. };
  448. const that = this;
  449. const res = await this.$myRequest({
  450. url: '/cms/cmsInformationViews/getInformationList/',
  451. data: {
  452. ...list
  453. }
  454. })
  455. // 给页面的数据赋值
  456. that.announceList = res.data.allDataList;
  457. },
  458. // 获取详情信息
  459. async getBase(num, page, Reach) {
  460. const that = this;
  461. if (num == '0') {
  462. // 项目
  463. const res = await this.$myRequest({
  464. url: '/project/baseProjectViews/',
  465. data: {
  466. ...page
  467. }
  468. });
  469. if (Reach) {
  470. this.ProjectList.push(res.data.baseProjectViews);
  471. } else {
  472. this.ProjectList = res.data.baseProjectViews || [];
  473. this.ProjectTotale = res.data.page.totalCount;
  474. }
  475. } else if (num == '1') {
  476. // 会议
  477. const res = await this.$myRequest({
  478. url: '/meeting/meetingBasicInfos/getList',
  479. data: {}
  480. })
  481. this.recommendData = res.data.meetingBasicInfos || [];
  482. } else if (num == '2') {
  483. // 活动
  484. const res = await this.$myRequest({
  485. url: '/project/activityInfos/showActivityInfos',
  486. data: {
  487. ...page
  488. }
  489. });
  490. this.activityInfo = res.data.activityInfos || [];
  491. } else if (num == '3') {
  492. // 会展
  493. }
  494. },
  495. isMeetingOver(t) {
  496. let ct = Date.parse(new Date());
  497. if (ct - t < 0) {
  498. return true;
  499. } else {
  500. return false;
  501. }
  502. },
  503. getIconUrl(url) {
  504. return require("@/static/img/index/" + url + ".png");
  505. },
  506. // 顶部tab点击
  507. tabClick(index, num) {
  508. this.tabCurrentIndex = index;
  509. if (index == 0) {
  510. // 项目
  511. let page = {
  512. pageNo: 1,
  513. pageSize: 10,
  514. language: this.$i18n.locale.toUpperCase(),
  515. descStatus: 0,
  516. messageOpenType: 'Y',
  517. status: 1
  518. }
  519. this.getBase(index, page)
  520. } else if (index == 1) {
  521. // 会议
  522. let page = {}
  523. this.getBase(index, page)
  524. } else if (index == 2) {
  525. // 活动
  526. let page = {
  527. pageSize: 10,
  528. pageNo: 1,
  529. language: this.$i18n.locale.toUpperCase()
  530. }
  531. this.getBase(index, page)
  532. } else if (index == 2) {
  533. // 会展
  534. let page = {
  535. pageSize: 10,
  536. pageNo: 1,
  537. language: this.$i18n.locale.toUpperCase()
  538. }
  539. this.getBase(index, page)
  540. }
  541. },
  542. toDetils(num, id) {
  543. if (num == "0") {
  544. this.$mRouter.push({
  545. route: `/pages/country/projectPresentation/projectPresentationDetails?id=${id}`,
  546. });
  547. } else if (num == '1') {
  548. let isMeetingOver = this.isMeetingOver(id.meetingEndDate)
  549. let path;
  550. if (isMeetingOver) {
  551. if (this.$i18n.locale == 'en') {
  552. path = `/pages/conference/meetingIndexEn/meetingOverEn?id=${id.id}`
  553. } else {
  554. path = `/pages/conference/meetingIndexCh/meetingOver?id=${id.id}`
  555. }
  556. } else {
  557. if (this.$i18n.locale == 'en') {
  558. path = `/pages/conference/meetingIndexEn/meetingDetailEn?id=${id.id}`
  559. } else {
  560. path = `/pages/conference/meetingIndexCh/meetingDetail?id=${id.id}`
  561. }
  562. }
  563. this.$mRouter.push({
  564. route: path,
  565. });
  566. } else if (num == '2') {
  567. this.$mRouter.push({
  568. route: `/pages/cooperationExchange/cooperationExchangeList/activitiesInfo?ActivitesId=${id}`
  569. })
  570. }
  571. },
  572. // 判断会议是否结束
  573. isMeetingOver(t) {
  574. var ct = Date.parse(new Date());
  575. if (ct - t > 0) {
  576. return true;
  577. } else {
  578. return false;
  579. }
  580. },
  581. // 监听轮播图切换
  582. handleDotChange(e) {
  583. this.current = e.detail.current;
  584. },
  585. // 通用跳转
  586. navTo(route) {
  587. if (route == 'conferenceServices') {
  588. if (this.$i18n.locale == 'zh') {
  589. route = '/pages/conference/meetingIndexCh/meetingIndex';
  590. } else {
  591. route = '/pages/conference/meetingIndexEn/meetingIndexEn';
  592. }
  593. this.$mRouter.push({
  594. route
  595. });
  596. } else if (route === 'pages/financialService/financialService') {
  597. uni.navigateTo({
  598. url: '/' + route
  599. })
  600. } else {
  601. this.$mRouter.push({
  602. route
  603. });
  604. }
  605. },
  606. // 跳转至分类模块
  607. navToCategory(id) {
  608. },
  609. // 通用跳转
  610. navToSearch() {
  611. this.$mRouter.push({
  612. route: `/pages/index/search/search?data=${JSON.stringify(this.search)}`
  613. });
  614. },
  615. navToAndList(src, data) {
  616. this.$mRouter.push({
  617. route: src + '?key=' + data
  618. });
  619. },
  620. navToList(data) {
  621. this.navToAndList('/pages/information/components/rankDetail', data.baseEntityId)
  622. },
  623. //临时方法
  624. toView(path) {
  625. if (!path) return;
  626. uni.navigateTo({
  627. url: `/pages/${path}/${path}`
  628. })
  629. },
  630. //跳转至消息页面
  631. showPage(e) {
  632. if (!this.token) {
  633. this.$refs.uToast.show({
  634. title: this.$i18n.locale.toUpperCase() == 'EN' ? 'Please Login' : '请登录',
  635. type: 'success',
  636. })
  637. setTimeout(() => {
  638. uni.navigateTo({
  639. url: '/pages/public/login?pathName=home',
  640. })
  641. }, 1000)
  642. } else {
  643. uni.navigateTo({
  644. url: '/pages/message/index'
  645. })
  646. }
  647. },
  648. //判断是否有新消息---暂无接口
  649. async hasNewMessage() {
  650. if (!this.token) return;
  651. let res = await this.$myRequest({
  652. url: '/uc/sysPushMessages/selectMsgInfoNum/',
  653. header: {
  654. Token: this.token
  655. },
  656. data: {
  657. readStatus: 'unread'
  658. }
  659. })
  660. if (res.status == 200) {
  661. if (res.data) {
  662. let data = res.data
  663. if (data.page) {
  664. if (data.page.totalCount) {
  665. this.msgNumber = parseInt(data.page.totalCount)
  666. }
  667. }
  668. } else {
  669. this.msgNumber = 0
  670. }
  671. } else {
  672. this.msgNumber = 0
  673. }
  674. },
  675. async getDataBroadcastInfos() {
  676. const res = await this.$myRequest({
  677. url: '/op/dataBroadcast/getDataBroadcastInfos',
  678. data: {
  679. language: this.$i18n.locale,
  680. }
  681. });
  682. var yes = res.data.dataBroadcastInfos;
  683. this.broadcastList = [];
  684. this.newIcon = [];
  685. if (this.$i18n.locale == 'zh') {
  686. for (var key in yes) { //把更新的数据判断后放入一个数组
  687. if (key == 'aProjectTodayNum') {
  688. this.broadcastList.push({
  689. title: '项目资源',
  690. number: yes[key]
  691. });
  692. this.newIcon.push(Number(yes[key]));
  693. } else if (key == 'bNewsTodayNum') {
  694. this.broadcastList.push({
  695. title: '资讯数据',
  696. number: yes[key]
  697. })
  698. this.newIcon.push(Number(yes[key]));
  699. } else if (key == 'cCountryTodayNum') {
  700. this.broadcastList.push({
  701. title: '国别信息',
  702. number: yes[key]
  703. })
  704. this.newIcon.push(Number(yes[key]));
  705. } else if (key == 'dUnitTodayNum') {
  706. this.broadcastList.push({
  707. title: '企业展示',
  708. number: yes[key]
  709. })
  710. this.newIcon.push(Number(yes[key]));
  711. } else if (key == 'eFinanceTodayNum') {
  712. this.broadcastList.push({
  713. title: '金融服务',
  714. number: yes[key]
  715. })
  716. this.newIcon.push(Number(yes[key]));
  717. } else if (key == 'fThinkTankTodayNum') {
  718. this.broadcastList.push({
  719. title: '智库咨询',
  720. number: yes[key]
  721. })
  722. this.newIcon.push(Number(yes[key]));
  723. } else if (key == 'gCooperationNetworkTodayNum') {
  724. this.broadcastList.push({
  725. title: '合作网络',
  726. number: yes[key]
  727. })
  728. this.newIcon.push(Number(yes[key]));
  729. } else if (key == 'hCooperationExchangeTodayNum') {
  730. this.broadcastList.push({
  731. title: '合作交流',
  732. number: yes[key]
  733. })
  734. this.newIcon.push(Number(yes[key]));
  735. } else if (key == 'iCommitteeTodayNum') {
  736. this.broadcastList.push({
  737. title: '区域和国家委员会',
  738. number: yes[key]
  739. })
  740. this.newIcon.push(Number(yes[key]));
  741. } else if (key == 'jResourceSharingTodayNum') {
  742. this.broadcastList.push({
  743. title: '资源共享',
  744. number: yes[key]
  745. })
  746. this.newIcon.push(Number(yes[key]));
  747. } else if (key == 'kMeetingTodayNum') {
  748. this.broadcastList.push({
  749. title: '会议服务',
  750. number: yes[key]
  751. })
  752. this.newIcon.push(Number(yes[key]));
  753. }
  754. };
  755. } else {
  756. for (var key in yes) { //把更新的数据判断后放入一个数组
  757. if (key == 'aProjectTodayNum') {
  758. this.broadcastList.push({
  759. title: 'Projects',
  760. number: yes[key]
  761. });
  762. this.newIcon.push(Number(yes[key]));
  763. } else if (key == 'bNewsTodayNum') {
  764. this.broadcastList.push({
  765. title: 'Info&Data',
  766. number: yes[key]
  767. })
  768. this.newIcon.push(Number(yes[key]));
  769. } else if (key == 'cCountryTodayNum') {
  770. this.broadcastList.push({
  771. title: 'Countries',
  772. number: yes[key]
  773. })
  774. this.newIcon.push(Number(yes[key]));
  775. } else if (key == 'dUnitTodayNum') {
  776. this.broadcastList.push({
  777. title: 'Enterprises',
  778. number: yes[key]
  779. })
  780. this.newIcon.push(Number(yes[key]));
  781. } else if (key == 'eFinanceTodayNum') {
  782. this.broadcastList.push({
  783. title: 'Financial Service',
  784. number: yes[key]
  785. })
  786. this.newIcon.push(Number(yes[key]));
  787. } else if (key == 'fThinkTankTodayNum') {
  788. this.broadcastList.push({
  789. title: 'Consulting',
  790. number: yes[key]
  791. })
  792. this.newIcon.push(Number(yes[key]));
  793. } else if (key == 'gCooperationNetworkTodayNum') {
  794. this.broadcastList.push({
  795. title: 'Cooperation Network',
  796. number: yes[key]
  797. })
  798. this.newIcon.push(Number(yes[key]));
  799. } else if (key == 'hCooperationExchangeTodayNum') {
  800. this.broadcastList.push({
  801. title: 'Cooperation & Communication',
  802. number: yes[key]
  803. })
  804. this.newIcon.push(Number(yes[key]));
  805. } else if (key == 'iCommitteeTodayNum') {
  806. this.broadcastList.push({
  807. title: 'Regional and National Committees',
  808. number: yes[key]
  809. })
  810. this.newIcon.push(Number(yes[key]));
  811. } else if (key == 'jResourceSharingTodayNum') {
  812. this.broadcastList.push({
  813. title: 'Resource Sharing',
  814. number: yes[key]
  815. })
  816. this.newIcon.push(Number(yes[key]));
  817. } else if (key == 'kMeetingTodayNum') {
  818. this.broadcastList.push({
  819. title: 'Conferences',
  820. number: yes[key]
  821. })
  822. this.newIcon.push(Number(yes[key]));
  823. }
  824. };
  825. }
  826. this.newSum = 0;
  827. this.scrollArr = [];
  828. this.newIcon.forEach(item => {
  829. this.newSum = this.newSum + item
  830. if (item > 0) {
  831. this.scrollArr.push(item)
  832. }
  833. });
  834. // console.log('狮子王--------------',this.newIcon,this.newSum,this.scrollArr)
  835. },
  836. //cookie存入
  837. setCookie(cname, cvalue) {
  838. var d = new Date();
  839. var tomorrow = Date.parse(new Date(new Date().setHours(0, 0, 0, 0))) + 86400000; //第二天零点的时间戳毫秒数
  840. var now = Date.parse(new Date()); //现在的时间
  841. d.setTime(d.getTime() + (tomorrow - now));
  842. var expires = "expires=" + d.toGMTString();
  843. document.cookie = cname + "=" + cvalue + "; " + expires;
  844. },
  845. //cookie获取
  846. getCookie(cname) {
  847. var name = cname + "=";
  848. var ca = document.cookie.split(';');
  849. for (var i = 0; i < ca.length; i++) {
  850. var c = ca[i].trim();
  851. if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
  852. }
  853. return "";
  854. },
  855. //打开页面时执行,如果没有cookie就存入,有的话取出赋值给mynewIcon
  856. getMynewicon() {
  857. var now = Date.parse(new Date());
  858. var tomorrow = new Date().setHours(0, 0, 0, 0) + 86400000;
  859. // var tomorrow = Date.parse(new Date())+60000;
  860. //存入一个明日凌晨的时间戳
  861. if (!uni.getStorageSync('Tomorrow')) {
  862. uni.setStorageSync('Tomorrow', tomorrow);
  863. }
  864. //如果打开APP时,时间大于了Tomorrow,就重置newflag与newflagEn,且重新存入明天的tomorrow
  865. if (uni.getStorageSync('Tomorrow') && uni.getStorageSync('Tomorrow') < now) {
  866. uni.setStorageSync('Tomorrow', tomorrow);
  867. uni.setStorageSync('newflag', this.mynewIcon);
  868. uni.setStorageSync('newflagEn', this.mynewIconEn);
  869. }
  870. //如果tomorrow存在,且现在的时间不大于tomorrow,就将newflag与newflagEn取出来
  871. if (uni.getStorageSync('Tomorrow') && uni.getStorageSync('Tomorrow') > now) {
  872. //存中文
  873. if (!uni.getStorageSync('newflag')) {
  874. uni.setStorageSync('newflag', this.mynewIcon)
  875. } else {
  876. this.mynewIcon = uni.getStorageSync('newflag')
  877. };
  878. //存英文
  879. if (!uni.getStorageSync('newflagEn')) {
  880. uni.setStorageSync('newflagEn', this.mynewIconEn)
  881. } else {
  882. this.mynewIconEn = uni.getStorageSync('newflagEn')
  883. };
  884. }
  885. // console.log('华为手机Pro====',this.mynewIcon,this.newIcon)
  886. },
  887. //点击图标时改变相应的数据,并重新存入cookie
  888. changeIcon(i) {
  889. if (this.$i18n.locale == 'zh') {
  890. this.mynewIcon[i] = this.newIcon[i];
  891. uni.setStorageSync('newflag', this.mynewIcon)
  892. } else {
  893. this.mynewIconEn[i] = this.newIcon[i];
  894. uni.setStorageSync('newflagEn', this.mynewIconEn)
  895. }
  896. // console.log('华为手机====',this.getCookie('newflag').split(',')[i],this.newIcon[i])
  897. },
  898. changeIconEn(i) {
  899. if (this.$i18n.locale == 'zh') {
  900. this.mynewIcon[i + 10] = this.newIcon[i + 10];
  901. uni.setStorageSync('newflag', this.mynewIcon)
  902. } else {
  903. this.mynewIconEn[i + 8] = this.newIcon[i + 8];
  904. uni.setStorageSync('newflagEn', this.mynewIconEn)
  905. }
  906. // console.log('华为手机====',this.getCookie('newflag').split(',')[i],this.newIcon[i])
  907. },
  908. scrollbar() {
  909. this.$nextTick(() => {
  910. this.scrollArea = document.querySelector("#scroll");
  911. console.log("111111111111111111111", this.scrollArea);
  912. let li = this.scrollArea.getElementsByTagName("li");
  913. this.liHeight = li[0].offsetHeight;
  914. this.scrollArea.scrollTop = 0;
  915. // this.scrollArea.innerHTML += this.scrollArea.innerHTML;
  916. this.scrollArr.length > 1 && setTimeout(this.startScroll, this.delay);
  917. });
  918. },
  919. startScroll() {
  920. this.timer = setInterval(this.scrollUp, this.speed);
  921. this.scrollArea.scrollTop++;
  922. },
  923. scrollUp() {
  924. // console.log('背灼炎天光',this.liHeight,this.scrollArea.scrollTop)
  925. if (Math.round(this.scrollArea.scrollTop) % this.liHeight == 0) {
  926. clearInterval(this.timer);
  927. setTimeout(this.startScroll, this.delay);
  928. } else {
  929. this.scrollArea.scrollTop++;
  930. if (this.scrollArea.scrollTop >= this.scrollArea.scrollHeight / 2) {
  931. this.scrollArea.scrollTop = 0;
  932. }
  933. }
  934. },
  935. },
  936. onReady() {
  937. this.getDataBroadcastInfos(); //获取更新数据值
  938. this.getMynewicon(); //存cookie
  939. // setTimeout(()=>{
  940. // this.scrollbar();//信息播报滚动
  941. // },3000)
  942. },
  943. };
  944. </script>
  945. <style lang="scss" scoped>
  946. page {
  947. background-color: #fafafa;
  948. }
  949. .recommend-bottom {
  950. float: right;
  951. height: 200upx;
  952. width: 488upx;
  953. }
  954. .recommend-bottom-name {
  955. font-size: 35upx;
  956. font-family: PingFangSC-Medium, PingFang SC;
  957. font-weight: 500;
  958. color: #0B0B11;
  959. line-height: 55upx;
  960. margin-top: 30upx;
  961. overflow: hidden;
  962. // text-overflow:ellipsis;
  963. // white-space: nowrap;
  964. }
  965. .index-cate .index-cate-item {
  966. margin: 0 40upx 10upx 4upx;
  967. }
  968. .InformationTrends {
  969. font-size: 28upx;
  970. font-family: PingFangSC-Medium, PingFang SC;
  971. font-weight: 500;
  972. color: #1777FE;
  973. line-height: 40upx;
  974. }
  975. .classification-list {
  976. height: 55vw;
  977. display: flex;
  978. // padding: 0 30upx;
  979. flex-wrap: wrap;
  980. justify-content: space-between;
  981. // padding: 0;
  982. align-items: center;
  983. background-color: $color-white;
  984. }
  985. .classification-list2 {
  986. height: 27vw;
  987. display: flex;
  988. flex-wrap: wrap;
  989. // flex-direction:column;
  990. justify-content: flex-start;
  991. padding: 0;
  992. align-items: center;
  993. background-color: $color-white;
  994. }
  995. .module-classify-icon,
  996. .module-classify-icon2 {
  997. width: 120upx;
  998. margin-right: 10upx;
  999. text-align: center;
  1000. position: relative;
  1001. vertical-align: super;
  1002. font-size: 26upx !important;
  1003. // height: 230upx;
  1004. img {
  1005. width: 100%;
  1006. height: 100%;
  1007. }
  1008. .viewImg {
  1009. vertical-align: super;
  1010. transform: translateX(6upx);
  1011. }
  1012. .viewImg2 {
  1013. vertical-align: super;
  1014. transform: translateX(32upx);
  1015. }
  1016. }
  1017. .module-classify-icon2 {
  1018. width: 170upx;
  1019. }
  1020. /deep/ .input-box {
  1021. background: red;
  1022. .wrapper {
  1023. width: 90%;
  1024. }
  1025. }
  1026. .rf-index {
  1027. background-color: #f5f5f5;
  1028. .wrapper {
  1029. border-radius: 10upx;
  1030. .h-list {
  1031. background-color: $page-color-base;
  1032. white-space: nowrap;
  1033. padding: 0 $spacing-sm;
  1034. .h-item {
  1035. margin: $spacing-sm $spacing-sm $spacing-sm 0;
  1036. display: inline-block;
  1037. background-color: $color-white;
  1038. font-size: $font-sm;
  1039. width: 280upx;
  1040. border-radius: 6upx;
  1041. .h-item-img {
  1042. display: inline-block;
  1043. width: 280upx;
  1044. height: 300upx;
  1045. border-top-left-radius: 12upx;
  1046. border-top-right-radius: 12upx;
  1047. border-bottom: 1upx solid rgba(0, 0, 0, 0.1);
  1048. }
  1049. .title {
  1050. width: 280upx;
  1051. white-space: normal;
  1052. height: 60upx;
  1053. line-height: 30upx;
  1054. font-size: $font-sm;
  1055. padding: 0 $spacing-sm;
  1056. margin: $spacing-sm 0;
  1057. }
  1058. .last-line {
  1059. padding: 0 $spacing-sm $spacing-base;
  1060. margin-bottom: 5upx;
  1061. display: flex;
  1062. justify-content: space-between;
  1063. align-items: center;
  1064. /* 垂直居中 */
  1065. .red {
  1066. font-size: $font-sm;
  1067. margin-right: 4upx;
  1068. }
  1069. }
  1070. .price {
  1071. font-size: $font-base - 2upx;
  1072. line-height: 1;
  1073. .m-price {
  1074. margin-left: 8upx;
  1075. color: $font-color-light;
  1076. font-size: $font-sm;
  1077. text-decoration: line-through;
  1078. }
  1079. }
  1080. }
  1081. }
  1082. }
  1083. /*轮播图*/
  1084. .swiper {
  1085. width: 100%;
  1086. display: flex;
  1087. background-color: $color-white;
  1088. justify-content: center;
  1089. .swiper-box,
  1090. .swiper-box2 {
  1091. width: 92%;
  1092. height: 40vw;
  1093. // margin-bottom: 30upx;
  1094. overflow: hidden;
  1095. border-radius: 15upx;
  1096. box-shadow: 1upx 1upx 8upx 2upx rgba(0, 0, 0, 0.05);
  1097. //兼容ios,微信小程序
  1098. position: relative;
  1099. z-index: 1;
  1100. swiper {
  1101. width: 100%;
  1102. height: 40vw;
  1103. swiper-item {
  1104. image {
  1105. width: 100%;
  1106. height: 40vw;
  1107. }
  1108. }
  1109. }
  1110. }
  1111. }
  1112. .swiper-box2,
  1113. .swiper-box2 swiper {
  1114. height: 55vw !important;
  1115. }
  1116. .swiper-box2 {
  1117. width: 96% !important;
  1118. }
  1119. /* 爆款推荐 */
  1120. .hot-recommend {
  1121. background-color: $color-white;
  1122. display: flex;
  1123. padding: $spacing-base $spacing-lg 0;
  1124. .hot-recommend-image {
  1125. width: 100%;
  1126. height: 100%;
  1127. }
  1128. .left {
  1129. flex: 3;
  1130. height: 350upx;
  1131. margin-right: 15upx;
  1132. }
  1133. .right {
  1134. flex: 4;
  1135. .hot-recommend-image {
  1136. height: 170upx;
  1137. }
  1138. }
  1139. }
  1140. /*轮播图2*/
  1141. .swiper-item-text {
  1142. position: absolute;
  1143. bottom: 16upx;
  1144. left: 30upx;
  1145. height: 48upx;
  1146. line-height: 48upx;
  1147. background: rgba(0, 0, 0, 0.2);
  1148. width: 90%;
  1149. color: $color-white;
  1150. border-bottom-left-radius: 12upx;
  1151. padding-left: 20upx;
  1152. }
  1153. /*新闻通知*/
  1154. .swiper-slide-header {
  1155. .iconfont {
  1156. font-size: $font-lg + 8upx;
  1157. font-weight: 600;
  1158. }
  1159. }
  1160. /*分类列表*/
  1161. .category-list-wrapper {
  1162. padding: 0 $spacing-base;
  1163. .category-list {
  1164. // width: 100%;
  1165. padding: $spacing-base;
  1166. display: flex;
  1167. justify-content: space-between;
  1168. flex-wrap: wrap;
  1169. background-color: #fff;
  1170. border-radius: 10px;
  1171. .category {
  1172. margin-top: 10upx;
  1173. width: calc(25% - 20upx);
  1174. height: 132upx;
  1175. display: flex;
  1176. text-align: center;
  1177. flex-wrap: wrap;
  1178. .img {
  1179. width: 100%;
  1180. display: flex;
  1181. justify-content: center;
  1182. image {
  1183. width: 12vw;
  1184. height: 12vw;
  1185. border-radius: 50%;
  1186. }
  1187. }
  1188. .text {
  1189. margin-top: 16upx;
  1190. width: 100%;
  1191. display: flex;
  1192. justify-content: center;
  1193. font-size: 24upx;
  1194. color: #3c3c3c;
  1195. }
  1196. }
  1197. }
  1198. }
  1199. /*版权显示*/
  1200. .copyright {
  1201. margin: 10upx 0;
  1202. width: 100%;
  1203. text-align: center;
  1204. color: #666;
  1205. a {
  1206. display: block;
  1207. color: #666;
  1208. text-decoration: none;
  1209. }
  1210. }
  1211. /*限时抢购*/
  1212. .order-item {
  1213. display: flex;
  1214. flex-direction: column;
  1215. background: #fff;
  1216. padding: 0 30upx;
  1217. margin-bottom: 20upx;
  1218. .goods-box-single {
  1219. display: flex;
  1220. padding: 40upx 10upx 10upx;
  1221. height: 330upx;
  1222. border-radius: 12upx;
  1223. margin-top: 20upx;
  1224. box-shadow: 2px 2px 10px rgba(66, 135, 193, 0.2); // 阴影
  1225. border-bottom: 1px solid rgba(0, 0, 0, 0.05); // 边框
  1226. position: relative;
  1227. .goods-img {
  1228. display: block;
  1229. border-radius: 12upx;
  1230. width: 190upx;
  1231. height: 200upx;
  1232. }
  1233. .right {
  1234. flex: 1;
  1235. display: flex;
  1236. flex-direction: column;
  1237. padding: 0 30upx 0 24upx;
  1238. overflow: hidden;
  1239. .title {
  1240. font-weight: bold;
  1241. line-height: 1.2;
  1242. margin: 10upx 0;
  1243. }
  1244. .attr-box {
  1245. line-height: 1.2;
  1246. margin-bottom: 8upx;
  1247. margin-left: 10upx;
  1248. }
  1249. .last-line {
  1250. margin-top: 3upx;
  1251. display: flex;
  1252. justify-content: space-between;
  1253. align-items: center;
  1254. /* 垂直居中 */
  1255. .red {
  1256. margin-right: 4upx;
  1257. }
  1258. }
  1259. .price {
  1260. font-size: $font-lg;
  1261. line-height: 1;
  1262. .m-price {
  1263. margin-left: 8upx;
  1264. color: $font-color-light;
  1265. font-size: $font-sm;
  1266. text-decoration: line-through;
  1267. }
  1268. }
  1269. .triangle-wrapper {
  1270. position: absolute;
  1271. overflow: hidden;
  1272. top: 0;
  1273. right: 0;
  1274. border-radius: 12upx;
  1275. .triangle {
  1276. color: #5eba8f;
  1277. width: 0;
  1278. height: 0;
  1279. border-top: 120upx solid;
  1280. opacity: 0.8;
  1281. border-left: 120upx solid transparent;
  1282. }
  1283. .triangle-content {
  1284. position: absolute;
  1285. top: 28upx;
  1286. right: 0;
  1287. transform: rotate(45deg);
  1288. font-size: $font-sm - 2upx;
  1289. color: #fff;
  1290. }
  1291. }
  1292. }
  1293. }
  1294. .action-box {
  1295. display: flex;
  1296. justify-content: flex-end;
  1297. align-items: center;
  1298. height: 90upx;
  1299. position: relative;
  1300. .discount-time {
  1301. font-size: $font-sm;
  1302. color: $uni-color-success;
  1303. margin-right: 20upx;
  1304. }
  1305. }
  1306. }
  1307. .index-cate-product-list {
  1308. padding-top: $spacing-sm;
  1309. background-color: $page-color-base;
  1310. .no-data {
  1311. margin: 48upx 0;
  1312. color: $font-color-light;
  1313. display: flex;
  1314. justify-content: center;
  1315. align-items: center;
  1316. .iconfont {
  1317. margin-right: 20upx;
  1318. font-size: $font-lg + 16upx;
  1319. }
  1320. }
  1321. }
  1322. }
  1323. .broadcast {
  1324. width: 100%;
  1325. height: 60rpx;
  1326. background-color: #2b5e9e;
  1327. padding: 0 30rpx;
  1328. margin-bottom: 20rpx;
  1329. margin-top: 16rpx;
  1330. border-radius: 13px;
  1331. }
  1332. .testtest_one {
  1333. height: 100%;
  1334. width: max-content;
  1335. line-height: 60rpx;
  1336. white-space: nowrap;
  1337. overflow: hidden;
  1338. }
  1339. @-webkit-keyframes short {
  1340. 0% {
  1341. -webkit-transform: translate3d(0, 0, 0);
  1342. transform: translate3d(0, 0, 0);
  1343. }
  1344. 100% {
  1345. -webkit-transform: translate3d(-300px, 0, 0);
  1346. transform: translate3d(-280px, 0, 0);
  1347. }
  1348. }
  1349. @-webkit-keyframes long {
  1350. 0% {
  1351. -webkit-transform: translate3d(0, 0, 0);
  1352. transform: translate3d(0, 0, 0);
  1353. }
  1354. 100% {
  1355. -webkit-transform: translate3d(-300px, 0, 0);
  1356. transform: translate3d(-980px, 0, 0);
  1357. }
  1358. }
  1359. .testtest_tow {
  1360. width: max-content;
  1361. line-height: 60rpx;
  1362. /* 动画部分 */
  1363. /* animation-name: rowup;
  1364. animation-duration: 5s;
  1365. animation-iteration-count: infinite; */
  1366. -webkit-animation: 10s short linear infinite normal;
  1367. animation: 10s short linear infinite normal;
  1368. }
  1369. .testtest_three {
  1370. width: max-content;
  1371. line-height: 60rpx;
  1372. /* 动画部分 */
  1373. /* animation-name: rowup;
  1374. animation-duration: 5s;
  1375. animation-iteration-count: infinite; */
  1376. -webkit-animation: 12s long linear infinite normal;
  1377. animation: 12s long linear infinite normal;
  1378. }
  1379. .newIcon {
  1380. position: absolute;
  1381. top: 0px;
  1382. right: -15rpx;
  1383. width: 70rpx;
  1384. // right: -2rpx;
  1385. // width: 52rpx;
  1386. padding: 0 10rpx;
  1387. height: 32rpx;
  1388. line-height: 30rpx;
  1389. background-color: red;
  1390. color: white;
  1391. border-radius: 20rpx;
  1392. border: 1rpx solid white;
  1393. }
  1394. .inforTitle {
  1395. display: inline-block;
  1396. height: 90%;
  1397. line-height: 42rpx;
  1398. vertical-align: text-bottom;
  1399. }
  1400. </style>