123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- import http from '../utils/http'
- const GoodApi = {
- async GetCateList() {
- return http.get('/api/services/wxapp/Product/GetCateList') as Promise<IRestResult<any[]>>
- },
- async GetBorderList() {
- return http.get('/api/services/wxapp/Product/GetBorderList') as Promise<
- IRestResult<WxOptionLongExtraDto[]>
- >
- },
- async GetFilterOption() {
- return http.get('/api/services/wxapp/Product/GetFilterOption') as Promise<
- IRestResult<WxGetFilterOptionOutputDto[]>
- >
- },
- async GetHomeCarousel() {
- return http.get('/api/services/wxapp/Product/GetHomeCarousel') as Promise<
- IRestResult<WxCarouselListItemDto[]>
- >
- },
- async GetHomeDetail() {
- return http.get('/api/services/wxapp/Product/GetHomeDetail') as Promise<
- IRestResult<WxAlbumCategoryDetailItemDto[]>
- >
- },
- async GetHomeDisplay() {
- return http.get('/api/services/wxapp/Product/GetHomeDisplay') as Promise<
- IRestResult<WxDisplayListItemDto[]>
- >
- },
- async GetCateScene(input: WxGetAlbumInput) {
- return http.get('/api/services/wxapp/Product/GetCateScene', input) as Promise<
- IRestResult<PagedResultDto<WxGetAlbumOutputDto>>
- >
- },
- async GetCateAlbum(input: WxGetAlbumInput) {
- return http.get('/api/services/wxapp/Product/GetCateAlbum', input) as Promise<
- IRestResult<PagedResultDto<WxGetAlbumOutputDto>>
- >
- },
- async GetHomeRecommend(input: WxGetAlbumInput) {
- return http.get('/api/services/wxapp/Product/GetHomeRecommend', input) as Promise<
- IRestResult<PagedResultDto<WxGetAlbumOutputDto>>
- >
- },
- async GetRecommend(input: WxGetAlbumInput) {
- return http.get('/api/services/wxapp/Product/GetRecommend', input) as Promise<
- IRestResult<PagedResultDto<WxGetAlbumOutputDto>>
- >
- },
- async GetProduct(input: WxGetProductInput) {
- return http.get('/api/services/wxapp/Product/GetProduct', input) as Promise<
- IRestResult<WxGetProductOutput>
- >
- },
- async GetAddr() {
- return http.get('/api/services/wxapp/Product/GetAddr') as Promise<IRestResult<any>>
- },
- async GetFav(input: WxGetFavInput) {
- return http.get('/api/services/wxapp/Product/GetFav', input) as Promise<
- IRestResult<WxCateAlbumItemDto[]>
- >
- },
- async UpdateFav(input: WxUpdateFavInput) {
- return http.put('/api/services/wxapp/Product/UpdateFav', input) as Promise<IRestResult<number>>
- },
- async GetCart() {
- return http.get('/api/services/wxapp/Product/GetCart') as Promise<IRestResult<any>>
- },
- async GetOrderDetail(input: WxGetOrderDetailInput) {
- return http.get('/api/services/wxapp/WxGoodOrder/GetOrderDetail', input) as Promise<
- IRestResult<any>
- >
- },
- async PreviewOrder(input: WxPreviewOrderInputDto) {
- return http.post('/api/services/wxapp/WxGoodOrder/PreviewOrder', input) as Promise<
- IRestResult<WxGoodGenOrderDto>
- >
- },
- async MakeOrder(input: WxGoodComOrderDto) {
- return http.post('/api/services/wxapp/WxGoodOrder/MakeOrder', input) as Promise<
- IRestResult<string>
- >
- },
- async GetOrderList(input: WxOrderListInput) {
- return http.get('/api/services/wxapp/WxGoodOrder/GetOrderList', input) as Promise<
- IRestResult<PagedResultDto<WxOrderListOutput>>
- >
- },
- async OrderDeplicate(input: WxGetOrderDetailInput) {
- return http.post('/api/services/wxapp/WxGoodOrder/OrderDeplicate', input) as Promise<
- IRestResult<string>
- >
- },
- async GetComments(input: WxGetAlbumInput) {
- return http.get('/api/services/wxapp/Product/GetComments', input) as Promise<
- IRestResult<WxCateAlbumItemDto[]>
- >
- },
- async GetCommentlist(input: WxGetAlbumInput) {
- return http.get('/api/services/wxapp/Comments/GetPaged', input) as Promise<IRestResult<any>>
- },
- async GetDrawLink(input: { id: number; goodId: number; type: string }) {
- return http.get('/api/services/wxapp/Product/GetDrawLink', input) as Promise<
- IRestResult<string>
- >
- },
- async GetInspireLink(input: { id: number; type: string }) {
- return http.get('/api/services/wxapp/Product/GetInspireLink', input) as Promise<
- IRestResult<string>
- >
- },
- async AddCart(input: WxAddCartInput) {
- return http.post('/api/services/wxapp/Product/AddCart', input) as Promise<IRestResult<string>>
- },
- async RemoveCartItem(input: WxRemoveCartItemInput) {
- return http.delete('/api/services/wxapp/Product/RemoveCartItem', input) as Promise<
- IRestResult<string>
- >
- },
- async SelectAllCartItem() {
- return http.post('/api/services/wxapp/Product/SelectAllCartItem') as Promise<
- IRestResult<string>
- >
- },
- async UnSelectAllCartItem() {
- return http.post('/api/services/wxapp/Product/UnSelectAllCartItem') as Promise<
- IRestResult<string>
- >
- },
- async SelectCartItem(input: WxSelectCartItemInput) {
- return http.post('/api/services/wxapp/Product/SelectCartItem', input) as Promise<
- IRestResult<string>
- >
- },
- async NumCartItem(input: WxNumCartItemInput) {
- return http.post('/api/services/wxapp/Product/NumCartItem', input) as Promise<
- IRestResult<string>
- >
- },
- }
- export default GoodApi
|