|
@@ -20,12 +20,13 @@ const API = {
|
|
|
getGoodsInfoUrl: '/goods/detail',
|
|
|
getLatestChattingRecordUrl: '/chat/latest',
|
|
|
getUserAllOrderUrl: '/order/user',
|
|
|
- getUserAllGoodsUrl: '/goods/user',
|
|
|
getCategoryGoodsURL: '/goods/category',
|
|
|
getAllGoodsURL: '/goods',
|
|
|
getSearchGoodsURL: '/goods/search',
|
|
|
postGoodsURL: '/goods/create',
|
|
|
getGoodsDetailURL: '/goods/detail',
|
|
|
+ postReviseOrder: '/order/revise',
|
|
|
+ getRecommendUrl: '/goods/recommend',
|
|
|
}
|
|
|
|
|
|
|
|
@@ -134,7 +135,6 @@ function searchGoods(data) {
|
|
|
|
|
|
|
|
|
function getGoodsDetail(data) {
|
|
|
- console.log(data);
|
|
|
return request.get(
|
|
|
API.getGoodsDetailURL + `/${data.id}` + '?id=' + data.id + '&uid=' + data.uid + '&date=' + data.time
|
|
|
)
|
|
@@ -225,8 +225,9 @@ function getLatestChattingRecord(params) {
|
|
|
|
|
|
function getUserAllOrder(params) {
|
|
|
return request.get(
|
|
|
- API.getUserAllOrderUrl+'?uid='+params.uid
|
|
|
- )
|
|
|
+ API.getUserAllOrderUrl+'?id='+params.uid
|
|
|
+
|
|
|
+ )
|
|
|
}
|
|
|
|
|
|
|
|
@@ -236,6 +237,28 @@ function getUserAllGoods(data) {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+function postOrderChange(params) {
|
|
|
+
|
|
|
+
|
|
|
+ console.log(params);
|
|
|
+ return request.post(
|
|
|
+ API.postReviseOrder,
|
|
|
+ {
|
|
|
+ data: params.data
|
|
|
+ }
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function getRecommend(data) {
|
|
|
+ var uid = parseInt(data.user_id);
|
|
|
+ console.log(uid);
|
|
|
+ return request.get(
|
|
|
+ API.getRecommendUrl + '?id=' + uid + '&size=' + data.pageSize
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
module.exports = {
|
|
|
createCommont,
|
|
|
getCommentList,
|
|
@@ -261,5 +284,7 @@ module.exports = {
|
|
|
upLoadGoods,
|
|
|
getGoodsDetail,
|
|
|
loginURl: API.loginURL,
|
|
|
- registerURL: API.registerURL
|
|
|
+ registerURL: API.registerURL,
|
|
|
+ postOrderChange,
|
|
|
+ getRecommend
|
|
|
}
|