55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
import { Service } from '@/Service/Service';
|
|
/*****积分商城*****/
|
|
class vpGoodsService {
|
|
private static GetGoodsListPath : string = '/Goods/GetGoodsList';
|
|
/*****获取商品列表*****/
|
|
static GetGoodsList(typeId:string,page:number) {
|
|
var result = Service.Request(this.GetGoodsListPath, 'GET', {typeId,page});
|
|
return result;
|
|
}
|
|
|
|
private static GetGoodsInfoPath : string = '/Goods/GetGoodsInfo';
|
|
/*****获取商品详情*****/
|
|
static GetGoodsInfo(goodsId:string) {
|
|
var result = Service.Request(this.GetGoodsInfoPath, 'GET', {goodsId});
|
|
return result;
|
|
}
|
|
|
|
|
|
private static AddGoodsOrderPath : string = '/Goods/AddGoodsOrder';
|
|
/*****生成订单*****/
|
|
static AddGoodsOrder(goodsId:string,count:number) {
|
|
var result = Service.Request(this.AddGoodsOrderPath, 'POST', {goodsId,count});
|
|
return result;
|
|
}
|
|
|
|
private static GetOrderInfoPath : string = '/Goods/GetOrderInfo';
|
|
/*****订单详情*****/
|
|
static GetOrderInfo(orderId:string) {
|
|
var result = Service.Request(this.GetOrderInfoPath, 'GET', {orderId});
|
|
return result;
|
|
}
|
|
|
|
private static UpdateOrderAddressPath : string = '/Goods/UpdateOrderAddress';
|
|
/*****修改订单地址*****/
|
|
static UpdateOrderAddress(orderId:string,addressId:string) {
|
|
var result = Service.Request(this.UpdateOrderAddressPath, 'POST', {orderId,addressId});
|
|
return result;
|
|
}
|
|
|
|
private static PayOrderPath : string = '/Goods/PayOrder';
|
|
/*****支付订单*****/
|
|
static PayOrder(orderId:string) {
|
|
var result = Service.Request(this.PayOrderPath, 'POST', {orderId});
|
|
return result;
|
|
}
|
|
|
|
private static GetUserOrderListPath : string = '/Goods/GetUserOrderList';
|
|
/*****获取用户订单列表*****/
|
|
static GetUserOrderList(state:string,page:number) {
|
|
var result = Service.Request(this.GetUserOrderListPath, 'GET', {state,page});
|
|
return result;
|
|
}
|
|
|
|
}
|
|
export { Service, vpGoodsService }; |