lemon橪 2022-02-14 14:31:36 +08:00
commit e73d76eb57
19 changed files with 106 additions and 95 deletions

View File

@ -12,7 +12,7 @@ import api from "@/config/api.js";
*/
export function getAddressList(pageNumber, pageSize) {
return http.request({
url: "/memberAddress",
url: "/member/address",
method: Method.GET,
needToken: true,
params: { pageNumber, pageSize },
@ -37,7 +37,7 @@ export function getLogistics() {
*/
export function getAddressCode(cityCode, townName) {
return http.request({
url: api.common + "/region/region",
url: api.common + "/common/region/region",
method: Method.GET,
needToken: true,
params: { cityCode, townName },
@ -51,7 +51,7 @@ export function getAddressCode(cityCode, townName) {
*/
export function addAddress(data) {
return http.request({
url: "/memberAddress",
url: "/member/address",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@ -67,7 +67,7 @@ export function addAddress(data) {
*/
export function editAddress(params) {
return http.request({
url: `/memberAddress`,
url: `/member/address`,
method: Method.PUT,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@ -81,7 +81,7 @@ export function editAddress(params) {
*/
export function deleteAddress(id) {
return http.request({
url: `/memberAddress/delById/${id}`,
url: `/member/address/delById/${id}`,
method: Method.DELETE,
needToken: true,
});
@ -95,7 +95,7 @@ export function deleteAddress(id) {
*/
export function getAddressDetail(id) {
return http.request({
url: `/memberAddress/get/${id}`,
url: `/member/address/get/${id}`,
method: Method.GET,
loading: false,
needToken: true,
@ -107,7 +107,7 @@ export function getAddressDetail(id) {
*/
export function getAddressDefault() {
return http.request({
url: `/memberAddress/get/default`,
url: `/member/address/get/default`,
method: Method.GET,
loading: false,
needToken: true,

View File

@ -40,7 +40,7 @@ export function applyCancelOrder(params) {
*/
export function getStoreAfterSaleAddress(sn) {
return http.request({
url: `/afterSale/getStoreAfterSaleAddress/${sn}`,
url: `/order/afterSale/getStoreAfterSaleAddress/${sn}`,
method: Method.GET,
needToken: true,
});
@ -50,7 +50,7 @@ export function getStoreAfterSaleAddress(sn) {
*/
export function cancelAfterSale(afterSaleSn) {
return http.request({
url: `/afterSale/cancel/${afterSaleSn}`,
url: `/order/afterSale/cancel/${afterSaleSn}`,
method: Method.POST,
needToken: true,
});
@ -64,7 +64,7 @@ export function cancelAfterSale(afterSaleSn) {
*/
export function getAfterSaleList(params) {
return http.request({
url: `/afterSale/page`,
url: `/order/afterSale/page`,
method: Method.GET,
needToken: true,
params,
@ -77,7 +77,7 @@ export function getAfterSaleList(params) {
*/
export function getServiceDetail(sn) {
return http.request({
url: `/afterSale/get/${sn}`,
url: `/order/afterSale/get/${sn}`,
method: Method.GET,
needToken: true,
});
@ -89,7 +89,7 @@ export function getServiceDetail(sn) {
*/
export function addComplain(params) {
return http.request({
url: `/complain`,
url: `/order/complain`,
method: Method.POST,
needToken: true,
header: {
@ -104,7 +104,7 @@ export function addComplain(params) {
*/
export function clearComplain(id, params) {
return http.request({
url: `/complain/status/${id}`,
url: `/order/complain/status/${id}`,
method: Method.PUT,
needToken: true,
params,
@ -116,7 +116,7 @@ export function clearComplain(id, params) {
*/
export function getAfterSaleLog(sn) {
return http.request({
url: `/afterSale/get/getAfterSaleLog/${sn}`,
url: `/order/afterSale/get/getAfterSaleLog/${sn}`,
method: Method.GET,
needToken: true,
});
@ -127,7 +127,7 @@ export function getAfterSaleLog(sn) {
*/
export function getComplain(params) {
return http.request({
url: `/complain`,
url: `/order/complain`,
method: Method.GET,
needToken: true,
params,
@ -139,7 +139,7 @@ export function getComplain(params) {
*/
export function getAfterSaleReason(serviceType) {
return http.request({
url: `/afterSale/get/afterSaleReason/${serviceType}`,
url: `/order/afterSale/get/afterSaleReason/${serviceType}`,
method: Method.GET,
needToken: true,
});
@ -150,7 +150,7 @@ export function getAfterSaleReason(serviceType) {
*/
export function getClearReason() {
return http.request({
url: `/afterSale/get/afterSaleReason/CANCEL`,
url: `/order/afterSale/get/afterSaleReason/CANCEL`,
method: Method.GET,
needToken: true,
});
@ -161,7 +161,7 @@ export function getClearReason() {
*/
export function getComplainReason() {
return http.request({
url: `/afterSale/get/afterSaleReason/COMPLAIN`,
url: `/order/afterSale/get/afterSaleReason/COMPLAIN`,
method: Method.GET,
needToken: true,
});
@ -171,7 +171,7 @@ export function getComplainReason() {
*/
export function getComplainDetail(id) {
return http.request({
url: `/complain/${id}`,
url: `/order/complain/${id}`,
method: Method.GET,
needToken: true,
});
@ -182,7 +182,7 @@ export function getComplainDetail(id) {
*/
export function getAfterSaleInfo(sn) {
return http.request({
url: `/afterSale/applyAfterSaleInfo/${sn}`,
url: `/order/afterSale/applyAfterSaleInfo/${sn}`,
method: Method.GET,
needToken: true,
});
@ -194,7 +194,7 @@ export function getAfterSaleInfo(sn) {
*/
export function applyReturn(orderItemSn, params) {
return http.request({
url: `/afterSale/save/${orderItemSn}`,
url: `/order/afterSale/save/${orderItemSn}`,
method: Method.POST,
header: {
"Content-Type": "application/x-www-form-urlencoded",
@ -210,7 +210,7 @@ export function applyReturn(orderItemSn, params) {
*/
export function fillShipInfo(afterSaleSn, params) {
return http.request({
url: `/afterSale/delivery/${afterSaleSn}`,
url: `/order/afterSale/delivery/${afterSaleSn}`,
method: Method.POST,
header: {
"Content-Type": "application/x-www-form-urlencoded",

View File

@ -23,7 +23,7 @@ export function getArticleCategory(category_type) {
*/
export function getArticleDetail(type) {
return http.request({
url: `/article/get/${type}`,
url: `/other/article/get/${type}`,
method: Method.GET,
});
}

View File

@ -10,7 +10,7 @@ import api from "@/config/api.js";
*/
export function getRegionsById(id = 0) {
return http.request({
url: `${api.common}/region/item/${id}`,
url: `${api.common}/common/region/item/${id}`,
method: Method.GET,
message: false,
});
@ -29,4 +29,4 @@ export function getIMDetail() {
* 文件上传地址
* @type {string}
*/
export const upload = api.common + "/upload/file";
export const upload = api.common + "/common/upload/file";

View File

@ -9,7 +9,7 @@ import { http, Method } from "@/utils/request.js";
*/
export function getGoodsMessage(goodsId) {
return http.request({
url: `/goods/get/${goodsId}`,
url: `/goods/goods/get/${goodsId}`,
method: Method.GET,
});
}
@ -19,7 +19,7 @@ import { http, Method } from "@/utils/request.js";
*/
export function getGoodsRelated(params) {
return http.request({
url: `/goods/es/related`,
url: `/goods/goods/es/related`,
method: Method.GET,
params,
});
@ -32,7 +32,7 @@ export function getGoodsRelated(params) {
*/
export function getGoods(skuId, goodsId) {
return http.request({
url: `/goods/sku/${goodsId}/${skuId}`,
url: `/goods/goods/sku/${goodsId}/${skuId}`,
method: Method.GET,
});
}
@ -43,7 +43,7 @@ export function getGoodsRelated(params) {
*/
export function getGoodsDistribution(distributionId) {
return http.request({
url: `/distribution/bindingDistribution/${distributionId}`,
url: `/distribution/distribution/bindingDistribution/${distributionId}`,
method: Method.GET,
});
}
@ -56,7 +56,7 @@ export function getGoodsRelated(params) {
*/
export function getGoodsList(params) {
return http.request({
url: "/goods/es",
url: "/goods/goods/es",
method: Method.GET,
params,
});
@ -112,7 +112,7 @@ export function getPlateformTagGoods(tag_id) {
*/
export function getCategoryList(id) {
return http.request({
url: `/category/get/${id}`,
url: `/goods/category/get/${id}`,
method: Method.GET,
loading: false,
});
@ -126,7 +126,7 @@ export function getCategoryList(id) {
*/
export function distribution() {
return http.request({
url: `/distribution`,
url: `/distribution/distribution`,
method: Method.GET,
});
}
@ -136,7 +136,7 @@ export function distribution() {
*/
export function applyDistribution(params) {
return http.request({
url: `/distribution`,
url: `/distribution/distribution`,
method: Method.POST,
params,
});
@ -170,7 +170,7 @@ export function cashLog(params) {
*/
export function distributionOrderList(params) {
return http.request({
url: `/distribution/distributionOrder`,
url: `/distribution/distribution/distributionOrder`,
method: Method.GET,
params
});
@ -181,7 +181,7 @@ export function distributionOrderList(params) {
*/
export function distributionGoods(params) {
return http.request({
url: `/distributionGoods`,
url: `/distribution/goods`,
method: Method.GET,
params,
});
@ -191,7 +191,7 @@ export function distributionGoods(params) {
*/
export function checkedDistributionGoods(params) {
return http.request({
url: `/distributionGoods/checked/${params.id}`,
url: `/distribution/goods/checked/${params.id}`,
method: Method.GET,
params
});
@ -202,7 +202,7 @@ export function checkedDistributionGoods(params) {
*/
export function getMpCode(params){
return http.request({
url:`/mini-program/mp/unlimited`,
url:`/passport/connect/miniProgram/mp/unlimited`,
method:Method.GET,
params
})
@ -213,7 +213,7 @@ export function checkedDistributionGoods(params) {
*/
export function getMpScene(id){
return http.request({
url:`/mini-program/mp/unlimited/scene?id=${id}`,
url:`/passport/connect/miniProgram/mp/unlimited/scene?id=${id}`,
method:Method.GET,
})

View File

@ -32,7 +32,7 @@ export function getCategory(parent_id = 0) {
*/
export function getHotKeywords(count) {
return http.request({
url: "/goods/hot-words",
url: "/goods/goods/hot-words",
method: Method.GET,
loading: false,
params: { count },
@ -46,7 +46,7 @@ export function getHotKeywords(count) {
*/
export function getFloorData() {
return http.request({
url: `/pageData/getIndex?clientType=H5`,
url: `/other/pageData/getIndex?clientType=H5`,
method: "get",
});
}
@ -56,7 +56,7 @@ export function getFloorData() {
*/
export function getCategoryIndexData(parentId = 0) {
return http.request({
url: `/category/get/${parentId}`,
url: `/goods/category/get/${parentId}`,
method: "get",
});
}

View File

@ -8,7 +8,7 @@ import api from "@/config/api.js";
*/
export function resetByMobile(params) {
return http.request({
url: `/members/resetByMobile`,
url: `/passport/member/resetByMobile`,
method: "POST",
params,
});
@ -20,7 +20,7 @@ export function resetByMobile(params) {
*/
export function sendMobile(mobile,type='LOGIN') {
return http.request({
url: `${api.common}/sms/${type}/${mobile}`,
url: `${api.common}/common/sms/${type}/${mobile}`,
method: "GET",
});
}
@ -32,7 +32,7 @@ export function sendMobile(mobile,type='LOGIN') {
*/
export function smsLogin(params, clientType) {
return http.request({
url: `/members/smsLogin`,
url: `/passport/member/smsLogin`,
method: "POST",
data: params,
header: {
@ -50,7 +50,7 @@ export function smsLogin(params, clientType) {
export function modifyPass(params) {
return http.request({
url: `/members/modifyPass`,
url: `/passport/member/modifyPass`,
method: "PUT",
params,
});
@ -61,7 +61,7 @@ export function modifyPass(params) {
*/
export function refreshTokenFn(refresh_token) {
return http.request({
url: `/members/refresh/${refresh_token}`,
url: `/passport/member/refresh/${refresh_token}`,
method: "GET",
});
}
@ -69,7 +69,7 @@ export function refreshTokenFn(refresh_token) {
// 获取密码状态
export function logout () {
return http.request({
url: '/members/logout',
url: '/passport/member/logout',
method: "POST",
needToken: true,
})

View File

@ -6,7 +6,7 @@ import { http, Method } from "@/utils/request.js";
*/
export function feedBack(params) {
return http.request({
url: "/feedback",
url: "/other/feedback",
method: Method.POST,
needToken: true,
params,
@ -16,7 +16,7 @@ export function feedBack(params) {
// 提现
export function withdrawalApply(params) {
return http.request({
url: "/members/wallet/withdrawal",
url: "/wallet/wallet/withdrawal",
method: Method.POST,
needToken: true,
params,
@ -30,7 +30,7 @@ export function withdrawalApply(params) {
*/
export function payCallback(params) {
return http.request({
url: `/cashier/result`,
url: `/payment/cashier/result`,
method: Method.GET,
params,
});
@ -117,7 +117,7 @@ export function getPointsData(params) {
*/
export function getComments(params) {
return http.request({
url: "/memberEvaluation",
url: "/member/evaluation",
method: Method.GET,
needToken: true,
params,
@ -131,7 +131,7 @@ export function getComments(params) {
*/
export function getFootprintNum(params) {
return http.request({
url: "/footprint/getFootprintNum",
url: "/member/footprint/getFootprintNum",
method: Method.GET,
needToken: true,
params,
@ -144,7 +144,7 @@ export function getFootprintNum(params) {
*/
export function commentsMemberOrder(params) {
return http.request({
url: "/memberEvaluation",
url: "/member/evaluation",
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@ -275,7 +275,7 @@ export function collectionStore(store_id) {
*/
export function getUserInfo() {
return http.request({
url: "/members",
url: "/passport/member",
method: Method.GET,
needToken: true,
});
@ -287,7 +287,7 @@ export function getUserInfo() {
*/
export function getUserWallet() {
return http.request({
url: "/members/wallet",
url: "/wallet/wallet",
method: Method.GET,
needToken: true,
});
@ -300,7 +300,7 @@ export function getUserWallet() {
*/
export function saveUserInfo(params) {
return http.request({
url: "/members/editOwn",
url: "/passport/member/editOwn",
method: Method.PUT,
header: { "content-type": "application/x-www-form-urlencoded" },
needToken: true,
@ -328,7 +328,7 @@ export function addReceipt(params) {
*/
export function getGoodsComments(goodsId, params) {
return http.request({
url: `/memberEvaluation/${goodsId}/goodsEvaluation`,
url: `/member/evaluation/${goodsId}/goodsEvaluation`,
method: Method.GET,
loading: false,
params,
@ -341,7 +341,7 @@ export function getGoodsComments(goodsId, params) {
*/
export function getGoodsCommentsCount(goodsId) {
return http.request({
url: `/memberEvaluation/${goodsId}/evaluationNumber`,
url: `/member/evaluation/${goodsId}/evaluationNumber`,
method: Method.GET,
loading: false,
});
@ -365,7 +365,7 @@ export function getNoReadMessageNum() {
*/
export function myTrackList(params) {
return http.request({
url: `/footprint`,
url: `/member/footprint`,
method: Method.GET,
needToken: true,
params,
@ -378,7 +378,7 @@ export function myTrackList(params) {
*/
export function deleteHistoryListId(ids) {
return http.request({
url: `/footprint/delByIds/${ids}`,
url: `/member/footprint/delByIds/${ids}`,
method: Method.DELETE,
needToken: true,
});

View File

@ -51,7 +51,7 @@ export function selectedShipMethod(params) {
*/
export function getOrderList(params) {
return http.request({
url: "/orders",
url: "/order/order",
method: Method.GET,
needToken: true,
params,
@ -64,7 +64,7 @@ export function getOrderList(params) {
*/
export function getOrderDetail(orderSn) {
return http.request({
url: `/orders/${orderSn}`,
url: `/order/order/${orderSn}`,
method: Method.GET,
needToken: true,
});
@ -77,7 +77,7 @@ export function getOrderDetail(orderSn) {
*/
export function cancelOrder(orderSn, reason) {
return http.request({
url: `/orders/${orderSn}/cancel`,
url: `/order/order/${orderSn}/cancel`,
method: Method.POST,
needToken: true,
header: { "content-type": "application/x-www-form-urlencoded" },
@ -91,7 +91,7 @@ export function cancelOrder(orderSn, reason) {
*/
export function confirmReceipt(orderSn) {
return http.request({
url: `/orders/${orderSn}/receiving`,
url: `/order/order/${orderSn}/receiving`,
method: Method.POST,
needToken: true,
});

View File

@ -25,7 +25,7 @@ export function getStoreList(params) {
*/
export function getStoreBaseInfo(storeId) {
return http.request({
url: `/store/get/detail/${storeId}`,
url: `/store/store/get/detail/${storeId}`,
method: Method.GET,
loading: false,
});
@ -37,7 +37,7 @@ export function getStoreList(params) {
*/
export function getStoreCategory(id) {
return http.request({
url: `/store/label/get/${id}`,
url: `/store/store/label/get/${id}`,
method: Method.GET,
});
}
@ -49,7 +49,7 @@ export function getStoreList(params) {
*/
export function getLicencePhoto(id) {
return http.request({
url: `/store/get/licencePhoto/${id}`,
url: `/store/store/get/licencePhoto/${id}`,
method: Method.GET,
});
}

View File

@ -177,7 +177,7 @@ export function createTrade(params) {
*/
export function getCashierData(params) {
return http.request({
url: "cashier/tradeDetail",
url: "payment/cashier/tradeDetail",
method: Method.GET,
needToken: true,
params,
@ -194,7 +194,7 @@ export function getCashierData(params) {
*/
export function initiatePay(paymentMethod, paymentClient, params) {
return http.request({
url: `cashier/pay/${paymentMethod}/${paymentClient}`,
url: `payment/cashier/pay/${paymentMethod}/${paymentClient}`,
method: Method.GET,
needToken: true,
params,
@ -209,7 +209,7 @@ export function initiatePay(paymentMethod, paymentClient, params) {
*/
export function getExpress(orderSn) {
return http.request({
url: `/orders/getTraces/${orderSn}`,
url: `/order/order/getTraces/${orderSn}`,
method: Method.POST,
needToken: true,

View File

@ -198,7 +198,7 @@ export default {
storage.setUuid(uuid.v1());
}
uni.request({
url: api.common + "/slider/" + this.business,
url: api.common + "/common/slider/" + this.business,
header: {
uuid: storage.getUuid(),
},
@ -233,7 +233,7 @@ export default {
method: "POST",
url:
api.common +
"/slider/" +
"/common/slider/" +
this.business +
"?xPos=" +
parseInt(this.moveCode * this.tl),

View File

@ -4,8 +4,11 @@
*/
// 开发环境
const dev = {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
// common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn",
common: "http://192.168.111:8890",
buyer: "http://192.168.111:8888",
};
// 生产环境

View File

@ -119,6 +119,7 @@
import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
import { getAfterSaleList, cancelAfterSale } from "@/api/after-sale.js";
import { getOrderList } from "@/api/order.js";
import storage from "@/utils/storage";
export default {
components: {
@ -295,11 +296,9 @@ export default {
...order,
...sku,
};
storage.setAfterSaleData(data);
uni.navigateTo({
url: `/pages/order/afterSales/afterSalesSelect?sn=${sn}&sku=${encodeURIComponent(
JSON.stringify(data)
)}`,
url: `/pages/order/afterSales/afterSalesSelect?sn=${sn}`,
});
},
@ -309,10 +308,9 @@ export default {
onExpress(order, sku) {
sku.storeName = order.storeName;
storage.setAfterSaleData(data);
uni.navigateTo({
url: `./afterSalesDetailExpress?serviceSn=${
order.sn
}&sku=${encodeURIComponent(JSON.stringify(sku))}`,
url: `./afterSalesDetailExpress?serviceSn=${order.sn}`,
});
},

View File

@ -195,9 +195,7 @@ export default {
title: navTitle, //title
});
this.sn = options.sn;
let dsku = decodeURIComponent(options.sku);
let newSku = JSON.parse(dsku);
this.sku = newSku;
this.sku = storage.getAfterSaleData();;
this.form.orderItemSn = options.sn;
this.form.skuId = this.sku.skuId;

View File

@ -57,6 +57,7 @@
<script>
import { getLogistics } from "@/api/address.js";
import { fillShipInfo } from "@/api/after-sale.js";
import storage from "@/utils/storage";
export default {
data() {
@ -76,7 +77,8 @@ export default {
};
},
onLoad(options) {
this.sku = JSON.parse(decodeURIComponent(options.sku));
this.sku = storage.getAfterSaleData();
let navTitle = "服务单详情";
uni.setNavigationBarTitle({
title: navTitle, //title

View File

@ -56,6 +56,7 @@
<script>
import { getAfterSaleInfo } from "@/api/after-sale";
import storage from "@/utils/storage";
export default {
data() {
return {
@ -66,10 +67,7 @@ export default {
},
onLoad(options) {
this.sn = options.sn;
let dData = decodeURIComponent(options.sku);
let newData = JSON.parse(dData);
this.sku = newData;
this.sku = storage.getAfterSaleData();
// 退退
this.init()
},
@ -88,9 +86,7 @@ export default {
*/
onSelect(value) {
uni.redirectTo({
url: `./afterSalesDetail?sn=${this.sn}&sku=${encodeURIComponent(
JSON.stringify(this.sku)
)}&value=${value}`,
url: `./afterSalesDetail?sn=${this.sn}&value=${value}`,
});
},

View File

@ -90,9 +90,10 @@
serviceDetail.afterSaleImage &&
serviceDetail.afterSaleImage.split(',').length != 0
">
<image :src="img" @click="preview(serviceDetail.afterSaleImage.split(','), index)"
v-for="(img, index) in serviceDetail.afterSaleImage.split(',')" :key="index"
style="width: 50px; height: 50px; margin: 0px 5px"></image>
<view v-for="(img, index) in serviceDetail.afterSaleImage.split(',')" :key="index">
<u-image width="100" height="100" :src="img" @click="preview(serviceDetail.afterSaleImage.split(','), index)"
></u-image>
</view>
</view>
<!-- 如果服务类型为退款则不显示 -->
<view class="detail-item"

View File

@ -8,6 +8,7 @@ const USER_INFO = isDev ? "user_info_obj_dev" : "user_info_obj";
const FACE_LOGIN = isDev ? "face_login_dev" : "face_login";
const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login";
const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn";
const AFTERSALE_DATA = isDev ? "aftersale_data_dev" : "aftersale_data";
export default {
// 写入热门搜索时间戳
setHotWords(val) {
@ -91,4 +92,16 @@ export default {
removeRefreshToken() {
uni.removeStorageSync(REFRESH_TOKEN);
},
// 写入刷新token
setAfterSaleData(val) {
uni.setStorageSync(AFTERSALE_DATA, val);
},
// 获取刷新token
getAfterSaleData() {
return uni.getStorageSync(AFTERSALE_DATA);
},
// 删除token
removeAfterSaleData() {
uni.removeStorageSync(AFTERSALE_DATA);
},
};