diff --git a/README.md b/README.md index d8cc564..106c318 100644 --- a/README.md +++ b/README.md @@ -10,32 +10,3 @@ - Tailwind Css - Element Plus -# 运行截图 - -## 首页 -![img.png](public/md/index.png) - -## 商品模态框 -![img.png](public/md/product-modal.png) - -## 商品详情 -![img.png](public/md/product-detail.png) - -## 商品介绍图(长图片) -![img.png](public/md/product-detail-lang-image.png) - -## 购物车 -![img.png](public/md/shopping-cart.png) - -## 个人中心 -![img.png](public/md/my1.png) - -![img.png](public/md/my2.png) - -![img.png](public/md/my3.png) - -![img.png](public/md/my4.png) - -![img.png](public/md/my5.png) - -![img.png](public/md/order.png) \ No newline at end of file diff --git a/package.json b/package.json index e24f186..b81517a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@element-plus/icons-vue": "^2.3.1", "@tailwindcss/vite": "^4.1.4", "@vueuse/head": "^2.0.0", + "animate": "^1.0.0", "ant-design-vue": "^4.1.1", "axios": "^1.6.2", "element-plus": "^2.9.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e411901..85bd677 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ importers: '@vueuse/head': specifier: ^2.0.0 version: 2.0.0(vue@3.5.13) + animate: + specifier: ^1.0.0 + version: 1.0.0 ant-design-vue: specifier: ^4.1.1 version: 4.2.6(vue@3.5.13) @@ -643,6 +646,9 @@ packages: '@vueuse/shared@9.13.0': resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==} + animate@1.0.0: + resolution: {integrity: sha512-6QCwoJWDiE2Lm/jZAybrobHOHQgzhieBv9NSfUmErgk//FlC3pmIeqP27EXM+bSdiDizVDLckipwICpnC5Jwdw==} + ant-design-vue@4.2.6: resolution: {integrity: sha512-t7eX13Yj3i9+i5g9lqFyYneoIb3OzTvQjq9Tts1i+eiOd3Eva/6GagxBSXM1fOCjqemIu0FYVE1ByZ/38epR3Q==} engines: {node: '>=12.22.0'} @@ -708,6 +714,9 @@ packages: dom-scroll-into-view@2.0.1: resolution: {integrity: sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==} + dom-walk@0.1.2: + resolution: {integrity: sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -793,6 +802,9 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + global@4.3.2: + resolution: {integrity: sha512-/4AybdwIDU4HkCUbJkZdWpe4P6vuw/CUtu+0I1YlLIPe7OlUO7KNJ+q/rO70CW2/NW6Jc6I62++Hzsf5Alu6rQ==} + gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -949,6 +961,9 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + min-document@2.19.0: + resolution: {integrity: sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==} + nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -993,9 +1008,16 @@ packages: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} + process@0.5.2: + resolution: {integrity: sha512-oNpcutj+nYX2FjdEW7PGltWhXulAnFlM0My/k48L90hARCOJtvBbQXc/6itV2jDvU5xAAtonP+r6wmQgCcbAUA==} + engines: {node: '>= 0.6.0'} + proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + rafl@1.2.2: + resolution: {integrity: sha512-07d7yVpYE23jwMnJDrU5j/Ra2HzDUgyioKpdwzNVpfK0XN66zbjvny7EjiB/MFzPWk7tyq140mnXufpow4I42A==} + readdirp@4.1.2: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} @@ -1587,6 +1609,10 @@ snapshots: - '@vue/composition-api' - vue + animate@1.0.0: + dependencies: + rafl: 1.2.2 + ant-design-vue@4.2.6(vue@3.5.13): dependencies: '@ant-design/colors': 6.0.0 @@ -1664,6 +1690,8 @@ snapshots: dom-scroll-into-view@2.0.1: {} + dom-walk@0.1.2: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -1786,6 +1814,11 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.1 + global@4.3.2: + dependencies: + min-document: 2.19.0 + process: 0.5.2 + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -1904,6 +1937,10 @@ snapshots: dependencies: mime-db: 1.52.0 + min-document@2.19.0: + dependencies: + dom-walk: 0.1.2 + nanoid@3.3.11: {} nanopop@2.4.2: {} @@ -1938,8 +1975,14 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + process@0.5.2: {} + proxy-from-env@1.1.0: {} + rafl@1.2.2: + dependencies: + global: 4.3.2 + readdirp@4.1.2: {} resize-observer-polyfill@1.5.1: {} diff --git a/public/md/index.png b/public/md/index.png deleted file mode 100644 index 21e58db..0000000 Binary files a/public/md/index.png and /dev/null differ diff --git a/public/md/my1.png b/public/md/my1.png deleted file mode 100644 index 432bdf1..0000000 Binary files a/public/md/my1.png and /dev/null differ diff --git a/public/md/my2.png b/public/md/my2.png deleted file mode 100644 index 2b7e529..0000000 Binary files a/public/md/my2.png and /dev/null differ diff --git a/public/md/my3.png b/public/md/my3.png deleted file mode 100644 index 5d9d984..0000000 Binary files a/public/md/my3.png and /dev/null differ diff --git a/public/md/my4.png b/public/md/my4.png deleted file mode 100644 index 73efc61..0000000 Binary files a/public/md/my4.png and /dev/null differ diff --git a/public/md/my5.png b/public/md/my5.png deleted file mode 100644 index ceb35bf..0000000 Binary files a/public/md/my5.png and /dev/null differ diff --git a/public/md/order.png b/public/md/order.png deleted file mode 100644 index 5274bdd..0000000 Binary files a/public/md/order.png and /dev/null differ diff --git a/public/md/product-detail-lang-image.png b/public/md/product-detail-lang-image.png deleted file mode 100644 index d0589a4..0000000 Binary files a/public/md/product-detail-lang-image.png and /dev/null differ diff --git a/public/md/product-detail.png b/public/md/product-detail.png deleted file mode 100644 index 8168800..0000000 Binary files a/public/md/product-detail.png and /dev/null differ diff --git a/public/md/product-modal.png b/public/md/product-modal.png deleted file mode 100644 index c65470d..0000000 Binary files a/public/md/product-modal.png and /dev/null differ diff --git a/public/md/shopping-cart.png b/public/md/shopping-cart.png deleted file mode 100644 index a05acb5..0000000 Binary files a/public/md/shopping-cart.png and /dev/null differ diff --git a/src/App.vue b/src/App.vue index c8e6bf7..744a7f8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,19 +41,31 @@ v-model:visible="globalState.registerModalVisible" @confirm="handleRegisterConfirm" /> + + + + \ No newline at end of file diff --git a/src/components/OrderDetailComponent.vue b/src/components/OrderDetailComponent.vue new file mode 100644 index 0000000..cdaceba --- /dev/null +++ b/src/components/OrderDetailComponent.vue @@ -0,0 +1,268 @@ + + + + + \ No newline at end of file diff --git a/src/components/PaymentModal.vue b/src/components/PaymentModal.vue index 82750cc..6a33512 100644 --- a/src/components/PaymentModal.vue +++ b/src/components/PaymentModal.vue @@ -19,24 +19,26 @@

