index.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588
  1. <template>
  2. <div class="home-pages">
  3. <!-- 头部 -->
  4. <div class="home-head" @mouseleave="leaveClassify">
  5. <div class="classify" :class="classifyShow ? 'classify-show' : ''">
  6. <div
  7. class="classify-list"
  8. v-for="(item, index) in classifyList"
  9. :class="item.id == classifyId && classifyShow ? 'classify-hig' : ''"
  10. :key="index"
  11. @mouseenter="enterClassify(item)"
  12. v-show="classifyShow ? true : Number(index) < 13"
  13. >
  14. <div class="label ellipsis" @click="onPath('/search?type=1&topCategoryId=' + item.id)">{{ item.label }}</div>
  15. <div class="info info1 ellipsis" v-if="item.extra && item.extra.oneLable1">{{ item.extra.oneLable1 }}</div>
  16. <div class="info ellipsis" v-if="item.extra && item.extra.oneLable2">{{ item.extra.oneLable2 }}</div>
  17. <div class="classify-border" v-if="item.id == classifyId && classifyShow"></div>
  18. </div>
  19. </div>
  20. <div class="classify-bos" v-if="classifyShow">
  21. <div v-for="(item, index) in classifyInfo" :key="index" class="classify-item" @click="onPath('/search?type=2&middleCategoryId=' + item.id)">
  22. <div class="two-level ellipsis">{{ item.label || '' }}</div>
  23. <el-icon class="classify-icon" :size="14" color="#364153">
  24. <ArrowRight />
  25. </el-icon>
  26. <div class="classify-label">
  27. <div v-for="(item1, index1) in item.children" :key="index1" @click="onPath('/search?type=3&bottomCategoryId=' + item1.id)">
  28. {{ item1.label || '' }}
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="head-bos">
  34. <div class="carousel">
  35. <el-carousel trigger="click" height="407px">
  36. <el-carousel-item v-for="item in carouselList" :key="item">
  37. <img :src="item.imageUrl" alt="" />
  38. </el-carousel-item>
  39. </el-carousel>
  40. </div>
  41. <div class="head-box">
  42. <div v-for="(item, index) in AdList" :key="index" class="head-item" @click="onPath('/plan?id=' + item.id)">
  43. <img :src="item.imageUrl" alt="" />
  44. </div>
  45. </div>
  46. </div>
  47. <!-- 右边 -->
  48. <div class="head-right">
  49. <div v-if="userInfo.userId" class="order-bos flex-column-between">
  50. <div class="flex-row-start">
  51. <img src="@/assets/images/logo2.png" alt="" />
  52. <div class="ellipsis">{{ userInfo.nickName }}</div>
  53. </div>
  54. <div class="flex-row-start">
  55. <div class="flex-1 flex-column-center">
  56. <div>待付款</div>
  57. <div class="order-num">{{ countData.pendingPaymentCount || 0 }}</div>
  58. </div>
  59. <div class="flex-1 flex-column-center">
  60. <div>待发货</div>
  61. <div class="order-num">{{ countData.pendingShipmentCount || 0 }}</div>
  62. </div>
  63. <div class="flex-1 flex-column-center">
  64. <div>待收货</div>
  65. <div class="order-num">{{ countData.pendingReceiptCount || 0 }}</div>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="login-bos" v-else>
  70. <div class="login-box">
  71. <img src="@/assets/images/logo2.png" alt="" />
  72. <div>
  73. <div class="login1">您好,欢迎来到优易达</div>
  74. <div class="login2">请先登录</div>
  75. </div>
  76. </div>
  77. <div class="loginBtn-bos flex-row-center">
  78. <div @click="onPath('/login')" class="login-bnt1 flex-row-center">登录</div>
  79. <div @click="onPath('/breg')" class="login-bnt2 flex-row-center">注册</div>
  80. </div>
  81. </div>
  82. <!-- <div class="login-bos">
  83. <div class="login-box">
  84. <img :src="userInfo.avatar ? userInfo.avatar : profile" alt="" />
  85. <div>
  86. <div class="login1">您好,欢迎来到优易达</div>
  87. <div class="login2">{{ userInfo.nickName ? userInfo.nickName : '请先登录' }}</div>
  88. </div>
  89. </div>
  90. <div class="login-btn">
  91. <el-button v-if="!userInfo.nickName" type="primary" round size="small" style="width: 64px" @click="onPath('/login')">登录</el-button>
  92. <el-button v-if="!userInfo.nickName" type="primary" plain round size="small" style="width: 64px">注册</el-button>
  93. <el-button v-if="userInfo.nickName" type="primary" plain round size="small" style="width: 64px" @click="onlogout()">退出</el-button>
  94. </div>
  95. </div> -->
  96. <div class="real-time">
  97. <div class="real-title flex-row-between">
  98. <div class="real1">优易资讯</div>
  99. <div class="real2 flex-row-start">
  100. <!-- <div>更多</div>
  101. <el-icon :size="13" color="#83899F">
  102. <ArrowRight />
  103. </el-icon> -->
  104. </div>
  105. </div>
  106. <template v-for="(item, index) in realList" :key="index">
  107. <div @click="onPath('/solve/real?id=' + item.id)" class="real-list ellipsis" v-if="Number(index) < 7">{{ item.announcementTitle }}</div>
  108. </template>
  109. </div>
  110. <div class="interests">
  111. <div class="interests-title">企业会员权益</div>
  112. <div class="interests-bos">
  113. <div v-for="(item, index) in interestsList" :key="index" class="interests-item flex-column-center">
  114. <img :src="item.imageUrl" alt="" />
  115. <div>{{ item.title }}</div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <!-- 热门方案 -->
  122. <div class="home-title flex-row-between">
  123. <div>
  124. <span class="title1">{{ hotTitle.title }}</span>
  125. <span class="title2">{{ hotTitle.subtitle }}</span>
  126. </div>
  127. <div class="title-more flex-row-start" @click="onPath(hotTitle.linkUrl ? hotTitle.linkUrl : '/plan')">
  128. <div style="margin-right: 5px">{{ hotTitle.linkWord }}</div>
  129. <el-icon :size="13" color="#83899F">
  130. <ArrowRight />
  131. </el-icon>
  132. </div>
  133. </div>
  134. <div class="hot-bos">
  135. <template v-for="(item, index) in hotList" :key="index">
  136. <div class="hot-list flex-column-center" v-if="Number(index) < 4" @click="onPath('/plan_info?id=' + item.id)">
  137. <div class="hot1">{{ item.advertTitle }}</div>
  138. <div class="hot2">{{ item.advertBrief }}</div>
  139. <img :src="item.coverImage" alt="" />
  140. </div>
  141. </template>
  142. </div>
  143. <!-- 场景采购 -->
  144. <div class="home-title flex-row-between">
  145. <div>
  146. <span class="title1">{{ sceneTitle.title }}</span>
  147. <span class="title2">{{ sceneTitle.subtitle }}</span>
  148. </div>
  149. <div class="title-more flex-row-start" @click="onPath(sceneTitle.linkUrl ? sceneTitle.linkUrl : '/plan/procure')">
  150. <div style="margin-right: 5px">{{ sceneTitle.linkWord }}</div>
  151. <el-icon :size="13" color="#83899F">
  152. <ArrowRight />
  153. </el-icon>
  154. </div>
  155. </div>
  156. <div class="scene-bos">
  157. <template v-for="(item, index) in sceneList" :key="index">
  158. <div class="scene-list" v-if="Number(index) < 5" @click="onPath('/plan_info?id=' + item.id)">
  159. <div class="scene-box">
  160. <!-- <div class="scene1">{{ item.advertTitle }}</div>
  161. <div class="scene2">{{ item.advertBrief }}</div> -->
  162. </div>
  163. <img :src="item.coverImage" alt="" />
  164. </div>
  165. </template>
  166. </div>
  167. <!-- 大牌推荐 -->
  168. <div class="home-title flex-row-between">
  169. <div>
  170. <span class="title1">{{ bigbrandTitle.title }}</span>
  171. <span class="title2">{{ bigbrandTitle.subtitle }}</span>
  172. </div>
  173. <div class="title-more flex-row-start" @click="onPath(hotTitle.linkUrl ? hotTitle.linkUrl : '/search/brand')">
  174. <div style="margin-right: 5px">{{ bigbrandTitle.linkWord }}</div>
  175. <el-icon :size="13" color="#83899F">
  176. <ArrowRight />
  177. </el-icon>
  178. </div>
  179. </div>
  180. <div class="big-brand">
  181. <img class="bigBrand-one" :src="bigbrandOne.coverImage" alt="" />
  182. <div class="bigBrand-bos">
  183. <template v-for="(item, index) in bigbrandList" :key="index">
  184. <div class="bigBrand-list" v-if="Number(index) < 10">
  185. <img :src="item.brandLogo" alt="" />
  186. <div class="bigBrand1">{{ item.brandName || '' }}</div>
  187. <div class="bigBrand2">
  188. {{ item.advertBrief || '' }}
  189. </div>
  190. </div>
  191. </template>
  192. </div>
  193. </div>
  194. <!-- 行家精选 -->
  195. <div class="home-title flex-row-between">
  196. <div>
  197. <span class="title1">{{ expertTitle.title }}</span>
  198. <span class="title2">{{ expertTitle.subtitle }}</span>
  199. </div>
  200. <div class="title-more flex-row-start" @click="onPath(hotTitle.linkUrl ? hotTitle.linkUrl : '/search/special')">
  201. <div style="margin-right: 5px">{{ expertTitle.linkWord }}</div>
  202. <el-icon :size="13" color="#83899F">
  203. <ArrowRight />
  204. </el-icon>
  205. </div>
  206. </div>
  207. <div class="expert-bos">
  208. <template v-for="(item, index) in expertList" :key="index">
  209. <div class="expert-list" v-if="Number(index) < 5" @click="onPath('/item?id=' + item.id + '&productNo=' + item.productNo)">
  210. <img :src="item.productImage" alt="" />
  211. <div class="itemName ellipsis">{{ item.itemName || '' }}</div>
  212. <div class="price">
  213. <span class="memberPrice">¥{{ item.memberPrice }}</span>
  214. <span class="marketPrice">¥{{ item.marketPrice }}</span>
  215. </div>
  216. </div>
  217. </template>
  218. </div>
  219. <!-- 采购指南 -->
  220. <div class="home-title flex-row-between">
  221. <div>
  222. <span class="title1">{{ procureTitle.title }}</span>
  223. <span class="title2">{{ procureTitle.subtitle }}</span>
  224. </div>
  225. <div class="title-more flex-row-start" @click="onPath(hotTitle.linkUrl ? hotTitle.linkUrl : '/plan/guide')">
  226. <div style="margin-right: 5px">{{ procureTitle.linkWord }}</div>
  227. <el-icon :size="13" color="#83899F">
  228. <ArrowRight />
  229. </el-icon>
  230. </div>
  231. </div>
  232. <div class="procure-bos">
  233. <template v-for="(item, index) in procureList" :key="index">
  234. <div class="procure-list" v-if="Number(index) < 3">
  235. <img :src="item.coverImage" alt="" />
  236. <div class="procure1">{{ item.title || '' }}</div>
  237. <div class="procure2">{{ item.subtitle || '' }}</div>
  238. </div>
  239. </template>
  240. </div>
  241. <!-- 循环-商品 -->
  242. <div v-for="(item1, index1) in homeList" :key="index1">
  243. <!-- 头部 -->
  244. <div class="home-title flex-row-between">
  245. <div>
  246. <span class="title1">{{ item1.floorName }}</span>
  247. <span class="title2">{{ item1.floorDescribe }}</span>
  248. </div>
  249. <div class="title-more flex-row-start">
  250. <div style="margin-right: 5px">{{ item1.floorLabel }}</div>
  251. <el-icon :size="13" color="#83899F">
  252. <ArrowRight />
  253. </el-icon>
  254. </div>
  255. </div>
  256. <!-- 商品 -->
  257. <div class="goods-bos" v-if="item1.imgOne">
  258. <img class="goods-img" :src="item1.imgOne.advertiseImage" alt="" />
  259. <div class="home1-bos" v-if="item1.home1List && item1.home1List.length > 0">
  260. <div class="floorName">{{ item1.floorName }}</div>
  261. <div v-for="(item2, index2) in item1.home1List" :key="index2" class="home1-list">
  262. <img :src="item2.advertiseImage" alt="" />
  263. <div style="flex: 1; width: 0">
  264. <div class="advertiseName">{{ item2.advertiseName }}</div>
  265. <div class="advertiseDescribe ellipsis">{{ item2.advertiseDescribe }}</div>
  266. </div>
  267. </div>
  268. </div>
  269. <div class="home2-bos" v-if="item1.home2List && item1.home2List.length > 0">
  270. <div>
  271. <div class="floorName">发现</div>
  272. <div class="home2-box">
  273. <div v-for="(item2, index2) in item1.home2List" :key="index2" class="home2-list">
  274. <div style="flex: 1; width: 0">
  275. <div class="advertiseName ellipsis">{{ item2.advertiseName }}</div>
  276. <div class="advertiseDescribe ellipsis">{{ item2.advertiseDescribe }}</div>
  277. <el-button class="bnt" type="primary" size="small">立即进入</el-button>
  278. </div>
  279. <img :src="item2.advertiseImage" alt="" />
  280. </div>
  281. </div>
  282. </div>
  283. <div class="home2-two" v-if="item1.infoTwo">
  284. <div class="advertiseName">{{ item1.infoTwo.advertiseName }}</div>
  285. <div class="advertiseDescribe">{{ item1.infoTwo.advertiseDescribe }}</div>
  286. <img :src="item1.infoTwo.advertiseImage" alt="" />
  287. </div>
  288. </div>
  289. </div>
  290. <div class="shop-bos">
  291. <div class="shop-nav">
  292. <div class="nav-title">采购导航</div>
  293. <div class="nav-bos">
  294. <div v-for="(item2, index2) in item1.navList" :key="index2" class="nav-list flex-row-center" :class="index2 == 0 ? 'hig' : ''">
  295. {{ item2.labelName }}
  296. </div>
  297. </div>
  298. </div>
  299. <template v-for="(item2, index2) in item1.shopList" :key="index2">
  300. <div class="shop-list" v-if="Number(index2) < 4" @click="onInfo(item2)">
  301. <img :src="item2.productImage" alt="" />
  302. <div class="itemName ellipsis2">{{ item2.itemName }}</div>
  303. <div class="price">
  304. <span class="memberPrice">¥{{ item2.memberPrice }}</span>
  305. <span class="marketPrice">¥{{ item2.marketPrice }}</span>
  306. </div>
  307. </div>
  308. </template>
  309. </div>
  310. </div>
  311. <!-- 项目案例 -->
  312. <div class="home-title flex-row-between">
  313. <div>
  314. <span class="title1">{{ projectTitle.title }}</span>
  315. <span class="title2">{{ projectTitle.subtitle }}</span>
  316. </div>
  317. <div class="title-more flex-row-start" @click="onPath(projectTitle.linkUrl ? projectTitle.linkUrl : '/plan/project')">
  318. <div style="margin-right: 5px">{{ projectTitle.linkWord }}</div>
  319. <el-icon :size="13" color="#83899F">
  320. <ArrowRight />
  321. </el-icon>
  322. </div>
  323. </div>
  324. <div class="project-bos">
  325. <template v-for="(item, index) in projectList" :key="index">
  326. <div class="project-list" v-if="Number(index) < 3">
  327. <img :src="item.uploadProgram" alt="" />
  328. <div class="project-box">
  329. <div class="project1">{{ item.caseTitle || '' }}</div>
  330. <div class="project2">
  331. {{ item.projectBrief || '' }}
  332. </div>
  333. <div class="project-more flex-row-between">
  334. <div></div>
  335. <div class="flex-row-start">
  336. <div style="margin-right: 5px">了解详情</div>
  337. <el-icon :size="14" color="#E7000B">
  338. <ArrowRight />
  339. </el-icon>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. </template>
  345. </div>
  346. </div>
  347. </template>
  348. <script setup lang="ts">
  349. import profile from '@/assets/images/profile.jpg';
  350. import { onPath } from '@/utils/siteConfig';
  351. import { getToken } from '@/utils/auth';
  352. import { getInfo } from '@/api/login';
  353. import { getIndexDiyPcPage, getIsUseDiy } from '@/api/home/diy';
  354. import {
  355. getProductCategoryTree,
  356. getHomeAdList,
  357. getYouYiZiXunPage,
  358. getEnterpriseMemberEquityList,
  359. getHomeThreeAdList,
  360. getHotSchemeTitle,
  361. getHotSchemeList,
  362. getScenePurchaseTitle,
  363. getScenePurchaseList,
  364. getPlatformFlashSaleTitle,
  365. getPlatformFlashSaleList,
  366. getPlatformFlashSaleBrand,
  367. getExpertSelectionTitle,
  368. getProcurementTopicsList,
  369. getPurchaseGuideTitle,
  370. getExpertSelectionList,
  371. getClassificationFloorList,
  372. getClassificationFloorDetail,
  373. getClassificationFloorLabel,
  374. getClassificationFloorDetail2,
  375. getProjectCaseTitle,
  376. getProjectCaseList,
  377. countOrder
  378. } from '@/api/home/index';
  379. import Cookies from 'js-cookie';
  380. const userInfo = ref<any>({});
  381. const classifyList = ref<any>([]);
  382. const classifyShow = ref<any>(false);
  383. const classifyId = ref<any>('');
  384. const classifyInfo = ref<any>([]);
  385. const carouselList = ref<any>([]);
  386. const realList = ref<any>([]);
  387. const interestsList = ref<any>([]);
  388. const AdList = ref<any>([]);
  389. const hotTitle = ref<any>('');
  390. const hotList = ref<any>([]);
  391. const sceneTitle = ref<any>('');
  392. const sceneList = ref<any>([]);
  393. const expertTitle = ref<any>('');
  394. const expertList = ref<any>([]);
  395. const procureTitle = ref<any>('');
  396. const procureList = ref<any>([]);
  397. const projectTitle = ref<any>('');
  398. const projectList = ref<any>([]);
  399. const bigbrandTitle = ref<any>('');
  400. const bigbrandList = ref<any>([]);
  401. const bigbrandOne = ref<any>({});
  402. const countData = ref<any>({});
  403. const homeList = ref<any>([]);
  404. const router = useRouter();
  405. getIndexDiyPcPage({ type: 1 }).then((res) => {
  406. if (res.code == 200) {
  407. }
  408. });
  409. onMounted(() => {
  410. const token = Cookies.get('Authorization');
  411. if (token) {
  412. getInfo().then((res) => {
  413. if (res.code == 200) {
  414. userInfo.value = res.data.user;
  415. countOrder({}).then((res1) => {
  416. if (res1.code == 200) {
  417. countData.value = res1.data || {};
  418. }
  419. });
  420. }
  421. });
  422. }
  423. });
  424. //移入分类
  425. const enterClassify = (res: any) => {
  426. classifyShow.value = true;
  427. classifyId.value = res.id;
  428. classifyInfo.value = res.children;
  429. };
  430. //移出分类
  431. const leaveClassify = () => {
  432. classifyShow.value = false;
  433. };
  434. //头部分类
  435. import { categoryStore } from '@/store/modules/category';
  436. const categoryStoreStore = categoryStore();
  437. onMounted(async () => {
  438. try {
  439. // 根据当前路由路径获取分类数据
  440. classifyList.value = await categoryStoreStore.fetchCategories('/index');
  441. } catch (error) {
  442. console.error('获取分类失败:', error);
  443. }
  444. });
  445. //头部轮播
  446. getHomeAdList({}).then((res) => {
  447. if (res.code == 200) {
  448. carouselList.value = res.data;
  449. }
  450. });
  451. //头部优易资讯
  452. getYouYiZiXunPage({}).then((res) => {
  453. if (res.code == 200) {
  454. realList.value = res.data;
  455. }
  456. });
  457. //头部会员权益
  458. getEnterpriseMemberEquityList({}).then((res) => {
  459. if (res.code == 200) {
  460. interestsList.value = res.data;
  461. }
  462. });
  463. //首页三联广告(平台装修-楼层广告-首页三联广告)
  464. getHomeThreeAdList({}).then((res) => {
  465. if (res.code == 200) {
  466. AdList.value = res.data;
  467. }
  468. });
  469. //热门方案标题
  470. getHotSchemeTitle({}).then((res) => {
  471. if (res.code == 200) {
  472. hotTitle.value = res.data;
  473. }
  474. });
  475. //热门方案列表
  476. getHotSchemeList({}).then((res) => {
  477. if (res.code == 200) {
  478. hotList.value = res.data;
  479. }
  480. });
  481. //场景采购标题
  482. getScenePurchaseTitle({}).then((res) => {
  483. if (res.code == 200) {
  484. sceneTitle.value = res.data;
  485. }
  486. });
  487. //场景采购列表
  488. getScenePurchaseList({}).then((res) => {
  489. if (res.code == 200) {
  490. sceneList.value = res.data;
  491. }
  492. });
  493. //大牌推荐标题(平台闪购标题)
  494. getPlatformFlashSaleTitle({}).then((res) => {
  495. if (res.code == 200) {
  496. bigbrandTitle.value = res.data;
  497. }
  498. });
  499. //大牌推荐列表(平台闪购列表)
  500. getPlatformFlashSaleList({}).then((res) => {
  501. if (res.code == 200) {
  502. if (res.data.length > 0) {
  503. bigbrandOne.value = res.data[0];
  504. // bigbrandList.value = res.data.slice(1);
  505. }
  506. }
  507. });
  508. //大牌推荐列表(平台闪购列表)-右
  509. getPlatformFlashSaleBrand({}).then((res) => {
  510. if (res.code == 200) {
  511. if (res.data.length > 0) {
  512. bigbrandList.value = res.data;
  513. }
  514. }
  515. });
  516. //行家精选标题
  517. getExpertSelectionTitle({}).then((res) => {
  518. if (res.code == 200) {
  519. expertTitle.value = res.data;
  520. }
  521. });
  522. //行家精选列表
  523. getExpertSelectionList({}).then((res) => {
  524. if (res.code == 200) {
  525. expertList.value = res.data;
  526. }
  527. });
  528. //采购指南标题
  529. getPurchaseGuideTitle({}).then((res) => {
  530. if (res.code == 200) {
  531. procureTitle.value = res.data;
  532. }
  533. });
  534. //采购指南列表
  535. getProcurementTopicsList({}).then((res) => {
  536. if (res.code == 200) {
  537. procureList.value = res.data;
  538. console.log(res.data);
  539. }
  540. });
  541. //项目案例标题(平台装修-项目案例)
  542. getProjectCaseTitle({}).then((res) => {
  543. if (res.code == 200) {
  544. projectTitle.value = res.data;
  545. }
  546. });
  547. //项目案例列表(平台装修-项目案例)
  548. getProjectCaseList({}).then((res) => {
  549. if (res.code == 200) {
  550. projectList.value = res.data;
  551. }
  552. });
  553. //外面循环
  554. getClassificationFloorList({}).then(async (res) => {
  555. if (res.code == 200) {
  556. for (const item of res.data) {
  557. try {
  558. const datas1 = await getClassificationFloorDetail(item.floorNo);
  559. if (datas1.code == 200) {
  560. if (datas1.data.length > 0) {
  561. item.imgOne = datas1.data[0];
  562. if (datas1.data.length > 1) {
  563. item.home1List = datas1.data.slice(1, 4);
  564. }
  565. if (datas1.data.length > 4) {
  566. item.home2List = datas1.data.slice(4, 6);
  567. }
  568. if (datas1.data.length > 6) {
  569. item.infoTwo = datas1.data[6];
  570. }
  571. }
  572. }
  573. const datas2 = await getClassificationFloorLabel(item.floorNo);
  574. if (datas2.code == 200) {
  575. item.navList = datas2.data;
  576. }
  577. const datas3 = await getClassificationFloorDetail2(item.floorNo);
  578. if (datas2.code == 200) {
  579. item.shopList = datas3.data;
  580. }
  581. } catch (error) {}
  582. }
  583. homeList.value = res.data;
  584. console.log(homeList.value);
  585. }
  586. });
  587. const onInfo = (res: any) => {
  588. router.push('/shop/info?id=' + res.id);
  589. };
  590. import { useUserStore } from '@/store/modules/user';
  591. const onlogout = () => {
  592. useUserStore()
  593. .logout()
  594. .then(() => {
  595. onPath('/login');
  596. });
  597. };
  598. </script>
  599. <style lang="scss" scoped>
  600. .home-pages {
  601. width: 1200px;
  602. margin: 0 auto;
  603. // 头部
  604. .home-head {
  605. width: 1200px;
  606. position: relative;
  607. display: flex;
  608. gap: 0px 10px;
  609. margin-top: 10px;
  610. .classify {
  611. width: 234px;
  612. height: 540px;
  613. background: #ffffff;
  614. &.classify-show {
  615. position: absolute;
  616. z-index: 10;
  617. height: auto;
  618. min-height: 540px;
  619. }
  620. .classify-list {
  621. width: 100%;
  622. height: 40px;
  623. cursor: pointer;
  624. display: flex;
  625. align-items: center;
  626. padding-left: 15px;
  627. position: relative;
  628. &.classify-hig {
  629. border: 1px solid var(--el-color-primary);
  630. border-right: 0px solid var(--el-color-primary);
  631. }
  632. .label {
  633. max-width: 100px;
  634. font-weight: 600;
  635. font-size: 14px;
  636. color: #101828;
  637. white-space: nowrap;
  638. margin-right: 10px;
  639. &:hover {
  640. color: var(--el-color-primary);
  641. }
  642. }
  643. .info {
  644. max-width: 50px;
  645. font-size: 12px;
  646. color: #364153;
  647. white-space: nowrap;
  648. &.info1 {
  649. margin-right: 6px;
  650. }
  651. &:hover {
  652. color: var(--el-color-primary);
  653. }
  654. }
  655. .classify-border {
  656. position: absolute;
  657. right: -1px;
  658. top: 0px;
  659. width: 1px;
  660. height: 38px;
  661. background-color: #ffffff;
  662. z-index: 2;
  663. }
  664. }
  665. }
  666. .classify-bos {
  667. position: absolute;
  668. top: 0;
  669. right: 0;
  670. width: 966px;
  671. height: 100%;
  672. border: 1px solid var(--el-color-primary);
  673. background-color: #ffffff;
  674. overflow-y: auto;
  675. padding-left: 30px;
  676. z-index: 10;
  677. .classify-item {
  678. display: flex;
  679. padding-top: 10px;
  680. border-bottom: 1px solid #e5e7eb;
  681. .two-level {
  682. width: 90px;
  683. font-size: 14px;
  684. color: var(--el-color-primary);
  685. cursor: pointer;
  686. }
  687. .classify-icon {
  688. margin: 4px 15px 0 15px;
  689. }
  690. .classify-label {
  691. display: flex;
  692. flex-wrap: wrap;
  693. flex: 1;
  694. font-size: 14px;
  695. color: #364153;
  696. div {
  697. margin-right: 20px;
  698. margin-bottom: 10px;
  699. cursor: pointer;
  700. &:hover {
  701. color: var(--el-color-primary);
  702. }
  703. }
  704. }
  705. }
  706. }
  707. // 头部中间
  708. .head-bos {
  709. flex: 1;
  710. .carousel {
  711. width: 100%;
  712. height: 407px;
  713. background: #ffffff;
  714. img {
  715. width: 100%;
  716. height: 407px;
  717. }
  718. }
  719. .head-box {
  720. width: 100%;
  721. height: 122px;
  722. margin-top: 10px;
  723. display: flex;
  724. gap: 0 10px;
  725. .head-item {
  726. flex: 1;
  727. background-color: #ffffff;
  728. height: 122px;
  729. display: flex;
  730. // padding-left: 20px;
  731. align-items: center;
  732. cursor: pointer;
  733. border-radius: 5px;
  734. overflow: hidden;
  735. img {
  736. width: 100%;
  737. height: 100%;
  738. // width: 84px;
  739. // height: 84px;
  740. // margin-right: 10px;
  741. // border-radius: 10px;
  742. }
  743. .head-title {
  744. .head1 {
  745. font-weight: 550;
  746. font-size: 22px;
  747. color: #101828;
  748. }
  749. .head2 {
  750. width: 76px;
  751. height: 21px;
  752. border-radius: 34px;
  753. border: 1px solid #000000;
  754. font-size: 12px;
  755. color: #000000;
  756. margin-top: 6px;
  757. }
  758. }
  759. }
  760. }
  761. }
  762. //右边
  763. .head-right {
  764. width: 230px;
  765. height: 540px;
  766. background: #ffffff;
  767. display: flex;
  768. flex-direction: column;
  769. .login-bos {
  770. width: calc(100% - 20px);
  771. height: 110px;
  772. border-bottom: 1px solid #e5e7eb;
  773. margin: 0 10px;
  774. display: flex;
  775. flex-direction: column;
  776. justify-content: space-between;
  777. padding: 16px 0;
  778. .login-box {
  779. display: flex;
  780. align-items: center;
  781. img {
  782. width: 40px;
  783. height: 40px;
  784. margin-right: 8px;
  785. border-radius: 40px;
  786. }
  787. .login1 {
  788. font-size: 13px;
  789. color: #444444;
  790. }
  791. .login2 {
  792. margin-top: 2px;
  793. font-size: 12px;
  794. color: #6a7282;
  795. }
  796. }
  797. .loginBtn-bos {
  798. width: 100%;
  799. .login-bnt1 {
  800. width: 64px;
  801. height: 24px;
  802. background-color: #e7000b;
  803. color: #ffffff;
  804. border-radius: 24px;
  805. font-size: 12px;
  806. cursor: pointer;
  807. }
  808. .login-bnt2 {
  809. width: 64px;
  810. height: 24px;
  811. border: 1px solid #e7000b;
  812. color: #e7000b;
  813. border-radius: 24px;
  814. font-size: 12px;
  815. margin-left: 10px;
  816. cursor: pointer;
  817. }
  818. }
  819. }
  820. // .login-bos {
  821. // width: calc(100% - 20px);
  822. // height: 110px;
  823. // border-bottom: 1px solid #e5e7eb;
  824. // margin: 0 10px;
  825. // display: flex;
  826. // flex-direction: column;
  827. // justify-content: space-between;
  828. // padding: 16px 0;
  829. // .login-box {
  830. // display: flex;
  831. // align-items: center;
  832. // img {
  833. // width: 40px;
  834. // height: 40px;
  835. // margin-right: 8px;
  836. // border-radius: 40px;
  837. // }
  838. // .login-btn {
  839. // width: 100%;
  840. // }
  841. // .login1 {
  842. // font-size: 13px;
  843. // color: #444444;
  844. // }
  845. // .login2 {
  846. // margin-top: 2px;
  847. // font-size: 12px;
  848. // color: #6a7282;
  849. // }
  850. // }
  851. // }
  852. .order-bos {
  853. width: calc(100% - 20px);
  854. height: 110px;
  855. font-size: 14px;
  856. padding: 16px 0;
  857. border-bottom: 1px solid #e5e7eb;
  858. margin: 0 10px;
  859. img {
  860. width: 28px;
  861. height: 28px;
  862. }
  863. .order-num {
  864. color: #e7000b;
  865. font-size: 14px;
  866. margin-top: 2px;
  867. }
  868. }
  869. .real-time {
  870. width: calc(100% - 20px);
  871. height: 227px;
  872. border-bottom: 1px solid #e5e7eb;
  873. margin: 0 10px;
  874. padding-top: 15px;
  875. .real-title {
  876. position: relative;
  877. margin-bottom: 12px;
  878. &::after {
  879. content: '';
  880. top: 3px;
  881. left: 0;
  882. position: absolute;
  883. width: 4px;
  884. height: 14px;
  885. background: var(--el-color-primary);
  886. }
  887. .real1 {
  888. font-weight: 600;
  889. font-size: 14px;
  890. color: #1d2129;
  891. padding-left: 15px;
  892. }
  893. .real2 {
  894. font-size: 13px;
  895. color: #83899f;
  896. cursor: pointer;
  897. }
  898. }
  899. .real-list {
  900. width: 100%;
  901. font-size: 12px;
  902. color: #1d2129;
  903. margin-bottom: 12px;
  904. cursor: pointer;
  905. &:hover {
  906. color: var(--el-color-primary);
  907. }
  908. }
  909. }
  910. .interests {
  911. flex: 1;
  912. width: calc(100% - 20px);
  913. margin: 0 10px;
  914. padding-top: 15px;
  915. .interests-title {
  916. position: relative;
  917. font-weight: 600;
  918. font-size: 14px;
  919. color: #1d2129;
  920. padding-left: 15px;
  921. &::after {
  922. content: '';
  923. top: 3px;
  924. left: 0;
  925. position: absolute;
  926. width: 4px;
  927. height: 14px;
  928. background: var(--el-color-primary);
  929. }
  930. }
  931. .interests-bos {
  932. display: flex;
  933. flex-wrap: wrap;
  934. .interests-item {
  935. width: 33.333%;
  936. font-size: 12px;
  937. color: #101828;
  938. margin-top: 15px;
  939. cursor: pointer;
  940. &:hover {
  941. color: var(--el-color-primary);
  942. }
  943. img {
  944. width: 34px;
  945. height: 34px;
  946. margin-bottom: 7px;
  947. }
  948. }
  949. }
  950. }
  951. }
  952. }
  953. //标题
  954. .home-title {
  955. width: 1200px;
  956. height: 56px;
  957. background: #ffffff;
  958. margin-top: 15px;
  959. padding: 0 20px;
  960. .title1 {
  961. font-weight: 600;
  962. font-size: 20px;
  963. color: #101828;
  964. }
  965. .title2 {
  966. font-size: 14px;
  967. color: #364153;
  968. margin-left: 10px;
  969. }
  970. .title-more {
  971. font-size: 14px;
  972. color: #364153;
  973. cursor: pointer;
  974. &:hover {
  975. color: var(--el-color-primary);
  976. }
  977. }
  978. }
  979. //热门方案
  980. .hot-bos {
  981. height: 176px;
  982. width: 1200px;
  983. display: flex;
  984. gap: 0 18px;
  985. margin-top: 12px;
  986. .hot-list {
  987. flex: 1;
  988. height: 176px;
  989. background: #ffffff;
  990. border-radius: 10px 10px 10px 10px;
  991. cursor: pointer;
  992. .hot1 {
  993. font-weight: 600;
  994. font-size: 16px;
  995. color: #101828;
  996. }
  997. .hot2 {
  998. font-size: 14px;
  999. color: #364153;
  1000. margin: 2px 0 14px 0;
  1001. }
  1002. img {
  1003. width: 80px;
  1004. height: 80px;
  1005. }
  1006. }
  1007. }
  1008. // 场景采购
  1009. .scene-bos {
  1010. height: 304px;
  1011. width: 1200px;
  1012. display: flex;
  1013. gap: 0 18px;
  1014. margin-top: 12px;
  1015. .scene-list {
  1016. flex: 1;
  1017. height: 304px;
  1018. background: #ffffff;
  1019. position: relative;
  1020. cursor: pointer;
  1021. .scene-box {
  1022. padding-top: 35px;
  1023. position: absolute;
  1024. z-index: 2;
  1025. width: 100%;
  1026. .scene1 {
  1027. font-weight: 600;
  1028. font-size: 30px;
  1029. color: #ffffff;
  1030. text-align: center;
  1031. width: 100%;
  1032. }
  1033. .scene2 {
  1034. font-size: 17px;
  1035. color: #ffffff;
  1036. text-align: center;
  1037. width: 100%;
  1038. margin-top: 4px;
  1039. }
  1040. }
  1041. img {
  1042. position: absolute;
  1043. width: 100%;
  1044. height: 100%;
  1045. top: 0;
  1046. left: 0;
  1047. background-color: #f4f4f4;
  1048. }
  1049. }
  1050. }
  1051. // 大牌推荐
  1052. .big-brand {
  1053. height: 334px;
  1054. width: 1200px;
  1055. margin-top: 12px;
  1056. display: flex;
  1057. .bigBrand-one {
  1058. width: 233px;
  1059. height: 334px;
  1060. margin-right: 10px;
  1061. }
  1062. .bigBrand-bos {
  1063. flex: 1;
  1064. width: 0;
  1065. display: flex;
  1066. flex-wrap: wrap;
  1067. gap: 10px;
  1068. .bigBrand-list {
  1069. width: 183.4px;
  1070. height: 162px;
  1071. background: #ffffff;
  1072. display: flex;
  1073. flex-direction: column;
  1074. align-items: center;
  1075. padding: 32px 20px 0 20px;
  1076. img {
  1077. width: 120px;
  1078. height: 50px;
  1079. }
  1080. .bigBrand1 {
  1081. font-weight: 600;
  1082. font-size: 14px;
  1083. color: #101828;
  1084. margin: 10px 0 4px 0;
  1085. }
  1086. .bigBrand2 {
  1087. font-weight: 400;
  1088. font-size: 12px;
  1089. color: #364153;
  1090. display: -webkit-box;
  1091. -webkit-line-clamp: 2;
  1092. line-clamp: 2;
  1093. /* 添加标准属性 */
  1094. -webkit-box-orient: vertical;
  1095. overflow: hidden;
  1096. text-overflow: ellipsis;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. // 行家精选
  1102. .expert-bos {
  1103. width: 1200px;
  1104. display: flex;
  1105. margin-top: 12px;
  1106. .expert-list {
  1107. width: 230px;
  1108. height: 306px;
  1109. background: #ffffff;
  1110. margin-left: 12.5px;
  1111. padding: 20px;
  1112. cursor: pointer;
  1113. &:first-child {
  1114. margin-left: 0;
  1115. }
  1116. img {
  1117. width: 100%;
  1118. height: 190px;
  1119. }
  1120. .itemName {
  1121. font-weight: 400;
  1122. font-size: 14px;
  1123. color: #101828;
  1124. margin: 27px 0 2px 0;
  1125. }
  1126. .price {
  1127. .memberPrice {
  1128. color: var(--el-color-primary);
  1129. font-size: 16px;
  1130. color: #e7000b;
  1131. }
  1132. .marketPrice {
  1133. font-size: 12px;
  1134. color: #99a1af;
  1135. line-height: 20px;
  1136. text-decoration-line: line-through;
  1137. text-transform: none;
  1138. margin-left: 6px;
  1139. }
  1140. }
  1141. }
  1142. }
  1143. // 采购指南
  1144. .procure-bos {
  1145. display: flex;
  1146. width: 1200px;
  1147. margin-top: 12px;
  1148. gap: 0 15px;
  1149. .procure-list {
  1150. width: 390px;
  1151. height: 268px;
  1152. background: #ffffff;
  1153. cursor: pointer;
  1154. img {
  1155. width: 390px;
  1156. height: 200px;
  1157. }
  1158. .procure1 {
  1159. padding: 12px 0 4px 20px;
  1160. font-weight: 600;
  1161. font-size: 14px;
  1162. color: #101828;
  1163. }
  1164. .procure2 {
  1165. padding-left: 20px;
  1166. font-size: 12px;
  1167. color: #364153;
  1168. }
  1169. }
  1170. }
  1171. //循环-商品
  1172. .goods-bos {
  1173. height: 340px;
  1174. width: 1200px;
  1175. margin-top: 14px;
  1176. display: flex;
  1177. .goods-img {
  1178. width: 230px;
  1179. height: 340px;
  1180. cursor: pointer;
  1181. }
  1182. .home1-bos {
  1183. width: 476px;
  1184. height: 340px;
  1185. background: #ffffff;
  1186. margin-left: 10px;
  1187. padding: 18px 20px 0 20px;
  1188. display: flex;
  1189. flex-direction: column;
  1190. .floorName {
  1191. font-weight: 600;
  1192. font-size: 16px;
  1193. color: #101828;
  1194. }
  1195. .home1-list {
  1196. flex: 1;
  1197. display: flex;
  1198. border-bottom: 1px solid #e5e7eb;
  1199. align-items: center;
  1200. cursor: pointer;
  1201. .advertiseName {
  1202. font-weight: 600;
  1203. font-size: 14px;
  1204. color: #101828;
  1205. }
  1206. .advertiseDescribe {
  1207. font-weight: 400;
  1208. font-size: 12px;
  1209. color: #364153;
  1210. margin-top: 4px;
  1211. }
  1212. img {
  1213. width: 72px;
  1214. height: 72px;
  1215. margin-right: 10px;
  1216. }
  1217. &:last-child {
  1218. border-bottom: none;
  1219. }
  1220. }
  1221. }
  1222. .home2-bos {
  1223. width: 474px;
  1224. margin-left: 10px;
  1225. height: 340px;
  1226. background: #ffffff;
  1227. padding: 18px 20px 0 20px;
  1228. display: flex;
  1229. justify-content: space-between;
  1230. .floorName {
  1231. font-weight: 600;
  1232. font-size: 16px;
  1233. color: #101828;
  1234. }
  1235. .home2-box {
  1236. width: 249px;
  1237. .home2-list {
  1238. width: 249px;
  1239. height: 130px;
  1240. border: 1px solid #e5e7eb;
  1241. margin-top: 13px;
  1242. display: flex;
  1243. align-items: center;
  1244. padding: 0 10px;
  1245. cursor: pointer;
  1246. .advertiseName {
  1247. font-weight: 600;
  1248. font-size: 14px;
  1249. color: #101828;
  1250. }
  1251. .advertiseDescribe {
  1252. font-size: 12px;
  1253. color: #364153;
  1254. margin: 4px 0 10px 0;
  1255. }
  1256. .bnt {
  1257. width: 68px;
  1258. height: 24px;
  1259. }
  1260. img {
  1261. width: 72px;
  1262. height: 72px;
  1263. margin-left: 10px;
  1264. }
  1265. }
  1266. }
  1267. .home2-two {
  1268. width: 177px;
  1269. height: 273px;
  1270. border-radius: 0px 0px 0px 0px;
  1271. border: 1px solid #e5e7eb;
  1272. margin-top: 34px;
  1273. padding: 26px 10px;
  1274. cursor: pointer;
  1275. .advertiseName {
  1276. font-weight: 600;
  1277. font-size: 14px;
  1278. color: #101828;
  1279. }
  1280. .advertiseDescribe {
  1281. font-size: 12px;
  1282. color: #364153;
  1283. margin: 4px 0 30px 0;
  1284. display: -webkit-box;
  1285. -webkit-line-clamp: 2;
  1286. line-clamp: 2;
  1287. /* 添加标准属性 */
  1288. -webkit-box-orient: vertical;
  1289. overflow: hidden;
  1290. text-overflow: ellipsis;
  1291. }
  1292. img {
  1293. width: 123px;
  1294. height: 122px;
  1295. margin: 0 17px;
  1296. }
  1297. }
  1298. }
  1299. }
  1300. .shop-bos {
  1301. display: flex;
  1302. margin-top: 14px;
  1303. .shop-nav {
  1304. width: 230px;
  1305. height: 306px;
  1306. background: #ffffff;
  1307. padding: 16px;
  1308. .nav-title {
  1309. font-weight: 600;
  1310. font-size: 16px;
  1311. color: #101828;
  1312. margin-bottom: 10px;
  1313. }
  1314. .nav-bos {
  1315. width: 100%;
  1316. display: flex;
  1317. flex-wrap: wrap;
  1318. justify-content: space-between;
  1319. .nav-list {
  1320. width: 94px;
  1321. height: 32px;
  1322. background: #f4f4f4;
  1323. border-radius: 4px 4px 4px 4px;
  1324. font-size: 14px;
  1325. color: #101828;
  1326. margin-bottom: 10px;
  1327. cursor: pointer;
  1328. &:hover {
  1329. color: var(--el-color-primary);
  1330. }
  1331. &.hig {
  1332. background: var(--el-color-primary);
  1333. color: #ffffff;
  1334. }
  1335. }
  1336. }
  1337. }
  1338. .shop-list {
  1339. width: 230px;
  1340. height: 306px;
  1341. background: #ffffff;
  1342. margin-left: 12.5px;
  1343. padding: 20px;
  1344. cursor: pointer;
  1345. img {
  1346. width: 100%;
  1347. height: 190px;
  1348. }
  1349. .itemName {
  1350. font-weight: 400;
  1351. font-size: 14px;
  1352. color: #101828;
  1353. margin: 27px 0 2px 0;
  1354. }
  1355. .price {
  1356. .memberPrice {
  1357. color: var(--el-color-primary);
  1358. font-size: 16px;
  1359. color: #e7000b;
  1360. }
  1361. .marketPrice {
  1362. font-size: 12px;
  1363. color: #99a1af;
  1364. line-height: 20px;
  1365. text-decoration-line: line-through;
  1366. text-transform: none;
  1367. margin-left: 6px;
  1368. }
  1369. }
  1370. }
  1371. }
  1372. //项目案例
  1373. .project-bos {
  1374. display: flex;
  1375. width: 1200px;
  1376. margin-top: 12px;
  1377. gap: 0 15px;
  1378. .project-list {
  1379. width: 390px;
  1380. height: 350px;
  1381. cursor: pointer;
  1382. border-radius: 10px;
  1383. overflow: hidden;
  1384. .project-box {
  1385. width: 390px;
  1386. height: 156px;
  1387. background: #ffffff;
  1388. border-radius: 10px;
  1389. margin-top: -20px;
  1390. z-index: 2;
  1391. position: absolute;
  1392. padding: 20px;
  1393. }
  1394. img {
  1395. width: 390px;
  1396. height: 180px;
  1397. }
  1398. .project1 {
  1399. font-weight: 600;
  1400. font-size: 16px;
  1401. color: #101828;
  1402. margin-bottom: 14px;
  1403. }
  1404. .project2 {
  1405. font-size: 14px;
  1406. color: #364153;
  1407. display: -webkit-box;
  1408. -webkit-line-clamp: 2;
  1409. line-clamp: 2;
  1410. /* 添加标准属性 */
  1411. -webkit-box-orient: vertical;
  1412. overflow: hidden;
  1413. text-overflow: ellipsis;
  1414. }
  1415. .project-more {
  1416. text-align: right;
  1417. font-size: 14px;
  1418. color: var(--el-color-primary);
  1419. margin-top: 18px;
  1420. }
  1421. }
  1422. }
  1423. }
  1424. </style>