Browse Source

新增最新资讯

master
liaoxinyu 2 years ago
parent
commit
8c06429ae2
  1. 18
      src/components/CommonHeader.vue
  2. 3
      src/i18n/de.json
  3. 3
      src/i18n/en.json
  4. 3
      src/i18n/fra.json
  5. 3
      src/i18n/it.json
  6. 3
      src/i18n/jp.json
  7. 3
      src/i18n/kor.json
  8. 3
      src/i18n/pt.json
  9. 3
      src/i18n/spa.json
  10. 3
      src/i18n/tr.json
  11. 3
      src/i18n/tw.json
  12. 11
      src/router/index.js
  13. 174
      src/views/college/latestnews.vue

18
src/components/CommonHeader.vue

@ -60,6 +60,9 @@
<li class="nav-item"> <li class="nav-item">
<router-link class="nav-link" :to="contactUs.url">{{ contactUs.label }}</router-link> <router-link class="nav-link" :to="contactUs.url">{{ contactUs.label }}</router-link>
</li> </li>
<li class="nav-item">
<router-link class="nav-link" :to="learns.url">{{ learns.label }}</router-link>
</li>
<!-- <li class="nav-item"> <!-- <li class="nav-item">
<router-link class="nav-link" :to="announcement.url">{{ announcement.label }}</router-link> <router-link class="nav-link" :to="announcement.url">{{ announcement.label }}</router-link>
</li> --> </li> -->
@ -263,6 +266,10 @@ export default {
label: this.$t("common.contactUs"), label: this.$t("common.contactUs"),
url: "/contact-us", url: "/contact-us",
}, },
// latestnews: {
// label: this.$t("home.latestnews"),
// url: `/latestnews/${14}`
// },
blog: { blog: {
label: this.$t("common.blogs"), label: this.$t("common.blogs"),
links: [ links: [
@ -300,9 +307,13 @@ export default {
label: this.$t("common.announcement"), label: this.$t("common.announcement"),
url: "/notice", url: "/notice",
}, },
learn: { learn: {
label: this.$t("common.college"), label: this.$t("common.college"),
url: "/college", url: "/college",
},
learns: {
label: this.$t("home.latestnews"),
url: `/latestnews/${14}`,
}, },
college: { college: {
label: this.$t("common.college"), label: this.$t("common.college"),
@ -586,6 +597,7 @@ export default {
}) })
.catch((res) => {}); .catch((res) => {});
}, },
}, },
created() { created() {

3
src/i18n/de.json

@ -544,7 +544,8 @@
"download": "AMATAK mobile Terminal herunterladen", "download": "AMATAK mobile Terminal herunterladen",
"easy": "Offener Palmhandel jederzeit und überall", "easy": "Offener Palmhandel jederzeit und überall",
"skan": "Scan-Code und Download jetzt", "skan": "Scan-Code und Download jetzt",
"core_advantages": "Meine Kernkraft sind Daten" "core_advantages": "Meine Kernkraft sind Daten",
"latestnews": "Neueste Nachrichten"
}, },
"option": { "option": {
"waitFor": "Warten auf die Lieferung", "waitFor": "Warten auf die Lieferung",

3
src/i18n/en.json

@ -638,7 +638,8 @@
"download": "Download AMATAK APP", "download": "Download AMATAK APP",
"easy": "Open palm trading anytime, anywhere", "easy": "Open palm trading anytime, anywhere",
"skan": "Scan code now to download", "skan": "Scan code now to download",
"core_advantages": "My core strength is data" "core_advantages": "My core strength is data",
"latestnews": "latest news"
}, },
"option": { "option": {
"waitFor": "Waiting for delivery", "waitFor": "Waiting for delivery",

3
src/i18n/fra.json

@ -544,7 +544,8 @@
"download": "Télécharger le terminal mobile AMATAK", "download": "Télécharger le terminal mobile AMATAK",
"easy": "Ouvrir le commerce de poche n'importe quand, n'importe où", "easy": "Ouvrir le commerce de poche n'importe quand, n'importe où",
"skan": "Numériser le Code pour télécharger maintenant", "skan": "Numériser le Code pour télécharger maintenant",
"core_advantages": "Mon principal avantage est les données." "core_advantages": "Mon principal avantage est les données.",
"latestnews": "dernières nouvelles"
}, },
"option": { "option": {
"waitFor": "En attente de clôture", "waitFor": "En attente de clôture",

3
src/i18n/it.json

@ -544,7 +544,8 @@
"download": "Scarica terminale mobile AMATAK", "download": "Scarica terminale mobile AMATAK",
"easy": "Aprire il palmo trading in qualsiasi momento, ovunque", "easy": "Aprire il palmo trading in qualsiasi momento, ovunque",
"skan": "Scansione codice e download ora", "skan": "Scansione codice e download ora",
"core_advantages": "La mia forza principale è dati" "core_advantages": "La mia forza principale è dati",
"latestnews": "ultime notizie"
}, },
"option": { "option": {
"waitFor": "In attesa di consegna", "waitFor": "In attesa di consegna",

3
src/i18n/jp.json

@ -543,7 +543,8 @@
"download": "ダウンロードAMATAKモバイル端末", "download": "ダウンロードAMATAKモバイル端末",
"easy": "いつでもどこでも、手のひらの取引を開始します。", "easy": "いつでもどこでも、手のひらの取引を開始します。",
"skan": "すぐにコードをスキャンしてダウンロードします", "skan": "すぐにコードをスキャンしてダウンロードします",
"core_advantages": "私の核心の優位はデータです。" "core_advantages": "私の核心の優位はデータです。",
"latestnews": "最新ニュース"
}, },
"option": { "option": {
"coinType": "貨幣種類", "coinType": "貨幣種類",

3
src/i18n/kor.json

@ -543,7 +543,8 @@
"download": "AMATAK 이동 단 다운로드", "download": "AMATAK 이동 단 다운로드",
"easy": "언제 어디서나 거래 를 시작 하 다.", "easy": "언제 어디서나 거래 를 시작 하 다.",
"skan": "즉시 스 캔 다운로드", "skan": "즉시 스 캔 다운로드",
"core_advantages": "저의 핵심 장점 은 데이터 입 니 다." "core_advantages": "저의 핵심 장점 은 데이터 입 니 다.",
"latestnews": "최신 뉴스"
}, },
"option": { "option": {
"coinType": "화폐 종류.", "coinType": "화폐 종류.",

3
src/i18n/pt.json

@ -544,7 +544,8 @@
"download": "Baixe o AMATAK móvel", "download": "Baixe o AMATAK móvel",
"easy": "A qualquer momento e em qualquer lugar, abra a negociação na mão", "easy": "A qualquer momento e em qualquer lugar, abra a negociação na mão",
"skan": "Varre o código para baixar imediatamente", "skan": "Varre o código para baixar imediatamente",
"core_advantages": "Minha principal força são os dados" "core_advantages": "Minha principal força são os dados",
"latestnews": "últimas notícias"
}, },
"option": { "option": {
"waitFor": "À espera da entrega.", "waitFor": "À espera da entrega.",

3
src/i18n/spa.json

@ -537,7 +537,8 @@
"download": "Descargar el terminal móvil AMATAK", "download": "Descargar el terminal móvil AMATAK",
"easy": "En cualquier momento, en cualquier lugar, abrir el comercio de la palma de la mano", "easy": "En cualquier momento, en cualquier lugar, abrir el comercio de la palma de la mano",
"skan": "Descarga de código escaneado ahora", "skan": "Descarga de código escaneado ahora",
"core_advantages": "Mi principal ventaja son los datos" "core_advantages": "Mi principal ventaja son los datos",
"latestnews": "últimas noticias"
}, },
"option": { "option": {
"waitFor": "Esperando la entrega", "waitFor": "Esperando la entrega",

3
src/i18n/tr.json

@ -544,7 +544,8 @@
"download": "AMATAK mobil terminalini indirin", "download": "AMATAK mobil terminalini indirin",
"easy": "Her zaman, her yerde el ticareti açın", "easy": "Her zaman, her yerde el ticareti açın",
"skan": "Şimdi indirmek için kodu tarayın", "skan": "Şimdi indirmek için kodu tarayın",
"core_advantages": "Temel gücüm veri" "core_advantages": "Temel gücüm veri",
"latestnews": "en son haberler"
}, },
"option": { "option": {
"waitFor": "Teslim edilmeyi bekliyor", "waitFor": "Teslim edilmeyi bekliyor",

3
src/i18n/tw.json

@ -580,7 +580,8 @@
"download": "下載AMATAK移動端", "download": "下載AMATAK移動端",
"easy": "隨時隨地,開啟掌上交易", "easy": "隨時隨地,開啟掌上交易",
"skan": "立即掃碼下載", "skan": "立即掃碼下載",
"core_advantages": "我的覈心優勢是數據" "core_advantages": "我的覈心優勢是數據",
"latestnews": "最新資訊"
}, },
"option": { "option": {
"waitFor": "等待交割", "waitFor": "等待交割",

11
src/router/index.js

@ -37,6 +37,9 @@ import ForgotPwd from '@/views/forgotPwd';
// 合约 // 合约
import Contract from '@/views/contract' import Contract from '@/views/contract'
// 关于我们
import latestnews from '@/views/college/latestnews'
// OTC // OTC
import Otc from "./otc"; import Otc from "./otc";
// 公告 // 公告
@ -141,7 +144,13 @@ const routes = [{
path: "/notice/:id", path: "/notice/:id",
component: NoticeDetail, component: NoticeDetail,
props:true props:true
} },
{
name: "latestnews",
path: "/latestnews/:cid",
component: latestnews,
props:true
}
] ]
const router = new VueRouter({ const router = new VueRouter({

174
src/views/college/latestnews.vue

@ -0,0 +1,174 @@
<template>
<div style="background-color: #121212;">
<!-- <secondary-nav /> -->
<!-- 二级导航公用的样式不要乱改 -->
<!-- 列表 -->
<div class="container course-list" style="width: 1320px !important;max-width:none;padding: 10px 0px;">
<div class="row">
<div class="col-12">
<!-- <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/college' }" class="fn-18">{{$t('college.college')}}</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: `/college/list/${cid}`}" class="fn-18" style="color: #fff;">{{title}}</el-breadcrumb-item>
</el-breadcrumb> -->
<!-- 新二级导航 -->
<!-- <ul class="SecondaryNavUl">
<li class="SecondaryNavList" v-for="(item,index) in itemList" :key="index">
<router-link :to="item.url" active-class="SecondaryNavActive">{{item.label}}</router-link>
</li>
</ul> -->
<!-- <div class="title h3 my-4">{{title}}</div> -->
<div class="row justify-content-between" style="margin-top: 20px;">
<router-link :to="`/college/detail/${cid}/${item.id}`" class="item col-lg-3 col-md-6 mb-4 col-xs-12" v-for="(item,index) in articleList" :key="index">
<div class="banner">
<!-- <img src="http://iph.href.lu/260x150" alt /> -->
<img :src="item.full_cover" alt />
</div>
<div class="txt">
{{item.title}}
</div>
<!-- <div class="txt2" v-html="item.body"></div> -->
<div class="txt2">{{item.updated_at}}</div>
</router-link>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import College from "@/api/college";
export default {
data() {
return {
cid: this.$route.params.cid,
articleList: [],
itemList: [],//
}
},
computed: {
title() {
let key = this.cid;
console.log(this.cid, 'this.cid')
switch (key) {
case 'novice':
return this.$t('college.noviceTutorial')
case 'strategy':
return this.$t('college.TradingStrategy')
case 'research':
return this.$t('college.industryResearch')
case 'dictionary':
return this.$t('college.dictionary')
case 'report':
return this.$t('college.media')
case 'OkChain':
return 'OkChain'
case '18':
return this.$t('common.noviceTutorial')
case '21':
return this.$t('college.TradingStrategy')
case '22':
return this.$t('college.industryResearch')
case '32':
return this.$t('home.news')
}
}
},
methods: {
getArticleList() {
College.getArticleList(this.cid).then(data => {
this.articleList = data;
}).catch();
},
getCollegeLinks() {
College.getCategoryList().then(list => {
list.forEach(item => {
this.itemList.push({
url : `/college/list/${item.id}`,
label : item.name
})
})
}).catch(err => {});
},
},
watch: {
$route() {
this.cid = this.$route.params.cid;
this.getArticleList();
}
},
created() {
this.getCollegeLinks();
this.getArticleList();
},
};
</script>
<style scoped>
.course-list .item .banner{
width: 310px;
height: 164px;
border-radius: 10px;
margin-bottom: 35px;
overflow: hidden;
}
.course-list .item .banner img{
width: 310px;
height: 164px;
}
.course-list .item .txt{
padding: 0px 45px 0px 25px;
font-size: 22px;
color: #fff;
margin-bottom: 18px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 66px;
}
.course-list .item .txt2{
padding: 0px 45px 0px 25px;
font-size: 16px;
color: #929292;
margin-bottom: 18px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.SecondaryNavUl{
display: flex;
height: 72px;
}
.SecondaryNavUl .SecondaryNavList{
display: flex;
justify-content: center;
align-items: center;
margin-right: 60px;
height: 100%;
}
.SecondaryNavUl .SecondaryNavList a{
color: #929292;
font-size: 24px;
}
.SecondaryNavUl .SecondaryNavList .SecondaryNavActive {
color: #fff !important;
}
.el-breadcrumb__item:last-child::v-deep .el-breadcrumb__inner::v-deep{
color: #fff !important;
/* 写不进去,无效代码 */
}
/deep/ .el-breadcrumb__item:last-child .el-breadcrumb__inner{
color: #fff !important;
/* 写进去,有效代码 */
}
</style>
Loading…
Cancel
Save