collection.vue 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. <template>
  2. <view class="container product clearfix">
  3. <view class="superv-header" v-if="!isEmpty">
  4. <view class="superv-header-click">
  5. <view class="oltext"
  6. >共<text class="red">{{ totalRecord }}</text
  7. >件商品</view
  8. >
  9. <view class="ortext" @click="showPopup(0)" v-if="!popupShow">编辑</view>
  10. <view class="ortext" @click="hidePopup(0)" v-else>完成</view>
  11. </view>
  12. </view>
  13. <view class="product-content" :style="{ paddingBottom: popupShow ? '68rpx' : '0' }">
  14. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
  15. <!-- 空白页 -->
  16. <view class="empty-container" v-if="isEmpty">
  17. <image
  18. class="empty-container-image"
  19. :src="StaticUrl + '/icon/icon-collection-empty@2x.png'"
  20. ></image>
  21. <text class="error-text">暂无收藏商品~</text>
  22. </view>
  23. <!-- 列表 -->
  24. <view class="tui-cart-cell tui-mtop" v-for="(pros, index) in productList" :key="index">
  25. <view class="tui-goods-item">
  26. <view class="tui-goods-main">
  27. <view class="tui-goods-checkBox" v-if="popupShow">
  28. <view
  29. class="checkbox iconfont"
  30. :class="[pros.isChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  31. @click="checkedSoperv(pros)"
  32. >
  33. </view>
  34. </view>
  35. <view class="tui-goods-image" @click.stop="navToDetailPage(pros.productId)"
  36. ><image :src="pros.image" class="tui-goods-img" />
  37. </view>
  38. <view
  39. class="tui-goods-info"
  40. :style="{ width: popupShow ? '420rpx' : '528rpx' }"
  41. @click.stop="navToDetailPage(pros.productId)"
  42. >
  43. <text class="list-details-title">{{ pros.name }}</text>
  44. <text class="list-details-specs">规格:{{ pros.unit != null ? pros.unit : '' }}</text>
  45. <view class="list-details-price" v-if="pros.priceFlag == 1">
  46. <view class="list-none"><view class="price-small">¥未公开价格</view></view>
  47. </view>
  48. <view class="list-details-price" v-else-if="pros.priceFlag == 2">
  49. <view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
  50. </view>
  51. <template v-else>
  52. <view class="list-details-price">
  53. <view class="list-price">
  54. <text
  55. class="price-larger"
  56. :class="PromotionsFormat(pros.promotions) ? 'none' : ''"
  57. >
  58. ¥{{
  59. (PromotionsFormat(pros.promotions)
  60. ? pros.originalPrice
  61. : pros.price) | NumFormat
  62. }}
  63. </text>
  64. </view>
  65. <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
  66. >数量</view
  67. >
  68. </view>
  69. <view class="list-details-price none">
  70. <view class="floor-item-act" v-if="pros.actStatus == 1">
  71. <template>
  72. <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
  73. {{ pros.promotions.name }}
  74. <text v-if="pros.priceFlag != 1"
  75. >:¥{{ pros.price | NumFormat }}</text
  76. >
  77. </view>
  78. <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
  79. </template>
  80. </view>
  81. <view class="floor-item-act" v-if="pros.actStatus == 0">
  82. <view
  83. class="floor-tags"
  84. v-if="pros.actStatus == 0 && pros.ladderPriceFlag == 1"
  85. >阶梯价格</view
  86. >
  87. </view>
  88. </view>
  89. </template>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. <!--加载loadding-->
  95. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  96. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"></tui-nomore>
  97. <!--加载loadding-->
  98. </view>
  99. </view>
  100. <!-- 取消收藏操作 -->
  101. <tui-bottom-popup :radius="false" :mask="false" :show="popupShow">
  102. <view class="tui-popup-box clearfix">
  103. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  104. <view class="tui-flex-1">
  105. <view class="superv-header-checked">
  106. <view class="oltext" @click="isCheckedAll">
  107. <view
  108. class="checkbox iconfont"
  109. :class="[isAllChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  110. ></view>
  111. <view class="text">全选</view>
  112. </view>
  113. </view>
  114. <view class="tui-button" :class="isProductChecked ? 'active' : ''" @click="handleAllUnder"
  115. >取消收藏</view
  116. >
  117. </view>
  118. </view>
  119. </view>
  120. </tui-bottom-popup>
  121. <!-- 购买弹窗 -->
  122. <tui-bottom-popup :radius="true" :show="popupShow1" @close="hidePopup(1)">
  123. <view class="tui-popup-box clearfix">
  124. <view class="tui-popup-content">
  125. <view class="layer-smimg"> <image :src="handleData.image" mode=""></image> </view>
  126. <view class="layer-nunbox">
  127. <view class="layer-nunbox-t">
  128. <view class="layer-nunbox-text">数量:</view>
  129. <view class="number-box">
  130. <view
  131. class="iconfont icon-jianhao"
  132. :class="[isQuantity == true ? 'disabled' : '']"
  133. @click="changeCountSub()"
  134. ></view>
  135. <input
  136. class="btn-input"
  137. type="number"
  138. v-model="number"
  139. maxlength="4"
  140. @blur="changeNumber($event)"
  141. />
  142. <view
  143. class="iconfont icon-jiahao"
  144. :class="[isStock == true ? 'disabled' : '']"
  145. @click="changeCountAdd()"
  146. ></view>
  147. </view>
  148. </view>
  149. <view class="layer-nunbox-b">
  150. <view class="text"
  151. >单价: <text class="p sm">¥</text>
  152. <text class="p bg">{{ buyRetailPrice.toFixed(2) }}</text>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  158. <view class="tui-flex-btn">
  159. <view class="button add" @click="getAddProductCart">加入购物车</view>
  160. <view class="button buy" @click="toConfirmation">立即购买</view>
  161. </view>
  162. </view>
  163. </view>
  164. </tui-bottom-popup>
  165. <!-- 弹窗提示 -->
  166. <tui-modal
  167. :show="modal"
  168. @click="handleClick"
  169. @cancel="hideMobel"
  170. :content="contentModalText"
  171. :button="modalButton"
  172. color="#333"
  173. :size="32"
  174. shape="circle"
  175. :maskClosable="false"
  176. >
  177. </tui-modal>
  178. <!-- 可拖动悬浮按钮 -->
  179. <cm-drag
  180. :cartNum="cartQuantity"
  181. :isDock="true"
  182. :existTabBar="true"
  183. @btnClick="btnClick"
  184. @btnTouchstart="btnTouchstart"
  185. @btnTouchend="btnTouchend"
  186. >
  187. </cm-drag>
  188. </view>
  189. </template>
  190. <script>
  191. import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  192. import tuiNomore from '@/components/tui-components/nomore/nomore'
  193. import cmDrag from '@/components/cm-custom/cm-drag.vue'
  194. import { mapState, mapMutations } from 'vuex'
  195. const defaultListQuery = {
  196. userId: 0,
  197. pageNum: 1,
  198. pageSize: 10
  199. }
  200. export default {
  201. components: {
  202. tuiLoadmore,
  203. tuiNomore,
  204. cmDrag
  205. },
  206. data() {
  207. return {
  208. StaticUrl: this.$Static,
  209. modalButton: [
  210. {
  211. text: '取消',
  212. type: 'gray',
  213. plain: true //是否空心
  214. },
  215. {
  216. text: '确认',
  217. customStyle: {
  218. color: '#fff',
  219. bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
  220. },
  221. plain: false
  222. }
  223. ],
  224. totalRecord: 0,
  225. cartQuantity: 0,
  226. popupShow: false,
  227. popupShow1: false,
  228. isProductChecked: false,
  229. listQuery: Object.assign({}, defaultListQuery),
  230. productList: [],
  231. handleData: {},
  232. number: 0,
  233. buyRetailPrice: 0,
  234. buyRetailPriceStep: 1,
  235. isQuantity: false,
  236. scrollTop: 0,
  237. isEmpty: false,
  238. isAllChecked: false,
  239. loadding: false,
  240. pullUpOn: true,
  241. pullFlag: true,
  242. hasNextPage: false,
  243. navbarHeight: '',
  244. nomoreText: '上拉显示更多',
  245. contentModalText: '', //操作文字提示语句
  246. modal: false
  247. }
  248. },
  249. onLoad() {
  250. this.initGetStotage()
  251. },
  252. filters: {
  253. NumFormat: function(text) {
  254. //处理金额
  255. return Number(text).toFixed(2)
  256. }
  257. },
  258. computed: {
  259. ...mapState(['hasLogin', 'userInfo'])
  260. },
  261. methods: {
  262. ...mapMutations(['login', 'logout']),
  263. async initGetStotage() {
  264. const userInfo = await this.$api.getStorage()
  265. this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
  266. this.GetProductListInfo()
  267. this.shoppingHeaderCartNumber()
  268. },
  269. GetProductListInfo() {
  270. this.productList = []
  271. this.listQuery.pageNum = 1
  272. this.ProductService.getProductUserLikeList(this.listQuery)
  273. .then(response => {
  274. let data = response.data
  275. if (data.results && data.results.length > 0) {
  276. this.isEmpty = false
  277. this.hasNextPage = data.hasNextPage
  278. this.totalRecord = data.totalRecord
  279. this.productList = data.results
  280. this.pullFlag = false
  281. setTimeout(() => {
  282. this.pullFlag = true
  283. }, 500)
  284. if (this.hasNextPage) {
  285. this.pullUpOn = false
  286. this.nomoreText = '上拉显示更多'
  287. } else {
  288. if (this.productList.length < 8) {
  289. this.pullUpOn = true
  290. } else {
  291. this.pullUpOn = false
  292. this.loadding = false
  293. this.nomoreText = '已至底部'
  294. }
  295. }
  296. } else {
  297. this.isEmpty = true
  298. }
  299. this.isRequest = true
  300. })
  301. .catch(error => {
  302. this.$util.msg(error.msg, 2000)
  303. })
  304. },
  305. GetOnReachBottomData(index) {
  306. //上拉加载
  307. this.listQuery.pageNum += 1
  308. this.ProductService.getProductUserLikeList(this.listQuery)
  309. .then(response => {
  310. let data = response.data
  311. if (data.results && data.results.length > 0) {
  312. this.hasNextPage = data.hasNextPage
  313. this.productList = this.productList.concat(data.results)
  314. this.pullFlag = false // 防上拉暴滑
  315. setTimeout(() => {
  316. this.pullFlag = true
  317. }, 500)
  318. if (this.hasNextPage) {
  319. this.pullUpOn = false
  320. this.nomoreText = '上拉显示更多'
  321. } else {
  322. this.pullUpOn = false
  323. this.loadding = false
  324. this.nomoreText = '已至底部'
  325. }
  326. }
  327. })
  328. .catch(error => {
  329. this.$util.msg(error.msg, 2000)
  330. })
  331. },
  332. shoppingHeaderCartNumber() {
  333. // 获取用户购物车储量
  334. this.ProductService.shoppingHeaderCartNumber({
  335. userId: this.listQuery.userId
  336. })
  337. .then(response => {
  338. this.cartQuantity = response.data.length
  339. })
  340. .catch(error => {
  341. console.log('获取购物车数量失败')
  342. })
  343. },
  344. handleAllUnder() {
  345. //批量下架操作
  346. let checkedArray = []
  347. this.productIds = ''
  348. if (this.isProductChecked) {
  349. this.productList.forEach(el => {
  350. if (el.isChecked) {
  351. checkedArray.push(el)
  352. }
  353. })
  354. checkedArray.forEach(el => {
  355. this.productIds += el.productId + ','
  356. })
  357. this.modal = true
  358. this.contentModalText = '确定要取消收藏吗?'
  359. }
  360. },
  361. handleClick(e) {
  362. //取消收藏
  363. if (e.index == 1) {
  364. this.handleDeleteUserLike()
  365. }
  366. this.modal = false
  367. },
  368. handleDeleteUserLike() {
  369. //操作取消收藏
  370. this.ProductService.getDeleteUserLike({
  371. productIds: this.productIds,
  372. userId: this.listQuery.userId
  373. })
  374. .then(response => {
  375. this.$util.msg('取消收藏成功', 2000, true, 'success')
  376. setTimeout(() => {
  377. this.GetProductListInfo()
  378. }, 2000)
  379. })
  380. .catch(error => {
  381. this.$util.msg(error.msg, 2000)
  382. })
  383. },
  384. hideMobel() {
  385. this.modal = false
  386. },
  387. updateCheckAllBtn() {
  388. //勾选单个判断全选
  389. let goodsCheckedLength = 0
  390. this.productList.forEach(item => {
  391. if (item.isChecked) {
  392. goodsCheckedLength++
  393. }
  394. })
  395. this.isAllChecked = goodsCheckedLength === this.productList.length
  396. if (goodsCheckedLength > 0) {
  397. this.isProductChecked = true
  398. } else {
  399. this.isProductChecked = false
  400. }
  401. },
  402. updateBothCheckBtn() {
  403. //全选勾选判断
  404. this.productList.forEach(item => {
  405. item.isChecked = this.isAllChecked
  406. })
  407. },
  408. isCheckedAll() {
  409. //全选
  410. this.isAllChecked = !this.isAllChecked
  411. if (this.isAllChecked) {
  412. this.isProductChecked = true
  413. } else {
  414. this.isProductChecked = false
  415. }
  416. this.updateBothCheckBtn()
  417. },
  418. checkedSoperv(item) {
  419. //选择
  420. item.isChecked = !item.isChecked
  421. console.log(item)
  422. this.updateCheckAllBtn()
  423. },
  424. PromotionsFormat(promo) {
  425. //促销活动类型数据处理
  426. if (promo != null) {
  427. if (promo.type == 1 && promo.mode == 1) {
  428. return true
  429. } else {
  430. return false
  431. }
  432. }
  433. return false
  434. },
  435. changeCountAdd() {
  436. //popup弹窗数量增加按钮
  437. if (this.buyRetailPriceStep == 2) {
  438. this.number += this.minBuyNumber
  439. } else {
  440. this.number++
  441. }
  442. this.calculatPerice()
  443. },
  444. changeCountSub() {
  445. //popup弹窗数量减按钮
  446. if (this.number <= this.minBuyNumber) {
  447. this.number = this.minBuyNumber
  448. this.isQuantity = true
  449. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
  450. return
  451. } else {
  452. if (this.buyRetailPriceStep == 2) {
  453. this.number -= this.minBuyNumber
  454. } else {
  455. this.number--
  456. }
  457. this.calculatPerice()
  458. this.isQuantity = false
  459. }
  460. },
  461. changeNumber(e) {
  462. let _value = e.detail.value
  463. if (!this.$api.isNumber(_value)) {
  464. this.number = this.minBuyNumber
  465. } else if (_value < this.minBuyNumber) {
  466. this.$util.msg(`该商品最小起订量为${this.minBuyNumber}`, 2000)
  467. this.number = this.minBuyNumber
  468. } else if (_value % this.minBuyNumber != 0) {
  469. this.$util.msg('购买量必须为起订量的整数倍', 2000)
  470. this.number = this.minBuyNumber
  471. } else {
  472. this.number = e.detail.value
  473. this.calculatPerice()
  474. }
  475. },
  476. calculatPerice() {
  477. //判断是否为阶梯价然后做计算价格处理
  478. if (this.handleData.ladderPriceFlag == 1) {
  479. this.handleData.ladderPrices.forEach((item, index) => {
  480. if (this.number >= item.buyNum) {
  481. this.buyRetailPrice = item.buyPrice
  482. }
  483. })
  484. }
  485. },
  486. toConfirmation() {
  487. //跳转确认订单页面
  488. this.popupShow1 = false
  489. let productStp = {
  490. allPrice: this.number * this.buyRetailPrice,
  491. allCount: this.number,
  492. productID: this.handleData.productId,
  493. productCount: this.number
  494. }
  495. this.$api.navigateTo(
  496. `/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
  497. )
  498. },
  499. getAddProductCart() {
  500. //增加购物车成功和toast弹窗提示成功
  501. this.ProductService.shoppingAddCart({
  502. productID: this.handleData.productId,
  503. userID: this.listQuery.userId,
  504. productCount: this.number
  505. })
  506. .then(response => {
  507. this.popupShow1 = false
  508. this.$util.msg('加入购物车成功', 1500, true, 'success')
  509. this.shoppingHeaderCartNumber()
  510. })
  511. .catch(error => {
  512. this.$util.msg(error.msg, 2000)
  513. })
  514. },
  515. showPopup(index, pros) {
  516. // 弹窗显示
  517. switch (index) {
  518. case 0:
  519. this.popupShow = true
  520. break
  521. case 1:
  522. this.popupShow1 = true
  523. this.handleData = pros
  524. console.log(this.handleData)
  525. this.buyRetailPrice = this.handleData.price
  526. this.buyRetailPriceStep = this.handleData.step
  527. if (this.handleData.ladderPriceFlag == 1) {
  528. this.number = this.handleData.maxBuyNumber ? this.handleData.maxBuyNumber : 1
  529. } else {
  530. this.number = this.handleData.minBuyNumber
  531. }
  532. break
  533. }
  534. },
  535. hidePopup(index) {
  536. // 弹窗隐藏
  537. switch (index) {
  538. case 0:
  539. this.popupShow = false
  540. break
  541. case 1:
  542. this.popupShow1 = false
  543. break
  544. }
  545. },
  546. navToDetailPage(id) {
  547. this.isModallayer = true
  548. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  549. this.isModallayer = false
  550. },
  551. btnClick() {
  552. this.$api.switchTabTo('/pages/tabBar/cart/index')
  553. },
  554. btnTouchstart() {
  555. // console.log('btnTouchstart');
  556. },
  557. btnTouchend() {
  558. // console.log('btnTouchend');
  559. }
  560. },
  561. onPageScroll(e) {
  562. //实时获取到滚动的值
  563. },
  564. onReachBottom() {
  565. if (this.hasNextPage) {
  566. this.loadding = true
  567. this.pullUpOn = true
  568. this.GetOnReachBottomData()
  569. }
  570. },
  571. onPullDownRefresh() {
  572. setTimeout(() => {
  573. this.listQuery.pageNum = 1
  574. uni.stopPullDownRefresh()
  575. }, 200)
  576. },
  577. onShow() {}
  578. }
  579. </script>
  580. <style lang="scss">
  581. @import '@/uni.scss';
  582. page {
  583. background: #fff;
  584. }
  585. .empty-container {
  586. z-index: 9999;
  587. }
  588. .superv-header {
  589. width: 100%;
  590. height: 80rpx;
  591. background-color: #f7f7f7;
  592. line-height: 80rpx;
  593. position: fixed;
  594. top: 0;
  595. left: 0;
  596. box-sizing: border-box;
  597. padding: 0 24rpx;
  598. z-index: 99;
  599. .superv-header-click {
  600. width: 100%;
  601. height: 80rpx;
  602. font-size: $font-size-30;
  603. .oltext {
  604. float: left;
  605. color: #666666;
  606. .red {
  607. color: $color-system;
  608. }
  609. }
  610. .ortext {
  611. float: right;
  612. color: #333333;
  613. text-align: right;
  614. }
  615. }
  616. }
  617. .tui-header {
  618. width: 100%;
  619. font-size: 16px;
  620. font-weight: 500;
  621. height: 32px;
  622. display: flex;
  623. align-items: center;
  624. justify-content: center;
  625. position: relative;
  626. padding: 0 40rpx;
  627. }
  628. .header-sit {
  629. width: 100%;
  630. box-sizing: border-box;
  631. height: 80rpx;
  632. line-height: 80rpx;
  633. box-sizing: border-box;
  634. padding: 0 40rpx;
  635. text-align: left;
  636. font-size: $font-size-40;
  637. color: #ffffff;
  638. font-weight: 600;
  639. font-family: '正楷';
  640. margin-top: 30rpx;
  641. .iconfont {
  642. font-size: 42rpx;
  643. margin-left: 30rpx;
  644. }
  645. }
  646. .mine {
  647. width: 100%;
  648. height: 100%;
  649. position: relative;
  650. }
  651. .product-content {
  652. width: 100%;
  653. height: auto;
  654. position: relative;
  655. padding: 0;
  656. padding-top: 80rpx;
  657. box-sizing: border-box;
  658. .empty-container-image {
  659. width: 260rpx;
  660. height: 260rpx;
  661. margin-top: -300rpx;
  662. }
  663. }
  664. .tui-goods-item {
  665. padding: 30rpx 20rpx 0 20rpx;
  666. box-sizing: border-box;
  667. position: relative;
  668. .tui-goods-main {
  669. display: flex;
  670. width: 100%;
  671. height: 100%;
  672. border-bottom: 1px solid #ebebeb;
  673. padding-bottom: 24rpx;
  674. }
  675. }
  676. .tui-goods-checkBox {
  677. display: flex;
  678. align-items: center;
  679. margin: 0 15rpx;
  680. .checkbox {
  681. display: flex;
  682. margin: 0;
  683. padding: 0;
  684. display: flex;
  685. flex-direction: column;
  686. align-items: center;
  687. box-sizing: border-box;
  688. text-align: center;
  689. text-decoration: none;
  690. border-radius: 0;
  691. -webkit-tap-highlight-color: transparent;
  692. overflow: hidden;
  693. background-color: #ffffff;
  694. font-size: 36rpx;
  695. color: $color-system;
  696. }
  697. .text {
  698. font-size: $font-size-24;
  699. margin-left: 10rpx;
  700. }
  701. }
  702. .tui-goods-image {
  703. width: 180rpx;
  704. height: 180rpx !important;
  705. border-radius: 12rpx;
  706. .tui-goods-img {
  707. width: 180rpx;
  708. height: 180rpx !important;
  709. border-radius: 12rpx;
  710. flex-shrink: 0;
  711. display: block;
  712. }
  713. }
  714. .tui-goods-info {
  715. padding-left: 20rpx;
  716. box-sizing: border-box;
  717. position: relative;
  718. .list-details-title {
  719. line-height: 38rpx;
  720. text-overflow: ellipsis;
  721. overflow: hidden;
  722. display: -webkit-box;
  723. -webkit-line-clamp: 2;
  724. line-clamp: 2;
  725. -webkit-box-orient: vertical;
  726. font-size: 26rpx;
  727. color: #333333;
  728. }
  729. .list-details-specs {
  730. width: 100%;
  731. display: inline-block;
  732. margin-top: 8rpx;
  733. color: #999999;
  734. font-size: 24rpx;
  735. }
  736. .list-details-price {
  737. width: 100%;
  738. line-height: 54rpx;
  739. float: left;
  740. &.none {
  741. height: 32rpx;
  742. line-height: 32rpx;
  743. }
  744. .floor-item-act {
  745. height: 54rpx;
  746. text-align: center;
  747. box-sizing: border-box;
  748. float: left;
  749. .coupon-tags {
  750. height: 32rpx;
  751. box-sizing: border-box;
  752. border-radius: 8rpx;
  753. background-color: #fff1eb;
  754. line-height: 28rpx;
  755. color: #f94b4b;
  756. text-align: center;
  757. display: inline-block;
  758. padding: 0 10rpx;
  759. font-size: $font-size-20;
  760. border: 1px solid #f94b4b;
  761. float: left;
  762. margin-right: 12rpx;
  763. }
  764. .floor-tags {
  765. height: 32rpx;
  766. box-sizing: border-box;
  767. border-radius: 8rpx;
  768. background-color: #ffffff;
  769. line-height: 28rpx;
  770. color: $color-system;
  771. text-align: center;
  772. display: inline-block;
  773. padding: 0 16rpx;
  774. font-size: $font-size-20;
  775. border: 1px solid #e15616;
  776. float: left;
  777. }
  778. }
  779. .price-icon {
  780. width: 22rpx;
  781. height: 28rpx;
  782. vertical-align: middle;
  783. margin-right: 10rpx;
  784. }
  785. .price-icon + text {
  786. font-size: 25rpx;
  787. vertical-align: middle;
  788. }
  789. .list-login-now {
  790. width: 375rpx;
  791. color: #f8c499;
  792. position: absolute;
  793. bottom: 0;
  794. .p-no {
  795. float: left;
  796. font-size: $font-size-24;
  797. color: $color-system;
  798. margin-right: 10rpx;
  799. }
  800. }
  801. .login-now {
  802. padding: 10rpx 10rpx 10rpx 0;
  803. }
  804. .list-none {
  805. margin-top: 20rpx;
  806. .price-small {
  807. font-size: $font-size-26;
  808. line-height: 40rpx;
  809. color: #ff2a2a;
  810. }
  811. }
  812. .list-price {
  813. color: #ff2a2a;
  814. float: left;
  815. line-height: 54rpx;
  816. align-items: center;
  817. justify-content: center;
  818. .price-larger {
  819. font-size: $font-size-30;
  820. display: inline-block;
  821. &.none {
  822. text-decoration: line-through;
  823. color: #999999;
  824. }
  825. }
  826. }
  827. .add-cart-btn {
  828. float: right;
  829. width: 140rpx;
  830. height: 54rpx;
  831. line-height: 54rpx;
  832. border-radius: 30rpx;
  833. color: #fff;
  834. font-size: 24rpx;
  835. margin-right: 0;
  836. background: #ffffff;
  837. border: 1px solid #c9c9c9;
  838. color: $text-color;
  839. text-align: center;
  840. }
  841. }
  842. }
  843. .tui-popup-box {
  844. position: relative;
  845. box-sizing: border-box;
  846. min-height: 168rpx;
  847. padding: 6rpx 24rpx;
  848. .tui-popup-content {
  849. padding-top: 30rpx;
  850. }
  851. }
  852. .layer-smimg {
  853. width: 114rpx;
  854. height: 114rpx;
  855. float: left;
  856. border-radius: 10rpx;
  857. margin-right: 24rpx;
  858. image {
  859. width: 114rpx;
  860. height: 114rpx;
  861. border-radius: 10rpx;
  862. }
  863. }
  864. .layer-nunbox {
  865. justify-content: space-between;
  866. align-items: center;
  867. width: 536rpx;
  868. height: 88rpx;
  869. padding: 13rpx 0 0 0;
  870. float: left;
  871. .layer-nunbox-t {
  872. width: 100%;
  873. height: 44rpx;
  874. position: relative;
  875. display: flex;
  876. .layer-nunbox-text {
  877. line-height: 44rpx;
  878. font-size: $font-size-28;
  879. }
  880. .number-box {
  881. display: flex;
  882. justify-content: center;
  883. align-items: center;
  884. border: 2rpx solid #ffe6dc;
  885. border-radius: 30rpx;
  886. height: 48rpx;
  887. margin-left: 20rpx;
  888. .iconfont {
  889. font-size: $font-size-24;
  890. padding: 0 18rpx;
  891. color: #999999;
  892. text-align: center;
  893. line-height: 48rpx;
  894. font-weight: bold;
  895. background: #fef6f3;
  896. &.icon-jianhao {
  897. border-radius: 30rpx 0 0 30rpx;
  898. }
  899. &.icon-jiahao {
  900. border-radius: 0 30rpx 30rpx 0;
  901. }
  902. }
  903. .btn-input {
  904. width: 62rpx;
  905. height: 48rpx;
  906. line-height: 48rpx;
  907. background: #ffffff;
  908. border-radius: 4rpx;
  909. text-align: center;
  910. font-size: $font-size-28;
  911. }
  912. }
  913. .product-step {
  914. position: absolute;
  915. left: 45rpx;
  916. bottom: 0;
  917. height: 44rpx;
  918. background: #ffffff;
  919. }
  920. }
  921. .layer-nunbox-b {
  922. width: 100%;
  923. height: 44rpx;
  924. margin-top: 13rpx;
  925. }
  926. .text {
  927. line-height: 44rpx;
  928. font-size: $font-size-28;
  929. .p {
  930. color: #ff2a2a;
  931. }
  932. .p:first-child {
  933. margin-left: 30rpx;
  934. }
  935. .p.sm {
  936. font-size: $font-size-24;
  937. }
  938. }
  939. }
  940. .tui-popup-btn {
  941. width: 100%;
  942. height: auto;
  943. float: left;
  944. box-sizing: border-box;
  945. margin-top: 30rpx;
  946. .superv-header-checked {
  947. float: left;
  948. font-size: $font-size-30;
  949. .oltext {
  950. width: 120rpx;
  951. float: left;
  952. color: #666666;
  953. display: flex;
  954. margin-left: 10rpx;
  955. .checkbox {
  956. display: flex;
  957. margin: 0;
  958. padding: 0;
  959. display: flex;
  960. flex-direction: column;
  961. align-items: center;
  962. box-sizing: border-box;
  963. text-align: center;
  964. text-decoration: none;
  965. border-radius: 0;
  966. -webkit-tap-highlight-color: transparent;
  967. overflow: hidden;
  968. font-size: 34rpx;
  969. color: $color-system;
  970. line-height: 80rpx;
  971. }
  972. .text {
  973. float: left;
  974. line-height: 80rpx;
  975. margin-left: 15rpx;
  976. }
  977. }
  978. .ortext {
  979. width: 120rpx;
  980. float: right;
  981. color: $color-system;
  982. text-align: right;
  983. }
  984. }
  985. .tui-button {
  986. width: 210rpx;
  987. height: 88rpx;
  988. float: right;
  989. background: #e1e1e1;
  990. line-height: 88rpx;
  991. text-align: center;
  992. color: #ffffff;
  993. font-size: $font-size-28;
  994. border-radius: 44rpx;
  995. &.active {
  996. background: $btn-confirm;
  997. }
  998. }
  999. .tui-flex-btn {
  1000. width: 100%;
  1001. height: 88rpx;
  1002. display: flex;
  1003. box-sizing: border-box;
  1004. padding: 0 34rpx;
  1005. .button {
  1006. width: 280rpx;
  1007. height: 88rpx;
  1008. color: #fff;
  1009. display: flex;
  1010. align-items: center;
  1011. justify-content: center;
  1012. font-size: $font-size-28;
  1013. border-radius: 44rpx;
  1014. &.buy {
  1015. background: $btn-confirm;
  1016. margin-left: 78rpx;
  1017. }
  1018. &.add {
  1019. background: #ffe6dc;
  1020. color: #e15616;
  1021. }
  1022. }
  1023. }
  1024. }
  1025. </style>