12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514 |
- <template>
- <view class="rf-index">
- <!-- <guideAD :show="guideAD" :time="5" @close="guideAD = false"></guideAD>-->
- <!--搜索导航栏-->
- <rf-search-bar @search="navToSearch" icon="iconkuaijiecaidan" @tab="tabClick"
- :placeholder="$i18n.locale == 'zh'? '请输入关键字': 'Please input keywords'" @showPage="showPage"
- :msgNumber="msgNumber" />
- <view style="clear: both;"></view>
- <!-- #ifdef APP-PLUS -->
- <view style="paddingTop:160upx">
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <view style="paddingTop:90upx">
- <!-- #endif -->
- <block>
- <view style="background: linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%);
- height: 52vw;">
- <!-- <image src="../../static/img/index/1.png" style="width: 400upx;height: 70upx;margin-top: 20upx;"></image>
- <image src="../../static/img/index/2.png" style="width: 100%;height: 80upx;"></image> -->
- <image src="../../static/img/index/indexBACK.png" mode="" style="width: 100%;height: 100%;"
- v-if="$i18n.locale=='zh'"></image>
- <image src="../../static/img/index/indexBackEn.png" mode="" style="width: 100%;height: 100%;"
- v-else></image>
- </view>
- </block>
- <block>
- <!-- 分类列表 -->
- <view class="swiper" style="margin-top: 20upx;">
- <view class="swiper-box2">
- <swiper @change="handleDotChange" :indicator-dots="indicatorDots">
- <swiper-item>
- <view class="classification-list"
- :style="$i18n.locale=='zh'?'padding:0':'padding:0 0 15upx 0'">
- <view :class="$i18n.locale=='zh'?'module-classify-icon':'module-classify-icon2'"
- v-for="(item,index,trueindex) in initData"
- @click="navTo(item.value),changeIcon(trueindex)">
- <view :class="$i18n.locale=='zh'?'viewImg':'viewImg2'"
- style="width: 100upx;height: 100upx;" :style="{'backgroundImage':'url( '+ item.icon +' )',
- 'background-repeat':'no-repeat', backgroundSize:'100upx 100upx'}">
- <view class="newIcon"
- v-if="$i18n.locale=='zh'?newIcon[trueindex]>mynewIcon[trueindex]:newIcon[trueindex]>mynewIconEn[trueindex]">
- {{ $i18n.locale=='zh'?newIcon[trueindex] - mynewIcon[trueindex]:newIcon[trueindex] - mynewIconEn[trueindex] }}
- </view>
- </view>
- <text
- :style="$i18n.locale=='en'?'height: 45upx;display: block;':''">{{i18n(item.label)}}</text>
- </view>
- </view>
- </swiper-item>
- <swiper-item>
- <view class="classification-list2">
- <view :class="$i18n.locale=='zh'?'module-classify-icon':'module-classify-icon2'"
- v-for="(item,index,trueindex) in initData2"
- @click="navTo(item.value),changeIconEn(trueindex)">
- <view :class="$i18n.locale=='zh'?'viewImg':'viewImg2'"
- style="width: 100upx;height: 100upx;margin-left: 10upx;" :style="{'backgroundImage':'url( '+ item.icon +' )',
- 'background-repeat':'no-repeat', backgroundSize:'100upx 100upx'}">
- <view class="newIcon"
- v-if="$i18n.locale=='zh'?newIcon[trueindex+10] > mynewIcon[trueindex+10]:newIcon[trueindex+8] > mynewIconEn[trueindex+8]">
- {{ $i18n.locale=='zh'?newIcon[trueindex+10] - mynewIcon[trueindex+10]:newIcon[trueindex+8] - mynewIconEn[trueindex+8] }}
- </view>
- </view>
- <text :style="$i18n.locale=='en' || item.label == 'NationalregionalCommissions'?
- 'height: 45upx;display: block;':''">{{i18n(item.label)}}</text>
- </view>
- </view>
- </swiper-item>
- </swiper>
- </view>
- </view>
- <!-- 信息播报部分 -->
- <!-- <view class="broadcast" v-if="newSum!=0">
- <view class="testtest_one" :class="{'testtest_tow':broadcastFlag_one,'testtest_three':broadcastFlag_tow,}"> -->
- <!-- 信息播报 -->
- <!-- <view class="inforTitle" style="color:orange;margin-right:10rpx;">New </view >
- <view class="inforTitle" style="color:white;">{{$i18n.locale=='zh'?'信息播报':'Information broadcast'}} : </view> -->
- <!-- 播报滚动的情况 -->
- <!-- <view class="testtest_one scroll-up" id="scroll" style="display:inline-block" v-if="scrollArr.length>1">
- <ul style="width:300px;padding-left: 20rpx;">
- <li style="height:100%;width:100%;list-style: none;" v-for="(item,index) in broadcastList" :key="index">
- <template v-if="item.number != 0">
- <span style="color:white">{{item.title}}:</span> <span style="color:orange;margin-right:10px">{{item.number}}</span>
- </template>
- </li>
- </ul>
- <ul style="width:300px;padding-left: 20rpx;">
- <li style="height:100%;width:100%;list-style: none;" v-for="(item,index) in broadcastList" :key="index">
- <template v-if="item.number != 0">
- <span style="color:white">{{item.title}}:</span> <span style="color:orange;margin-right:10px">{{item.number}}</span>
- </template>
- </li>
- </ul>
- </view> -->
- <!-- 播报不滚动的情况 -->
- <!-- <view class="testtest_one scroll-up" style="display:inline-block" v-if="scrollArr.length<2">
- <ul style="width:300px;padding-left: 20rpx;">
- <li style="height:100%;width:100%;list-style: none;" v-for="(item,index) in broadcastList" :key="index">
- <template v-if="item.number != 0">
- <span style="color:white">{{item.title}}:</span> <span style="color:orange;margin-right:10px">{{item.number}}</span>
- </template>
- </li>
- </ul>
- </view> -->
- <!-- 信息播报 -->
- <!-- </view>
- </view> -->
- <!--新闻通知-->
- <rf-swiper-slide v-if="announceList.length > 0" :list="announceList" @navToList="navToList"
- style="margin-top: 20upx;">
- <view slot="header" class="swiper-slide-header">
- <text class="InformationTrends">{{i18n('InformationTrends')}}</text>
- </view>
- </rf-swiper-slide>
- <!-- 会议区域 -->
- <view class="swiper ">
- <view class="swiper-box">
- <swiper @change="handleDotChange" autoplay="true" circular="true">
- <swiper-item :key="index" v-for="(item, index) in recommendAppData" v-if="index <= 2">
- <view class="swiper-item" style="height: 300upx;" @click="toDetils(1,item)">
- <image :src="websiteUrl + item.meetingPicUrl + '?custom=600_390'" alt=""
- v-if="item.meetingPicUrl" style="width: 100%;height: 100%;">
- <image :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
- style="width: 100%;height: 100%;">
- </view>
- </swiper-item>
- </swiper>
- </view>
- </view>
- </block>
- <view style="background-color: #fff;">
- <scroll-view scroll-x class="index-cate">
- <text style="font-size: 35upx;color: #0B0B11;margin-left: 50upx;">{{i18n('recommend')}}</text>
- <view style="margin-left: 80upx;display: inline-block;">
- <view v-for="(item, index) in categoryList" :key="index" class="index-cate-item"
- :class="tabCurrentIndex === index ? `text-${themeColor.name} active` : ''"
- style="color: #000;" @tap.stop="tabClick(index, item.value)">
- {{ i18n(item.label) }}
- </view>
- </view>
- </scroll-view>
- </view>
- <view style="min-height: 1000upx;background-color: #F5F5F5;">
- <!-- 项目 -->
- <view v-if="tabCurrentIndex==0">
- <view
- style="margin: 10upx 20upx;height: 200upx;border-radius: 30upx;overflow: hidden;background-color: #fff;"
- v-for="(item,index) in ProjectList" @click="toDetils(tabCurrentIndex,item.projectId)">
- <img :src="websiteUrl + item.bannerList[0] + '?custom=370_220'" alt=""
- v-if="item.bannerList[0]" style="width: 200upx;height: 200upx;">
- <img :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
- style="width: 200upx;height: 200upx;">
- <view class="recommend-bottom">
- <view class="recommend-bottom-name">{{item.projectName}}</view>
- <!-- <view>{{i18n('Releasedate')}}:{{handlePublishTimeDesc(toDate,item.createDate,$i18n.locale)}} {{$t('common.release')}}</view> -->
- </view>
- </view>
- </view>
- <!-- 会议 -->
- <view v-if="tabCurrentIndex==1">
- <view
- style="margin: 10upx 20upx;height: 200upx;border-radius: 30upx;overflow: hidden;background-color: #fff;"
- v-for="(item,index) in recommendData" v-if="index<=9"
- @click="toDetils(tabCurrentIndex,item)">
- <img :src="websiteUrl+ item.meetingPicUrl + '?custom=600_390'" alt=""
- v-if="item.meetingPicUrl" style="width: 200upx;height: 200upx;">
- <img :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
- style="width: 200upx;height: 200upx;">
- <view class="recommend-bottom">
- <view class="recommend-bottom-name">
- {{$i18n.locale=='zh'?item.meetingName:item.meetingNameEn}}
- </view>
- <!-- <view>{{i18n('Releasedate')}}:{{handlePublishTimeDesc(toDate,item.createDate,$i18n.locale)}} {{$t('common.release')}}</view> -->
- </view>
- </view>
- </view>
- <!-- 活动 -->
- <view v-if="tabCurrentIndex==2">
- <view
- style="margin: 10upx 20upx;height: 200upx;border-radius: 30upx;overflow: hidden;background-color: #fff;"
- v-for="(item,index) in activityInfo"
- @click="toDetils(tabCurrentIndex,item.baseActivityEntityId)">
- <img :src="websiteUrl+ item.activityLogo + '?custom=840_350'" alt=""
- v-if="item.activityLogo" style="width: 200upx;height: 200upx;">
- <img :src="websiteUrl+'/def/projectdefault.png'" alt="" v-else
- style="width: 200upx;height: 200upx;">
- <view class="recommend-bottom">
- <view class="recommend-bottom-name">{{item.activityName}}</view>
- <!-- <view>{{i18n('Releasedate')}}:{{handlePublishTimeDesc(toDate,item.updateDate,$i18n.locale)}} {{$t('common.release')}}</view> -->
- </view>
- </view>
- </view>
- </view>
- </view>
- <!--页面加载动画-->
- <rfLoading isFullScreen :active="loading"></rfLoading>
- <rf-back-top :scrollTop="scrollTop"></rf-back-top>
- <!-- <rf-back-home></rf-back-home> -->
- <u-toast ref="uToast" />
- </view>
- </template>
- <script>
- var bitmap = null;
- import {
- indexList,
- productList
- } from '@/api/product';
- import {
- cmsInformationViews
- } from '@/api/baseUnitView';
- import {
- getDicts
- } from '@/api/dict';
- import {
- notifyAnnounceIndex
- } from '@/api/basic';
- import {
- getBaseProjectViews
- } from '@/api/project/baseProjectView';
- import {
- activityInfos
- } from '@/api/cooperation/baseCooperationUnit';
- import rfSearchBar from '@/components/rf-search-bar/indexMsg';
- // import rfSearchBar from '@/components/rf-search-bar/index';
- import rfSwiperSlide from '@/components/rf-swiper-slide';
- import {
- getConfrences
- } from "@/api/meeting/meetingOutInfo";
- import listCell from '@/components/rf-list-cell';
- import guideAD from "@/components/guideAD";
- import {
- mapMutations
- } from 'vuex';
- export default {
- components: {
- rfSearchBar,
- listCell,
- rfSwiperSlide,
- guideAD
- },
- data() {
- return {
- guideAD: true,
- indexImg: [],
- token: '',
- current: 0, // 轮播图index
- carouselList: {},
- hotProductList: [],
- recommendProductList: [], //
- guessYouLikeProductList: [], //
- newProductList: [], //
- productCateList: [], //
- indicatorDots: true,
- languageChangeShow: false,
- config: {}, //
- toDate: Date.parse(new Date()),
- announceList: [], // 公告列表
- share: {},
- loading: false,
- imgCdnUrl: '/static/img/index/',
- scrollTop: 0,
- kefuShow: true,
- loadingType: 'more',
- hotSearchDefault: '',
- newsBg: this.$mAssetsPath.newsBg,
- errorImage: this.$mAssetsPath.errorImage,
- appName: this.$mSettingConfig.appName,
- categoryProductList: [], // 分类列表
- page: 1,
- ProjectList: [], // 项目信息
- ProjectTotale: 0,
- recommendData: [], // 会议信息
- activityInfo: [], // 活动信息
- initData: {},
- tabCurrentIndex: 0,
- initData2: [],
- LoginShow: false,
- recommendAppData: [],
- categoryList: [{
- "label": 'Project',
- "value": "1"
- },
- {
- "label": 'Conference',
- "value": "2"
- },
- {
- "label": 'Events',
- "value": "3"
- },
- // {"label":'Achievements',"value":"4"},
- ],
- page: 0,
- msgNumber: 0,
- //==========================
- broadcastList: [], //新增数据播报
- newIcon: [], //new图标显示的flag
- mynewIcon: [0, 999, 999, 999, 999, 999, 999, 0, 999, 0, 0, 999], //默认用cookie存储的新增值
- mynewIconEn: [0, 999, 999, 999, 999, 999, 999, 0, 999, 0, 0, 999], //默认用cookie存储的新增值(英文)
- broadcastFlag_one: false, //信息播报是否滚动样式flag
- broadcastFlag_tow: false,
- newSum: 0,
- scrollArr: [], //用来判断新增条数,从而判断是否让播报滚动
- scrollArea: '',
- speed: 20,
- timer: null,
- delay: 1000,
- liHeight: '',
- };
- },
- watch: {
- '$i18n.locale'() {
- this.getDataBroadcastInfos()
- }
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- onTabItemTap(e) {
- console.log(1111111111)
- console.log(e)
- },
- async onShow() {
- uni.setTabBarItem({
- index: 0,
- text: this.$t('common.Home')
- });
- uni.setTabBarItem({
- index: 1,
- text: this.$t('common.News')
- });
- uni.setTabBarItem({
- index: 2,
- text: this.$t('common.Find')
- });
- uni.setTabBarItem({
- index: 3,
- text: this.$t('common.Service')
- });
- uni.setTabBarItem({
- index: 4,
- text: this.$t('common.Account')
- });
- this.getcmsInformationList(); //资讯信息
- if (this.$i18n.locale == 'zh') {
- this.initData = await this.$api.json('initData');
- this.initData2 = await this.$api.json('initData2');
- } else {
- this.initData = await this.$api.json('initData_en');
- this.initData2 = await this.$api.json('initData2_en');
- }
- this.token = uni.getStorageSync('Auth-Token') ? 'Bearer ' + uni.getStorageSync('Auth-Token') : '';
- //临时代码
- // this.initData2.data10.path = "conference";
- this.indexImg = await this.$api.json('carouselList');
- this.getList();
- this.getActivityInfos(); // 获取会议广告位
- // var icon = plus.nativeObj.View.getViewById("icon"); //根据图标id取到图片
- // if(icon){
- // setTimeout( function(){
- // icon.show();
- // } , 100)
- // }
- this.hasNewMessage()
- },
- onLoad(option) {
- if (option.language) {
- uni.setStorageSync("language", option.language);
- this._i18n.locale = option.language;
- };
- },
- computed: {
- // 计算倒计时时间
- second() {
- return function(val) {
- return Math.floor(15 * 60 - (new Date() / 1000 - val));
- };
- },
- },
- methods: {
- async getActivityInfos() {
- // let page = {
- // pageSize:3,
- // pageNo:1,
- // language:this.$i18n.locale.toUpperCase(),
- // }
- // this.getBase(1,page);
- const res = await this.$myRequest({
- url: '/meeting/meetingBasicInfos/getAppList',
- data: {
- lang: this.$i18n.locale
- }
- })
- if (res.status == 200) {
- if (res.data) {
- if (res.data.meetingBasicInfos) this.recommendAppData = res.data.meetingBasicInfos
- } else this.recommendAppData = [];
- }
- },
- i18n(data) {
- return this.$t('common.' + data);
- },
- createtab: function() {
- //设置水平居中位置
- var leftPos = Math.ceil((plus.screen.resolutionWidth - 60) / 2);
- var view = new plus.nativeObj.View('icon', {
- bottom: '19px',
- left: leftPos + 'px',
- width: '50px',
- height: '50px'
- });
- view.drawBitmap(bitmap, { //使用canvas画布把图标画到tabbar对应位置上
- tag: 'font',
- id: 'icon',
- src: 'static/icons/selectedLu.png',
- position: {
- top: '0px',
- left: '5px',
- width: '50px',
- height: '100%'
- }
- });
- view.addEventListener("click", function(e) { //添加事件监听,点击触发
- uni.switchTab({ //连接到页面lu
- url: '/pages/notify/notify'
- })
- }, false);
- view.show();
- },
- getList(num) {
- let page = {
- pageNo: 1,
- pageSize: 10,
- language: this.$i18n.locale.toUpperCase(),
- descStatus: 0,
- messageOpenType: 'Y',
- status: 1
- };
- this.getBase('0', page); // 获取项目信息
- },
- //资讯信息
- async getcmsInformationList() {
- let list = {
- language: this.$i18n.locale.toUpperCase(),
- pageSize: 3,
- pageNo: 1,
- businessType: 'information'
- };
- const that = this;
- const res = await this.$myRequest({
- url: '/cms/cmsInformationViews/getInformationList/',
- data: {
- ...list
- }
- })
- // 给页面的数据赋值
- that.announceList = res.data.allDataList;
- },
- // 获取详情信息
- async getBase(num, page, Reach) {
- const that = this;
- if (num == '0') {
- // 项目
- const res = await this.$myRequest({
- url: '/project/baseProjectViews/',
- data: {
- ...page
- }
- });
- if (Reach) {
- this.ProjectList.push(res.data.baseProjectViews);
- } else {
- this.ProjectList = res.data.baseProjectViews || [];
- this.ProjectTotale = res.data.page.totalCount;
- }
- } else if (num == '1') {
- // 会议
- const res = await this.$myRequest({
- url: '/meeting/meetingBasicInfos/getList',
- data: {}
- })
- this.recommendData = res.data.meetingBasicInfos || [];
- } else if (num == '2') {
- // 活动
- const res = await this.$myRequest({
- url: '/project/activityInfos/showActivityInfos',
- data: {
- ...page
- }
- });
- this.activityInfo = res.data.activityInfos || [];
- } else if (num == '3') {
- // 会展
- }
- },
- isMeetingOver(t) {
- let ct = Date.parse(new Date());
- if (ct - t < 0) {
- return true;
- } else {
- return false;
- }
- },
- getIconUrl(url) {
- return require("@/static/img/index/" + url + ".png");
- },
- // 顶部tab点击
- tabClick(index, num) {
- this.tabCurrentIndex = index;
- if (index == 0) {
- // 项目
- let page = {
- pageNo: 1,
- pageSize: 10,
- language: this.$i18n.locale.toUpperCase(),
- descStatus: 0,
- messageOpenType: 'Y',
- status: 1
- }
- this.getBase(index, page)
- } else if (index == 1) {
- // 会议
- let page = {}
- this.getBase(index, page)
- } else if (index == 2) {
- // 活动
- let page = {
- pageSize: 10,
- pageNo: 1,
- language: this.$i18n.locale.toUpperCase()
- }
- this.getBase(index, page)
- } else if (index == 2) {
- // 会展
- let page = {
- pageSize: 10,
- pageNo: 1,
- language: this.$i18n.locale.toUpperCase()
- }
- this.getBase(index, page)
- }
- },
- toDetils(num, id) {
- if (num == "0") {
- this.$mRouter.push({
- route: `/pages/country/projectPresentation/projectPresentationDetails?id=${id}`,
- });
- } else if (num == '1') {
- let isMeetingOver = this.isMeetingOver(id.meetingEndDate)
- let path;
- if (isMeetingOver) {
- if (this.$i18n.locale == 'en') {
- path = `/pages/conference/meetingIndexEn/meetingOverEn?id=${id.id}`
- } else {
- path = `/pages/conference/meetingIndexCh/meetingOver?id=${id.id}`
- }
- } else {
- if (this.$i18n.locale == 'en') {
- path = `/pages/conference/meetingIndexEn/meetingDetailEn?id=${id.id}`
- } else {
- path = `/pages/conference/meetingIndexCh/meetingDetail?id=${id.id}`
- }
- }
- this.$mRouter.push({
- route: path,
- });
- } else if (num == '2') {
- this.$mRouter.push({
- route: `/pages/cooperationExchange/cooperationExchangeList/activitiesInfo?ActivitesId=${id}`
- })
- }
- },
- // 判断会议是否结束
- isMeetingOver(t) {
- var ct = Date.parse(new Date());
- if (ct - t > 0) {
- return true;
- } else {
- return false;
- }
- },
- // 监听轮播图切换
- handleDotChange(e) {
- this.current = e.detail.current;
- },
- // 通用跳转
- navTo(route) {
- if (route == 'conferenceServices') {
- if (this.$i18n.locale == 'zh') {
- route = '/pages/conference/meetingIndexCh/meetingIndex';
- } else {
- route = '/pages/conference/meetingIndexEn/meetingIndexEn';
- }
- this.$mRouter.push({
- route
- });
- } else if (route === 'pages/financialService/financialService') {
- uni.navigateTo({
- url: '/' + route
- })
- } else {
- this.$mRouter.push({
- route
- });
- }
- },
- // 跳转至分类模块
- navToCategory(id) {
- },
- // 通用跳转
- navToSearch() {
- this.$mRouter.push({
- route: `/pages/index/search/search?data=${JSON.stringify(this.search)}`
- });
- },
- navToAndList(src, data) {
- this.$mRouter.push({
- route: src + '?key=' + data
- });
- },
- navToList(data) {
- this.navToAndList('/pages/information/components/rankDetail', data.baseEntityId)
- },
- //临时方法
- toView(path) {
- if (!path) return;
- uni.navigateTo({
- url: `/pages/${path}/${path}`
- })
- },
- //跳转至消息页面
- showPage(e) {
- if (!this.token) {
- this.$refs.uToast.show({
- title: this.$i18n.locale.toUpperCase() == 'EN' ? 'Please Login' : '请登录',
- type: 'success',
- })
- setTimeout(() => {
- uni.navigateTo({
- url: '/pages/public/login?pathName=home',
- })
- }, 1000)
- } else {
- uni.navigateTo({
- url: '/pages/message/index'
- })
- }
- },
- //判断是否有新消息---暂无接口
- async hasNewMessage() {
- if (!this.token) return;
- let res = await this.$myRequest({
- url: '/uc/sysPushMessages/selectMsgInfoNum/',
- header: {
- Token: this.token
- },
- data: {
- readStatus: 'unread'
- }
- })
- if (res.status == 200) {
- if (res.data) {
- let data = res.data
- if (data.page) {
- if (data.page.totalCount) {
- this.msgNumber = parseInt(data.page.totalCount)
- }
- }
- } else {
- this.msgNumber = 0
- }
- } else {
- this.msgNumber = 0
- }
- },
- async getDataBroadcastInfos() {
- const res = await this.$myRequest({
- url: '/op/dataBroadcast/getDataBroadcastInfos',
- data: {
- language: this.$i18n.locale,
- }
- });
- var yes = res.data.dataBroadcastInfos;
- this.broadcastList = [];
- this.newIcon = [];
- if (this.$i18n.locale == 'zh') {
- for (var key in yes) { //把更新的数据判断后放入一个数组
- if (key == 'aProjectTodayNum') {
- this.broadcastList.push({
- title: '项目资源',
- number: yes[key]
- });
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'bNewsTodayNum') {
- this.broadcastList.push({
- title: '资讯数据',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'cCountryTodayNum') {
- this.broadcastList.push({
- title: '国别信息',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'dUnitTodayNum') {
- this.broadcastList.push({
- title: '企业展示',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'eFinanceTodayNum') {
- this.broadcastList.push({
- title: '金融服务',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'fThinkTankTodayNum') {
- this.broadcastList.push({
- title: '智库咨询',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'gCooperationNetworkTodayNum') {
- this.broadcastList.push({
- title: '合作网络',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'hCooperationExchangeTodayNum') {
- this.broadcastList.push({
- title: '合作交流',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'iCommitteeTodayNum') {
- this.broadcastList.push({
- title: '区域和国家委员会',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'jResourceSharingTodayNum') {
- this.broadcastList.push({
- title: '资源共享',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'kMeetingTodayNum') {
- this.broadcastList.push({
- title: '会议服务',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- }
- };
- } else {
- for (var key in yes) { //把更新的数据判断后放入一个数组
- if (key == 'aProjectTodayNum') {
- this.broadcastList.push({
- title: 'Projects',
- number: yes[key]
- });
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'bNewsTodayNum') {
- this.broadcastList.push({
- title: 'Info&Data',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'cCountryTodayNum') {
- this.broadcastList.push({
- title: 'Countries',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'dUnitTodayNum') {
- this.broadcastList.push({
- title: 'Enterprises',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'eFinanceTodayNum') {
- this.broadcastList.push({
- title: 'Financial Service',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'fThinkTankTodayNum') {
- this.broadcastList.push({
- title: 'Consulting',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'gCooperationNetworkTodayNum') {
- this.broadcastList.push({
- title: 'Cooperation Network',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'hCooperationExchangeTodayNum') {
- this.broadcastList.push({
- title: 'Cooperation & Communication',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'iCommitteeTodayNum') {
- this.broadcastList.push({
- title: 'Regional and National Committees',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'jResourceSharingTodayNum') {
- this.broadcastList.push({
- title: 'Resource Sharing',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- } else if (key == 'kMeetingTodayNum') {
- this.broadcastList.push({
- title: 'Conferences',
- number: yes[key]
- })
- this.newIcon.push(Number(yes[key]));
- }
- };
- }
- this.newSum = 0;
- this.scrollArr = [];
- this.newIcon.forEach(item => {
- this.newSum = this.newSum + item
- if (item > 0) {
- this.scrollArr.push(item)
- }
- });
- // console.log('狮子王--------------',this.newIcon,this.newSum,this.scrollArr)
- },
- //cookie存入
- setCookie(cname, cvalue) {
- var d = new Date();
- var tomorrow = Date.parse(new Date(new Date().setHours(0, 0, 0, 0))) + 86400000; //第二天零点的时间戳毫秒数
- var now = Date.parse(new Date()); //现在的时间
- d.setTime(d.getTime() + (tomorrow - now));
- var expires = "expires=" + d.toGMTString();
- document.cookie = cname + "=" + cvalue + "; " + expires;
- },
- //cookie获取
- getCookie(cname) {
- var name = cname + "=";
- var ca = document.cookie.split(';');
- for (var i = 0; i < ca.length; i++) {
- var c = ca[i].trim();
- if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
- }
- return "";
- },
- //打开页面时执行,如果没有cookie就存入,有的话取出赋值给mynewIcon
- getMynewicon() {
- var now = Date.parse(new Date());
- var tomorrow = new Date().setHours(0, 0, 0, 0) + 86400000;
- // var tomorrow = Date.parse(new Date())+60000;
- //存入一个明日凌晨的时间戳
- if (!uni.getStorageSync('Tomorrow')) {
- uni.setStorageSync('Tomorrow', tomorrow);
- }
- //如果打开APP时,时间大于了Tomorrow,就重置newflag与newflagEn,且重新存入明天的tomorrow
- if (uni.getStorageSync('Tomorrow') && uni.getStorageSync('Tomorrow') < now) {
- uni.setStorageSync('Tomorrow', tomorrow);
- uni.setStorageSync('newflag', this.mynewIcon);
- uni.setStorageSync('newflagEn', this.mynewIconEn);
- }
- //如果tomorrow存在,且现在的时间不大于tomorrow,就将newflag与newflagEn取出来
- if (uni.getStorageSync('Tomorrow') && uni.getStorageSync('Tomorrow') > now) {
- //存中文
- if (!uni.getStorageSync('newflag')) {
- uni.setStorageSync('newflag', this.mynewIcon)
- } else {
- this.mynewIcon = uni.getStorageSync('newflag')
- };
- //存英文
- if (!uni.getStorageSync('newflagEn')) {
- uni.setStorageSync('newflagEn', this.mynewIconEn)
- } else {
- this.mynewIconEn = uni.getStorageSync('newflagEn')
- };
- }
- // console.log('华为手机Pro====',this.mynewIcon,this.newIcon)
- },
- //点击图标时改变相应的数据,并重新存入cookie
- changeIcon(i) {
- if (this.$i18n.locale == 'zh') {
- this.mynewIcon[i] = this.newIcon[i];
- uni.setStorageSync('newflag', this.mynewIcon)
- } else {
- this.mynewIconEn[i] = this.newIcon[i];
- uni.setStorageSync('newflagEn', this.mynewIconEn)
- }
- // console.log('华为手机====',this.getCookie('newflag').split(',')[i],this.newIcon[i])
- },
- changeIconEn(i) {
- if (this.$i18n.locale == 'zh') {
- this.mynewIcon[i + 10] = this.newIcon[i + 10];
- uni.setStorageSync('newflag', this.mynewIcon)
- } else {
- this.mynewIconEn[i + 8] = this.newIcon[i + 8];
- uni.setStorageSync('newflagEn', this.mynewIconEn)
- }
- // console.log('华为手机====',this.getCookie('newflag').split(',')[i],this.newIcon[i])
- },
- scrollbar() {
- this.$nextTick(() => {
- this.scrollArea = document.querySelector("#scroll");
- console.log("111111111111111111111", this.scrollArea);
- let li = this.scrollArea.getElementsByTagName("li");
- this.liHeight = li[0].offsetHeight;
- this.scrollArea.scrollTop = 0;
- // this.scrollArea.innerHTML += this.scrollArea.innerHTML;
- this.scrollArr.length > 1 && setTimeout(this.startScroll, this.delay);
- });
- },
- startScroll() {
- this.timer = setInterval(this.scrollUp, this.speed);
- this.scrollArea.scrollTop++;
- },
- scrollUp() {
- // console.log('背灼炎天光',this.liHeight,this.scrollArea.scrollTop)
- if (Math.round(this.scrollArea.scrollTop) % this.liHeight == 0) {
- clearInterval(this.timer);
- setTimeout(this.startScroll, this.delay);
- } else {
- this.scrollArea.scrollTop++;
- if (this.scrollArea.scrollTop >= this.scrollArea.scrollHeight / 2) {
- this.scrollArea.scrollTop = 0;
- }
- }
- },
- },
- onReady() {
- this.getDataBroadcastInfos(); //获取更新数据值
- this.getMynewicon(); //存cookie
- // setTimeout(()=>{
- // this.scrollbar();//信息播报滚动
- // },3000)
- },
- };
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #fafafa;
- }
- .recommend-bottom {
- float: right;
- height: 200upx;
- width: 488upx;
- }
- .recommend-bottom-name {
- font-size: 35upx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #0B0B11;
- line-height: 55upx;
- margin-top: 30upx;
- overflow: hidden;
- // text-overflow:ellipsis;
- // white-space: nowrap;
- }
- .index-cate .index-cate-item {
- margin: 0 40upx 10upx 4upx;
- }
- .InformationTrends {
- font-size: 28upx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #1777FE;
- line-height: 40upx;
- }
- .classification-list {
- height: 55vw;
- display: flex;
- // padding: 0 30upx;
- flex-wrap: wrap;
- justify-content: space-between;
- // padding: 0;
- align-items: center;
- background-color: $color-white;
- }
- .classification-list2 {
- height: 27vw;
- display: flex;
- flex-wrap: wrap;
- // flex-direction:column;
- justify-content: flex-start;
- padding: 0;
- align-items: center;
- background-color: $color-white;
- }
- .module-classify-icon,
- .module-classify-icon2 {
- width: 120upx;
- margin-right: 10upx;
- text-align: center;
- position: relative;
- vertical-align: super;
- font-size: 26upx !important;
- // height: 230upx;
- img {
- width: 100%;
- height: 100%;
- }
- .viewImg {
- vertical-align: super;
- transform: translateX(6upx);
- }
- .viewImg2 {
- vertical-align: super;
- transform: translateX(32upx);
- }
- }
- .module-classify-icon2 {
- width: 170upx;
- }
- /deep/ .input-box {
- background: red;
- .wrapper {
- width: 90%;
- }
- }
- .rf-index {
- background-color: #f5f5f5;
- .wrapper {
- border-radius: 10upx;
- .h-list {
- background-color: $page-color-base;
- white-space: nowrap;
- padding: 0 $spacing-sm;
- .h-item {
- margin: $spacing-sm $spacing-sm $spacing-sm 0;
- display: inline-block;
- background-color: $color-white;
- font-size: $font-sm;
- width: 280upx;
- border-radius: 6upx;
- .h-item-img {
- display: inline-block;
- width: 280upx;
- height: 300upx;
- border-top-left-radius: 12upx;
- border-top-right-radius: 12upx;
- border-bottom: 1upx solid rgba(0, 0, 0, 0.1);
- }
- .title {
- width: 280upx;
- white-space: normal;
- height: 60upx;
- line-height: 30upx;
- font-size: $font-sm;
- padding: 0 $spacing-sm;
- margin: $spacing-sm 0;
- }
- .last-line {
- padding: 0 $spacing-sm $spacing-base;
- margin-bottom: 5upx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- /* 垂直居中 */
- .red {
- font-size: $font-sm;
- margin-right: 4upx;
- }
- }
- .price {
- font-size: $font-base - 2upx;
- line-height: 1;
- .m-price {
- margin-left: 8upx;
- color: $font-color-light;
- font-size: $font-sm;
- text-decoration: line-through;
- }
- }
- }
- }
- }
- /*轮播图*/
- .swiper {
- width: 100%;
- display: flex;
- background-color: $color-white;
- justify-content: center;
- .swiper-box,
- .swiper-box2 {
- width: 92%;
- height: 40vw;
- // margin-bottom: 30upx;
- overflow: hidden;
- border-radius: 15upx;
- box-shadow: 1upx 1upx 8upx 2upx rgba(0, 0, 0, 0.05);
- //兼容ios,微信小程序
- position: relative;
- z-index: 1;
- swiper {
- width: 100%;
- height: 40vw;
- swiper-item {
- image {
- width: 100%;
- height: 40vw;
- }
- }
- }
- }
- }
- .swiper-box2,
- .swiper-box2 swiper {
- height: 55vw !important;
- }
- .swiper-box2 {
- width: 96% !important;
- }
- /* 爆款推荐 */
- .hot-recommend {
- background-color: $color-white;
- display: flex;
- padding: $spacing-base $spacing-lg 0;
- .hot-recommend-image {
- width: 100%;
- height: 100%;
- }
- .left {
- flex: 3;
- height: 350upx;
- margin-right: 15upx;
- }
- .right {
- flex: 4;
- .hot-recommend-image {
- height: 170upx;
- }
- }
- }
- /*轮播图2*/
- .swiper-item-text {
- position: absolute;
- bottom: 16upx;
- left: 30upx;
- height: 48upx;
- line-height: 48upx;
- background: rgba(0, 0, 0, 0.2);
- width: 90%;
- color: $color-white;
- border-bottom-left-radius: 12upx;
- padding-left: 20upx;
- }
- /*新闻通知*/
- .swiper-slide-header {
- .iconfont {
- font-size: $font-lg + 8upx;
- font-weight: 600;
- }
- }
- /*分类列表*/
- .category-list-wrapper {
- padding: 0 $spacing-base;
- .category-list {
- // width: 100%;
- padding: $spacing-base;
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- background-color: #fff;
- border-radius: 10px;
- .category {
- margin-top: 10upx;
- width: calc(25% - 20upx);
- height: 132upx;
- display: flex;
- text-align: center;
- flex-wrap: wrap;
- .img {
- width: 100%;
- display: flex;
- justify-content: center;
- image {
- width: 12vw;
- height: 12vw;
- border-radius: 50%;
- }
- }
- .text {
- margin-top: 16upx;
- width: 100%;
- display: flex;
- justify-content: center;
- font-size: 24upx;
- color: #3c3c3c;
- }
- }
- }
- }
- /*版权显示*/
- .copyright {
- margin: 10upx 0;
- width: 100%;
- text-align: center;
- color: #666;
- a {
- display: block;
- color: #666;
- text-decoration: none;
- }
- }
- /*限时抢购*/
- .order-item {
- display: flex;
- flex-direction: column;
- background: #fff;
- padding: 0 30upx;
- margin-bottom: 20upx;
- .goods-box-single {
- display: flex;
- padding: 40upx 10upx 10upx;
- height: 330upx;
- border-radius: 12upx;
- margin-top: 20upx;
- box-shadow: 2px 2px 10px rgba(66, 135, 193, 0.2); // 阴影
- border-bottom: 1px solid rgba(0, 0, 0, 0.05); // 边框
- position: relative;
- .goods-img {
- display: block;
- border-radius: 12upx;
- width: 190upx;
- height: 200upx;
- }
- .right {
- flex: 1;
- display: flex;
- flex-direction: column;
- padding: 0 30upx 0 24upx;
- overflow: hidden;
- .title {
- font-weight: bold;
- line-height: 1.2;
- margin: 10upx 0;
- }
- .attr-box {
- line-height: 1.2;
- margin-bottom: 8upx;
- margin-left: 10upx;
- }
- .last-line {
- margin-top: 3upx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- /* 垂直居中 */
- .red {
- margin-right: 4upx;
- }
- }
- .price {
- font-size: $font-lg;
- line-height: 1;
- .m-price {
- margin-left: 8upx;
- color: $font-color-light;
- font-size: $font-sm;
- text-decoration: line-through;
- }
- }
- .triangle-wrapper {
- position: absolute;
- overflow: hidden;
- top: 0;
- right: 0;
- border-radius: 12upx;
- .triangle {
- color: #5eba8f;
- width: 0;
- height: 0;
- border-top: 120upx solid;
- opacity: 0.8;
- border-left: 120upx solid transparent;
- }
- .triangle-content {
- position: absolute;
- top: 28upx;
- right: 0;
- transform: rotate(45deg);
- font-size: $font-sm - 2upx;
- color: #fff;
- }
- }
- }
- }
- .action-box {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- height: 90upx;
- position: relative;
- .discount-time {
- font-size: $font-sm;
- color: $uni-color-success;
- margin-right: 20upx;
- }
- }
- }
- .index-cate-product-list {
- padding-top: $spacing-sm;
- background-color: $page-color-base;
- .no-data {
- margin: 48upx 0;
- color: $font-color-light;
- display: flex;
- justify-content: center;
- align-items: center;
- .iconfont {
- margin-right: 20upx;
- font-size: $font-lg + 16upx;
- }
- }
- }
- }
- .broadcast {
- width: 100%;
- height: 60rpx;
- background-color: #2b5e9e;
- padding: 0 30rpx;
- margin-bottom: 20rpx;
- margin-top: 16rpx;
- border-radius: 13px;
- }
- .testtest_one {
- height: 100%;
- width: max-content;
- line-height: 60rpx;
- white-space: nowrap;
- overflow: hidden;
- }
- @-webkit-keyframes short {
- 0% {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
- 100% {
- -webkit-transform: translate3d(-300px, 0, 0);
- transform: translate3d(-280px, 0, 0);
- }
- }
- @-webkit-keyframes long {
- 0% {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
- 100% {
- -webkit-transform: translate3d(-300px, 0, 0);
- transform: translate3d(-980px, 0, 0);
- }
- }
- .testtest_tow {
- width: max-content;
- line-height: 60rpx;
- /* 动画部分 */
- /* animation-name: rowup;
- animation-duration: 5s;
- animation-iteration-count: infinite; */
- -webkit-animation: 10s short linear infinite normal;
- animation: 10s short linear infinite normal;
- }
- .testtest_three {
- width: max-content;
- line-height: 60rpx;
- /* 动画部分 */
- /* animation-name: rowup;
- animation-duration: 5s;
- animation-iteration-count: infinite; */
- -webkit-animation: 12s long linear infinite normal;
- animation: 12s long linear infinite normal;
- }
- .newIcon {
- position: absolute;
- top: 0px;
- right: -15rpx;
- width: 70rpx;
- // right: -2rpx;
- // width: 52rpx;
- padding: 0 10rpx;
- height: 32rpx;
- line-height: 30rpx;
- background-color: red;
- color: white;
- border-radius: 20rpx;
- border: 1rpx solid white;
- }
- .inforTitle {
- display: inline-block;
- height: 90%;
- line-height: 42rpx;
- vertical-align: text-bottom;
- }
- </style>
|