collection.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  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. onShow() {}
  409. }
  410. </script>
  411. <style lang="scss">
  412. @import '@/uni.scss';
  413. page {
  414. background: #fff;
  415. }
  416. .empty-container {
  417. z-index: 9999;
  418. }
  419. .superv-header {
  420. width: 100%;
  421. height: 80rpx;
  422. background-color: #f7f7f7;
  423. line-height: 80rpx;
  424. position: fixed;
  425. top: 0;
  426. left: 0;
  427. box-sizing: border-box;
  428. padding: 0 24rpx;
  429. z-index: 99;
  430. .superv-header-click {
  431. width: 100%;
  432. height: 80rpx;
  433. font-size: $font-size-30;
  434. .oltext {
  435. float: left;
  436. color: #666666;
  437. .red {
  438. color: $color-system;
  439. }
  440. }
  441. .ortext {
  442. float: right;
  443. color: #333333;
  444. text-align: right;
  445. }
  446. }
  447. }
  448. .tui-header {
  449. width: 100%;
  450. font-size: 16px;
  451. font-weight: 500;
  452. height: 32px;
  453. display: flex;
  454. align-items: center;
  455. justify-content: center;
  456. position: relative;
  457. padding: 0 40rpx;
  458. }
  459. .header-sit {
  460. width: 100%;
  461. box-sizing: border-box;
  462. height: 80rpx;
  463. line-height: 80rpx;
  464. box-sizing: border-box;
  465. padding: 0 40rpx;
  466. text-align: left;
  467. font-size: $font-size-40;
  468. color: #ffffff;
  469. font-weight: 600;
  470. font-family: '正楷';
  471. margin-top: 30rpx;
  472. .iconfont {
  473. font-size: 42rpx;
  474. margin-left: 30rpx;
  475. }
  476. }
  477. .mine {
  478. width: 100%;
  479. height: 100%;
  480. position: relative;
  481. }
  482. .product-content {
  483. width: 100%;
  484. height: auto;
  485. position: relative;
  486. padding: 0;
  487. padding-top: 80rpx;
  488. box-sizing: border-box;
  489. .empty-container-image {
  490. width: 386rpx;
  491. height: 286rpx;
  492. margin-top: -300rpx;
  493. }
  494. }
  495. .tui-goods-item {
  496. padding: 30rpx 20rpx 0 20rpx;
  497. box-sizing: border-box;
  498. position: relative;
  499. .tui-goods-main {
  500. display: flex;
  501. width: 100%;
  502. height: 100%;
  503. border-bottom: 1px solid #ebebeb;
  504. padding-bottom: 24rpx;
  505. }
  506. }
  507. .tui-goods-checkBox {
  508. display: flex;
  509. align-items: center;
  510. margin: 0 15rpx;
  511. .checkbox {
  512. display: flex;
  513. margin: 0;
  514. padding: 0;
  515. display: flex;
  516. flex-direction: column;
  517. align-items: center;
  518. box-sizing: border-box;
  519. text-align: center;
  520. text-decoration: none;
  521. border-radius: 0;
  522. -webkit-tap-highlight-color: transparent;
  523. overflow: hidden;
  524. background-color: #ffffff;
  525. font-size: 36rpx;
  526. color: $color-system;
  527. }
  528. .text {
  529. font-size: $font-size-24;
  530. margin-left: 10rpx;
  531. }
  532. }
  533. .tui-goods-image {
  534. width: 180rpx;
  535. height: 180rpx !important;
  536. border: 2rpx solid #f3f3f3;
  537. border-radius: 12rpx;
  538. position: relative;
  539. border: 2rpx solid #f3f3f3;
  540. .tui-goods-img {
  541. width: 180rpx;
  542. height: 180rpx !important;
  543. border-radius: 12rpx;
  544. flex-shrink: 0;
  545. display: block;
  546. }
  547. }
  548. .tui-goods-info {
  549. padding-left: 20rpx;
  550. box-sizing: border-box;
  551. position: relative;
  552. .list-details-title {
  553. line-height: 38rpx;
  554. text-overflow: ellipsis;
  555. overflow: hidden;
  556. display: -webkit-box;
  557. -webkit-line-clamp: 2;
  558. line-clamp: 2;
  559. -webkit-box-orient: vertical;
  560. font-size: 26rpx;
  561. color: #333333;
  562. }
  563. .list-details-specs {
  564. width: 100%;
  565. display: inline-block;
  566. margin-top: 8rpx;
  567. color: #999999;
  568. font-size: 24rpx;
  569. }
  570. .list-details-price {
  571. width: 100%;
  572. line-height: 54rpx;
  573. float: left;
  574. margin-top: 24rpx;
  575. .list-price {
  576. color: #ff2a2a;
  577. float: left;
  578. line-height: 54rpx;
  579. align-items: center;
  580. justify-content: center;
  581. .price-larger {
  582. font-size: $font-size-30;
  583. display: inline-block;
  584. &.none {
  585. text-decoration: line-through;
  586. color: #999999;
  587. }
  588. }
  589. }
  590. .add-cart-btn {
  591. float: right;
  592. width: 160rpx;
  593. height: 56rpx;
  594. line-height: 56rpx;
  595. border-radius: 30rpx;
  596. color: #fff;
  597. font-size: 24rpx;
  598. margin-right: 0;
  599. background: #F3B574;
  600. color: #ffffff;
  601. text-align: center;
  602. }
  603. }
  604. }
  605. .tui-popup-box {
  606. position: relative;
  607. box-sizing: border-box;
  608. min-height: 168rpx;
  609. padding: 6rpx 24rpx;
  610. .tui-popup-content {
  611. padding-top: 30rpx;
  612. }
  613. }
  614. .layer-smimg {
  615. width: 114rpx;
  616. height: 114rpx;
  617. float: left;
  618. border-radius: 10rpx;
  619. margin-right: 24rpx;
  620. image {
  621. width: 114rpx;
  622. height: 114rpx;
  623. border-radius: 10rpx;
  624. }
  625. }
  626. .layer-nunbox {
  627. justify-content: space-between;
  628. align-items: center;
  629. width: 536rpx;
  630. height: 88rpx;
  631. padding: 13rpx 0 0 0;
  632. float: left;
  633. .layer-nunbox-t {
  634. width: 100%;
  635. height: 44rpx;
  636. position: relative;
  637. display: flex;
  638. .layer-nunbox-text {
  639. line-height: 44rpx;
  640. font-size: $font-size-28;
  641. }
  642. .number-box {
  643. display: flex;
  644. justify-content: center;
  645. align-items: center;
  646. border: 2rpx solid #ffe6dc;
  647. border-radius: 30rpx;
  648. height: 48rpx;
  649. margin-left: 20rpx;
  650. .iconfont {
  651. font-size: $font-size-24;
  652. padding: 0 18rpx;
  653. color: #333333;
  654. text-align: center;
  655. line-height: 48rpx;
  656. font-weight: bold;
  657. background: #fef6f3;
  658. &.icon-jianhao {
  659. border-radius: 30rpx 0 0 30rpx;
  660. }
  661. &.icon-jiahao {
  662. border-radius: 0 30rpx 30rpx 0;
  663. }
  664. }
  665. .btn-input {
  666. width: 62rpx;
  667. height: 48rpx;
  668. line-height: 48rpx;
  669. background: #ffffff;
  670. border-radius: 4rpx;
  671. text-align: center;
  672. font-size: $font-size-28;
  673. }
  674. }
  675. .product-step {
  676. position: absolute;
  677. left: 45rpx;
  678. bottom: 0;
  679. height: 44rpx;
  680. background: #ffffff;
  681. }
  682. }
  683. .layer-nunbox-b {
  684. width: 100%;
  685. height: 44rpx;
  686. margin-top: 13rpx;
  687. }
  688. .text {
  689. line-height: 44rpx;
  690. font-size: $font-size-28;
  691. .p {
  692. color: #ff2a2a;
  693. }
  694. .p:first-child {
  695. margin-left: 30rpx;
  696. }
  697. .p.sm {
  698. font-size: $font-size-24;
  699. }
  700. }
  701. }
  702. .tui-popup-btn {
  703. width: 100%;
  704. height: auto;
  705. float: left;
  706. box-sizing: border-box;
  707. margin-top: 30rpx;
  708. .superv-header-checked {
  709. float: left;
  710. font-size: $font-size-30;
  711. .oltext {
  712. width: 120rpx;
  713. float: left;
  714. color: #666666;
  715. display: flex;
  716. margin-left: 10rpx;
  717. .checkbox {
  718. display: flex;
  719. margin: 0;
  720. padding: 0;
  721. display: flex;
  722. flex-direction: column;
  723. align-items: center;
  724. box-sizing: border-box;
  725. text-align: center;
  726. text-decoration: none;
  727. border-radius: 0;
  728. -webkit-tap-highlight-color: transparent;
  729. overflow: hidden;
  730. font-size: 34rpx;
  731. color: $color-system;
  732. line-height: 80rpx;
  733. }
  734. .text {
  735. float: left;
  736. line-height: 80rpx;
  737. margin-left: 15rpx;
  738. }
  739. }
  740. .ortext {
  741. width: 120rpx;
  742. float: right;
  743. color: $color-system;
  744. text-align: right;
  745. }
  746. }
  747. .tui-button {
  748. width: 210rpx;
  749. height: 88rpx;
  750. float: right;
  751. background: #e1e1e1;
  752. line-height: 88rpx;
  753. text-align: center;
  754. color: #ffffff;
  755. font-size: $font-size-28;
  756. border-radius: 44rpx;
  757. &.active {
  758. background: $btn-confirm;
  759. }
  760. }
  761. .tui-flex-btn {
  762. width: 100%;
  763. height: 88rpx;
  764. display: flex;
  765. box-sizing: border-box;
  766. padding: 0 34rpx;
  767. .button {
  768. width: 280rpx;
  769. height: 88rpx;
  770. color: #fff;
  771. display: flex;
  772. align-items: center;
  773. justify-content: center;
  774. font-size: $font-size-28;
  775. border-radius: 44rpx;
  776. &.buy {
  777. background: $btn-confirm;
  778. margin-left: 78rpx;
  779. }
  780. &.add {
  781. background: #ffe6dc;
  782. color: #F3B574;
  783. }
  784. }
  785. }
  786. }
  787. </style>