Commit 21318ee6 authored by zL's avatar zL

fix:修复溯源正式环境首页搜索报错bug

parent cd47d2fe
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
> >
<div class="bg-search"> <div class="bg-search">
<input <input
v-model="hashText" v-model.trim="hashText"
class="bg-search-input" class="bg-search-input"
type="text" type="text"
placeholder="请输入溯源码" placeholder="请输入溯源码"
/> />
<span class="search-btn cursor-pointer" @click="searchHash" <span class="search-btn cursor-pointer" @click="searchHash()"
>点击搜索</span >点击搜索</span
> >
</div> </div>
...@@ -82,7 +82,11 @@ ...@@ -82,7 +82,11 @@
</section> </section>
<!-- 主页第二个模块 我们的优势 --> <!-- 主页第二个模块 我们的优势 -->
<section class="home-2"> <section class="home-2">
<img class="home-2-icon" src="../../../assets/images/Home/home-2-icon.png" alt /> <img
class="home-2-icon"
src="../../../assets/images/Home/home-2-icon.png"
alt
/>
<span class="home-title">我们的优势</span> <span class="home-title">我们的优势</span>
<div class="home-2-in"> <div class="home-2-in">
<div class="content"> <div class="content">
...@@ -238,7 +242,7 @@ export default class Home extends Vue { ...@@ -238,7 +242,7 @@ export default class Home extends Vue {
{ text: `全程自定义` }, { text: `全程自定义` },
{ text: `全程协同合作` }, { text: `全程协同合作` },
]; ];
public hashText = ``; public hashText = "";
// 我们的优势 // 我们的优势
public ourAdvantages = [ public ourAdvantages = [
{ {
...@@ -379,7 +383,9 @@ export default class Home extends Vue { ...@@ -379,7 +383,9 @@ export default class Home extends Vue {
} }
public searchHash() { public searchHash() {
if (this.hashText.trim() === "") { console.log(this.hashText);
// return;
if (this.hashText === "") {
window.open(UrlPrefixObj.model.CHAIN_BROWSER_URL_PREFIX); window.open(UrlPrefixObj.model.CHAIN_BROWSER_URL_PREFIX);
} else { } else {
window.open( window.open(
......
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