collection.vue 17 KB

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