123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492 |
- <template>
- <div class="sld_member_top">
- <div class="sld_member_top_zoom clearfix">
- <div class="container">
- <dl class="fl sld_left_part">
- <dt class="sld-user-logo sld_img_center">
- <router-link tag="a" :to="`/`" class="flex_row_start_center">
- <img
- :src="memberLogo"
- :onerror="defaultImg"
- />
- </router-link>
- </dt>
- <dd>
- <router-link
- tag="a"
- :to="`/member/home`"
- :class="{ cur_tag_active: curTag == 1 }"
- >
- {{ L["首页"] }}
- </router-link>
- </dd>
- </dl>
- <div class="fr">
- <div class="sld_search_part fl">
- <input
- v-model="keyword"
- type="text"
- class="text"
- :placeholder="L['请输入关键词']"
- autocomplete="off "
- style="color: rgb(153, 153, 153)"
- @focus="inputFocus"
- ref="searchInput"
- />
- <input
- type="submit"
- :value="L['搜索']"
- class="button"
- @click="search"
- />
- </div>
- <div class="fl sld_cart_part">
- <dl>
- <dt class="ld first_dt center_text">
- <span class="iconfont"> <img style="width:20px;position:relative; top:3px" src="/email.svg"/> </span>
- <s></s>
- <router-link :to="`/member/enquiry/list`">
- {{ L["我的询盘"] }}
- </router-link>
- </dt>
- <!-- <dd class="cart_more_view">
- <cart-model></cart-model>
- </dd> -->
- </dl>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- // import { lang_zn } from "@/assets/language/zh";
- import { getCurLanguage } from '@/composables/common.js';
- import { useUserInfo } from "@/store/user.js";
- import { useFiltersStore } from "@/store/filter.js";
- const filtersStore = useFiltersStore();
- // const L = lang_zn;
- const L = getCurLanguage();
- const configInfo = useUserInfo();
- const { proxy } = getCurrentInstance();
- const keyword = ref("");
- const curTag = ref(1); //当前选中的tag,1为首页,2为账户管理,3为消息
- const router = useRouter();
- const cartData = reactive({ data: {} });
- const memberInfo = reactive({ data: {} }); //个人信息
- const defaultImg = ref("/member/top_logo.png");
- const memberLogo = ref('')
- const getMemberLogo = () => {
- get('/v3/system/front/setting/getSettings?names=main_user_center_logo').then(res=>{
- memberLogo.value = res.data[0]
- })
- }
- getMemberLogo()
- onMounted(() => {
- memberInfo.data = filtersStore.getMemberInfo;
- });
- //搜索事件
- const search = () => {
- proxy.$refs.searchInput.style.color = "rgb(153,153,153)";
- if (keyword.value) {
- router.push({ path: "/goods/list/search_keyword-"+ keyword.value });
- }
- };
- const inputFocus = () => {
- proxy.$refs.searchInput.style.color = "#333";
- };
- watchEffect(() => {
- // let tmpRoute = router.currentRoute.value;
- // if (tmpRoute.fullPath.indexOf("/msg/") > -1) {
- // curTag.value = 3;
- // }
- // memberInfo.data = store.state.memberInfo;
- });
- </script>
- <style lang="scss" scoped>
- .sld_member_top {
- .sld_member_top_zoom {
- width: 100%;
- background-color: $colorMain;
- margin-bottom: 10px;
- .container {
- width: 1210px;
- margin: 0 auto;
- padding-left: 0px;
- padding-right: 0px;
- &:after,
- &:before {
- display: table;
- content: " ";
- }
- .fl {
- float: left;
- }
- .fr {
- float: right;
- }
- }
- .sld_left_part {
- color: #fff;
- dt {
- float: left;
- width: 127px;
- height: 60px;
- margin: 5px 35px 0px 0px;
- img {
- cursor: pointer;
- }
- &.sld_img_center {
- position: relative;
- width: 120px;
- overflow: hidden;
- a {
- width: 100%;
- height: 100%;
- }
- img {
- max-width: 100%;
- max-height: 100%;
- }
- }
- }
- dd {
- position: relative;
- float: left;
- a {
- display: block;
- line-height: 64px;
- color: rgba(255, 255, 255, 0.8);
- margin: 0 25px;
- font-size: 15px;
- &.router-link-active {
- &::after {
- position: absolute;
- bottom: 0;
- left: 50%;
- content: "";
- width: 0;
- height: 0;
- transform: translateX(-50%);
- border-width: 6px;
- border-style: solid;
- border-color: transparent transparent #fff transparent;
- }
- }
- .msg_num {
- display: block;
- position: absolute;
- background: #ffffff;
- color: $colorMain2;
- min-width: 20px;
- height: 20px;
- border-radius: 10px;
- right: 5px;
- top: 10px;
- line-height: 20px;
- text-align: center;
- }
- &.cur_tag_active {
- &::after {
- position: absolute;
- bottom: 0;
- left: 50%;
- content: "";
- width: 0;
- height: 0;
- transform: translateX(-50%);
- border-width: 6px;
- border-style: solid;
- border-color: transparent transparent #fff transparent;
- }
- }
- .account_arrow {
- color: rgba(255, 255, 255, 0.8);
- font-size: 10px;
- margin-left: 2px;
- display: inline-block;
- }
- &:hover {
- .account_arrow {
- transform: rotate(180deg);
- transition: transform 0.2s ease-in 0s,
- -webkit-transform 0.2s ease-in 0s;
- }
- }
- }
- .account_tag:hover {
- .account_popup {
- display: block;
- opacity: 1;
- -webkit-animation: showPopUp 0.4s ease-in-out;
- animation: showPopUp 0.4s ease-in-out;
- @-webkit-keyframes showPopUp {
- 0% {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @keyframes showPopUp {
- 0% {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- }
- }
- .account_popup {
- display: none;
- opacity: 0;
- top: 40px;
- left: 50%;
- margin-left: -50px;
- padding: 15px 0;
- width: auto;
- position: absolute;
- z-index: 11;
- &::before {
- z-index: 1;
- top: 10px;
- margin-left: -5px;
- width: 10px;
- height: 10px;
- box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
- background-color: #fff;
- }
- &::after,
- &::before {
- content: "";
- position: absolute;
- left: 50%;
- -webkit-transform: rotate(45deg);
- -ms-transform: rotate(45deg);
- transform: rotate(45deg);
- }
- .content {
- padding: 10px 0 10px 23px;
- overflow: hidden;
- box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
- background-color: #fff;
- .content_item {
- float: left;
- width: 100%;
- color: #333;
- -webkit-transition: all 0.4s ease;
- transition: all 0.4s ease;
- height: 30px;
- line-height: 30px;
- font-size: 12px;
- margin: 0;
- &:hover {
- color: $colorMain;
- }
- }
- }
- }
- }
- }
- .sld_cart_part {
- float: right;
- position: relative;
- z-index: 99;
- width: 150px;
- height: 40px;
- margin-top: 16px;
- margin-right: 3px;
- margin-bottom: 0px;
- dd {
- top: 32px;
- position: absolute;
- right: 0;
- width: 355px;
- border: 1px solid #e3e3e3;
- background: #fff;
- z-index: 3;
- }
- dl {
- dd {
- .incart_goods {
- dl {
- padding-top: 8px;
- }
- dd {
- &.mcart_price {
- position: static;
- em {
- margin-right: 6px;
- width: auto;
- color: #666;
- &:nth-child(1) {
- display: block;
- font-weight: 600;
- }
- &:nth-child(2) {
- display: block;
- text-align: right;
- margin-top: 6px;
- }
- }
- }
- }
- }
- }
- .addcart_goods_num {
- font: 11px/16px Verdana;
- color: #fff;
- background: $colorMain2;
- text-align: center;
- display: inline-block;
- height: 16px;
- min-width: 16px;
- border: none 0;
- border-radius: 8px;
- margin-left: 10px;
- }
- .iconfont {
- margin: 0 13px 0 12px;
- color: $colorMain2;
- font-size: 17px;
- font-weight: 600;
- vertical-align: bottom;
- }
- }
- dt {
- position: absolute;
- z-index: 3;
- width: 165px;
- height: 38px;
- border: 1px solid #e3e3e3;
- background-color: #fff;
- cursor: pointer;
- font-weight: 400;
- line-height: 30px;
- }
- .first_dt {
- width: 130px;
- height: 32px;
- a {
- color: #666666;
- font-size: 14px;
- line-height: 30px;
- }
- }
- .cart_more_view {
- display: none;
- .empty_cart {
- width: 100%;
- position: relative;
- .empty_cart_line {
- position: absolute;
- width: 163px;
- right: 0;
- height: 2px;
- top: -2px;
- z-index: 999;
- background: #fff;
- }
- .empty_cart_txt {
- padding: 10px;
- color: #999;
- }
- }
- }
- &:hover .cart_more_view {
- display: inline-block;
- }
- .ld {
- position: relative;
- zoom: 1;
- }
- }
- .sld_search_part {
- height: 32px;
- background-color: #fff;
- margin-top: 16px;
- margin-right: 20px;
- input {
- height: 30px;
- border: none;
- outline: none;
- background-color: #fff;
- &.text {
- width: 202px;
- line-height: 30px;
- padding-left: 10px;
- }
- &.button {
- height: 32px;
- color: #666666;
- font-size: 14px;
- cursor: pointer;
- padding: 0 15px;
- border-left: 1px solid #ddd;
- }
- }
- }
- }
- }
- </style>
|