From 63765571497962e3d9d7ccd004d384b77fc82c4b Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 19 Nov 2025 09:36:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=8A=B6=E6=80=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8C=81=E4=B9=85=E5=8C=96=E6=8F=92=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9=EF=BC=8C=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=BA=E5=85=AC=E5=85=B1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../my-components/my-hour-area.vue | 0 .../my-components/my-time-area.vue | 0 .../my-components/my-week-sel.vue | 0 main.js | 7 +- package.json | 1 + pageMarket/discountActivity/add.vue | 16 +- .../components/bottom-btn-group.vue | 29 -- pages/appliccation/marketing.vue | 340 +++++++++++------- pnpm-lock.yaml | 8 + store/menus.js | 4 +- 10 files changed, 231 insertions(+), 174 deletions(-) rename pageMarket/discountActivity/components/hour-area.vue => components/my-components/my-hour-area.vue (100%) rename pageMarket/discountActivity/components/time-area.vue => components/my-components/my-time-area.vue (100%) rename pageMarket/discountActivity/components/week-sel.vue => components/my-components/my-week-sel.vue (100%) delete mode 100644 pageMarket/discountActivity/components/bottom-btn-group.vue diff --git a/pageMarket/discountActivity/components/hour-area.vue b/components/my-components/my-hour-area.vue similarity index 100% rename from pageMarket/discountActivity/components/hour-area.vue rename to components/my-components/my-hour-area.vue diff --git a/pageMarket/discountActivity/components/time-area.vue b/components/my-components/my-time-area.vue similarity index 100% rename from pageMarket/discountActivity/components/time-area.vue rename to components/my-components/my-time-area.vue diff --git a/pageMarket/discountActivity/components/week-sel.vue b/components/my-components/my-week-sel.vue similarity index 100% rename from pageMarket/discountActivity/components/week-sel.vue rename to components/my-components/my-week-sel.vue diff --git a/main.js b/main.js index 4e9d56d..ccd5728 100644 --- a/main.js +++ b/main.js @@ -7,6 +7,9 @@ import dict from '@/commons/utils/dict.js' import {utils} from '@/commons/utils/index.js' import uviewPlus from 'uview-plus' import * as Pinia from 'pinia'; +import { + createUnistorage +} from "pinia-plugin-unistorage"; // 设置node环境 envConfig.changeEnv(storageManage.env()) @@ -39,7 +42,9 @@ export function createApp() { const app = createSSRApp(App) app.use(uviewPlus) - app.use(Pinia.createPinia()); + const store = Pinia.createPinia(); + store.use(createUnistorage()); + app.use(store) app.config.globalProperties.$appName = appConfig.appName uni.$appName = appConfig.appName app.config.globalProperties.$utils = utils diff --git a/package.json b/package.json index 36620ed..93b0524 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "jsbn": "^1.1.0", "jsencrypt": "^3.3.2", "lodash": "^4.17.21", + "pinia-plugin-unistorage": "^0.1.2", "to-arraybuffer": "^1.0.1", "uview-plus": "^3.3.32", "ysk-utils": "^1.0.78" diff --git a/pageMarket/discountActivity/add.vue b/pageMarket/discountActivity/add.vue index ef5e552..7d82407 100644 --- a/pageMarket/discountActivity/add.vue +++ b/pageMarket/discountActivity/add.vue @@ -41,10 +41,10 @@ 活动日期 - + > @@ -53,7 +53,7 @@ 可用周期 - + @@ -61,11 +61,11 @@ 指定时间段 - + > @@ -144,15 +144,11 @@ > - + diff --git a/pages/appliccation/marketing.vue b/pages/appliccation/marketing.vue index 4c2a5cb..5a1fae2 100644 --- a/pages/appliccation/marketing.vue +++ b/pages/appliccation/marketing.vue @@ -1,154 +1,228 @@ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c4f611e..7a3a632 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,9 @@ importers: lodash: specifier: ^4.17.21 version: 4.17.21 + pinia-plugin-unistorage: + specifier: ^0.1.2 + version: 0.1.2 to-arraybuffer: specifier: ^1.0.1 version: 1.0.1 @@ -534,6 +537,9 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + pinia-plugin-unistorage@0.1.2: + resolution: {integrity: sha512-WXit2cGnm5rG6CDTcLSLehNWhyJS/Yq7WEeeXAapZbCnqoPJxlszqg7rT8S+OP47az0h5nlajGo+LuyMxUQ2uw==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -1147,6 +1153,8 @@ snapshots: picomatch@2.3.1: {} + pinia-plugin-unistorage@0.1.2: {} + punycode@2.3.1: {} queue-microtask@1.2.3: {} diff --git a/store/menus.js b/store/menus.js index 5f44d1a..f0948f0 100644 --- a/store/menus.js +++ b/store/menus.js @@ -64,4 +64,6 @@ export const useMenusStore = defineStore('menus', { } }, -}); \ No newline at end of file + unistorage: true, // 开启后对 state 的数据读写都将持久化 +} +); \ No newline at end of file