diff --git a/src/pages.json b/src/pages.json index 0b7d0b6..b245b37 100644 --- a/src/pages.json +++ b/src/pages.json @@ -30,6 +30,12 @@ "navigationBarTitleText": "选择商品" } }, + { + "path": "pages/product/detail", + "style": { + "navigationBarTitleText": "商品详情" + } + }, { "path": "pages/order/create", "style": { diff --git a/src/pages/product/detail.vue b/src/pages/product/detail.vue new file mode 100644 index 0000000..92bd6ae --- /dev/null +++ b/src/pages/product/detail.vue @@ -0,0 +1,250 @@ + + + + + \ No newline at end of file diff --git a/src/pages/product/list.vue b/src/pages/product/list.vue index 71046a1..c21b19c 100644 --- a/src/pages/product/list.vue +++ b/src/pages/product/list.vue @@ -154,7 +154,9 @@ export default { this.loadProducts() }, viewDetail(item) { - uni.showToast({ title: '商品详情开发中', icon: 'none' }) + uni.navigateTo({ + url: `/pages/product/detail?productId=${item.productId}` + }) }, getStock(productId) { return this.stocks[productId] || 0