|
@@ -1,152 +1,154 @@
|
|
|
<template>
|
|
|
- <div style="background: #f0f0f0;padding-bottom:50px">
|
|
|
- <div class="banner">
|
|
|
- <img src="~@/assets/images/zmqy.jpg" alt="">
|
|
|
- </div>
|
|
|
- <div class="bread">
|
|
|
- <div>
|
|
|
- <span>当前位置:首页-知名企业</span>
|
|
|
- </div>
|
|
|
+ <div style="background: #f0f0f0;padding-bottom:50px">
|
|
|
+ <div class="banner">
|
|
|
+ <img src="~@/assets/images/zmqy.jpg" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="bread">
|
|
|
+ <div>
|
|
|
+ <span>当前位置:首页-知名企业</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="smart-device">
|
|
|
+ <div class="smart-title">
|
|
|
+ <span><span>知名企业</span>ENTERPRISE</span>
|
|
|
+ </div>
|
|
|
+ <div class="smart-device-content">
|
|
|
+ <div class="nav-company">
|
|
|
+ <div>
|
|
|
+ <ul>
|
|
|
+ <li v-for="item in companyTypeList" :class="active==item.value?'active':''" @click="changeType(item.value)"><span>{{ item.label }}</span></li>
|
|
|
+ <!-- <li :class="active==1?'active':''" @click="active=1"><span>全部</span></li>-->
|
|
|
+ <!-- <li :class="active==2?'active':''" @click="active=2"><span>新能源</span></li>-->
|
|
|
+ <!-- <li :class="active==3?'active':''" @click="active=3"><span>金融</span></li>-->
|
|
|
+ <!-- <li :class="active==4?'active':''" @click="active=4"><span>生物科技</span></li>-->
|
|
|
+ <!-- <li :class="active==5?'active':''" @click="active=5"><span>软件</span></li>-->
|
|
|
+ <!-- <li :class="active==6?'active':''" @click="active=6"><span>物联网</span></li>-->
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="smart-device">
|
|
|
- <div class="smart-title">
|
|
|
- <span><span>知名企业</span>ENTERPRISE</span>
|
|
|
- </div>
|
|
|
- <div class="smart-device-content">
|
|
|
- <div class="nav-company">
|
|
|
- <div>
|
|
|
- <ul>
|
|
|
- <li v-for="item in companyTypeList" :class="active==item.value?'active':''" @click="changeType(item.value)"><span>{{item.label}}</span></li>
|
|
|
-<!-- <li :class="active==1?'active':''" @click="active=1"><span>全部</span></li>-->
|
|
|
-<!-- <li :class="active==2?'active':''" @click="active=2"><span>新能源</span></li>-->
|
|
|
-<!-- <li :class="active==3?'active':''" @click="active=3"><span>金融</span></li>-->
|
|
|
-<!-- <li :class="active==4?'active':''" @click="active=4"><span>生物科技</span></li>-->
|
|
|
-<!-- <li :class="active==5?'active':''" @click="active=5"><span>软件</span></li>-->
|
|
|
-<!-- <li :class="active==6?'active':''" @click="active=6"><span>物联网</span></li>-->
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <ul class="company-list">
|
|
|
- <li v-for="(item,index) in zsList" :key="index" @click="detail(item)">
|
|
|
- <div class="wrap-device-detail">
|
|
|
- <div class="c-logo">
|
|
|
- <img :src="item.img" alt="">
|
|
|
- </div>
|
|
|
- <div class="c-content">
|
|
|
- <h3>{{item.name}}</h3>
|
|
|
- <p style=" height: 5rem;">{{item.detail}}</p>
|
|
|
- </div>
|
|
|
- <div class="detail-btn">
|
|
|
- <span>查看详情</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <div class="paginationo-box">
|
|
|
- <van-pagination v-model="search.pageNum" :total-items="total" :show-page-size="10" @change="handleCurrentChange">
|
|
|
- <template #prev-text>
|
|
|
- <van-icon name="arrow-left" />
|
|
|
- </template>
|
|
|
- <template #next-text>
|
|
|
- <van-icon name="arrow" />
|
|
|
- </template>
|
|
|
- <template #page="{ text }">{{ text }}</template>
|
|
|
- </van-pagination>
|
|
|
- </div>
|
|
|
+ <ul class="company-list">
|
|
|
+ <li v-for="(item,index) in zsList" :key="index" @click="detail(item)">
|
|
|
+ <div class="wrap-device-detail">
|
|
|
+ <div class="c-logo">
|
|
|
+ <img :src="item.img" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="c-content">
|
|
|
+ <h3>{{ item.name }}</h3>
|
|
|
+ <p style=" height: 5rem;">{{ item.detail }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="detail-btn">
|
|
|
+ <span>查看详情</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <div class="paginationo-box">
|
|
|
+ <van-pagination v-model="search.pageNum" :total-items="total" :show-page-size="10" @change="handleCurrentChange">
|
|
|
+ <template #prev-text>
|
|
|
+ <van-icon name="arrow-left" />
|
|
|
+ </template>
|
|
|
+ <template #next-text>
|
|
|
+ <van-icon name="arrow" />
|
|
|
+ </template>
|
|
|
+ <template #page="{ text }">{{ text }}</template>
|
|
|
+ </van-pagination>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getPropaganda} from "@/service/api_service";
|
|
|
+import { getPropaganda } from '@/service/api_service'
|
|
|
import Base from '@/views/base/base'
|
|
|
import BaseData from '@/views/base/baseData'
|
|
|
export default {
|
|
|
- mixins: [Base, BaseData],
|
|
|
- data () {
|
|
|
- return {
|
|
|
- dc_key: ['company_type'],
|
|
|
- active:0,
|
|
|
- currentPage:1,
|
|
|
- total:0,
|
|
|
- zsList:[
|
|
|
- // {
|
|
|
- // img:'clogo.png',
|
|
|
- // name:'北京网讯互联网科技有限公司',
|
|
|
- // eventIndex:1,
|
|
|
- // detail:'我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司'
|
|
|
- // },
|
|
|
+ mixins: [Base, BaseData],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dc_key: ['COMPANY_INDUSTRY'],
|
|
|
+ active: 0,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ zsList: [
|
|
|
+ // {
|
|
|
+ // img:'clogo.png',
|
|
|
+ // name:'北京网讯互联网科技有限公司',
|
|
|
+ // eventIndex:1,
|
|
|
+ // detail:'我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司我是一家很知名的公司'
|
|
|
+ // },
|
|
|
|
|
|
- ],
|
|
|
- search: {
|
|
|
+ ],
|
|
|
+ search: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 8,
|
|
|
- status: 'published',
|
|
|
- },
|
|
|
- companyTypeList:[]
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- document.documentElement.scrollTop = document.body.scrollTop =0; //回到顶部
|
|
|
- this.initDict(this.dc_key,true).then((res) => {
|
|
|
- this.companyTypeList = this.dc_data.company_type
|
|
|
+ status: 'published'
|
|
|
+ },
|
|
|
+ companyTypeList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ document.documentElement.scrollTop = document.body.scrollTop = 0 // 回到顶部
|
|
|
+ this.initDict(this.dc_key, true).then((res) => {
|
|
|
+ // this.companyTypeList = this.dc_data.company_type
|
|
|
+ this.companyTypeList = this.dc_data.COMPANY_INDUSTRY
|
|
|
+ console.log('res', this.dc_data.COMPANY_INDUSTRY)
|
|
|
this.getData()
|
|
|
- })
|
|
|
- if (window.history && window.history.pushState) {
|
|
|
+ })
|
|
|
+ if (window.history && window.history.pushState) {
|
|
|
// 向历史记录中插入了当前页
|
|
|
history.pushState(null, null, document.URL)
|
|
|
window.addEventListener('popstate', this.goBack, false)
|
|
|
- }
|
|
|
- },
|
|
|
- destroyed() {
|
|
|
- window.removeEventListener('popstate', this.goBack, false)
|
|
|
- },
|
|
|
- methods: {
|
|
|
- goBack() {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ window.removeEventListener('popstate', this.goBack, false)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ goBack() {
|
|
|
// console.log("点击了浏览器的返回按钮");
|
|
|
// sessionStorage.clear()
|
|
|
// window.history.back()
|
|
|
// history.pushState(null, null, document.URL)
|
|
|
this.$router.push({ path: '/' })
|
|
|
- },
|
|
|
- changeType(active){
|
|
|
+ },
|
|
|
+ changeType(active) {
|
|
|
this.search.pageNum = 1
|
|
|
this.search.companyType = active
|
|
|
- this.active=active
|
|
|
+ this.active = active
|
|
|
this.getData()
|
|
|
- },
|
|
|
- handleCurrentChange: function(val) {
|
|
|
+ },
|
|
|
+ handleCurrentChange: function(val) {
|
|
|
this.search.pageNum = val
|
|
|
this.getData()
|
|
|
- },
|
|
|
- getData(){
|
|
|
- getPropaganda(this.search).then(res=>{
|
|
|
- if(res.rows){
|
|
|
- this.total = res.total
|
|
|
- this.zsList = []
|
|
|
- res.rows.forEach(item=>{
|
|
|
- let url = ''
|
|
|
- if(item.logo&&item.logo.length>2){
|
|
|
- const annex = this.$common.castEval(item.logo)
|
|
|
- url = annex[0].url
|
|
|
- }
|
|
|
- const i = {
|
|
|
- img:this.$common.replaceWxDownload(url),
|
|
|
- name:item.companyName,
|
|
|
- content:item.content,
|
|
|
- detail:item.introduction
|
|
|
- }
|
|
|
- this.zsList.push(i)
|
|
|
- })
|
|
|
+ },
|
|
|
+ getData() {
|
|
|
+ getPropaganda(this.search).then(res => {
|
|
|
+ if (res.rows) {
|
|
|
+ this.total = res.total
|
|
|
+ this.zsList = []
|
|
|
+ res.rows.forEach(item => {
|
|
|
+ let url = ''
|
|
|
+ if (item.logo && item.logo.length > 2) {
|
|
|
+ const annex = this.$common.castEval(item.logo)
|
|
|
+ url = annex[0].url
|
|
|
+ }
|
|
|
+ const i = {
|
|
|
+ img: this.$common.replaceWxDownload(url),
|
|
|
+ name: item.companyName,
|
|
|
+ content: item.content,
|
|
|
+ detail: item.introduction
|
|
|
+ }
|
|
|
+ this.zsList.push(i)
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- detail(index){
|
|
|
- this.$router.push({name:'companyDetail',params:index})
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
- };
|
|
|
+ detail(index) {
|
|
|
+ this.$router.push({ name: 'companyDetail', params: index })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
@@ -425,7 +427,6 @@ export default {
|
|
|
color: #fff!important;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|
|
|
.paginationo-box /deep/ .van-pagination__item--active{
|
|
|
background: rgba(75, 175, 227, 1)!important;
|