collection.vue 23 KB

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