diff --git a/package.json b/package.json
index 79d41db..2fdeb7b 100644
--- a/package.json
+++ b/package.json
@@ -59,6 +59,7 @@
"@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001",
"@vue/compiler-core": "^3.5.11",
+ "@zebra-ui/swiper": "^2.2.8",
"dayjs": "^1.11.13",
"luch-request": "^3.1.1",
"pinia": "^2.2.6",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c96ffa6..62e9f58 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,6 +53,9 @@ dependencies:
'@vue/compiler-core':
specifier: ^3.5.11
version: 3.5.12
+ '@zebra-ui/swiper':
+ specifier: ^2.2.8
+ version: 2.2.8
dayjs:
specifier: ^1.11.13
version: 1.11.13
@@ -3868,6 +3871,11 @@ packages:
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
dev: true
+ /@zebra-ui/swiper@2.2.8:
+ resolution: {integrity: sha512-ujS0xKzEieFg59Wjz1fOtqeZthoMOgTZrFdN7c8Tq/qrIjKst6JGd35qg5/tvK4v9idtmywK4Dzp77go3LolKQ==}
+ engines: {HBuilderX: ^3.1.0}
+ dev: false
+
/abab@2.0.6:
resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==}
deprecated: Use your platform's native atob() and btoa() methods instead
diff --git a/src/App.vue b/src/App.vue
index 1370b98..6d9ea60 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -15,4 +15,20 @@ onHide(() => {
diff --git a/src/pages.json b/src/pages.json
index 68e8ab9..1725406 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -84,6 +84,44 @@
"navigationBarTitleText": "",
"disableScroll": true
}
+ },
+ {
+ "path": "stride-items",
+ "style": {
+ "navigationBarTitleText": "",
+ "disableScroll": true
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/merchant",
+ "pages": [
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "product-detail",
+ "style": {
+ "navigationBarTitleText": "",
+ "disableScroll": true
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/order",
+ "pages": [
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "",
+ "disableScroll": true
+ }
}
]
},
diff --git a/src/pages/apply/stride-apply.vue b/src/pages/apply/stride-apply.vue
index 2065365..d11afe5 100644
--- a/src/pages/apply/stride-apply.vue
+++ b/src/pages/apply/stride-apply.vue
@@ -9,9 +9,15 @@ const state = reactive({
})
const applyForm = reactive({
+ count: 1,
remark: "",
})
const applyFormRules = reactive({
+ count: [
+ { required: true, message: '请输入申请数量' },
+ { required: true, min: 1, message: '最少申请1张' },
+ { required: true, max: 20, message: '最多申请20张' },
+ ]
})
onLoad(() => {
@@ -29,6 +35,7 @@ const doSubmit = async () => {
try {
uni.showLoading({ title: '申请中...', mask: false });
const _pa = {
+ count: applyForm.count,
remark: applyForm.remark,
}
const { data, code }: any = await applyApi.strideApply(_pa)
@@ -49,6 +56,10 @@ const doSubmit = async () => {
+
+
+
+
diff --git a/src/pages/apply/stride-items.vue b/src/pages/apply/stride-items.vue
new file mode 100644
index 0000000..9135b36
--- /dev/null
+++ b/src/pages/apply/stride-items.vue
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 未使用
+ 已使用
+
+ {{ v.userNameStr }}
+ {{ v.userMobile }}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/apply/stride-list.vue b/src/pages/apply/stride-list.vue
index f6043ff..13adf82 100644
--- a/src/pages/apply/stride-list.vue
+++ b/src/pages/apply/stride-list.vue
@@ -54,6 +54,7 @@ const doApply = async () => {
+
diff --git a/src/pages/merchant/components/product-row.vue b/src/pages/merchant/components/product-row.vue
new file mode 100644
index 0000000..4199a25
--- /dev/null
+++ b/src/pages/merchant/components/product-row.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/merchant/detail.vue b/src/pages/merchant/detail.vue
new file mode 100644
index 0000000..194468b
--- /dev/null
+++ b/src/pages/merchant/detail.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ state.detail.name }}
+
+
+ {{ state.detail.deptStr }}
+
+
+
+ 营业时间
+
+ {{ hooks.useTime(state.detail.applianceStartTime, "{h}:{i}") }}
+ ~
+ {{ hooks.useTime(state.detail.applianceEndTime, "{h}:{i}") }}
+
+
+
+ 食堂地址
+ {{ state.detail.addressDes }}
+
+
+
+
+
+
+
+
+
+
+
+ 联系食堂
+
+
+
+
+
+
+ 包厢预定
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/merchant/index.vue b/src/pages/merchant/index.vue
new file mode 100644
index 0000000..1f8b76e
--- /dev/null
+++ b/src/pages/merchant/index.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/merchant/product-detail.vue b/src/pages/merchant/product-detail.vue
new file mode 100644
index 0000000..d0887ad
--- /dev/null
+++ b/src/pages/merchant/product-detail.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 评价
+
+
+
+ 详情
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue
new file mode 100644
index 0000000..f1bc8a7
--- /dev/null
+++ b/src/pages/order/detail.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+ 订单信息
+
+
+ 用户
+ {{ state.detail.username }}
+
+
+ 手机号
+ {{ state.detail.userMobile }}
+
+
+ 商户
+ {{ state.detail.merchantStr }}
+
+
+ 部门
+ {{ state.detail.deptName }}
+
+
+
+ 订单号
+ {{ state.detail.id }}
+
+
+ 下单时间
+ {{ hooks.useTime(state.detail.createTime, "") }}
+
+
+ 支付方式
+
+ {{ hooks.useEnum("hardwareOrderTypeEnum", state.detail.orderType) }}
+
+
+
+
+
+ 商品费用
+
+
+
+
+
+ {{ v.productName }}
+ ¥ {{ hooks.useMoney(v.productPrice) }}
+ x {{ v.productCount }}
+
+
+
+ ¥ {{ hooks.useMoney(v.totalPrice) }}
+
+
+
+
+ 实付款
+
+ ¥
+ {{ hooks.useMoney(state.detail.practicalTotalPrice) }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/tabbar/food.vue b/src/pages/tabbar/food.vue
index 551dd57..deaa3cf 100644
--- a/src/pages/tabbar/food.vue
+++ b/src/pages/tabbar/food.vue
@@ -3,10 +3,17 @@ import { ref, reactive } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { hooks } from "@@/index"
-import { merchantApi } from "@@/api"
+import { foodApi } from "@@/api"
+import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
+
+const data = {
+ tabs: ['早餐', '午餐', '晚餐'],
+}
const state = reactive({
-
+ pa: {
+ status: 1,
+ },
})
onLoad(() => {
@@ -17,24 +24,35 @@ onShow(() => {
})
const pageRef = ref(null)
-const pageHook = hooks.usePage(pageRef, merchantApi.merchantList, null, 'data')
+const pageHook = hooks.usePage(pageRef, foodApi.page, null, 'data.list')
const query = (page: number, pagesize: number) => {
pageHook.startPage(page, pagesize, false, state.pa);
}
-
+const doTab = (e: any) => {
+ if (state.pa.status != e + 1) {
+ state.pa.status = e + 1
+ pageRef.value.reload(true)
+ }
+}
-
-
-
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/pages/tabbar/home.vue b/src/pages/tabbar/home.vue
index 551dd57..f06a77c 100644
--- a/src/pages/tabbar/home.vue
+++ b/src/pages/tabbar/home.vue
@@ -2,7 +2,7 @@
import { ref, reactive } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
-import { hooks } from "@@/index"
+import { hooks, router } from "@@/index"
import { merchantApi } from "@@/api"
const state = reactive({
@@ -17,24 +17,48 @@ onShow(() => {
})
const pageRef = ref(null)
-const pageHook = hooks.usePage(pageRef, merchantApi.merchantList, null, 'data')
+const pageHook = hooks.usePage(pageRef, merchantApi.page, null, 'data.list')
const query = (page: number, pagesize: number) => {
pageHook.startPage(page, pagesize, false, state.pa);
}
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ v.name }}
+
+
+ {{ v.deptStr }}
+
+
+
+ 营业时间
+
+ {{ hooks.useTime(v.applianceStartTime, "{h}:{i}") }}
+ ~
+ {{ hooks.useTime(v.applianceEndTime, "{h}:{i}") }}
+
+
+
+ 食堂地址
+ {{ v.addressDes }}
+
+
+
-
diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue
index 551dd57..918fc2a 100644
--- a/src/pages/tabbar/order.vue
+++ b/src/pages/tabbar/order.vue
@@ -2,11 +2,24 @@
import { ref, reactive } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
-import { hooks } from "@@/index"
-import { merchantApi } from "@@/api"
+import { hooks, router } from "@@/index"
+import { orderApi } from "@@/api"
+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 },
+ ]
+}
const state = reactive({
-
+ pa: {
+ orderStatus: null,
+ },
})
onLoad(() => {
@@ -15,27 +28,106 @@ onLoad(() => {
onShow(() => {
})
+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, merchantApi.merchantList, null, 'data')
+const pageHook = hooks.usePage(pageRef, orderApi.page, null, 'data.list')
const query = (page: number, pagesize: number) => {
pageHook.startPage(page, pagesize, false, state.pa);
}
+const doToDetail = (v: any) => {
+ router.jump("/pages/order/detail", { id: v.id })
+}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ v.merchantStr }}
+
+
+ 未支付
+ 待核销
+ 已核销
+ 已退款
+
+
+
+ 下单时间
+
+ {{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ pV.productName }}
+
+
+
+
+
+
+
+
+
+ ¥ {{ hooks.useMoney(v.totalPrice) }}
+ 共 {{ v.shopCarList.length }} 件
+
+
+
+ 评价
+
+ 核销码
+
+
+
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/sheep/api/food.ts b/src/sheep/api/food.ts
index 8c60b54..e318b95 100644
--- a/src/sheep/api/food.ts
+++ b/src/sheep/api/food.ts
@@ -1,3 +1,49 @@
import request from "@/sheep/utils/request";
-export default {};
+export default {
+ page: (params: any) =>
+ request({
+ url: `/food/api/selectTimeFood`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ classify: (params: any) =>
+ request({
+ url: `/onlinefood/category/listFood`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ product: (params: any) =>
+ request({
+ url: `/onlinefood/category/list`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ getShopCar: (params: any) =>
+ request({
+ url: `/hardware/car/get`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ updateShopCar: (data: any) =>
+ request({
+ url: `/hardware/car/save-or-upload`,
+ method: "POST",
+ data,
+ custom: {
+ showLoading: false,
+ },
+ }),
+};
diff --git a/src/sheep/api/merchant.ts b/src/sheep/api/merchant.ts
index 23275d2..038e94a 100644
--- a/src/sheep/api/merchant.ts
+++ b/src/sheep/api/merchant.ts
@@ -1,10 +1,20 @@
import request from "@/sheep/utils/request";
export default {
- merchantList: () =>
+ page: (params: any) =>
request({
url: "/merchant/manage/page-join",
method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ detail: (params: any) =>
+ request({
+ url: "/merchant/manage/get",
+ method: "GET",
+ params,
custom: {
showLoading: false,
},
diff --git a/src/sheep/api/order.ts b/src/sheep/api/order.ts
index 8c60b54..ca2a035 100644
--- a/src/sheep/api/order.ts
+++ b/src/sheep/api/order.ts
@@ -1,3 +1,31 @@
import request from "@/sheep/utils/request";
-export default {};
+export default {
+ page: (params: any) =>
+ request({
+ url: `/hardware/order/page-join`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ detail: (params: any) =>
+ request({
+ url: `/hardware/order/get-join`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ shopCarList: (params: any) =>
+ request({
+ url: `/hardware/car/get-by-order-id`,
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+};
diff --git a/src/sheep/api/product.ts b/src/sheep/api/product.ts
index 8c60b54..91c0dd2 100644
--- a/src/sheep/api/product.ts
+++ b/src/sheep/api/product.ts
@@ -1,3 +1,11 @@
import request from "@/sheep/utils/request";
-export default {};
+export default {
+ get: (params) => {
+ return request({
+ url: "/product/spu/get-detail",
+ method: "GET",
+ params,
+ });
+ },
+};
diff --git a/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue b/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue
index eb3b346..cad5ec8 100644
--- a/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue
+++ b/src/sheep/components/base/base-just-flot-nav/base-just-flot-nav.vue
@@ -40,9 +40,11 @@ function getNavTop() {
-
-
-
+
+
+
+
+
@@ -50,19 +52,26 @@ function getNavTop() {
.navbar {
position: absolute;
left: 20rpx;
- background: #fff;
- box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
- border-radius: 28rpx;
- width: 56rpx;
- height: 56rpx;
+ height: 44px;
display: flex;
justify-content: center;
align-items: center;
- z-index: 100;
-}
-.icon {
- font-size: 32rpx;
- color: #333;
+ &_center {
+ background: #fff;
+ box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
+ border-radius: 28rpx;
+ width: 56rpx;
+ height: 56rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: 100;
+
+ &>.icon {
+ font-size: 32rpx;
+ color: #333;
+ }
+ }
}
diff --git a/src/sheep/components/crud/crud-layout/crud-layout.vue b/src/sheep/components/crud/crud-layout/crud-layout.vue
index d7ec867..68d9a90 100644
--- a/src/sheep/components/crud/crud-layout/crud-layout.vue
+++ b/src/sheep/components/crud/crud-layout/crud-layout.vue
@@ -70,7 +70,7 @@ function initBackStyle() {
case "default":
break;
case "just-flot-back":
- state.visble.topSafe = false
+ state.visble.topSafe = true
state.visble.topNav = false
break;
default:
@@ -135,7 +135,7 @@ page {
}
&_header {
- z-index: 1;
+ z-index: 100;
}
&_main {
diff --git a/src/sheep/constant/index.ts b/src/sheep/constant/index.ts
index a80bc11..949adc3 100644
--- a/src/sheep/constant/index.ts
+++ b/src/sheep/constant/index.ts
@@ -1,3 +1,5 @@
export { default as imgConstant } from "./img-constant";
+export { default as serviceEnum } from "./service-enum";
+
export { default as storageConstant } from "./storage-constant";
diff --git a/src/sheep/constant/service-enum.ts b/src/sheep/constant/service-enum.ts
new file mode 100644
index 0000000..10d6e0e
--- /dev/null
+++ b/src/sheep/constant/service-enum.ts
@@ -0,0 +1,29 @@
+const hardwareOrderStatusEnum = {
+ 1: "创建订单(未支付)",
+ 5: "已经支付",
+ 10: "退款",
+ 15: "已核销",
+};
+
+const hardwareOrderTypeEnum = {
+ 1: "线下购买",
+ 2: "线上订餐",
+ 3: "外来人员",
+ 4: "跨单位",
+};
+
+const hardwarePayTypeEnum = {
+ 1: "钱包支付",
+ 2: "钱包二维码支付",
+ 3: "钱包饭卡支付",
+ 4: "人脸识别支付",
+ 5: "跨单位二维码支付",
+ 6: "外来人员二维码支付",
+ 7: "线上订餐二维码支付",
+};
+
+export default {
+ hardwareOrderStatusEnum,
+ hardwareOrderTypeEnum,
+ hardwarePayTypeEnum,
+};
diff --git a/src/sheep/hooks/index.ts b/src/sheep/hooks/index.ts
index 0070364..810d127 100644
--- a/src/sheep/hooks/index.ts
+++ b/src/sheep/hooks/index.ts
@@ -1,3 +1,7 @@
+export * from "./use-enum";
+
+export * from "./use-img";
+
export * from "./use-page";
export * from "./use-unit";
diff --git a/src/sheep/hooks/use-enum.ts b/src/sheep/hooks/use-enum.ts
new file mode 100644
index 0000000..cb10716
--- /dev/null
+++ b/src/sheep/hooks/use-enum.ts
@@ -0,0 +1,11 @@
+import { isEmpty } from "radash";
+
+import { serviceEnum } from "../constant/index";
+
+export const useEnum = (
+ key: string | undefined,
+ value: string | number | undefined
+) => {
+ if (isEmpty(key) || isEmpty(value)) return "";
+ return serviceEnum[key!][value];
+};
diff --git a/src/sheep/hooks/use-img.ts b/src/sheep/hooks/use-img.ts
new file mode 100644
index 0000000..b62dfe9
--- /dev/null
+++ b/src/sheep/hooks/use-img.ts
@@ -0,0 +1,7 @@
+export const usePreviewImage = (str: string | undefined) => {
+ if (str == undefined) return;
+ let urlList = str.split(",");
+ uni.previewImage({
+ urls: urlList,
+ });
+};
diff --git a/src/sheep/scss/font/iconfont.scss b/src/sheep/scss/font/iconfont.scss
index cdd5fac..50639b7 100644
--- a/src/sheep/scss/font/iconfont.scss
+++ b/src/sheep/scss/font/iconfont.scss
@@ -1,9 +1,9 @@
@font-face {
font-family: "iconfont";
/* Project id 4740692 */
- src: url('//at.alicdn.com/t/c/font_4740692_ozdkialdak.woff2?t=1731275285379') format('woff2'),
- url('//at.alicdn.com/t/c/font_4740692_ozdkialdak.woff?t=1731275285379') format('woff'),
- url('//at.alicdn.com/t/c/font_4740692_ozdkialdak.ttf?t=1731275285379') format('truetype');
+ src: url('//at.alicdn.com/t/c/font_4740692_4h93hfstead.woff2?t=1731328362704') format('woff2'),
+ url('//at.alicdn.com/t/c/font_4740692_4h93hfstead.woff?t=1731328362704') format('woff'),
+ url('//at.alicdn.com/t/c/font_4740692_4h93hfstead.ttf?t=1731328362704') format('truetype');
}
.iconfont {
@@ -14,6 +14,14 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-dianhua:before {
+ content: "\e614";
+}
+
+.icon-yuding:before {
+ content: "\e649";
+}
+
.icon-xiangxiajiantouxiao:before {
content: "\e64e";
}
diff --git a/src/static/icon/guarantee.png b/src/static/icon/guarantee.png
new file mode 100644
index 0000000..6e16542
Binary files /dev/null and b/src/static/icon/guarantee.png differ
diff --git a/unocss.config.ts b/unocss.config.ts
index 09fb719..9602056 100644
--- a/unocss.config.ts
+++ b/unocss.config.ts
@@ -58,6 +58,15 @@ export default {
"line-height": `1.4em`,
}),
],
+ [
+ /^second-text-(\d+)$/,
+ ([, d]) => ({
+ "font-size": `${d}rpx`,
+ "font-weight": 500,
+ color: "#515151",
+ "line-height": `1.4em`,
+ }),
+ ],
[
"card",
{
@@ -72,14 +81,23 @@ export default {
"box-shadow": "0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1)",
},
],
+ [
+ /^show-line$/,
+ ([, d]) => ({
+ overflow: "hidden",
+ "white-space": "nowrap",
+ "text-overflow": "ellipsis",
+ }),
+ ],
[
/^show-line-(\d+)$/,
([, d]) => ({
- "text-overflow": "ellipsis",
+ display: "-webkit-box !important",
overflow: "hidden",
- display: "-webkit-box",
- "-webkit-box-orient": "vertical",
+ "text-overflow": "ellipsis !important",
+ "word-break": "break-all",
"-webkit-line-clamp": d,
+ "-webkit-box-orient": "vertical !important",
}),
],
],