apisMixins.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import Vue from 'vue'
  2. const apisMixins = {
  3. methods: {
  4. // 购物车修改SKU规格
  5. async apiUserClubCheckSku(params) {
  6. try {
  7. await this.ProductService.ShoppingCheckSku(params)
  8. setTimeout(() => {
  9. this.sellerOrganizeList()
  10. }, 1500)
  11. } catch (error) {
  12. console.log('error', error)
  13. }
  14. },
  15. //更新购物车商品
  16. async apiShoppingCartUpdate(params) {
  17. try{
  18. await this.SellerService.SellerAddProductNum(params)
  19. this.isshowDelbtn = false
  20. }catch(error){
  21. console.log('更新购物车商品数量失败')
  22. }
  23. },
  24. // 删除购物车商品
  25. async sellerDeleteCart(params) {
  26. try{
  27. await this.SellerService.sellerDeleteCart(params)
  28. this.$util.msg('删除成功', 2000)
  29. setTimeout(() => {
  30. this.isshowDelbtn = false
  31. this.sellerOrganizeList()
  32. }, 2000)
  33. }catch(error){
  34. console.log('购物车删除失败')
  35. }
  36. }
  37. }
  38. }
  39. export default apisMixins