2023-12-01 14:48:58 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import FooterInfo from './compontents/FooterInfo/index.vue'
|
2023-12-01 17:02:05 +08:00
|
|
|
const route = useRoute()
|
2023-12-02 14:18:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断是否是个人中心页面 如果是则隐藏页脚
|
2023-12-01 17:02:05 +08:00
|
|
|
const isMyInfoPage = () => {
|
2023-12-02 14:18:00 +08:00
|
|
|
if (route.path.indexOf("myuser") === -1) {
|
|
|
|
|
return true
|
|
|
|
|
} else {
|
2023-12-01 17:02:05 +08:00
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-12-02 14:18:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// 搜索查询绑定值
|
|
|
|
|
const keywordIptValue = ref('')
|
|
|
|
|
|
|
|
|
|
// 输入框下方历史搜索记录
|
|
|
|
|
const searchHistoryList = ref(
|
|
|
|
|
[
|
|
|
|
|
{ name: '220E履带挖掘机' },
|
|
|
|
|
{ name: '3443挖掘机' },
|
|
|
|
|
{ name: '塔式起重机' },
|
|
|
|
|
{ name: '轮式牵引铲运机' },
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 搜索按钮
|
|
|
|
|
const searchKeywordBtn = () => {
|
|
|
|
|
|
|
|
|
|
console.log('搜索关键字', keywordIptValue.value);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 点击下方搜索记录时
|
|
|
|
|
const handleHistory = (hisValue: any) => {
|
|
|
|
|
keywordIptValue.value = hisValue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-12-01 15:02:27 +08:00
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
|
|
})
|
2023-12-01 17:02:05 +08:00
|
|
|
|
2023-12-01 14:48:58 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
2023-11-30 10:49:45 +08:00
|
|
|
<template>
|
2023-12-01 11:22:09 +08:00
|
|
|
<div class="shop-header">
|
|
|
|
|
<div class="header-box">
|
2023-12-01 17:02:05 +08:00
|
|
|
<ul class="header-wapper">
|
|
|
|
|
<li>
|
|
|
|
|
<span>
|
2023-12-02 14:18:00 +08:00
|
|
|
<a href="">登录</a>/
|
|
|
|
|
<a href="" style="color:#6D6D6D">注册</a>
|
2023-12-01 17:02:05 +08:00
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2023-12-02 18:05:58 +08:00
|
|
|
<span @click="$router.push({ name: 'myuser' })">
|
2023-12-01 17:02:05 +08:00
|
|
|
个人中心
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<img src="./assets/img/home/2023_12_01_beijing2/shoucang.png" alt="">
|
|
|
|
|
<span>
|
|
|
|
|
收藏夹
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<img src="./assets/img/home/2023_12_01_beijing2/shouji.png" alt="">
|
|
|
|
|
<span class="last-span">
|
|
|
|
|
手机版
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2023-12-01 11:22:09 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 菜单 -->
|
2023-12-01 14:03:26 +08:00
|
|
|
<div class="shop-menu-box">
|
|
|
|
|
<div class="shop-menu">
|
2023-12-02 14:18:00 +08:00
|
|
|
<div class="left-logo" @click="$router.push('/home')">
|
|
|
|
|
<!-- 首页Logo -->
|
|
|
|
|
<img src="@/assets/img/home/2023_12_01_beijing2/logo.png" alt="首页" title="首页">
|
2023-12-01 14:03:26 +08:00
|
|
|
</div>
|
2023-12-02 14:18:00 +08:00
|
|
|
<input placeholder="输入设备关键词" type="text" v-model="keywordIptValue">
|
|
|
|
|
<button class="search-btn" @click="searchKeywordBtn">搜索</button>
|
2023-12-01 17:02:05 +08:00
|
|
|
<div class="erweima">
|
|
|
|
|
<div class="tilte">手机扫码登录</div>
|
|
|
|
|
<img src="" alt="">
|
|
|
|
|
</div>
|
2023-12-02 14:18:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ipt-down">
|
|
|
|
|
<a @click="handleHistory(item.name)" v-for="item in searchHistoryList" :key="item.name">{{ item.name }}</a>
|
|
|
|
|
</div>
|
2023-12-01 11:22:09 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-12-01 14:48:58 +08:00
|
|
|
|
|
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
</div>
|
|
|
|
|
|
2023-12-01 15:00:37 +08:00
|
|
|
<div class="container">
|
2023-12-01 17:02:05 +08:00
|
|
|
<RouterView />
|
2023-12-01 15:00:37 +08:00
|
|
|
</div>
|
2023-12-02 14:18:00 +08:00
|
|
|
<FooterInfo v-if="isMyInfoPage()" />
|
|
|
|
|
<!-- <FooterInfo /> -->
|
2023-11-30 10:49:45 +08:00
|
|
|
</template>
|
2023-12-01 14:48:58 +08:00
|
|
|
|
2023-11-30 10:49:45 +08:00
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
<style scoped lang="scss">
|
2023-12-01 17:02:05 +08:00
|
|
|
.container {
|
2023-12-01 15:00:37 +08:00
|
|
|
width: 1200px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
overflow: hidden;
|
2023-12-01 16:57:11 +08:00
|
|
|
background: #FFFFFF;
|
|
|
|
|
border-radius: 30px;
|
|
|
|
|
padding: 20px 30px;
|
|
|
|
|
box-sizing: border-box;
|
2023-12-01 15:00:37 +08:00
|
|
|
}
|
2023-12-01 17:02:05 +08:00
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
.shop-header {
|
2023-12-02 18:05:58 +08:00
|
|
|
// height: 157px;
|
2023-12-01 11:22:09 +08:00
|
|
|
width: 100%;
|
|
|
|
|
position: sticky;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
2023-12-01 14:03:26 +08:00
|
|
|
z-index: 999;
|
2023-12-01 11:22:09 +08:00
|
|
|
|
|
|
|
|
.header-box {
|
|
|
|
|
background-color: #F5F5F5;
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
.header-wapper {
|
|
|
|
|
width: 1200px;
|
|
|
|
|
height: 37px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
2023-12-01 17:02:05 +08:00
|
|
|
li {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
height: 37px;
|
2023-12-01 11:22:09 +08:00
|
|
|
cursor: pointer;
|
2023-12-01 17:02:05 +08:00
|
|
|
margin-left: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
color: #6D6D6D;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
padding: 0 20px 0 3px;
|
|
|
|
|
border-right: 1px solid #666655;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
color: #2282FF;
|
|
|
|
|
}
|
2023-12-01 11:22:09 +08:00
|
|
|
|
2023-12-02 14:18:00 +08:00
|
|
|
a {
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
color: #2282FF;
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
|
|
|
|
|
2023-12-01 17:02:05 +08:00
|
|
|
.last-span {
|
|
|
|
|
border: none;
|
2023-12-02 14:18:00 +08:00
|
|
|
padding: 0;
|
|
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
2023-12-01 17:02:05 +08:00
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
2023-12-01 17:02:05 +08:00
|
|
|
|
|
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-01 14:03:26 +08:00
|
|
|
.shop-menu-box {
|
|
|
|
|
background-color: #edeef6;
|
2023-12-01 11:22:09 +08:00
|
|
|
|
2023-12-01 14:03:26 +08:00
|
|
|
.shop-menu {
|
2023-12-02 14:18:00 +08:00
|
|
|
position: relative;
|
2023-12-01 14:03:26 +08:00
|
|
|
width: 1200px;
|
2023-12-02 14:18:00 +08:00
|
|
|
height: 140px;
|
2023-12-01 14:03:26 +08:00
|
|
|
margin: 0 auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2023-12-01 11:22:09 +08:00
|
|
|
|
|
|
|
|
|
2023-12-01 14:03:26 +08:00
|
|
|
.left-logo {
|
|
|
|
|
color: #999999;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 20px;
|
2023-12-01 11:22:09 +08:00
|
|
|
|
2023-12-01 14:03:26 +08:00
|
|
|
img {
|
|
|
|
|
width: 176px;
|
|
|
|
|
height: 58px;
|
2023-12-02 14:18:00 +08:00
|
|
|
cursor: pointer;
|
2023-12-01 14:03:26 +08:00
|
|
|
}
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-01 14:03:26 +08:00
|
|
|
input {
|
|
|
|
|
width: 700px;
|
|
|
|
|
height: 45px;
|
|
|
|
|
border: 1px solid #5CA4FF;
|
|
|
|
|
border-radius: 45px;
|
|
|
|
|
margin-left: 70px;
|
2023-12-01 17:02:05 +08:00
|
|
|
line-height: 45px;
|
|
|
|
|
color: transparent;
|
|
|
|
|
text-shadow: 0 0 0 #333;
|
|
|
|
|
padding-left: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input:focus {
|
|
|
|
|
outline: 1px solid #5CA4FF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input::-webkit-input-placeholder {
|
|
|
|
|
color: #949494;
|
2023-12-01 14:03:26 +08:00
|
|
|
}
|
2023-12-01 11:22:09 +08:00
|
|
|
|
2023-12-01 17:02:05 +08:00
|
|
|
.search-btn {
|
|
|
|
|
width: 100px;
|
|
|
|
|
height: 39px;
|
|
|
|
|
transform: translateX(-110px);
|
|
|
|
|
border-radius: 39px;
|
|
|
|
|
background: linear-gradient(132deg, #6DE7FF 0%, #348CFF 100%);
|
|
|
|
|
box-shadow: 0px 2px 4px 0px rgba(20, 175, 255, 0.5);
|
|
|
|
|
border: none;
|
|
|
|
|
color: #fff;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-12-01 14:03:26 +08:00
|
|
|
.erweima {
|
2023-12-02 14:18:00 +08:00
|
|
|
// display: none;
|
2023-12-01 17:02:05 +08:00
|
|
|
width: 100px;
|
2023-12-01 14:03:26 +08:00
|
|
|
height: 80px;
|
2023-12-01 17:02:05 +08:00
|
|
|
margin-left: -20px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
|
|
.tilte {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #1F88FF;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
2023-12-01 14:03:26 +08:00
|
|
|
}
|
2023-12-02 14:18:00 +08:00
|
|
|
|
|
|
|
|
.ipt-down {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 20px;
|
|
|
|
|
left: 22%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
a {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
color: #727272;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
2023-12-01 14:03:26 +08:00
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
2023-12-01 14:03:26 +08:00
|
|
|
|
|
|
|
|
|
2023-12-01 11:22:09 +08:00
|
|
|
}
|
|
|
|
|
</style>
|