Commit 4d19de21 authored by zhangyanni's avatar zhangyanni

搜索页面

parent 20361e26
......@@ -116,6 +116,9 @@ i, em {
html,body{
min-width: 100%;
max-width: 100%;
}
input{
}
/*placeholder css*/
::-webkit-input-placeholder {
......@@ -2177,4 +2180,48 @@ i, em {
transition: transform .3s cubic-bezier(.645, .045, .355, 1), -webkit-transform .3s cubic-bezier(.645, .045, .355, 1);
list-style: none;
}
.header-right-h5,.searchBar{
.el-input .el-input__inner{
border-radius: 1rem !important;
height: .7rem;
background: #F0F1F6;
border: unset;
}
.el-input__prefix{
padding-left: .1rem;
line-height: .7rem !important;
}
}
.searchBar{
.el-input .el-input__inner{
background: #fff;
border:.02rem solid #5d78ff;
color: #3F3F53 !important;
font-size: .28rem;
padding-top: .21rem;
padding-bottom: .21rem;
line-height: .28rem;
height: .7rem;
vertical-align: middle;
}
.el-input__prefix{
margin-right: .2rem;
}
.el-input.iosInput .el-input__inner{
padding-top: .31rem;
}
input::-webkit-input-placeholder {
color: #ADB2CD;
font-size: .28rem;
}
input::-moz-placeholder {
color: #ADB2CD;
font-size: .28rem;
}
input:-ms-input-placeholder {
color: #ADB2CD;
font-size: .28rem;
}
}
}
\ No newline at end of file
import api from "../api/api";
import Qs from 'qs';
let baseUrl = "/business";
export default {
tipInfo (){
return api.fetchPost('/business/tip/tipInfo');
......@@ -18,5 +19,25 @@ export default {
//获取用户选择标签
getUserIntersetedFlagAxios(){
return api.fetchPost('/business/content/selectEmpDataLabelList')
}
},
//获取项目
selectProjectAxios(params){
return api.fetchLoadingLogin('/business/search/project',params);
},
//翻译未登录
transNoLoginAxios(params){
return api.fetchLoadingLogin(baseUrl+"/trans/commonTrans",params);
},
//获取企业列表
getBigBusinessListAxios(params){
return api.fetchLoadingLogin(baseUrl+"/search/business",params);
},
//活动报名列表分页
getActivityListAxios(params){
return api.fetchLoadingGet("/base/channel/searchActivity?"+Qs.stringify(params));
},
}
......@@ -29,6 +29,7 @@ module.exports = {
vote:"Vote",
activity:"Event",
mine:"Mine",
article:"Article",
},
......@@ -665,7 +666,12 @@ module.exports = {
searchThree:"Please enter account",
goTianxie:"Submit",
detail:"Detail",
editInfo:"Edit"
editInfo:"Edit",
searchKeyword:"Please search for keywords",
keywordTips:"Search for Startups, Company Names, Articles, Events",
popular:"Popular",
historySearch:"History Search"
},
......
......@@ -30,6 +30,7 @@ module.exports = {
vote:"评选",
activity:"活动",
mine:"我的",
article:"文章"
},
......@@ -664,7 +665,18 @@ module.exports = {
searchThree:"请输入帐号检索",
goTianxie:"去填写",
detail:"详情",
editInfo:"编辑资料"
editInfo:"编辑资料",
searchKeyword:"请输入关键词",
keywordTips:"搜索项目、企业名称、文章、活动",
popular:"热门",
historySearch:"历史搜索",
totalSearch:"共搜到",
projectTitleSearch:" 个项目",
bigBusinessTitleSearch:" 个企业需求",
articleTitleSearch:" 篇文章",
activityTitleSearch:" 个活动",
},
emptyDataTitle: {
......
......@@ -110,7 +110,7 @@
color: #5d78ff;
}
.selectedLang{
font-weight: bold;
font-weight: bolder;
}
}
}
......
......@@ -5,18 +5,13 @@
<img src="../../assets/img/index/techbook-LOGO-01@2x.png" alt="" @click="handleToIndex">
</div>
<div class="header-right">
<div class="header-right-h5">
<span @click="changeLangEvent()"><i :class="lang==='zh-CN'?'selectedLang':''"></i><i> / </i><i
:class="lang==='en'?'selectedLang':''">En</i></span>
<el-button type="primary" size="small" class="registerBtn" v-if="!userInfo"
@click="$router.push('/loginByPhone')">{{$t("mobile.alreadyLogin")}}
</el-button>
<i class="iconfont icon-iconsearch" v-if="userInfo" @click="searchVisibleFunc"></i>
</div>
<div class="searchWrap" v-if="searchVisible">
<el-input style="width: 5.18rem;border-radius: .06rem;" :placeholder="$t('commonTitle.placeholderKey')"
v-model="keyword" @keyup.enter.native="handleSearchDetail(keyword)"></el-input>
<el-button type="primary" @click="handleSearchDetail(keyword)">{{$t("searchResult.search")}}</el-button>
<el-input style="width: 73%;border-radius: .06rem;margin-left: .3rem;" :placeholder="$t('commonTitle.searchKeyword')"
v-model="keyword" @focus="$router.push('/mobilesearch')" :style="{width:isReturn?'73%':'75%'}">
<i slot="prefix" class="iconfont icon-iconsearch"></i>
</el-input>
</div>
</div>
......@@ -223,7 +218,7 @@
left: 0;
height: 1rem;
display: flex;
/*justify-content: space-around;*/
justify-content: space-around;
align-items: center;
background: #ECECF2;
background: #fff;
......@@ -232,27 +227,26 @@
padding: 0 .2rem;
box-shadow: 0px 0.04rem .15rem 0px rgba(0, 0, 0, 0.1);
.header-left {
width: 50%;
float: left;
display: flex;
align-items: center;
padding-right: .3rem;
i {
font-size: .3rem;
padding-right: .3rem;
}
img {
height: .45rem;
height: .38rem;
vertical-align: top;
}
}
.header-right {
width: 50%;
float: right;
display: flex;
align-items: center;
justify-content: flex-end;
span {
color: #5d78ff;
color: #3F3F53;
}
.selectedLang {
font-weight: bold;
......
......@@ -168,7 +168,7 @@ router.beforeEach((to, from, next) => {
if (i18n.locale== "zh-CN") router.replace({path:'/loginByPhone',query:to.query});
}
if(!publicFun.getCookie("userInfo")){
if(to.name == 'dashboard'||to.name=='indexView'|| to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'||to.name=='completeInfoCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'||to.name=='indexView'||to.name=="mobileIndex"||to.name=="mobileLogin"||to.name=="loginByPhone"||to.name=="loginByEmail"||to.name=="mobileRegister"||to.name=="duijieshareRequire"||to.name=="duijieshareProject"||to.name=="knowledgeList"||to.name=="knowledgeDetail"||to.name=='vip'||to.name=='vipList'||to.name=='loadEmail'||to.name=='openEmail'||to.name=="viewRequire"||to.name=="duijiephoneBusinessList"||to.name=="duijiephoneBusinessDetail"||to.name=="duijiephoneRequireDetail"||to.name=="bigBusinessList"||to.name=="bigBusinessDetail"||to.name=="requireDetail"||to.name=="mixSearch"||to.name=="activitylist"||to.name=="activitydetail"||to.name=="activitySearchResult"||to.name=="activityapplyForProject"||to.name=='wechatLogin'||to.name=='newPage'||to.name=='bindAccount'||to.name=='subjectsecondStage'||to.name=='subjectsecondStageDetail'||to.name=='subjectmasterComment'||to.name=='subjectmasterList'||to.name=='subjectmasterDetail'||to.name=='subjectfirstStage'||to.name=='subjectcommentMore'||to.name=='subjectList'||to.name=="subjectresultpage"||to.name=="mineIndex"||to.name=="subjectStage"||to.name=="articleList"||to.name=="articleDetail"){
if(to.name == 'dashboard'||to.name=='indexView'|| to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'||to.name=='completeInfoCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'||to.name=='indexView'||to.name=="mobileIndex"||to.name=="mobileLogin"||to.name=="loginByPhone"||to.name=="loginByEmail"||to.name=="mobileRegister"||to.name=="duijieshareRequire"||to.name=="duijieshareProject"||to.name=="knowledgeList"||to.name=="knowledgeDetail"||to.name=='vip'||to.name=='vipList'||to.name=='loadEmail'||to.name=='openEmail'||to.name=="viewRequire"||to.name=="duijiephoneBusinessList"||to.name=="duijiephoneBusinessDetail"||to.name=="duijiephoneRequireDetail"||to.name=="bigBusinessList"||to.name=="bigBusinessDetail"||to.name=="requireDetail"||to.name=="mixSearch"||to.name=="activitylist"||to.name=="activitydetail"||to.name=="activitySearchResult"||to.name=="activityapplyForProject"||to.name=='wechatLogin'||to.name=='newPage'||to.name=='bindAccount'||to.name=='subjectsecondStage'||to.name=='subjectsecondStageDetail'||to.name=='subjectmasterComment'||to.name=='subjectmasterList'||to.name=='subjectmasterDetail'||to.name=='subjectfirstStage'||to.name=='subjectcommentMore'||to.name=='subjectList'||to.name=="subjectresultpage"||to.name=="mineIndex"||to.name=="subjectStage"||to.name=="articleList"||to.name=="articleDetail"||to.name=="mobileSearch"){
} else{
if(to.path == '/tabconnect'||to.path == '/thirdStage'||to.path == '/questionfill'||to.path == '/questionfillpc'||to.path == '/casedetailschild'||to.path == '/lndustryfocuschild'||to.path == '/successfulcasechild'||to.path == '/projectdetails'||to.path == '/seeprojectlist'||to.path == '/projectlist'||to.path == '/viewproject'||to.path == '/templateMobile1'||to.path == '/knowledge'||to.path == '/knowledgedetails'||to.path == '/termserviceed'||to.path == '/privacypolicyed'||to.path == '/contactused'||to.path == '/aboutused'||to.path == '/casedetailsed'||to.path == '/lndustryfocused'||to.path == '/successfulcaseed'||to.path == '/usehelped'||to.path == '/useHelp'||to.path == '/reminder'||to.path == '/contactus' ||to.path == '/privacypolicy' ||to.path == '/termservice' ||to.path == '/casedetails' ||to.path == '/successfulcase' ||to.path == '/lndustryfocus' ||to.path == '/aboutus'||to.path=='/applicationnotice' ){
......@@ -203,8 +203,13 @@ router.beforeEach((to, from, next) => {
publicFun.setUserInfoCookie("selected","index");
}
if(to.name=='duijietabconnect'||to.name.indexOf("duijie")!=-1) {
globalMsg.$emit("sendSelected","contact");
publicFun.setUserInfoCookie("selected","contact");
if(to.name=="duijieaddPhoneRequire"||to.name=="duijieprojectrelease"){
}else{
globalMsg.$emit("sendSelected","contact");
publicFun.setUserInfoCookie("selected","contact");
}
}
if(to.name=='subjectList'||to.name.indexOf("subject")!=-1) {
if(to.name=="subjectStage") publicFun.setUserInfoCookie("sendCurrentStage",true);
......
......@@ -95,6 +95,7 @@ const subjectStage =()=> import("views/mobile/proFeedback/stagerouter");//某个
const articleList = ()=> import("views/mobile/article/articlelist");//文章列表
const articleDetail = ()=> import("views/mobile/article/articledetail");//文章详情
const articleColletcion = ()=> import("views/mobile/collection/articleColl");//我的收藏(文章)
const mobileSearch = ()=> import("views/mobile/search/search");//搜索中转页面
Vue.use(Router)
const originalReplace = Router.prototype.replace;
Router.prototype.replace = function replace(location) {
......@@ -1176,6 +1177,12 @@ export default new Router({
component:articleColletcion
}
]
},
{
path:"/mobilesearch",
name:"mobileSearch",
component:mobileSearch
}
]
......
This diff is collapsed.
......@@ -78,6 +78,15 @@
},
beforeDestroy(){
globalMsg.$off("isVisible");
},
beforeRouteLeave(to,from,next){
if(to.name=="mobileSearch") {
to.query.showTab = this.addprojecttype;
next()
}else{
next()
}
}
}
</script>
......
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