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