feat:订单接口替换
This commit is contained in:
1 parent
bfbb15502e
commit
2af8d5fd0b
9 files changed
+315
-206
No files matched your search
@@ -30,7 +30,7 @@ export default {
|
||||
}),
|
||||
getShopCar: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/car/get`,
|
||||
url: `/hard/hard-car/app/mch-detail`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
}),
|
||||
updateShopCar: (data: any) =>
|
||||
request({
|
||||
url: `/hardware/car/save-or-upload`,
|
||||
url: `/hard/car/save-or-upload`,
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
|
||||
@@ -7,7 +7,7 @@ const basicAuth =
|
||||
export default {
|
||||
userInfo: () =>
|
||||
request({
|
||||
url: "/sys/user/get",
|
||||
url: "/admin/user/info",
|
||||
method: "GET",
|
||||
custom: {
|
||||
showLoading: false,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import storageConstant from "../constant/storage-constant";
|
||||
import { jump } from "../router/index";
|
||||
|
||||
export const useToken = () => {
|
||||
const tokenKey = storageConstant.TOKEN;
|
||||
@@ -15,3 +16,34 @@ export const useDefaultHeader = () => {
|
||||
Authorization: token,
|
||||
};
|
||||
};
|
||||
|
||||
export const useStaticCheckLogin = () => {
|
||||
const tokenKey = storageConstant.TOKEN;
|
||||
const tokenStorage = uni.getStorageSync(tokenKey);
|
||||
if (tokenStorage) return true;
|
||||
return false;
|
||||
};
|
||||
|
||||
export const useCheckLogin = async (): Promise<boolean> => {
|
||||
const tokenKey = storageConstant.TOKEN;
|
||||
const tokenStorage = uni.getStorageSync(tokenKey);
|
||||
if (tokenStorage) return true;
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您还未登录,请先登录",
|
||||
confirmColor: "#0094ff",
|
||||
cancelText: "取消",
|
||||
confirmText: "去登录",
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
jump("/pages/test/login", {}, 3);
|
||||
return;
|
||||
}
|
||||
if (!res.confirm) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
},
|
||||
});
|
||||
return false;
|
||||
};
|
||||
Reference in new issue
Block a user