选择支付方式

-
+
-
+
{{ method.icon }}
-
{{ method.name }}
+
+ {{ method.name }} + + {{ method.discount }} + +
{{ method.desc }}
-
- {{ method.discount }} -
diff --git a/src/components/RechargeModal.vue b/src/components/RechargeModal.vue index 96c0baf..3cf1eac 100644 --- a/src/components/RechargeModal.vue +++ b/src/components/RechargeModal.vue @@ -1,11 +1,177 @@ - - - \ No newline at end of file diff --git a/src/layouts/Header.vue b/src/layouts/Header.vue index 5cfe173..6a62088 100644 --- a/src/layouts/Header.vue +++ b/src/layouts/Header.vue @@ -185,11 +185,11 @@ const globalState = inject('globalState') const searchKeyword = ref('') const showMobileMenu = ref(false) +// const cartCount = 0; -// const cartCount = computed(() => { -// return globalState.cartItems.reduce((total, item) => total + item.quantity, 0) -// }) -const cartCount = 1; +const cartCount = computed(() => { + return globalState.cartItems.reduce((total, item) => total + item.quantity, 0) +}) const mainNav = [ { name: '首页', link: '/' }, { name: '天猫超市', link: '/products?category=supermarket' }, diff --git a/src/views/order/OrderListPage.vue b/src/views/order/OrderListPage.vue index 07b3e9b..948c4c6 100644 --- a/src/views/order/OrderListPage.vue +++ b/src/views/order/OrderListPage.vue @@ -1,247 +1,242 @@ + +/* 按钮样式 */ +:deep(.el-button) { + @apply rounded-full transition-all duration-300; +} + +:deep(.el-button--primary) { + @apply bg-red-600 hover:bg-red-700 text-white; +} + +:deep(.el-button--text) { + @apply hover:text-red-600; +} + +/* 分页样式 */ +:deep(.el-pagination) { + @apply rounded-xl overflow-hidden; +} + +:deep(.el-pager li) { + @apply min-w-10 h-10 leading-10 rounded-lg transition-all duration-300 hover:bg-gray-100; +} + +:deep(.el-pager li.active) { + @apply bg-red-600 text-white hover:bg-red-700; +} + +:deep(.el-pagination__editor) { + @apply rounded-lg; +} + +:deep(.el-pagination__editor:focus) { + @apply border-red-500; +} + +:deep(.el-pagination__sizes .el-input .el-input__inner) { + @apply rounded-lg; +} + \ No newline at end of file diff --git a/src/views/product/ProductDetailPage.vue b/src/views/product/ProductDetailPage.vue index 2af1964..5149337 100644 --- a/src/views/product/ProductDetailPage.vue +++ b/src/views/product/ProductDetailPage.vue @@ -481,14 +481,16 @@ v-show="showMagnifier" class="magnifier-viewer fixed border border-gray-300 rounded-lg overflow-hidden bg-white shadow-xl z-50" :style="{ - left: magnifierLeft + 'px', - top: '200px', - width: '450px', - height: '450px', - backgroundImage: 'url(' + currentImage + ')', - backgroundSize: zoomLevel + '%', - backgroundPosition: backgroundPosition - }" + // left: magnifierLeft + 'px', + // left: magnifierTop + 'px', + left: magnifierLeft>0? `${magnifierLeft}px`: '45%', + top: '200px', + width: '450px', + height: '450px', + backgroundImage: 'url(' + currentImage + ')', + backgroundSize: zoomLevel + '%', + backgroundPosition: backgroundPosition + }" >