Commit 78c154c4 authored by zhangyanni's avatar zhangyanni

搜索结果无数据

parent 4d19de21
......@@ -686,6 +686,9 @@ module.exports = {
noData: "N/A",
tableData:"There's nothing.",
phoneAddPro:"Please spend a few minutes to complete the project information for Big corporates to better understand the projects.",
sorryTitle1:"Sorry,No “",
sorryActivityTitle:"” Related Events",
sorryArticleTitle:"” Related Articles",
},
stepBarTitle: {
......
......@@ -689,6 +689,9 @@ module.exports = {
noData: "暂无",
tableData: "暂无",
phoneAddPro:"请花几分钟时间填写您的项目信息,以便大企业方快速了解贵方情况。",
sorryTitle1:"抱歉,未找到 “",
sorryActivityTitle:"” 相关活动内容",
sorryArticleTitle:"” 相关文章内容",
},
stepBarTitle: {
......
import api from '../../../api/api';
import Qs from 'qs';
export default {
getArticleListAxios(params){
return api.fetchLoadingLogin("/business/content/selectContentList",params);
},
getChannelListAxios(){
return api.fetchLoadingLogin("/business/content/selectContentChannelList");
}
}
\ No newline at end of file
......@@ -63,25 +63,25 @@
<span>{{item.name}}</span>
</div>
</div>
<div class="searchResultCount">
<div class="searchResultCount" v-if="!hasData">
<span v-if="lang==1&&currentIndex==0">共搜到 <span
class="count">{{totalData}}</span> 个项目</span>
class="count">{{totalProjectData}}</span> 个项目</span>
<span v-if="lang==1&&currentIndex==1">共搜到 <span
class="count">{{totalData}}</span> 个企业需求</span>
class="count">{{totalBusinessData}}</span> 个企业需求</span>
<span v-if="lang==1&&currentIndex==2">共搜到 <span
class="count">{{totalData}}</span> 篇文章</span>
class="count">{{totalArticleData}}</span> 篇文章</span>
<span v-if="lang==1&&currentIndex==3">共搜到 <span
class="count">{{totalData}}</span> 个活动</span>
<span v-if="lang==2&&currentIndex==0"><span class="count">{{totalData}}</span> Startups Found</span>
<span v-if="lang==2&&currentIndex==1"><span class="count">{{totalData}}</span> Requests Found</span>
<span v-if="lang==2&&currentIndex==2"><span class="count">{{totalData}}</span> Articles Found</span>
<span v-if="lang==2&&currentIndex==3"><span class="count">{{totalData}}</span> Events Found</span>
class="count">{{totalActivityData}}</span> 个活动</span>
<span v-if="lang==2&&currentIndex==0"><span class="count">{{totalProjectData}}</span> Startups Found</span>
<span v-if="lang==2&&currentIndex==1"><span class="count">{{totalBusinessData}}</span> Requests Found</span>
<span v-if="lang==2&&currentIndex==2"><span class="count">{{totalArticleData}}</span> Articles Found</span>
<span v-if="lang==2&&currentIndex==3"><span class="count">{{totalActivityData}}</span> Events Found</span>
</div>
</div>
<div class="searchContentItem">
<div class="newcontentList">
<div class="newcontentList" v-if="tableData">
<mt-loadmore :top-method="loadTop" :bottom-method="loadBottom" :auto-fill="false"
:bottom-all-loaded="allLoaded" ref="loadmore">
<ul v-if="tableData">
......@@ -181,6 +181,9 @@
</mt-loadmore>
</div>
<div>
<noData v-if="hasData" :keyword="keyword" :showTab="currentIndex" :nodata="true"></noData>
</div>
</div>
</div>
......@@ -194,9 +197,12 @@
import api from '../../../common/commonApi'
import publicFunc from '../../../common/public';
import {Toast,MessageBox} from 'mint-ui';
import noData from '../../mobile/searchempty'
export default {
name: "mobileSearch",
components:{
noData
},
data() {
return {
keyword: "",
......@@ -219,7 +225,7 @@
name: this.$t("topNav.activity")
}
],
currentIndex:this.publicFun.getCookie("selected")=="contact"?this.$route.query.showTab==1?0:1:this.publicFun.getCookie("selected")=="activity"?3:2,
currentIndex:this.publicFun.getCookie("selected")=="contact"?this.$route.query.showTab==1?0:1:this.publicFun.getCookie("selected")=="activity"?3:0,
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
language: this.$i18n.locale,
page: 1,
......@@ -227,9 +233,13 @@
totalPage: 1,
tableData: [],
allLoaded: false,
totalData: 0,
totalProjectData: 0,
totalBusinessData: 0,
totalArticleData: 0,
totalActivityData: 0,
userInfo: null,
isTrans: false,
hasData:false,
authStatus: this.publicFun.getCookie("userInfo") ? JSON.parse(this.Base64.decode(this.publicFun.getCookie("userInfo"))).authenticationState : null,
}
},
......@@ -414,7 +424,7 @@
api.selectProjectAxios(params).then(res => {
if (res.code == 0) {
this.getUserInfoFunc();
this.totalData = res.result.total;
this.totalProjectData = res.result.total;
if (res.result.records.length > 0) {
this.hasData = false;
res.result.records.forEach((item) => {
......@@ -509,7 +519,7 @@
api.getBigBusinessListAxios(params).then((res) => {
if (res.code == 0) {
this.getUserInfoFunc();
this.totalData = res.result.total;
this.totalBusinessData = res.result.total;
if (res.result.records.length > 0) {
this.hasData = false;
res.result.records.forEach((item) => {
......@@ -621,12 +631,17 @@
};
api.getActivityListAxios(params).then(response => {
if(response.code == 0) {
if(response.result.length>0) this.hasData = false;
else {
this.tableData = null;
this.hasData = true;
}
if(size) {
this.tableData = this.tableData.concat(response.result.records);
}else{
this.tableData = response.result.records;
}
this.totalData = response.result.total;
this.totalActivityData = response.result.total;
if(response.result.pages<this.page){
this.page = 1;
// this.$store.dispatch('applyListPageAction',{path:this.$route.path,pars:this.page});
......
<template>
<div style="padding-bottom: .3rem;">
<div style="margin: 0.4rem 0">
<p style="text-align: center"><img src="../../assets/img/searchempty.png" style="width: 4.25rem;height: 4.4rem;" alt=""></p>
<div class="noDataWrap">
<div>
<div style="margin-bottom: 0.5rem;width: 100%;">
<p style="text-align: center" v-if="showTab==0">
<img src="../../assets/img/mobile/noProject.png" style="height: 1.6rem;width: 1.6rem;" alt="" v-if="lang==1">
<img src="../../assets/img/mobile/noActivity.png" style="height: 1.5rem;width: 2rem;" alt="" v-if="lang==2">
</p>
<p style="text-align: center" v-if="showTab==1"><img src="../../assets/img/mobile/noBusiness.png" style="height: 1.6rem;width: 1.6rem;" alt=""></p>
<p style="text-align: center" v-if="showTab==2"><img src="../../assets/img/mobile/noActivity.png" style="height: 1.5rem;width: 2rem;" alt=""></p>
<p style="text-align: center" v-if="showTab==3"><img src="../../assets/img/mobile/noArticle.png" style="height: 1.6rem;width: 2.5rem;" alt=""></p>
</div>
<p style="font-size:0.32rem;color:#AAAAAA;padding: 0 0.4rem;line-height: 0.5rem;text-align: center;width: 100%;">
<span v-if="showTab==0">{{$t('emptyDataTitle.searchRecordSB')}}</span>
<span v-if="showTab==1">{{$t('emptyDataTitle.searchRecordBB')}}</span>
<span v-if="showTab==2">{{$t('emptyDataTitle.sorryTitle1')+keyword+$t('emptyDataTitle.sorryArticleTitle')}}</span>
<span v-if="showTab==3">{{$t('emptyDataTitle.sorryTitle1')+keyword+$t('emptyDataTitle.sorryActivityTitle')}}</span>
</p>
</div>
<p style="font-size:0.32rem;color:rgba(63,63,83,1);margin: 0 0.7rem;line-height: 0.6rem;text-align: center">
<span v-if="$route.query.tab==1">{{$t('emptyDataTitle.searchRecordSB')}}</span>
<span v-if="$route.query.tab==2">{{$t('emptyDataTitle.searchRecordBB')}}</span>
<span v-if="nodata">{{$t("emptyDataTitle.commonTitle")}}</span>
</p>
<!--<div style="text-align: center;padding: 0 .4rem;" v-if="authStatus!=2">-->
<!--<p style="margin: .25rem 0;margin-bottom: 0;">{{$t("commonTitle.bBNoAuthTitle")}}</p>-->
<!--<el-button type="primary" style="width: 3.6rem;height:.8rem;" @click="handleToAuth">{{$t("register.auth")}}</el-button>-->
<!--</div>-->
</div>
</template>
......@@ -19,12 +25,14 @@
export default {
name : "searchempty",
props:{
nodata:false
nodata:false,
showTab:0,
keyword:""
},
data(){
return{
authStatus:JSON.parse(this.Base64.decode(this.publicFun.getCookie("userInfo"))).authenticationState,
lang: this.$i18n.locale == "zh-CN" ? 1 : 2,
}
},
methods:{
......@@ -37,5 +45,15 @@
</script>
<style scoped lang="scss">
.noDataWrap{
padding-bottom: .3rem;
height: calc(100% - 2.4rem);
display: flex;
flex-wrap: wrap;
align-items: center;
position: absolute;
left: 0;
top: 2.4rem;
justify-content: center;
}
</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