Skip to content

Commit 4762080

Browse files
committed
结算
1 parent f93028c commit 4762080

File tree

6 files changed

+373
-2
lines changed

6 files changed

+373
-2
lines changed

components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ declare module 'vue' {
1414
ElCarousel: typeof import('element-plus/es')['ElCarousel']
1515
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
1616
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
17+
ElDialog: typeof import('element-plus/es')['ElDialog']
1718
ElEmpty: typeof import('element-plus/es')['ElEmpty']
1819
ElForm: typeof import('element-plus/es')['ElForm']
1920
ElFormItem: typeof import('element-plus/es')['ElFormItem']

src/apis/category.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function getCategoryFilterAPI(id: string) {
1818
})
1919
}
2020

21-
export const getSubCategoryAPI = (data) => {
21+
export const getSubCategoryAPI = (data: any) => {
2222
return request({
2323
url: '/category/goods/temporary',
2424
method: 'POST',

src/apis/checkout.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import request from '@/utils/http'
2+
3+
export const getCheckInfoAPI = () => {
4+
return request({
5+
url: '/member/order/pre',
6+
})
7+
}

src/router/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Category from '@/views/Category/index.vue'
66
import SubCategory from '@/views/SubCategory/index.vue'
77
import Detail from '@/views/Detail/index.vue'
88
import CartList from '@/views/CartList/index.vue'
9+
import Checkout from '@/views/Checkout/index.vue'
910
const router = createRouter({
1011
history: createWebHistory(import.meta.env.BASE_URL),
1112
routes: [
@@ -32,6 +33,10 @@ const router = createRouter({
3233
{
3334
path: 'cartlist',
3435
component: CartList
36+
},
37+
{
38+
path: 'checkout',
39+
component: Checkout
3540
}
3641
]
3742
},

src/views/CartList/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const allCheck = (selected) => {
8686
<span class="red">¥ {{ cartStore.selectedPrice.toFixed(2) }} </span>
8787
</div>
8888
<div class="total">
89-
<el-button size="large" type="primary">下单结算</el-button>
89+
<el-button size="large" type="primary" @click="$router.push('/checkout')">下单结算</el-button>
9090
</div>
9191
</div>
9292
</div>

0 commit comments

Comments
 (0)