From 943cc862fcf018a101269f961ed07b723d1c7a36 Mon Sep 17 00:00:00 2001 From: chenghuan Date: Thu, 9 Apr 2026 13:29:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD=E5=8F=8A=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/config.ts | 4 +- api/modules/common.ts | 14 ++++++ components/advertisement/advertisement.vue | 38 +++++++++++++++ manifest.json | 4 +- package.json | 2 +- pages/course/index.vue | 3 ++ pages/user/index.vue | 4 +- style/tailwind.css | 57 +++++++++++++++++++++- 8 files changed, 117 insertions(+), 9 deletions(-) create mode 100644 components/advertisement/advertisement.vue diff --git a/api/config.ts b/api/config.ts index 66c7334..05222cb 100644 --- a/api/config.ts +++ b/api/config.ts @@ -7,8 +7,8 @@ export const ENV = process.env.NODE_ENV || 'development'; */ const BASE_URL_MAP = { development: { - //MAIN: 'http://192.168.110.100:9300/pb/', // 张川川 - MAIN: 'https://global.nuttyreading.com/', // 线上 + // MAIN: 'http://192.168.110.100:9300/pb/', // 张川川 + MAIN: 'https://global.nuttyreading.com/', // 线上 // PAYMENT: 'https://dev-pay.example.com', // 暂时用不到 // CDN: 'https://cdn-dev.example.com', // 暂时用不到 }, diff --git a/api/modules/common.ts b/api/modules/common.ts index 564d8ae..065d7f8 100644 --- a/api/modules/common.ts +++ b/api/modules/common.ts @@ -41,5 +41,19 @@ export const commonApi = { method: 'POST', data: { isBook, isMedical, isSociology } }) + }, + + /** + * 获取广告列表 + * @param params + * @param params.type 应用类型 10-吴门国际 + * @returns 广告列表 + */ + getAdvertisementList: async (params: any) => { + return skeletonClient.request({ + url: 'common/mainAd/getMainAd', + method: 'POST', + data: params + }) } } diff --git a/components/advertisement/advertisement.vue b/components/advertisement/advertisement.vue new file mode 100644 index 0000000..e77c2cf --- /dev/null +++ b/components/advertisement/advertisement.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/manifest.json b/manifest.json index ec97754..3a61a0b 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "appid" : "__UNI__1250B39", "description" : "吴门国际", "sassImplementationName" : "node-sass", - "versionName" : "1.1.17", - "versionCode" : 1117, + "versionName" : "1.1.18", + "versionCode" : 1118, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/package.json b/package.json index c2d6b59..141ecfb 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ }, "dependencies": { "@tailwindcss/cli": "^4.1.16", - "edu-core-vue3": "file: ../edu-core-vue3", + "edu-core-vue3": "file:../edu-core-vue3", "pinia": "3.0.2", "vue": "3.5.24", "vue-i18n": "11.2.1" diff --git a/pages/course/index.vue b/pages/course/index.vue index 138db14..35c3b4e 100644 --- a/pages/course/index.vue +++ b/pages/course/index.vue @@ -215,6 +215,8 @@ + + @@ -228,6 +230,7 @@ import { getNotchHeight } from '@/utils/system' // import { onPageJump } from '@/utils' import type { ICategory, ICourse, INews } from '@/types/course' import { useUserStore } from '@/stores/user' +import Advertisement from '@/components/advertisement/advertisement.vue' const userStore = useUserStore() diff --git a/pages/user/index.vue b/pages/user/index.vue index d9dbc22..7289e99 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -75,9 +75,7 @@ {{hufenData?.total ?? 0}}湖分 - 前往测试 + 测试页 diff --git a/style/tailwind.css b/style/tailwind.css index 3556f07..151d500 100644 --- a/style/tailwind.css +++ b/style/tailwind.css @@ -1,4 +1,4 @@ -/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */ +/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */ @layer properties; @layer theme, base, components, utilities; @layer theme { @@ -8,6 +8,7 @@ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-500: oklch(63.7% 0.237 25.331); + --color-black: #000; --color-white: #fff; --spacing: 0.25rem; --text-xs: 0.75rem; @@ -194,6 +195,24 @@ .sticky { position: sticky; } + .start { + inset-inline-start: var(--spacing); + } + .end { + inset-inline-end: var(--spacing); + } + .top-0 { + top: calc(var(--spacing) * 0); + } + .right-0 { + right: calc(var(--spacing) * 0); + } + .left-0 { + left: calc(var(--spacing) * 0); + } + .z-\[99999\] { + z-index: 99999; + } .container { width: 100%; @media (width >= 40rem) { @@ -260,12 +279,18 @@ .h-100 { height: calc(var(--spacing) * 100); } + .h-\[100vh\] { + height: 100vh; + } .w-\[50\%\] { width: 50%; } .w-\[100px\] { width: 100px; } + .w-full { + width: 100%; + } .flex-1 { flex: 1; } @@ -287,16 +312,34 @@ .rounded-\[10rpx\] { border-radius: 10rpx; } + .rounded-full { + border-radius: calc(infinity * 1px); + } .border { border-style: var(--tw-border-style); border-width: 1px; } + .bg-black\/50 { + background-color: color-mix(in srgb, #000 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-black) 50%, transparent); + } + } .bg-white { background-color: var(--color-white); } + .bg-white\/30 { + background-color: color-mix(in srgb, #fff 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-white) 30%, transparent); + } + } .p-0\! { padding: calc(var(--spacing) * 0) !important; } + .p-10 { + padding: calc(var(--spacing) * 10); + } .p-\[10rpx\] { padding: 10rpx; } @@ -306,9 +349,18 @@ .p-\[30rpx\] { padding: 30rpx; } + .px-5 { + padding-inline: calc(var(--spacing) * 5); + } + .py-2 { + padding-block: calc(var(--spacing) * 2); + } .pt-1 { padding-top: calc(var(--spacing) * 1); } + .pt-5 { + padding-top: calc(var(--spacing) * 5); + } .pt-10 { padding-top: calc(var(--spacing) * 10); } @@ -355,6 +407,9 @@ .text-red-500 { color: var(--color-red-500); } + .text-white { + color: var(--color-white); + } .lowercase { text-transform: lowercase; }