From 983674cfc9ba160867b255aef5e58766f21eb2ab Mon Sep 17 00:00:00 2001 From: code <2388224167@qq.com> Date: Tue, 12 Nov 2024 04:33:34 +0800 Subject: [PATCH] 111 --- package.json | 1 + pnpm-lock.yaml | 8 + src/App.vue | 16 ++ src/pages.json | 38 +++++ src/pages/apply/stride-apply.vue | 11 ++ src/pages/apply/stride-items.vue | 72 +++++++++ src/pages/apply/stride-list.vue | 1 + src/pages/merchant/components/product-row.vue | 27 ++++ src/pages/merchant/detail.vue | 132 +++++++++++++++++ src/pages/merchant/index.vue | 33 +++++ src/pages/merchant/product-detail.vue | 71 +++++++++ src/pages/order/detail.vue | 140 ++++++++++++++++++ src/pages/tabbar/food.vue | 34 ++++- src/pages/tabbar/home.vue | 38 ++++- src/pages/tabbar/order.vue | 110 ++++++++++++-- src/sheep/api/food.ts | 48 +++++- src/sheep/api/merchant.ts | 12 +- src/sheep/api/order.ts | 30 +++- src/sheep/api/product.ts | 10 +- .../base-just-flot-nav/base-just-flot-nav.vue | 35 +++-- .../crud/crud-layout/crud-layout.vue | 4 +- src/sheep/constant/index.ts | 2 + src/sheep/constant/service-enum.ts | 29 ++++ src/sheep/hooks/index.ts | 4 + src/sheep/hooks/use-enum.ts | 11 ++ src/sheep/hooks/use-img.ts | 7 + src/sheep/scss/font/iconfont.scss | 14 +- src/static/icon/guarantee.png | Bin 0 -> 17554 bytes unocss.config.ts | 24 ++- 29 files changed, 913 insertions(+), 49 deletions(-) create mode 100644 src/pages/apply/stride-items.vue create mode 100644 src/pages/merchant/components/product-row.vue create mode 100644 src/pages/merchant/detail.vue create mode 100644 src/pages/merchant/index.vue create mode 100644 src/pages/merchant/product-detail.vue create mode 100644 src/pages/order/detail.vue create mode 100644 src/sheep/constant/service-enum.ts create mode 100644 src/sheep/hooks/use-enum.ts create mode 100644 src/sheep/hooks/use-img.ts create mode 100644 src/static/icon/guarantee.png 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 @@ + + + + + + \ 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 () => { +