Commit 8c73499b by 林家欣

Merge branch 'master' of https://gitee.com/gs1-office-web-sit/gs1

parents 46632d66 e26a9c5e
......@@ -76,6 +76,40 @@ const medicalAndHealthDetailById = (params = {}) => {
const getHdbdList = (params = {}) => {
return POST(`${Prefix}/office/topicnews/api/getHdbdList`, params)
}
//党史
const dsxxjyTop8 = (params = {}) => {
return GET(`${Prefix}/office/news/api/dsxxjyTop8`, params)
}
//总局精神
const centerTop6 = (params = {}) => {
return GET(`${Prefix}/office/news/api/centerTop6`, params)
}
//规章制度
const gzzdTop7 = (params = {}) => {
return GET(`${Prefix}/office/news/api/gzzdTop7`, params)
}
//图片资讯、中心图片TOP4
const pictureTop4 = (params = {}) => {
return GET(`${Prefix}/office/news/api/pictureTop4`, params)
}
//上月资讯排行
const syzxphList = (params = {}) => {
return GET(`${Prefix}/office/news/api/syzxphList`, params)
}
//专题资讯推荐
const zttjList = (params = {}) => {
return GET(`${Prefix}/office/news/api/zttjList`, params)
}
//专题资讯详情
const newsTopicInfo = (params = {}) => {
return GET(`${Prefix}/office/news/api/newsTopicInfo/${params.id}`)
}
//相关链接
const relatedLinks = (params = {}) => {
return GET(`${Prefix}/office/news/api/relatedLinks`, params)
}
export default {
pictureList,
......@@ -93,5 +127,13 @@ export default {
newsTop10,
medicalAndHealthTenData,
medicalAndHealthDetailById,
getHdbdList
getHdbdList,
pictureTop4,
syzxphList,
zttjList,
newsTopicInfo,
relatedLinks,
dsxxjyTop8,
gzzdTop7,
centerTop6
}
......@@ -624,7 +624,7 @@ export const nav = [
id: "5",
name: "资讯中心",
index: 5,
link: "/News/index",
link: "/News",
rowNum: 4,
children: [
{
......
......@@ -46,7 +46,7 @@
</template>
<script>
import cate from "../comps/cate.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
import list from "./copms/list.vue";
import { nav } from "@/components/layout/header/mock";
import { deepFindBreadcrumb } from "@/utils/utils";
......
......@@ -11,7 +11,7 @@
<script>
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
import breadcrumb from "../comps/breadcrumb.vue";
export default {
components: {
......
......@@ -60,37 +60,7 @@
<div>
<div class="list-style">
<ul>
<li>
<a href="#">办公室党支部组织第三季度党课和青年小组学习</a>
</li>
<li>
<a href="#">党委办公室党支部、编码管理部党支部、成员服务部党支部联合开展主题党日活动</a>
</li>
<li>
<a href="#">编码中心党委理论学习中心组举行2021年度第九次集体学习</a>
</li>
<li>
<a href="#">办公室党支部召开党史学习教育专题组织生活会</a>
</li>
<li>
<a href="#">编码中心党委理论学习中心组 举行2021年度第八次集体学习</a>
</li>
<li>
<a href="#">党委办公室党支部 召开党史学习教育专题组织生活会</a>
</li>
<li>
<a href="#">编码中心党委理论学习中心组 举行2021年第七次集体学习会议</a>
</li>
<li>
<a href="#">办公室党支部开展“学党史、改作风、见行动”主题党课活动</a>
</li>
<li>
<a href="#">张成海为编码中心全体干部职工讲授 党史学习教育专题党课</a>
</li>
<li>
<a href="#">编码中心党委理论学习中心组 举行2021年第六次集体学习(扩大)会议</a>
</li>
<li v-for="(item, i) in dsList" :key="i"><a href="#" @click="goInfo(item.id,item.directpath)">{{item.title}}</a></li>
</ul>
</div>
</div>
......@@ -103,10 +73,11 @@
</div>
<div>
<div class="list-style">
<a href=""> <img src="../../assets/image/djwh/2020122801.jpg" alt=""></a>
<!-- <a href=""> <img src="../../assets/image/djwh/2020122801.jpg" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/2020122802.jpg" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/2020122803.jpg" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/2020122804.jpg" alt=""></a>
<a href=""> <img src="../../assets/image/djwh/2020122804.jpg" alt=""></a> -->
<a v-for="(item,i) in pictureListArr" :key="i" @click="goInfo(item.pictureid,item.directpath)"> <img :src="item.picFile" alt=""></a>
</div>
</div>
</div>
......@@ -140,12 +111,10 @@
<div class="border-div list-style">
<div class="middle-title">
<h4>中央和总局精神</h4>
</div>
<div class="middle-list">
<ul>
<li v-for="(item, i) in centerList" :key="i"><a href="#" @click="goInfo(item.id,item.directpath)">{{item.title}}</a></li>
</ul>
</div>
......@@ -153,7 +122,6 @@
<div class="border-div list-style">
<div class="middle-title">
<h4>规章制度</h4>
</div>
<div class="middle-list">
<ul>
......@@ -197,19 +165,18 @@ export default {
return {
path:process.env.VUE_APP_HOST_URL,
animate:false,
marginTop:0,
hotList:[],
reportList:[],
ruleList:[],
centerList:[],
dsList:[],
pictureListArr:[]
};
},
computed: {
routes() {
},
},
created() {
......@@ -222,14 +189,11 @@ export default {
this.initListFn(8,428).then(function(result) {
that.reportList = result
})
// 中央
this.initListFn(6,429).then(function(result) {
that.centerList = result
})
// 规章制度
this.initListFn(7,430).then(function(result) {
that.ruleList = result
})
//党史
this.dsListFn()
this.centerFn();
this.ruleFn()
this.pictureTop4()
},
mounted () {
this.timer1= setInterval(this.scroll,2000)
......@@ -266,6 +230,58 @@ export default {
return data.list
}
},
// 党史列表
async dsListFn() {
const params = {
page: 1,
limit:8,
};
const listRes =
await this.$api.news.dsxxjyTop8(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.dsList=data
}
},
// 总局
async centerFn() {
const params = {
page: 1,
limit:8,
};
const listRes =
await this.$api.news.centerTop6(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.centerList=data
}
},
// 规章制度
async ruleFn() {
const params = {
page: 1,
limit:8,
};
const listRes =
await this.$api.news.gzzdTop7(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.ruleList=data
}
},
// 图片资讯列表TOP4
async pictureTop4() {
const listRes =
await this.$api.news.pictureTop4();
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.pictureListArr = data
}
},
goInfo(id,directpath){
......@@ -307,6 +323,7 @@ export default {
a{
width: 90%!important;
}
}
}
}
......@@ -415,11 +432,18 @@ html{
}
.hdtp{
.list-style{
img{
a{
display: inline-block;
width: 25%;
float: left;
padding: 4px 3px;
height: 106px;
}
img{
width: 100%;
height: 100%;
background: url('../../assets/image/djwh/2020122802.jpg') 100%;
}
}
......
......@@ -86,7 +86,7 @@
</template>
<script>
import sousuoList from "./comps/sousuo-list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import pages from "../../comps/pages.vue";
import pages from "../../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import Title from "../comps/title.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
Title,
......
......@@ -51,7 +51,7 @@
<script>
import breadcrumb from "../comps/breadcrumb.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -11,7 +11,7 @@
<script>
import breadcrumb from "../comps/breadcrumb.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -13,7 +13,7 @@
<script>
import breadcrumb from "../comps/breadcrumb.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -15,7 +15,7 @@
</template>
<script>
import Title from "../comps/title.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
Title,
......
......@@ -26,7 +26,8 @@
<div class="listStyle xgbz">
<div class="title">中国物品编码中心分支机构培训计划公告</div>
<p>为更好的开展我国商品条码系统成员教育培训工作,使我国商品条码系统成员第一时间了解各地区分支机构培训时间及培训内容,现将中国物品编码中心全国分支机构培训计划进行公布,如需了解请按下方提示点击进入。</p>
<p style="text-align:center;margin-top:110px"><el-button type="primary" style="padding: 9px 30px;margin-right: 6px" >分支机构季度培训计划
<p style="text-align:center;margin-top:110px">
<el-button type="primary" style="padding: 9px 30px;margin-right: 6px" @click="goTraining">分支机构季度培训计划
</el-button></p>
</div>
</div>
......@@ -55,6 +56,11 @@ export default {
methods: {
handleToLogin() {
window.location.href='http://v3.gds.org.cn/LoginService.aspx';
},
goTraining(){
this.$router.push({
path:'/Service/Training'
})
}
},
};
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -27,7 +27,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
cate,
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -34,7 +34,7 @@
<p>电子邮箱:wuxm@ancc.org.cn,liwt@ancc.org.cn</p>
<div class="down">
<span style="margin:20px 0 10px;font-size:14px;display:inline-block">资料下载</span>
<list2 :list="list" />
<list2 :list="list" @getInfo='getInfo'/>
</div>
......@@ -102,44 +102,44 @@ export default {
list: [
{
title: "GS1全球追溯标准(第二版)",
path:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准(第二版).pdf'
directpath:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准(第二版).pdf'
},
{
title: "GS1生鲜果蔬追溯实施指南",
path:"http://www.gs1cn.org/Manage/down/GS1生鲜果蔬追溯实施指南.pdf"
directpath:"http://www.gs1cn.org/Manage/down/GS1生鲜果蔬追溯实施指南.pdf"
},
{
title: "GS1肉禽追溯指南",
path:'http://www.gs1cn.org/Manage/down/GS1肉禽追溯指南.pdf'
directpath:'http://www.gs1cn.org/Manage/down/GS1肉禽追溯指南.pdf'
},
{
title: "GS1鱼类、海鲜和水产养殖追溯指南",
path:'http://www.gs1cn.org/Manage/down/GS1鱼类、海鲜和水产养殖追溯指南.pdf'
directpath:'http://www.gs1cn.org/Manage/down/GS1鱼类、海鲜和水产养殖追溯指南.pdf'
},
{
title: "GS1标准助力食品安全全程追溯",
path:'http://www.gs1cn.org/Manage/down/GS1标准助力食品安全全程追溯.pdf'
directpath:'http://www.gs1cn.org/Manage/down/GS1标准助力食品安全全程追溯.pdf'
},
{
title: "食品追溯 我来教你怎么做",
path:'http://www.gs1cn.org/Manage/down/食品追溯我来教你怎么做.pdf'
directpath:'http://www.gs1cn.org/Manage/down/食品追溯我来教你怎么做.pdf'
},
{
title: "GS1标准在食品安全领域中的应用",
path:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准在食品安全领域中的应用.pdf'
directpath:'http://www.gs1cn.org/Manage/down/GS1全球追溯标准在食品安全领域中的应用.pdf'
},
{
title: "中国食品的跨国追溯",
path:'http://www.gs1cn.org/Manage/down/中国食品的跨国追溯.pdf'
directpath:'http://www.gs1cn.org/Manage/down/中国食品的跨国追溯.pdf'
},
{
title: "商品条码食品安全追溯案例集",
path:'http://www.gs1cn.org/Manage/down/shangpintiaomaanquanzhuisuanliji.pdf'
directpath:'http://www.gs1cn.org/Manage/down/shangpintiaomaanquanzhuisuanliji.pdf'
},
{
title: "乳制品、熟食品与烘烤食品追溯实施指南(美国)",
path:'http://www.gs1cn.org/Manage/down/ruzhipinshushipin.pdf'
directpath:'http://www.gs1cn.org/Manage/down/ruzhipinshushipin.pdf'
},
],
tableResult:{
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -16,7 +16,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -8,7 +8,7 @@
</div>
<div class="down">
<span style="margin:0 0 10px;font-size:14px;display:inline-block">资料下载</span>
<list2 :list="list2" />
<list2 :list="list2" @getInfo="goDown" />
</div>
......@@ -56,9 +56,14 @@ export default {
list2:[
{
title:'移动商务(宣传折页)',
path:'http://www.gs1cn.org/Manage/down/20130620GS1 MobileCom.pdf'
directpath:'http://www.gs1cn.org/Manage/down/20130620GS1 MobileCom.pdf'
}
]
],
goDown(id,url){
if(url&&url!==''){
window.open(url,'_blank');
}
}
};
},
methods: {},
......
......@@ -11,7 +11,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -18,7 +18,7 @@
<script>
import breadcrumb from "../comps/breadcrumb.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
pages,
......
......@@ -9,7 +9,7 @@
</div>
<div class="down">
<span style="margin:0 0 10px;font-size:14px;display:inline-block">资料下载</span>
<list2 :list="list2" />
<list2 :list="list2" @getInfo='getInfo' />
</div>
......@@ -24,7 +24,7 @@ import cate from "../comps/cate.vue";
import Title from "../comps/title.vue";
import list from "./comps/list.vue";
import list2 from "./comps/list2.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......@@ -44,11 +44,11 @@ export default {
list2:[
{
title:'《建材行业商品条码应用指南》',
path:'http://www.gs1cn.org/Manage/down/建材行业商品条码应用指南.pdf'
directpath:'http://www.gs1cn.org/Manage/down/建材行业商品条码应用指南.pdf'
},
{
title:' 服装行业商品条码应用指南',
path:'http://www.gs1cn.org/Manage/down/服装行业商品条码应用指南.pdf'
directpath:'http://www.gs1cn.org/Manage/down/服装行业商品条码应用指南.pdf'
}
],
tableResult:{
......
......@@ -36,7 +36,7 @@
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
cate,
......@@ -53,11 +53,13 @@ export default {
currPage:1,
pageSize:16,
totalCount:0
}
},
pictureListArr:[]
};
},
created(){
this.initListFn(this.tableResult.currPage);
this.pictureTop4()
},
methods: {
...mapMutations({
......@@ -86,7 +88,17 @@ export default {
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.tableResult = data
}
},
// 图片资讯列表TOP4
async pictureTop4() {
const listRes =
await this.$api.news.pictureTop4();
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.pictureListArr = data
}
},
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -10,7 +10,7 @@
<script>
import cate from "../comps/cate.vue";
import list from "./comps/list.vue";
import pages from "../comps/pages.vue";
import pages from "../comps/pages2.vue";
export default {
components: {
......
......@@ -9,7 +9,7 @@
<span @click="goNewPic">查看更多>></span>
</div>
<div class="tpzx-ul">
<div class="tpzx-li" v-for="(tmp, i) in picList" :key="i" @click="goInfo(tmp.pictureId)">
<div class="tpzx-li" v-for="(tmp, i) in picList.slice(0,3)" :key="i" @click="goInfo(tmp.pictureId)">
<div class="tpzx-li-tp">
<img :src="tmp.picFile" alt="" />
</div>
......@@ -19,15 +19,14 @@
</div>
<div class="col-lg-4 top10">
<div class="cate">
<span>8月资讯排行TOP10</span>
<span>月资讯排行TOP10</span>
<span></span>
</div>
<div class="top10-kj">
<ul>
<li v-for="(tmp, i) in 5" :key="i">
<li v-for="(tmp, i) in topData" :key="i" @click="getInfo(tmp.id,tmp.directpath)">
<span></span
><span
>国家市场监督管理总局赴中国物品编码中心进行追溯工作调研</span
><span>{{tmp.title}}</span
>
</li>
</ul>
......@@ -111,7 +110,7 @@
<div class="news-four">
<div class="container">
<ul class="four-ul">
<li v-for="(tmpA, i) in four" :key="i" class="row">
<li v-for="(tmpA, i) in four" :key="i" class="row" @click="goPath(tmpA.path)">
<div class="col-lg-4 four-li-left">
<img :src="tmpA.ico" alt="" />
</div>
......@@ -143,6 +142,7 @@ export default {
{
ico: require("../../assets/image/news/icon_lingshou.png"),
name: "零售",
path:'/News/Retail',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -158,6 +158,7 @@ export default {
{
ico: require("../../assets/image/news/icon_wuliu.png"),
name: "物流",
path:'/News/Logistics',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -173,6 +174,7 @@ export default {
{
ico: require("../../assets/image/news/icon_yiliao.png"),
name: "医疗",
path:'/News/Health',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -188,6 +190,7 @@ export default {
{
ico: require("../../assets/image/news/icon_shipinanquan.png"),
name: "食品安全",
path:'/News/FoodSafety',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -203,6 +206,7 @@ export default {
{
ico: require("../../assets/image/news/icon_dianzishangwu.png"),
name: "电子商务",
path:'/News/ECommerce',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -218,6 +222,7 @@ export default {
{
ico: require("../../assets/image/news/icon_yidongshangwudeng.png"),
name: "移动商务",
path:'/News/MCommerce',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -233,6 +238,7 @@ export default {
{
ico: require("../../assets/image/news/icon_wulianwang.png"),
name: "物联网",
path:'/News/IoT',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -248,6 +254,7 @@ export default {
{
ico: require("../../assets/image/news/icon_yidongshangwudeng.png"),
name: "其他",
path:'/News/Other',
list: [
{
name: "手机扫描商品条码:即时价格比较是零售业未来",
......@@ -265,8 +272,9 @@ export default {
centerList:[],
videoList:[],
localList:[],
depthList:[]
depthList:[],
topData:[],
};
},
created(){
......@@ -289,6 +297,8 @@ export default {
this.initListFn(7,9).then(function(result) {
that.depthList = result
})
//top
this.newsTop10()
},
methods:{
goNewPic(){
......@@ -306,9 +316,11 @@ export default {
path: '/News/Video',
});
},
goPath(path){
this.$router.push({
path: path,
});
},
async initListFn(limit,classId) {
const params = {
page: 1,
......@@ -329,10 +341,10 @@ export default {
limit: 3,
};
const listRes =
await this.$api.news.pictureList(params);
await this.$api.news.pictureTop4(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.picList = data.list
this.picList = data
}
......@@ -344,7 +356,18 @@ export default {
path: `/News/msg?id=${id}`,
});
window.open(link.href,'_blank')
}
},
// top列表
async newsTop10() {
const policyListRes =
await this.$api.news.syzxphList();
const { returnCode, data } = policyListRes;
if (returnCode === "0") {
this.topData = data
}
},
}
};
</script>
......@@ -379,6 +402,7 @@ export default {
align-items: center;
padding: 10px 0;
width: 100%;
cursor: pointer;
span {
display: block;
&:nth-child(1) {
......
......@@ -17,8 +17,8 @@
</div>
<div class="msg-head-right">
<span>分享至:</span>
<img src="../../assets/image/news/icon_weibo.png" alt="" />
<img src="../../assets/image/news/icon_weixin.png" alt="" />
<img src="../../assets/image/news/icon_weibo.png" alt="" @click="toweibo" />
<img src="../../assets/image/news/icon_weixin.png" alt="" @click="weixinShareTimeline"/>
</div>
</div>
<div class="msg-text" v-html="content">
......@@ -32,7 +32,7 @@
<span>相关连接</span>
<span>更多>></span>
</div>
<list :list="xglj.data" />
<list :list="xgljListArr" @getInfo='getInfo' />
</div>
</div>
</div>
......@@ -40,7 +40,7 @@
<div class="top10">
<div class="container">
<div class="cate">
<span>资讯排行TOP10</span>
<span>上月资讯排行TOP10</span>
</div>
<div class="top10-ul">
<div v-for="(tmp, i) in top10.data" :key="i" class="top10-li">
......@@ -70,7 +70,7 @@
<div class="cate">
<span>专题推荐</span>
</div>
<list2 :list="xgljList" @getInfo='getInfo'/>
<list2 :list="zttjListListArr" @getInfo='getInfo'/>
</div>
</div>
</div>
......@@ -120,14 +120,18 @@ export default {
data: [],
},
announceListArr:[],
xgljList:[]
xgljListArr:[],
zttjListListArr:[],
url:window.location.href,
sharesinastring:null
};
},
created() {
this.InfoFn()
this.newsTop10()
this.announceList()
this.zttjList()
this.xgljList()
},
methods: {
async InfoFn() {
......@@ -155,7 +159,7 @@ export default {
// top列表
async newsTop10() {
const policyListRes =
await this.$api.news.newsTop10();
await this.$api.news.syzxphList();
const { returnCode, data } = policyListRes;
if (returnCode === "0") {
this.top10.data = data
......@@ -178,6 +182,35 @@ export default {
}
},
// 专题
async zttjList() {
const params = {
page: 1,
limit: 10,
};
const listRes =
await this.$api.news.zttjList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.zttjListListArr = data
}
},
// 相关链接
async xgljList() {
const params = {
id:9979,
keyword:'GS1'
};
const listRes =
await this.$api.news.relatedLinks(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.xgljListArr = data
}
},
getInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
......@@ -187,7 +220,18 @@ export default {
});
window.open(link.href,'_blank')
}
},
// weibo
toweibo(){
this.sharesinastring ='http://service.weibo.com/share/share.php?title=' +this.title+'&url='+this.url;
window.open(this.sharesinastring, '_blank');//微博在新页面打开
},
//weixin
weixinShareTimeline(){
}
},
};
</script>
......
<template>
<div class="pages">
<div class="pages-left">
<div class="total" v-if="false">共533条,第1/34页</div>
<div class="sizes" v-if="false">
<span>每页显示</span>
<el-select v-model="pages.size" size="mini">
<el-option
v-for="item in sizeList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
</div>
<div class="pages-middle">
<button class="pages-btn" v-if="false">首页</button>
<el-pagination
:page-size="pageSize"
:current-page="currPage"
layout="prev, pager, next"
:total="total"
@size-change="changeSize"
@current-change="goPage"
background
>
</el-pagination>
<button class="pages-btn" v-if="false">尾页</button>
</div>
<div class="pages-right" v-if="false">
<span>跳转至</span>
<div class="jumper">
<input type="text" />
<button class="pages-btn">GO</button>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
currPage: {
default: 0,
type: Number,
},
pageSize: {
default: 0,
type: Number,
},
total: {
default: 0,
type: Number,
}
},
data() {
return {
sizeList: [10, 20],
pages: {
size: 10,
},
};
},
mounted(){
},
methods:{
changeSize(i){
this.$emit('getLimit',this.currPage)
},
goPage(i){
this.$emit('getLimit',i)
}
}
};
</script>
<style lang="scss">
.pages {
.el-select {
width: 66px;
.el-input__inner {
border-radius: 0;
height: 30px;
line-height: 30px;
}
}
.el-pagination {
&.is-background {
button {
margin: 0;
box-sizing: border-box;
width: 36px;
height: 36px;
line-height: 36px;
color: #0e2c6b;
}
.btn-prev {
border-right: 1px solid #d5e3f2;
border-radius: 4px 0px 0px 4px;
}
.btn-next {
border-left: 1px solid #d5e3f2;
border-radius: 0px 4px 4px 0px;
}
.el-pager {
li {
font-size: 12px;
width: 36px;
height: 36px;
line-height: 36px;
color: #0e2c6b;
border-radius: 0;
margin: 0;
border-right: 1px solid #d5e3f2;
box-sizing: border-box;
background: #f0f5fa;
}
li {
&:not(.disabled).active {
background: #c4d7ed;
color: #0e2c6b;
}
&:hover {
color: #0e2c6b;
background: #e5f0fc;
}
&:last-child {
border: 0;
}
}
}
}
}
button {
font-size: 12px;
background: #ffffff;
height: 30px;
}
}
</style>
<style lang="scss" scoped>
.pages {
padding: 20px 0;
display: flex;
justify-content: flex-end;
align-items: center;
flex-wrap: wrap;
font-size: 12px;
> div {
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-end;
}
.pages-left {
.total {
color: #666666;
}
.sizes {
display: flex;
align-items: center;
margin-left: 30px;
span {
margin-right: 10px;
}
}
}
.pages-middle {
margin-left: 10px;
.pages-btn {
border: 1px solid #cccccc;
border-radius: 0;
}
}
.pages-right {
margin-left: 10px;
span {
margin-right: 10px;
}
.jumper {
border: 1px solid #cccccc;
.pages-btn {
border-left: 1px solid #cccccc;
}
input {
width: 40px;
}
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment