cart.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <template>
  2. <view :class="['qn-page-' + theme]">
  3. <view class="container">
  4. <Aempty text="您购物车暂无商品,快去加购吧~" src="https://onlineimg.qianniao.vip/car.png" v-if="!isLogin || (invalidData.length === 0 && goodsData.length === 0)"></Aempty>
  5. <view v-else>
  6. <!-- 列表 goodsData -->
  7. <view class="card" v-for="(item, index) in goodsData" :key="index">
  8. <view class="box clearfix">
  9. <text
  10. @click="checkShop(item.checkedShop, item.shopId, 2, item)"
  11. class="ibonfont"
  12. :class="[item.checkedShop ? 'ibonxuanze_xuanzhong primary-color' : 'ibonxuanze']"
  13. ></text>
  14. <text class="title">{{ item.shopName }}</text>
  15. </view>
  16. <view class="cart-list">
  17. <u-swipe-action
  18. class="uniSwipe"
  19. :options="options"
  20. v-for="(goods, goodsindex) in item.shopGoodsData"
  21. :key="goodsindex"
  22. :show="goods.isShow"
  23. :index="goodsindex"
  24. @open="openItem(index, goodsindex)"
  25. @click="deleteCartItem([goods.cartId], goods)"
  26. >
  27. <view class="cart-item clearfix">
  28. <!-- 是否选中 -->
  29. <text
  30. @click="checkShop(goods.selection === 5, goods.cartId, 1, goods, item)"
  31. class="ibonfont float_left"
  32. :class="[goods.selection === 5 ? 'ibonxuanze_xuanzhong primary-color' : 'ibonxuanze']"
  33. ></text>
  34. <view class="image-wrapper float_left" @click="goPage(`/pagesT/product/product?id=${goods.goodsId}`)">
  35. <!-- 图片 -->
  36. <image :src="goods.goodsImages" mode="aspectFill" />
  37. </view>
  38. <!-- 标题 -->
  39. <view class="item-right float_left">
  40. <text class="title" @click="goPage(`/pagesT/product/product?id=${goods.goodsId}`)">{{ goods.goodsName }}</text>
  41. <view class="attr" @click="goPage(`/pagesT/product/product?id=${goods.goodsId}`)">
  42. <block v-if="goods.specGroup && goods.specGroup.length">
  43. <text>规格:</text>
  44. <text v-for="(sku, skui) in goods.specGroup" :key="skui" style="padding-right: 4upx;">{{ sku.specValueName }};</text>
  45. </block>
  46. </view>
  47. <view class="BotStyle clearfix">
  48. <view class="price float_left primary-color">
  49. <text class="icon-rmb">¥</text>
  50. <view style="display: inline-block;"><rich-text :nodes="$_utils.splitPrice(goods.price)"></rich-text></view>
  51. <text style="font-size: 20rpx;">/{{ goods.unitName }}</text>
  52. </view>
  53. <view v-if="goods.isActivity === 5" class="activity-tag float_left primary-bg">活动价</view>
  54. <view class="float_right clearfix number-box">
  55. <block v-if="goods.isDistribution === 5">
  56. <!-- 开启预售不验证最大值 -->
  57. <u-number-box
  58. :bg-color="primaryColor"
  59. color="#fff"
  60. :value="goods.buyNum"
  61. :input-height="44"
  62. :min="goods.setNum"
  63. @blur="numberChange($event, goods)"
  64. @plus="clacAdd($event, goods)"
  65. @minus="clacSusubtract($event, goods)"
  66. ></u-number-box>
  67. </block>
  68. <block v-else>
  69. <!-- 未开启预售最大值为库存数 -->
  70. <u-number-box
  71. :bg-color="primaryColor"
  72. color="#fff"
  73. :value="goods.buyNum"
  74. :input-height="44"
  75. :max="Number(goods.inventoryNum)"
  76. :min="goods.setNum"
  77. @blur="numberChange($event, goods)"
  78. @plus="clacAdd($event, goods)"
  79. @minus="clacSusubtract($event, goods)"
  80. ></u-number-box>
  81. </block>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </u-swipe-action>
  87. </view>
  88. </view>
  89. <view class="card invalid-card" v-if="invalidData.length">
  90. <view class="clearfix invalid-view">
  91. <text class="float_left invalid-tit">失效商品({{ invalidData.length }})</text>
  92. <text class="float_right invalid-btn primary-color" @click="clearInvalid">清空失效商品</text>
  93. </view>
  94. <view class="cart-list" v-for="(goods, goodsindex) in invalidData" :key="goodsindex">
  95. <view class="cart-item clearfix">
  96. <!-- 是否选中 -->
  97. <view class="image-wrapper float_left">
  98. <view class="invalid-tag"><text>已失效</text></view>
  99. <!-- 图片 -->
  100. <image :src="goods.goodsImages" mode="aspectFill" />
  101. </view>
  102. <!-- 标题 -->
  103. <view class="item-right float_left">
  104. <view class="title ellipsis">{{ goods.goodsName }}</view>
  105. <view class="invalid-msg">{{ goods.invalidMsg }}</view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- 优惠券面板 -->
  112. </view>
  113. <!-- 底部菜单栏 -->
  114. <view class="action-section" v-if="isLogin" :style="{ bottom: isBang ? '170rpx' : '100rpx' }">
  115. <view class="action-section-main">
  116. <view class="checkbox clearfix">
  117. <text @click="checkShop(allChecked, '', 3)" class="ibonfont float_left" :class="[allChecked ? 'ibonxuanze_xuanzhong primary-color' : 'ibonxuanze']"></text>
  118. <view class="all-btn float_right" :class="{ show: allChecked }">
  119. <text @click="checkShop(allChecked, '', 3)">全选</text>
  120. <!-- #ifdef MP -->
  121. <text style="margin-left: 24upx;" @click="is_edit = !is_edit">{{ is_edit ? '完成' : '编辑' }}</text>
  122. <!-- #endif -->
  123. </view>
  124. </view>
  125. <view class="total-box" v-if="!is_edit">
  126. <view>
  127. <text class="total-text">合计:</text>
  128. <text class="price primary-color">¥{{ $_utils.formatNub(goodsDataAll.payMoney) || 0 }}</text>
  129. </view>
  130. <!-- 说明 -->
  131. <view class="freeExpressPrice" v-if="!goodsDataAll.totalMoney && startDeliveryPrice" @click="goPage('/pages/classification/cate', 'switchTab')">
  132. <text>满{{ startDeliveryPrice }}元起送,先去逛逛</text>
  133. <u-icon name="arrow-right" size="20"></u-icon>
  134. </view>
  135. <view
  136. class="freeExpressPrice"
  137. v-else-if="startDeliveryPrice && goodsDataAll.totalMoney < startDeliveryPrice"
  138. @click="goPage('/pages/classification/cate', 'switchTab')"
  139. >
  140. <text>还差{{ $NP.minus(startDeliveryPrice, goodsDataAll.totalMoney) }}元起送,再去逛逛</text>
  141. <u-icon name="arrow-right" size="20"></u-icon>
  142. </view>
  143. <view class="freeExpressPrice" v-else-if="freeExpressPrice > 0" @click="goPage('/pages/classification/cate', 'switchTab')">
  144. 还差{{ freeExpressPrice.toFixed(2) }}元免运费,去凑单
  145. <u-icon name="arrow-right" size="20"></u-icon>
  146. </view>
  147. <!-- v-else-if="goodsDataAll.preferential > 0" -->
  148. <view class="freeExpressPrice" v-else @click="goPage('/pages/classification/cate', 'switchTab')">
  149. 总额:¥{{ goodsDataAll.totalMoney || 0 }} 活动优惠:-¥{{ goodsDataAll.preferential || 0 }}
  150. </view>
  151. </view>
  152. <view v-if="!is_edit" @click="createOrder" class="confirm-btn primary-bg">
  153. <text v-if="!goodsDataAll.totalMoney">随便逛逛</text>
  154. <text v-else-if="goodsDataAll.totalMoney < startDeliveryPrice">去凑单</text>
  155. <text v-else>去结算</text>
  156. <!-- ({{ goodsDataAll.checkNum || 0 }}) -->
  157. </view>
  158. <text v-if="is_edit" class="del-goods-btn" @click="delSelect">删除</text>
  159. </view>
  160. </view>
  161. <!-- 底部tabbar -->
  162. <Tabbar v-model="tab_current"></Tabbar>
  163. </view>
  164. </template>
  165. <script>
  166. import Login from '@/components/Login.vue';
  167. export default {
  168. components: {
  169. Login
  170. },
  171. data() {
  172. return {
  173. tab_current: 2,
  174. is_edit: false,
  175. totalMoney: 0, //总价格
  176. buyNum: 1, //更新购物数字
  177. checkedShop: false, //商铺选择
  178. allChecked: false, //全选状态 true|false
  179. empty: false, //空白页现实 true|false
  180. goodsData: [], //店铺列表
  181. invalidData: [], //失效商品
  182. shopGoodsData: [], //商品列表
  183. options: [
  184. {
  185. text: '删除',
  186. style: {
  187. backgroundColor: 'rgb(255,58,49)'
  188. }
  189. }
  190. ],
  191. goodsDataAll: {
  192. activityMoney: '0.00',
  193. cartNum: 0,
  194. checkNum: 0,
  195. expressMoney: 0,
  196. goodsData: [],
  197. goodsNum: 0,
  198. invalidData: [],
  199. payMoney: '0.00',
  200. preferential: '0.00',
  201. totalMoney: '0.00',
  202. vipDiscount: 0,
  203. vipDoubleDiscount: 0
  204. }
  205. };
  206. },
  207. // #ifdef APP-PLUS || H5
  208. onNavigationBarButtonTap(obj) {
  209. var currentWebview = this.$mp.page.$getAppWebview();
  210. var tn = currentWebview.getStyle().titleNView;
  211. // 修改buttons
  212. // index: 按钮索引, style {WebviewTitleNViewButtonStyles }
  213. if (!this.is_edit) {
  214. this.is_edit = true;
  215. tn.buttons[0].text = '完成'; //[0] 按钮的下标
  216. currentWebview.setStyle({
  217. titleNView: tn
  218. });
  219. } else if (this.is_edit) {
  220. // console.log(132312);
  221. this.is_edit = false;
  222. tn.buttons[0].text = '编辑'; //[0] 按钮的下标
  223. currentWebview.setStyle({
  224. titleNView: tn
  225. });
  226. }
  227. },
  228. // #endif
  229. watch: {
  230. '$store.state.locationObj'(val) {
  231. if (JSON.stringify(val) === '{}') {
  232. this.getAuthorizeInfo();
  233. return;
  234. }
  235. if (this.isLogin) {
  236. this.getCartByUserCenterId();
  237. }
  238. },
  239. isLogin(val) {
  240. if (val) {
  241. this.getCartByUserCenterId();
  242. }
  243. }
  244. },
  245. computed: {
  246. // 判断市场常见的几种刘海屏机型 true为刘海机型
  247. isBang() {
  248. return this.$_utils.modelmes();
  249. },
  250. isLogin() {
  251. return this.$store.state.hasLogin;
  252. },
  253. startDeliveryPrice() {
  254. return this.$store.state.baseSet.startDeliveryPrice || 0;
  255. },
  256. freeExpressPrice() {
  257. const freeExpressPrice = this.$store.state.baseSet.freeExpressPrice || 0;
  258. return this.$NP.minus(freeExpressPrice, this.goodsDataAll.totalMoney);
  259. }
  260. },
  261. onLoad() {
  262. if (JSON.stringify(this.$store.state.locationObj) === '{}') {
  263. this.getAuthorizeInfo();
  264. }
  265. // #ifdef MP-WEIXIN
  266. // 小程序的原生菜单中显示分享按钮
  267. uni.showShareMenu({
  268. withShareTicket: false,
  269. menus: ['shareAppMessage', 'shareTimeline']
  270. });
  271. // #endif
  272. },
  273. onShow() {
  274. if (this.$store.state.hasLogin) {
  275. this.getCartByUserCenterId();
  276. }
  277. },
  278. onPullDownRefresh() {
  279. if (this.isLogin) {
  280. this.getCartByUserCenterId();
  281. } else {
  282. uni.stopPullDownRefresh();
  283. }
  284. },
  285. methods: {
  286. // 点击添加clacAdd
  287. clacAdd(e, goods) {
  288. if (goods.selection === 5) {
  289. this.goodsDataAll.totalMoney = this.$NP.plus(Number(this.goodsDataAll.totalMoney), Number(goods.price));
  290. }
  291. this.updateBuyNum(goods.cartId, e.value);
  292. },
  293. // 点击减少数量
  294. clacSusubtract(e, goods) {
  295. // if (goods.buyNum === 1) {
  296. // this.$api.msg('商品数量不可以再减少了哦');
  297. // return;
  298. // }
  299. if (goods.selection === 5) {
  300. this.goodsDataAll.totalMoney = this.$NP.minus(Number(this.goodsDataAll.totalMoney), Number(goods.price));
  301. }
  302. this.updateBuyNum(goods.cartId, e.value);
  303. },
  304. // 手动输入
  305. numberChange(e, goods) {
  306. if (e.value <= 0) {
  307. this.$api.msg('请输入正确的数量');
  308. return;
  309. }
  310. this.updateBuyNum(goods.cartId, e.value);
  311. },
  312. // 更新购物车数量 updateBuyNum
  313. updateBuyNum(id, buyNum) {
  314. this.$u.api
  315. .updateBuyNum(id, {
  316. buyNum: buyNum
  317. })
  318. .then(res => {
  319. this.getCartByUserCenterId();
  320. })
  321. .catch(() => {
  322. this.getCartByUserCenterId();
  323. });
  324. },
  325. //请求数据 获取商品列表
  326. getCartByUserCenterId() {
  327. this.$u.api.getCartByUserCenterId().then(({ data }) => {
  328. uni.stopPullDownRefresh();
  329. if (Array.isArray(data)) {
  330. this.goodsDataAll = {
  331. activityMoney: '0.00',
  332. cartNum: 0,
  333. checkNum: 0,
  334. expressMoney: 0,
  335. goodsData: [],
  336. goodsNum: 0,
  337. invalidData: [],
  338. payMoney: '0.00',
  339. preferential: '0.00',
  340. totalMoney: '0.00',
  341. vipDiscount: 0,
  342. vipDoubleDiscount: 0
  343. };
  344. this.goodsData = [];
  345. this.invalidData = [];
  346. this.$store.commit('commit_cartNum', 0);
  347. this.$store.commit('commit_cartPrice', 0);
  348. return;
  349. }
  350. this.goodsDataAll = data;
  351. this.invalidData = data.invalidData || [];
  352. if (data.goodsData && data.goodsData.length) {
  353. data.goodsData.forEach(item => {
  354. item.checkedShop = item.shopGoodsData.every(itemG => itemG.selection === 5);
  355. item.shopGoodsData.forEach(goods => {
  356. goods.isShow = false;
  357. });
  358. });
  359. this.goodsData = data.goodsData;
  360. this.allChecked = this.goodsData.every(item => item.checkedShop);
  361. } else {
  362. this.goodsData = [];
  363. }
  364. this.$store.commit('commit_cartNum', data.goodsNum);
  365. this.$store.commit('commit_cartPrice', data.totalMoney);
  366. });
  367. },
  368. // 打开swipeAction
  369. openItem(i, gi) {
  370. // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
  371. // 原本为'false',再次设置为'false'会无效
  372. let target = this.$u.deepClone(this.goodsData);
  373. target[i].shopGoodsData[gi].isShow = true;
  374. this.goodsData = target;
  375. },
  376. // 选中切换
  377. // type 1 单商品;2 店铺切换;3 全选切换
  378. async checkShop(checked, id, type, row, PRow) {
  379. const selection = checked ? 4 : 5;
  380. const params = {
  381. selection: selection,
  382. type: type
  383. };
  384. if (type === 1) {
  385. params.cartId = id;
  386. // 前端手动把选择标示进行切换,优化操作体验
  387. row.selection = selection;
  388. PRow.checkedShop = PRow.shopGoodsData.every(itemG => itemG.selection === 5);
  389. this.allChecked = this.goodsData.every(item => item.checkedShop);
  390. } else if (type === 2) {
  391. params.shopId = id;
  392. // 前端手动把选择标示进行切换,优化操作体验
  393. row.checkedShop = !checked;
  394. row.shopGoodsData.forEach(item => {
  395. item.selection = selection;
  396. });
  397. this.allChecked = this.goodsData.every(item => item.checkedShop);
  398. } else {
  399. // 前端手动把选择标示进行切换,优化操作体验
  400. this.allChecked = !checked;
  401. this.goodsData.forEach(item => {
  402. item.checkedShop = !checked;
  403. item.shopGoodsData.forEach(goods => {
  404. goods.selection = selection;
  405. });
  406. });
  407. }
  408. this.$u.api
  409. .updateSelection({
  410. ...params
  411. })
  412. .then(res => {
  413. this.getCartByUserCenterId();
  414. });
  415. },
  416. // 移出商品
  417. delSelect() {
  418. let chooseGoods = [];
  419. this.goodsData.forEach(item => {
  420. item.shopGoodsData.forEach(itemC => {
  421. if (itemC.selection === 5) {
  422. chooseGoods.push(itemC.cartId);
  423. }
  424. });
  425. });
  426. this.deleteCartItem(chooseGoods);
  427. },
  428. // 清空失效
  429. clearInvalid() {
  430. let chooseGoods = this.invalidData.map(item => {
  431. return item.cartId;
  432. });
  433. this.deleteCartItem(chooseGoods);
  434. },
  435. // deleteCartItem 删除
  436. deleteCartItem(cartId, row, index, gIndex) {
  437. if (cartId.length === 0) {
  438. this.$api.msg('请选择要删除的商品');
  439. return;
  440. }
  441. uni.showModal({
  442. title: '提示',
  443. content: '你确定将此产品移除购物车',
  444. success: res => {
  445. if (res.confirm) {
  446. this.$u.api
  447. .delCart({
  448. cartId: cartId
  449. })
  450. .then(res => {
  451. this.getCartByUserCenterId();
  452. });
  453. }
  454. }
  455. });
  456. },
  457. //创建订单
  458. createOrder() {
  459. // if (this.$store.state.baseSet.personnelReview === 5) {
  460. // 验证账户状态
  461. this.userAudit();
  462. if (!this.isUserAudit) {
  463. return;
  464. }
  465. // }
  466. if (!this.goodsDataAll.totalMoney) {
  467. this.goPage('/pages/classification/cate', 'switchTab');
  468. return;
  469. }
  470. if (this.startDeliveryPrice && this.goodsDataAll.totalMoney < this.startDeliveryPrice) {
  471. // this.$api.msg('请选择要结算的商品');
  472. this.goPage('/pages/classification/cate', 'switchTab');
  473. return;
  474. }
  475. if (!this.goodsDataAll.checkNum) {
  476. this.$api.msg('请选择要结算的商品');
  477. return;
  478. }
  479. let isSub = true;
  480. for (let i in this.goodsData) {
  481. let item = this.goodsData[i];
  482. for (let g in item.shopGoodsData) {
  483. let goods = item.shopGoodsData[g];
  484. if (goods.selection === 5 && goods.isInvalid === 4) {
  485. isSub = false;
  486. break;
  487. }
  488. }
  489. }
  490. if (!isSub) {
  491. this.$api.msg('抱歉,您要结算的商品中包含失效商品,请取消后再次进行提交');
  492. return;
  493. }
  494. uni.navigateTo({
  495. url: `/pagesT/order/createOrder`
  496. });
  497. }
  498. },
  499. onShareAppMessage(options) {
  500. return {
  501. title: this.$store.state.baseSet.shop,
  502. path: '/pages/index/index?businessmanId=' + (this.$store.state.userStatus.id||''),
  503. success: res => {
  504. console.log(res);
  505. }
  506. };
  507. },
  508. // #ifdef MP-WEIXIN
  509. // 分享到朋友圈
  510. onShareTimeline(obj) {},
  511. // 收藏小程序
  512. onAddToFavorites() {}
  513. // #endif
  514. };
  515. </script>
  516. <style lang="scss">
  517. .box {
  518. border-bottom: 1px solid #eeeeee;
  519. .title {
  520. font-size: 28upx;
  521. font-weight: 510;
  522. padding-left: 24upx;
  523. line-height: 94rpx;
  524. color: #3c3c3c;
  525. }
  526. .ibonfont {
  527. display: inline-block;
  528. color: #cccccc;
  529. font-size: 36rpx;
  530. }
  531. }
  532. .container {
  533. padding-bottom: 100upx;
  534. }
  535. /* 购物车列表项 */
  536. .card {
  537. background: #ffffff;
  538. padding: 0 48upx 32rpx;
  539. margin-bottom: 20rpx;
  540. }
  541. .total-view {
  542. text-align: right;
  543. font-size: 32upx;
  544. color: #999;
  545. padding: 24upx 0;
  546. .price {
  547. color: $price-color;
  548. font-size: 30upx;
  549. font-weight: 510;
  550. }
  551. }
  552. .uniSwipe:last-child {
  553. .cart-item {
  554. border-bottom: 0 none;
  555. }
  556. }
  557. .cart-item {
  558. padding-top: 24upx;
  559. .ibonfont {
  560. transform: translateY(60upx);
  561. color: #cccccc;
  562. font-size: 36rpx;
  563. display: inline-block;
  564. width: 34rpx;
  565. height: 34rpx;
  566. margin-right: 16upx;
  567. }
  568. .image-wrapper {
  569. width: 152upx;
  570. height: 152upx;
  571. background-color: #eef3f4;
  572. border-radius: 12upx;
  573. image {
  574. width: 100%;
  575. height: 100%;
  576. border-radius: 12upx;
  577. }
  578. }
  579. .item-right {
  580. margin-left: 16upx;
  581. width: 430rpx;
  582. position: relative;
  583. .del-btn {
  584. padding: 4upx 10upx;
  585. font-size: 30upx;
  586. height: 50upx;
  587. color: $font-color-light;
  588. position: absolute;
  589. top: 0;
  590. right: 20upx;
  591. }
  592. .title {
  593. color: #3c3c3c;
  594. font-size: 28upx;
  595. height: 40upx;
  596. line-height: 40upx;
  597. text-overflow: -o-ellipsis-lastline;
  598. overflow: hidden;
  599. text-overflow: ellipsis;
  600. display: -webkit-box;
  601. -webkit-line-clamp: 1;
  602. line-clamp: 2;
  603. -webkit-box-orient: vertical;
  604. font-weight: 510;
  605. }
  606. .attr {
  607. font-size: 24upx;
  608. font-weight: 400;
  609. color: #9b9b9b;
  610. height: 32rpx;
  611. margin: 8rpx 0;
  612. line-height: 32rpx;
  613. }
  614. .price {
  615. color: $price-color;
  616. font-size: 40upx;
  617. font-weight: 510;
  618. font-family: DIN-Medium;
  619. }
  620. .activity-tag {
  621. width: 76rpx;
  622. font-size: 20rpx;
  623. color: #ffffff;
  624. height: 32rpx;
  625. line-height: 32rpx;
  626. text-align: center;
  627. border-radius: 6rpx;
  628. margin-left: 10rpx;
  629. margin-top: 16rpx;
  630. }
  631. }
  632. }
  633. /* 底部栏 */
  634. .action-section {
  635. position: fixed;
  636. left: 0upx;
  637. bottom: 100upx;
  638. z-index: 95;
  639. width: 100%;
  640. height: 100rpx;
  641. background-color: #ffffff;
  642. .delivery-tip {
  643. font-size: 22upx;
  644. background-color: #fdf6ec;
  645. color: #d48d24;
  646. text-align: center;
  647. line-height: 42upx;
  648. }
  649. .action-section-main {
  650. padding: 0 0 0 32upx;
  651. height: 100upx;
  652. display: flex;
  653. justify-content: space-between;
  654. align-items: center;
  655. .checkbox {
  656. height: 52upx;
  657. image {
  658. width: 30upx;
  659. height: 100%;
  660. z-index: 5;
  661. }
  662. .ibonfont {
  663. font-size: 36rpx;
  664. display: inline-block;
  665. width: 34rpx;
  666. height: 34rpx;
  667. color: #cccccc;
  668. transform: translateY(10rpx);
  669. }
  670. }
  671. .all-btn {
  672. color: #6c6c6c;
  673. font-size: 24upx;
  674. line-height: 60upx;
  675. padding-left: 12upx;
  676. font-weight: 400;
  677. }
  678. .total-box {
  679. flex: 1;
  680. text-align: right;
  681. .total-text {
  682. color: #3c3c3c;
  683. font-size: 24upx;
  684. font-weight: 400;
  685. }
  686. .price {
  687. font-size: 36upx;
  688. color: $price-color;
  689. font-weight: 600;
  690. }
  691. .freeExpressPrice {
  692. font-size: 20rpx;
  693. color: #9c9c9c;
  694. }
  695. }
  696. .confirm-btn {
  697. height: 52upx;
  698. line-height: 52upx;
  699. color: #ffffff;
  700. background-color: #f63434;
  701. text-align: center;
  702. border-radius: 52upx;
  703. padding: 0 30rpx;
  704. margin: 0 24rpx;
  705. font-size: 28rpx;
  706. }
  707. .diff-price {
  708. font-size: 24upx;
  709. color: #666;
  710. line-height: 90upx;
  711. padding-right: 10upx;
  712. }
  713. .del-goods-btn {
  714. width: 140upx;
  715. height: 60upx;
  716. line-height: 60upx;
  717. border: 1px solid #fd463e;
  718. color: #fd463e;
  719. font-size: 26upx;
  720. text-align: center;
  721. border-radius: 6upx;
  722. margin-right: 24upx;
  723. }
  724. }
  725. }
  726. /* 复选框选中状态 */
  727. .action-section .checkbox.checked,
  728. .cart-item .checkbox.checked {
  729. color: #fd463e;
  730. }
  731. .invalid-card {
  732. background: #ffffff;
  733. border-radius: 12upx;
  734. margin: 0 auto 24upx;
  735. padding: 0 24rpx 24rpx;
  736. width: 702rpx;
  737. .invalid-view {
  738. line-height: 94rpx;
  739. border-bottom: 1px solid #eeeeee;
  740. .invalid-tit {
  741. font-size: 28upx;
  742. font-weight: 510;
  743. color: #3c3c3c;
  744. }
  745. .invalid-btn {
  746. font-size: 24upx;
  747. color: $uni-color-error;
  748. }
  749. }
  750. .cart-list {
  751. .cart-item {
  752. .image-wrapper {
  753. position: relative;
  754. .invalid-tag {
  755. position: absolute;
  756. left: 50%;
  757. top: 50%;
  758. transform: translate(-50%, -50%);
  759. width: 100rpx;
  760. height: 100rpx;
  761. background-color: rgba($color: #000000, $alpha: 0.5);
  762. font-size: 20rpx;
  763. color: #eeeeee;
  764. font-weight: 300;
  765. border-radius: 100%;
  766. text {
  767. position: absolute;
  768. left: 50%;
  769. top: 50%;
  770. transform: translate(-50%, -50%);
  771. text-align: center;
  772. display: block;
  773. width: 88rpx;
  774. height: 88rpx;
  775. line-height: 90rpx;
  776. border-radius: 100%;
  777. border: 2rpx solid #cccccc;
  778. }
  779. }
  780. }
  781. .item-right {
  782. position: relative;
  783. height: 152rpx;
  784. .title {
  785. height: 66rpx;
  786. font-size: 24rpx;
  787. font-weight: 400;
  788. color: #9b9b9b;
  789. line-height: 33rpx;
  790. }
  791. .invalid-msg {
  792. position: absolute;
  793. left: 0;
  794. bottom: 0;
  795. font-size: 24rpx;
  796. font-weight: 400;
  797. color: #3c3c3c;
  798. }
  799. }
  800. }
  801. }
  802. }
  803. </style>