From 3da220526baaf041d49f3914f562c682c3b9e1b8 Mon Sep 17 00:00:00 2001 From: fuchao <2577131060@qq.com> Date: Thu, 27 Nov 2025 15:38:07 +0800 Subject: [PATCH] revert f70fc65c24c3918245df5bf61e498c5449cd8f09 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit revert 解决冲突 --- api/config.ts | 4 +- api/modules/order.ts | 4 +- api/modules/vip.ts | 27 -- components/course/ChapterList.vue | 4 +- components/order/Confirm.vue | 33 +-- components/order/GoodsSelector.vue | 12 - components/order/ProductInfo.vue | 1 - components/video-player/index.vue | 6 +- locale/en.json | 10 +- locale/zh-Hans.json | 10 +- pages.json | 18 -- pages/course/details/course.vue | 6 +- pages/order/vipConfirm.vue | 152 ----------- pages/vip/book.vue | 400 ----------------------------- pages/vip/course.vue | 251 ------------------ stores/sys.ts | 10 - style/tailwind.css | 34 --- types/order.d.ts | 20 +- types/vip.d.ts | 27 -- utils/index.ts | 55 ---- 20 files changed, 33 insertions(+), 1051 deletions(-) delete mode 100644 api/modules/vip.ts delete mode 100644 pages/order/vipConfirm.vue delete mode 100644 pages/vip/book.vue delete mode 100644 types/vip.d.ts diff --git a/api/config.ts b/api/config.ts index 1805be1..741930c 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/order.ts b/api/modules/order.ts index e8f0bad..b933e21 100644 --- a/api/modules/order.ts +++ b/api/modules/order.ts @@ -145,10 +145,10 @@ export const orderApi = { }, /** - * 创建订单 + * 创建课程订单 * @param data 订单数据 */ - async placeOrder(data: ICourseOrderCreateParams) { + async placeCourseOrder(data: ICourseOrderCreateParams) { const res = await mainClient.request>({ url: 'book/buyOrder/placeOrder', method: 'POST', diff --git a/api/modules/vip.ts b/api/modules/vip.ts deleted file mode 100644 index 9bae87a..0000000 --- a/api/modules/vip.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { mainClient } from '@/api/clients/main' -import type { IApiResponse } from '@/api/types' -import type { IVipItem } from '@/types/vip' - -export const vipApi = { - /** - * 获取VIP购买配置列表 - */ - getVipBuyConfigList: async () => { - const res = await mainClient.request>({ - url: 'common/userVip/getVipBuyConfigList', - method: 'POST' - }) - return res - }, - - /** - * 获取图书VIP列表 - */ - getBookVipList: async () => { - const res = await mainClient.request>({ - url: 'bookAbroad/ebookvip/getEbookvipBuyConfigList', - method: 'POST' - }) - return res - } -} \ No newline at end of file diff --git a/components/course/ChapterList.vue b/components/course/ChapterList.vue index e13d742..8a3eaf0 100644 --- a/components/course/ChapterList.vue +++ b/components/course/ChapterList.vue @@ -259,7 +259,9 @@ const handleChapterClick = (chapter: IChapter) => { border-bottom-left-radius: 40rpx; .vip-badge { - display: inline-block; + position: absolute; + left: 0; + top: 0; font-size: 24rpx; background: linear-gradient(90deg, #6429db 0%, #0075ed 100%); color: #fff; diff --git a/components/order/Confirm.vue b/components/order/Confirm.vue index 498a0ce..46af04e 100644 --- a/components/order/Confirm.vue +++ b/components/order/Confirm.vue @@ -124,28 +124,22 @@ - - \ No newline at end of file diff --git a/pages/vip/book.vue b/pages/vip/book.vue deleted file mode 100644 index 487996f..0000000 --- a/pages/vip/book.vue +++ /dev/null @@ -1,400 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/vip/course.vue b/pages/vip/course.vue index ca81208..e69de29 100644 --- a/pages/vip/course.vue +++ b/pages/vip/course.vue @@ -1,251 +0,0 @@ - - - - - \ No newline at end of file diff --git a/stores/sys.ts b/stores/sys.ts index b935162..711269c 100644 --- a/stores/sys.ts +++ b/stores/sys.ts @@ -6,16 +6,6 @@ import type { IUserInfo } from '@/types/user' export const useSysStore = defineStore('sys', { state: (): IUserInfo => ({ language: uni.getStorageSync('appLanguage') || 'zh-CN', - vipTypeDict: { - 1: '医学超V', - 2: '国学与心理学超V', - 4: '中医学VIP', - 5: '针灸学VIP', - 6: '肿瘤学VIP', - 7: '国学VIP', - 8: '心理学VIP', - 9: '中西汇通学VIP', - } }), getters: { diff --git a/style/tailwind.css b/style/tailwind.css index 5d949ea..7e51e61 100644 --- a/style/tailwind.css +++ b/style/tailwind.css @@ -9,7 +9,6 @@ "Courier New", monospace; --color-red-500: oklch(63.7% 0.237 25.331); --spacing: 0.25rem; - --font-weight-bold: 700; --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); @@ -205,18 +204,9 @@ max-width: 96rem; } } - .mr-1 { - margin-right: calc(var(--spacing) * 1); - } - .ml-1 { - margin-left: calc(var(--spacing) * 1); - } .ml-1\! { margin-left: calc(var(--spacing) * 1) !important; } - .ml-2 { - margin-left: calc(var(--spacing) * 2); - } .ml-2\.5\! { margin-left: calc(var(--spacing) * 2.5) !important; } @@ -253,9 +243,6 @@ .flex-shrink { flex-shrink: 1; } - .border-collapse { - border-collapse: collapse; - } .transform { transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); } @@ -278,18 +265,9 @@ .bg-\[transparent\] { background-color: transparent; } - .pt-1 { - padding-top: calc(var(--spacing) * 1); - } - .pt-10 { - padding-top: calc(var(--spacing) * 10); - } .pt-\[40px\] { padding-top: 40px; } - .pb-0 { - padding-bottom: calc(var(--spacing) * 0); - } .pb-0\! { padding-bottom: calc(var(--spacing) * 0) !important; } @@ -299,10 +277,6 @@ .text-right { text-align: right; } - .font-bold { - --tw-font-weight: var(--font-weight-bold); - font-weight: var(--font-weight-bold); - } .text-\[\#000\] { color: #000; } @@ -325,9 +299,6 @@ --tw-ordinal: ordinal; font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,); } - .underline { - text-decoration-line: underline; - } .ring { --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); @@ -397,10 +368,6 @@ inherits: false; initial-value: solid; } -@property --tw-font-weight { - syntax: "*"; - inherits: false; -} @property --tw-ordinal { syntax: "*"; inherits: false; @@ -593,7 +560,6 @@ --tw-skew-x: initial; --tw-skew-y: initial; --tw-border-style: solid; - --tw-font-weight: initial; --tw-ordinal: initial; --tw-slashed-zero: initial; --tw-numeric-figure: initial; diff --git a/types/order.d.ts b/types/order.d.ts index 51866ef..c9ca508 100644 --- a/types/order.d.ts +++ b/types/order.d.ts @@ -4,12 +4,12 @@ export interface IGoods { productId: number productName: string - productImages?: string + productImages: string price: number - vipPrice?: number | null - activityPrice?: number | null - isVipPrice?: number // 是否有VIP优惠 0-否 1-是 - productAmount?: number // 购买数量 + vipPrice: number | null + activityPrice: number | null + isVipPrice: number // 是否有VIP优惠 0-否 1-是 + productAmount: number // 购买数量 delFlag?: number // 删除标记 -1-已下架 } @@ -39,12 +39,12 @@ export interface IOrder { export interface IOrderGoods { productId: number productName: string - productImages?: string + productImages: string price: number - vipPrice?: number | null - activityPrice?: number | null - isVipPrice?: number // 是否有VIP优惠 0-否 1-是 - productAmount?: number // 购买数量 + vipPrice: number | null + activityPrice: number | null + isVipPrice: number // 是否有VIP优惠 0-否 1-是 + productAmount: number // 购买数量 goodsType: string // 商品类型 "05" for course } diff --git a/types/vip.d.ts b/types/vip.d.ts deleted file mode 100644 index b1153ae..0000000 --- a/types/vip.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * vip套餐项 - */ -export interface IVipItem { - courseCount: number | null // 课程数量 - state: number | null // 状态 0:在有效期, 1:已过期, null: 未购买 - originalPrice: number | null // 原价 - title: string // 套餐名称 - type: number - vcbList?: IVipItemProduct[] // 未办理过使用的商品列表 - yanqiList?: IVipItemProduct[] // 延期使用商品列表 - [key: string]: any -} - -/** - * vip套餐项商品 - */ -export interface IVipItemProduct { - id: number - type: number - title: string - year: number // vip年数 - rebateFee: number | null, // 折扣后价格 - fee: number | null, // 课程价格 - lastFee?: number | null, // 未使用字段 - [key: string]: any -} \ No newline at end of file diff --git a/utils/index.ts b/utils/index.ts index 5c30fb8..8d31e23 100644 --- a/utils/index.ts +++ b/utils/index.ts @@ -1,7 +1,6 @@ import { t } from '@/utils/i18n' /** * 页面跳转 - * @param {string} path - 要跳转的页面路径 */ export const onPageJump = (path: string) => { uni.navigateTo({ @@ -18,8 +17,6 @@ export const onPageBack = () => { /** * 拨打电话 - * @param {string} phoneNumber - 要拨打的电话号码 - * @param {string} title - 拨打电话提示的标题,默认值为空字符串 */ export const makePhoneCall = (phoneNumber: string, title: string = '') => { uni.showModal({ @@ -45,8 +42,6 @@ export const makePhoneCall = (phoneNumber: string, title: string = '') => { /** * 复制到剪贴板 - * @param {string} content - 要复制的内容 - * @param {string} title - 复制成功提示的标题,默认值为空字符串 */ export const copyToClipboard = (content: string, title: string = '') => { uni.setClipboardData({ @@ -65,8 +60,6 @@ export const copyToClipboard = (content: string, title: string = '') => { /** * 计算最低价格 - * @param {object} priceData - 价格数据对象,键为价格类型,值为价格 - * @returns {object} - 包含最低价格的键值对,{ key: 价格类型, value: 最低价格 } */ export const calculateLowestPrice = (priceData: object): { key: string, value: number } => { const validEntries = Object.entries(priceData) @@ -81,52 +74,4 @@ export const calculateLowestPrice = (priceData: object): { key: string, value: n ); return { key: minKey, value: minValue }; -} - -/** - * Parse the time to string - * @param {(Object|string|number)} time - * @param {string} cFormat - * @returns {string | null} - */ -export function parseTime(time: any, cFormat: string) { - if (arguments.length === 0 || !time) { - return null - } - const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' - let date - if (typeof time === 'object') { - date = time - } else { - if ((typeof time === 'string')) { - if ((/^[0-9]+$/.test(time))) { - // support "1548221490638" - time = parseInt(time) - } else { - // support safari - time = time.replace(new RegExp(/-/gm), '/') - } - } - - if ((typeof time === 'number') && (time.toString().length === 10)) { - time = time * 1000 - } - date = new Date(time) - } - const formatObj = { - y: date.getFullYear(), - m: date.getMonth() + 1, - d: date.getDate(), - h: date.getHours(), - i: date.getMinutes(), - s: date.getSeconds(), - a: date.getDay() - } - const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => { - const value = formatObj[key as keyof typeof formatObj] - // Note: getDay() returns 0 on Sunday - if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value as number] } - return value.toString().padStart(2, '0') - }) - return time_str } \ No newline at end of file