Zlpt_Portal/src/layout/header.vue

739 lines
22 KiB
Vue
Raw Normal View History

2023-12-07 17:48:36 +08:00
<script setup lang="ts">
2024-11-22 15:35:30 +08:00
import $bus from '@/utils/bus'
import { mainStore } from 'store/main'
2024-11-26 09:11:25 +08:00
import { useStore } from 'store/user'
2024-12-02 14:06:16 +08:00
import { cartStore } from 'store/cart'
2024-11-22 15:35:30 +08:00
import { ElMessage, ElMessageBox } from 'element-plus'
2024-12-01 16:21:35 +08:00
import { getHotSearchListApi, getBookCarDetailsApi } from 'http/api/home/index'
2024-12-09 09:38:06 +08:00
import userClass from '../hooks/userClass'
const { getCompanyList } = userClass()
2024-11-29 13:57:59 +08:00
import imgSrc from '@/assets/img/logo.png'
2024-11-22 15:35:30 +08:00
const store: any = mainStore()
2024-12-10 15:06:36 +08:00
const searchTypeName = ref('装备')
2024-11-26 09:11:25 +08:00
const userStore = useStore()
2024-12-02 14:06:16 +08:00
const cart = cartStore()
2024-12-10 15:06:36 +08:00
const isType: any = localStorage.getItem('rolesType')
2024-11-26 09:11:25 +08:00
userStore.editMenuList(1)
2024-11-22 15:35:30 +08:00
const route = useRoute()
const router = useRouter()
const isRolesSelect = ref<boolean>(false)
2024-11-27 18:22:35 +08:00
const rolesName = ref<any>('1')
2024-11-29 09:27:46 +08:00
rolesName.value = localStorage.getItem('rolesType')
2024-12-03 18:07:30 +08:00
const isAdmin = ref(false)
const roles = store.userInfo.roles
2024-12-09 09:38:06 +08:00
const activeLoginCompanyName = ref('')
2024-12-10 15:06:36 +08:00
const searchCheckVisible = ref(false)
2024-12-09 09:38:06 +08:00
if (roles?.length > 0) {
2024-12-03 18:07:30 +08:00
isAdmin.value = roles.some((e: any) => e.roleKey == 'admin')
}
2024-11-22 15:35:30 +08:00
// 是否显示退出登录
const isShowLogout = computed(() => {
return store.token
})
2024-12-09 13:10:06 +08:00
const setActiveCompanyName = () => {
2024-12-09 09:38:06 +08:00
const companyList = userStore.companyList
const activeCompany: any = companyList.filter(
(e: any) => e.companyId == store.userInfo.companyId,
)
2024-12-09 13:10:06 +08:00
activeLoginCompanyName.value = activeCompany[0]?.companyName
2024-12-17 20:09:25 +08:00
localStorage.setItem('currentCompanyName', activeLoginCompanyName.value)
2024-12-09 13:10:06 +08:00
}
if (userStore.companyList.length === 0) {
getCompanyList().then((res) => {
setActiveCompanyName()
})
} else {
setActiveCompanyName()
2024-12-09 09:38:06 +08:00
}
const placeholderText = ref('搜索设备关键词')
2024-11-22 15:35:30 +08:00
// 退出登录
const handlerLogout = () => {
ElMessageBox.confirm('是否确定退出登录', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
router.push('/login')
store.cleanUpToken('')
store.clearUserInfo('')
2024-12-20 17:36:14 +08:00
localStorage.clear()
sessionStorage.clear()
2024-11-22 15:35:30 +08:00
ElMessage({
type: 'success',
message: '已退出登录',
})
2023-12-09 17:00:58 +08:00
})
2024-11-22 15:35:30 +08:00
.catch(() => {
ElMessage({
type: 'info',
message: '已取消',
2023-12-09 17:00:58 +08:00
})
2024-11-22 15:35:30 +08:00
})
}
// 搜索查询绑定值
const keywordIptValue = ref('')
// 输入框 dom
const inputRef: any = ref(null)
// 输入框下方历史搜索记录
// const searchHistoryList = computed(() => {
// return store.searchHistoryList.slice(0, 1)
// })
2024-11-23 16:31:54 +08:00
const searchHistoryList = ref<any>(['挖掘机', '塔式起重机', '挖掘机', '吊机'])
// 获取热词
const getHotSearchListData = async () => {
const { data: res }: any = await getHotSearchListApi()
searchHistoryList.value = res
console.log(res, '热词')
}
getHotSearchListData()
2024-11-22 18:03:09 +08:00
2024-11-22 15:35:30 +08:00
// 搜索按钮
const searchKeywordBtn = () => {
/* 去除空格 */
keywordIptValue.value = keywordIptValue.value.replace(/\s*/g, '')
store.addHistoryRecord(keywordIptValue.value)
2024-12-20 17:36:14 +08:00
2024-11-22 15:35:30 +08:00
if (route.path == '/equipList') {
2024-12-10 15:06:36 +08:00
if (searchTypeName.value === '装备') {
$bus.emit('search', keywordIptValue.value)
} else {
router.push({
name: 'parity',
query: { keyWord: keywordIptValue.value },
})
}
2024-12-01 16:21:35 +08:00
}
if (route.path == '/parity') {
2024-12-20 17:36:14 +08:00
if (searchTypeName.value == '需求') {
2024-12-10 15:06:36 +08:00
$bus.emit('search', keywordIptValue.value)
} else {
router.push({
name: 'equipList',
query: { keyWord: keywordIptValue.value },
})
}
2024-12-01 16:21:35 +08:00
$bus.emit('search', keywordIptValue.value)
}
2024-12-19 16:01:16 +08:00
if (route.path == '/mall-view') {
2024-12-10 15:06:36 +08:00
if (searchTypeName.value === '装备') {
router.push({
name: 'equipList',
query: { keyWord: keywordIptValue.value },
})
}
if (searchTypeName.value === '需求') {
router.push({
name: 'parity',
query: { keyWord: keywordIptValue.value },
})
}
2024-11-22 15:35:30 +08:00
}
2024-12-20 17:36:14 +08:00
if (route.path == '/enterpriseZone') {
if (searchTypeName.value == '装备') {
router.push({
name: 'equipList',
query: { keyWord: keywordIptValue.value },
})
}
if (searchTypeName.value == '需求') {
router.push({
name: 'parity',
query: { keyWord: keywordIptValue.value },
})
}
}
if (route.path.includes('equipDetail')) {
if (searchTypeName.value == '装备') {
router.push({
name: 'equipList',
query: { keyWord: keywordIptValue.value },
})
}
if (searchTypeName.value == '需求') {
router.push({
name: 'parity',
query: { keyWord: keywordIptValue.value },
})
}
}
2024-11-22 15:35:30 +08:00
}
// 点击下方搜索记录时
const handleHistory = (hisValue: any) => {
keywordIptValue.value = hisValue
searchKeywordBtn()
// inputRef.value.focus()
}
//页面刷新回显模糊搜索词
$bus.on('callBackText', (val) => {
nextTick(() => {
keywordIptValue.value = val
})
})
// 角色切换按钮
const onRolesCheck = () => {
2024-12-03 18:07:30 +08:00
if (isAdmin.value) return
2024-12-13 10:20:22 +08:00
isRolesSelect.value = !isRolesSelect.value
2024-11-22 15:35:30 +08:00
}
// 选择角色
const onSelectRoles = (type: number) => {
if (type === 1) {
2024-11-29 09:27:46 +08:00
rolesName.value = '1'
2024-11-26 09:11:25 +08:00
userStore.editMenuList(1)
2024-11-27 15:16:53 +08:00
userStore.editUserMenuList(1)
2024-11-27 18:22:35 +08:00
localStorage.setItem('rolesType', '1')
2024-12-02 15:33:53 +08:00
userStore.editcurrentMenuItem('goodsManagement')
2024-12-01 16:21:35 +08:00
window.location.reload()
2024-11-22 15:35:30 +08:00
} else {
2024-11-29 09:27:46 +08:00
rolesName.value = '2'
2024-11-26 09:11:25 +08:00
userStore.editMenuList(2)
2024-11-27 15:16:53 +08:00
userStore.editUserMenuList(2)
2024-11-27 18:22:35 +08:00
localStorage.setItem('rolesType', '2')
2024-12-02 15:33:53 +08:00
userStore.editcurrentMenuItem('sourcingNeed')
2024-12-01 16:21:35 +08:00
window.location.reload()
2024-11-22 15:35:30 +08:00
}
isRolesSelect.value = false
}
2024-11-23 16:31:54 +08:00
2024-12-01 16:21:35 +08:00
const getBookCarDetailsData = async () => {
const res: any = await getBookCarDetailsApi()
2024-12-04 11:28:24 +08:00
let amountNum = 0
res.data.forEach((e: any) => {
amountNum = e.devInfoVoList.length + amountNum
})
cart.SET_CART_NUM(amountNum)
2024-12-01 16:21:35 +08:00
}
getBookCarDetailsData()
2024-12-02 14:06:16 +08:00
const cartNum = computed(() => {
return cart.cartNum
2024-12-04 11:28:24 +08:00
// let amountNum = 0
// cardList.value.forEach((e: any) => {
// amountNum = e.devInfoVoList.length + amountNum
// })
// return amountNum
2024-12-02 14:06:16 +08:00
})
2024-11-23 16:31:54 +08:00
// 查看预约车
const onCarts = () => {
console.log('跳转预约车页面')
router.push({
name: 'cart',
})
}
2024-12-03 18:07:30 +08:00
const onJumpUser = () => {
const roles = store.userInfo.roles
2024-12-09 09:38:06 +08:00
if (roles?.length > 0) {
2024-12-03 18:07:30 +08:00
const isAdmin = roles.some((e: any) => e.roleKey == 'admin')
if (isAdmin) {
2024-12-09 13:10:06 +08:00
// window.location.href = `http://192.168.137.101:80/?token=${store.token}`
2024-12-17 13:41:03 +08:00
window.open(`http://36.33.26.201:17788/glweb/login?token=${store.token}`)
2024-12-03 18:07:30 +08:00
} else {
router.push({ name: 'my-user' })
}
}
}
2023-12-07 17:48:36 +08:00
</script>
<template>
<!-- 头部个人信息 收藏夹 手机版等图标 -->
<div class="header-container">
<div class="header-user-info">
2024-12-20 17:36:14 +08:00
<div class="header-box">
2024-11-22 18:03:09 +08:00
<div class="header-item" v-if="isShowLogout">
2024-11-22 15:35:30 +08:00
<!-- <img src="../assets/img/home/star.png" alt="" /> -->
2024-12-09 09:38:06 +08:00
<a class="user-name"
>{{ activeLoginCompanyName }} / {{ store.userInfo.nickName }}</a
>
2024-12-01 16:21:35 +08:00
<div class="line"></div>
2024-11-22 15:35:30 +08:00
</div>
2023-12-07 17:48:36 +08:00
<div class="header-item">
2024-11-22 18:03:09 +08:00
<a v-if="!isShowLogout" class="a-border-none" @click="$router.push('/login')"
>登录</a
>
<span v-if="!isShowLogout" style="margin: 0 3px">/</span>
<a
v-if="!isShowLogout"
style="padding: 0 20px 0 0"
@click="$router.push('/register')"
>注册</a
>
<a v-else @click="handlerLogout">退出登录</a>
2024-12-01 16:21:35 +08:00
<div class="line"></div>
2023-12-07 17:48:36 +08:00
</div>
2024-11-22 18:03:09 +08:00
<div class="header-item roles-check" @click="onRolesCheck" v-if="isShowLogout">
2024-11-22 15:35:30 +08:00
<!-- <img src="../assets/img/home/star.png" alt="" /> -->
2024-12-01 16:21:35 +08:00
<a style="display: flex; justify-content: center">
2024-12-23 13:52:38 +08:00
<i class="lease-name">
2024-12-03 18:07:30 +08:00
{{ isAdmin ? '管理方' : rolesName == 1 ? '出租方' : '承租方' }}
2024-12-01 16:21:35 +08:00
</i>
<!-- <el-icon style="margin-left: 10px"><ArrowDownBold /></el-icon> -->
2024-11-22 15:35:30 +08:00
</a>
2024-12-01 16:21:35 +08:00
<div class="line"></div>
2024-12-23 13:52:38 +08:00
<div class="select-list" v-show="isRolesSelect">
2024-11-22 15:35:30 +08:00
<div
style="border-top-left-radius: 6px; border-top-right-radius: 6px"
@click.stop="onSelectRoles(1)"
>
出租方
</div>
<div
style="border-bottom-left-radius: 6px; border-bottom-right-radius: 6px"
@click.stop="onSelectRoles(2)"
>
承租方
</div>
</div>
2023-12-07 17:48:36 +08:00
</div>
2024-12-01 16:21:35 +08:00
2023-12-07 17:48:36 +08:00
<div class="header-item">
2024-12-03 18:07:30 +08:00
<a @click="onJumpUser">个人中心</a>
2024-12-01 16:21:35 +08:00
<div class="line"></div>
2023-12-07 17:48:36 +08:00
</div>
2024-12-01 16:21:35 +08:00
<!-- <div class="header-item last-item">
2024-11-20 13:32:00 +08:00
<img src="../assets/img/home/phone.png" alt="" />
2023-12-07 17:48:36 +08:00
<a class="a-border-none">手机版</a>
<div class="qr-code">
<el-image
src="https://img.xjishu.com/img/zl/2017/10/212257159687020.gif"
2024-11-22 15:35:30 +08:00
fit="cover"
/>
2023-12-07 17:48:36 +08:00
扫二维码查看xxx
</div>
2024-12-01 16:21:35 +08:00
</div> -->
2023-12-07 17:48:36 +08:00
</div>
</div>
<!-- 中间logo 部分 -->
2024-12-20 17:36:14 +08:00
<div class="logo-ipt-container">
2024-12-23 13:52:38 +08:00
<div class="home-logo" @click="$router.push('/mall-view')">
<!-- <el-image
style="width: 70%; cursor: pointer"
2024-12-10 15:06:36 +08:00
:src="imgSrc"
fit="cover"
2024-12-19 16:04:58 +08:00
@click="$router.push('/mall-view')"
2024-12-23 13:52:38 +08:00
/> -->
2024-12-10 15:06:36 +08:00
</div>
<div class="home-search">
<input
:placeholder="searchTypeName === '装备' ? '搜索装备关键词' : '搜索需求关键词'"
type="text"
v-model.trim="keywordIptValue"
@keydown.enter="searchKeywordBtn"
ref="inputRef"
@focus="placeholderText = ''"
@blur="
placeholderText =
searchTypeName === '装备' ? '搜索装备关键词' : '搜索需求关键词'
"
/>
<button class="search-btn" @click="searchKeywordBtn">搜索</button>
<div
class="left-check-box"
@click="
() => {
2024-12-12 15:30:21 +08:00
searchCheckVisible = !searchCheckVisible
2024-12-10 15:06:36 +08:00
}
"
>
{{ searchTypeName }}
<el-icon style="margin-left: 5px"><ArrowDownBold /></el-icon>
</div>
<div class="check-container" v-if="searchCheckVisible">
<div
style="border-top-left-radius: 6px; border-top-right-radius: 6px"
@click="
() => {
searchTypeName = '装备'
searchCheckVisible = false
}
"
>
装备
</div>
<div
@click="
() => {
searchTypeName = '需求'
searchCheckVisible = false
}
"
style="border-bottom-left-radius: 6px; border-bottom-right-radius: 6px"
>
需求
</div>
</div>
</div>
<div class="cart-container">
<div class="cart-icon" @click="onCarts" v-if="isType == 2">
<el-badge :value="cartNum">
<svg class="icon" aria-hidden="true" style="width: 30px; height: 30px">
<use xlink:href="#icon-gouwuche2"></use>
</svg>
</el-badge>
<span style="margin-left: 15px"> 预约车 </span>
</div>
</div>
2024-11-29 13:57:59 +08:00
<!-- <img
src="@/assets/img/logo.png"
2023-12-07 17:48:36 +08:00
alt="首页"
title="首页"
2024-11-22 15:35:30 +08:00
@click="$router.push('/home')"
2024-11-29 13:57:59 +08:00
/> -->
2024-12-10 15:06:36 +08:00
<!-- <el-image
2024-11-29 13:57:59 +08:00
style="width: 190px; cursor: pointer; margin-left: 60px"
:src="imgSrc"
2024-12-04 11:57:24 +08:00
fit="cover"
2024-12-01 16:21:35 +08:00
@click="$router.push('/home')"
2024-11-22 15:35:30 +08:00
/>
2023-12-07 17:48:36 +08:00
<input
2023-12-09 17:00:58 +08:00
:placeholder="placeholderText"
2023-12-07 17:48:36 +08:00
type="text"
2023-12-09 17:00:58 +08:00
v-model.trim="keywordIptValue"
2023-12-07 17:48:36 +08:00
@keydown.enter="searchKeywordBtn"
2023-12-09 17:00:58 +08:00
ref="inputRef"
@focus="placeholderText = ''"
@blur="placeholderText = '搜索设备关键词'"
2024-11-22 15:35:30 +08:00
/>
2023-12-07 17:48:36 +08:00
<button class="search-btn" @click="searchKeywordBtn">搜索</button>
<div class="ipt-down">
2023-12-09 22:58:48 +08:00
<a
2024-11-23 16:31:54 +08:00
v-for="item in searchHistoryList"
:key="item.maId"
@click="handleHistory(item.deviceName)"
2024-11-22 15:35:30 +08:00
class="history-box"
>
2024-11-23 16:31:54 +08:00
{{ item.deviceName }}
2023-12-07 17:48:36 +08:00
</a>
</div>
2024-11-22 18:03:09 +08:00
2024-12-02 17:07:48 +08:00
<div class="cart-icon" @click="onCarts" v-if="isType == 2">
2024-12-01 16:21:35 +08:00
<el-badge :value="cartNum">
<svg class="icon" aria-hidden="true" style="width: 30px; height: 30px">
<use xlink:href="#icon-gouwuche2"></use>
</svg>
</el-badge>
<span style="margin-left: 15px"> 预约车 </span>
2024-12-10 15:06:36 +08:00
</div> -->
2023-12-07 17:48:36 +08:00
</div>
</div>
</template>
<style lang="scss" scoped>
2024-11-22 15:35:30 +08:00
.header-container {
.header-user-info {
background-color: #f5f5f5;
2024-12-20 17:36:14 +08:00
position: sticky;
top: 0;
left: 0;
z-index: 999;
2024-11-22 15:35:30 +08:00
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
/* 头部个人信息部分 */
.header-box {
2024-12-23 13:52:38 +08:00
width: 1552px;
margin: 0 auto;
2024-11-22 15:35:30 +08:00
height: 37px;
display: flex;
align-items: center;
justify-content: flex-end;
}
.header-item {
height: 37px;
display: flex;
align-items: center;
color: #6d6d6d;
cursor: pointer;
2024-12-23 13:52:38 +08:00
.lease-name {
background-color: #c9e7e5;
color: #47c4ad;
padding: 4px 6px;
font-weight: bold;
font-size: 16px;
border-radius: 4px;
}
2024-12-01 16:21:35 +08:00
.line {
width: 1px;
height: 15px;
background-color: #666655;
}
2024-11-22 15:35:30 +08:00
.user-name:hover {
color: #6d6d6d;
2023-12-07 17:48:36 +08:00
}
2024-11-22 15:35:30 +08:00
img {
vertical-align: middle;
2023-12-07 17:48:36 +08:00
}
2024-11-22 15:35:30 +08:00
a {
padding: 0 20px;
2024-12-01 16:21:35 +08:00
// border-right: 1px solid #666655;
2024-11-22 15:35:30 +08:00
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
a:hover {
color: #3cb4a6;
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
.a-border-none {
border: none;
padding: 0;
}
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
.roles-check {
position: relative;
}
.roles-check .select-list {
2024-12-23 13:52:38 +08:00
// height: 50px;
2024-11-22 15:35:30 +08:00
// display: none;
position: absolute;
left: 1%;
2024-12-23 13:52:38 +08:00
bottom: 0;
transform: translateY(100%);
2024-11-22 15:35:30 +08:00
width: 98%;
background-color: #fff;
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
z-index: 999;
transition: all 1s linear;
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
div {
2024-12-23 13:52:38 +08:00
height: 30px;
font-size: 16px;
line-height: 30px;
2024-11-22 15:35:30 +08:00
text-align: center;
letter-spacing: 1px;
}
div:hover {
color: #fff;
2024-12-03 09:16:20 +08:00
background-color: #00a288;
2023-12-07 17:48:36 +08:00
}
2024-11-22 15:35:30 +08:00
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
// .roles-check:hover .select-list {
// display: block;
// }
.last-item {
position: relative;
z-index: 998;
padding-left: 20px;
.qr-code {
position: absolute;
left: -70px;
top: -140px;
width: 140px;
height: 140px;
background-color: #fff;
visibility: hidden;
padding: 10px;
box-shadow: 0 2px 2px 2px #ccc;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #333;
.el-image {
width: 120px;
height: 120px;
margin-bottom: 5px;
2023-12-07 17:48:36 +08:00
}
}
2024-11-22 15:35:30 +08:00
}
.last-item:hover > .qr-code {
visibility: visible;
transform: translateY(177px);
transition: all 0.6s;
}
/* 中间logo 搜索框部分 */
.logo-ipt-container {
2024-12-23 13:52:38 +08:00
width: 1552px;
margin: 0 auto;
2024-11-22 15:35:30 +08:00
position: relative;
display: flex;
2024-11-22 18:03:09 +08:00
align-items: center;
2024-11-22 15:35:30 +08:00
background-color: #eeeff6;
2024-12-23 13:52:38 +08:00
padding: 30px;
box-sizing: border-box;
// box-sizing: content-box;
2023-12-07 17:48:36 +08:00
2024-12-10 15:06:36 +08:00
// padding: 30px 0 60px 0;
.home-logo {
2024-12-23 13:52:38 +08:00
// width: 286px;
// height: 100%;
width: 240px;
height: 80px;
background-color: orange;
background: url('@/assets/img/logo.png') no-repeat;
background-size: 100% 100%;
cursor: pointer;
2023-12-07 17:48:36 +08:00
}
2024-12-10 15:06:36 +08:00
.home-search {
position: relative;
2024-12-23 13:52:38 +08:00
flex: 1;
width: 100%;
margin: 0 20px;
// width: 1000px;
// margin-left: 40px;
2024-12-10 15:06:36 +08:00
.left-check-box {
position: absolute;
left: 0;
top: 0;
height: 53px;
2024-12-23 13:52:38 +08:00
width: 100px;
2024-12-10 15:06:36 +08:00
display: flex;
align-items: center;
justify-content: center;
border-right: 1px solid #3cb4a6;
2024-12-23 13:52:38 +08:00
// font-size: 14px;
2024-12-10 15:06:36 +08:00
color: #11806f;
cursor: pointer;
}
.check-container {
position: absolute;
left: 0;
2024-12-23 13:52:38 +08:00
bottom: 0;
transform: translateY(100%);
width: 100px;
2024-12-10 15:06:36 +08:00
background-color: #fff;
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
z-index: 999;
transition: all 1s linear;
cursor: pointer;
div {
2024-12-23 13:52:38 +08:00
height: 35px;
// font-size: 14px;
line-height: 35px;
2024-12-10 15:06:36 +08:00
text-align: center;
letter-spacing: 1px;
}
div:hover {
color: #fff;
background-color: #00a288;
}
}
}
.cart-container {
2024-12-23 13:52:38 +08:00
width: 130px;
// background-color: orange;
// height: 60px;
// flex: 1;
2024-12-10 15:06:36 +08:00
}
// img {
// margin-left: 38px;
// width: 160px;
// height: 60px;
// cursor: pointer;
// }
2024-11-22 15:35:30 +08:00
input {
2024-12-10 15:06:36 +08:00
width: 100%;
2024-12-23 14:19:13 +08:00
height: 54px;
2024-12-10 15:06:36 +08:00
display: block;
2024-11-22 15:35:30 +08:00
border: 1px solid #3cb4a6;
2024-12-23 14:19:13 +08:00
border-radius: 27px;
line-height: 54px;
2024-11-22 15:35:30 +08:00
color: #333;
text-shadow: 0 0 0 #333;
2024-12-23 13:52:38 +08:00
padding-left: 110px;
2024-12-10 15:06:36 +08:00
box-sizing: border-box;
2024-11-22 15:35:30 +08:00
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
input:focus {
outline: 1px solid #3cb4a6;
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
input::-webkit-input-placeholder {
color: #949494;
}
.search-btn {
2024-12-10 15:06:36 +08:00
position: absolute;
top: 0;
right: 0;
2024-11-22 15:35:30 +08:00
width: 100px;
2024-12-10 15:06:36 +08:00
height: 43px;
2024-12-25 08:52:58 +08:00
transform: translate(-5px, 5px);
2024-12-10 15:06:36 +08:00
border-radius: 43px;
2024-11-22 15:35:30 +08:00
background: linear-gradient(132deg, #22ab9b 0%, #0d7462 100%);
box-shadow: 0px 2px 4px 0px rgba(20, 175, 255, 0.5);
border: none;
color: #fff;
cursor: pointer;
font-size: 18px;
2024-12-10 15:06:36 +08:00
box-sizing: border-box;
2024-11-22 15:35:30 +08:00
}
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
.ipt-down {
position: absolute;
2024-12-01 16:21:35 +08:00
bottom: 25px;
2024-11-22 15:35:30 +08:00
left: 22%;
overflow: hidden;
2023-12-07 17:48:36 +08:00
2024-11-22 15:35:30 +08:00
a {
max-width: 140px;
padding: 0 10px;
color: #727272;
font-size: 14px;
2023-12-07 17:48:36 +08:00
cursor: pointer;
overflow: hidden;
2024-11-22 15:35:30 +08:00
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
2023-12-07 17:48:36 +08:00
}
}
2024-11-23 16:31:54 +08:00
.cart-icon {
2024-12-10 15:06:36 +08:00
width: 100%;
2024-11-23 16:31:54 +08:00
display: flex;
align-items: center;
2024-12-20 17:36:14 +08:00
justify-content: center;
2024-11-23 16:31:54 +08:00
cursor: pointer;
span {
margin-left: 10px;
color: #1abc9c;
}
}
2023-12-07 17:48:36 +08:00
}
2024-11-22 15:35:30 +08:00
}
2023-12-07 17:48:36 +08:00
</style>