clone 开源的 Shopping
This commit is contained in:
17
mobile-web/src/api/page.js
Normal file
17
mobile-web/src/api/page.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import request from "../config/request";
|
||||
|
||||
|
||||
export function GetPage() {
|
||||
return request({
|
||||
url: '/Page/GetPage',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getProduct(id) {
|
||||
return request({
|
||||
url: '/Page/Product',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
75
mobile-web/src/api/user.js
Normal file
75
mobile-web/src/api/user.js
Normal file
@@ -0,0 +1,75 @@
|
||||
import request from "../config/request";
|
||||
|
||||
|
||||
export function GetUserIndex() {
|
||||
return request({
|
||||
url: '/User/GetUserIndex',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function GetFavorite(data){
|
||||
return request({
|
||||
url: '/User/GetFavorite',
|
||||
method: 'post',
|
||||
params: { data }
|
||||
})
|
||||
}
|
||||
|
||||
export function DelFavorite(id){
|
||||
return request({
|
||||
url: '/User/DelFavorite',
|
||||
method: 'get',
|
||||
params: { id:id }
|
||||
})
|
||||
}
|
||||
|
||||
export function GetAddressList(){
|
||||
return request({
|
||||
url: '/User/GetAddressList',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function GetAddressById(id){
|
||||
return request({
|
||||
url: '/User/GetAddressById',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
export function SaveAddress(data){
|
||||
return request({
|
||||
url: '/User/SaveAddress',
|
||||
method: 'post',
|
||||
params: { data }
|
||||
})
|
||||
}
|
||||
export function DelAddress(data){
|
||||
return request({
|
||||
url: '/User/DelAddress',
|
||||
method: 'post',
|
||||
params: { data }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function GetCoupon(data){
|
||||
return request({
|
||||
url: '/User/GetCoupon',
|
||||
method: 'Post',
|
||||
params: { data }
|
||||
})
|
||||
}
|
||||
|
||||
export function ExchangeCoupon(code){
|
||||
return request({
|
||||
url: '/User/ExchangeCoupon',
|
||||
method: 'Post',
|
||||
params: { code:code }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user