order_addcart.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  1. <template>
  2. <view>
  3. <view class='shoppingCart'>
  4. <view class='labelNav acea-row row-around row-middle'>
  5. <view class='item'><text class='iconfont icon-xuanzhong'></text>100%正品保证</view>
  6. <view class='item'><text class='iconfont icon-xuanzhong'></text>所有商品精挑细选</view>
  7. <view class='item'><text class='iconfont icon-xuanzhong'></text>售后无忧</view>
  8. </view>
  9. <view class='nav acea-row row-between-wrapper'>
  10. <view>购物数量 <text class='num font-color'>{{cartTotalCount}}</text></view>
  11. <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper'
  12. @click='manage'>{{ footerswitch ? '管理' : '取消'}}</view>
  13. </view>
  14. <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0">
  15. <view class='list'>
  16. <block v-for="(item,index) in cartList.valid" :key="index">
  17. <view class='item acea-row row-between-wrapper'>
  18. <view class="store-title">
  19. <view class="checkbox" @click="storeAllCheck(item,index)">
  20. <text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
  21. <text v-else class="iconfont icon-xuanzhong1"></text>
  22. </view>
  23. <navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info">
  24. <text class="iconfont icon-shangjiadingdan"></text>
  25. <view class="name">{{item.mer_name}}</view>
  26. <text class="iconfont icon-xiangyou"></text>
  27. </navigator>
  28. <view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
  29. </view>
  30. <navigator v-for="goods in item.list" :key="goods.cart_id" :url='"/pages/goods_details/index?id="+goods.product.product_id'
  31. hover-class='none' class='picTxt acea-row'>
  32. <view class="checkbox" @click.stop="goodsCheck(goods,index)">
  33. <text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text>
  34. <text v-else class="iconfont icon-xuanzhong1"></text>
  35. </view>
  36. <view class='pictrue'>
  37. <image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'></image>
  38. <!-- <image v-else :src='item.productInfo.image'></image> -->
  39. </view>
  40. <view class='text'>
  41. <view class='line1'>{{goods.product.store_name}}</view>
  42. <view class='infor line1' v-if="goods.productAttr.sku">属性:{{goods.productAttr.sku}}</view>
  43. <view class='money'>¥{{goods.productAttr.price}}</view>
  44. </view>
  45. <view class='carnum acea-row row-center-wrapper'>
  46. <view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view>
  47. <view class='num'>{{goods.cart_num}}</view>
  48. <!-- <view class="num">
  49. <input type="number" v-model="item.cart_num" @click.stop @input="iptCartNum(index)" @blur="blurInput(index)"/>
  50. </view> -->
  51. <view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view>
  52. </view>
  53. </navigator>
  54. </view>
  55. </block>
  56. </view>
  57. <view class='invalidGoods' v-if="cartList.invalid.length > 0">
  58. <view class='goodsNav acea-row row-between-wrapper'>
  59. <view @click='goodsOpen'><text class='iconfont' :class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
  60. <view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view>
  61. </view>
  62. <view class='goodsList' :hidden='goodsHidden'>
  63. <block v-for="(item,index) in cartList.invalid" :key='index'>
  64. <view class='item acea-row row-between-wrapper'>
  65. <view class='invalid'>失效</view>
  66. <view class='pictrue'>
  67. <image :src='(item.productAttr && item.productAttr.image) || item.product.image'></image>
  68. </view>
  69. <view class='text acea-row row-column-between'>
  70. <view class='line1 name'>{{item.product.store_name}}</view>
  71. <!-- <view class='infor line1' v-if="item.productInfo.attrInfo">属性:{{item.productInfo.attrInfo.suk}}</view> -->
  72. <view class='acea-row row-between-wrapper'>
  73. <!-- <view>¥{{item.truePrice}}</view> -->
  74. <view class='end'>该商品已失效</view>
  75. </view>
  76. </view>
  77. </view>
  78. </block>
  79. </view>
  80. </view>
  81. </view>
  82. <view class='noCart' v-if="recommend" :style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }">
  83. <view class='pictrue'>
  84. <image src='../../static/images/noCart.png'></image>
  85. </view>
  86. <recommend :hostProduct='hostProduct' :isLogin="isLogin "></recommend>
  87. <view class='loadingicon acea-row row-center-wrapper' v-if="hostProduct.length>5">
  88. <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
  89. </view>
  90. </view>
  91. <view style='height:120rpx;'></view>
  92. <view class='footer acea-row row-between-wrapper' v-if="cartList.valid.length > 0">
  93. <view>
  94. <!-- <checkbox-group @change="checkboxAllChange">
  95. <checkbox value="all" :checked="!!isAllSelect" /><text class='checkAll'>全选 ({{cartCount}})</text>
  96. </checkbox-group> -->
  97. <view class="allcheckbox" @click.stop="checkboxAllChange">
  98. <text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text>
  99. <text v-else class="iconfont icon-xuanzhong1"></text>
  100. 全选 ({{cartCount}})
  101. </view>
  102. </view>
  103. <view class='money acea-row row-middle' v-if="footerswitch==true">
  104. <text class='font-color'>¥{{selectCountPrice}}</text>
  105. <form @submit="subOrder" report-submit='true'>
  106. <button class='placeOrder bg-color' formType="submit">立即下单</button>
  107. </form>
  108. </view>
  109. <view class='button acea-row row-middle' v-else>
  110. <form @submit="subCollect" report-submit='true'>
  111. <button class='bnt cart-color' formType="submit">收藏</button>
  112. </form>
  113. <form @submit="subDel" report-submit='true'>
  114. <button class='bnt' formType="submit">删除</button>
  115. </form>
  116. </view>
  117. </view>
  118. </view>
  119. <!-- 优惠券弹窗 -->
  120. <block v-if="coupon.coupon">
  121. <couponListWindow
  122. :coupon='coupon'
  123. @ChangCouponsClone="ChangCouponsClone"
  124. @ChangCouponsUseState="ChangCouponsUseState"
  125. ></couponListWindow>
  126. </block>
  127. <!-- #ifdef MP -->
  128. <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
  129. <!-- #endif -->
  130. </view>
  131. </template>
  132. <script>
  133. import couponListWindow from '@/components/couponListWindow';
  134. import {
  135. getCartList,
  136. getCartCounts,
  137. changeCartNum,
  138. cartDel
  139. } from '@/api/order.js';
  140. import {
  141. getCoupons,
  142. getShopCoupons
  143. } from '@/api/api.js';
  144. import {
  145. getProductHot,
  146. collectAll
  147. } from '@/api/store.js';
  148. import {
  149. toLogin
  150. } from '@/libs/login.js';
  151. import {
  152. mapGetters
  153. } from "vuex";
  154. import recommend from '@/components/recommend';
  155. // #ifdef MP
  156. import authorize from '@/components/Authorize';
  157. // #endif
  158. const app = getApp();
  159. export default {
  160. components: {
  161. recommend,
  162. couponListWindow,
  163. // #ifdef MP
  164. authorize
  165. // #endif
  166. },
  167. data() {
  168. return {
  169. loading: false, //是否加载中
  170. loadend: false, //是否加载完毕
  171. loadTitle: '加载更多', //提示语
  172. cartCount: 0,
  173. goodsHidden: true,
  174. footerswitch: true,
  175. hostProduct: [],
  176. cartList: {
  177. valid: [],
  178. invalid: []
  179. },
  180. isAllSelect: false, //全选
  181. selectValue: [], //选中的数据
  182. selectCountPrice: 0.00,
  183. isAuto: false, //没有授权的不会自动授权
  184. isShowAuth: false, //是否隐藏授权
  185. hotScroll: false,
  186. hotPage: 1,
  187. hotLimit: 10,
  188. //属性是否打开
  189. coupon: {
  190. 'coupon': false,
  191. list: [],
  192. },
  193. // 购物车总数
  194. cartTotalCount:0,
  195. recommend: false,
  196. hide_mer_status: 1
  197. };
  198. },
  199. computed: mapGetters(['isLogin']),
  200. onReady(){
  201. uni.$on('update',(data)=>{
  202. this.hide_mer_status = data.hide_mer_status
  203. })
  204. },
  205. mounted: function() {
  206. const app = getApp();
  207. this.$nextTick(() => {
  208. this.hide_mer_status = app.globalData.hide_mer_status
  209. });
  210. },
  211. onLoad: function(options) {
  212. let that = this;
  213. if (that.isLogin == false) {
  214. // #ifdef H5 || APP-PLUS
  215. toLogin();
  216. // #endif
  217. // #ifdef MP
  218. that.isAuto = true;
  219. that.$set(that, 'isShowAuth', true);
  220. // #endif
  221. }
  222. },
  223. onShow: function() {
  224. uni.showTabBar();
  225. if (this.isLogin == true) {
  226. this.hostProduct = [];
  227. this.hotScroll = false;
  228. this.hotLimit = 10;
  229. this.hotPage = 1;
  230. this.getHostProduct();
  231. this.getCartList();
  232. this.getCartNum();
  233. this.goodsHidden = true;
  234. this.footerswitch = true;
  235. this.cartList = {
  236. valid: [],
  237. invalid: []
  238. },
  239. this.isAllSelect = false; //全选
  240. this.selectValue = []; //选中的数据
  241. this.selectCountPrice = 0.00;
  242. this.cartCount = 0;
  243. this.isShowAuth = false;
  244. uni.setStorage({
  245. key:'invoice_Data',
  246. data:{},
  247. success: function(){
  248. }
  249. })
  250. }
  251. },
  252. methods: {
  253. // 授权关闭
  254. authColse: function(e) {
  255. console.log(e,'authColse')
  256. this.isShowAuth = e;
  257. },
  258. onLoadFun(){
  259. this.isShowAuth = false;
  260. },
  261. // 删除
  262. subDel: function(event) {
  263. let that = this
  264. let type_id = []
  265. this.cartList.valid.forEach(el=>{
  266. el.list.forEach(goods=>{
  267. if(goods.check){
  268. type_id.push(goods.cart_id)
  269. }
  270. })
  271. })
  272. if(type_id.length == 0){
  273. return that.$util.Tips({
  274. title: '请选择产品'
  275. });
  276. }else{
  277. cartDel({
  278. cart_id:type_id,
  279. }).then(res=>{
  280. this.getCartList();
  281. this.getCartNum();
  282. return that.$util.Tips({
  283. title: res.message,
  284. icon: 'success'
  285. });
  286. }).catch(err => {
  287. return that.$util.Tips({
  288. title: err
  289. });
  290. });
  291. }
  292. },
  293. // 收藏
  294. subCollect: function(event) {
  295. let that = this
  296. let type_id = []
  297. this.cartList.valid.forEach(el=>{
  298. el.list.forEach(goods=>{
  299. if(goods.check){
  300. type_id.push(goods.product.product_id)
  301. }
  302. })
  303. })
  304. if(type_id.length == 0){
  305. return that.$util.Tips({
  306. title: '请选择产品'
  307. });
  308. }else{
  309. collectAll({
  310. type_id:type_id,
  311. type:1
  312. }).then(res=>{
  313. return that.$util.Tips({
  314. title: res.message,
  315. icon: 'success'
  316. });
  317. }).catch(err => {
  318. return that.$util.Tips({
  319. title: err
  320. });
  321. });
  322. }
  323. },
  324. // 立即下单
  325. subOrder: function(event) {
  326. // #ifdef MP-TOUTIAO
  327. let power = uni.getStorageSync('power')
  328. console.log(power,'22222222222222222222')
  329. if(!power) {
  330. console.log('ddddddddddddddddd')
  331. uni.showModal({
  332. title: '提示',
  333. showCancel: false,
  334. content: '抖音小程序主要为商品展示,不支持加入购物车和购买功能!',
  335. })
  336. return
  337. }
  338. // #endif
  339. let selectValue = []
  340. this.cartList.valid.forEach(el=>{
  341. el.list.forEach(goods=>{
  342. if(goods.check){
  343. selectValue.push(goods.cart_id)
  344. }
  345. })
  346. })
  347. if (selectValue.length > 0) {
  348. uni.navigateTo({
  349. url: '/pages/users/order_confirm/index?cartId=' + selectValue.join(',')
  350. });
  351. } else {
  352. return that.$util.Tips({
  353. title: '请选择产品'
  354. });
  355. }
  356. },
  357. // 购物车增加
  358. addCart: function(goods, index) {
  359. let that = this;
  360. goods.cart_num = Number(goods.cart_num) + 1
  361. this.cartTotalCount = Number(this.cartTotalCount) + 1;
  362. if (goods.hasOwnProperty('productAttr') && goods.cart_num > goods.productAttr.stock) {
  363. goods.cart_num = goods.productAttr.stock;
  364. goods.numAdd = true;
  365. goods.numSub = false;
  366. return
  367. } else {
  368. goods.numAdd = false;
  369. goods.numSub = false;
  370. }
  371. changeCartNum(goods.cart_id, {
  372. cart_num: goods.cart_num
  373. }).then(res => {}).catch(error => {
  374. goods.cart_num = Number(goods.cart_num) - 1
  375. })
  376. this.cartAllCheck('goodsCheck')
  377. },
  378. // 购物车递减
  379. subCart(goods) {
  380. let status = false;
  381. if (goods.cart_num < 1) status = true;
  382. if (goods.cart_num <= 1) {
  383. goods.cart_num = 1;
  384. goods.numSub = true;
  385. status = true;
  386. } else {
  387. goods.cart_num = Number(goods.cart_num) - 1
  388. this.cartTotalCount = Number(this.cartTotalCount) - 1;
  389. goods.numSub = false;
  390. goods.numAdd = false;
  391. if(goods.cart_num <= 1){
  392. goods.numSub = true;
  393. }
  394. }
  395. if (false == status) {
  396. changeCartNum(goods.cart_id, {
  397. cart_num: goods.cart_num
  398. }).then(res => {}).catch(error => {
  399. goods.cart_num = Number(goods.cart_num) - 1
  400. })
  401. this.cartAllCheck('goodsCheck')
  402. }
  403. },
  404. getCartNum: function() {
  405. let that = this;
  406. getCartCounts().then(res => {
  407. console.log(res);
  408. that.cartTotalCount = res.data[0].count || 0;
  409. });
  410. },
  411. // 购物车列表
  412. getCartList: function() {
  413. let that = this;
  414. getCartList().then(res => {
  415. res.data.list.forEach((item, index) => {
  416. item.allCheck = true
  417. item.list.forEach((goods, j) => {
  418. goods.check = true
  419. if (goods.cart_num == 1) {
  420. goods.numSub = true;
  421. } else {
  422. goods.numSub = false;
  423. }
  424. if (goods.cart_num == goods.productAttr.stock) {
  425. goods.numAdd = true;
  426. } else {
  427. goods.numAdd = false;
  428. }
  429. })
  430. })
  431. this.cartList.valid = res.data.list
  432. this.cartList.invalid = res.data.fail
  433. if(res.data.list.length == 0 && res.data.list.length == 0){
  434. this.recommend = true
  435. }else{
  436. this.recommend = false
  437. }
  438. this.checkboxAllChange()
  439. });
  440. },
  441. // 商铺全选
  442. storeAllCheck(item, index) {
  443. // 店铺取消
  444. if (item.allCheck) {
  445. item.allCheck = false
  446. item.list.forEach((el, index) => {
  447. el.check = false
  448. })
  449. } else {
  450. item.allCheck = true
  451. item.list.forEach((el, index) => {
  452. el.check = true
  453. })
  454. }
  455. this.cartAllCheck('goodsCheck')
  456. },
  457. // 商品选中
  458. goodsCheck(goods) {
  459. goods.check = !goods.check
  460. // console.log(parentIndex,'parentIndex')
  461. this.cartAllCheck('goodsCheck')
  462. },
  463. // 全选判断
  464. cartAllCheck(type) {
  465. let allArr = [];
  466. let totalMoney = 0
  467. let totalNum = 0
  468. this.cartList.valid.forEach((el, index) => {
  469. if (type == 'goodsCheck') {
  470. let tempArr = el.list.filter(goods => {
  471. return goods.check == true
  472. })
  473. if (el.list.length == tempArr.length) {
  474. el.allCheck = true
  475. allArr.push(el)
  476. } else {
  477. el.allCheck = false
  478. }
  479. } else {
  480. el.list.forEach((goods) => {
  481. goods.check = this.isAllSelect
  482. })
  483. el.allCheck = this.isAllSelect
  484. if (el.allCheck) allArr.push(el)
  485. }
  486. // 总金额 //总数
  487. el.list.forEach(e => {
  488. if (e.check) {
  489. totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num))
  490. totalNum += e.cart_num
  491. }
  492. })
  493. })
  494. this.cartCount = totalNum
  495. this.selectCountPrice = totalMoney
  496. // 全选
  497. this.isAllSelect = allArr.length == this.cartList.valid.length ? true : false
  498. },
  499. // 购物车全选
  500. checkboxAllChange() {
  501. this.isAllSelect = !this.isAllSelect
  502. this.cartAllCheck('cartCheck')
  503. },
  504. // 推荐列表
  505. getHostProduct: function() {
  506. let that = this;
  507. if (that.loadend) return;
  508. if (that.hotScroll) return;
  509. that.loading = true;
  510. that.loadTitle = "加载更多";
  511. getProductHot(
  512. that.hotPage,
  513. that.hotLimit,
  514. ).then(res => {
  515. let list = res.data.list || [];
  516. that.hotPage++
  517. that.hotScroll = res.data.list.length < that.hotLimit
  518. that.hostProduct = that.hostProduct.concat(res.data.list)
  519. that.loading = false;
  520. that.loadTitle = that.hotScroll ? "我也是有底线的" : '加载更多';
  521. });
  522. },
  523. // 失效商品展开
  524. goodsOpen: function() {
  525. let that = this;
  526. that.goodsHidden = !that.goodsHidden;
  527. },
  528. // 管理
  529. manage: function() {
  530. let that = this;
  531. that.footerswitch = !that.footerswitch;
  532. },
  533. // 清空
  534. unsetCart: function() {
  535. let that = this,
  536. ids = [];
  537. for (let i = 0, len = that.cartList.invalid.length; i < len; i++) {
  538. ids.push(that.cartList.invalid[i].cart_id);
  539. }
  540. cartDel({
  541. cart_id:ids
  542. }).then(res => {
  543. that.$util.Tips({
  544. title: '清除成功'
  545. });
  546. that.$set(that.cartList, 'invalid', []);
  547. }).catch(res => {
  548. });
  549. },
  550. // 店铺优惠券
  551. giveCoupon(item){
  552. let that = this;
  553. let goodsArr = []
  554. let couponList = [];
  555. let activeList = [];
  556. let ids = []
  557. item.list.map(el=>{
  558. ids.push(el.product_id)
  559. })
  560. getCoupons({
  561. ids:ids.join(',')
  562. }).then(res => {
  563. goodsArr = res.data
  564. getShopCoupons(item.mer_id).then(({data})=>{
  565. uni.hideTabBar();
  566. couponList = goodsArr.concat(data)
  567. this.$set(this.coupon, 'list', couponList);
  568. this.$set(this.coupon, 'coupon', true);
  569. }).catch(error=>{
  570. uni.showTabBar();
  571. })
  572. });
  573. },
  574. ChangCouponsClone: function() {
  575. uni.showTabBar();
  576. this.$set(this.coupon, 'coupon', false)
  577. },
  578. ChangCouponsUseState(index) {
  579. uni.showTabBar();
  580. let that = this;
  581. that.coupon.list[index].issue = true;
  582. console.log(that.coupon.list[index])
  583. // that.$set(that.coupon, 'list', that.coupon.list);
  584. // that.$set(that.coupon, 'coupon', false);
  585. },
  586. },
  587. onReachBottom() {
  588. this.getHostProduct();
  589. }
  590. }
  591. </script>
  592. <style scoped lang="scss">
  593. .shoppingCart .labelNav {
  594. height: 76rpx;
  595. padding: 0 30rpx;
  596. font-size: 22rpx;
  597. color: #8c8c8c;
  598. position: fixed;
  599. left: 0;
  600. width: 100%;
  601. box-sizing: border-box;
  602. background-color: #f5f5f5;
  603. z-index: 5;
  604. top: 0;
  605. }
  606. .shoppingCart .labelNav .item .iconfont {
  607. font-size: 25rpx;
  608. margin-right: 10rpx;
  609. }
  610. .shoppingCart .nav {
  611. width: 100%;
  612. height: 80rpx;
  613. background-color: #fff;
  614. padding: 0 30rpx;
  615. box-sizing: border-box;
  616. font-size: 28rpx;
  617. color: #282828;
  618. position: fixed;
  619. left: 0;
  620. z-index: 5;
  621. top: 76rpx;
  622. }
  623. .shoppingCart .nav .administrate {
  624. font-size: 26rpx;
  625. color: #282828;
  626. width: 110rpx;
  627. height: 46rpx;
  628. border-radius: 6rpx;
  629. border: 1px solid #868686;
  630. }
  631. .shoppingCart .noCart {
  632. margin-top: 20rpx;
  633. margin-bottom: 20rpx;
  634. background-color: #fff;
  635. padding-top: 0.1rpx;
  636. }
  637. .shoppingCart .noCart .pictrue {
  638. width: 414rpx;
  639. height: 336rpx;
  640. margin: 78rpx auto 56rpx auto;
  641. }
  642. .shoppingCart .noCart .pictrue image {
  643. width: 100%;
  644. height: 100%;
  645. }
  646. .shoppingCart .list {
  647. margin-top: 171rpx;
  648. }
  649. .shoppingCart .list .item {
  650. background-color: #fff;
  651. margin-bottom: 15rpx;
  652. .store-title {
  653. display: flex;
  654. align-items: center;
  655. width: 100%;
  656. padding: 0 30rpx;
  657. height: 85rpx;
  658. border-bottom: 1px solid #f0f0f0;
  659. .checkbox {
  660. width: 60rpx;
  661. .iconfont {
  662. font-size: 40rpx;
  663. color: #CCCCCC;
  664. }
  665. .icon-xuanzhong1 {
  666. color: $theme-color;
  667. }
  668. }
  669. .info {
  670. flex: 1;
  671. display: flex;
  672. align-items: center;
  673. .iconfont {
  674. font-size: 36rpx;
  675. }
  676. .name {
  677. margin: 0 0 0 10rpx;
  678. font-size: 28rpx;
  679. color: #282828;
  680. font-weight: bold;
  681. }
  682. .icon-xiangyou {
  683. margin-top: 6rpx;
  684. font-size: 22rpx;
  685. color: #999;
  686. }
  687. }
  688. .coupon-btn {
  689. color: $theme-color;
  690. font-size: 22rpx;
  691. width: 100rpx;
  692. height: 36rpx;
  693. line-height: 36rpx;
  694. background: #FFEDEB;
  695. border-radius: 18rpx;
  696. text-align: center;
  697. }
  698. }
  699. }
  700. .shoppingCart .list .item .picTxt {
  701. width: 100%;
  702. padding: 25rpx 30rpx;
  703. position: relative;
  704. align-items: center;
  705. border-bottom: 1px solid #f0f0f0;
  706. .checkbox {
  707. width: 60rpx;
  708. .iconfont {
  709. font-size: 40rpx;
  710. color: #CCCCCC;
  711. }
  712. .icon-xuanzhong1 {
  713. color: $theme-color;
  714. }
  715. }
  716. }
  717. .shoppingCart .list .item .picTxt .pictrue {
  718. width: 160rpx;
  719. height: 160rpx;
  720. }
  721. .shoppingCart .list .item .picTxt .pictrue image {
  722. width: 100%;
  723. height: 100%;
  724. border-radius: 6rpx;
  725. }
  726. .shoppingCart .list .item .picTxt .text {
  727. width: 444rpx;
  728. margin-left: 20rpx;
  729. font-size: 28rpx;
  730. color: #282828;
  731. }
  732. .shoppingCart .list .item .picTxt .text .infor {
  733. font-size: 24rpx;
  734. color: #868686;
  735. margin-top: 16rpx;
  736. }
  737. .shoppingCart .list .item .picTxt .text .money {
  738. font-size: 32rpx;
  739. color: #282828;
  740. margin-top: 28rpx;
  741. }
  742. .shoppingCart .list .item .picTxt .carnum {
  743. height: 47rpx;
  744. position: absolute;
  745. bottom: 30rpx;
  746. right: 30rpx;
  747. }
  748. .shoppingCart .list .item .picTxt .carnum view {
  749. border: 1rpx solid #a4a4a4;
  750. width: 66rpx;
  751. text-align: center;
  752. height: 100%;
  753. line-height: 40rpx;
  754. font-size: 28rpx;
  755. color: #a4a4a4;
  756. }
  757. .shoppingCart .list .item .picTxt .carnum .reduce {
  758. border-right: 0;
  759. border-radius: 3rpx 0 0 3rpx;
  760. }
  761. .shoppingCart .list .item .picTxt .carnum .reduce.on {
  762. border-color: #e3e3e3;
  763. color: #dedede;
  764. }
  765. .shoppingCart .list .item .picTxt .carnum .plus {
  766. border-left: 0;
  767. border-radius: 0 3rpx 3rpx 0;
  768. }
  769. .shoppingCart .list .item .picTxt .carnum .num {
  770. color: #282828;
  771. }
  772. .shoppingCart .invalidGoods {
  773. background-color: #fff;
  774. }
  775. .shoppingCart .invalidGoods .goodsNav {
  776. width: 100%;
  777. height: 66rpx;
  778. padding: 0 30rpx;
  779. box-sizing: border-box;
  780. font-size: 28rpx;
  781. color: #282828;
  782. }
  783. .shoppingCart .invalidGoods .goodsNav .iconfont {
  784. color: #424242;
  785. font-size: 28rpx;
  786. margin-right: 17rpx;
  787. }
  788. .shoppingCart .invalidGoods .goodsNav .del {
  789. font-size: 26rpx;
  790. color: #999;
  791. }
  792. .shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 {
  793. color: #999;
  794. font-size: 33rpx;
  795. vertical-align: -2rpx;
  796. margin-right: 8rpx;
  797. }
  798. .shoppingCart .invalidGoods .goodsList .item {
  799. padding: 20rpx 30rpx;
  800. border-top: 1rpx solid #f5f5f5;
  801. }
  802. .shoppingCart .invalidGoods .goodsList .item .invalid {
  803. font-size: 22rpx;
  804. color: #fff;
  805. width: 70rpx;
  806. height: 36rpx;
  807. background-color: #aaa;
  808. border-radius: 3rpx;
  809. text-align: center;
  810. line-height: 36rpx;
  811. }
  812. .shoppingCart .invalidGoods .goodsList .item .pictrue {
  813. width: 140rpx;
  814. height: 140rpx;
  815. }
  816. .shoppingCart .invalidGoods .goodsList .item .pictrue image {
  817. width: 100%;
  818. height: 100%;
  819. border-radius: 6rpx;
  820. }
  821. .shoppingCart .invalidGoods .goodsList .item .text {
  822. width: 433rpx;
  823. font-size: 28rpx;
  824. color: #999;
  825. height: 140rpx;
  826. }
  827. .shoppingCart .invalidGoods .goodsList .item .text .name {
  828. width: 100%;
  829. }
  830. .shoppingCart .invalidGoods .goodsList .item .text .infor {
  831. font-size: 24rpx;
  832. }
  833. .shoppingCart .invalidGoods .goodsList .item .text .end {
  834. font-size: 26rpx;
  835. color: #bbb;
  836. }
  837. .shoppingCart .footer {
  838. z-index: 9;
  839. width: 100%;
  840. height: 96rpx;
  841. background-color: #fafafa;
  842. position: fixed;
  843. padding: 0 30rpx;
  844. box-sizing: border-box;
  845. border-top: 1rpx solid #eee;
  846. bottom: var(--window-bottom);
  847. }
  848. .shoppingCart .footer .checkAll {
  849. font-size: 28rpx;
  850. color: #282828;
  851. margin-left: 16rpx;
  852. }
  853. // .shoppingCart .footer checkbox .wx-checkbox-input{background-color:#fafafa;}
  854. .shoppingCart .footer .money {
  855. font-size: 30rpx;
  856. }
  857. .shoppingCart .footer .placeOrder {
  858. color: #fff;
  859. font-size: 30rpx;
  860. width: 226rpx;
  861. height: 70rpx;
  862. border-radius: 50rpx;
  863. text-align: center;
  864. line-height: 70rpx;
  865. margin-left: 22rpx;
  866. }
  867. .shoppingCart .footer .button .bnt {
  868. font-size: 28rpx;
  869. color: #999;
  870. border-radius: 50rpx;
  871. border: 1px solid #999;
  872. width: 160rpx;
  873. height: 60rpx;
  874. text-align: center;
  875. line-height: 60rpx;
  876. }
  877. .shoppingCart .footer .button form~form {
  878. margin-left: 17rpx;
  879. }
  880. .allcheckbox {
  881. display: flex;
  882. align-items: center;
  883. width: 260rpx;
  884. .iconfont {
  885. margin-right: 20rpx;
  886. font-size: 40rpx;
  887. color: #CCCCCC;
  888. }
  889. .icon-xuanzhong1 {
  890. color: $theme-color;
  891. }
  892. }
  893. </style>
  894. <style>
  895. @supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)){
  896. .shoppingCart .footer{
  897. bottom: calc(var(--window-bottom) + constant(safe-area-inset-bottom));
  898. bottom: calc(var(--window-bottom) + env(safe-area-inset-bottom));
  899. }
  900. }
  901. </style>