import Vue from 'vue'
const apisMixins = {
    methods: {
        // 购物车修改SKU规格
        async apiUserClubCheckSku(params) {
            try {
                await this.ProductService.ShoppingCheckSku(params)
                setTimeout(() => {
                    this.sellerOrganizeList()
                }, 1500)
            } catch (error) {
                console.log('error', error)
            }
        },
        //更新购物车商品
        async apiShoppingCartUpdate(params) {
            try{
                await  this.SellerService.SellerAddProductNum(params)
                this.isshowDelbtn = false
            }catch(error){
			   console.log('更新购物车商品数量失败')
            }
        },
		 // 删除购物车商品
        async sellerDeleteCart(params) {
            try{
            	await this.SellerService.sellerDeleteCart(params)
                this.$util.msg('删除成功', 2000)
                setTimeout(() => {
				    this.isshowDelbtn = false
				    this.sellerOrganizeList()
                }, 2000)
            }catch(error){
            	console.log('购物车删除失败')
            }

        }
    }
}

export default apisMixins