diff --git a/components/order/GoodsSelector.vue b/components/order/GoodsSelector.vue index 1f00c70..0f3a675 100644 --- a/components/order/GoodsSelector.vue +++ b/components/order/GoodsSelector.vue @@ -9,7 +9,7 @@ {{ goods[selectedIndex].productName }} - NZ$ {{ selectedGoodsPrice }} + {{ selectedGoodsPrice }} 天医币 @@ -30,21 +30,21 @@ - NZ$ {{ parseFloat(item.vipPrice).toFixed(2) }} + {{ parseFloat(item.vipPrice).toFixed(2) }} 天医币 VIP到手价 - NZ$ {{ parseFloat(item.price).toFixed(2) }} + {{ parseFloat(item.price).toFixed(2) }} 天医币 - NZ$ {{ parseFloat(item.activityPrice).toFixed(2) }} + {{ parseFloat(item.activityPrice).toFixed(2) }} 天医币 活动价 - NZ$ {{ parseFloat(item.price).toFixed(2) }} + {{ parseFloat(item.price).toFixed(2) }} 天医币 - NZ$ {{ parseFloat(item.price).toFixed(2) }} + {{ parseFloat(item.price).toFixed(2) }} 天医币 diff --git a/components/order/ProductInfo.vue b/components/order/ProductInfo.vue new file mode 100644 index 0000000..2ef02a4 --- /dev/null +++ b/components/order/ProductInfo.vue @@ -0,0 +1,110 @@ + + + + + \ No newline at end of file diff --git a/package.json b/package.json index e40383c..2c41b17 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "太湖国际", "中医学 国学 心理学" ], - "scripts": { + "scripts": { "tailwind-dev": "npx @tailwindcss/cli -i ./tailwind-input.css -o ./style/tailwind.css --watch", "tailwind-build": "npx @tailwindcss/cli -i ./tailwind-input.css -o ./style/tailwind.css" - }, + }, "dcloudext": { "sale": { "regular": { diff --git a/pages/book/detail.vue b/pages/book/detail.vue index 9541d61..affc6d1 100644 --- a/pages/book/detail.vue +++ b/pages/book/detail.vue @@ -238,7 +238,7 @@ async function loadBookInfo() { productId: bookId.value, productName: bookInfo.value.name, productImages: bookInfo.value.images, - price: bookInfo.value.priceData?.dictValue || 0, + price: bookInfo.value.abroadPrice || 0, vipPrice: null, activityPrice: null, isVipPrice: 0, diff --git a/pages/book/index.vue b/pages/book/index.vue index 584db7e..5fb4c92 100644 --- a/pages/book/index.vue +++ b/pages/book/index.vue @@ -162,9 +162,7 @@ > {{ item.name }} - {{ - formatPrice(item) - }} + {{ item.abroadPrice }} 天医币 {{ formatStats(item) }} diff --git a/pages/order/confirmOrder.vue b/pages/order/confirmOrder.vue new file mode 100644 index 0000000..e69de29 diff --git a/pages/user/order/index.vue b/pages/user/order/index.vue index be873ad..bea0649 100644 --- a/pages/user/order/index.vue +++ b/pages/user/order/index.vue @@ -10,34 +10,32 @@ - - - {{ order.bookEntity.name }} - - - - {{ order.orderMoney }} - NZD + + + + + + + + + 实付款:{{ order.orderMoney }} 天医币 + + + @@ -45,8 +43,10 @@ diff --git a/static/jifen.png b/static/jifen.png new file mode 100644 index 0000000..5319e4d Binary files /dev/null and b/static/jifen.png differ diff --git a/static/vip.png b/static/vip.png new file mode 100644 index 0000000..7c4c724 Binary files /dev/null and b/static/vip.png differ diff --git a/style/tailwind.css b/style/tailwind.css index b734602..057e99a 100644 --- a/style/tailwind.css +++ b/style/tailwind.css @@ -8,6 +8,8 @@ --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-white: #fff; + --spacing: 0.25rem; --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); @@ -203,6 +205,30 @@ max-width: 96rem; } } + .\!ml-2 { + margin-left: calc(var(--spacing) * 2) !important; + } + .\!ml-12 { + margin-left: calc(var(--spacing) * 12) !important; + } + .\!ml-\[10px\] { + margin-left: 10px !important; + } + .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; + } + .ml-12 { + margin-left: calc(var(--spacing) * 12); + } .block { display: block; } @@ -236,6 +262,9 @@ .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,); } @@ -249,6 +278,9 @@ border-style: var(--tw-border-style); border-width: 1px; } + .bg-\[\#e55f18\] { + background-color: #e55f18; + } .bg-\[blue\] { background-color: blue; } @@ -258,6 +290,9 @@ .bg-\[transparent\] { background-color: transparent; } + .bg-red-500 { + background-color: var(--color-red-500); + } .pt-\[40px\] { padding-top: 40px; } @@ -273,6 +308,9 @@ .text-\[red\] { color: red; } + .text-white { + color: var(--color-white); + } .lowercase { text-transform: lowercase; } @@ -283,6 +321,9 @@ --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); diff --git a/tailwind.config.js b/tailwind.config.js index f7231b3..b5d2c11 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -15,10 +15,10 @@ module.exports = { // 指定要处理的文件 content: [ - './pages/**/*.{vue,js}', - './components/**/*.{vue,js}', - './main.js', - './App.vue', + './pages/**/*.{vue,js,ts}', + './components/**/*.{vue,js,ts}', + './main.js', + './App.vue', './index.html' ], theme: { diff --git a/types/order.d.ts b/types/order.d.ts index d42e550..764c247 100644 --- a/types/order.d.ts +++ b/types/order.d.ts @@ -13,6 +13,18 @@ export interface IGoods { delFlag?: number // 删除标记 -1-已下架 } +/** + * 订单接口 + */ +export interface IOrder { + id: number + orderSn: string + orderMoney: number + paymentMethod: string // '4'-虚拟货币, '5'-真实货币 + createTime: string + [key: string]: any +} + /** * 订单创建参数接口 */ diff --git a/types/user.ts b/types/user.ts index e319a5e..4497965 100644 --- a/types/user.ts +++ b/types/user.ts @@ -68,23 +68,6 @@ export interface IVipInfo { [key: string]: any } -/** - * 订单接口 - */ -export interface IOrder { - id: number - orderSn: string - bookEntity: { - id: number - name: string - images: string - } - orderMoney: number - paymentMethod: string // '4'-虚拟货币, '5'-真实货币 - createTime: string - [key: string]: any -} - /** * VIP套餐接口 */ diff --git a/utils/index.ts b/utils/index.ts index 7e6f05a..dbb5a0f 100644 --- a/utils/index.ts +++ b/utils/index.ts @@ -43,7 +43,7 @@ export const makePhoneCall = (phoneNumber: string, title: string) => { /** * 复制到剪贴板 */ -export const copyToClipboard = (content: string, title: string, t: Function) => { +export const copyToClipboard = (content: string, title: string = '') => { uni.setClipboardData({ data: content, success: () => { @@ -52,7 +52,7 @@ export const copyToClipboard = (content: string, title: string, t: Function) => icon: 'none' }) }, - fail: (error) => { + fail: (error: any) => { console.error('复制失败:', error) } })