tanghaolin
2025-04-18 e3ab5c403cce86811f9bdf8ae5f0d00f1f776b1f
src/components/AppHeader.vue
@@ -25,23 +25,20 @@
                  <span class="w-[20px] h-full gap-style">|</span>
                  <el-menu-item index="/gb19762-2025" class="!px-4">计算工具</el-menu-item>
                  <span class="w-[20px] h-full gap-style">|</span>
                  <el-menu-item index="" class="!px-4">联系我们</el-menu-item>
                  <el-menu-item index="/contact-us" class="!px-4">联系我们</el-menu-item>
               </el-menu>
            </nav>
         </div>
         <!-- 顶部产品搜索框 -->
         <div class="header-tool-div">
            <div class="search-input-div">
               <input placeholder="全部商品|请输入公司名称/型号/产品名称" />
               <button>搜索</button>
               <input v-model="searchQuery" placeholder="全部商品|请输入公司名称/型号/产品名称" />
               <button @click="handleSearch">搜索</button>
            </div>
            <span class="text-[20px] text-[#000] gap-div"></span>
            <!-- 省份选择 -->
            <div>
               <el-cascader v-model="AreaValue" :options="options" @change="handleChange">
                  <template #prefix>
                     123123
                  </template>
               </el-cascader>
            </div>
            <span class="text-[20px] text-[#000] gap-div"></span>
@@ -61,8 +58,8 @@
                     <button @click="toLogin">登录</button>
                  </template>
                  <template v-else>
                     <span class="text-blue-500 mr-2 text-[20px] text-[#000]">{{ userInfo.RealName }}</span>
                     <a href="#" class="hover:text-blue-500 text-[20px]" @click.prevent="handleLogout">退出</a>
                     <span class="text-blue-500 mr-2 text-[20px] text-[#000]" style="line-height: 1;">{{ userInfo.RealName }}</span>
                     <a href="#" class="hover:text-blue-500 text-[20px]" style="line-height: 1;" @click.prevent="handleLogout">退出</a>
                  </template>
               </div>
            </div>
@@ -182,6 +179,15 @@
      return;
   }
};
const handleSearch = () => {
   router.push({
      path: '/certified-products',
      query: {
         keywords: searchQuery.value,
      },
   });
};
</script>
<style lang="scss" scoped>