11
杨磊
2024-05-17 a153c3e5845d44ce0b6210d856f118708824a8e1
src/components/headNav/headNav.vue
@@ -3,7 +3,13 @@
    <view class="NavTop flex" :style="{ backgroundImage: 'url(' + bg + ')' }">
      <view
        class="santiaogang"
        style="width: 0.34rem; height: 0.34rem; margin-right: 3rem;cursor: pointer;"
        style="
          width: 0.34rem;
          height: 0.34rem;
          margin-right: 3rem;
          cursor: pointer;
        "
        title="导航菜单"
        @click="menuNav = !menuNav"
        ><img
          style="width: 100%; height: 100%"
@@ -17,7 +23,6 @@
          style="
            margin-left: 0.19rem;
            font-size: 0.24rem;
            font-family: cursive;
            font-weight: 900;
          "
        >
@@ -284,7 +289,7 @@
        });
      } else if (index === "1") {
        uni.navigateTo({
          url: "/pages/characterRelation/characterRelation?id=" + 1
          url: "/pages/character/index?id=" + 1
        });
      } else if (index === "2") {
        uni.navigateTo({
@@ -292,7 +297,7 @@
        });
      } else if (index === "3") {
        uni.navigateTo({
          url: "/pages/dataDisplay/dataDisplay?id=" + 3
          url: "/pages/academicGenres/index?id=" + 3
        });
      } else if (index === "4") {
        uni.navigateTo({
@@ -311,17 +316,18 @@
    },
    // 切换搜索框的展开和收起状态
    toggleSearch() {
      // console.log('撒旦范德萨发生的',this.searchInput);
      this.isExpanded = !this.isExpanded;
      this.$nextTick(() => {
        if (this.searchInput.trim() !== "") {
          console.log("搜索", this.searchInput);
          uni.navigateTo({
            url:
              "/pages/knowledgeBase/knowledgeBase?keyword=" + this.searchInput
          });
        } else {
          console.log("不搜索");
        }
        this.searchInput = "";
        console.log(this.isExpanded);
      });
    }
  }
@@ -377,8 +383,7 @@
}
.NavTop {
  /* background: url(@/static/image/topBg.png); */
  /* background-image: url("../../static/image/topBg.png"); */
  background-size: 100% 100%;
  padding: 0.16rem 0.24rem;
  color: #fff !important;