多租户商城-商户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

665 lines
19 KiB

2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. <template>
  2. <div class="hom-pro-list">
  3. <div v-if="componentContent.arrangeType == '横向滑动'" class="product-list product-swiper">
  4. <swiper ref="mySwiper" class="product-list-box" :options="swiperOption">
  5. <swiper-slide class="item" v-for="(item, index) in productData" :key="index" @click="jumpProductDetail(item)">
  6. <div class="product-list-item" v-if="componentContent.productStyleValue == '1'">
  7. <div class="product-list-img">
  8. <img v-show="item.image" class="img" :src="item.image">
  9. </div>
  10. <div class="product-list-info">
  11. <label class="product-name">{{ item.productName }}</label>
  12. <div>
  13. <div class="shop-box" v-if="typeId == 1" @click.stop="jumpStore(item)">
  14. <label class="shop-name">{{ item.shopName }}</label>
  15. <div class="shop-logo">
  16. <img :src="item.shopLogo">
  17. </div>
  18. </div>
  19. <label class="buy-count">{{ item.users ? item.users : 0 }}人付款</label>
  20. </div>
  21. <div class="price-warp">
  22. <div class="price">
  23. ¥ {{ item.price }}
  24. </div>
  25. <div class="original-price">
  26. ¥ {{ item.originalPrice }}
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="product-swiper-item" v-if="componentContent.productStyleValue == '2'">
  32. <div class="product-swiper-img">
  33. <img class="img pic-img default-img" :src="item.image"
  34. onerror="this.src='url(https://ceres.zkthink.com/static/root/default.png) no-repeat center';this.οnerrοr=null">
  35. </div>
  36. <div class="product-swiper-info">
  37. <div class="product-info-content">
  38. <div class="product-name-row">
  39. <label class="product-name">{{ item.productName }}</label>
  40. <img class="product-star" src="../../../static/images/product/icon_star.png">
  41. <label class="product-star-text">{{ item.qaNum || 3.5 }}</label>
  42. </div>
  43. <div class="product-price-row">
  44. <div class="price-warp">
  45. ¥ {{ item.price }}
  46. </div>
  47. <img class="product-add" src="../../../static/images/product/icon_add.png">
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="item3" v-if="componentContent.productStyleValue == '3'">
  53. <div class="item3_name">{{ item.productName }}</div>
  54. <div class="item3_image"><el-image :src="item.image" fit="contain"></el-image></div>
  55. <div class="item3_btn_row">
  56. <div class="item3_btn">点击</div>
  57. </div>
  58. </div>
  59. <div class="item4" v-if="componentContent.productStyleValue == '4'">
  60. <div class="item4_content">
  61. <div class="item4_image"><el-image :src="item.image" fit="contain"></el-image></div>
  62. <div class="item4_info">
  63. <div class="item4_name">{{ item.productName }}</div>
  64. <div class="item4_price">¥{{ item.price }}</div>
  65. </div>
  66. <div class="item4_arrow">
  67. <img src="../../../static/images/product/icon_right_arrow.png">
  68. </div>
  69. </div>
  70. <div class="item4_index_image" v-if="index < 3">
  71. <img src="../../../static/images/product/icon_index_1.png" v-if="index == 0">
  72. <img src="../../../static/images/product/icon_index_2.png" v-if="index == 1">
  73. <img src="../../../static/images/product/icon_index_3.png" v-if="index == 2">
  74. </div>
  75. </div>
  76. </swiper-slide>
  77. </swiper>
  78. <div class="pagination product-pagination" slot="pagination"></div>
  79. </div>
  80. <div v-if="componentContent.arrangeType == '多行多列'" class="product-list">
  81. <div class="product-list-box">
  82. <div class="item" v-for="(item, index) in productData" :key="index" @click="jumpProductDetail(item)">
  83. <div class="product-list-item" v-if="componentContent.productStyleValue == '1'">
  84. <div class="product-list-img">
  85. <img v-show="item.image" class="img" :src="item.image">
  86. </div>
  87. <div class="product-list-info">
  88. <label class="product-name">{{ item.productName }}</label>
  89. <div>
  90. <div class="shop-box" v-if="typeId == 1" @click.stop="jumpStore(item)">
  91. <label class="shop-name">{{ item.shopName }}</label>
  92. <div class="shop-logo">
  93. <img :src="item.shopLogo">
  94. </div>
  95. </div>
  96. <label class="buy-count">{{ item.users ? item.users : 0 }}人付款</label>
  97. </div>
  98. <div class="price-warp">
  99. <div class="price">
  100. ¥ {{ item.price }}
  101. </div>
  102. <div class="original-price">
  103. ¥ {{ item.originalPrice }}
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="product-swiper-item" v-if="componentContent.productStyleValue == '2'">
  109. <div class="product-swiper-img">
  110. <img class="img pic-img default-img" :src="item.image"
  111. onerror="this.src='url(https://ceres.zkthink.com/static/root/default.png) no-repeat center';this.οnerrοr=null">
  112. </div>
  113. <div class="product-swiper-info">
  114. <div class="product-info-content">
  115. <div class="product-name-row">
  116. <label class="product-name">{{ item.productName }}</label>
  117. <img class="product-star" src="../../../static/images/product/icon_star.png">
  118. <label class="product-star-text">{{ item.qaNum || 3.5 }}</label>
  119. </div>
  120. <div class="product-price-row">
  121. <div class="price-warp">
  122. ¥ {{ item.price }}
  123. </div>
  124. <img class="product-add" src="../../../static/images/product/icon_add.png">
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <div class="item3" v-if="componentContent.productStyleValue == '3'">
  130. <div class="item3_name">{{ item.productName }}</div>
  131. <div class="item3_image"><el-image :src="item.image" fit="contain"></el-image></div>
  132. <div class="item3_btn_row">
  133. <div class="item3_btn">点击</div>
  134. </div>
  135. </div>
  136. <div class="item4" v-if="componentContent.productStyleValue == '4'">
  137. <div class="item4_content">
  138. <div class="item4_image"><el-image :src="item.image" fit="contain"></el-image></div>
  139. <div class="item4_info">
  140. <div class="item4_name">{{ item.productName }}</div>
  141. <div class="item4_price">¥{{ item.price }}</div>
  142. </div>
  143. <div class="item4_arrow">
  144. <img src="../../../static/images/product/icon_right_arrow.png">
  145. </div>
  146. </div>
  147. <div class="item4_index_image" v-if="index < 3">
  148. <img src="../../../static/images/product/icon_index_1.png" v-if="index == 0">
  149. <img src="../../../static/images/product/icon_index_2.png" v-if="index == 1">
  150. <img src="../../../static/images/product/icon_index_3.png" v-if="index == 2">
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <button v-show="componentContent.showMore" class="btn-more" @click="jumpLink(componentContent.linkObj)">{{
  157. $t('common.seeall') }} <span class="icon iconfont icon-arrow-right"></span></button>
  158. </div>
  159. </template>
  160. <script>
  161. import { commonMixin } from '../mixin'
  162. export default {
  163. mixins: [commonMixin],
  164. data() {
  165. return {
  166. swiperOption: {
  167. slidesPerView: 2,
  168. spaceBetween: 14,
  169. autoplay: false, // 可选选项,自动滑动
  170. loop: true,
  171. pagination: {
  172. el: '.product-pagination',
  173. clickable: true
  174. },
  175. navigation: {
  176. nextEl: '.swiper-button-next',
  177. prevEl: '.swiper-button-prev'
  178. }
  179. }
  180. }
  181. }
  182. }
  183. </script>
  184. <style lang="scss" scoped>
  185. .hom-pro-list {
  186. padding: 20px 0;
  187. .title {
  188. text-align: center;
  189. margin-bottom: 20px;
  190. label {
  191. background: url("../../../static/images/icon-title.png") no-repeat left center;
  192. font-size: 30px;
  193. font-weight: bold;
  194. padding-left: 48px;
  195. }
  196. }
  197. /**多行多列**/
  198. .product-list {
  199. position: relative;
  200. .product-list-box {
  201. display: flex;
  202. flex-wrap: wrap;
  203. flex-direction: row;
  204. padding-left: 20px;
  205. padding-right: 20px;
  206. ::v-deep .swiper-pagination-bullet {
  207. display: none;
  208. }
  209. }
  210. .product-swiper .product-list-box {
  211. margin: 0 ;
  212. padding-left: 0;
  213. }
  214. .item {
  215. width:auto !important;
  216. margin-right: 0px !important;
  217. .product-list-item {
  218. margin: 0 14px 20px 0;
  219. width: 348px;
  220. .product-list-img {
  221. width: 348px;
  222. height: 348px;
  223. background-color: #f5f5f5;
  224. border-radius: 10px 10px 0 0;
  225. .img {
  226. width: 100%;
  227. height: 100%;
  228. object-fit: contain;
  229. }
  230. }
  231. .product-list-info {
  232. background-color: #FFFFFF;
  233. //box-shadow: 0px 0px 15px 0px rgba(52, 52, 52, 0.15);
  234. border-radius: 0 0 10px 10px;
  235. padding: 20px;
  236. label {
  237. font-weight: normal;
  238. }
  239. .product-name {
  240. font-size: 28px;
  241. color: #333;
  242. display: block;
  243. overflow: hidden;
  244. text-overflow: ellipsis;
  245. white-space: nowrap;
  246. margin-bottom: 18px;
  247. line-height: 40px;
  248. }
  249. .shop-box {
  250. background-color: #333333;
  251. border-radius: 0px 20px 20px 0px;
  252. line-height: 40px;
  253. display: inline-block;
  254. height: 40px;
  255. margin-right: 10px;
  256. .shop-name {
  257. font-size: 20px;
  258. color: #FFEBC4;
  259. padding: 0 8px 0 12px;
  260. }
  261. .shop-logo {
  262. border: 2px solid #707070;
  263. border-radius: 50%;
  264. overflow: hidden;
  265. float: right;
  266. img {
  267. width: 34px;
  268. height: 34px;
  269. display: block;
  270. }
  271. }
  272. }
  273. .buy-count {
  274. color: #C5AA7B;
  275. font-size: 20px;
  276. margin-bottom: 16px;
  277. border: 2px solid #E4E5E6;
  278. line-height: 40px;
  279. padding: 0 5px;
  280. display: inline-block;
  281. }
  282. .price-warp {
  283. display: flex;
  284. align-items: baseline;
  285. line-height: 56px;
  286. .price {
  287. color: #C83732;
  288. font-size: 40px;
  289. margin-right: 20px;
  290. }
  291. .original-price {
  292. font-size: 24px;
  293. color: #ccc;
  294. text-decoration: line-through;
  295. }
  296. }
  297. }
  298. }
  299. .product-swiper-item {
  300. height: 320px;
  301. width: 242px !important;
  302. position: relative;
  303. margin-left: 10px;
  304. margin-right: 10px;
  305. .product-swiper-img {
  306. width: 210px;
  307. height: 220px;
  308. margin-left: auto;
  309. margin-right: auto;
  310. background: #F6F6F8;
  311. border: 2px solid #FFFFFF;
  312. border-radius: 16px;
  313. position: relative;
  314. padding: 20px;
  315. z-index: 2;
  316. box-sizing: border-box;
  317. .img {
  318. width: 100%;
  319. height: 100%;
  320. object-fit: contain;
  321. }
  322. }
  323. .product-swiper-info {
  324. width: 242px;
  325. height: 210px;
  326. position: absolute;
  327. top: 110px;
  328. background: #FDFDFD;
  329. box-shadow: 0px 16px 24px 0px #F6F6F6;
  330. border-radius: 16px;
  331. text-align: center;
  332. .product-info-content {
  333. margin-top: 125px;
  334. .product-name-row {
  335. width: 100%;
  336. height: 22px;
  337. line-height: 22px;
  338. display: flex;
  339. flex-direction: row;
  340. flex-wrap: nowrap;
  341. align-content: center;
  342. justify-content: flex-start;
  343. align-items: center;
  344. .product-name {
  345. width: 100%;
  346. height: auto;
  347. font-size: 16px;
  348. font-family: Source Han Sans CN;
  349. font-weight: bold;
  350. color: #252744;
  351. display: block;
  352. overflow: hidden;
  353. text-overflow: ellipsis;
  354. white-space: nowrap;
  355. line-height: 28px;
  356. margin-left: 24px;
  357. text-align: left;
  358. }
  359. .product-star {
  360. width: 22px;
  361. height: 22px;
  362. }
  363. .product-star-text {
  364. width: auto;
  365. height: 28px;
  366. line-height: 28px;
  367. font-size: 14px;
  368. font-family: Source Han Sans CN;
  369. font-weight: bold;
  370. color: #A5A5AD;
  371. margin-right: 20px;
  372. margin-left: 5px;
  373. }
  374. }
  375. .product-sku-row {
  376. width: 100%;
  377. height: 28px;
  378. line-height: 28px;
  379. margin-top: 15px;
  380. display: flex;
  381. flex-direction: row;
  382. flex-wrap: nowrap;
  383. align-content: center;
  384. justify-content: flex-start;
  385. align-items: center;
  386. .product-sku-name {
  387. font-size: 24px;
  388. font-family: Source Han Sans CN;
  389. font-weight: 400;
  390. color: #90919C;
  391. margin-left: 30px;
  392. }
  393. }
  394. .product-price-row {
  395. width: 100%;
  396. height: 50px;
  397. line-height: 50px;
  398. display: flex;
  399. flex-direction: row;
  400. flex-wrap: nowrap;
  401. align-content: center;
  402. justify-content: space-between;
  403. align-items: center;
  404. margin-top: 10px;
  405. .price-warp {
  406. display: flex;
  407. align-items: center;
  408. line-height: 28px;
  409. margin-left: 24px;
  410. justify-content: flex-start;
  411. width: auto;
  412. flex-direction: row;
  413. flex-wrap: nowrap;
  414. font-size: 14px;
  415. font-family: Source Han Sans CN;
  416. font-weight: bold;
  417. color: #252744;
  418. }
  419. .product-add {
  420. width: 50px;
  421. height: 50px;
  422. margin-right: 24px;
  423. }
  424. }
  425. }
  426. }
  427. }
  428. .item3 {
  429. display: flex;
  430. flex-direction: column;
  431. flex-wrap: nowrap;
  432. align-content: center;
  433. justify-content: center;
  434. align-items: center;
  435. background: #F6F6F8;
  436. box-shadow: 0px 12px 24px 0px #EDEDED;
  437. border-radius: 24px;
  438. border: 1px solid #FFFFFF;
  439. width: 280px;
  440. height: 400px;
  441. margin: 10px 10px;
  442. .item3_name {
  443. font-family: Source Han Sans CN;
  444. font-weight: 400;
  445. font-size: 14px;
  446. color: #252744;
  447. margin-top: 15px;
  448. }
  449. .item3_image {
  450. margin: 15px;
  451. width: 100%;
  452. padding: 10px;
  453. el-image{
  454. width: 100%;
  455. }
  456. }
  457. .item3_btn_row {
  458. margin-bottom: 15px;
  459. .item3_btn {
  460. background: #252744;
  461. border-radius: 16px;
  462. font-family: Microsoft YaHei;
  463. font-weight: 400;
  464. font-size: 12px;
  465. color: #FFFFFF;
  466. padding-left: 20px;
  467. padding-right: 20px;
  468. padding-top: 8px;
  469. padding-bottom: 8px;
  470. }
  471. }
  472. }
  473. .item4 {
  474. width: 680px;
  475. height: 210px;
  476. margin: 10px 20px;
  477. background: #FDFDFD;
  478. box-shadow: 0px 24px 60px 0px #E5E5E5;
  479. border-radius: 16px;
  480. position: relative;
  481. .item4_index_image {
  482. width: 50px;
  483. height: 50px;
  484. position: absolute;
  485. left: 26px;
  486. z-index: 100;
  487. img {
  488. width: 100%;
  489. }
  490. }
  491. .item4_content {
  492. width: 100%;
  493. height: 100%;
  494. position: absolute;
  495. display: flex;
  496. flex-direction: row;
  497. flex-wrap: nowrap;
  498. align-content: center;
  499. justify-content: space-between;
  500. align-items: center;
  501. .item4_image {
  502. width: 164px;
  503. height: 164px;
  504. background: #F6F6F7;
  505. border-radius: 8rpx;
  506. margin: 24px;
  507. img {
  508. width: 100%;
  509. }
  510. }
  511. .item4_info {
  512. height: 100%;
  513. padding-top: 46px;
  514. padding-bottom: 46px;
  515. flex: 1;
  516. display: flex;
  517. flex-direction: column;
  518. flex-wrap: nowrap;
  519. align-content: center;
  520. justify-content: space-between;
  521. align-items: flex-start;
  522. .item4_name {
  523. font-family: Microsoft YaHei;
  524. font-weight: bold;
  525. font-size: 20px;
  526. color: #252744;
  527. }
  528. .item4_price {
  529. font-family: Source Han Sans CN;
  530. font-weight: 400;
  531. font-size: 20px;
  532. color: #252744;
  533. }
  534. }
  535. .item4_arrow {
  536. width: 20px;
  537. height: 20px;
  538. margin: 24px;
  539. img {
  540. width: 100%;
  541. height: 100%;
  542. }
  543. }
  544. }
  545. }
  546. }
  547. //::v-deep .swiper-pagination-bullet{
  548. // display: none;
  549. //}
  550. }
  551. }
  552. .pagination {
  553. display: flex;
  554. justify-content: center;
  555. padding: 20px 0;
  556. ::v-deep .swiper-pagination-bullet {
  557. width: 10px;
  558. height: 10px;
  559. background: #333333;
  560. opacity: 0.3;
  561. border-radius: 5px;
  562. margin: 0 5px;
  563. }
  564. ::v-deep .swiper-pagination-bullet-active {
  565. width: 20px;
  566. height: 10px;
  567. opacity: 1;
  568. }
  569. }
  570. .btn-more {
  571. width: 170px;
  572. height: 54px;
  573. border: 2px solid #C5AA7B;
  574. color: #C5AA7B;
  575. font-size: 24px;
  576. background-color: transparent;
  577. margin: 20px auto 0;
  578. display: block;
  579. }
  580. </style>