cart.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <template>
  2. <view>
  3. <view v-if="storage">
  4. <view class="container">
  5. <!-- 空白页 -->
  6. <view v-if="!hasLogin || empty===true" >
  7. <view v-if="hasLogin" style="padding-top: 180rpx;padding-bottom: 180rpx;width: 750rpx;">
  8. <missing :buttonName="'去添加商品'" :handlerName="'buttonClick'"
  9. @buttonClick="toCategory"
  10. :imgUrl="'http://qiniuoss.nauzone.cn/%E7%BB%84%201%20%E6%8B%B7%E8%B4%9D%403x.png'"
  11. :desc="'购物车空空如也,您不添加吗?'"></missing>
  12. </view>
  13. <view v-else style="padding-top: 180rpx;padding-bottom: 180rpx;width: 750rpx;">
  14. <missing :buttonName="'去登录'" :handlerName="'buttonClick'"
  15. @buttonClick="navToLogin"
  16. :imgUrl="'http://qiniuoss.nauzone.cn/%E7%BB%84%201%20%E6%8B%B7%E8%B4%9D%403x.png'"
  17. :desc="'购物车空空如也,您不添加吗?'"></missing>
  18. </view>
  19. </view>
  20. <view v-else>
  21. <!-- 列表 -->
  22. <view class="cart-list bg-white padding-lr">
  23. <block v-for="(item, index) in cartList" :key="item.id">
  24. <view :class="[index+1 < cartList.length?'solid-bottom':'']" class="padding-tb flex align-center">
  25. <view v-if="item.stockless" style="color: #CFCFCF;font-size: 28rpx;line-height: 40rpx;flex-shrink: 0;">失效</view>
  26. <image v-else @click="check('item', index)"
  27. :src="item.checked ?'/static/cart/selected.png':'/static/cart/select.png'"
  28. mode="aspectFill"
  29. style="width: 40rpx;height: 40rpx;flex-shrink: 0;"></image>
  30. <view class="" style="padding-left: 52rpx;flex-shrink: 0;">
  31. <image :src="(item.productAttrImg?JSON.parse(item.productAttrImg)[0].url:JSON.parse(item.productImg)[0].url)"
  32. mode="aspectFill" lazy-load
  33. @load="onImageLoad(item)"
  34. class="round"
  35. @error="onImageError('cartList', index)"
  36. style="width: 130rpx;height: 130rpx;"></image>
  37. </view>
  38. <view class="flex justify-between flex-direction"
  39. style="padding-left: 48rpx;height: 180rpx;flex-grow: 1;">
  40. <view class="flex justify-between align-start">
  41. <view style="width: 400rpx;" class="lem-text-black lem-text-xxl text-2-cut">{{item.productName}}</view>
  42. <image src="../../static/cart/delete.png" mode="aspectFill"
  43. @click="deleteCartItem(index)"
  44. style="width: 32rpx;height: 32rpx;margin-top: 15rpx;"></image>
  45. </view>
  46. <view class="flex justify-between align-end" >
  47. <view class="flex align-center">
  48. <view style="font-weight: 500;color: #FC6620;"
  49. class=" lem-text-xxl padding-right-sm"> ¥{{(isVip?(item.vipPrice):item.price)}}</view>
  50. <view style="color: #AEAEAE;font-size: 24rpx;line-height: 44rpx;padding: 0 10rpx;text-decoration: line-through;">
  51. ¥{{item.otPrice}}
  52. </view>
  53. </view>
  54. <uni-number-box
  55. class="number-box"
  56. :min="1"
  57. :max="item.stock"
  58. :value="item.cartNum"
  59. :isMin="item.cartNum===0"
  60. :index="index"
  61. :forbid="item.activityId"
  62. @eventChange="numberChange"
  63. ></uni-number-box>
  64. </view>
  65. </view>
  66. </view>
  67. </block>
  68. </view>
  69. <view v-if="stockLessList.length > 0" class="cart-list padding-right butouming" style="border-left: #CFCFCF solid 30rpx;">
  70. <view class="flex align-center justify-center" style="padding: 40rpx 0 6rpx 0;">
  71. <view style="font-size: 28rpx;line-height: 40rpx;color: #666666;"
  72. >以下商品因库存不足已失效</view>
  73. </view>
  74. <block class="bg-white" v-for="(item, index) in stockLessList" :key="item.id">
  75. <view class="padding-tb solid-bottom flex align-center">
  76. <view class="" style="color: #CFCFCF;font-size: 28rpx;line-height: 40rpx;flex-shrink: 0;">失效</view>
  77. <view class="" style="padding-left: 52rpx;flex-shrink: 0;">
  78. <image :src="(item.skuImg?item.skuImg:item.spuImg)"
  79. mode="aspectFit" lazy-load
  80. @load="onImageLoad(item)"
  81. class="round"
  82. @error="onImageError('cartList', index)"
  83. style="width: 130rpx;height: 130rpx;"></image>
  84. </view>
  85. <view class="flex justify-between flex-direction"
  86. style="padding-left: 48rpx;height: 180rpx;flex-grow: 1;">
  87. <view class="lem-text-black lem-text-xxl text-2-cut">{{item.title}}</view>
  88. <view class="flex justify-between align-end" >
  89. <view style="font-weight: 500;color: #FC6620"
  90. class="lem-text-xxl"> ¥ {{item.price}}</view>
  91. <uni-number-box
  92. class="number-box"
  93. :min="1"
  94. :value="item.cartNum"
  95. :isMin="item.cartNum===1"
  96. :index="index"
  97. @eventChange="numberChange"
  98. ></uni-number-box>
  99. </view>
  100. </view>
  101. </view>
  102. </block>
  103. <view class="flex align-center justify-center"
  104. style="padding: 30rpx 0;">
  105. <button @click="clearStockLess" class="lem-btn line-gray round">清空已失效商品</button>
  106. </view>
  107. </view>
  108. <view class="bg-white flex justify-between align-center padding-tb-xs padding-lr submit-class">
  109. <view @click="cancelAllAdd" class="flex align-center">
  110. <image
  111. :src="allChecked ?'/static/cart/selected.png':'/static/cart/select.png'"
  112. mode="aspectFit"
  113. style="width: 40rpx;height: 40rpx;flex-shrink: 0;"></image>
  114. <view class="lem-text-grey"
  115. style="padding-left: 16rpx;font-size: 26rpx;line-height: 36rpx;">全选</view>
  116. </view>
  117. <view style="padding-left: 54rpx;">
  118. <view class="flex align-center">
  119. <view class="lem-text-grey lem-text-lg">总计</view>
  120. <view class="padding-left-xs lem-text-title"
  121. style="color: #FC6620;font-weight: 500;">¥ {{total}}</view>
  122. </view>
  123. <view style="font-size: 20rpx;line-height: 36rpx;" class="lem-text-gray"
  124. >已优惠:{{jian(yuanjia,total)}}元</view>
  125. </view>
  126. <button @click="createOrder" style="width: 240rpx;height: 84rpx;font-weight: 500;"
  127. class="lem-btn round bg-green lem-text-xl ">提交订单</button>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. <view v-else style="padding-top: 180rpx;padding-bottom: 180rpx;width: 750rpx;">
  133. <missing :buttonName="'换个地址试试吧~'" :handlerName="'buttonClick'"
  134. @buttonClick="chooseLocation"
  135. :imgUrl="'http://qiniuoss.nauzone.cn/%E7%BB%84%204%20%E6%8B%B7%E8%B4%9D@3x.png'"
  136. :desc="'当前地区不在配送范围哦'"></missing>
  137. </view>
  138. </view>
  139. </template>
  140. <script>
  141. import {
  142. mapState
  143. } from 'vuex';
  144. import uniNumberBox from '@/components/uni-number-box.vue'
  145. import missing from "@/components/missing.vue"
  146. export default {
  147. components: {
  148. uniNumberBox,missing
  149. },
  150. data() {
  151. return {
  152. totalItems: 0, //总数量
  153. total: 0, //总价格
  154. allChecked: false, //全选状态 true|false
  155. empty: false, //空白页现实 true|false
  156. cartList: [],
  157. storage:true,
  158. loadedItemIds: new Set(),
  159. yuanjia:0,//商品原价
  160. stockLessList:[],
  161. stockLessIds:'',
  162. isVip: false
  163. };
  164. },
  165. onLoad(){
  166. },
  167. onShow() {
  168. this.isVip = this.$api.isVip()
  169. this.$store.state.storageId ? this.storage = true : this.storage = false
  170. this.loadData();
  171. //如果用户已登录,获取购物车数量
  172. if(this.$store.state.userInfo.accessToken){
  173. this.countTabNum()
  174. }
  175. },
  176. watch:{
  177. //显示空白页
  178. cartList(e){
  179. if(e.length == 0){
  180. this.total = 0
  181. this.yuanjia = 0
  182. this.empty = true
  183. }
  184. }
  185. },
  186. computed:{
  187. ...mapState(['hasLogin'])
  188. },
  189. methods: {
  190. //请求数据
  191. async loadData(){
  192. const that = this
  193. that.$api.request('get', 'cart/app/getCartList',{
  194. storageId:this.$store.state.storageId
  195. }).then(res => {
  196. //修改为for i循环,以找出库存不足的商品索引并去掉,存入库存不足商品组
  197. // var stockless = [];//库存不足商品索引
  198. var lessIds = []
  199. for (var i = 0; i < res.data.length; i++) {
  200. if(res.data[i].stock <= 0){
  201. // stockless.push(i)
  202. res.data[i].stockless = true
  203. lessIds.push(res.data[i].id)
  204. }else{
  205. res.data[i].checked = true
  206. }
  207. }
  208. // console.log('__________________________________')
  209. // console.log(stockless)
  210. // for (var i = 0; i < stockless.length; i++) {
  211. // that.stockLessList.push(res.data[stockless[i]])
  212. // res.data.splice(stockless[i],1)
  213. // }
  214. // stockless.forEach(item => {
  215. // that.stockLessList.push(res.data[item])
  216. // })
  217. that.cartList = res.data
  218. if(that.cartList){
  219. this.empty = false
  220. }
  221. that.calcTotal(); //计算总价
  222. this.stockLessIds = lessIds.join(',')
  223. })
  224. },
  225. jian(arg2, arg1) {
  226. var r1, r2, m, n;
  227. try { r1 = arg1.toString().split(".")[1].length } catch (e) { r1 = 0 }
  228. try { r2 = arg2.toString().split(".")[1].length } catch (e) { r2 = 0 }
  229. m = Math.pow(10, Math.max(r1, r2));
  230. //lastmodifybydeeka
  231. //动态控制精度长度
  232. n = (r1 >= r2) ? r1 : r2;
  233. return ((arg2 * m - arg1 * m) / m).toFixed(n);
  234. },
  235. countTabNum(){
  236. this.$api.request('get','cart/app/countCart',{
  237. storageId:this.$store.state.storageId
  238. }).then(res=>{
  239. if(res.data > 0){
  240. uni.setTabBarBadge({
  241. index:2,
  242. text:res.data+''
  243. })
  244. }else if(res.data <= 0){
  245. uni.removeTabBarBadge({
  246. index:2
  247. })
  248. }
  249. this.$store.commit('addCart',res.data)
  250. }).catch(err=>{
  251. // this.$api.msg('请求失败,请稍后再试')
  252. })
  253. },
  254. //监听image加载完成
  255. onImageLoad(item) {
  256. this.loadedItemIds.add(item.id)
  257. this.$forceUpdate()
  258. },
  259. //监听image加载失败
  260. onImageError(key, index) {
  261. this[key][index].skuImg = '/static/errorImage.jpg';
  262. },
  263. navToLogin(){
  264. uni.navigateTo({
  265. url: '/pages/public/login'
  266. })
  267. },
  268. //选中状态处理
  269. check(type, index){
  270. if(type === 'item'){
  271. this.cartList[index].checked = !this.cartList[index].checked;
  272. }else{
  273. const checked = !this.allChecked
  274. const list = this.cartList;
  275. list.forEach(item=>{
  276. item.checked = checked;
  277. })
  278. this.allChecked = checked;
  279. }
  280. this.calcTotal(type);
  281. },
  282. //数量
  283. numberChange(data){
  284. const that = this
  285. if(data.number > that.cartList[data.index].stock){
  286. this.$api.msg('库存不足')
  287. return
  288. }
  289. if(that.cartList[data.index].activityId && that.cartList[data.index].activityId !== 0 ){
  290. this.$api.msg('抢购商品只允许购买一件')
  291. that.cartList[data.index].cartNum = 1
  292. return
  293. }
  294. if(that.cartList[data.index].couponId && that.cartList[data.index].couponId !== 0){
  295. this.$api.msg('抢购商品只允许购买一件')
  296. that.cartList[data.index].cartNum = 1
  297. return
  298. }
  299. if(data.number > that.cartList[data.index].cartNum){
  300. var cartNum = this.$store.state.cartNum+1
  301. that.$store.commit('addCart',cartNum)
  302. uni.setTabBarBadge({
  303. index:2,
  304. text:cartNum+''
  305. })
  306. }else if(data.number < that.cartList[data.index].cartNum){
  307. var cartNum = this.$store.state.cartNum-1
  308. that.$store.commit('addCart',cartNum)
  309. uni.setTabBarBadge({
  310. index:2,
  311. text:cartNum+''
  312. })
  313. }
  314. if(data.number == 0){
  315. this.deleteCartItem(data.index)
  316. return
  317. }
  318. that.$api.request('get','cart/app/updateCartItemNum', {
  319. cartId: that.cartList[data.index].id,
  320. num: data.number
  321. }, failres => {
  322. uni.showToast({
  323. title: failres.msg,
  324. icon: 'none'
  325. });
  326. that.cartList[data.index].cartNum = that.cartList[data.index].cartNum
  327. }).then(res => {
  328. that.cartList[data.index].cartNum = data.number;
  329. that.calcTotal();
  330. })
  331. },
  332. //取消全选
  333. cancelAllAdd(){
  334. const checked = !this.allChecked
  335. const list = this.cartList;
  336. list.forEach(item=>{
  337. item.checked = checked;
  338. })
  339. this.allChecked = checked;
  340. this.calcTotal();
  341. },
  342. //删除
  343. deleteCartItem(index){
  344. const that = this
  345. that.$api.request('get', 'cart/app/removeCartItem', {
  346. cartId: that.cartList[index].id
  347. }).then(res => {
  348. that.cartList.splice(index, 1);
  349. that.calcTotal();
  350. this.countTabNum()
  351. //uni.hideLoading();
  352. })
  353. },
  354. //清空
  355. clearCart(){
  356. const that = this
  357. uni.showModal({
  358. content: '清空购物车?',
  359. success: (e)=>{
  360. if(e.confirm){
  361. that.$api.request('get','removeCartAll').then(res => {
  362. that.cartList = []
  363. })
  364. }
  365. }
  366. })
  367. },
  368. //清空失效商品
  369. clearStockLess(){
  370. that.$api.request('get', 'removeCartItemBatch', {
  371. cartIdList: this.stockLessList
  372. }).then(res => {
  373. this.stockLessIds = ''
  374. this.stockLessList = []
  375. // that.calcTotal();
  376. this.countTabNum()
  377. //uni.hideLoading();
  378. })
  379. },
  380. //计算总价
  381. calcTotal(){
  382. const that = this
  383. let list = that.cartList;
  384. if(list.length === 0){
  385. // that.empty = true;
  386. return;
  387. }
  388. let total = 0;
  389. let totalItems = 0;
  390. that.yuanjia = 0
  391. let checked = true;
  392. list.forEach(item=>{
  393. console.log(item)
  394. if(item.checked === true){
  395. totalItems += item.cartNum
  396. total += (that.isVip ? item.vipPrice : item.price) * item.cartNum;
  397. that.yuanjia += Number((item.otPrice*item.cartNum).toFixed(2))
  398. }else if(checked === true){
  399. checked = false;
  400. }
  401. })
  402. console.log('原价'+that.yuanjia)
  403. this.allChecked = checked;
  404. this.total = Number(total.toFixed(2));
  405. this.totalItems = totalItems
  406. },
  407. //创建订单
  408. createOrder(){
  409. //滤除未被选择的item
  410. let selectedItems = []
  411. this.cartList.forEach(item => {
  412. if (item.checked) {
  413. selectedItems.push(item)
  414. }
  415. })
  416. if (selectedItems.length === 0) {
  417. this.$api.msg('您没有选中任何商品')
  418. return
  419. }
  420. this.$api.globalData.productList = selectedItems
  421. uni.navigateTo({
  422. url: `/pages/order/create?takeway=cart`
  423. })
  424. },
  425. toCategory(){
  426. uni.switchTab({
  427. url:"../category/category"
  428. })
  429. },
  430. //配送外区域选择区域
  431. chooseLocation(){
  432. uni.chooseLocation({
  433. success: (res1)=> {
  434. console.log(res1)
  435. this.district = res1.name
  436. uni.showLoading({
  437. title:"加载中..."
  438. })
  439. let addressesInfo = {};
  440. addressesInfo.lng = res1.longitude;
  441. addressesInfo.lat = res1.latitude;
  442. addressesInfo.addressesName = res1.name;
  443. this.$api.request('get','storage/position/getRecentlyStorage',{
  444. lng:res1.longitude,
  445. lat:res1.latitude
  446. },failres => {
  447. uni.hideLoading()
  448. uni.setStorageSync('addresses', addressesInfo);
  449. this.logining = false
  450. this.$api.msg(failres.msg)
  451. this.$store.commit('setStorage',11)
  452. this.loadData(11)
  453. if(!11){
  454. this.storage ? this.storage = false : this.storage = true
  455. }else{
  456. this.loadRecommand('refresh')
  457. }
  458. }).then(res=>{
  459. uni.hideLoading()
  460. addressesInfo.distance = res.data.distance;
  461. uni.setStorageSync('addresses', addressesInfo);
  462. console.log(res)
  463. // res.data.id = 11
  464. this.$store.commit('setStorage',res.data.id)
  465. this.newTop = []
  466. this.cheapRecommend = []
  467. this.salesTop = []
  468. this.loadData(res.data.id)
  469. if(!res.data.id){
  470. this.storage = false
  471. }else{
  472. this.storage ? this.storage = false : this.storage = true
  473. // this.loadRecommand('refresh')
  474. }
  475. })
  476. }
  477. });
  478. }
  479. }
  480. }
  481. </script>
  482. <style lang='scss'>
  483. .number-box{
  484. width: 146rpx;
  485. height: 46rpx;
  486. }
  487. .submit-class {
  488. position: fixed;
  489. /* #ifdef H5 */
  490. bottom: 50px;
  491. /* #endif */
  492. /* #ifdef MP-WEIXIN */
  493. bottom: 0px;
  494. /* #endif */
  495. /* #ifdef APP-PLUS */
  496. bottom: 0px;
  497. /* #endif */
  498. width: 750rpx;
  499. z-index: 99999;
  500. }
  501. .butouming{
  502. opacity:0.5;
  503. }
  504. .container{
  505. padding-bottom: 134upx;
  506. /* 空白页 */
  507. .empty{
  508. position:fixed;
  509. left: 0;
  510. top:0;
  511. width: 100%;
  512. height: 100vh;
  513. padding-bottom:100upx;
  514. display:flex;
  515. justify-content: center;
  516. flex-direction: column;
  517. align-items:center;
  518. background: #fff;
  519. image{
  520. width: 240upx;
  521. height: 160upx;
  522. margin-bottom:30upx;
  523. }
  524. .empty-tips{
  525. display:flex;
  526. font-size: $font-sm+2upx;
  527. color: $font-color-disabled;
  528. .navigator{
  529. color: $uni-color-primary;
  530. margin-left: 16upx;
  531. }
  532. }
  533. }
  534. }
  535. /* 购物车列表项 */
  536. .cart-item{
  537. display:flex;
  538. position:relative;
  539. padding:30upx 40upx;
  540. .image-wrapper{
  541. width: 230upx;
  542. height: 230upx;
  543. flex-shrink: 0;
  544. position:relative;
  545. image{
  546. border-radius:8upx;
  547. }
  548. }
  549. .checkbox{
  550. position:absolute;
  551. left:-16upx;
  552. top: -16upx;
  553. z-index: 8;
  554. font-size: 44upx;
  555. line-height: 1;
  556. padding: 4upx;
  557. color: $font-color-disabled;
  558. background:#fff;
  559. border-radius: 50px;
  560. }
  561. .item-right{
  562. display:flex;
  563. flex-direction: column;
  564. flex: 1;
  565. overflow: hidden;
  566. position:relative;
  567. padding-left: 30upx;
  568. .title,.price{
  569. font-size:$font-base + 2upx;
  570. color: $font-color-dark;
  571. height: 40upx;
  572. line-height: 40upx;
  573. }
  574. .attr{
  575. font-size: $font-sm + 2upx;
  576. color: $font-color-light;
  577. height: 50upx;
  578. line-height: 50upx;
  579. }
  580. .price{
  581. height: 50upx;
  582. line-height:50upx;
  583. }
  584. }
  585. .del-btn{
  586. padding:4upx 10upx;
  587. font-size:34upx;
  588. height: 50upx;
  589. color: $font-color-light;
  590. }
  591. }
  592. /* 底部栏 */
  593. .action-section{
  594. /* #ifdef H5 */
  595. margin-bottom:100upx;
  596. /* #endif */
  597. position:fixed;
  598. left: 30upx;
  599. bottom:30upx;
  600. z-index: 95;
  601. display: flex;
  602. align-items: center;
  603. width: 690upx;
  604. height: 100upx;
  605. padding: 0 30upx;
  606. background: rgba(255,255,255,.9);
  607. box-shadow: 0 0 20upx 0 rgba(0,0,0,.5);
  608. border-radius: 16upx;
  609. .checkbox{
  610. height:52upx;
  611. position:relative;
  612. image{
  613. width: 52upx;
  614. height: 100%;
  615. position:relative;
  616. z-index: 5;
  617. }
  618. }
  619. .clear-btn{
  620. position:absolute;
  621. left: 26upx;
  622. top: 0;
  623. z-index: 4;
  624. width: 0;
  625. height: 52upx;
  626. line-height: 52upx;
  627. padding-left: 38upx;
  628. font-size: $font-base;
  629. color: #fff;
  630. background: $font-color-disabled;
  631. border-radius:0 50px 50px 0;
  632. opacity: 0;
  633. transition: .2s;
  634. &.show{
  635. opacity: 1;
  636. width: 120upx;
  637. }
  638. }
  639. .total-box{
  640. flex: 1;
  641. display:flex;
  642. flex-direction: column;
  643. text-align:right;
  644. padding-right: 40upx;
  645. .price{
  646. font-size: $font-lg;
  647. color: $font-color-dark;
  648. }
  649. .coupon{
  650. font-size: $font-sm;
  651. color: $font-color-light;
  652. text{
  653. color: $font-color-dark;
  654. }
  655. }
  656. }
  657. .confirm-btn{
  658. padding: 0 38upx;
  659. margin: 0;
  660. border-radius: 100px;
  661. height: 76upx;
  662. line-height: 76upx;
  663. font-size: $font-base + 2upx;
  664. background: $uni-color-primary;
  665. box-shadow: 1px 2px 5px rgba(217, 60, 93, 0.72)
  666. }
  667. }
  668. /* 复选框选中状态 */
  669. .action-section .checkbox.checked,
  670. .cart-item .checkbox.checked{
  671. color: $uni-color-primary;
  672. }
  673. </style>