diff --git a/src/pages/apply/foreign-list.vue b/src/pages/apply/foreign-list.vue
index 2b8b995..a35d7f8 100644
--- a/src/pages/apply/foreign-list.vue
+++ b/src/pages/apply/foreign-list.vue
@@ -88,7 +88,13 @@ const doCard = (v: any) => {
数量
{{ v.count }}
-
+
+ 已使用
+ {{ v.useCount }}
+
+
+
+
有效期
{{ hooks.useTime(v.applyStartTime, " {y}-{m}-{d}") }}
@@ -96,8 +102,7 @@ const doCard = (v: any) => {
{{ hooks.useTime(v.applyEndTime, "{y}-{m}-{d}") }}
-
-
+
diff --git a/src/pages/apply/stride-items.vue b/src/pages/apply/stride-items.vue
index e5a9a0c..98f2dcc 100644
--- a/src/pages/apply/stride-items.vue
+++ b/src/pages/apply/stride-items.vue
@@ -43,12 +43,12 @@ onShow(() => {
v-for="(v, i) in pageHook.list" :key="i" @tap="hooks.usePreviewImage(v.code)">
- 未使用
- 已使用
+ 未使用
+ 已使用
{{ v.username }}
- {{ v.userMobile }}
+ {{ v.userMobile }}
diff --git a/src/pages/apply/stride-list.vue b/src/pages/apply/stride-list.vue
index 1502690..1422acc 100644
--- a/src/pages/apply/stride-list.vue
+++ b/src/pages/apply/stride-list.vue
@@ -88,8 +88,12 @@ const doCard = (v: any) => {
数量
{{ v.count }}
+
+ 已使用
+ {{ v.useCount }}
+
-
+
diff --git a/src/pages/boxes/list.vue b/src/pages/boxes/list.vue
index bb94ddd..c2c63e3 100644
--- a/src/pages/boxes/list.vue
+++ b/src/pages/boxes/list.vue
@@ -26,7 +26,7 @@ const state = reactive({
})
const pageRef = ref(null)
-const pageHook = hooks.usePage(pageRef, boxesApi.page, null, 'data.list')
+const pageHook = hooks.usePage(pageRef, boxesApi.page, null, 'data.records')
const query = (page: number, pagesize: number) => {
pageHook.startPage(page, pagesize, false, state.pa);
}
diff --git a/src/pages/merchant/detail.vue b/src/pages/merchant/detail.vue
index c859e13..a2190af 100644
--- a/src/pages/merchant/detail.vue
+++ b/src/pages/merchant/detail.vue
@@ -1,393 +1,461 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ state.detail.name }}
-
-
- {{ state.detail.deptName }}
-
-
-
- 营业时间
-
- {{ state.detail.jobStartTime }}
- ~
- {{ state.detail.jobEndTime }}
-
-
-
- 食堂地址
- {{ state.detail.addressDes }}
-
-
-
-
-
-
-
-
-
-
-
- 联系食堂
-
-
-
-
-
-
- 包厢预定
-
-
-
-
-
-
- 每日菜谱
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ state.detail.name }}
-
+
+ {{ state.detail.deptName }}
+
+
+
+ 营业时间
+
+ {{ state.detail.jobStartTime }}
+ ~
+ {{ state.detail.jobEndTime }}
+
+
+
+ 食堂地址
+ {{ state.detail.addressDes }}
+
+
+
+
+
+
+
+
+
+
+
+ 联系食堂
+
+
+
+
+
+
+ 包厢预定
+
+
+
+
+
+
+ 每日菜谱
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- {{ cV.categoryName }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{ cV.categoryName }}
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/src/pages/merchant/food.vue b/src/pages/merchant/food.vue
index 611f7a1..2e07319 100644
--- a/src/pages/merchant/food.vue
+++ b/src/pages/merchant/food.vue
@@ -60,13 +60,13 @@ const initDate = () => {
})
}
state.dateList = list
- state.pa.startTime = state.dateList[0].dateTime
+ state.pa.day = state.dateList[0].dateTime
pageRef.value?.reload(false)
}
const doDateItem = (v: any, i: any) => {
state.currentDateIndex = i
- state.pa.startTime = state.dateList[i].dateTime
+ state.pa.day = state.dateList[i].dateTime
pageRef.value.reload(true)
}
diff --git a/src/pages/tabbar/home.vue b/src/pages/tabbar/home.vue
index edd34bb..500ca04 100644
--- a/src/pages/tabbar/home.vue
+++ b/src/pages/tabbar/home.vue
@@ -2,71 +2,92 @@
import { ref, reactive } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
-import { hooks, router } from "@@/index"
-import { merchantApi } from "@@/api"
+import { hooks, router } from "@@/index";
+import { merchantApi } from "@@/api";
-import { filePath } from "@@/utils/file"
+import { filePath } from "@@/utils/file";
const state = reactive({
- pa: {
- pagesize: 10,
- type: '1'
- }
-})
-
-onLoad(() => {
-
+ pa: {
+ pagesize: 10,
+ type: "1",
+ },
});
+
+onLoad(() => {});
onShow(() => {
- if (pageRef.value) {
- pageRef.value.reload(false)
- }
-})
+ if (pageRef.value) {
+ pageRef.value.reload(false);
+ }
+});
-const pageRef = ref(null)
-const pageHook = hooks.usePage(pageRef, merchantApi.page, null, 'data.records')
+const pageRef = ref(null);
+const pageHook = hooks.usePage(pageRef, merchantApi.page, null, "data.records");
const query = (page: number, pagesize: number) => {
- pageHook.startPage(page, pagesize, false, state.pa);
-}
+ pageHook.startPage(page, pagesize, false, state.pa);
+};
+const toDetail = async (v: any) => {
+ const isLogin = await hooks.useCheckLogin();
+ if (isLogin) {
+ router.jump("/pages/merchant/detail", { id: v.id });
+ }
+};
-
-
-
-
-
-
-
-
-
-
- {{ v.name }}
-
-
- {{ v.deptName }}
-
-
-
- 营业时间
-
- {{ v.jobStartTime }}
- ~
- {{ v.jobEndTime }}
-
-
-
- 食堂地址
- {{ v.addressDes }}
-
-
+
+
+
+
+
+
+
+
+ {{ v.name }}
-
-
+
+ {{ v.deptName }}
+
+
+
+ 营业时间
+
+ {{ v.jobStartTime }}
+ ~
+ {{ v.jobEndTime }}
+
+
+
+ 食堂地址
+ {{ v.addressDes }}
+
+
+
+
+
diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue
index 774930b..5f8f6b3 100644
--- a/src/pages/tabbar/my.vue
+++ b/src/pages/tabbar/my.vue
@@ -55,6 +55,8 @@ const getUserInfo = () => {
const userStorage = uni.getStorageSync(userInfoKey);
if (!isEmpty(userStorage)) {
state.userInfo = userStorage;
+ console.log(state.userInfo,"state.userInfo");
+
}
};
@@ -97,7 +99,16 @@ const doLogin = async (loginType, token, accountId, sessionId) => {
}
};
+const toService = async (v:any)=>{
+ const isLogin = await hooks.useCheckLogin();
+ if(isLogin){
+ router.jump(v.router)
+ }
+}
+
const doLogout = async () => {
+ const isLogin = await hooks.useCheckLogin();
+ if(!isLogin) return
uni.showLoading({
title: "退出登录中...",
mask: true,
@@ -115,15 +126,15 @@ const doLogout = async () => {
-
-
+
- {{ state.userInfo.nickname }}
+ {{ state.userInfo?.sysUser?.name }}
- ID {{ state.userInfo.id }}
+ ID {{ state.userInfo?.sysUser?.userId }}
请先登录
@@ -133,7 +144,7 @@ const doLogout = async () => {
+ @tap="toService(v)">
{{ v.text }}
diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue
index 3f2ab22..66922be 100644
--- a/src/pages/tabbar/order.vue
+++ b/src/pages/tabbar/order.vue
@@ -2,159 +2,195 @@
import { ref, reactive } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
-import { hooks, router } from "@@/index"
-import { orderApi, payApi } from "@@/api"
+import { hooks, router } from "@@/index";
+import { orderApi, payApi } from "@@/api";
-import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
+import zTabs from "@@/components/other/z-tabs/z-tabs.vue";
const data = {
- tabs: [
- { id: null, name: '全部', disabled: false },
- { id: 1, name: '未支付', disabled: false },
- { id: 5, name: '待核销', disabled: false },
- { id: 10, name: '售后中', disabled: false },
- { id: 15, name: '已核销', disabled: false },
- ]
-}
+ tabs: [
+ { id: null, name: "全部", disabled: false },
+ { id: 1, name: "未支付", disabled: false },
+ { id: 5, name: "待核销", disabled: false },
+ { id: 10, name: "售后中", disabled: false },
+ { id: 15, name: "已核销", disabled: false },
+ ],
+};
const state = reactive({
- pa: {
- orderStatus: data.tabs[0].id,
- },
-})
-
-onLoad(() => {
-
+ pa: {
+ orderStatus: data.tabs[0].id,
+ },
});
-onShow(() => {
- if (pageRef.value) {
- pageRef.value.reload(false)
- }
-})
-const doTab = (e: any) => {
- const target = data.tabs[e];
- state.pa.orderStatus = target.id
- pageRef.value.reload(true)
-}
-const pageRef = ref(null)
-const pageHook = hooks.usePage(pageRef, orderApi.page, null, 'data.list')
+onLoad(() => {});
+onShow(async () => {
+ const isLogin = await hooks.useCheckLogin();
+ if (!isLogin) return;
+ if (pageRef.value) {
+ pageRef.value.reload(false);
+ }
+});
+const doTab = (e: any) => {
+ const target = data.tabs[e];
+ state.pa.orderStatus = target.id;
+ pageRef.value.reload(true);
+};
+
+const pageRef = ref(null);
+const pageHook = hooks.usePage(pageRef, orderApi.page, null, "data.list");
const query = (page: number, pagesize: number) => {
- pageHook.startPage(page, pagesize, false, state.pa);
-}
+ const isLogin = hooks.useStaticCheckLogin();
+ console.log(isLogin,"isLogin");
+
+ if (!isLogin) return;
+ pageHook.startPage(page, pagesize, false, state.pa);
+};
const doToDetail = (v: any) => {
- router.jump("/pages/order/detail", { id: v.id })
-}
+ router.jump("/pages/order/detail", { id: v.id });
+};
-const doAppraise = () => {
-
-}
+const doAppraise = () => {};
const doRefund = (v: any) => {
- router.jump("/pages/refund/apply", { id: v.id })
- return
- uni.showModal({
- title: '提示',
- content: '是否确定退款',
- confirmColor: '#0094ff',
- success: async (res) => {
- if (!res.confirm) return
- try {
- uni.showLoading({ title: '退款中...', mask: true });
- const _pa = { id: v.id }
- const { data, code }: any = await payApi.refundHardwareOrder(_pa)
- if (code != 0) throw new Error()
- pageRef.value.reload(true)
- uni.hideLoading()
- uni.showToast({ title: '退款成功', icon: "none" });
- } catch (error) {
- console.error(error);
- uni.hideLoading()
- }
- }
- })
-}
-
+ router.jump("/pages/refund/apply", { id: v.id });
+};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ v.merchantStr }}
-
-
- 未支付
- 待核销
- 售后中
- 已核销
-
-
-
- 下单时间
-
- {{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
-
-
-
- {{ hooks.useEnum('hardwareRefundStatusEnum', v.refundStatus) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ pV.productName }}
-
-
-
-
-
-
-
-
-
- ¥ {{ hooks.useMoney(v.totalPrice) }}
- 共 {{ v.shopCarList.length }} 件
-
-
-
- 评价
- 退款
-
-
- 核销码
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ v.merchantStr }}
+
+
+ 未支付
+ 待核销
+ 售后中
+ 已核销
-
-
+
+
+ 下单时间
+
+ {{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
+
+
+
+ {{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ pV.productName }}
+
+
+
+
+
+
+
+
+
+ ¥ {{ hooks.useMoney(v.totalPrice) }}
+ 共 {{ v.shopCarList.length }} 件
+
+
+
+ 评价
+ 退款
+
+
+ 核销码
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/sheep/api/boxes.ts b/src/sheep/api/boxes.ts
index 606f141..e626e56 100644
--- a/src/sheep/api/boxes.ts
+++ b/src/sheep/api/boxes.ts
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
export default {
page: (params: any) =>
request({
- url: "boxes/info/api/page",
+ url: "canteen/boxesInfo/appPage",
method: "GET",
params,
custom: {
@@ -12,7 +12,7 @@ export default {
}),
detail: (params: any) =>
request({
- url: "boxes/info/api/getInfo",
+ url: "canteen/boxesInfo/getInfo",
method: "GET",
params,
custom: {
@@ -21,7 +21,7 @@ export default {
}),
apply: (data: any) =>
request({
- url: "boxes/info/api/create",
+ url: "canteen/boxesInfo/create",
method: "POST",
data,
custom: {
@@ -30,7 +30,7 @@ export default {
}),
cancel: (data: any) =>
request({
- url: "boxes/info/api/cancel",
+ url: "canteen/boxesInfo/cancel",
method: "GET",
data,
custom: {
@@ -39,7 +39,7 @@ export default {
}),
get: (data: any) =>
request({
- url: "boxes/info/api/get",
+ url: "canteen/boxesInfo/get",
method: "GET",
data,
custom: {
@@ -48,7 +48,7 @@ export default {
}),
MyBookingPage: (data: any) =>
request({
- url: "boxes/info/api/getMyBookingPage",
+ url: "canteen/boxesInfo/getMyBookingPage",
method: "GET",
data,
custom: {
diff --git a/src/sheep/api/food.ts b/src/sheep/api/food.ts
index 6c201e3..01b7735 100644
--- a/src/sheep/api/food.ts
+++ b/src/sheep/api/food.ts
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
export default {
page: (params: any) =>
request({
- url: `/food/api/page`,
+ url: `/canteen/canteenDailyMenu/ad/getCanteenList`,
method: "GET",
params,
custom: {
@@ -12,7 +12,7 @@ export default {
}),
classify: (params: any) =>
request({
- url: `/onlinefood/category/listFood`,
+ url: `/canteen/canteenOnlineCategory/app/getAllSimple`,
method: "GET",
params,
custom: {
@@ -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: {
diff --git a/src/sheep/api/user.ts b/src/sheep/api/user.ts
index 1dcd87e..3916873 100644
--- a/src/sheep/api/user.ts
+++ b/src/sheep/api/user.ts
@@ -7,7 +7,7 @@ const basicAuth =
export default {
userInfo: () =>
request({
- url: "/sys/user/get",
+ url: "/admin/user/info",
method: "GET",
custom: {
showLoading: false,
diff --git a/src/sheep/components/other/custom-waterfalls-flow/custom-waterfalls-flow.vue b/src/sheep/components/other/custom-waterfalls-flow/custom-waterfalls-flow.vue
index 27b8eec..79159da 100644
--- a/src/sheep/components/other/custom-waterfalls-flow/custom-waterfalls-flow.vue
+++ b/src/sheep/components/other/custom-waterfalls-flow/custom-waterfalls-flow.vue
@@ -1,330 +1,382 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/sheep/hooks/use-token.ts b/src/sheep/hooks/use-token.ts
index f34d328..06a5dff 100644
--- a/src/sheep/hooks/use-token.ts
+++ b/src/sheep/hooks/use-token.ts
@@ -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 => {
+ 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;
+};