head.vue 28 KB

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