head.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. <template>
  2. <div class="head-all" :style="warpCss">
  3. <!-- 搜索组件 -->
  4. <div class="search-bos">
  5. <div class="search-content">
  6. <img
  7. class="logo"
  8. :src="componentData.logo ? componentData.logo : logo1"
  9. alt=""
  10. :style="{ 'width': componentData.topStyle == 1 ? '170px' : '430px' }"
  11. @click="onPath('/')"
  12. />
  13. <div v-if="componentData.topStyle == 1" style="width: 34px"></div>
  14. <div class="search-box">
  15. <div class="search-div flex-row-start">
  16. <div class="search-input flex-row-center">
  17. <el-input
  18. class="el-input"
  19. v-model="input"
  20. placeholder="搜索商品、品牌、分类..."
  21. @change="onPath('/search?type=1&input=' + input + '&cType=' + componentData.headType)"
  22. />
  23. <div class="bnt flex-row-center" @click="onPath('/search?type=1&input=' + input + '&cType=' + componentData.headType)">
  24. <el-icon color="#ffffff" size="20">
  25. <Search />
  26. </el-icon>
  27. </div>
  28. </div>
  29. <div class="cat-bos flex-row-center">
  30. <el-badge :value="cartCount" v-if="cartCount > 0">
  31. <img src="@/assets/images/layout/layout4.png" alt="" />
  32. </el-badge>
  33. <img v-else src="@/assets/images/layout/layout4.png" alt="" />
  34. <span @click="onPath('/cart')" class="ml-[15px]">我的购物车</span>
  35. </div>
  36. </div>
  37. <div class="search-text">
  38. <div
  39. @click="onPath('/search?type=1&input=' + item.title + '&cType=' + componentData.headType)"
  40. v-for="(item, index) in componentData.toplabel"
  41. :key="index"
  42. >
  43. {{ item.title }}
  44. </div>
  45. </div>
  46. </div>
  47. <img class="code" :src="componentData.code ? componentData.code : code" alt="" />
  48. </div>
  49. </div>
  50. <!-- 分类 -->
  51. <div class="nav-pages">
  52. <div class="nav-bos">
  53. <div class="nav-all flex-row-start" v-if="componentData.classifyShow">
  54. <img src="@/assets/images/pcdiy/layout2.png" alt="" />
  55. <div>全部商品分类</div>
  56. </div>
  57. <div v-for="(item, index) in componentData.topNav" :key="index" class="nav-list" :class="index == 0 ? 'hig' : ''" @click="onPath(item.url)">
  58. {{ item.title }}
  59. </div>
  60. </div>
  61. </div>
  62. <!-- 头部 -->
  63. <div class="head-pages">
  64. <div class="bg-img" v-if="componentData.carouselStyle">
  65. <img :src="componentData.carouselList && componentData.carouselList[0].imageUrl" alt="" />
  66. </div>
  67. <div class="home-head">
  68. <div @mouseleave="leaveClassify">
  69. <div
  70. class="classify"
  71. :class="classifyShow ? 'classify-show' : ''"
  72. :style="{
  73. backgroundColor: componentData.leftBackground
  74. }"
  75. >
  76. <div
  77. @mouseenter="enterClassify(item)"
  78. v-show="classifyShow ? true : Number(index) < 13"
  79. v-for="(item, index) in classifyList"
  80. :key="index"
  81. :class="[
  82. item.id == classifyId && classifyShow ? 'classify-hig' : '',
  83. componentData.leftStyle == 1 ? 'classify-list1' : 'classify-list2'
  84. ]"
  85. >
  86. <template v-if="componentData.leftStyle == 1">
  87. <div
  88. @click="onPath('/search?type=1&topCategoryId=' + item.id + '&cType=' + componentData.headType)"
  89. :style="{ 'color': componentData.leftColor1 }"
  90. class="label ellipsis hover-color"
  91. >
  92. {{ item.label }}
  93. </div>
  94. <div v-if="item.extra && item.extra.oneLable1" :style="{ 'color': componentData.leftColor2 }" class="info info1 ellipsis hover-color">
  95. {{ item.extra.oneLable1 }}
  96. </div>
  97. <div v-if="item.extra && item.extra.oneLable2" :style="{ 'color': componentData.leftColor2 }" class="info ellipsis hover-color">
  98. {{ item.extra.oneLable2 }}
  99. </div>
  100. </template>
  101. <template v-if="componentData.leftStyle == 2">
  102. <div :style="{ 'color': componentData.leftColor1 ? componentData.leftColor1 : '' }" class="label ellipsis">{{ item.label }}</div>
  103. <div class="two-level">
  104. <template v-for="(item1, index1) in item.children" :key="index1">
  105. <div :style="{ 'color': componentData.leftColor2 }" class="two-hig" v-if="Number(index1) < 2">{{ item1.label }}</div>
  106. <div style="margin: 0 4px" v-if="index1 == 0 && item.children.length > 1">/</div>
  107. </template>
  108. </div>
  109. </template>
  110. <div
  111. v-if="item.id == classifyId && classifyShow"
  112. class="classify-border"
  113. :class="componentData.leftStyle == 1 ? 'classify-border1' : 'classify-border2'"
  114. ></div>
  115. </div>
  116. </div>
  117. <div class="classify-bos" v-if="classifyShow">
  118. <div
  119. v-for="(item, index) in classifyInfo"
  120. :key="index"
  121. class="classify-item"
  122. @click="onPath('/search?type=2&mediumCategoryId=' + item.id + '&cType=' + componentData.headType)"
  123. >
  124. <div class="two-level ellipsis">{{ item.label || '' }}</div>
  125. <el-icon class="classify-icon" :size="14" color="#364153">
  126. <ArrowRight />
  127. </el-icon>
  128. <div class="classify-label">
  129. <div
  130. @click="onPath('/search?type=3&bottomCategoryId=' + item1.id + '&cType=' + componentData.headType)"
  131. v-for="(item1, index1) in item.children"
  132. :key="index1"
  133. >
  134. {{ item1.label || '' }}
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. <!-- 中间 -->
  141. <div class="head-bos">
  142. <div
  143. class="carousel"
  144. :class="[
  145. { 'carousel-type': componentData.carouselType == 2 },
  146. 'position' + componentData.carouselPosition,
  147. 'styleType' + componentData.carouselStyleType
  148. ]"
  149. :style="{
  150. height: componentData.advertNum == 0 ? '540px' : '400px',
  151. borderRadius: componentData.carouselRadius + 'px'
  152. }"
  153. >
  154. <el-carousel :height="componentData.advertNum == 0 ? '540px' : '400px'" arrow="always">
  155. <template v-if="componentData.carouselList && componentData.carouselList.length > 0">
  156. <el-carousel-item v-for="item in componentData.carouselList" :key="item" @click.stop="onPath(item.url)">
  157. <el-image
  158. style="width: 100%; height: 100%"
  159. :src="item.imageUrl ? item.imageUrl : figure"
  160. :fit="item.imgType == 1 ? 'fill' : item.imgType == 2 ? 'contain' : 'cover'"
  161. />
  162. </el-carousel-item>
  163. </template>
  164. <template v-else>
  165. <el-carousel-item>
  166. <el-image style="width: 100%; height: 100%" :src="figure" fit="cover" />
  167. </el-carousel-item>
  168. </template>
  169. </el-carousel>
  170. </div>
  171. <div class="head-box" v-if="componentData.advertNum != 0">
  172. <template v-for="(item, index) in componentData.advertList" :key="index">
  173. <div class="head-item" v-if="item.show" @click="onPath(item.url)">
  174. <el-image
  175. class="img"
  176. :src="item.imageUrl ? item.imageUrl : figure"
  177. :fit="item.imageUrl ? (item.imgType == 1 ? 'fill' : item.imgType == 2 ? 'contain' : 'cover') : 'cover'"
  178. />
  179. </div>
  180. </template>
  181. </div>
  182. </div>
  183. <!-- 右边 -->
  184. <div
  185. class="head-right"
  186. :style="{
  187. borderRadius: componentData.rightRadius + 'px'
  188. }"
  189. >
  190. <div v-if="userInfo.userId" class="order-bos flex-column-between">
  191. <div class="flex-row-start">
  192. <img :src="logo2" alt="" />
  193. <div class="ellipsis">{{ userInfo.nickName }}</div>
  194. </div>
  195. <div class="flex-row-start">
  196. <div class="flex-1 flex-column-center">
  197. <div>待付款</div>
  198. <div class="order-num">{{ countData.pendingPaymentCount || 0 }}</div>
  199. </div>
  200. <div class="flex-1 flex-column-center">
  201. <div>待发货</div>
  202. <div class="order-num">{{ countData.pendingShipmentCount || 0 }}</div>
  203. </div>
  204. <div class="flex-1 flex-column-center">
  205. <div>待收货</div>
  206. <div class="order-num">{{ countData.pendingReceiptCount || 0 }}</div>
  207. </div>
  208. </div>
  209. </div>
  210. <div class="login-bos" v-else>
  211. <div class="login-box">
  212. <img :src="logo2" alt="" />
  213. <div>
  214. <div class="login1">您好,欢迎来到优易达</div>
  215. <div class="login2">请先登录</div>
  216. </div>
  217. </div>
  218. <div class="loginBtn-bos flex-row-center">
  219. <div class="login-bnt1 flex-row-center" @click="onPath('/login')">登录</div>
  220. <div class="login-bnt2 flex-row-center" @click="onPath('/breg')">注册</div>
  221. </div>
  222. </div>
  223. <div class="real-time">
  224. <div class="real-title flex-row-between">
  225. <div class="real1">优易资讯</div>
  226. <!-- <div class="real2 flex-row-start">
  227. <div class="hover-color">更多</div>
  228. <el-icon :size="13" color="#83899F">
  229. <ArrowRight />
  230. </el-icon>
  231. </div> -->
  232. </div>
  233. <!-- @click="onPath('/solve/real?id=' + item.id + (item.pathType ? '&type=' + item.pathType : ''))" -->
  234. <template v-for="(item, index) in realList" :key="index">
  235. <div
  236. @click="onPath(item.pathType ? item.link : '/solve/real?id=' + item.id)"
  237. class="real-list ellipsis hover-color"
  238. v-if="componentData.realDataType == 2 ? true : Number(index) < componentData.realNumber"
  239. >
  240. {{ item.announcementTitle }}
  241. </div>
  242. </template>
  243. </div>
  244. <div class="interests">
  245. <div class="interests-title">企业会员权益</div>
  246. <div class="interests-bos">
  247. <div v-for="(item, index) in componentData.navlList" :key="index" class="interests-item flex-column-center" @click="onPath(item.url)">
  248. <el-image
  249. class="img"
  250. :src="item.imageUrl ? item.imageUrl : figure"
  251. :fit="item.imgType == 1 ? 'fill' : item.imgType == 2 ? 'contain' : 'cover'"
  252. />
  253. <div style="height: 18px" class="hover-color">{{ item.title }}</div>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </template>
  262. <script setup name="Index" lang="ts">
  263. import figure from '@/assets/images/figure.png';
  264. import logo1 from '@/assets/images/pcdiy/logo1.png';
  265. import logo2 from '@/assets/images/pcdiy/logo2.png';
  266. import code from '@/assets/images/pcdiy/code.png';
  267. import { getProductCategoryTree, countOrder } from '@/api/home/index';
  268. import { getAnnouncementPage } from '@/api/home/diy';
  269. import { onPath } from '@/utils/siteConfig';
  270. import Cookies from 'js-cookie';
  271. import { getInfo } from '@/api/login';
  272. import { cartStore } from '@/store/modules/cart';
  273. const props = defineProps<{
  274. row?: any;
  275. datas?: any;
  276. }>();
  277. const componentData = props.row || {};
  278. const userInfo = ref<any>({});
  279. const countData = ref<any>({});
  280. //左侧分类
  281. const classifyList = ref<any>([]);
  282. const realList = ref<any>([]);
  283. const classifyShow = ref<any>(false);
  284. const classifyId = ref<any>('');
  285. const classifyInfo = ref<any>([]);
  286. const cartStoreData = cartStore();
  287. const cartCount = computed(() => cartStoreData.cartCount);
  288. const input = ref<any>('');
  289. document.documentElement.style.setProperty('--carousel-color', componentData.carouselStyleColor ? componentData.carouselStyleColor : '#ffffff');
  290. onMounted(() => {
  291. if (props.datas) {
  292. realList.value = props.datas;
  293. } else {
  294. getDataList();
  295. }
  296. const token = Cookies.get('Authorization');
  297. if (token) {
  298. getInfo().then((res) => {
  299. if (res.code == 200) {
  300. userInfo.value = res.data.user;
  301. countOrder({}).then((res1) => {
  302. if (res1.code == 200) {
  303. countData.value = res1.data || {};
  304. }
  305. });
  306. }
  307. });
  308. }
  309. });
  310. //头部分类
  311. getProductCategoryTree({ platform: componentData.headType ? componentData.headType : 0 }).then((res) => {
  312. if (res.code == 200) {
  313. classifyList.value = res.data;
  314. }
  315. });
  316. const getDataList = () => {
  317. realList.value = [];
  318. // 默认
  319. if (componentData.realDataType == 1) {
  320. getAnnouncementPage({ pageSize: 20 }).then((res) => {
  321. if (res.code == 200) {
  322. realList.value = res.rows;
  323. }
  324. });
  325. } else {
  326. //手动选择
  327. getAnnouncementPage({ pageSize: 20, ids: componentData.realIds.join(',') }).then((res) => {
  328. if (res.code == 200) {
  329. const result = res.rows.filter((item: any) => componentData.realIds.includes(item.id));
  330. realList.value = result;
  331. }
  332. });
  333. }
  334. };
  335. //移入分类
  336. const enterClassify = (res: any) => {
  337. classifyShow.value = true;
  338. classifyId.value = res.id;
  339. classifyInfo.value = res.children;
  340. };
  341. //移出分类
  342. const leaveClassify = () => {
  343. classifyShow.value = false;
  344. };
  345. const warpCss = computed(() => {
  346. let style = '';
  347. style += 'position:relative;';
  348. //边距
  349. if (componentData.padding) {
  350. if (componentData.padding.top > 0) {
  351. style += 'padding-top:' + componentData.padding.top + 'px' + ';';
  352. }
  353. if (componentData.padding.bottom > 0) {
  354. style += 'padding-bottom:' + componentData.padding.bottom + 'px' + ';';
  355. }
  356. style += 'padding-right:' + componentData.padding.both + 'px' + ';';
  357. style += 'padding-left:' + componentData.padding.both + 'px' + ';';
  358. }
  359. //间距
  360. if (componentData.margin) {
  361. if (componentData.margin.top > 0) {
  362. style += 'margin-top:' + componentData.margin.top + 'px' + ';';
  363. }
  364. if (componentData.margin.bottom > 0) {
  365. style += 'margin-bottom:' + componentData.margin.bottom + 'px' + ';';
  366. }
  367. }
  368. return style;
  369. });
  370. </script>
  371. <style lang="scss" scoped>
  372. .head-all {
  373. width: 100%;
  374. // 搜索栏
  375. .search-bos {
  376. width: 100%;
  377. background-color: #ffffff;
  378. .search-content {
  379. margin: 0 auto;
  380. width: 100%;
  381. max-width: 1500px;
  382. min-width: 1200px;
  383. display: flex;
  384. // padding: 0 30px;
  385. }
  386. .logo {
  387. width: 170px;
  388. height: 88px;
  389. border-radius: 4px;
  390. margin-top: 10px;
  391. margin-right: 30px;
  392. cursor: pointer;
  393. }
  394. .search-box {
  395. flex: 1;
  396. height: 88px;
  397. padding-top: 40px;
  398. .search-div {
  399. .search-input {
  400. flex: 1;
  401. height: 38px;
  402. border-radius: 3px;
  403. border: 2px solid #fb2c36;
  404. padding-right: 4px;
  405. font-size: 14px;
  406. .el-input {
  407. height: 30px;
  408. width: 100%;
  409. font-size: 16px;
  410. :deep(.el-input__wrapper) {
  411. border: none;
  412. /* 可选:去除聚焦时的高亮 */
  413. box-shadow: none;
  414. outline: none;
  415. }
  416. }
  417. .bnt {
  418. width: 50px;
  419. height: 30px;
  420. background: #e7000b;
  421. border-radius: 3px;
  422. font-weight: bold;
  423. cursor: pointer;
  424. }
  425. }
  426. .cat-bos {
  427. width: 143px;
  428. height: 38px;
  429. background: #ffffff;
  430. border-radius: 10px;
  431. border: 1px solid #e5e7eb;
  432. margin-left: 24px;
  433. font-size: 14px;
  434. color: #e7000b;
  435. cursor: pointer;
  436. img {
  437. width: 14px;
  438. height: 14px;
  439. margin-top: 2px;
  440. }
  441. }
  442. }
  443. .search-text {
  444. font-size: 12px;
  445. display: flex;
  446. margin-top: 4px;
  447. div {
  448. margin-left: 10px;
  449. cursor: pointer;
  450. &:first-child {
  451. color: #e7000b;
  452. }
  453. }
  454. }
  455. }
  456. .code {
  457. height: 90px;
  458. width: 90px;
  459. margin-top: 10px;
  460. margin-left: 70px;
  461. // border-radius: 4px;
  462. }
  463. }
  464. //分类
  465. .nav-pages {
  466. width: 100%;
  467. background-color: #ffffff;
  468. .nav-bos {
  469. margin: 0 auto;
  470. width: 100%;
  471. max-width: 1500px;
  472. min-width: 1200px;
  473. display: flex;
  474. position: relative;
  475. padding-top: 15px;
  476. .nav-all {
  477. width: 234px;
  478. height: 40px;
  479. background: #e7000b;
  480. padding: 0 10px;
  481. font-size: 15px;
  482. color: #ffffff;
  483. cursor: pointer;
  484. img {
  485. height: 16px;
  486. width: 16px;
  487. margin-right: 6px;
  488. }
  489. }
  490. .nav-list {
  491. line-height: 40px;
  492. font-size: 15px;
  493. color: #364153;
  494. margin: 0 16px;
  495. text-align: center;
  496. cursor: pointer;
  497. &.hig {
  498. color: #e7000b;
  499. position: relative;
  500. &::before {
  501. content: '';
  502. position: absolute;
  503. bottom: 0;
  504. left: 0px;
  505. display: inline-block;
  506. width: 100%;
  507. height: 3px;
  508. background: #e7000b;
  509. margin-right: 8px;
  510. }
  511. }
  512. &:hover {
  513. color: #e7000b;
  514. }
  515. }
  516. }
  517. }
  518. // 头部
  519. .head-pages {
  520. // width: 1200px;
  521. width: 100%;
  522. margin: 0 auto;
  523. background-size: 100% 100%;
  524. background-repeat: no-repeat;
  525. position: relative;
  526. backdrop-filter: blur(95px);
  527. filter: blur(30rpx);
  528. .bg-img {
  529. position: absolute;
  530. width: 100%;
  531. height: 100%;
  532. top: 0;
  533. z-index: -1;
  534. filter: blur(30rpx);
  535. overflow: hidden;
  536. img {
  537. width: 100%;
  538. height: 100%;
  539. transform: scale(1.2);
  540. filter: blur(30px);
  541. }
  542. }
  543. .home-head {
  544. width: 100%;
  545. min-width: 1200px;
  546. max-width: 1500px;
  547. position: relative;
  548. display: flex;
  549. gap: 0px 10px;
  550. margin: 10px auto 0 auto;
  551. .classify {
  552. width: 234px;
  553. height: 540px;
  554. background: #ffffff;
  555. border-radius: 5px 0px 0px 5px;
  556. padding: 10px 0px;
  557. overflow: hidden;
  558. &.classify-show {
  559. position: absolute;
  560. z-index: 9999;
  561. height: auto;
  562. min-height: 540px;
  563. overflow: visible;
  564. }
  565. .classify-list1 {
  566. width: 100%;
  567. height: 40px;
  568. cursor: pointer;
  569. display: flex;
  570. align-items: center;
  571. padding-left: 15px;
  572. position: relative;
  573. &.classify-hig {
  574. border: 1px solid var(--el-color-primary);
  575. border-right: 0px solid var(--el-color-primary);
  576. }
  577. .label {
  578. max-width: 100px;
  579. font-weight: 600;
  580. font-size: 14px;
  581. color: #101828;
  582. white-space: nowrap;
  583. margin-right: 10px;
  584. &:hover {
  585. color: #e7000b;
  586. }
  587. }
  588. .info {
  589. max-width: 60px;
  590. font-size: 12px;
  591. color: #364153;
  592. white-space: nowrap;
  593. &.info1 {
  594. margin-right: 6px;
  595. }
  596. &:hover {
  597. color: #e7000b;
  598. }
  599. }
  600. }
  601. .classify-list2 {
  602. width: 100%;
  603. height: 58px;
  604. cursor: pointer;
  605. position: relative;
  606. display: flex;
  607. flex-direction: column;
  608. justify-content: center;
  609. padding-left: 25px;
  610. &.classify-hig {
  611. border: 1px solid var(--el-color-primary);
  612. border-right: 0px solid var(--el-color-primary);
  613. }
  614. .label {
  615. width: 100%;
  616. font-size: 14px;
  617. color: #101828;
  618. white-space: nowrap;
  619. margin-right: 10px;
  620. font-weight: 600;
  621. &:hover {
  622. color: var(--el-color-primary);
  623. }
  624. }
  625. .two-level {
  626. display: flex;
  627. align-items: center;
  628. font-size: 12px;
  629. color: #364153;
  630. margin-top: 6px;
  631. .two-hig {
  632. &:hover {
  633. color: var(--el-color-primary);
  634. }
  635. }
  636. }
  637. }
  638. .classify-border {
  639. position: absolute;
  640. right: -1px;
  641. top: 0px;
  642. width: 1px;
  643. z-index: 199;
  644. &.classify-border1 {
  645. height: 38px;
  646. background-color: #ffffff;
  647. }
  648. &.classify-border2 {
  649. height: 58px;
  650. background-color: #323232;
  651. }
  652. }
  653. }
  654. .classify-bos {
  655. position: absolute;
  656. top: 0;
  657. right: 0;
  658. left: 234px;
  659. height: 100%;
  660. border: 1px solid var(--el-color-primary);
  661. background-color: #ffffff;
  662. overflow-y: auto;
  663. padding-left: 30px;
  664. z-index: 99;
  665. .classify-item {
  666. display: flex;
  667. padding-top: 10px;
  668. border-bottom: 1px solid #e5e7eb;
  669. .two-level {
  670. width: 90px;
  671. font-size: 14px;
  672. color: var(--el-color-primary);
  673. cursor: pointer;
  674. }
  675. .classify-icon {
  676. margin: 4px 15px 0 15px;
  677. }
  678. .classify-label {
  679. display: flex;
  680. flex-wrap: wrap;
  681. flex: 1;
  682. font-size: 14px;
  683. color: #364153;
  684. div {
  685. margin-right: 20px;
  686. margin-bottom: 10px;
  687. cursor: pointer;
  688. &:hover {
  689. color: var(--el-color-primary);
  690. }
  691. }
  692. }
  693. }
  694. }
  695. // 头部中间
  696. .head-bos {
  697. flex: 1;
  698. .carousel {
  699. overflow: hidden;
  700. width: 100%;
  701. background: #ffffff;
  702. cursor: pointer;
  703. border-radius: 5px;
  704. :deep(.el-carousel__button) {
  705. background-color: var(--carousel-color);
  706. }
  707. &.carousel-type {
  708. :deep(.el-carousel__arrow) {
  709. border-radius: 0;
  710. }
  711. }
  712. &.position1 {
  713. :deep(.el-carousel__indicators--horizontal) {
  714. left: 5%;
  715. }
  716. }
  717. &.position2 {
  718. :deep(.el-carousel__indicators--horizontal) {
  719. left: 50%;
  720. }
  721. }
  722. &.position3 {
  723. :deep(.el-carousel__indicators--horizontal) {
  724. left: 95%;
  725. }
  726. }
  727. &.styleType2 {
  728. :deep(.el-carousel__button) {
  729. height: 10px;
  730. width: 10px;
  731. border-radius: 10px;
  732. }
  733. }
  734. }
  735. .head-box {
  736. width: 100%;
  737. height: 130px;
  738. margin-top: 10px;
  739. display: flex;
  740. gap: 0 10px;
  741. .head-item {
  742. flex: 1;
  743. background-color: #ffffff;
  744. height: 130px;
  745. display: flex;
  746. align-items: center;
  747. cursor: pointer;
  748. border-radius: 5px;
  749. overflow: hidden;
  750. display: flex;
  751. justify-content: center;
  752. align-items: center;
  753. .img {
  754. aspect-ratio: 244 / 120;
  755. height: 100%;
  756. }
  757. }
  758. }
  759. }
  760. //右边
  761. .head-right {
  762. width: 210px;
  763. height: 540px;
  764. background: #ffffff;
  765. display: flex;
  766. flex-direction: column;
  767. font-size: 14px;
  768. border-radius: 5px;
  769. .order-bos {
  770. width: calc(100% - 20px);
  771. height: 110px;
  772. font-size: 14px;
  773. padding: 16px 0;
  774. border-bottom: 1px solid #e5e7eb;
  775. margin: 0 10px;
  776. img {
  777. width: 28px;
  778. height: 28px;
  779. }
  780. .order-num {
  781. color: #e7000b;
  782. font-size: 14px;
  783. margin-top: 2px;
  784. }
  785. }
  786. .login-bos {
  787. width: calc(100% - 20px);
  788. height: 110px;
  789. border-bottom: 1px solid #e5e7eb;
  790. margin: 0 10px;
  791. display: flex;
  792. flex-direction: column;
  793. justify-content: space-between;
  794. padding: 16px 0;
  795. .login-box {
  796. display: flex;
  797. align-items: center;
  798. img {
  799. width: 40px;
  800. height: 40px;
  801. margin-right: 8px;
  802. border-radius: 40px;
  803. }
  804. .login1 {
  805. font-size: 13px;
  806. color: #444444;
  807. }
  808. .login2 {
  809. margin-top: 2px;
  810. font-size: 12px;
  811. color: #6a7282;
  812. }
  813. }
  814. .loginBtn-bos {
  815. width: 100%;
  816. .login-bnt1 {
  817. width: 64px;
  818. height: 24px;
  819. background-color: #e7000b;
  820. color: #ffffff;
  821. border-radius: 24px;
  822. font-size: 12px;
  823. cursor: pointer;
  824. }
  825. .login-bnt2 {
  826. width: 64px;
  827. height: 24px;
  828. border: 1px solid #e7000b;
  829. color: #e7000b;
  830. border-radius: 24px;
  831. font-size: 12px;
  832. margin-left: 10px;
  833. cursor: pointer;
  834. }
  835. }
  836. }
  837. .real-time {
  838. width: calc(100% - 20px);
  839. height: 230px;
  840. border-bottom: 1px solid #e5e7eb;
  841. margin: 0 10px;
  842. padding-top: 15px;
  843. .real-title {
  844. position: relative;
  845. margin-bottom: 12px;
  846. &::after {
  847. content: '';
  848. top: 3px;
  849. left: 0;
  850. position: absolute;
  851. width: 4px;
  852. height: 14px;
  853. background: #e7000b;
  854. }
  855. .real1 {
  856. font-weight: 600;
  857. font-size: 14px;
  858. color: #1d2129;
  859. padding-left: 15px;
  860. }
  861. .real2 {
  862. font-size: 13px;
  863. color: #83899f;
  864. cursor: pointer;
  865. }
  866. }
  867. .real-list {
  868. width: 100%;
  869. font-size: 12px;
  870. color: #1d2129;
  871. margin-bottom: 12px;
  872. cursor: pointer;
  873. &:hover {
  874. color: var(--el-color-primary);
  875. }
  876. }
  877. }
  878. .interests {
  879. flex: 1;
  880. width: calc(100% - 20px);
  881. margin: 0 10px;
  882. padding-top: 15px;
  883. .interests-title {
  884. position: relative;
  885. font-weight: 600;
  886. font-size: 14px;
  887. color: #1d2129;
  888. padding-left: 15px;
  889. &::after {
  890. content: '';
  891. top: 3px;
  892. left: 0;
  893. position: absolute;
  894. width: 4px;
  895. height: 14px;
  896. background: #e7000b;
  897. }
  898. }
  899. .interests-bos {
  900. display: flex;
  901. flex-wrap: wrap;
  902. .interests-item {
  903. width: 33.333%;
  904. font-size: 12px;
  905. color: #101828;
  906. margin-top: 15px;
  907. cursor: pointer;
  908. &:hover {
  909. color: var(--el-color-primary);
  910. }
  911. .img {
  912. width: 34px;
  913. height: 34px;
  914. border-radius: 6px;
  915. margin-bottom: 7px;
  916. }
  917. }
  918. }
  919. }
  920. }
  921. }
  922. }
  923. }
  924. </style>