homeTab.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. <template>
  2. <!-- tab选项卡 -->
  3. <view class="index-product-wrapper" :style="[mbConfig]">
  4. <view class="nav-bd longTab" :style="[tabBgColor]">
  5. <scroll-view scroll-x="true" style="white-space: nowrap; display: flex" :scroll-left="tabLeft">
  6. <view class="longItem"
  7. :style="'color:' + (index == ProductNavindex ? checkColor : fontColor)+';--color:'+checkColor"
  8. :data-index="index" :class="index===ProductNavindex?'click':''" v-for="(item,index) in navList"
  9. :key="index" :id="'id'+index" @click="ProductNavTab(item, index)">{{ item.val }}
  10. </view>
  11. </scroll-view>
  12. </view>
  13. <view :style="[boxStyle]">
  14. <!-- 单列 -->
  15. <block v-if="itemStyle == 0">
  16. <view class="listA" :style="[gridGap]">
  17. <view class="item" v-for="(item, index) in tempArr" :key="index" @click="goDetail(item)">
  18. <view class="pictrue">
  19. <view v-show="item.stock===0" class="sellOut">已售罄</view>
  20. <easy-loadimage :image-src="item.image"
  21. :radius="dataConfig.contentStyle.val"></easy-loadimage>
  22. <view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }"
  23. class="border-picture"></view>
  24. </view>
  25. <view class="text-info text-add">
  26. <view>
  27. <view class="title box-line2" :style="[titleColor]">
  28. <text v-if="item.productTags && item.productTags.locationLeftTitle.length"
  29. class="font-bg-red mr10 merType bg-color">{{item.productTags.locationLeftTitle[0].tagName}}</text>
  30. <text v-if="titleShow">{{ item.name }}</text>
  31. </view>
  32. </view>
  33. <view v-if="item.productTags && item.productTags.locationUnderTitle.length">
  34. <text
  35. v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
  36. :key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
  37. </view>
  38. <view class="price acea-row row-middle" :style="[priceColor]">
  39. <view v-if="priceShow">
  40. <svip-price :svipIconStyle="svipIconStyle" :productPrice="item"
  41. :svipPriceStyle="svipPriceStyle" :priceColor="priceColor"></svip-price>
  42. </view>
  43. </view>
  44. <view class="old-price" v-if="soldShow" :style="[soldColor]">
  45. 已售 {{ item.sales || 0 }} {{ item.unitName }}
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </block>
  51. <!-- 两列 -->
  52. <block v-if="itemStyle == 1">
  53. <view class="listC" :style="[gridGap]">
  54. <view class="item" :style="[contentStyle]" v-for="(item, index) in tempArr" :key="index"
  55. @click="goDetail(item)">
  56. <view class="pictrue">
  57. <view v-show="item.stock===0" class="sellOut">已售罄</view>
  58. <easy-loadimage :image-src="item.image"
  59. :radius="dataConfig.contentStyle.val"></easy-loadimage>
  60. <view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }"
  61. class="border-picture"></view>
  62. </view>
  63. <view class="text-info">
  64. <view class="title box-line2" :style="[titleColor]">
  65. <text v-if="item.productTags && item.productTags.locationLeftTitle.length"
  66. class="font-bg-red mr10 merType bg-color">{{item.productTags.locationLeftTitle[0].tagName}}</text>
  67. <text v-if="titleShow">{{ item.name }}</text>
  68. </view>
  69. <view v-if="item.productTags && item.productTags.locationUnderTitle.length">
  70. <text
  71. v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
  72. :key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
  73. </view>
  74. <view class="row-middle price" :style="[priceColor]">
  75. <view v-if="priceShow">
  76. <svip-price :svipIconStyle="svipIconStyle" :priceColor="priceColor"
  77. :productPrice="item" :svipPriceStyle="svipPriceStyle"></svip-price>
  78. </view>
  79. <view class="old-price " v-if="soldShow" :style="[soldColor]">
  80. 已售 {{ item.sales || 0 }} {{ item.unitName }}
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </block>
  87. <!-- 三列 -->
  88. <block v-if="itemStyle == 2">
  89. <view class="listB" :style="[gridGap]">
  90. <view class="item" v-for="(item, index) in tempArr" :key="index" @click="goDetail(item)">
  91. <view class="pictrue">
  92. <view v-show="item.stock===0" class="sellOut">已售罄</view>
  93. <easy-loadimage :image-src="item.image"
  94. :radius="dataConfig.contentStyle.val"></easy-loadimage>
  95. <view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }"
  96. class="border-picture"></view>
  97. </view>
  98. <view class="text-info">
  99. <view class="title box-line2" :style="[titleColor]">
  100. <text v-if="item.productTags && item.productTags.locationLeftTitle.length"
  101. class="font-bg-red mr10 merType bg-color">{{item.productTags.locationLeftTitle[0].tagName}}</text>
  102. <text v-if="titleShow">{{ item.name }}</text>
  103. </view>
  104. <view v-if="item.productTags && item.productTags.locationUnderTitle.length">
  105. <text
  106. v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
  107. :key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
  108. </view>
  109. <view class="price" :style="[priceColor]">
  110. <view v-if="priceShow">
  111. <svip-price :svipIconStyle="svipIconStyle" :priceColor="priceColor"
  112. :productPrice="item" :svipPriceStyle="svipPriceStyle"></svip-price>
  113. </view>
  114. </view>
  115. <view class="old-price" v-if="soldShow" :style="[soldColor]">
  116. 已售 {{ item.sales || 0 }} {{ item.unitName }}
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </block>
  122. <!-- 大图 -->
  123. <block v-if="itemStyle == 3 && tempArr.length">
  124. <view class="listBig" :style="[gridGap]">
  125. <view class="itemBig" v-for="(item,index) in tempArr" :key="index" @click="goDetail(item)">
  126. <view class="img-box">
  127. <view v-show="item.stock===0" class="sellOut">已售罄</view>
  128. <easy-loadimage :image-src="item.image"
  129. :radius="dataConfig.contentStyle.val"></easy-loadimage>
  130. <view v-if="item.activityStyle" :style="{ backgroundImage: `url(${item.activityStyle})` }"
  131. class="border-picture"></view>
  132. </view>
  133. <view class="name box-line2" :style="[titleColor]">
  134. <text v-if="item.productTags && item.productTags.locationLeftTitle.length"
  135. class="font-bg-red merType mr10 bg-color">{{item.productTags.locationLeftTitle[0].tagName}}</text>
  136. <text v-if="titleShow">{{item.name}}</text>
  137. </view>
  138. <view style="padding: 0 8px;"
  139. v-if="item.productTags && item.productTags.locationUnderTitle.length">
  140. <text
  141. v-for="items in item.productTags.locationUnderTitle.length>3?item.productTags.locationUnderTitle.slice(0,3):item.productTags.locationUnderTitle"
  142. :key="items.id" class="mr10 tagSolid">{{items.tagName}}</text>
  143. </view>
  144. <slot name="center"></slot>
  145. <view class="row-middle price" :style="[priceColor]">
  146. <view v-if="priceShow">
  147. <svip-price :svipIconStyle="svipIconStyle" :priceColor="priceColor" :productPrice="item"
  148. :svipPriceStyle="svipPriceStyle"></svip-price>
  149. </view>
  150. <view class="old-price mt18" v-if="soldShow" :style="[soldColor]">
  151. 已售 {{ item.sales || 0 }} {{ item.unitName }}
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. </block>
  157. </view>
  158. </view>
  159. </template>
  160. <script>
  161. // +----------------------------------------------------------------------
  162. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  163. // +----------------------------------------------------------------------
  164. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  165. // +----------------------------------------------------------------------
  166. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  167. // +----------------------------------------------------------------------
  168. // | Author: CRMEB Team <admin@crmeb.com>
  169. // +----------------------------------------------------------------------
  170. import {
  171. productList,
  172. productByidsApi
  173. } from '@/api/product.js';
  174. let app = getApp();
  175. import easyLoadimage from '@/components/base/easy-loadimage.vue';
  176. import svipPrice from '@/components/svipPrice.vue';
  177. import {
  178. getMerProListApi
  179. } from "../../api/merchant";
  180. export default {
  181. name: 'homeTab',
  182. props: {
  183. dataConfig: {
  184. type: Object,
  185. default: () => {}
  186. },
  187. merId: { // 商户id
  188. type: Number,
  189. default: 0
  190. },
  191. },
  192. data() {
  193. return {
  194. //普通价格
  195. svipPriceStyle: {
  196. svipBox: {
  197. height: '26rpx',
  198. borderRadius: '60rpx 56rpx 56rpx 20rpx',
  199. },
  200. icon: {
  201. height: '26rpx',
  202. fontSize: '18rpx',
  203. borderRadius: '12rpx 0 12rpx 2rpx'
  204. },
  205. price: {
  206. fontSize: '38rpx'
  207. },
  208. svipPrice: {
  209. fontSize: '22rpx'
  210. }
  211. },
  212. //svip价格
  213. svipIconStyle: {
  214. svipBox: {
  215. height: '26rpx',
  216. borderRadius: '24rpx 40rpx 40rpx 0.4rpx',
  217. },
  218. price: {
  219. fontSize: '38rpx'
  220. },
  221. svipPrice: {
  222. fontSize: '18rpx'
  223. }
  224. },
  225. tempArr: [],
  226. iSshowH: false,
  227. ProductNavindex: 0,
  228. itemStyle: 0, //样式类型
  229. themeColor: '#f00',
  230. titleConfig: 1, //标题位置
  231. infoColor: '#999',
  232. goodType: 3,
  233. loadend: false,
  234. loading: false,
  235. page: 1,
  236. goodsSort: 0, //排序,0综合,1销量,2价格
  237. isWidth: 0, //每个导航栏占位
  238. tabLeft: 0,
  239. limit: 0 ,//分页条数
  240. themeColor:this.$options.filters.filterTheme(app.globalData.theme)
  241. };
  242. },
  243. components: {
  244. easyLoadimage,
  245. svipPrice
  246. },
  247. created() {
  248. let that = this
  249. uni.getSystemInfo({
  250. success(e) {
  251. that.isWidth = (e.windowWidth) / 5;
  252. }
  253. })
  254. },
  255. computed: {
  256. //标签文字颜色
  257. fontColor() {
  258. return this.dataConfig.fontColor.color[0].item
  259. },
  260. //选中颜色
  261. checkColor() {
  262. return this.dataConfig.checkThemeStyleConfig.tabVal?this.dataConfig.checkColor.color[0].item:this.themeColor
  263. },
  264. //选项卡背景颜色
  265. tabBgColor() {
  266. return {
  267. background: `linear-gradient(${this.dataConfig.tabBgColor.color[0].item}, ${this.dataConfig.tabBgColor.color[1].item})`,
  268. };
  269. },
  270. //页面间距
  271. mbConfig() {
  272. return {
  273. marginTop: this.dataConfig.mbConfig.val ? this.dataConfig.mbConfig.val + 'px' : 0
  274. }
  275. },
  276. //分类列表
  277. navList() {
  278. return this.dataConfig.tabItemConfig.list;
  279. },
  280. //最外层盒子的样式
  281. boxStyle() {
  282. return {
  283. borderRadius: this.dataConfig.bgStyle.val * 2 + 'rpx',
  284. background: `linear-gradient(${this.dataConfig.bgColor.color[0].item}, ${this.dataConfig.bgColor.color[1].item})`,
  285. margin: this.dataConfig.topConfig.val * 2 + 'rpx' + ' ' + this.dataConfig.lrConfig.val * 2 + 'rpx' +
  286. ' ' + 0,
  287. padding: this.dataConfig.upConfig.val * 2 + 'rpx' + ' ' + 0 + ' ' + this.dataConfig.downConfig.val *
  288. 2 + 'rpx'
  289. }
  290. },
  291. //商品间距
  292. gridGap() {
  293. return {
  294. 'grid-gap': this.dataConfig.contentConfig.val * 2 + 'rpx'
  295. }
  296. },
  297. //图片的圆角和高度
  298. imgStyle() {
  299. return {
  300. 'border-radius': this.dataConfig.contentStyle.val * 2 + 'rpx',
  301. }
  302. },
  303. //价格颜色
  304. priceColor() {
  305. return {
  306. 'color': this.dataConfig.priceThemeStyleConfig.tabVal?this.dataConfig.priceColor.color[0].item:this.themeColor,
  307. }
  308. },
  309. //商品名称颜色
  310. titleColor() {
  311. return {
  312. 'color': this.dataConfig.titleColor.color[0].item,
  313. }
  314. },
  315. //已售数量
  316. soldColor() {
  317. return {
  318. 'color': this.dataConfig.soldColor.color[0].item,
  319. }
  320. },
  321. //商品名称
  322. titleShow() {
  323. if (this.dataConfig.tabItemConfig.list[this.ProductNavindex] && this.dataConfig.tabItemConfig.list[this
  324. .ProductNavindex].activeList.showContent.includes(0)) {
  325. return true;
  326. } else {
  327. return false;
  328. }
  329. },
  330. //价格
  331. priceShow() {
  332. if (this.dataConfig.tabItemConfig.list[this.ProductNavindex] && this.dataConfig.tabItemConfig.list[this
  333. .ProductNavindex].activeList.showContent.includes(1)) {
  334. return true;
  335. } else {
  336. return false;
  337. }
  338. },
  339. //销量
  340. soldShow() {
  341. if (this.dataConfig.tabItemConfig.list[this.ProductNavindex] && this.dataConfig.tabItemConfig.list[this
  342. .ProductNavindex].activeList.showContent.includes(2)) {
  343. return true;
  344. } else {
  345. return false;
  346. }
  347. },
  348. //内容圆角
  349. contentStyle() {
  350. return {
  351. 'border-radius': this.dataConfig.contentStyle.val ? this.dataConfig.contentStyle.val + 'px' : '0'
  352. };
  353. },
  354. },
  355. mounted() {
  356. //默认加载第一项的商品数据
  357. if (this.navList && this.navList.length) {
  358. this.itemStyle = this.navList[0].activeList ? this.navList[0].activeList.styleType : 0;
  359. if (this.navList[0].activeList && this.navList[0].activeList.activeProTabIndex == 0) {
  360. this.getProductByids(this.navList[0].activeList.goods);
  361. } else {
  362. this.limit = this.navList[0].activeList ? this.navList[0].activeList.num : 3;
  363. if (this.navList[0].activeList) {
  364. this.getGoodList(this.navList[0].activeList);
  365. }
  366. }
  367. }
  368. },
  369. //uniapp小程序用deep重写组件样式不生效
  370. options: {
  371. styleIsolation: 'shared'
  372. },
  373. methods: {
  374. //根据商品id集合查询对应商品
  375. getProductByids(data) {
  376. if (!data.length) return;
  377. uni.showLoading({
  378. title: '加载中...'
  379. });
  380. let ids = data.map((item) => item.id).join(',');
  381. productByidsApi(ids).then((res) => {
  382. this.tempArr = res.data;
  383. uni.hideLoading();
  384. })
  385. .catch(res => {
  386. uni.hideLoading();
  387. });
  388. },
  389. // 选项卡切换点击事件;商品类型选择除第一个指定商品,加载商品从平台端获取数据,其余选项均请求接口加载
  390. changeTab(item, index) {
  391. this.tempArr = [];
  392. if (item.activeList.activeProTabIndex == 0) {
  393. this.getProductByids(item.activeList.goods);
  394. } else {
  395. this.page = 1;
  396. this.loadend = false;
  397. this.getGoodList(item.activeList);
  398. }
  399. },
  400. // 商品列表
  401. async getGoodList(item) {
  402. let val = item.activeValue; //分类id,品牌id,商户id
  403. let goodsSort = item.goodsSort // 商品排序,0综合,1按销量,2按价格
  404. let typeIndex = item.activeProTabIndex //1分类,2品牌,3商户
  405. let priceOrder = '';
  406. let salesOrder = '';
  407. if (this.loadend) return false;
  408. if (this.loading) return false;
  409. if (goodsSort === 0) {
  410. priceOrder = '';
  411. salesOrder = '';
  412. } else if (goodsSort === 1) {
  413. priceOrder = '';
  414. salesOrder = 'desc';
  415. } else {
  416. priceOrder = 'desc';
  417. salesOrder = '';
  418. }
  419. let params = {
  420. page: this.page,
  421. limit: this.limit,
  422. brandId: this.merId ? null : typeIndex == 2 ? val : '',
  423. cid: !this.merId && typeIndex == 1 ? val : '',
  424. merId: this.merId ? this.merId : typeIndex == 3 ? val : '',
  425. priceOrder: priceOrder,
  426. salesOrder: salesOrder,
  427. cids: this.merId && typeIndex == 1 ? val : '',
  428. }
  429. if (this.merId) {
  430. delete params.cid;
  431. delete params.brandId;
  432. }
  433. const {
  434. code,
  435. data
  436. } = this.merId ? await getMerProListApi(params) : await productList(params)
  437. if (code == 200) {
  438. let list = data.list;
  439. this.tempArr = this.$util.SplitArray(list, this.tempArr);
  440. let loadend = list.length < this.limit;
  441. this.loadend = loadend;
  442. this.page = this.page + 1;
  443. }
  444. this.loading = false;
  445. },
  446. getMerGoodList() {
  447. getMerProListApi(this.params).then(res => {
  448. this.$set(this.params, 'page', this.params.page + 1);
  449. this.goodScroll = this.params.page > res.data.totalPage;
  450. this.tempArr = this.tempArr.concat(res.data.list || []);
  451. this.loading = false
  452. });
  453. },
  454. // 选项卡切换
  455. ProductNavTab(item, index) {
  456. this.ProductNavindex = index;
  457. this.itemStyle = this.navList[index].activeList.styleType;
  458. this.goodsSort = item.activeList.goodsSort;
  459. this.$nextTick(() => {
  460. let id = 'id' + index;
  461. this.tabLeft = (index - 2) * this.isWidth //设置下划线位置
  462. })
  463. this.limit = item.activeList.num;
  464. this.changeTab(item, index);
  465. },
  466. goDetail(item) {
  467. this.$emit('detail', item);
  468. }
  469. }
  470. }
  471. </script>
  472. <style lang="scss" scoped>
  473. /deep/.x-money {
  474. color: inherit !important;
  475. }
  476. .longTab {
  477. .longItem {
  478. height: 70rpx;
  479. display: inline-block;
  480. line-height: 70rpx;
  481. text-align: center;
  482. font-size: 28rpx;
  483. color: #333333;
  484. white-space: nowrap;
  485. margin-right: 46rpx;
  486. &.click {
  487. font-weight: bold;
  488. font-size: 30rpx;
  489. position: relative;
  490. &::after {
  491. content: '';
  492. width: 40rpx;
  493. height: 4rpx;
  494. background: var(--color);
  495. position: absolute;
  496. bottom: 0;
  497. left: 50%;
  498. transform: translateX(-50%);
  499. }
  500. }
  501. }
  502. }
  503. .index-product-wrapper {
  504. &.on {
  505. min-height: 1500rpx;
  506. }
  507. .nav-bd {
  508. height: 70rpx;
  509. line-height: 70rpx;
  510. padding-left: 20rpx;
  511. background: #fff;
  512. .item {
  513. display: inline-block;
  514. font-size: 28rpx;
  515. color: #333;
  516. font-weight: 400;
  517. padding-right: 48rpx;
  518. &.on {
  519. border-radius: 0;
  520. }
  521. }
  522. }
  523. }
  524. .text-add {
  525. display: flex;
  526. flex-direction: column;
  527. justify-content: space-between;
  528. }
  529. .listBig {
  530. display: grid;
  531. grid-template-rows: auto;
  532. grid-template-columns: repeat(1, 1fr);
  533. padding: 0 20rpx;
  534. .itemBig {
  535. width: 100%;
  536. .img-box {
  537. width: 100%;
  538. height: 710rpx;
  539. position: relative;
  540. }
  541. .name {
  542. font-size: 28rpx;
  543. font-weight: bold;
  544. margin-top: 16rpx;
  545. }
  546. .price {
  547. font-size: 12px;
  548. margin-top: 10rpx;
  549. .num {
  550. font-size: 32rpx;
  551. margin-right: 10rpx;
  552. }
  553. .old-price {
  554. color: #aaa;
  555. font-weight: normal;
  556. }
  557. }
  558. }
  559. }
  560. .listA {
  561. display: grid;
  562. grid-template-columns: repeat(1, 1fr);
  563. grid-template-rows: auto;
  564. width: 100%;
  565. padding: 0 20rpx;
  566. .item {
  567. display: flex;
  568. width: 100%;
  569. .pictrue {
  570. width: 220rpx;
  571. height: 220rpx;
  572. position: relative;
  573. image {
  574. width: 100%;
  575. height: 100%;
  576. }
  577. }
  578. .text-info {
  579. margin-left: 14rpx;
  580. flex: 1
  581. }
  582. }
  583. }
  584. .listB {
  585. display: grid;
  586. grid-template-columns: repeat(3, 1fr);
  587. grid-template-rows: auto;
  588. width: 100%;
  589. padding: 0 20rpx;
  590. .item {
  591. .pictrue {
  592. width: 100%;
  593. height: 220rpx;
  594. position: relative;
  595. image {
  596. width: 100%;
  597. height: 100%;
  598. }
  599. }
  600. .text-info {
  601. padding: 16rpx 0;
  602. }
  603. }
  604. }
  605. .listC {
  606. display: grid;
  607. grid-template-columns: repeat(2, 1fr);
  608. grid-template-rows: auto;
  609. width: 100%;
  610. padding: 0 20rpx;
  611. /deep/.origin-img,
  612. /deep/.easy-loadimage {
  613. border-bottom-left-radius: 0 !important;
  614. border-bottom-right-radius: 0 !important;
  615. }
  616. .item {
  617. background-color: #fff;
  618. overflow: hidden;
  619. .pictrue {
  620. width: 100%;
  621. height: 345rpx;
  622. overflow: hidden;
  623. position: relative;
  624. image {
  625. width: 100%;
  626. height: 100%;
  627. }
  628. }
  629. .text-info {
  630. padding: 16rpx 0;
  631. .title {
  632. width: 300rpx;
  633. }
  634. }
  635. }
  636. }
  637. .text-info {
  638. .title {
  639. width: 100%;
  640. height: 80rpx;
  641. line-height: 40rpx;
  642. color: #333;
  643. }
  644. .old-price {
  645. font-weight: normal;
  646. font-size: 24rpx;
  647. color: #999;
  648. }
  649. .price {
  650. font-size: 36rpx;
  651. font-weight: 550;
  652. text {
  653. padding-bottom: 4rpx;
  654. font-size: 26rpx;
  655. font-weight: normal;
  656. }
  657. }
  658. }
  659. .mer_badge {
  660. padding: 0 4rpx;
  661. background-color: theme;
  662. color: #fff;
  663. font-size: 20rpx;
  664. display: inline-block;
  665. border-radius: 4rpx;
  666. line-height: 28rpx;
  667. height: 28rpx;
  668. }
  669. .mt18 {
  670. margin-top: 16rpx;
  671. }
  672. .box-line2 {
  673. overflow: hidden;
  674. }
  675. </style>