diff --git a/src/api/shop/shop.js b/src/api/shop/shop.js new file mode 100644 index 0000000..51786e8 --- /dev/null +++ b/src/api/shop/shop.js @@ -0,0 +1,15 @@ +import request from '@/utils/request' + +/** + * 我能买的道具 + */ +export function whatCanIBuy () { + return request.get('/Trade/what-can-i-buy') +} + +/** + * 购买道具 + */ +export function buy (data) { + return request.post('/Trade/buy',data) +} \ No newline at end of file diff --git a/src/pages/fishbaskets/Fishbaskets.vue b/src/pages/fishbaskets/Fishbaskets.vue index 2bd1191..2203f42 100644 --- a/src/pages/fishbaskets/Fishbaskets.vue +++ b/src/pages/fishbaskets/Fishbaskets.vue @@ -6,7 +6,6 @@
刷新 一键处理鱼 -
@@ -15,7 +14,7 @@ - + @@ -34,7 +33,6 @@ - @@ -90,7 +88,7 @@ const handleProcessFish = async () => { // 处理出售操作 const handleSell = async (fish) => { - const { value: price } = await ElMessageBox.prompt('请输入出售价格', `出售鱼 (${fish.name})` , { + const { value: price } = await ElMessageBox.prompt('请输入出售价格', `出售鱼 (${fish.name})`, { confirmButtonText: '确认', cancelButtonText: '取消', inputPattern: /^\d+(\.\d{1,2})?$/, diff --git a/src/pages/main/Home.vue b/src/pages/main/Home.vue index f5103de..b4114be 100644 --- a/src/pages/main/Home.vue +++ b/src/pages/main/Home.vue @@ -29,7 +29,7 @@ const menuItems = [ { label: '🎒 查看装备', route: 'equipments' }, { label: '🎣 拉竿钓鱼', route: 'fishing' }, { label: '🐟 查看鱼篓', route: 'fishbaskets' }, - { label: '🛒 商店售卖', route: 'shop' }, + { label: '🛒 道具商店', route: 'shop' }, { label: '💰 市场信息', route: 'market' }, { label: '🏆 游戏排名', route: 'ranking' } ] diff --git a/src/pages/shop/Shop.vue b/src/pages/shop/Shop.vue index fcfa6da..58e8ded 100644 --- a/src/pages/shop/Shop.vue +++ b/src/pages/shop/Shop.vue @@ -1,24 +1,85 @@ -