From 6f9d49f08812cfd94d8a017af1f8793789831269 Mon Sep 17 00:00:00 2001
From: ctw <>
Date: Tue, 7 Jan 2025 13:07:46 +0800
Subject: [PATCH 01/10] =?UTF-8?q?=E5=95=86=E5=BA=97=E8=B4=AD=E7=89=A9?=
=?UTF-8?q?=E8=BD=A6=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 6 +-
src/pages/humanFace/list.vue | 2 +-
src/pages/shop/components/number-box.vue | 225 ----------
src/pages/shop/components/product-car.vue | 88 ++--
src/pages/shop/components/product-row.vue | 20 +-
src/pages/shop/components/product-sku.vue | 186 ++++++++
src/pages/shop/components/product-spec.vue | 127 ------
src/pages/shop/components/product-total.vue | 88 ++--
src/pages/shop/components/select-sku.vue | 1 +
src/pages/shop/detail.vue | 454 +++++++++-----------
src/pages/shop/product-detail.vue | 1 -
src/static/tabbar/shop-select.png | Bin 0 -> 1058 bytes
src/static/tabbar/shop.png | Bin 0 -> 1059 bytes
13 files changed, 478 insertions(+), 720 deletions(-)
delete mode 100644 src/pages/shop/components/number-box.vue
create mode 100644 src/pages/shop/components/product-sku.vue
delete mode 100644 src/pages/shop/components/product-spec.vue
create mode 100644 src/static/tabbar/shop-select.png
create mode 100644 src/static/tabbar/shop.png
diff --git a/src/pages.json b/src/pages.json
index c8c4dfd..0b9d6f6 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -275,9 +275,9 @@
},
{
"pagePath": "pages/tabbar/shop",
- "text": "商店",
- "iconPath": "static/tabbar/home.png",
- "selectedIconPath": "static/tabbar/home-select.png"
+ "text": "超市",
+ "iconPath": "static/tabbar/shop.png",
+ "selectedIconPath": "static/tabbar/shop-select.png"
},
{
"pagePath": "pages/tabbar/order",
diff --git a/src/pages/humanFace/list.vue b/src/pages/humanFace/list.vue
index 5d0d08f..e9250da 100644
--- a/src/pages/humanFace/list.vue
+++ b/src/pages/humanFace/list.vue
@@ -17,7 +17,7 @@
-
+
{{ v.username }}
修改
diff --git a/src/pages/shop/components/number-box.vue b/src/pages/shop/components/number-box.vue
deleted file mode 100644
index 0b57fe4..0000000
--- a/src/pages/shop/components/number-box.vue
+++ /dev/null
@@ -1,225 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/shop/components/product-car.vue b/src/pages/shop/components/product-car.vue
index 6235c7b..1f949eb 100644
--- a/src/pages/shop/components/product-car.vue
+++ b/src/pages/shop/components/product-car.vue
@@ -1,51 +1,3 @@
-
-
{
@add="() => emit('add', v)"
@remove="emit('remove', v)"
/>
+
-
+
-
+
diff --git a/src/pages/shop/components/product-row.vue b/src/pages/shop/components/product-row.vue
index af8b839..ca11654 100644
--- a/src/pages/shop/components/product-row.vue
+++ b/src/pages/shop/components/product-row.vue
@@ -17,7 +17,7 @@
加入购物车
@@ -26,25 +26,24 @@
diff --git a/src/pages/shop/components/product-sku.vue b/src/pages/shop/components/product-sku.vue
new file mode 100644
index 0000000..c317f69
--- /dev/null
+++ b/src/pages/shop/components/product-sku.vue
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+ {{ productData.name }}
+
+ ¥{{ productData.price }}
+ 库存{{ productData.salesCount }}
+
+
+
+
+
+
+ {{ property.name }}
+
+
+
+
+
+
+ 购买数量
+
+
+ -
+
+ {{ String(state.count).padStart(2, "0") }}
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/shop/components/product-spec.vue b/src/pages/shop/components/product-spec.vue
deleted file mode 100644
index aff3498..0000000
--- a/src/pages/shop/components/product-spec.vue
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{ property.name }}
-
-
-
-
- 购买数量
-
-
-
-
- {{ props.modelValue }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pages/shop/components/product-total.vue b/src/pages/shop/components/product-total.vue
index 8a5aef4..76e4e26 100644
--- a/src/pages/shop/components/product-total.vue
+++ b/src/pages/shop/components/product-total.vue
@@ -1,59 +1,37 @@
-
-
-
-
-
-
-
-
-
- ¥ {{ hooks.useMoney(props.totPrice) }}
- 共{{ props.totCount }}件
-
-
-
- 购买
-
+
+
+
+
+
+
+ ¥ {{ hooks.useMoney(props.totPrice) }}
+ 共{{ props.totCount }}件
+
+ 提交订单
+
-
\ No newline at end of file
+
diff --git a/src/pages/shop/components/select-sku.vue b/src/pages/shop/components/select-sku.vue
index 79a66dc..304e7c1 100644
--- a/src/pages/shop/components/select-sku.vue
+++ b/src/pages/shop/components/select-sku.vue
@@ -70,6 +70,7 @@
diff --git a/src/pages/shop/detail.vue b/src/pages/shop/detail.vue
index 8c6fbf3..9b5d871 100644
--- a/src/pages/shop/detail.vue
+++ b/src/pages/shop/detail.vue
@@ -1,204 +1,3 @@
-
-
@@ -212,8 +11,8 @@ const selectSku = (productId: number | null) => {
-
+
@@ -245,32 +44,7 @@ const selectSku = (productId: number | null) => {
-
-
-
-
@@ -305,15 +79,15 @@ const selectSku = (productId: number | null) => {
@@ -324,32 +98,230 @@ const selectSku = (productId: number | null) => {
-
+
-
+
+
+
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/food.ts b/src/sheep/api/food.ts
index 6c201e3..838950a 100644
--- a/src/sheep/api/food.ts
+++ b/src/sheep/api/food.ts
@@ -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/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;
+};
From f15d3dbe908d37a34e3154c30d6b4ce12f04ecca Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Tue, 7 Jan 2025 17:41:03 +0800
Subject: [PATCH 09/10] =?UTF-8?q?feat:=E5=94=AE=E5=90=8E=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/boxes/list.vue | 2 +-
src/pages/merchant/detail.vue | 716 ++++++++++--------
src/pages/merchant/food.vue | 4 +-
src/sheep/api/boxes.ts | 12 +-
src/sheep/api/food.ts | 4 +-
.../custom-waterfalls-flow.vue | 676 +++++++++--------
6 files changed, 767 insertions(+), 647 deletions(-)
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/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 838950a..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: {
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 3a9ad301d4afeed65225b4c2adbde15a4d2cf767 Mon Sep 17 00:00:00 2001
From: ctw <>
Date: Wed, 8 Jan 2025 09:26:27 +0800
Subject: [PATCH 10/10] =?UTF-8?q?=E6=94=B9=E4=BB=A3=E7=90=86url?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.env b/.env
index 6e2c428..853ae6a 100644
--- a/.env
+++ b/.env
@@ -22,7 +22,7 @@ VITE_IMAGE_BASE_PATH = http://localhost:9999
# ******************** start 开发环境 start ********************
# VITE_APP_DEV_SERVICE =http://123.156.228.134:48080/app-api
# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api
-VITE_APP_DEV_SERVICE = http://192.168.101.24:9999 # 邓-本地
+VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地
# VITE_APP_DEV_SERVICE = http://localhost:9999
# ******************** end 开发环境 end ********************