index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. <template>
  2. <view class="pages">
  3. <!-- head -->
  4. <sklineHeader title="购物车"></sklineHeader>
  5. <view class="cart-body">
  6. <!-- 内容 -->
  7. <scroll-view
  8. scroll-y
  9. class="cart-list"
  10. type="custom"
  11. :bounces="false"
  12. @scrolltolower="onreachBottom">
  13. <sticky-header>
  14. <!-- 头部 -->
  15. <view class="cart-head" v-if="total>0">
  16. <view class="cart-head-left"><text>{{total}}</text>款商品</view>
  17. <view class="cart-head-right">
  18. <view class="cart-head-btton blue" @click="editAll">
  19. <text>{{editFlag?'完成':'编辑'}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. </sticky-header>
  24. <productItem
  25. v-for="(item, index) in list"
  26. :key="index"
  27. :list="item"
  28. @changeQty="changeQty"
  29. @check="chooseItem"
  30. @editQty="editQty"
  31. @remove="removeCart">
  32. </productItem>
  33. <!-- loading -->
  34. <view class="loading-bar" v-if="total>0 && status!='loading'">{{noDataText}}</view>
  35. <view class="empty-bar" v-if="total==0 && status!='loading'" @click="goBack">
  36. <image mode="aspectFit" :src="empty.imgUrl"></image>
  37. <view>{{empty.tip}}</view>
  38. </view>
  39. </scroll-view>
  40. <!-- 底部 -->
  41. <view class="cart-footer" v-if="total>0">
  42. <view class="cart-footer-box">
  43. <view class="cart-footer-left">
  44. <view class="cart-footer-left-all" @click="chooseAll">
  45. <view class="cart-footer-left-all-icon">
  46. <uni-icons v-if="allDisabled&&!editFlag" type="circle-filled" size="24" color="#ccc"></uni-icons>
  47. <uni-icons v-else :type="allChecked?'checkbox-filled':'circle'" size="24" :color="allChecked?'#dd0000':'#666'"></uni-icons>
  48. </view>
  49. <view class="cart-footer-left-all-text">
  50. <text>全选</text>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="cart-footer-right">
  55. <view class="cart-footer-left-price" v-if="!editFlag && totalAmount">
  56. <view class="flex align_center">
  57. <view class="cart-footer-left-price-text">
  58. <text>合计:</text>
  59. </view>
  60. <view class="cart-footer-left-price-num">
  61. <text>{{Number(totalAmount).toFixed(2).toString().split('.')[0]}}</text>.{{Number(totalAmount).toFixed(2).toString().split('.')[1]}}
  62. </view>
  63. </view>
  64. <view class="flex align_center" v-if="totalDiscount||totalCoupon">
  65. <view class="cart-footer-left-price-text1">
  66. <text v-if="totalDiscount">优惠:¥{{Number(totalDiscount).toFixed(2)}}</text>
  67. <text v-if="totalCoupon">代金券:¥{{Number(totalCoupon).toFixed(2)}}</text>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-else></view>
  72. <view class="cart-footer-right-button">
  73. <button class="btns" :loading="loading" v-if="!editFlag" type="warn" size="mini" @click="settlement">去结算({{totalNum}})</button>
  74. <button v-else class="btns" type="warn" plain size="mini" @click="batchRemove">删除({{totalSel}})</button>
  75. </view>
  76. </view>
  77. </view>
  78. <view :style="{height:safeAreaBottom+'px'}"></view>
  79. </view>
  80. </view>
  81. <!-- 修改数量弹框 -->
  82. <uni-popup ref="showPopu" type="center" :maskClick="false">
  83. <view class="popu-content">
  84. <view class="popu-close" @click="closePopu">
  85. <uni-icons size="26" type="closeempty"></uni-icons>
  86. </view>
  87. <view class="popu-content-title flex align_center justify_center"><text>修改商品数量</text></view>
  88. <view class="popu-content-num flex align_center justify_center">
  89. <uni-number-box v-model="curEditRow.qty" :size="28" :input-width="280" :input-height="70" :min="1" :max="999"></uni-number-box>
  90. </view>
  91. <view class="popu-content-btn">
  92. <view class="popu-content-btn-item cancelBtn" @click="closePopu">取消</view>
  93. <view class="popu-content-btn-item okbtn" @click="changeSingQty">确定</view>
  94. </view>
  95. </view>
  96. </uni-popup>
  97. </view>
  98. </template>
  99. <script>
  100. import {
  101. mapState,
  102. mapMutations,
  103. } from 'vuex'
  104. import productItem from '@/pagesB/cart/productitem.vue'
  105. import sklineHeader from '../../components/skline/sklineHeader.vue'
  106. import { getCartList, updateCart, deleteCart } from '@/api/cart.js'
  107. import { purchaseSave, purchaseCheck } from '@/api/purchase.js'
  108. export default {
  109. components:{
  110. productItem,
  111. sklineHeader
  112. },
  113. onLoad() {
  114. // 计算区域高度
  115. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
  116. this.screenWidth = uni.getSystemInfoSync().windowWidth
  117. this.screenHeight = uni.getSystemInfoSync().windowHeight
  118. this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
  119. // 获取列表数据
  120. this.pageInit()
  121. },
  122. data() {
  123. return {
  124. loading: false,
  125. status: 'loading',
  126. noDataText: '暂无产品',
  127. empty: {
  128. tip: '购物车空空的,去挑选商品吧',
  129. imgUrl: '/static/kongCart.png'
  130. },
  131. // 查询条件
  132. pageNo: 1, // 页数
  133. pageSize: 10000, // 每页数
  134. list: [], // 列表数据
  135. total: 0, // 总款数
  136. totalAmount: 0, // 总金额
  137. totalDiscount:0, // 总优惠
  138. totalCoupon: 0, // 总代金券
  139. totalNum: 0, // 总数量
  140. totalSel: 0, // 已选数量
  141. editFlag: false, // 是否编辑状态
  142. allChecked: false, // 是否全选
  143. screenWidth: 325, // 屏幕宽度
  144. screenHeight: 0, // 屏幕高度
  145. statusBarHeight: 44, // 状态栏高度
  146. safeAreaBottom: 0, // 底部安全区域高度
  147. curEditRow: null
  148. }
  149. },
  150. computed: {
  151. ...mapState(['hasLogin']),
  152. userInfo(){
  153. return this.$store.state.vuex_userInfo
  154. },
  155. allDisabled(){
  156. let ret = false
  157. if(!this.editFlag){
  158. this.list.forEach(key => {
  159. ret = key.every(item => !item.status || item.status==0 || item.dealerScopeFlag==0)
  160. })
  161. }
  162. return ret
  163. }
  164. },
  165. methods: {
  166. goBack(){
  167. uni.navigateBack()
  168. },
  169. pageInit(){
  170. this.pageNo = 1
  171. this.list = []
  172. this.getRow()
  173. },
  174. // 关闭弹框
  175. closePopu(){
  176. this.$refs.showPopu.close()
  177. this.curEditRow = null
  178. },
  179. // 打开编辑数量弹框
  180. editQty(item){
  181. this.curEditRow = JSON.parse(JSON.stringify(item))
  182. this.$refs.showPopu.open()
  183. },
  184. // 确定修改
  185. changeSingQty(){
  186. this.changeQty(this.curEditRow.qty,this.curEditRow.cartSn)
  187. },
  188. // 查询列表
  189. getRow (pageNo) {
  190. let _this = this
  191. if (pageNo) {
  192. this.pageNo = pageNo
  193. }
  194. let params = {
  195. pageNo: this.pageNo,
  196. pageSize: this.pageSize,
  197. queryWord: this.queryWord
  198. }
  199. this.status = "loading"
  200. getCartList(params).then(res => {
  201. if (res.status == 200) {
  202. _this.total = res.data.count || 0
  203. const list = res.data.list
  204. for(let i=0;i<list.length;i=i+10){
  205. _this.list.push(list.slice(i,(i+10)>list.length?list.length:(i+10)).map(key=>{
  206. const a = key.shopPromoProduct
  207. key.orginPrice = key.price
  208. if(a){
  209. key.promoType = a.promoType
  210. key.resultValue = a.resultValue
  211. key.conditionValue = a.conditionValue
  212. key.discountType = a.discountType
  213. key.promoProductSn = a.promoProductSn
  214. key.promoSn = a.promoSn
  215. // 特价
  216. if(key.promoType=='PROMO_PROD'){
  217. key.price = key.conditionValue
  218. }
  219. }
  220. key.priceStr = Number(key.price).toFixed(2).toString().split('.')
  221. delete key.shopPromoProduct
  222. return {
  223. id: key.id,
  224. edit: false,
  225. checked: _this.allChecked,
  226. cartSn: key.cartSn,
  227. price: key.price,
  228. orginPrice: key.orginPrice,
  229. priceStr: key.priceStr,
  230. qty: key.qty,
  231. productSn: key.productSn,
  232. productName: key.productEntity.productName,
  233. productImage: key.productEntity.images,
  234. productCode: key.productEntity.code,
  235. productOrigCode: key.productEntity.origCode,
  236. unit: key.productEntity.unit,
  237. status: key.status,
  238. dealerScopeFlag: key.dealerScopeFlag,
  239. resultValue: key.resultValue,
  240. conditionValue: key.conditionValue,
  241. discountType: key.discountType,
  242. promoType: key.promoType,
  243. promoProductSn: key.promoProductSn,
  244. promoSn: key.promoSn,
  245. giftQty: 0
  246. }
  247. }))
  248. }
  249. // 默认全选
  250. if(_this.pageNo == 1){
  251. _this.$nextTick(()=>{
  252. _this.chooseAll()
  253. })
  254. }
  255. // 判断是否最后一页
  256. const maxPages = Math.ceil(_this.total / _this.pageSize)
  257. if(this.pageNo >= maxPages){
  258. _this.status = 'nomore'
  259. _this.noDataText = '没有更多了'
  260. }else{
  261. _this.status = 'loadmore'
  262. _this.noDataText = '加载更多'
  263. }
  264. } else {
  265. _this.list = []
  266. _this.total = 0
  267. _this.status = 'loadmore'
  268. _this.noDataText = res.message
  269. }
  270. })
  271. },
  272. // scroll-view到底部加载更多
  273. onreachBottom() {
  274. // 判断是否最后一页
  275. const maxPages = Math.ceil(this.total / this.pageSize)
  276. if(this.pageNo >= maxPages){
  277. this.status = "nomore"
  278. this.noDataText = '没有更多了'
  279. }else{
  280. this.pageNo += 1
  281. this.getRow()
  282. }
  283. },
  284. // 根据cartSn查找
  285. getItemById(cartSn){
  286. const a = this.list.findIndex(k => k.find(s=> s.cartSn == cartSn))
  287. const b = a>=0 ? this.list[a].findIndex(s=> s.cartSn == cartSn) : -1
  288. return {p:a,s:b}
  289. },
  290. // 已选产品变更数量
  291. changeQty(val,cartSn){
  292. uni.showLoading({
  293. title: '加载中'
  294. })
  295. updateCart({
  296. cartSn: cartSn,
  297. qty: val
  298. }).then(res => {
  299. if(res.status == 200){
  300. const crow = this.getItemById(cartSn)
  301. if(crow.p>=0&&crow.s>=0){
  302. this.list[crow.p][crow.s].qty = val
  303. this.list[crow.p].splice()
  304. // 合计
  305. this.getChooseHeji()
  306. uni.$emit('refashCart')
  307. }
  308. this.closePopu()
  309. }else{
  310. uni.showToast({
  311. title: res.message,
  312. icon: 'none'
  313. })
  314. }
  315. uni.hideLoading()
  316. })
  317. },
  318. // 单选择
  319. chooseItem(cartSn){
  320. const crow = this.getItemById(cartSn)
  321. if(crow.p>=0&&crow.s>=0){
  322. this.list[crow.p][crow.s].checked = !this.list[crow.p][crow.s].checked
  323. // 合计
  324. this.getChooseHeji()
  325. // 判断是否全选
  326. this.isAllChecked()
  327. }
  328. },
  329. // 判断是否全选
  330. isAllChecked(){
  331. if(this.editFlag){
  332. this.allChecked = this.list.every(key => key.every(item => item.checked))
  333. }else{
  334. this.allChecked = this.list.every(key => key.filter(item => item.status==1&&item.dealerScopeFlag==1 ).every(item => item.checked))
  335. }
  336. },
  337. // 编辑
  338. editAll(){
  339. this.editFlag = !this.editFlag
  340. this.list.forEach(key => {
  341. key.forEach(item => {
  342. item.edit = this.editFlag
  343. if(!item.status||item.status==0||item.dealerScopeFlag==0){
  344. item.checked = false
  345. }
  346. })
  347. })
  348. // 合计
  349. this.getChooseHeji()
  350. // 判断是否全选
  351. this.isAllChecked()
  352. },
  353. // 清空购物车
  354. clearAll(){
  355. const _this = this
  356. uni.showModal({
  357. title: '提示',
  358. content: '确定清空购物车?',
  359. confirmText: '确定',
  360. success(res) {
  361. if(res.confirm){
  362. uni.showLoading({
  363. title: '正在清空...',
  364. mask: true
  365. })
  366. }
  367. }
  368. })
  369. },
  370. // 全选
  371. chooseAll(){
  372. if(this.allDisabled){
  373. return
  374. }
  375. this.allChecked = !this.allChecked
  376. this.list.forEach(key => {
  377. // 非编辑模式
  378. if(!this.editFlag){
  379. key.filter(item=>item.status == 1 && item.dealerScopeFlag == 1).forEach(item => {
  380. item.checked = this.allChecked
  381. })
  382. }else{
  383. // 编辑模式
  384. key.forEach(item => {
  385. item.checked = this.allChecked
  386. })
  387. }
  388. })
  389. // 合计
  390. this.getChooseHeji()
  391. },
  392. //单个删除
  393. removeChoose(cartSn,isBatch){
  394. // 删除项
  395. const crow = this.getItemById(cartSn)
  396. if(crow.p>=0&&crow.s>=0){
  397. this.list[crow.p].splice(crow.s, 1);
  398. this.total = this.total - 1
  399. // 合计
  400. if(!isBatch){
  401. this.getChooseHeji()
  402. uni.$emit('refashCart')
  403. // 判断是否全选
  404. this.isAllChecked()
  405. }
  406. }
  407. },
  408. // 批量删除
  409. batchRemove(){
  410. if(this.totalNum==0){
  411. uni.showToast({
  412. title: '请选择产品',
  413. icon: 'none'
  414. })
  415. return false
  416. }
  417. const _this = this
  418. uni.showModal({
  419. title: '提示',
  420. content: '确定删除商品吗?',
  421. confirmText: '确定',
  422. success(res) {
  423. if(res.confirm){
  424. const snList = []
  425. _this.list.forEach(item => {
  426. item.filter(k=>k.checked).forEach(s=>{
  427. snList.push(s.cartSn)
  428. })
  429. })
  430. // 删除购物车
  431. _this.removeCart(snList,true,true)
  432. }
  433. }
  434. })
  435. },
  436. // 删除商品
  437. removeCart(snList,isBatch,isTip){
  438. const _this = this
  439. if(isTip){
  440. uni.showLoading({
  441. title: '删除中'
  442. })
  443. }
  444. deleteCart({cartSns:snList}).then(ret => {
  445. if(ret.status == 200){
  446. snList.forEach(sn => {
  447. _this.removeChoose(sn,isBatch)
  448. })
  449. // 合计,批量操作
  450. if(isBatch){
  451. _this.getChooseHeji()
  452. uni.$emit('refashCart')
  453. // 判断是否全选
  454. _this.isAllChecked()
  455. }
  456. if(isTip){
  457. uni.showToast({
  458. title: '删除成功',
  459. icon: 'none'
  460. })
  461. }
  462. }
  463. uni.hideLoading()
  464. })
  465. },
  466. // 去结算
  467. settlement(){
  468. if(this.totalAmount>0){
  469. this.submitOrder()
  470. }else{
  471. uni.showToast({
  472. title: '请选择产品',
  473. icon: 'none'
  474. })
  475. }
  476. },
  477. // 去结算
  478. submitOrder(){
  479. const _this = this
  480. // 获取已选商品
  481. const detailList = []
  482. const cartSn = []
  483. _this.list.forEach(key => {
  484. key.filter(item=>item.checked).forEach(item => {
  485. detailList.push({
  486. productSn:item.productSn,
  487. productCode:item.productCode,
  488. qty: item.qty,
  489. price:item.orginPrice,
  490. promoSn: item.promoSn
  491. })
  492. cartSn.push({
  493. cartSn: item.cartSn,
  494. productSn:item.productSn
  495. })
  496. })
  497. })
  498. // 校验并提示信息
  499. purchaseCheck({detailList:detailList}).then(res => {
  500. if(res.status == 200){
  501. const successList = res.data.successList.map(item => {
  502. return {
  503. productSn:item.productSn,
  504. productCode: item.productCode,
  505. qty: item.qty,
  506. price:item.price,
  507. promoSn: item.promoSn
  508. }
  509. })
  510. const delSn = cartSn.filter(item => successList.find(k => k.productSn == item.productSn)).map(item => item.cartSn)
  511. const removeList = res.data.removeList.map(item => item.productCode)
  512. const selloutList = res.data.selloutList.map(item => item.productCode)
  513. console.log(successList,delSn)
  514. console.log(removeList,selloutList)
  515. // 有已下架或已售罄产品提示
  516. if(removeList.length || selloutList.length){
  517. uni.showModal({
  518. title: '提示',
  519. content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
  520. showCancel: successList.length,
  521. confirmText: successList.length?'确定':'知道了',
  522. success(ret) {
  523. if(ret.confirm && successList.length){
  524. _this.submitForm(successList,delSn)
  525. }
  526. }
  527. })
  528. }else{
  529. // 提交
  530. _this.submitForm(successList,delSn)
  531. }
  532. }else{
  533. uni.showToast({
  534. title: res.message,
  535. icon: 'none'
  536. })
  537. }
  538. })
  539. },
  540. // 确认提交
  541. submitForm(detailList,cartSn){
  542. uni.showLoading({
  543. title: '提交中...',
  544. mask: true
  545. })
  546. this.loading = true
  547. purchaseSave({
  548. detailList: detailList
  549. }).then(res => {
  550. this.loading = false
  551. uni.hideLoading()
  552. if(res.status == 200){
  553. // 删除已提交产品
  554. this.removeCart(cartSn,true,false)
  555. res.data.detailList = []
  556. this.$store.state.vuex_tempData = res.data
  557. uni.navigateTo({
  558. url: "/pagesB/procureOrder"
  559. })
  560. }else{
  561. uni.showToast({
  562. title: res.message,
  563. icon: 'none'
  564. })
  565. }
  566. })
  567. },
  568. // 计算总款数、合计、数量
  569. getChooseHeji(){
  570. this.totalAmount = 0
  571. this.totalDiscount = 0
  572. this.totalCoupon = 0
  573. this.totalNum = 0
  574. this.totalSel = 0
  575. this.list.forEach(key => {
  576. key.filter(item=>item.checked).forEach(item => {
  577. this.totalAmount += item.price * item.qty // 总金额
  578. this.totalNum += item.qty // 总数量
  579. this.totalSel += 1 // 已选数量
  580. // 如果是返券类型
  581. if(item.promoType=='BUY_PROD_GIVE_VALID'){
  582. this.totalCoupon += item.resultValue * item.qty
  583. }
  584. // 特价
  585. if(item.promoType=='PROMO_PROD'){
  586. this.totalDiscount += item.conditionValue
  587. }
  588. // 满赠
  589. item.giftQty = item.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(item.qty / item.conditionValue)*item.resultValue : 0
  590. })
  591. })
  592. },
  593. }
  594. }
  595. </script>
  596. <style lang="less">
  597. .pages{
  598. height: 100vh;
  599. display: flex;
  600. flex-direction: column;
  601. .popu-content{
  602. background-color: #FFFFFF;
  603. border-radius: 10px;
  604. width: 300px;
  605. display: flex;
  606. flex-direction: column;
  607. align-items: center;
  608. padding: 10px 15px;
  609. .popu-close{
  610. padding: 10px;
  611. position: absolute;
  612. right: 0;
  613. top: 0;
  614. }
  615. .popu-content-title{
  616. padding: 10px;
  617. font-size: 16px;
  618. }
  619. .popu-content-num{
  620. font-size: 14px;
  621. color: #999999;
  622. padding: 10px 0;
  623. > text{
  624. margin-right: 10px;
  625. font-size: 10px;
  626. }
  627. }
  628. .popu-content-btn{
  629. width: 100%;
  630. display: flex;
  631. align-items: center;
  632. justify-content: space-around;
  633. margin: 20px 0 10px;
  634. .popu-content-btn-item{
  635. width: 40%;
  636. height: 32px;
  637. font-size: 14px;
  638. display: flex;
  639. align-items: center;
  640. justify-content: center;
  641. border-radius: 100px;
  642. }
  643. .cancelBtn{
  644. background-color: #f8f8f8;
  645. color: #666;
  646. }
  647. .okbtn{
  648. background-color: #f70000;
  649. color: #FFFFFF;
  650. }
  651. }
  652. }
  653. .cart-body{
  654. position: relative;
  655. flex-grow: 1;
  656. display: flex;
  657. flex-direction: column;
  658. .cart-head{
  659. display: flex;
  660. justify-content: space-between;
  661. align-items: center;
  662. padding: 0 20rpx;
  663. background-color: #FFFFFF;
  664. height: 40px;
  665. .cart-head-left{
  666. display: flex;
  667. align-items: center;
  668. font-size: 28rpx;
  669. color: #333333;
  670. height: 100%;
  671. text{
  672. color: #d81e06;
  673. margin: 0 10rpx;
  674. }
  675. }
  676. .cart-head-right{
  677. display: flex;
  678. align-items: center;
  679. }
  680. .red{
  681. color: #d81e06;
  682. }
  683. .blue{
  684. color: #2196F3;
  685. }
  686. .cart-head-btton{
  687. height: 100%;
  688. font-size: 28rpx;
  689. margin-right: 10px;
  690. }
  691. }
  692. .cart-list{
  693. flex-grow: 1;
  694. background-color: #F5F5F5;
  695. width: 100%;
  696. .loading-bar{
  697. text-align: center;
  698. padding: 10px 0;
  699. color: #999999;
  700. }
  701. .empty-bar{
  702. display: flex;
  703. flex-direction: column;
  704. align-items: center;
  705. justify-content: center;
  706. padding: 20px 0;
  707. margin-top: 20vh;
  708. image{
  709. width: 100px;
  710. height: 100px;
  711. }
  712. view{
  713. font-size: 14px;
  714. color: #999999;
  715. margin-top: 10px;
  716. }
  717. }
  718. }
  719. .cart-footer{
  720. width: 100%;
  721. background-color: #FFFFFF;
  722. .cart-footer-box{
  723. width: 100%;
  724. height: 100rpx;
  725. display: flex;
  726. justify-content: space-between;
  727. align-items: center;
  728. }
  729. .cart-footer-left{
  730. display: flex;
  731. align-items: center;
  732. padding: 0 20rpx 0 36rpx;
  733. .cart-footer-left-all{
  734. display: flex;
  735. align-items: center;
  736. .cart-footer-left-all-text{
  737. margin-left: 10rpx;
  738. font-size: 28rpx;
  739. color: #333333;
  740. }
  741. }
  742. }
  743. .cart-footer-right{
  744. padding: 0 20rpx;
  745. display: flex;
  746. align-items: center;
  747. justify-content: space-between;
  748. flex-grow:1;
  749. .cart-footer-left-price{
  750. flex-grow:1;
  751. > view{
  752. display: flex;
  753. align-items: baseline;
  754. justify-content: flex-end;
  755. }
  756. .cart-footer-left-price-text{
  757. font-size: 24rpx;
  758. color: #333333;
  759. }
  760. .cart-footer-left-price-text1{
  761. font-size: 20rpx;
  762. color: #666;
  763. display: flex;
  764. align-items: center;
  765. margin-top: 2px;
  766. text{
  767. margin-right: 5px;
  768. }
  769. }
  770. .cart-footer-left-price-num{
  771. display: flex;
  772. align-items: baseline;
  773. font-size: 24rpx;
  774. color: #d81e06;
  775. text{
  776. font-size: 32rpx;
  777. }
  778. }
  779. }
  780. .red{
  781. color: #d81e06;
  782. }
  783. .cart-head-btton{
  784. height: 100%;
  785. font-size: 28rpx;
  786. color: #333333;
  787. }
  788. .cart-footer-right-button{
  789. display: flex;
  790. align-items: center;
  791. margin-left: 20rpx;
  792. text-align: right;
  793. .btns{
  794. border-radius: 100rpx;
  795. height: 36px;
  796. }
  797. }
  798. }
  799. }
  800. }
  801. }
  802. </style>