collection.vue 17 KB

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