SldDiy.vue 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823
  1. <template>
  2. <div class="sld_diy">
  3. <div v-for="(item, index) in decorateData.data" v-bind:key="index">
  4. <el-carousel
  5. v-if="item.json_data && item.json_data.type == 'main_banner'"
  6. height="520px"
  7. arrow="never"
  8. >
  9. <el-carousel-item
  10. v-for="(item_banner, index_banner) in item.json_data.data"
  11. :key="index_banner"
  12. >
  13. <a href="javascript:void(0)" @click="diyNavTo(item_banner)">
  14. <img v-bind:src="item_banner.imgUrl" />
  15. </a>
  16. </el-carousel-item>
  17. </el-carousel>
  18. <div class="home-slider" v-if="item.json_data && item.json_data.type == 'main_banner_pc'">
  19. <div class="s2">
  20. <el-carousel
  21. v-if="item.json_data && item.json_data.type == 'main_banner_pc'"
  22. height="100%"
  23. arrow="never"
  24. >
  25. <el-carousel-item
  26. v-for="(item_banner, index_banner) in item.json_data.data"
  27. :key="index_banner"
  28. >
  29. <a href="javascript:void(0)" @click="diyNavTo(item_banner)">
  30. <img v-bind:src="item_banner.imgUrl" />
  31. <!-- <div :style="`background-image:url(${item_banner.imgUrl})`"></div> -->
  32. </a>
  33. </el-carousel-item>
  34. </el-carousel>
  35. <div class="home-slider-bottom"></div>
  36. </div>
  37. </div>
  38. <!-- adv_01 start-->
  39. <div
  40. class="adv_01_wrap"
  41. v-if="item.json_data && item.json_data.type == 'adv_01'"
  42. :class="{
  43. adv_01_wrap_full: item.json_data.full_screen && item.json_data.full_screen == 1,
  44. }"
  45. :style="{
  46. height: item.json_data.data.height + 'px',
  47. marginTop: item.json_data.padding_top + 'px',
  48. marginBottom: item.json_data.padding_bottom + 'px',
  49. backgroundColor: item.json_data.bg_color,
  50. }"
  51. >
  52. <a href="javascript:void(0)" @click="diyNavTo(item.json_data.data)">
  53. <img class="adv_01_img" v-bind:src="item.json_data.data.imgUrl" />
  54. </a>
  55. </div>
  56. <!-- adv_01 end-->
  57. <!-- adv_02 start-->
  58. <div
  59. class="adv_02_part"
  60. v-if="item.json_data && item.json_data.type == 'adv_02'"
  61. :style="{
  62. height:
  63. (item.json_data.padding_top ? item.json_data.padding_top : 0) +
  64. (item.json_data.padding_bottom ? item.json_data.padding_bottom : 0) +
  65. 344 +
  66. 'px',
  67. marginTop: item.json_data.padding_top + 'px',
  68. marginBottom: item.json_data.padding_bottom + 'px',
  69. backgroundColor: item.json_data.bg_color,
  70. }"
  71. >
  72. <div class="adv_02_left" @click="diyNavTo(item.json_data.left.data)">
  73. <a
  74. href="javascript:void(0)"
  75. v-if="item.json_data.left.data.imgUrl != undefined"
  76. >
  77. <img v-bind:src="item.json_data.left.data.imgUrl" />
  78. </a>
  79. </div>
  80. <div class="adv_02_center">
  81. <span class="split_h"></span>
  82. <div
  83. class="goods_item clearfix"
  84. v-for="(item_center, index_center) in item.json_data.center.data.goods_data"
  85. v-bind:key="index_center"
  86. @click="goGoodsDetail(item_center)"
  87. >
  88. <a target="_blank" href="javascript:void(0)">
  89. <div class="left">
  90. <img v-bind:src="item_center.mainImage" />
  91. </div>
  92. <div class="right">
  93. <p class="goods_name">{{ item_center.goodsName }}</p>
  94. <!-- <p class="buy_num">-->
  95. <!-- {{ item_center.actualSales * 1 + item_center.virtualSales * 1-->
  96. <!-- }}{{ L["人购买"] }}-->
  97. <!-- </p>-->
  98. <!-- <div class="price">-->
  99. <!-- <span class="unit">&yen;</span>-->
  100. <!-- <span class="integer">{{ item_center.goodsPrice }}</span>-->
  101. <!-- </div>-->
  102. <!-- <a class="buy" href="javascript:void(0)">{{ L["立即抢购"] }}</a>-->
  103. </div>
  104. </a>
  105. </div>
  106. <span class="split_v"></span>
  107. </div>
  108. <div class="adv_02_right">
  109. <span
  110. class="right_img_item"
  111. v-for="(item_right, index_right) in item.json_data.right.data"
  112. v-bind:key="index_right"
  113. @click="diyNavTo(item_right)"
  114. >
  115. <a href="javascript:void(0)" v-if="item_right.imgUrl">
  116. <img v-bind:src="item_right.imgUrl" />
  117. </a>
  118. </span>
  119. </div>
  120. </div>
  121. <!-- adv_02 end-->
  122. <!-- adv_04 start-->
  123. <div
  124. class="w_sld_react_1210 adv_04_wrap"
  125. v-if="item.json_data && item.json_data.type == 'adv_04'"
  126. :style="{
  127. marginTop: item.json_data.padding_top + 'px',
  128. marginBottom: item.json_data.padding_bottom + 'px',
  129. backgroundColor: item.json_data.bg_color,
  130. }"
  131. >
  132. <div class="floor_title">
  133. <h2>
  134. <!-- <font
  135. v-bind:style="{ backgroundColor: item.json_data.title_info.title_color }"
  136. >&nbsp;</font
  137. > -->
  138. <span v-bind:style="{ color: item.json_data.title_info.title_color, fontWeight: 'bold' }">{{
  139. item.json_data.title_info.title_name
  140. }}</span>
  141. <!-- <font
  142. v-bind:style="{ backgroundColor: item.json_data.title_info.title_color }"
  143. >&nbsp;</font
  144. > -->
  145. </h2>
  146. </div>
  147. <div class="floor_goods">
  148. <div
  149. class="item"
  150. v-for="(item_main, index_main) in item.json_data.data.goods_data"
  151. v-bind:key="index_main"
  152. >
  153. <div class="wrap">
  154. <router-link
  155. class="wrap-img"
  156. target="_blank"
  157. :to="'/goods/detail/'+ calcProductName(item_main.goodsName) +'_'+ item_main.productId"
  158. >
  159. <div class="wrap-img-wrap">
  160. <img v-bind:src="item_main.mainImage" />
  161. </div>
  162. <p class="title">
  163. <a href="javascript:void(0)" title>{{ item_main.goodsName }}</a>
  164. </p>
  165. <!-- <p class="price" v-if="item_main.goodsMoney">
  166. <span>
  167. <span class="money_number">{{ item_main.goodsMoney || '面议' }}</span>
  168. </span>
  169. </p> -->
  170. </router-link>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. <!-- adv_04 end-->
  176. <!-- adv_05 start-->
  177. <div
  178. class="w_sld_react_1210 adv_05_wrap"
  179. v-if="item.json_data && item.json_data.type == 'adv_05'"
  180. :style="{
  181. marginTop: item.json_data.padding_top + 'px',
  182. marginBottom: item.json_data.padding_bottom + 'px',
  183. backgroundColor: item.json_data.bg_color,
  184. }"
  185. >
  186. <div class="floor">
  187. <div class="floor_layout">
  188. <div>
  189. <div class="floor_title">
  190. <h2>
  191. <span class="main_title">{{
  192. item.json_data.title_info.title.initialValue
  193. }}</span>
  194. <span class="sub_title">{{
  195. item.json_data.title_info &&
  196. item.json_data.title_info.sub_title.initialValue
  197. }}</span>
  198. </h2>
  199. <div class="right_action" v-if="item.json_data.title_info.link_type">
  200. <a @click="diyNavTo(item.json_data.title_info)">
  201. {{ L["查看更多"] }}
  202. <i>&gt;&gt;</i>
  203. </a>
  204. </div>
  205. </div>
  206. <div class="floor_content">
  207. <div class="floor_left">
  208. <div class="floor_bg_img">
  209. <a
  210. class="ad_img example_text"
  211. href="javascript:void(0)"
  212. @click="diyNavTo(item.json_data.left.data)"
  213. >
  214. <img v-bind:src="item.json_data.left.data.imgUrl" />
  215. </a>
  216. </div>
  217. <div class="floor_words">
  218. <div class="floor_words_top_title">
  219. <font></font>
  220. <span>{{
  221. item.json_data.left.cat_data.title_info.title_name
  222. }}</span>
  223. <font></font>
  224. </div>
  225. <ul>
  226. <li
  227. v-for="(item_left_cat, index_left_cat) in item.json_data.left
  228. .cat_data.cat_datas"
  229. v-bind:key="index_left_cat"
  230. >
  231. <a
  232. href="javascript:void(0)"
  233. :title="item_left_cat.categoryName"
  234. @click="goGoodsListByCatId(item_left_cat)"
  235. >{{ item_left_cat.categoryName }}</a
  236. >
  237. </li>
  238. </ul>
  239. </div>
  240. </div>
  241. <div class="floor_right" style="border-color: rgb(252, 88, 99)">
  242. <div class="floor_right_main">
  243. <div class="floor_content">
  244. <div
  245. class="big_item item"
  246. v-if="item.json_data.center.data.goods_data.length"
  247. >
  248. <div
  249. class="wrap"
  250. @click="goGoodsDetail(item.json_data.center.data.goods_data[0])"
  251. >
  252. <div class="left_pic">
  253. <a href="javascript:void(0)" class="ad_img example_text">
  254. <img
  255. v-bind:src="
  256. item.json_data.center.data.goods_data[0].mainImage
  257. "
  258. alt="item.json_data.center.data.goods_data[0].goodsName"
  259. />
  260. </a>
  261. </div>
  262. <div class="right_info">
  263. <p class="title">
  264. <a
  265. href="javascript:void(0)"
  266. :title="
  267. item.json_data.center.data.goods_data[0].goodsName
  268. "
  269. >{{
  270. item.json_data.center.data.goods_data[0].goodsName
  271. }}</a
  272. >
  273. </p>
  274. <!-- <p class="price">-->
  275. <!-- <span class="money_number">{{-->
  276. <!-- item.json_data.center.data.goods_data[0].goodsMoney || '面议'-->
  277. <!-- }}</span>-->
  278. <!-- </p>-->
  279. </div>
  280. </div>
  281. </div>
  282. <div
  283. class="item"
  284. v-if="item.json_data.center.data.goods_data.length > 1"
  285. >
  286. <div
  287. class="wrap"
  288. @click="goGoodsDetail(item.json_data.center.data.goods_data[1])"
  289. >
  290. <a class="ad_img" href="javascript:void(0)">
  291. <img
  292. v-bind:src="
  293. item.json_data.center.data.goods_data[1].mainImage
  294. "
  295. alt="item.json_data.center.data.goods_data[1].goodsName"
  296. />
  297. </a>
  298. <p class="title">
  299. <a
  300. href="javascript:void(0)"
  301. :title="item.json_data.center.data.goods_data[1].goodsName"
  302. >{{ item.json_data.center.data.goods_data[1].goodsName }}</a
  303. >
  304. </p>
  305. <!-- <p class="price">-->
  306. <!-- <span class="money_number">{{-->
  307. <!-- item.json_data.center.data.goods_data[1].goodsMoney || '面议'-->
  308. <!-- }}</span>-->
  309. <!-- </p>-->
  310. </div>
  311. </div>
  312. <template
  313. v-for="(item_center_bottom, index_center_bottom) in item.json_data
  314. .center.data.goods_data"
  315. >
  316. <div
  317. class="item bottom_item"
  318. :key="index_center_bottom"
  319. v-if="index_center_bottom > 1"
  320. @click="goGoodsDetail(item_center_bottom)"
  321. >
  322. <div class="wrap">
  323. <a href="javascript:void(0)" class="ad_img example_text">
  324. <img
  325. v-bind:src="item_center_bottom.mainImage"
  326. alt="item_center_bottom.goodsName"
  327. />
  328. </a>
  329. <p class="title">
  330. <a
  331. href="javascript:void(0)"
  332. :title="item_center_bottom.goodsName"
  333. >{{ item_center_bottom.goodsName }}</a
  334. >
  335. </p>
  336. <!-- <p class="price">-->
  337. <!-- <span class="money_number">{{-->
  338. <!-- item_center_bottom.goodsMoney || '面议'-->
  339. <!-- }}</span>-->
  340. <!-- </p>-->
  341. </div>
  342. </div>
  343. </template>
  344. </div>
  345. </div>
  346. <div class="floor_right_new">
  347. <div class="floor_right_new_top_title">
  348. <font style="background: #fc585a"></font>
  349. <span style="color: #fc585a">{{
  350. item.json_data.right.title_info.title_name
  351. }}</span>
  352. <font style="background: #fc585a"></font>
  353. </div>
  354. <div class="floor_content">
  355. <div
  356. class="item"
  357. v-for="(item_right_goods, index_right_goods) in item.json_data
  358. .right.data.goods_data"
  359. v-bind:key="index_right_goods"
  360. >
  361. <div class="wrap" @click="goGoodsDetail(item_right_goods)">
  362. <div class="left_pic">
  363. <a href="javascript:void(0)" class="ad_img example_text">
  364. <img
  365. v-bind:src="item_right_goods.mainImage"
  366. alt="item_right_goods.goodsName"
  367. />
  368. </a>
  369. </div>
  370. <div class="right_info">
  371. <p class="title">
  372. <a
  373. href="javascript:void(0)"
  374. :title="item_right_goods.goodsName"
  375. >{{ item_right_goods.goodsName }}</a
  376. >
  377. </p>
  378. <!-- <p class="price">-->
  379. <!-- <span class="money_number">{{-->
  380. <!-- item_right_goods.goodsMoney || '面议'-->
  381. <!-- }}</span>-->
  382. <!-- </p>-->
  383. </div>
  384. </div>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. <!-- adv_05 end-->
  395. <!-- adv_06 start-->
  396. <div
  397. v-if="item.json_data && item.json_data.type == 'adv_06'"
  398. class="adv_06 com_1210_center"
  399. :style="{
  400. marginTop: item.json_data.padding_top + 'px',
  401. marginBottom: item.json_data.padding_bottom + 'px',
  402. backgroundColor: item.json_data.bg_color,
  403. }"
  404. >
  405. <div class="adv_06_wrap">
  406. <div
  407. class="item"
  408. v-for="(item_child, index_child) in item.json_data.data"
  409. v-bind:key="index_child"
  410. >
  411. <a href="javascript:void(0)" @click="diyNavTo(item_child)">
  412. <img v-bind:src="item_child.imgUrl" />
  413. </a>
  414. </div>
  415. </div>
  416. </div>
  417. <!-- adv_06 end-->
  418. <!-- adv_07 start-->
  419. <div
  420. class="w_sld_react_1210 adv_07"
  421. v-if="item.json_data && item.json_data.type == 'adv_07'"
  422. :style="{
  423. marginTop: item.json_data.padding_top + 'px',
  424. marginBottom: item.json_data.padding_bottom + 'px',
  425. backgroundColor: item.json_data.bg_color,
  426. }"
  427. >
  428. <div class="adv_07_wrap">
  429. <div
  430. class="item"
  431. v-for="(item_child, index_child) in item.json_data.data"
  432. :key="index_child"
  433. >
  434. <a
  435. href="javascript:void(0);"
  436. @click="diyNavTo(item_child)"
  437. v-if="item_child.imgUrl"
  438. >
  439. <img :src="item_child.imgUrl" />
  440. </a>
  441. <a class="show_tip" href="javascript:void(0);" v-else>
  442. <span>此处添加【403*高度不限】图片</span>
  443. </a>
  444. </div>
  445. </div>
  446. </div>
  447. <!-- adv_07 end-->
  448. <!-- adv_08 start-->
  449. <div
  450. class="w_sld_react_1210 adv_08 com_1210_center"
  451. v-if="item.json_data && item.json_data.type == 'adv_08'"
  452. :style="{
  453. marginTop: item.json_data.padding_top + 'px',
  454. marginBottom: item.json_data.padding_bottom + 'px',
  455. backgroundColor: item.json_data.bg_color,
  456. }"
  457. >
  458. <div class="adv_08_wrap">
  459. <div
  460. class="item"
  461. v-for="(item_main, index_main) in item.json_data.data"
  462. v-bind:key="index_main"
  463. @click="diyNavTo(item_main)"
  464. >
  465. <a href="javascript:void(0)">
  466. <img v-bind:src="item_main.imgUrl" />
  467. </a>
  468. </div>
  469. </div>
  470. </div>
  471. <!-- adv_08 end-->
  472. <!-- adv_09 start-->
  473. <div
  474. class="adv_09 com_1210_center"
  475. v-if="item.json_data && item.json_data.type == 'adv_09'"
  476. :style="{
  477. marginTop: item.json_data.padding_top + 'px',
  478. marginBottom: item.json_data.padding_bottom + 'px',
  479. backgroundColor: item.json_data.bg_color,
  480. }"
  481. >
  482. <div class="adv_09_wrap">
  483. <div class="item left">
  484. <div
  485. class="top_title"
  486. v-bind:style="{
  487. backgroundColor: item.json_data.left.title_info.title_bg_color,
  488. color: item.json_data.left.title_info.title_color,
  489. }"
  490. >
  491. {{ item.json_data.left.title_info.title_name }}
  492. </div>
  493. <div class="main_con">
  494. <a
  495. class="first show_tip"
  496. href
  497. v-for="(item_left, index_left) in item.json_data.left.data"
  498. v-bind:key="index_left"
  499. @click="diyNavTo(item_left)"
  500. >
  501. <img v-bind:src="item_left.imgUrl" />
  502. </a>
  503. </div>
  504. </div>
  505. <div class="item center">
  506. <div
  507. class="top_title"
  508. v-bind:style="{
  509. backgroundColor: item.json_data.center.title_info.title_bg_color,
  510. color: item.json_data.center.title_info.title_color,
  511. }"
  512. >
  513. {{ item.json_data.center.title_info.title_name }}
  514. </div>
  515. <div class="main_con">
  516. <a
  517. class="show_tip"
  518. href
  519. v-for="(item_center, index_center) in item.json_data.center.data"
  520. v-bind:key="index_center"
  521. @click="diyNavTo(item_center)"
  522. >
  523. <img v-bind:src="item_center.imgUrl" />
  524. </a>
  525. </div>
  526. </div>
  527. <div class="item right">
  528. <div
  529. class="top_title"
  530. v-bind:style="{
  531. backgroundColor: item.json_data.right.title_info.title_bg_color,
  532. color: item.json_data.right.title_info.title_color,
  533. }"
  534. >
  535. {{ item.json_data.right.title_info.title_name }}
  536. </div>
  537. <div class="main_con">
  538. <a
  539. class="show_tip"
  540. href
  541. v-for="(item_right, index_right) in item.json_data.right.data"
  542. v-bind:key="index_right"
  543. @click="diyNavTo(item_right)"
  544. >
  545. <img v-bind:src="item_right.imgUrl" />
  546. </a>
  547. </div>
  548. </div>
  549. </div>
  550. </div>
  551. <!-- adv_09 end-->
  552. <!-- adv_10 start-->
  553. <div
  554. class="adv_10 com_1210_center"
  555. v-if="item.json_data && item.json_data.type == 'adv_10'"
  556. :style="{
  557. marginTop: item.json_data.padding_top + 'px',
  558. marginBottom: item.json_data.padding_bottom + 'px',
  559. backgroundColor: item.json_data.bg_color,
  560. }"
  561. >
  562. <div class="adv_10_wrap">
  563. <div
  564. class="row_one"
  565. v-for="(item_one, index_one) in item.json_data.row_one.data"
  566. v-bind:key="index_one"
  567. >
  568. <a href="javascript:void(0)" @click="diyNavTo(item_one)">
  569. <img v-bind:src="item_one.imgUrl" />
  570. </a>
  571. </div>
  572. <div class="row_four">
  573. <a
  574. href="javascript:void(0)"
  575. v-for="(item_four, index_four) in item.json_data.row_four.data"
  576. v-bind:key="index_four"
  577. @click="diyNavTo(item_four)"
  578. >
  579. <img v-bind:src="item_four.imgUrl" />
  580. </a>
  581. </div>
  582. <div class="row_five">
  583. <a
  584. href="javascript:void(0)"
  585. v-for="(item_five, index_five) in item.json_data.row_five.data"
  586. v-bind:key="index_five"
  587. @click="diyNavTo(item_five)"
  588. >
  589. <img v-bind:src="item_five.imgUrl" />
  590. </a>
  591. </div>
  592. </div>
  593. </div>
  594. <!-- adv_10 end-->
  595. <!-- adv_11 start-->
  596. <div
  597. class="adv_11 com_1210_center"
  598. v-if="item.json_data && item.json_data.type == 'adv_11'"
  599. :style="{
  600. marginTop: item.json_data.padding_top + 'px',
  601. marginBottom: item.json_data.padding_bottom + 'px',
  602. backgroundColor: item.json_data.bg_color,
  603. }"
  604. >
  605. <div class="adv_11_wrap">
  606. <div class="item row_left">
  607. <a
  608. href="javascript:void(0)"
  609. v-for="(item_left, index_left) in item.json_data.row_left.data"
  610. v-bind:key="index_left"
  611. v-bind:class="{ lb_margin: index_left % 2 == 1 }"
  612. @click="diyNavTo(item_left)"
  613. >
  614. <img v-bind:src="item_left.imgUrl" />
  615. </a>
  616. </div>
  617. <div class="item row_right">
  618. <div class="top">
  619. <a
  620. href="javascript:void(0)"
  621. v-if="item.json_data.row_right.top.data[0] != undefined"
  622. @click="diyNavTo(item.json_data.row_right.top.data[0])"
  623. >
  624. <img v-bind:src="item.json_data.row_right.top.data[0].imgUrl" />
  625. </a>
  626. </div>
  627. <div class="bottom">
  628. <a
  629. href="javascript:void(0)"
  630. v-if="item.json_data.row_right.bottom.data[0] != undefined"
  631. @click="diyNavTo(item.json_data.row_right.bottom.data[0])"
  632. >
  633. <img v-bind:src="item.json_data.row_right.bottom.data[0].imgUrl" />
  634. </a>
  635. </div>
  636. </div>
  637. </div>
  638. </div>
  639. <!-- adv_11 end-->
  640. <!-- adv_12 start-->
  641. <div
  642. class="adv_12 com_1210_center"
  643. v-if="item.json_data && item.json_data.type == 'adv_12'"
  644. :style="{
  645. marginTop: item.json_data.padding_top + 'px',
  646. marginBottom: item.json_data.padding_bottom + 'px',
  647. backgroundColor: item.json_data.bg_color,
  648. }"
  649. >
  650. <div class="adv_12_wrap">
  651. <div class="item left clear_padding">
  652. <a
  653. class="l_img"
  654. href="javascript:void(0)"
  655. @click="diyNavTo(item.json_data.left.data[0])"
  656. >
  657. <img v-bind:src="item.json_data.left.data[0].imgUrl" />
  658. </a>
  659. </div>
  660. <div class="item center">
  661. <a
  662. v-for="(item_center, index_center) in item.json_data.center.data"
  663. v-bind:key="index_center"
  664. v-bind:class="{ l_b_margin: index_center % 2 == 1 }"
  665. @click="diyNavTo(item_center)"
  666. >
  667. <img v-bind:src="item_center.imgUrl" />
  668. </a>
  669. </div>
  670. <div class="item right">
  671. <div class="title_wrap" @click="diyNavTo(item.json_data.right.title_info)">
  672. <a class="title" href="javascript:void(0)">{{
  673. item.json_data.right.title_info.title.initialValue
  674. }}</a>
  675. <span> 》</span>
  676. <a href="javascript:void(0)" class="subtitle">{{
  677. item.json_data.right.title_info.sub_title.initialValue
  678. }}</a>
  679. </div>
  680. <div class="img_top">
  681. <a
  682. href="javascript:void(0)"
  683. @click="diyNavTo(item.json_data.right.top.data[0])"
  684. >
  685. <img v-bind:src="item.json_data.right.top.data[0].imgUrl" />
  686. </a>
  687. </div>
  688. <div class="img_bottom">
  689. <a
  690. class="l_img"
  691. href="javascript:void(0)"
  692. v-for="(item_right_bottom, index_right_bottom) in item.json_data.right
  693. .bottom.data"
  694. v-bind:key="index_right_bottom"
  695. @click="diyNavTo(item_right_bottom)"
  696. >
  697. <img v-bind:src="item_right_bottom.imgUrl" />
  698. </a>
  699. </div>
  700. </div>
  701. </div>
  702. </div>
  703. <!-- adv_12 end-->
  704. <!-- adv_13 start-->
  705. <div
  706. class="w_sld_react_1210 adv_13 com_1210_center"
  707. v-if="item.json_data && item.json_data.type == 'adv_13'"
  708. :style="{
  709. marginTop: item.json_data.padding_top + 'px',
  710. marginBottom: item.json_data.padding_bottom + 'px',
  711. backgroundColor: item.json_data.bg_color,
  712. }"
  713. >
  714. <div class="adv_13_wrap">
  715. <div class="item right" @click="diyNavTo(item.json_data.left.title_info)">
  716. <div class="title_wrap">
  717. <a class="title" href="javascript:void(0)">{{
  718. item.json_data.left.title_info.title.initialValue
  719. }}</a>
  720. <span> 》</span>
  721. <a class="subtitle" href="javascript:void(0)">{{
  722. item.json_data.left.title_info.sub_title.initialValue
  723. }}</a>
  724. </div>
  725. <div class="img_top">
  726. <a
  727. class
  728. href="javascript:void(0)"
  729. @click="diyNavTo(item.json_data.left.top.data[0])"
  730. >
  731. <img v-bind:src="item.json_data.left.top.data[0].imgUrl" />
  732. </a>
  733. </div>
  734. <div class="img_bottom">
  735. <a
  736. class
  737. href="javascript:void(0)"
  738. v-for="(item_left_bottom, index_left_bottom) in item.json_data.left.bottom
  739. .data"
  740. v-bind:key="index_left_bottom"
  741. v-bind:class="{ l_b_margin: index_left_bottom % 2 == 0 }"
  742. @click="diyNavTo(item_left_bottom)"
  743. >
  744. <img v-bind:src="item_left_bottom.imgUrl" />
  745. </a>
  746. </div>
  747. </div>
  748. <div class="item right">
  749. <div class="title_wrap" @click="diyNavTo(item.json_data.center.title_info)">
  750. <a class="title" href="javascript:void(0)">{{
  751. item.json_data.center.title_info.title.initialValue
  752. }}</a>
  753. <span> 》</span>
  754. <a class="subtitle" href="javascript:void(0)">{{
  755. item.json_data.center.title_info.sub_title.initialValue
  756. }}</a>
  757. </div>
  758. <div class="img_top">
  759. <a
  760. href="javascript:void(0)"
  761. @click="diyNavTo(item.json_data.center.top.data[0])"
  762. >
  763. <img v-bind:src="item.json_data.center.top.data[0].imgUrl" />
  764. </a>
  765. </div>
  766. <div class="img_bottom">
  767. <a
  768. class="l_img"
  769. href="javascript:void(0)"
  770. v-for="(item_center_bottom, index_center_bottom) in item.json_data.center
  771. .bottom.data"
  772. v-bind:key="index_center_bottom"
  773. @click="diyNavTo(item_center_bottom)"
  774. >
  775. <img v-bind:src="item_center_bottom.imgUrl" />
  776. </a>
  777. </div>
  778. </div>
  779. <div class="item left clear_padding">
  780. <a
  781. class="l_img"
  782. href="javascript:void(0)"
  783. @click="diyNavTo(item.json_data.right.data[0])"
  784. >
  785. <img :src="item.json_data.right.data[0].imgUrl" />
  786. </a>
  787. </div>
  788. </div>
  789. </div>
  790. <!-- adv_13 end-->
  791. <!-- adv_19 start-->
  792. <div
  793. class="w_sld_react_1210 adv_19"
  794. v-if="item.json_data && item.json_data.type == 'adv_19'"
  795. :style="{
  796. marginTop: item.json_data.padding_top + 'px',
  797. marginBottom: item.json_data.padding_bottom + 'px',
  798. backgroundColor: item.json_data.bg_color,
  799. }"
  800. >
  801. <div class="adv_19_wrap">
  802. <div
  803. v-for="(items, index) in item.json_data.data"
  804. :key="index"
  805. class="item left"
  806. >
  807. <div
  808. class="top_title"
  809. :style="{ backgroundColor: items.top.title_info.title_bg_color }"
  810. >
  811. <div class="l_title" :style="{ color: items.top.title_info.title_color }">
  812. {{
  813. items.top.title_info.title_name
  814. ? items.top.title_info.title_name
  815. : "添加标题"
  816. }}
  817. </div>
  818. <div class="r_title">
  819. <ul>
  820. <li
  821. v-for="(val, key) in items.center.right"
  822. :key="key"
  823. :class="{ sel_tab: key == items.cur_tab }"
  824. @mouseover="adv19Tab(item.dataId, index, key, items)"
  825. >
  826. <span class="con">
  827. {{
  828. val.title_info.title_name ? val.title_info.title_name : "添加内容"
  829. }}
  830. </span>
  831. </li>
  832. </ul>
  833. </div>
  834. </div>
  835. <div class="center">
  836. <div class="l_center">
  837. <a href="javascript:;" @click="diyNavTo(items.center.left.data[0])">
  838. <img
  839. v-if="items.center.left.data[0].imgUrl"
  840. :src="items.center.left.data[0].imgUrl"
  841. />
  842. <span v-else>此处添加【186*340】图片</span>
  843. </a>
  844. </div>
  845. <div class="r_center">
  846. <div class="tabs_panel">
  847. <div
  848. v-for="(val, key) in items.center.right[items.cur_tab].data"
  849. :key="key"
  850. class="item"
  851. >
  852. <div class="title_wrap">
  853. <a class="main_title" href="javascript:;" @click="diyNavTo(val)">
  854. {{ val.main_title ? val.main_title : "图片标题" }}
  855. </a>
  856. <a class="sub_title" href="javascript:;" @click="diyNavTo(val)">
  857. {{ val.sub_title ? val.sub_title : "图片子标题" }}
  858. </a>
  859. </div>
  860. <div class="bottom_img">
  861. <a
  862. class="sld_com_no_img"
  863. href="javascript:;"
  864. @click="diyNavTo(val)"
  865. >
  866. <img v-if="val.imgUrl" :src="val.imgUrl" />
  867. <span v-else>此处添加【172*106】图片</span>
  868. </a>
  869. </div>
  870. </div>
  871. </div>
  872. </div>
  873. </div>
  874. <div class="bottom">
  875. <a
  876. v-for="(val, key) in items.bottom.data"
  877. :key="key"
  878. class="sld_com_no_img"
  879. href="javascript:;"
  880. @click="diyNavTo(val)"
  881. >
  882. <img v-if="val.imgUrl" :src="val.imgUrl" />
  883. <span v-else>此处添加【187*120】图片</span>
  884. </a>
  885. </div>
  886. </div>
  887. </div>
  888. </div>
  889. <!-- adv_19 end-->
  890. <!-- adv_20 start-->
  891. <div
  892. class="w_sld_react_1210 adv_20"
  893. v-if="item.json_data && item.json_data.type == 'adv_20'"
  894. :style="{
  895. marginTop: item.json_data.padding_top + 'px',
  896. marginBottom: item.json_data.padding_bottom + 'px',
  897. backgroundColor: item.json_data.bg_color,
  898. }"
  899. >
  900. <div class="adv_20_wrap flex_column_start_center">
  901. <div
  902. class="flex_row_around_center adv_20_wrap_row"
  903. v-for="(val, key) in item.json_data.data"
  904. :key="key"
  905. >
  906. <div
  907. v-for="(child, child_key) in val"
  908. :key="child_key"
  909. class="flex_column_center_center adv_20_wrap_item"
  910. >
  911. <div
  912. class="flex_row_center_center adv_20_wrap_item_img"
  913. style="border-radius: 0px"
  914. @click="diyNavTo(child)"
  915. >
  916. <img :src="child.imgUrl" />
  917. </div>
  918. <span class="main_title" @click="diyNavTo(child)">{{
  919. child.main_title
  920. }}</span>
  921. <span class="sub_title" @click="diyNavTo(child)">{{
  922. child.sub_title
  923. }}</span>
  924. </div>
  925. </div>
  926. </div>
  927. </div>
  928. <!-- adv_20 end-->
  929. <!-- adv_21 start-->
  930. <div
  931. class="w_sld_react_1210 adv_21"
  932. v-if="item.json_data && item.json_data.type == 'adv_21'"
  933. :style="{
  934. marginTop: item.json_data.padding_top + 'px',
  935. marginBottom: item.json_data.padding_bottom + 'px',
  936. backgroundColor: item.json_data.bg_color,
  937. }"
  938. >
  939. <div class="adv_21_wrap flex_row_start_start">
  940. <div
  941. class="flex_column_start_start adv_21_wrap_item"
  942. v-for="(val1, key1) in item.json_data.data"
  943. :key="key1"
  944. >
  945. <div
  946. class="flex_row_between_center title_part"
  947. @click="diyNavTo(val1.top_title)"
  948. >
  949. <span class="title">{{ val1.top_title.title.initialValue }}</span>
  950. <a class="view_more">{{ val1.top_title.sub_title.initialValue }}&gt;</a>
  951. </div>
  952. <div class="flex_column_start_start detail">
  953. <div
  954. class="flex_row_start_start item"
  955. v-for="(val2, key2) in val1.detail"
  956. :key="key2"
  957. >
  958. <div class="item_left" @click="diyNavTo(val2.left)">
  959. {{ val2.left.title.initialValue }}
  960. </div>
  961. <div class="flex_row_start_center item_right">
  962. <span
  963. class="item_right_con"
  964. v-for="(val3, key3) in val2.right"
  965. :key="key3"
  966. @click="diyNavTo(val3)"
  967. >
  968. {{ val3.title.initialValue }}
  969. </span>
  970. </div>
  971. </div>
  972. </div>
  973. </div>
  974. </div>
  975. </div>
  976. <!-- adv_21 end-->
  977. <!-- adv_27 start-->
  978. <div
  979. class="w_sld_react_1210 adv_27_wrap"
  980. v-if="item.json_data && item.json_data.type == 'adv_27'"
  981. :style="{
  982. marginTop: item.json_data.padding_top + 'px',
  983. marginBottom: item.json_data.padding_bottom + 'px',
  984. backgroundColor: item.json_data.bg_color,
  985. }"
  986. >
  987. <div class="floor_title">
  988. <h2>
  989. <!-- <font
  990. v-bind:style="{ backgroundColor: item.json_data.title_info.title_color }"
  991. >&nbsp;</font
  992. > -->
  993. <span v-bind:style="{ color: item.json_data.title_info.title_color }">{{
  994. item.json_data.title_info.title_name
  995. }}</span>
  996. <!-- <font
  997. v-bind:style="{ backgroundColor: item.json_data.title_info.title_color }"
  998. >&nbsp;</font -->
  999. <!-- > -->
  1000. </h2>
  1001. </div>
  1002. <div class="floor_goods">
  1003. <div
  1004. class="item"
  1005. v-for="(item_main, index_main) in item.json_data.data.store_data"
  1006. v-bind:key="index_main"
  1007. >
  1008. <router-link
  1009. target="_blank"
  1010. :to="'/store/'+ calcProductName(item_main.storeName) +'_'+ item_main.storeId"
  1011. >
  1012. <div class="wrap">
  1013. <div class="example_text">
  1014. <img v-bind:src="item_main.storeLogo" />
  1015. </div>
  1016. <p class="title">
  1017. <a :title="item_main.storeName">{{ item_main.storeName }}</a>
  1018. </p>
  1019. </div>
  1020. </router-link>
  1021. </div>
  1022. </div>
  1023. </div>
  1024. <!-- adv_27 end-->
  1025. <!-- adv_28 start-->
  1026. <div
  1027. class="w_sld_react_1210 adv_28_wrap"
  1028. v-if="item.json_data && item.json_data.type == 'adv_28'"
  1029. :style="{
  1030. marginTop: item.json_data.padding_top + 'px',
  1031. marginBottom: item.json_data.padding_bottom + 'px',
  1032. backgroundColor: item.json_data.bg_color,
  1033. }"
  1034. >
  1035. <div class="section-block industry-booth w_sld_react_1210 ">
  1036. <div class="industry-banner">
  1037. <div class="industry-link">
  1038. <div class="industry-theme-image">
  1039. <img class="theme-img-big" v-bind:src="item.json_data.left.data.imgUrl" @click="diyNavTo(item.json_data.left.data)"/>
  1040. </div>
  1041. <div class="industry-theme-info">
  1042. <div class="industry-title">
  1043. {{item.json_data.title_info.title.initialValue}}
  1044. </div>
  1045. <div class="soure-now">
  1046. <span class="btn btn-main" v-if="item.json_data.title_info.link_type" @click="diyNavTo(item.json_data.title_info)">{{
  1047. item.json_data.title_info &&
  1048. item.json_data.title_info.sub_title.initialValue
  1049. }}</span>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. </div>
  1054. <div class="industry-products">
  1055. <div class="prod-item" v-for="(item_center_bottom, index_center_bottom) in item.json_data
  1056. .center.data.goods_data" v-bind:key="index_center_bottom">
  1057. <div class="prod-inr" v-bind:title="item_center_bottom.goodsName" >
  1058. <router-link
  1059. target="_blank"
  1060. :to="'/goods/detail/'+ calcProductName(item_center_bottom.goodsName) +'_'+ item_center_bottom.productId"
  1061. >
  1062. <div class="prod-pic">
  1063. <div class="pic-inr">
  1064. <div class="img-wp">
  1065. <img
  1066. v-bind:src="item_center_bottom.mainImage"
  1067. v-bind:alt="item_center_bottom.goodsName"
  1068. />
  1069. <div class="gg"></div>
  1070. </div>
  1071. </div>
  1072. </div>
  1073. <div class="prod-txt">{{ item_center_bottom.goodsName }}</div>
  1074. </router-link>
  1075. </div>
  1076. </div>
  1077. </div>
  1078. </div>
  1079. </div>
  1080. <!-- adv_28 end-->
  1081. <!-- adv_29 start-->
  1082. <div
  1083. id="EnquiryWrap"
  1084. class="w_sld_react_1210 adv_29_wrap"
  1085. v-if="item.json_data && item.json_data.type == 'adv_29'"
  1086. :style="{
  1087. marginTop: item.json_data.padding_top + 'px',
  1088. marginBottom: item.json_data.padding_bottom + 'px',
  1089. backgroundColor: item.json_data.bg_color,
  1090. }"
  1091. >
  1092. <div class="section-block easy-sourcing w_sld_react_1210">
  1093. <div class="sourcing-bg">
  1094. <img
  1095. class="theme-img-small"
  1096. v-bind:src="item.json_data.left.data.imgUrl"
  1097. @click="diyNavTo(item.json_data.left.data)"
  1098. />
  1099. </div>
  1100. <div class="sourcing-centent">
  1101. <div class="sourcing-form">
  1102. <div class="form-title">{{L['获取报价']}}</div>
  1103. <HomeSourcingForm/>
  1104. </div>
  1105. <div class="sourcing-text">
  1106. <div class="sourcing-title" @click="diyNavTo(item.json_data.title_info)">{{item.json_data.title_info.title.initialValue}}</div>
  1107. <div class="sourcing-desc" style="margin-bottom: 24px" @click="diyNavTo(item.json_data.title_info)">
  1108. <p>{{item.json_data.title_info.sub_title.initialValue}}</p>
  1109. </div>
  1110. <div class="sourcing-desc-warp">
  1111. <div class="sourcing-desc" v-for="(item_center, index_center) in item.json_data.center" v-bind:key="index_center" >
  1112. <p @click="diyNavTo(item_center)">
  1113. {{ item_center.title.initialValue }}
  1114. </p>
  1115. </div>
  1116. </div>
  1117. <div class="sourcing-more">
  1118. <a href="javascript:void(0)" @click="diyNavTo(item.json_data.btn)">
  1119. {{item.json_data.btn.title.initialValue}}<i class="ob-icon icon-right"> ></i>
  1120. </a>
  1121. </div>
  1122. </div>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. <!-- adv_29 end-->
  1127. </div>
  1128. </div>
  1129. </template>
  1130. <script setup>
  1131. import {
  1132. ElCarousel,
  1133. ElCarouselItem,
  1134. } from "element-plus";
  1135. import { useFiltersStore } from "@/store/filter.js";
  1136. import { getCurLanguage } from '@/composables/common.js';
  1137. const L = getCurLanguage();
  1138. const router = useRouter()
  1139. const route = useRoute();
  1140. const props = defineProps({
  1141. decorateData: Object, //装修的数据
  1142. source: String, //来源,home:平台首页 store:店铺装修
  1143. });
  1144. const filtersStore = useFiltersStore();
  1145. //退出登录
  1146. const loginOut = async () => {
  1147. filtersStore.setMemberInfo({});
  1148. filtersStore.setLoginStatus(false);
  1149. filtersStore.setToken("");
  1150. filtersStore.setRefreshToken("");
  1151. filtersStore.setTime(new Date().getTime().toString()); //存储refresh_token更新时间
  1152. localStorage.setItem('isLoggedIn', 'false');
  1153. setTimeout(() => {
  1154. localStorage.removeItem('isLoggedIn');
  1155. window.location.reload();
  1156. }, 200)
  1157. };
  1158. const goSupplierUrl = () => {
  1159. const config = useRuntimeConfig()
  1160. let url = config.public.supplierUrl;
  1161. window.open(url, '_blank');
  1162. };
  1163. const gotoFun = (val) => {
  1164. // console.log(val)
  1165. // return
  1166. if (val.link_type == "url") {
  1167. //跳转链接地址
  1168. if (val.link_value) {
  1169. val.link_value = quillEscapeToHtml(val.link_value);
  1170. }
  1171. window.open(val.link_value, "_blank");
  1172. } else if (val.link_type == "goods") {
  1173. //跳转商品详情页
  1174. // let routeUrl = router.resolve({
  1175. // path: "/goods/detail",
  1176. // query: {
  1177. // productId: val.info.defaultProductId,
  1178. // },
  1179. // });
  1180. let href = "/goods/detail/"+ calcProductName(val.info.goodsName) +'_'+ val.info.defaultProductId
  1181. window.open(href, "_blank");
  1182. } else if (val.link_type == "category") {
  1183. // 分类列表
  1184. // let routeUrl = router.resolve({
  1185. // path: "/goods/list/categoryId-"+val.info.categoryId,
  1186. // });
  1187. let href = '/goods/list/'+ calcProductName(val.info.categoryName) +'_v-'+ val.info.categoryId + '_gid-' + val.info.grade + '_pid-' + val.info.pid
  1188. window.open(href, "_blank");
  1189. } else if (val.link_type == "keyword") {
  1190. // 关键词
  1191. let path = "/goods/list/search_keyword-"+ val.link_value
  1192. let query = {
  1193. keyword: val.link_value,
  1194. };
  1195. if (val.storeId) {
  1196. query.storeId = val.storeId;
  1197. path+='/storeId-'+val.storeId
  1198. }
  1199. let routeUrl = router.resolve({
  1200. path: path
  1201. });
  1202. window.open(routeUrl.href, "_blank");
  1203. } else if (val.link_type == "topic") {
  1204. //跳转专题页
  1205. let routeUrl = router.push({
  1206. path: "/home/topic",
  1207. query: {
  1208. topicId: val.info.decoId,
  1209. },
  1210. });
  1211. window.open(routeUrl.href, "_blank");
  1212. } else if (val.link_type == "brand_home") {
  1213. //品牌列表
  1214. let routeUrl = router.resolve({
  1215. path: "/brand",
  1216. query: {},
  1217. });
  1218. window.open(routeUrl.href, "_blank");
  1219. } else if (val.link_type == "store_list") {
  1220. //店铺列表
  1221. let routeUrl = router.resolve({
  1222. path: "/store/list/current-1",
  1223. });
  1224. window.open(routeUrl.href, "_blank");
  1225. } else if (val.link_type == "voucher_center") {
  1226. //领券中心
  1227. let routeUrl = router.resolve({
  1228. path: "/coupon",
  1229. });
  1230. window.open(routeUrl.href, "_blank");
  1231. } else if (val.link_type == "point_center") {
  1232. let routeUrl = router.resolve({
  1233. path: "/point/index",
  1234. });
  1235. window.open(routeUrl.href, "_blank");
  1236. }
  1237. }
  1238. const goGoodsListByCatIdFun = (item) => {
  1239. const path = '/goods/list/'+ calcProductName(item.categoryName) +'_v-'+item.categoryId+'_gid-'+item.grade+'_pid-'+item.pid;
  1240. const routeUrl = router.resolve({
  1241. path
  1242. });
  1243. window.open(routeUrl.href, '_blank');
  1244. }
  1245. function goGoodsDetailFun(availableProductId,goodsName) {
  1246. // let routeUrl = router.resolve({
  1247. // path: "/goods/detail/",
  1248. // query: { productId: availableProductId }
  1249. // });
  1250. let href = "/goods/detail/" + calcProductName(goodsName) + '_' + availableProductId
  1251. window.open(href, '_blank');
  1252. }
  1253. function goStoreDetailFun(availableStoreId,availableStoreName) {
  1254. // let routeUrl = router.resolve({
  1255. // path: "/store",
  1256. // query: { vid: availableStoreId }
  1257. // });
  1258. let href = "/store/" + calcProductName(availableStoreName) + '_' + availableStoreId
  1259. window.open(href, '_blank');
  1260. }
  1261. const diyNavTo = (val) => {
  1262. if (route.query.vid) {
  1263. val.storeId = route.query.vid;
  1264. }
  1265. gotoFun(val);
  1266. };
  1267. const goGoodsDetail = (val) => {
  1268. goGoodsDetailFun(val.productId,val.goodsName);
  1269. };
  1270. const goStoreDetail = (val) => {
  1271. goStoreDetailFun(val.storeId,val.storeName);
  1272. };
  1273. const goGoodsListByCatId = (item) => {
  1274. goGoodsListByCatIdFun(item);
  1275. };
  1276. //adv_19楼层tab切换事件
  1277. const adv19Tab = (dataId, index, key, items) => {
  1278. items.cur_tab = key;
  1279. };
  1280. onMounted(() => {
  1281. // 是否锚点跳转到询盘区块
  1282. const EnquiryCache = localStorage.getItem("quotations") ?? "";
  1283. if (EnquiryCache) {
  1284. document.getElementById('EnquiryWrap')?.scrollIntoView({ behavior: 'smooth' });
  1285. setTimeout(() => {
  1286. localStorage.removeItem('quotations')
  1287. }, 1000)
  1288. }
  1289. })
  1290. </script>
  1291. <style lang="scss" scoped>
  1292. @import "@/assets/style/decorate.scss";
  1293. @import "@/assets/style/theme.scss";
  1294. @import "@/assets/style/mixins.scss";
  1295. .sld_diy {
  1296. .el-carousel {
  1297. max-width: 1920px;
  1298. // width: 100%;
  1299. margin: 0 auto;
  1300. }
  1301. background: #f1f1f1;
  1302. :deep(.el-carousel__indicator) {
  1303. &.is-active {
  1304. .el-carousel__button {
  1305. background-color: $colorMain !important;
  1306. }
  1307. }
  1308. }
  1309. .el-carousel__item {
  1310. width: 100%;
  1311. height: 100%;
  1312. display: flex;
  1313. justify-content: center;
  1314. align-items: center;
  1315. div {
  1316. background-position: center center;
  1317. width: 100%;
  1318. height: 100%;
  1319. position: absolute;
  1320. left: 50%;
  1321. top: 0;
  1322. margin-left: -960px;
  1323. background-repeat: no-repeat;
  1324. background-size: contain;
  1325. }
  1326. a {
  1327. width: 100%;
  1328. height: 100%;
  1329. img {
  1330. width: 100%;
  1331. height: 100%;
  1332. object-fit: cover; /* 铺满容器,但会裁掉多余部分 */
  1333. }
  1334. }
  1335. }
  1336. .main_banner {
  1337. width: 100%;
  1338. height: 457px;
  1339. position: relative;
  1340. overflow: hidden;
  1341. margin: 0 auto;
  1342. .nav-menu {
  1343. position: absolute;
  1344. left: 50%;
  1345. margin-left: -600px;
  1346. top: -3px;
  1347. width: 187px;
  1348. height: 457px;
  1349. z-index: 9;
  1350. background-color: rgba(0, 0, 0, 0.6);
  1351. -webkit-box-sizing: border-box;
  1352. box-sizing: border-box;
  1353. .menu-wrap {
  1354. .menu-item {
  1355. height: 39px;
  1356. line-height: 39px;
  1357. margin: 5px 0;
  1358. position: relative;
  1359. .first_cat {
  1360. width: 125px;
  1361. display: block;
  1362. font-size: 16px;
  1363. color: #ffffff;
  1364. padding-left: 30px;
  1365. text-overflow: ellipsis;
  1366. overflow: hidden;
  1367. position: relative;
  1368. .nav-menu {
  1369. position: absolute;
  1370. left: 50%;
  1371. margin-left: -600px;
  1372. top: -3px;
  1373. width: 187px;
  1374. height: 457px;
  1375. z-index: 9;
  1376. background-color: rgba(0, 0, 0, 0.6);
  1377. -webkit-box-sizing: border-box;
  1378. box-sizing: border-box;
  1379. .menu-wrap {
  1380. .menu-item {
  1381. height: 39px;
  1382. line-height: 39px;
  1383. margin: 5px 0;
  1384. .first_cat {
  1385. width: 125px;
  1386. display: block;
  1387. font-size: 16px;
  1388. color: #ffffff;
  1389. padding-left: 30px;
  1390. text-overflow: ellipsis;
  1391. overflow: hidden;
  1392. white-space: nowrap;
  1393. position: relative;
  1394. &:after {
  1395. position: absolute;
  1396. right: 0px;
  1397. top: 12.5px;
  1398. content: " ";
  1399. width: 7px !important;
  1400. height: 14px !important;
  1401. }
  1402. }
  1403. &:hover {
  1404. background-color: $colorMain;
  1405. .children {
  1406. display: inline-block;
  1407. }
  1408. }
  1409. .children {
  1410. display: none;
  1411. width: 1013px;
  1412. height: 417px;
  1413. background-color: #fff;
  1414. position: absolute;
  1415. top: 0;
  1416. left: 187px;
  1417. padding: 20px 0;
  1418. .fore-dl {
  1419. width: 100%;
  1420. clear: both;
  1421. overflow: hidden;
  1422. }
  1423. dt {
  1424. position: relative;
  1425. float: left;
  1426. width: 152px;
  1427. padding: 8px 30px 0 0;
  1428. text-align: right;
  1429. font-weight: 700;
  1430. line-height: 2em;
  1431. overflow: hidden;
  1432. white-space: nowrap;
  1433. i {
  1434. position: absolute;
  1435. top: 11px;
  1436. right: 18px;
  1437. width: 4px;
  1438. height: 14px;
  1439. font: 400 9px/14px consolas;
  1440. }
  1441. .second {
  1442. color: #333;
  1443. font-size: 14px;
  1444. width: 140px;
  1445. overflow: hidden;
  1446. display: inline-block;
  1447. line-height: 18px;
  1448. text-overflow: ellipsis;
  1449. }
  1450. }
  1451. dd {
  1452. border-top: none;
  1453. border-bottom: 1px dashed #dddddd;
  1454. width: 790px;
  1455. padding: 6px 0;
  1456. float: left;
  1457. line-height: 16px;
  1458. margin-left: 15px;
  1459. }
  1460. .third {
  1461. float: left;
  1462. padding: 0 8px;
  1463. margin: 4px 0;
  1464. line-height: 16px;
  1465. height: 16px;
  1466. border-right: 1px solid #e0e0e0;
  1467. white-space: nowrap;
  1468. color: #999;
  1469. font-size: 13px;
  1470. }
  1471. .children_item {
  1472. display: flex;
  1473. flex-direction: row;
  1474. justify-content: flex-start;
  1475. align-items: flex-start;
  1476. flex-wrap: wrap;
  1477. height: 30px;
  1478. .li_wrap {
  1479. height: 30px;
  1480. line-height: 30px;
  1481. flex: 1;
  1482. padding-left: 23px;
  1483. a {
  1484. line-height: 30px;
  1485. height: 30px;
  1486. color: #999999;
  1487. }
  1488. }
  1489. a {
  1490. color: $colorMain;
  1491. font-size: 14px;
  1492. }
  1493. img {
  1494. width: 42px;
  1495. height: 35px;
  1496. vertical-align: middle;
  1497. margin-right: 15px;
  1498. }
  1499. }
  1500. }
  1501. }
  1502. }
  1503. }
  1504. }
  1505. &:hover {
  1506. background-color: $colorMain;
  1507. .children {
  1508. display: inline-block;
  1509. }
  1510. }
  1511. .children {
  1512. display: none;
  1513. width: 1013px;
  1514. height: 417px;
  1515. background-color: #fff;
  1516. position: absolute;
  1517. top: 0;
  1518. left: 187px;
  1519. padding: 20px 0;
  1520. .fore-dl {
  1521. width: 100%;
  1522. clear: both;
  1523. overflow: hidden;
  1524. }
  1525. dt {
  1526. position: relative;
  1527. float: left;
  1528. width: 152px;
  1529. padding: 8px 30px 0 0;
  1530. text-align: right;
  1531. font-weight: 700;
  1532. line-height: 2em;
  1533. overflow: hidden;
  1534. white-space: nowrap;
  1535. i {
  1536. position: absolute;
  1537. top: 11px;
  1538. right: 18px;
  1539. width: 4px;
  1540. height: 14px;
  1541. font: 400 9px/14px consolas;
  1542. }
  1543. .second {
  1544. color: #333;
  1545. font-size: 14px;
  1546. width: 140px;
  1547. overflow: hidden;
  1548. display: inline-block;
  1549. line-height: 18px;
  1550. text-overflow: ellipsis;
  1551. }
  1552. }
  1553. dd {
  1554. border-top: none;
  1555. border-bottom: 1px dashed #dddddd;
  1556. width: 790px;
  1557. padding: 6px 0;
  1558. float: left;
  1559. line-height: 16px;
  1560. margin-left: 15px;
  1561. }
  1562. .third {
  1563. float: left;
  1564. padding: 0 8px;
  1565. margin: 4px 0;
  1566. line-height: 16px;
  1567. height: 16px;
  1568. border-right: 1px solid #e0e0e0;
  1569. white-space: nowrap;
  1570. color: #999;
  1571. font-size: 13px;
  1572. }
  1573. .children_item {
  1574. display: flex;
  1575. flex-direction: row;
  1576. justify-content: flex-start;
  1577. align-items: flex-start;
  1578. flex-wrap: wrap;
  1579. height: 30px;
  1580. .li_wrap {
  1581. height: 30px;
  1582. line-height: 30px;
  1583. flex: 1;
  1584. padding-left: 23px;
  1585. a {
  1586. line-height: 30px;
  1587. height: 30px;
  1588. color: #999999;
  1589. }
  1590. }
  1591. a {
  1592. color: $colorMain;
  1593. font-size: 14px;
  1594. }
  1595. img {
  1596. width: 42px;
  1597. height: 35px;
  1598. vertical-align: middle;
  1599. margin-right: 15px;
  1600. }
  1601. }
  1602. }
  1603. }
  1604. }
  1605. }
  1606. .swiper-container {
  1607. width: 100%;
  1608. height: 100%;
  1609. position: absolute;
  1610. .swiper-slide {
  1611. a {
  1612. display: inline-block;
  1613. width: 100%;
  1614. height: 100%;
  1615. img {
  1616. width: 1920px;
  1617. height: 100%;
  1618. margin-left: -960px;
  1619. left: 50%;
  1620. position: relative;
  1621. overflow: hidden;
  1622. }
  1623. }
  1624. }
  1625. }
  1626. }
  1627. .main_diy {
  1628. margin-top: 10px;
  1629. }
  1630. .product-box {
  1631. background-color: $colorJ;
  1632. padding: 30px 0 50px;
  1633. h2 {
  1634. font-size: $fontF;
  1635. height: 21px;
  1636. line-height: 21px;
  1637. color: $colorMain;
  1638. margin-bottom: 20px;
  1639. }
  1640. .wrapper {
  1641. display: flex;
  1642. .banner-left {
  1643. margin-right: 16px;
  1644. img {
  1645. width: 224px;
  1646. height: 619px;
  1647. }
  1648. }
  1649. .list-box {
  1650. .list {
  1651. @include flex();
  1652. width: 986px;
  1653. margin-bottom: 14px;
  1654. &:last-child {
  1655. margin-bottom: 0;
  1656. }
  1657. .item {
  1658. width: 236px;
  1659. height: 302px;
  1660. background-color: $colorG;
  1661. text-align: center;
  1662. span {
  1663. display: inline-block;
  1664. width: 67px;
  1665. height: 24px;
  1666. font-size: 14px;
  1667. line-height: 24px;
  1668. color: $colorG;
  1669. &.new-pro {
  1670. background-color: #7ecf68;
  1671. }
  1672. &.kill-pro {
  1673. background-color: #e82626;
  1674. }
  1675. }
  1676. .item-img {
  1677. img {
  1678. width: 100%;
  1679. height: 195px;
  1680. }
  1681. }
  1682. .item-info {
  1683. h3 {
  1684. font-size: 14px;
  1685. color: $colorMain;
  1686. line-height: 14px;
  1687. font-weight: bold;
  1688. }
  1689. p {
  1690. color: $colorD;
  1691. line-height: 13px;
  1692. margin: 6px auto 13px;
  1693. }
  1694. .price {
  1695. color: #f20a0a;
  1696. font-size: 14px;
  1697. font-weight: bold;
  1698. cursor: pointer;
  1699. &:after {
  1700. // @include bgImg(22px, 22px, "/imgs/icon-cart-hover.png");
  1701. content: " ";
  1702. margin-left: 5px;
  1703. vertical-align: middle;
  1704. }
  1705. }
  1706. }
  1707. }
  1708. }
  1709. }
  1710. }
  1711. }
  1712. }
  1713. </style>