category.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. <template>
  2. <view class="content">
  3. <view class="store-info flex">
  4. <image :src="storeInfo.logo" mode="" class="store-logo"></image>
  5. <view class="info">
  6. <view class="name">
  7. {{storeInfo.name}}
  8. </view>
  9. <view class="dis">
  10. {{storeInfo.range}}km
  11. </view>
  12. </view>
  13. </view>
  14. <scroll-view scroll-x="true" class="nav" style="background-color: #fff;">
  15. <view class="flex">
  16. <view class="nav-item" v-for="(item,index) in cateList" :key="index" @click="navClick(index)"
  17. :class="{'action': index == current}">
  18. <image :src="item.big_pic" mode="" class="cate-img"></image>
  19. <view class="">
  20. {{item.cate_name}}
  21. </view>
  22. </view>
  23. </view>
  24. </scroll-view>
  25. <view class="bom flex" :style="{height: height}">
  26. <scroll-view scroll-y class="left-aside">
  27. <view v-for="(item,indexs) in flist" :key="item.id" class="f-item b-b"
  28. :class="{ active: indexs === currents }" @click="tabtap(indexs)">{{ item.cate_name }}</view>
  29. </scroll-view>
  30. <scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll"
  31. :scroll-top="tabScrollTop">
  32. <view class="good-wrap">
  33. <view class="good flex" v-for="(good,gindex) in cateList[current].children[currents].list">
  34. <image :src="good.image" class="good-img" mode=""></image>
  35. <view class="info">
  36. <view class="name clamp2">
  37. {{good.store_name}}
  38. </view>
  39. <view class="price">
  40. ¥{{good.specs[0].price}}
  41. </view>
  42. </view>
  43. <image src="/static/index/cart.png" mode="" class="btn" @click="openTc(good)"></image>
  44. </view>
  45. </view>
  46. </scroll-view>
  47. </view>
  48. <view class="tc" style="height: 114rpx;">
  49. </view>
  50. <view class="cart-wrap cart-wraps flex">
  51. <uni-badge :text="cart_num" absolute="rightTop">
  52. <image src="/static/index/cart-a.png" mode="" class="btn-cart" @click="openCart"></image>
  53. </uni-badge>
  54. <view class="price">
  55. ¥{{totalPirce}}
  56. </view>
  57. <view class="btn" @click="createOrder()" :class="{'enaction': cart_num == 0}">
  58. 去结算
  59. </view>
  60. </view>
  61. <view class="js">
  62. </view>
  63. <uni-popup type="center" ref="specs">
  64. <view class="specs-wrap">
  65. <view class="good-info flex">
  66. <image :src="checkGg.img" mode="" class="good-logo"></image>
  67. <view class="info">
  68. <view class="name">
  69. {{good.store_name}}
  70. </view>
  71. <view class="dis">
  72. {{checkGg.price}}
  73. </view>
  74. </view>
  75. </view>
  76. <view class="tit">
  77. 选择规格分类
  78. </view>
  79. <view class="gg-wrap flex">
  80. <view class="gg" v-for="(gg,gndex) in good.specs" :class="{'actions': gg.id == checkGg.id}" @click="changeGg(gg)">
  81. {{gg.name}}
  82. </view>
  83. </view>
  84. <view class="buy-num">
  85. <view class="">
  86. 购买数量
  87. </view>
  88. <uni-number-box v-model="buyNum" :max="maxNum"></uni-number-box>
  89. </view>
  90. <view class="buy-now" @click="addNow">
  91. 加入购物车
  92. </view>
  93. <image src="/static/icon/close.png" class="close-btn" mode="" @click="closeTc"></image>
  94. </view>
  95. </uni-popup>
  96. <uni-popup type="bottom" ref="cartList">
  97. <view class="cart_wrap">
  98. <view class="cart-top flex">
  99. <image src="/static/icon/bin.png" mode="" @click="clearCart"></image>
  100. <view class="" @click="clearCart">
  101. 清空购物车
  102. </view>
  103. </view>
  104. <scroll-view scroll-y="true" style="height: 500rpx;">
  105. <view class="cart-list-wrap">
  106. <view class="good flex" v-for="(good,gindex) in cartList">
  107. <image :src="good.product.image" class="good-img" mode=""></image>
  108. <view class="info">
  109. <view class="name clamp">
  110. {{good.product.store_name}}
  111. </view>
  112. <view class="gg">
  113. {{good.specs.name}}
  114. </view>
  115. <view class="price">
  116. ¥{{good.specs.price}}
  117. </view>
  118. </view>
  119. <view class="munbox flex">
  120. <image src="../../static/icon/reduce.png" mode="" @click="reduce(good,gindex)"></image>
  121. <input type="number" v-model="good.cart_num" disabled />
  122. <image src="../../static/icon/add.png" mode="" @click="add(good)"></image>
  123. </view>
  124. </view>
  125. </view>
  126. </scroll-view>
  127. <view class="cart-wrap flex">
  128. <uni-badge :text="cart_num" absolute="rightTop">
  129. <image src="/static/index/cart-a.png" mode="" class="btn-cart" @click="closeCart"></image>
  130. </uni-badge>
  131. <view class="price">
  132. ¥{{totalPirce}}
  133. </view>
  134. <view class="btn" @click="createOrder()" :class="{'enaction': cart_num == 0}">
  135. 去结算
  136. </view>
  137. </view>
  138. </view>
  139. </uni-popup>
  140. </view>
  141. </template>
  142. <script>
  143. import {
  144. mapState,
  145. mapMutations
  146. } from 'vuex';
  147. import {
  148. getCategoryList,
  149. getCateList,
  150. getProducts,
  151. getCartlist,
  152. cartAdd,
  153. cartNum,
  154. delCart,
  155. cartCompute
  156. } from '@/api/product.js';
  157. // #ifdef H5
  158. import {
  159. shareLoad
  160. } from '@/utils/wxAuthorized';
  161. // #endif
  162. export default {
  163. data() {
  164. return {
  165. totalPirce: 0,
  166. cartList: [],
  167. cart_num: 0,
  168. buyNum: 1,
  169. maxNum: 1,
  170. checkGg: {},
  171. good: {},
  172. storeInfo: {},
  173. store_id: 0,
  174. goods: [],
  175. height: '',
  176. current: 0,
  177. currents: 0,
  178. sizeCalcState: false,
  179. tabScrollTop: 0,
  180. currentId: 9,
  181. flist: [],
  182. cateList: [{
  183. children: [{
  184. list: []
  185. }]
  186. }],
  187. limit: 20
  188. };
  189. },
  190. computed: {
  191. ...mapState('user', ['userInfo'])
  192. },
  193. onReady(res) {
  194. var that = this;
  195. uni.getSystemInfo({
  196. success: resu => {
  197. const query = uni.createSelectorQuery();
  198. query.select('.js').boundingClientRect();
  199. query.exec(function(res) {
  200. that.height = resu.windowHeight - res[0].top + 'px';
  201. console.log(that.height)
  202. });
  203. },
  204. fail: res => {}
  205. });
  206. },
  207. onLoad(opt) {
  208. this.store_id = opt.id
  209. this.storeInfo = uni.getStorageSync('storeInfo') || {}
  210. this.getCateList()
  211. // #ifdef H5
  212. // shareLoad()
  213. // #endif
  214. this.getCartList()
  215. },
  216. // 监听导航栏输入框点击事件
  217. onNavigationBarSearchInputClicked(e) {
  218. uni.navigateTo({
  219. url: '/pages/product/search'
  220. });
  221. },
  222. methods: {
  223. cartCompute() {
  224. let cart_ids = this.cartList.map(item => {
  225. return item.id
  226. })
  227. cartCompute({
  228. store_id: this.storeInfo.id,
  229. uid: this.userInfo.uid,
  230. cart_ids: cart_ids
  231. }).then(res => {
  232. this.totalPirce = res.data.data.group_price.total_price
  233. })
  234. },
  235. //删除
  236. deleteCartItem(index) {
  237. let list = this.cartList;
  238. let row = list[index];
  239. let id = row.id;
  240. delCart({
  241. cart_ids: [id],
  242. store_id: this.storeInfo.id
  243. }).then(res => {
  244. this.cartList.splice(index, 1);
  245. uni.hideLoading();
  246. this.getCartList();
  247. })
  248. },
  249. //清空
  250. clearCart() {
  251. let that = this
  252. uni.showModal({
  253. content: '清空购物车?',
  254. success: e => {
  255. if (e.confirm) {
  256. let st = this.cartList.map(e => {
  257. return e.id;
  258. });
  259. delCart({
  260. cart_ids: st,
  261. store_id: that.storeInfo.id
  262. }).then(e => {
  263. console.log(e);
  264. this.getCartList();
  265. });
  266. this.cartList = [];
  267. }
  268. }
  269. });
  270. },
  271. reduce(item, index) {
  272. if (item.cart_num == 1) {
  273. uni.showModal({
  274. content: '删除该商品?',
  275. success: e => {
  276. if (e.confirm) {
  277. this.deleteCartItem(index);
  278. }
  279. }
  280. });
  281. } else {
  282. item.cart_num--;
  283. this.newNumberChange(item);
  284. }
  285. },
  286. add(item) {
  287. console.log(item);
  288. if (item.specs.num*1 > item.cart_num) {
  289. item.cart_num++;
  290. this.newNumberChange(item);
  291. } else {
  292. return;
  293. }
  294. },
  295. newNumberChange(item) {
  296. let that = this
  297. cartNum({
  298. id: item.id,
  299. cart_num: item.cart_num,
  300. store_id: that.storeInfo.id,
  301. is_gift: 0
  302. })
  303. .then(e => {
  304. console.log(e);
  305. this.getCartList()
  306. })
  307. .catch(function(e) {
  308. console.log(e);
  309. });
  310. },
  311. openCart() {
  312. this.$refs.cartList.open()
  313. },
  314. closeCart() {
  315. this.$refs.cartList.close()
  316. },
  317. //创建订单
  318. createOrder() {
  319. let goodsData = [];
  320. this.cartList.forEach(item => {
  321. goodsData.push(item.id);
  322. });
  323. if(goodsData.length == 0) return;
  324. uni.navigateTo({
  325. url: '/pages/order/createOrder?id=' + goodsData.join(',')
  326. });
  327. },
  328. getCartList() {
  329. getCartlist({
  330. store_id: this.storeInfo.id
  331. }).then(res => {
  332. let data = res.data
  333. if(data.cart_num) {
  334. this.cartList = data.group_price.valid.map(items => {
  335. items.cart_num = items.cart_num*1
  336. return items
  337. })
  338. this.cart_num = data.cart_num
  339. this.cartCompute()
  340. }else {
  341. this.cartList = []
  342. this.cart_num = 0
  343. this.totalPirce = 0
  344. }
  345. })
  346. },
  347. addNow() {
  348. let that = this
  349. console.log(this.buyNum,that.good)
  350. cartAdd({
  351. type: 0,
  352. product_type: 0,
  353. store_id: that.storeInfo.id,
  354. product_id: that.good.id,
  355. specs_id: that.checkGg.id,
  356. cart_num: that.buyNum,
  357. is_gift: 0,
  358. is_new: 0,//0加入购物车 1直接购买
  359. }).then(res => {
  360. uni.showToast({
  361. title:'添加成功',
  362. duration:1500
  363. });
  364. that.getCartList()
  365. that.closeTc()
  366. })
  367. },
  368. closeTc() {
  369. this.$refs.specs.close()
  370. this.checkGg = {}
  371. this.good = {}
  372. this.buyNum = 1
  373. },
  374. changeGg(item) {
  375. this.checkGg = item
  376. this.maxNum = item.num*1
  377. },
  378. openTc(item) {
  379. this.good = item
  380. this.checkGg = item.specs[0]
  381. this.buyNum = 1
  382. this.maxNum = item.specs[0].num*1
  383. this.$refs.specs.open()
  384. },
  385. getProducts(type) {
  386. let that = this
  387. let item = that.cateList[that.current].children[that.currents]
  388. if (type == 'tab' && item.loaded) return;
  389. console.log(item.loadType,'loadtype')
  390. if (item.loadType == 'loading' || item.loadType == 'noMore') return;
  391. item.loadType = 'loading'
  392. getProducts({
  393. cate_id: item.id,
  394. page: 1,
  395. limit: that.limit,
  396. store_id: that.store_id
  397. }).then(res => {
  398. let arr = res.data.data.map(item => {
  399. item.buyNum = 0
  400. return item
  401. })
  402. console.log(arr,'arr',item);
  403. // this.goods = res.data.data
  404. item.list = item.list.concat(arr)
  405. item.page++
  406. if (arr.length == that.limit) {
  407. item.loadType = 'more'
  408. } else {
  409. item.loadType = 'noMore'
  410. }
  411. item.loaded = true
  412. })
  413. },
  414. navClick(index) {
  415. this.current = index
  416. this.currents = 0
  417. this.flist = this.cateList[index].children
  418. },
  419. getCateList() {
  420. getCateList().then(res => {
  421. console.log();
  422. this.cateList = res.data.map(item => {
  423. item.children.forEach(items => {
  424. items.page = 1
  425. items.loaded = false
  426. items.loadType = 'more'
  427. items.list = []
  428. })
  429. return item
  430. })
  431. this.flist = this.cateList[0].children
  432. this.getProducts()
  433. })
  434. },
  435. // 载入数据
  436. async loadData() {
  437. let obj = this;
  438. getCategoryList({})
  439. .then(({
  440. data
  441. }) => {
  442. obj.flist = data.map(function(s) {
  443. return s;
  444. });
  445. })
  446. .catch(err => {
  447. console.log(err);
  448. });
  449. },
  450. //一级分类点击
  451. tabtap(index) {
  452. this.currents = index
  453. this.getProducts('tab')
  454. },
  455. //右侧栏滚动
  456. asideScroll(e) {
  457. // 判断有没有初始化页面高度对象数据
  458. if (!this.sizeCalcState) {
  459. this.calcSize();
  460. }
  461. let scrollTop = e.detail.scrollTop;
  462. let box = 0; //列表包裹框高度初始化
  463. let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
  464. // 查询当前页面对象
  465. let view = uni.createSelectorQuery().select('.content');
  466. view.fields({
  467. id: true,
  468. dataset: true,
  469. rect: true,
  470. size: true,
  471. scrollOffset: true
  472. },
  473. function(e) {
  474. // 保存包裹框高度
  475. box = e.height;
  476. }
  477. ).exec();
  478. // 获取所有距离顶部大于滚轮距离页面高度的所有分类
  479. let tabs = this.flist.filter(item => (item.top - 10) <= scrollTop).reverse();
  480. if (tabs.length > 0) {
  481. // 判断是否已经到达滚轮底部
  482. if (box + scrollTop + bottom >= e.detail.scrollHeight) {
  483. this.currentId = this.flist[this.flist.length - 1].id;
  484. } else {
  485. this.currentId = tabs[0].id;
  486. }
  487. }
  488. },
  489. //计算右侧栏每个tab的高度等信息
  490. calcSize() {
  491. let h = 0;
  492. this.flist.forEach(item => {
  493. let view = uni.createSelectorQuery().select('#main-' + item.id);
  494. view.fields({
  495. size: true
  496. },
  497. data => {
  498. item.top = h;
  499. h += data.height;
  500. item.bottom = h;
  501. }
  502. ).exec();
  503. });
  504. this.sizeCalcState = true;
  505. },
  506. navToList(sid, tid) {
  507. // 点击导航跳转到详细页面
  508. uni.navigateTo({
  509. url: '/pages/product/list?fid=' + this.currentId + '&sid=' + sid + '&tid=' + tid
  510. });
  511. }
  512. }
  513. };
  514. </script>
  515. <style lang="scss" scoped>
  516. page,
  517. .content {
  518. height: 100%;
  519. background-color: #f8f8f8;
  520. }
  521. .content {
  522. // display: flex;
  523. }
  524. .left-aside {
  525. flex-shrink: 0;
  526. width: 200rpx;
  527. height: 100%;
  528. background: #f8f8f8;
  529. }
  530. .f-item {
  531. display: flex;
  532. align-items: center;
  533. justify-content: center;
  534. width: 100%;
  535. height: 100rpx;
  536. font-size: 32rpx;
  537. color: $font-color-base;
  538. position: relative;
  539. &.active {
  540. color: $base-color;
  541. background-color: #fff;
  542. &:before {
  543. content: '';
  544. position: absolute;
  545. left: 0;
  546. top: 50%;
  547. transform: translateY(-50%);
  548. height: 36rpx;
  549. width: 8rpx;
  550. background-color: $base-color;
  551. border-radius: 0 4px 4px 0;
  552. opacity: 0.8;
  553. }
  554. }
  555. }
  556. .right-aside {
  557. flex: 1;
  558. overflow: hidden;
  559. padding-left: 20rpx;
  560. padding-right: 20rpx;
  561. height: 100%;
  562. }
  563. .s-item {
  564. display: flex;
  565. align-items: center;
  566. height: 70rpx;
  567. padding-top: 8rpx;
  568. font-size: 32rpx;
  569. color: $font-color-dark;
  570. }
  571. .t-list {
  572. display: flex;
  573. flex-wrap: wrap;
  574. border-radius: 15rpx;
  575. width: 100%;
  576. background: #fff;
  577. padding-top: 12rpx;
  578. &:after {
  579. content: '';
  580. flex: 99;
  581. height: 0;
  582. }
  583. }
  584. .t-item {
  585. flex-shrink: 0;
  586. display: flex;
  587. justify-content: center;
  588. align-items: center;
  589. flex-direction: column;
  590. width: 171rpx;
  591. font-size: 28rpx;
  592. color: #666;
  593. padding-bottom: 20rpx;
  594. image {
  595. width: 140rpx;
  596. height: 140rpx;
  597. }
  598. }
  599. .nav {
  600. height: 160rpx;
  601. flex-wrap: wrap;
  602. width: 100%;
  603. padding-top: 20rpx;
  604. border-radius: 20rpx 20rpx 0 0;
  605. }
  606. .nav-item {
  607. height: 140rpx;
  608. width: 20%;
  609. flex-shrink: 0;
  610. display: flex;
  611. flex-direction: column;
  612. justify-content: center;
  613. align-items: center;
  614. font-weight: 500;
  615. font-size: 23rpx;
  616. color: #000000;
  617. .cate-img {
  618. // border: 1px solid red;
  619. margin-bottom: 10rpx;
  620. width: 95rpx;
  621. height: 95rpx;
  622. border-radius: 50%;
  623. }
  624. }
  625. .action {
  626. color: $base-color;
  627. .cate-img {
  628. border: 1rpx solid $base-color;
  629. }
  630. }
  631. .cart-wrap {
  632. width: 100%;
  633. height: 114rpx;
  634. background: #FFFFFF;
  635. box-shadow: 0rpx 3rpx 16rpx 0rpx rgba(11, 4, 7, 0.17);
  636. }
  637. .cart-wraps {
  638. position: fixed;
  639. bottom: 0;
  640. }
  641. .good {
  642. height: 154rpx;
  643. width: 100%;
  644. margin-bottom: 20rpx;
  645. position: relative;
  646. .good-img {
  647. width: 145rpx;
  648. height: 154rpx;
  649. border-radius: 15rpx;
  650. flex-shrink: 0;
  651. }
  652. .info {
  653. height: 100%;
  654. margin-right: auto;
  655. padding-left: 10rpx;
  656. position: relative;
  657. .name {
  658. font-weight: bold;
  659. font-size: 30rpx;
  660. color: #323232;
  661. }
  662. .price {
  663. position: absolute;
  664. bottom: 0;
  665. left: 10rpx;
  666. font-size: 34rpx;
  667. color: #FF4300;
  668. }
  669. .gg {
  670. color: #999999;
  671. }
  672. }
  673. .btn {
  674. flex-shrink: 0;
  675. width: 50rpx;
  676. height: 50rpx;
  677. border-radius: 50%;
  678. align-self: flex-end;
  679. }
  680. }
  681. .bom {
  682. padding-top: 20rpx;
  683. background-color: #fff;
  684. }
  685. .store-info {
  686. justify-content: flex-start;
  687. background-color: #e07756;
  688. padding: 30rpx 20rpx;
  689. color: #fff;
  690. .store-logo {
  691. width: 100rpx;
  692. height: 100rpx;
  693. }
  694. .info {
  695. margin-left: 20rpx;
  696. .name {
  697. font-size: 32rpx;
  698. font-weight: bold;
  699. padding-bottom: 10rpx;
  700. }
  701. .dis {
  702. font-size: 24rpx;
  703. }
  704. }
  705. }
  706. .cart-wrap {
  707. padding: 0 20rpx 0 35rpx;
  708. .btn-cart {
  709. width: 60rpx;
  710. height: 55rpx;
  711. }
  712. .price {
  713. margin-right: auto;
  714. font-weight: bold;
  715. font-size: 38rpx;
  716. color: #FF6B11;
  717. margin-left: 30rpx;
  718. }
  719. .btn {
  720. width: 218rpx;
  721. height: 80rpx;
  722. background: #FF6602;
  723. border-radius: 10rpx;
  724. font-weight: bold;
  725. font-size: 32rpx;
  726. color: #FFFFFF;
  727. display: flex;
  728. justify-content: center;
  729. align-items: center;
  730. }
  731. }
  732. .specs-wrap {
  733. width: 670rpx;
  734. min-height: 659rpx;
  735. border-radius: 20rpx;
  736. background-color: #fff;
  737. padding: 43rpx 24rpx;
  738. position: relative;
  739. .tit {
  740. font-weight: 500;
  741. font-size: 28rpx;
  742. color: #333333;
  743. margin: 47rpx 0 30rpx;
  744. }
  745. }
  746. .good-info {
  747. height: 140rpx;
  748. .good-logo {
  749. width: 140rpx;
  750. height: 140rpx;
  751. border-radius: 10rpx;
  752. }
  753. .info {
  754. margin-right: auto;
  755. padding-left:20rpx;
  756. display: flex;
  757. flex-direction: column;
  758. justify-content: space-between;
  759. height: 100%;
  760. .name {
  761. font-weight: bold;
  762. font-size: 36rpx;
  763. color: #1C2023;
  764. }
  765. .dis {
  766. font-weight: 500;
  767. font-size: 42rpx;
  768. color: #FF6602;
  769. &::before {
  770. content: '¥';
  771. font-size: 22rpx;
  772. }
  773. }
  774. }
  775. }
  776. .gg-wrap {
  777. justify-content: flex-start;
  778. flex-wrap: wrap;
  779. border-bottom: 1px solid #EEEEEE;
  780. padding-bottom:30rpx;
  781. .gg {
  782. margin-right: 20rpx;
  783. display: flex;
  784. justify-content: center;
  785. align-items: center;
  786. padding: 0 50rpx;
  787. height: 64rpx;
  788. background: #F6F6F6;
  789. border-radius: 10rpx;
  790. }
  791. }
  792. .actions {
  793. background: #ffeff1;
  794. border: 1px solid #FF5263;
  795. color: #FF5263 ;
  796. }
  797. .buy-num {
  798. display: flex;
  799. justify-content: space-between;
  800. padding-top: 20rpx;
  801. font-weight: bold;
  802. font-size: 28rpx;
  803. color: #333333;
  804. }
  805. .buy-now {
  806. width: 279rpx;
  807. height: 84rpx;
  808. background: #FF6602;
  809. border-radius: 42rpx;
  810. font-weight: bold;
  811. font-size: 32rpx;
  812. color: #FFFFFF;
  813. display: flex;
  814. justify-content: center;
  815. align-items: center;
  816. margin:50rpx auto 0;
  817. }
  818. .close-btn {
  819. position: absolute;
  820. bottom: -125rpx;
  821. height: 83rpx;
  822. width: 83rpx;
  823. right: 0;
  824. left: 0;
  825. margin: auto;
  826. }
  827. .cart_wrap {
  828. background-color: #fff;
  829. border-radius: 20rpx 20rpx 0 0;
  830. .cart-top {
  831. font-weight: 500;
  832. font-size: 27rpx;
  833. color: #999999;
  834. justify-content: flex-end;
  835. height: 90rpx;
  836. border-bottom: 1px solid #EEEEEE;
  837. padding-right: 30rpx;
  838. image {
  839. width: 28rpx;
  840. height: 28rpx ;
  841. margin-right: 15rpx;
  842. }
  843. }
  844. }
  845. .cart-list-wrap {
  846. padding: 20rpx;
  847. }
  848. .munbox {
  849. width: 144rpx;
  850. height: 44rpx;
  851. position: absolute;
  852. bottom: 0;
  853. right: 0;
  854. input {
  855. display: inline-block;
  856. text-align: center;
  857. }
  858. image {
  859. flex-shrink: 0;
  860. width: 44rpx;
  861. height: 44rpx;
  862. }
  863. }
  864. .enaction {
  865. background-color: #bcbcbc !important;
  866. }
  867. </style>