From 82353d22f6ee0a8c2bc644970145857d2e12f391 Mon Sep 17 00:00:00 2001 From: cebgcontract <99630598+cebgcontract@users.noreply.github.com> Date: Mon, 28 Mar 2022 17:36:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=BB=A3=E5=B8=81=E6=95=B0=E9=87=8F=E7=9A=84=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/Market.ts | 49 +++++ src/api/User.ts | 8 +- src/components/market/PricePickerModal.vue | 178 +++++++++++++++++++ src/components/market/wallet/CoinCard.vue | 1 + src/components/market/wallet/WalletPanel.vue | 91 ++++++++-- src/main.ts | 3 +- 7 files changed, 310 insertions(+), 22 deletions(-) create mode 100644 src/components/market/PricePickerModal.vue diff --git a/.env.development b/.env.development index dd33e6a..0af32e2 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ VUE_APP_WALLET_INFURAID='e7743d46923911fa8850619b7a7f6d9d' -VUE_APP_BASE_API='https://market.cebg.games' +VUE_APP_BASE_API='https://game2006api-test.kingsome.cn' VUE_APP_CHAIN_ID=322 VUE_APP_CHAIN_RPC='https://rpc-testnet.kcc.network' VUE_APP_CHAIN_NAME='KCC-TESTNET' diff --git a/src/api/Market.ts b/src/api/Market.ts index e69de29..891ce2f 100644 --- a/src/api/Market.ts +++ b/src/api/Market.ts @@ -0,0 +1,49 @@ +import request from '@/utils/request' + +/** + * @param data {account: string, page: number, sort: string} + */ +export const queryShopList = (data: any) => + request({ + url: '/webapp/index.php?c=BcShop&a=search', + method: 'get', + params: data + }) + +export const buyShopBox = (data: any) => + request({ + url: '/webapp/index.php?c=BcShop&a=buy', + method: 'get', + params: data + }) + +/** + * @param data {account: string, token: string, order_id: string} + */ +export const queryShopOrder = (data: any) => + request({ + url: '/webapp/index.php?c=BcShop&a=queryOrder', + method: 'get', + params: data + }) + +export const queryRechargeResult = (data: any) => + request({ + url: '/webapp/index.php?c=Wallet&a=queryRechargeResult', + method: 'get', + params: data + }) + +export const queryWithdrawalResult = (data: any) => + request({ + url: '/webapp/index.php?c=Wallet&a=queryWithdrawalResult', + method: 'get', + params: data + }) + +export const withdrawal = (data: any) => + request({ + url: '/webapp/index.php?c=Wallet&a=withdrawal', + method: 'get', + params: data + }) diff --git a/src/api/User.ts b/src/api/User.ts index f3468bf..63a154c 100644 --- a/src/api/User.ts +++ b/src/api/User.ts @@ -20,10 +20,14 @@ export const defaultUser: IUser = { avatar: '', account: '' } +/** + * 获取用户信息 + * @param data {account: string, token: string} + */ export const getUserInfo = (data: any) => request({ - url: '/api/user/info', - method: 'post', + url: '/webapp/index.php?c=BcUser&a=login', + method: 'get', data }) diff --git a/src/components/market/PricePickerModal.vue b/src/components/market/PricePickerModal.vue new file mode 100644 index 0000000..2ccb16b --- /dev/null +++ b/src/components/market/PricePickerModal.vue @@ -0,0 +1,178 @@ + + + + + + Please input or drag amount to deposit + + + + + + + + + + + + + diff --git a/src/components/market/wallet/CoinCard.vue b/src/components/market/wallet/CoinCard.vue index 1eda424..a3d3eaf 100644 --- a/src/components/market/wallet/CoinCard.vue +++ b/src/components/market/wallet/CoinCard.vue @@ -26,6 +26,7 @@ export interface ICoinData{ type: number name: string symbol: string + id: string amount: number | string icon: any price: string|number diff --git a/src/components/market/wallet/WalletPanel.vue b/src/components/market/wallet/WalletPanel.vue index 1df3351..5b64a45 100644 --- a/src/components/market/wallet/WalletPanel.vue +++ b/src/components/market/wallet/WalletPanel.vue @@ -42,6 +42,7 @@ @coin-card-clicked = "onGameCardClicked" :key="d.symbol"> + diff --git a/src/main.ts b/src/main.ts index 1575973..b85a4d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import Vue from 'vue' import '@/styles/index.scss' import App from './App.vue' -import { Loading, Message, MessageBox, Notification, Slider, Tooltip } from 'element-ui' +import { Loading, Message, MessageBox, Notification, Button, Slider, Tooltip } from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import router from './router' import store from './store' @@ -13,6 +13,7 @@ import VueClipboard from 'vue-clipboard2' Vue.use(Loading.directive) Vue.use(Slider) Vue.use(Tooltip) +Vue.use(Button) Vue.use(SvgIcon, { tagName: 'svg-icon' })