collection.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  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_like_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">
  46. <view class="list-price">
  47. <text class="price-larger"> ¥{{ pros.price | NumFormat }} </text>
  48. </view>
  49. <view class="add-cart-btn" v-if="!popupShow" @click.stop="showPopup(1, pros)"
  50. >数量</view
  51. >
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <!--加载loadding-->
  58. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  59. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText"></tui-nomore>
  60. <!--加载loadding-->
  61. </view>
  62. </view>
  63. <!-- 取消收藏操作 -->
  64. <tui-bottom-popup :radius="false" :mask="false" :show="popupShow">
  65. <view class="tui-popup-box clearfix">
  66. <view class="tui-right-flex tui-popup-btn" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0rpx' }">
  67. <view class="tui-flex-1">
  68. <view class="superv-header-checked">
  69. <view class="oltext" @click="isCheckedAll">
  70. <view
  71. class="checkbox iconfont"
  72. :class="[isAllChecked ? 'icon-yixuanze' : 'icon-weixuanze']"
  73. ></view>
  74. <view class="text">全选</view>
  75. </view>
  76. </view>
  77. <view class="tui-button" :class="isProductChecked ? 'active' : ''" @click="handleAllUnder"
  78. >取消收藏</view
  79. >
  80. </view>
  81. </view>
  82. </view>
  83. </tui-bottom-popup>
  84. <!-- 选择规格弹窗 -->
  85. <cm-unit-popup
  86. v-if="popupShow1"
  87. :popupShow="popupShow1"
  88. :skuProduct="handleData"
  89. @skuClick="handleSkuClick"
  90. ></cm-unit-popup>
  91. <!-- 弹窗提示 -->
  92. <tui-modal
  93. :show="modal"
  94. @click="handleClick"
  95. @cancel="hideMobel"
  96. :content="contentModalText"
  97. :button="modalButton"
  98. color="#333"
  99. :size="32"
  100. shape="circle"
  101. :maskClosable="false"
  102. >
  103. </tui-modal>
  104. <!-- 可拖动悬浮按钮 -->
  105. <cm-drag
  106. :cartNum="cartQuantity"
  107. :isDock="true"
  108. :existTabBar="true"
  109. @btnClick="btnClick"
  110. @btnTouchstart="btnTouchstart"
  111. @btnTouchend="btnTouchend"
  112. >
  113. </cm-drag>
  114. </view>
  115. </template>
  116. <script>
  117. import tuiLoadmore from '@/components/tui-components/loadmore/loadmore'
  118. import tuiNomore from '@/components/tui-components/nomore/nomore'
  119. import cmDrag from '@/components/cm-custom/cm-drag.vue'
  120. import cmUnitPopup from '@/components/cm-module/productDetails/cm-unit-popup.vue'
  121. import { mapState, mapMutations } from 'vuex'
  122. const defaultListQuery = {
  123. userId: 0,
  124. pageNum: 1,
  125. pageSize: 10
  126. }
  127. export default {
  128. components: {
  129. tuiLoadmore,
  130. tuiNomore,
  131. cmDrag,
  132. cmUnitPopup
  133. },
  134. data() {
  135. return {
  136. isIphoneX: this.$store.state.isIphoneX,
  137. modalButton: [
  138. {
  139. text: '取消',
  140. type: 'gray',
  141. plain: true //是否空心
  142. },
  143. {
  144. text: '确认',
  145. customStyle: {
  146. color: '#fff',
  147. bgColor: 'linear-gradient(90deg, #F28F31 0%, #F3B574 100%)'
  148. },
  149. plain: false
  150. }
  151. ],
  152. totalRecord: 0,
  153. cartQuantity: 0,
  154. popupShow: false,
  155. popupShow1: false,
  156. isProductChecked: false,
  157. listQuery: Object.assign({}, defaultListQuery),
  158. productList: [],
  159. handleData: {},
  160. scrollTop: 0,
  161. isEmpty: false,
  162. isAllChecked: false,
  163. loadding: false,
  164. pullUpOn: true,
  165. pullFlag: true,
  166. hasNextPage: false,
  167. navbarHeight: '',
  168. nomoreText: '上拉显示更多',
  169. contentModalText: '', //操作文字提示语句
  170. modal: false,
  171. vipFlag: 0,
  172. userIdentity: 0,
  173. firstClubType: 0
  174. }
  175. },
  176. onLoad() {
  177. this.initGetStotage()
  178. },
  179. filters: {
  180. NumFormat: function(value) {
  181. //处理金额
  182. if (!value) return '0.00'
  183. let number = Number(value).toFixed(2)
  184. return number
  185. }
  186. },
  187. computed: {
  188. ...mapState(['hasLogin', 'userInfo', 'clubType'])
  189. },
  190. methods: {
  191. ...mapMutations(['login', 'logout']),
  192. async initGetStotage() {
  193. const userInfo = await this.$api.getStorage()
  194. this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
  195. this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
  196. this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
  197. this.firstClubType = this.clubType
  198. this.GetProductListInfo()
  199. this.ProductCartNumber()
  200. },
  201. GetProductListInfo() {
  202. this.productList = []
  203. this.listQuery.pageNum = 1
  204. this.ProductService.getProductUserLikeList(this.listQuery)
  205. .then(response => {
  206. let data = response.data
  207. if (data.results && data.results.length > 0) {
  208. this.isEmpty = false
  209. this.hasNextPage = data.hasNextPage
  210. this.totalRecord = data.totalRecord
  211. this.productList = data.results
  212. this.pullFlag = false
  213. setTimeout(() => {
  214. this.pullFlag = true
  215. }, 500)
  216. if (this.hasNextPage) {
  217. this.pullUpOn = false
  218. this.nomoreText = '上拉显示更多'
  219. } else {
  220. if (this.productList.length < 8) {
  221. this.pullUpOn = true
  222. } else {
  223. this.pullUpOn = false
  224. this.loadding = false
  225. this.nomoreText = '已至底部'
  226. }
  227. }
  228. } else {
  229. this.isEmpty = true
  230. }
  231. this.isRequest = true
  232. })
  233. .catch(error => {
  234. this.$util.msg(error.msg, 2000)
  235. })
  236. },
  237. GetOnReachBottomData(index) {
  238. //上拉加载
  239. this.listQuery.pageNum += 1
  240. this.ProductService.getProductUserLikeList(this.listQuery)
  241. .then(response => {
  242. let data = response.data
  243. if (data.results && data.results.length > 0) {
  244. this.hasNextPage = data.hasNextPage
  245. this.productList = this.productList.concat(data.results)
  246. this.pullFlag = false // 防上拉暴滑
  247. setTimeout(() => {
  248. this.pullFlag = true
  249. }, 500)
  250. if (this.hasNextPage) {
  251. this.pullUpOn = false
  252. this.nomoreText = '上拉显示更多'
  253. } else {
  254. this.pullUpOn = false
  255. this.loadding = false
  256. this.nomoreText = '已至底部'
  257. }
  258. }
  259. })
  260. .catch(error => {
  261. this.$util.msg(error.msg, 2000)
  262. })
  263. },
  264. handleSkuClick(sku) {
  265. this.handleData.price = sku.price
  266. },
  267. ProductCartNumber() {
  268. // 获取用户购物车储量
  269. this.ProductService.ProductCartNumber({
  270. userId: this.listQuery.userId
  271. })
  272. .then(response => {
  273. this.cartQuantity = response.data
  274. })
  275. .catch(error => {
  276. console.log('获取购物车数量失败')
  277. })
  278. },
  279. handleAllUnder() {
  280. //批量下架操作
  281. let checkedArray = []
  282. this.productIds = ''
  283. if (this.isProductChecked) {
  284. this.productList.forEach(el => {
  285. if (el.isChecked) {
  286. checkedArray.push(el)
  287. }
  288. })
  289. checkedArray.forEach(el => {
  290. this.productIds += el.productId + ','
  291. })
  292. this.modal = true
  293. this.contentModalText = '确定要取消收藏吗?'
  294. }
  295. },
  296. handleClick(e) {
  297. //取消收藏
  298. if (e.index == 1) {
  299. this.handleDeleteUserLike()
  300. }
  301. this.modal = false
  302. },
  303. handleDeleteUserLike() {
  304. //操作取消收藏
  305. this.ProductService.getDeleteUserLike({
  306. productIds: this.productIds,
  307. userId: this.listQuery.userId
  308. })
  309. .then(response => {
  310. this.$util.msg('取消收藏成功', 2000, true, 'success')
  311. setTimeout(() => {
  312. this.GetProductListInfo()
  313. }, 2000)
  314. })
  315. .catch(error => {
  316. this.$util.msg(error.msg, 2000)
  317. })
  318. },
  319. hideMobel() {
  320. this.modal = false
  321. },
  322. updateCheckAllBtn() {
  323. //勾选单个判断全选
  324. let goodsCheckedLength = 0
  325. this.productList.forEach(item => {
  326. if (item.isChecked) {
  327. goodsCheckedLength++
  328. }
  329. })
  330. this.isAllChecked = goodsCheckedLength === this.productList.length
  331. if (goodsCheckedLength > 0) {
  332. this.isProductChecked = true
  333. } else {
  334. this.isProductChecked = false
  335. }
  336. },
  337. updateBothCheckBtn() {
  338. //全选勾选判断
  339. this.productList.forEach(item => {
  340. item.isChecked = this.isAllChecked
  341. })
  342. },
  343. isCheckedAll() {
  344. //全选
  345. this.isAllChecked = !this.isAllChecked
  346. if (this.isAllChecked) {
  347. this.isProductChecked = true
  348. } else {
  349. this.isProductChecked = false
  350. }
  351. this.updateBothCheckBtn()
  352. },
  353. checkedSoperv(item) {
  354. //选择
  355. item.isChecked = !item.isChecked
  356. console.log(item)
  357. this.updateCheckAllBtn()
  358. },
  359. showPopup(index, pros) {
  360. // 弹窗显示
  361. switch (index) {
  362. case 0:
  363. this.popupShow = true
  364. break
  365. case 1:
  366. this.popupShow1 = true
  367. this.handleData = pros
  368. break
  369. }
  370. },
  371. hidePopup(index) {
  372. // 弹窗隐藏
  373. switch (index) {
  374. case 0:
  375. this.popupShow = false
  376. break
  377. case 1:
  378. this.popupShow1 = false
  379. break
  380. }
  381. },
  382. navToDetailPage(id) {
  383. this.isModallayer = true
  384. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  385. this.isModallayer = false
  386. },
  387. btnClick() {
  388. this.$api.switchTabTo('/pages/tabBar/cart/index')
  389. },
  390. btnTouchstart() {
  391. // console.log('btnTouchstart');
  392. },
  393. btnTouchend() {
  394. // console.log('btnTouchend');
  395. }
  396. },
  397. onPageScroll(e) {
  398. //实时获取到滚动的值
  399. },
  400. onReachBottom() {
  401. if (this.hasNextPage) {
  402. this.loadding = true
  403. this.pullUpOn = true
  404. this.GetOnReachBottomData()
  405. }
  406. },
  407. onPullDownRefresh() {
  408. setTimeout(() => {
  409. this.listQuery.pageNum = 1
  410. uni.stopPullDownRefresh()
  411. }, 200)
  412. },
  413. onShow() {}
  414. }
  415. </script>
  416. <style lang="scss">
  417. @import '@/uni.scss';
  418. page {
  419. background: #fff;
  420. }
  421. .empty-container {
  422. z-index: 9999;
  423. }
  424. .superv-header {
  425. width: 100%;
  426. height: 80rpx;
  427. background-color: #f7f7f7;
  428. line-height: 80rpx;
  429. position: fixed;
  430. top: 0;
  431. left: 0;
  432. box-sizing: border-box;
  433. padding: 0 24rpx;
  434. z-index: 99;
  435. .superv-header-click {
  436. width: 100%;
  437. height: 80rpx;
  438. font-size: $font-size-30;
  439. .oltext {
  440. float: left;
  441. color: #666666;
  442. .red {
  443. color: $color-system;
  444. }
  445. }
  446. .ortext {
  447. float: right;
  448. color: #333333;
  449. text-align: right;
  450. }
  451. }
  452. }
  453. .tui-header {
  454. width: 100%;
  455. font-size: 16px;
  456. font-weight: 500;
  457. height: 32px;
  458. display: flex;
  459. align-items: center;
  460. justify-content: center;
  461. position: relative;
  462. padding: 0 40rpx;
  463. }
  464. .header-sit {
  465. width: 100%;
  466. box-sizing: border-box;
  467. height: 80rpx;
  468. line-height: 80rpx;
  469. box-sizing: border-box;
  470. padding: 0 40rpx;
  471. text-align: left;
  472. font-size: $font-size-40;
  473. color: #ffffff;
  474. font-weight: 600;
  475. font-family: '正楷';
  476. margin-top: 30rpx;
  477. .iconfont {
  478. font-size: 42rpx;
  479. margin-left: 30rpx;
  480. }
  481. }
  482. .mine {
  483. width: 100%;
  484. height: 100%;
  485. position: relative;
  486. }
  487. .product-content {
  488. width: 100%;
  489. height: auto;
  490. position: relative;
  491. padding: 0;
  492. padding-top: 80rpx;
  493. box-sizing: border-box;
  494. .empty-container-image {
  495. width: 386rpx;
  496. height: 286rpx;
  497. margin-top: -300rpx;
  498. }
  499. }
  500. .tui-goods-item {
  501. padding: 30rpx 20rpx 0 20rpx;
  502. box-sizing: border-box;
  503. position: relative;
  504. .tui-goods-main {
  505. display: flex;
  506. width: 100%;
  507. height: 100%;
  508. border-bottom: 1px solid #ebebeb;
  509. padding-bottom: 24rpx;
  510. }
  511. }
  512. .tui-goods-checkBox {
  513. display: flex;
  514. align-items: center;
  515. margin: 0 15rpx;
  516. .checkbox {
  517. display: flex;
  518. margin: 0;
  519. padding: 0;
  520. display: flex;
  521. flex-direction: column;
  522. align-items: center;
  523. box-sizing: border-box;
  524. text-align: center;
  525. text-decoration: none;
  526. border-radius: 0;
  527. -webkit-tap-highlight-color: transparent;
  528. overflow: hidden;
  529. background-color: #ffffff;
  530. font-size: 36rpx;
  531. color: $color-system;
  532. }
  533. .text {
  534. font-size: $font-size-24;
  535. margin-left: 10rpx;
  536. }
  537. }
  538. .tui-goods-image {
  539. width: 180rpx;
  540. height: 180rpx !important;
  541. border: 2rpx solid #f3f3f3;
  542. border-radius: 12rpx;
  543. position: relative;
  544. border: 2rpx solid #f3f3f3;
  545. .tui-goods-img {
  546. width: 180rpx;
  547. height: 180rpx !important;
  548. border-radius: 12rpx;
  549. flex-shrink: 0;
  550. display: block;
  551. }
  552. }
  553. .tui-goods-info {
  554. padding-left: 20rpx;
  555. box-sizing: border-box;
  556. position: relative;
  557. .list-details-title {
  558. line-height: 38rpx;
  559. text-overflow: ellipsis;
  560. overflow: hidden;
  561. display: -webkit-box;
  562. -webkit-line-clamp: 2;
  563. line-clamp: 2;
  564. -webkit-box-orient: vertical;
  565. font-size: 26rpx;
  566. color: #333333;
  567. }
  568. .list-details-specs {
  569. width: 100%;
  570. display: inline-block;
  571. margin-top: 8rpx;
  572. color: #999999;
  573. font-size: 24rpx;
  574. }
  575. .list-details-price {
  576. width: 100%;
  577. line-height: 54rpx;
  578. float: left;
  579. margin-top: 24rpx;
  580. .list-price {
  581. color: #ff2a2a;
  582. float: left;
  583. line-height: 54rpx;
  584. align-items: center;
  585. justify-content: center;
  586. .price-larger {
  587. font-size: $font-size-30;
  588. display: inline-block;
  589. &.none {
  590. text-decoration: line-through;
  591. color: #999999;
  592. }
  593. }
  594. }
  595. .add-cart-btn {
  596. float: right;
  597. width: 160rpx;
  598. height: 56rpx;
  599. line-height: 56rpx;
  600. border-radius: 30rpx;
  601. color: #fff;
  602. font-size: 24rpx;
  603. margin-right: 0;
  604. background: #F3B574;
  605. color: #ffffff;
  606. text-align: center;
  607. }
  608. }
  609. }
  610. .tui-popup-box {
  611. position: relative;
  612. box-sizing: border-box;
  613. min-height: 168rpx;
  614. padding: 6rpx 24rpx;
  615. .tui-popup-content {
  616. padding-top: 30rpx;
  617. }
  618. }
  619. .layer-smimg {
  620. width: 114rpx;
  621. height: 114rpx;
  622. float: left;
  623. border-radius: 10rpx;
  624. margin-right: 24rpx;
  625. image {
  626. width: 114rpx;
  627. height: 114rpx;
  628. border-radius: 10rpx;
  629. }
  630. }
  631. .layer-nunbox {
  632. justify-content: space-between;
  633. align-items: center;
  634. width: 536rpx;
  635. height: 88rpx;
  636. padding: 13rpx 0 0 0;
  637. float: left;
  638. .layer-nunbox-t {
  639. width: 100%;
  640. height: 44rpx;
  641. position: relative;
  642. display: flex;
  643. .layer-nunbox-text {
  644. line-height: 44rpx;
  645. font-size: $font-size-28;
  646. }
  647. .number-box {
  648. display: flex;
  649. justify-content: center;
  650. align-items: center;
  651. border: 2rpx solid #ffe6dc;
  652. border-radius: 30rpx;
  653. height: 48rpx;
  654. margin-left: 20rpx;
  655. .iconfont {
  656. font-size: $font-size-24;
  657. padding: 0 18rpx;
  658. color: #999999;
  659. text-align: center;
  660. line-height: 48rpx;
  661. font-weight: bold;
  662. background: #fef6f3;
  663. &.icon-jianhao {
  664. border-radius: 30rpx 0 0 30rpx;
  665. }
  666. &.icon-jiahao {
  667. border-radius: 0 30rpx 30rpx 0;
  668. }
  669. }
  670. .btn-input {
  671. width: 62rpx;
  672. height: 48rpx;
  673. line-height: 48rpx;
  674. background: #ffffff;
  675. border-radius: 4rpx;
  676. text-align: center;
  677. font-size: $font-size-28;
  678. }
  679. }
  680. .product-step {
  681. position: absolute;
  682. left: 45rpx;
  683. bottom: 0;
  684. height: 44rpx;
  685. background: #ffffff;
  686. }
  687. }
  688. .layer-nunbox-b {
  689. width: 100%;
  690. height: 44rpx;
  691. margin-top: 13rpx;
  692. }
  693. .text {
  694. line-height: 44rpx;
  695. font-size: $font-size-28;
  696. .p {
  697. color: #ff2a2a;
  698. }
  699. .p:first-child {
  700. margin-left: 30rpx;
  701. }
  702. .p.sm {
  703. font-size: $font-size-24;
  704. }
  705. }
  706. }
  707. .tui-popup-btn {
  708. width: 100%;
  709. height: auto;
  710. float: left;
  711. box-sizing: border-box;
  712. margin-top: 30rpx;
  713. .superv-header-checked {
  714. float: left;
  715. font-size: $font-size-30;
  716. .oltext {
  717. width: 120rpx;
  718. float: left;
  719. color: #666666;
  720. display: flex;
  721. margin-left: 10rpx;
  722. .checkbox {
  723. display: flex;
  724. margin: 0;
  725. padding: 0;
  726. display: flex;
  727. flex-direction: column;
  728. align-items: center;
  729. box-sizing: border-box;
  730. text-align: center;
  731. text-decoration: none;
  732. border-radius: 0;
  733. -webkit-tap-highlight-color: transparent;
  734. overflow: hidden;
  735. font-size: 34rpx;
  736. color: $color-system;
  737. line-height: 80rpx;
  738. }
  739. .text {
  740. float: left;
  741. line-height: 80rpx;
  742. margin-left: 15rpx;
  743. }
  744. }
  745. .ortext {
  746. width: 120rpx;
  747. float: right;
  748. color: $color-system;
  749. text-align: right;
  750. }
  751. }
  752. .tui-button {
  753. width: 210rpx;
  754. height: 88rpx;
  755. float: right;
  756. background: #e1e1e1;
  757. line-height: 88rpx;
  758. text-align: center;
  759. color: #ffffff;
  760. font-size: $font-size-28;
  761. border-radius: 44rpx;
  762. &.active {
  763. background: $btn-confirm;
  764. }
  765. }
  766. .tui-flex-btn {
  767. width: 100%;
  768. height: 88rpx;
  769. display: flex;
  770. box-sizing: border-box;
  771. padding: 0 34rpx;
  772. .button {
  773. width: 280rpx;
  774. height: 88rpx;
  775. color: #fff;
  776. display: flex;
  777. align-items: center;
  778. justify-content: center;
  779. font-size: $font-size-28;
  780. border-radius: 44rpx;
  781. &.buy {
  782. background: $btn-confirm;
  783. margin-left: 78rpx;
  784. }
  785. &.add {
  786. background: #ffe6dc;
  787. color: #F3B574;
  788. }
  789. }
  790. }
  791. }
  792. </style>