Browse Source

首页 修改页面头部标签显示

master
邓宏 1 month ago
parent
commit
a497330853
  1. 2
      src/view/frame.vue
  2. 73
      src/view/home.vue

2
src/view/frame.vue

@ -184,8 +184,8 @@
</el-image>
<div class="title">{{getters['data/deviceInfo'].systemName}}</div>
<div class="menu-item">
<span :class="{active:$route.path=='/home'}" @click="$router.push({path:'/home'})">首页</span>
<template v-if="getters['data/deviceInfo'].showTable==1">
<span :class="{active:$route.path=='/home'}" @click="$router.push({path:'/home'})">首页</span>
<span :class="{active:$route.path=='/technology'}" @click="$router.push({path:'/technology'})">科技服务</span>
<span :class="{active:$route.path=='/introduce'}" @click="$router.push({path:'/introduce'})">溯源介绍</span>
<span :class="{active:$route.path=='/complaint'}" @click="$router.push({path:'/complaint'})">投诉建议</span>

73
src/view/home.vue

@ -383,40 +383,6 @@
</template>
<el-button round @click="$router.push({path:'/introduce'})">了解详情>></el-button>
</div>
<!-- 名优企业 start -->
<div class="center" style="font-size:36px;margin-top:60px;">名优企业</div>
<div class="center" style="font-size:18px;margin-top:10px;color:#64C3A4;">ENTERPRISE</div>
<div class="center" style="font-size:18px;margin-top:10px;color:#1A1919;">各行业优质企业实现产品可溯源</div>
<div class="search">
<!-- <el-select placeholder="区域选择" size="large" v-model="searchVal.region">
<el-option v-for="(v,k) in district(530000)" :key="k" :label="v.label" :value="v.value"/>
</el-select> -->
<el-input placeholder="请输入搜索内容" size="large" v-model="searchVal">
<template #append>
<el-button size="large" @click="searchCompany">查询</el-button>
</template>
</el-input>
</div>
<div class="company_list">
<div v-for="(v,k) in companyList" :key='k'>
<el-image :src="`${host('imgurl')}/${v.logo}`">
<template #error><img style="width:100%;height:100%;" src="@/assets/img/logo.png"/></template>
<template #placeholder>
<div class="load"/>
</template>
</el-image>
<div class="info">
<div class="name"><span class="textOver">{{v.name}}</span></div>
<div class="type">
<span v-if="v.nodeType" data-title="主营环节">{{v.nodeType}}</span>
<span v-if="v.ynClassType" data-title=" 经营类型">{{v.ynClassType}}</span>
</div>
<div class="contact"><span class="textOver">公司地址{{v.address}}</span><span>联系电话{{v.connectPhone}}</span></div>
</div>
</div>
<span class="more" @click="$router.push({path:'/famousCompany'})" v-if="companyList.length>0">查看更多</span>
</div>
<!-- 名优企业 end -->
<!-- 产品展示 start -->
<div class="center" style="font-size:36px;margin-top:60px;">产品展示</div>
<div class="center" style="font-size:18px;margin-top:10px;color:#64C3A4;">PRODUCT</div>
@ -459,18 +425,6 @@
</div>
</div>
<!-- 产品优势 end -->
<!-- 科技服务 start -->
<el-image class="consult_banner" fit="contain" :src="require('@/assets/img/consult_bg.svg')"/>
<div class="center" style="font-size:36px;margin-top:60px;">科技服务</div>
<div class="center" style="font-size:18px;margin-top:10px;color:#64C3A4;">TECHNOLOGY SERVICE</div>
<div class="consult" v-for="v,k in technology" :key="k" @click="$router.push({path:'/company_detail',query:{id:v.id,type:1}})">
<div>
<div class="title">{{v.type}}-{{v.title}}</div>
<div class="content double-line">{{v.intro}}</div>
</div>
</div>
<div class="more" style="margin-bottom:100px;" @click="$router.push({path:'/technology'})">查看更多>></div>
<!-- 科技服务 end -->
</el-scrollbar>
</frame>
</template>
@ -486,25 +440,9 @@ import qrcode from 'qrcode.vue'
var router=inject('router')
var searchVal=ref("")
var companyList=shallowRef([])
var prodList=shallowRef([])
var companyTreads=shallowRef([])
var technology=shallowRef([])
async function searchCompany(){
var res=await request('/suyuan/homePageApi/getCompanyList',{
params:{
search:searchVal.value,
pageNo:1,
pageSize:3,
}
})
if(res.statu){
companyList.value=res.data.list
}else{
msg.error(res.msg||"获取名优企业失败!")
}
}
async function getProd(){
var res=await request("/suyuan/productionApi/SyIndexList",{
@ -520,14 +458,6 @@ import qrcode from 'qrcode.vue'
msg.error(res.msg||"获取产品展示失败!")
}
}
async function getTechnology(){
var res=await request("/suyuan/technologyApi/indexTechnologyList")
if(res.statu){
technology.value=res.data
}else{
msg.error(res.msg||"获取科技服务失败!")
}
}
async function getCompany(){
var res=await request("/suyuan/trendsApi/getTrendsList",{
params:{
@ -548,9 +478,6 @@ import qrcode from 'qrcode.vue'
}
onMounted(()=>{
searchCompany()
getProd()
// getCompany()
getTechnology()
})
</script>

Loading…
Cancel
Save