适配修改的api

master
paulGao 2022-02-10 18:57:17 +08:00
parent 557d7ef1d9
commit ab4015d0e0
18 changed files with 91 additions and 80 deletions

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@ import api from "@/config/api.js";
*/ */
export function getRegionsById(id = 0) { export function getRegionsById(id = 0) {
return http.request({ return http.request({
url: `${api.common}/region/item/${id}`, url: `${api.common}/common/region/item/${id}`,
method: Method.GET, method: Method.GET,
message: false, message: false,
}); });
@ -29,4 +29,4 @@ export function getIMDetail() {
* 文件上传地址 * 文件上传地址
* @type {string} * @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) { export function getGoodsMessage(goodsId) {
return http.request({ return http.request({
url: `/goods/get/${goodsId}`, url: `/goods/goods/get/${goodsId}`,
method: Method.GET, method: Method.GET,
}); });
} }
@ -19,7 +19,7 @@ import { http, Method } from "@/utils/request.js";
*/ */
export function getGoodsRelated(params) { export function getGoodsRelated(params) {
return http.request({ return http.request({
url: `/goods/es/related`, url: `/goods/goods/es/related`,
method: Method.GET, method: Method.GET,
params, params,
}); });
@ -32,7 +32,7 @@ export function getGoodsRelated(params) {
*/ */
export function getGoods(skuId, goodsId) { export function getGoods(skuId, goodsId) {
return http.request({ return http.request({
url: `/goods/sku/${goodsId}/${skuId}`, url: `/goods/goods/sku/${goodsId}/${skuId}`,
method: Method.GET, method: Method.GET,
}); });
} }
@ -56,7 +56,7 @@ export function getGoodsRelated(params) {
*/ */
export function getGoodsList(params) { export function getGoodsList(params) {
return http.request({ return http.request({
url: "/goods/es", url: "/goods/goods/es",
method: Method.GET, method: Method.GET,
params, params,
}); });
@ -112,7 +112,7 @@ export function getPlateformTagGoods(tag_id) {
*/ */
export function getCategoryList(id) { export function getCategoryList(id) {
return http.request({ return http.request({
url: `/category/get/${id}`, url: `/goods/category/get/${id}`,
method: Method.GET, method: Method.GET,
loading: false, loading: false,
}); });

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -90,9 +90,10 @@
serviceDetail.afterSaleImage && serviceDetail.afterSaleImage &&
serviceDetail.afterSaleImage.split(',').length != 0 serviceDetail.afterSaleImage.split(',').length != 0
"> ">
<image :src="img" @click="preview(serviceDetail.afterSaleImage.split(','), index)" <view v-for="(img, index) in serviceDetail.afterSaleImage.split(',')" :key="index">
v-for="(img, index) in serviceDetail.afterSaleImage.split(',')" :key="index" <u-image width="100" height="100" :src="img" @click="preview(serviceDetail.afterSaleImage.split(','), index)"
style="width: 50px; height: 50px; margin: 0px 5px"></image> ></u-image>
</view>
</view> </view>
<!-- 如果服务类型为退款则不显示 --> <!-- 如果服务类型为退款则不显示 -->
<view class="detail-item" <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 FACE_LOGIN = isDev ? "face_login_dev" : "face_login";
const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login"; const FINGER_LOGIN = isDev ? "finger_login_dev" : "finger_login";
const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn"; const CART_BACKBTN = isDev ? "cart_backbtn_dev" : "cart_backbtn";
const AFTERSALE_DATA = isDev ? "aftersale_data_dev" : "aftersale_data";
export default { export default {
// 写入热门搜索时间戳 // 写入热门搜索时间戳
setHotWords(val) { setHotWords(val) {
@ -91,4 +92,16 @@ export default {
removeRefreshToken() { removeRefreshToken() {
uni.removeStorageSync(REFRESH_TOKEN); 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);
},
}; };