diff --git a/package.json b/package.json index 5119d8d..d69e89a 100644 --- a/package.json +++ b/package.json @@ -14,13 +14,13 @@ "dependencies": { "@zxing/browser": "^0.1.5", "@zxing/library": "^0.21.3", - "axios": "1.15.0", "browser-image-compression": "^2.0.2", "echarts": "^6.0.0", "less": "^4.3.0", "pinia": "^3.0.2", "tdesign-mobile-vue": "^1.16.0", "timi-tdesign-mobile": "0.0.10", + "timi-web-api": "link:E:/WebProject/timi-web-api", "timi-web": "link:E:/WebProject/timi-web", "ts-node": "^10.9.2", "vue": "^3.5.16", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9cc9cd1..dca72ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,9 +14,6 @@ importers: '@zxing/library': specifier: ^0.21.3 version: 0.21.3 - axios: - specifier: 1.15.0 - version: 1.15.0 browser-image-compression: specifier: ^2.0.2 version: 2.0.2 @@ -38,6 +35,9 @@ importers: timi-web: specifier: link:E:/WebProject/timi-web version: link:../timi-web + timi-web-api: + specifier: link:E:/WebProject/timi-web-api + version: link:../timi-web-api ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@24.13.3)(typescript@5.8.3) @@ -789,12 +789,6 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - - axios@1.15.0: - resolution: {integrity: sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==} - balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -867,10 +861,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -964,10 +954,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -1010,10 +996,6 @@ packages: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.1.0: - resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} - engines: {node: '>= 0.4'} - esbuild@0.25.12: resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} engines: {node: '>=18'} @@ -1180,19 +1162,6 @@ packages: flatted@3.4.3: resolution: {integrity: sha512-/zipXxyO6rGvuNGDiULY9MvEGSkb2gaG4GGH4ygMi0ZZzyMHdUZBmntJmx5x1G2VuPytCwGN4xsJP6cw+sK+vQ==} - follow-redirects@1.16.0: - resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - - form-data@4.0.6: - resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} - engines: {node: '>= 6'} - forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -1248,10 +1217,6 @@ packages: resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} engines: {node: '>= 0.4'} - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - hasown@2.0.4: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} @@ -1424,18 +1389,10 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - mime-db@1.54.0: resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} engines: {node: '>= 0.6'} - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - mime-types@3.0.2: resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} engines: {node: '>=18'} @@ -1611,10 +1568,6 @@ packages: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} - proxy-from-env@2.1.0: - resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} - engines: {node: '>=10'} - prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} @@ -2699,16 +2652,6 @@ snapshots: argparse@2.0.1: {} - asynckit@0.4.0: {} - - axios@1.15.0: - dependencies: - follow-redirects: 1.16.0 - form-data: 4.0.6 - proxy-from-env: 2.1.0 - transitivePeerDependencies: - - debug - balanced-match@1.0.2: {} balanced-match@4.0.4: {} @@ -2794,10 +2737,6 @@ snapshots: color-name@1.1.4: {} - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - commander@2.20.3: optional: true @@ -2862,8 +2801,6 @@ snapshots: deep-is@0.1.4: {} - delayed-stream@1.0.0: {} - depd@2.0.0: {} diff@4.0.4: {} @@ -2898,13 +2835,6 @@ snapshots: dependencies: es-errors: 1.3.0 - es-set-tostringtag@2.1.0: - dependencies: - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - has-tostringtag: 1.0.2 - hasown: 2.0.4 - esbuild@0.25.12: optionalDependencies: '@esbuild/aix-ppc64': 0.25.12 @@ -3162,16 +3092,6 @@ snapshots: flatted@3.4.3: {} - follow-redirects@1.16.0: {} - - form-data@4.0.6: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - hasown: 2.0.4 - mime-types: 2.1.35 - forwarded@0.2.0: {} fresh@2.0.0: {} @@ -3222,10 +3142,6 @@ snapshots: has-symbols@1.1.0: {} - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.1.0 - hasown@2.0.4: dependencies: function-bind: 1.1.2 @@ -3375,14 +3291,8 @@ snapshots: braces: 3.0.3 picomatch: 2.3.2 - mime-db@1.52.0: {} - mime-db@1.54.0: {} - mime-types@2.1.35: - dependencies: - mime-db: 1.52.0 - mime-types@3.0.2: dependencies: mime-db: 1.54.0 @@ -3550,8 +3460,6 @@ snapshots: forwarded: 0.2.0 ipaddr.js: 1.9.1 - proxy-from-env@2.1.0: {} - prr@1.0.1: optional: true diff --git a/src/api/CustomerAPI.ts b/src/api/CustomerAPI.ts index b0b020d..1268937 100644 --- a/src/api/CustomerAPI.ts +++ b/src/api/CustomerAPI.ts @@ -1,4 +1,5 @@ -import { axios, type Page, type PageResult } from "timi-web"; +import { axios } from "timi-web-api"; +import type { Page, PageResult } from "timi-web-api"; import type { Customer, CustomerDailyStatView, CustomerGenderStatView, CustomerTrendStatReq } from "@/types/Customer"; import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/utils/store"; diff --git a/src/api/CustomerChartAPI.ts b/src/api/CustomerChartAPI.ts index 2cdb47e..db8c238 100644 --- a/src/api/CustomerChartAPI.ts +++ b/src/api/CustomerChartAPI.ts @@ -1,4 +1,4 @@ -import { axios } from "timi-web"; +import { axios } from "timi-web-api"; import type { CustomerChartReq } from "@/types/Customer"; import type { StoreEventRecordCalendarView, StoreEventRecordDailyStatView } from "@/types/Store"; import { withCurrentStoreId } from "@/utils/store"; diff --git a/src/api/EventAPI.ts b/src/api/EventAPI.ts index 0e817a0..6cf219a 100644 --- a/src/api/EventAPI.ts +++ b/src/api/EventAPI.ts @@ -1,4 +1,5 @@ -import { axios, type Page, type PageResult } from "timi-web"; +import { axios } from "timi-web-api"; +import type { Page, PageResult } from "timi-web-api"; import type { EventItem } from "@/types/EventItem"; import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/utils/store"; diff --git a/src/api/EventRecordAPI.ts b/src/api/EventRecordAPI.ts index c3d32a2..702f8c9 100644 --- a/src/api/EventRecordAPI.ts +++ b/src/api/EventRecordAPI.ts @@ -1,4 +1,5 @@ -import { axios, type PageResult } from "timi-web"; +import { axios } from "timi-web-api"; +import type { PageResult } from "timi-web-api"; import type { CustomerEventRankView, EventRecord, EventRecordPage, EventRecordPageResult, EventRecordRankPage } from "@/types/EventRecord"; import type { Customer } from "@/types/Customer.ts"; import { withCurrentStoreId } from "@/utils/store"; diff --git a/src/api/GaoNotifyAPI.ts b/src/api/GaoNotifyAPI.ts new file mode 100644 index 0000000..ed605c9 --- /dev/null +++ b/src/api/GaoNotifyAPI.ts @@ -0,0 +1,36 @@ +import { axios } from "timi-web-api"; +import type { Notify, Page, PageResult } from "timi-web-api"; +import type { ManagedUser } from "@/types/ManagedUser"; + +const BASE_URI = "/gao/notify"; + +type RecipientListOptions = { + storeId?: string; +}; + +async function listRecipients( + page: Page, + options?: RecipientListOptions +): Promise> { + const equalsExample = { + ...(page.equalsExample || {}) + }; + if (options?.storeId) { + equalsExample.storeId = options.storeId; + } else { + delete equalsExample.storeId; + } + return await axios.post(`${BASE_URI}/recipient/list`, { + ...page, + equalsExample + }); +} + +async function create(notify: Notify): Promise { + return await axios.post(`${BASE_URI}/create`, notify); +} + +export default { + listRecipients, + create +}; diff --git a/src/api/ManagedUserAPI.ts b/src/api/ManagedUserAPI.ts index f34e188..27ebcb6 100644 --- a/src/api/ManagedUserAPI.ts +++ b/src/api/ManagedUserAPI.ts @@ -1,4 +1,5 @@ -import { axios, type LoginResponse, type Page, type PageResult, type Role } from "timi-web"; +import { axios } from "timi-web-api"; +import type { LoginResponse, Page, PageResult, Role } from "timi-web-api"; import type { ManagedUser } from "@/types/ManagedUser"; import { withCurrentStoreId, withCurrentStorePage } from "@/utils/store"; diff --git a/src/api/PointAPI.ts b/src/api/PointAPI.ts index aaeacc7..231afed 100644 --- a/src/api/PointAPI.ts +++ b/src/api/PointAPI.ts @@ -1,4 +1,5 @@ -import { axios, type Page, type PageResult } from "timi-web"; +import { axios } from "timi-web-api"; +import type { Page, PageResult } from "timi-web-api"; import type { PointAccount, PointAccountPage, diff --git a/src/api/StoreAPI.ts b/src/api/StoreAPI.ts index aaa8460..7ab3742 100644 --- a/src/api/StoreAPI.ts +++ b/src/api/StoreAPI.ts @@ -1,4 +1,5 @@ -import { axios, type Page, type PageResult } from "timi-web"; +import { axios } from "timi-web-api"; +import type { Page, PageResult } from "timi-web-api"; import type { Store, StoreBusinessDay } from "@/types/Store"; const STORE_BASE_URI = "/gao/store"; diff --git a/src/api/StoreChartAPI.ts b/src/api/StoreChartAPI.ts index ec357e6..4d543e8 100644 --- a/src/api/StoreChartAPI.ts +++ b/src/api/StoreChartAPI.ts @@ -1,4 +1,4 @@ -import { axios } from "timi-web"; +import { axios } from "timi-web-api"; import EventAPI from "@/api/EventAPI"; import StoreAPI from "@/api/StoreAPI"; import type { CustomerDailyStatView, CustomerGenderStatView } from "@/types/Customer"; diff --git a/src/api/TagAPI.ts b/src/api/TagAPI.ts index bf200fa..ee3f05b 100644 --- a/src/api/TagAPI.ts +++ b/src/api/TagAPI.ts @@ -1,4 +1,5 @@ -import { axios, type Page, type PageResult } from "timi-web"; +import { axios } from "timi-web-api"; +import type { Page, PageResult } from "timi-web-api"; import type { Tag, TagApply, TagBizType } from "@/types/Tag"; const BASE_URI = "/gao/tag"; diff --git a/src/components/TagSelector.vue b/src/components/TagSelector.vue index 6abe840..ce7cbc3 100644 --- a/src/components/TagSelector.vue +++ b/src/components/TagSelector.vue @@ -54,7 +54,7 @@ diff --git a/src/pages/notify/NotifyManagementCreate.vue b/src/pages/notify/NotifyManagementCreate.vue new file mode 100644 index 0000000..ad6f9d9 --- /dev/null +++ b/src/pages/notify/NotifyManagementCreate.vue @@ -0,0 +1,383 @@ + + + + + diff --git a/src/pages/notify/NotifyManagementDetail.vue b/src/pages/notify/NotifyManagementDetail.vue new file mode 100644 index 0000000..40de9af --- /dev/null +++ b/src/pages/notify/NotifyManagementDetail.vue @@ -0,0 +1,416 @@ + + + + + diff --git a/src/pages/notify/component/NotifyRecipientPicker.vue b/src/pages/notify/component/NotifyRecipientPicker.vue new file mode 100644 index 0000000..0eea2f3 --- /dev/null +++ b/src/pages/notify/component/NotifyRecipientPicker.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/pages/notify/component/NotifyRecipientScopePicker.vue b/src/pages/notify/component/NotifyRecipientScopePicker.vue new file mode 100644 index 0000000..80561b8 --- /dev/null +++ b/src/pages/notify/component/NotifyRecipientScopePicker.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/pages/permission/PermissionList.vue b/src/pages/permission/PermissionList.vue index 26ffd4c..3e1cf19 100644 --- a/src/pages/permission/PermissionList.vue +++ b/src/pages/permission/PermissionList.vue @@ -32,7 +32,7 @@