apisMixins.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import Vue from 'vue'
  2. const apisMixins = {
  3. methods: {
  4. apiUserClubCheckSku(params){
  5. this.ProductService.ShoppingCheckSku(params)
  6. .then(response => {
  7. setTimeout(() => {
  8. this.initGetCartGoodsList()
  9. }, 1500)
  10. })
  11. .catch(error => {
  12. this.$util.msg(error.msg, 2000)
  13. })
  14. },
  15. apiSellerAddProductNum(params) {
  16. //更新购物车商品
  17. this.SellerService.SellerAddProductNum(params)
  18. .then(response => {
  19. this.isshowDelbtn = false
  20. })
  21. .catch(error => {
  22. this.$util.msg(error.msg, 2000)
  23. })
  24. },
  25. apiSellerDeleteCart(params) {
  26. // 清除失效商品
  27. this.SellerService.sellerDeleteCart(params)
  28. .then(response => {
  29. this.$util.msg('删除成功', 2000)
  30. setTimeout(() => {
  31. this.isshowDelbtn = false
  32. this.initGetCartGoodsList()
  33. }, 2000)
  34. })
  35. .catch(error => {
  36. this.$util.msg(error.msg, 2000)
  37. })
  38. }
  39. }
  40. }
  41. export default apisMixins