diff --git a/api/exchange.js b/api/exchange.js index 9f451b4..bdd5188 100644 --- a/api/exchange.js +++ b/api/exchange.js @@ -6,6 +6,10 @@ class Exchange { static getUserBalance(data) { return Serve.get(`/exchange/getUserCoinBalance`,data); } + + static getstockUserBalance(data) { + return Serve.get(`/stock/getUserCoinBalance`,data); + } /** * 提交订单 @@ -22,6 +26,10 @@ class Exchange { static storeEntrust(data,config) { return Serve.post(`/exchange/storeEntrust`, data,config); } + + static stockstoreEntrust(data,config) { + return Serve.post(`/stock/storeEntrust`, data,config); + } // 获取币种基本信息 static getSymbolInfo(data) { diff --git a/api/market.js b/api/market.js index b38877a..b7ffe6e 100644 --- a/api/market.js +++ b/api/market.js @@ -50,6 +50,21 @@ class Market { static getCoinInfo(data){ return Serve.get(`/exchange/getCoinInfo`,data) } + + // 初始化查询市场行情 + static getstockMarketList() { + return Serve.get(`/stock/getMarketList`); + } + + // 初始化买卖盘数据 + static getstockBooks(data) { + return Serve.get(`/stock/getMarketInfo`,data); + } + + // 获取币种信息 + static getstockCoinInfo(data){ + return Serve.get(`/stock/getCoinInfo`,data) + } } diff --git a/api/order.js b/api/order.js index c188eed..0583505 100644 --- a/api/order.js +++ b/api/order.js @@ -24,6 +24,9 @@ class Order { static getHistoryEntrust(data) { return Serve.get(`/exchange/getHistoryEntrust`,data); } + static getstockHistoryEntrust(data) { + return Serve.get(`/stock/getHistoryEntrust`,data); + } /** * 获取当前委托 * @param {object} data @@ -35,11 +38,20 @@ class Order { static getCurrentEntrust(data) { return Serve.get(`/exchange/getCurrentEntrust`,data); } + + static getstockCurrentEntrust(data) { + return Serve.get(`/stock/getCurrentEntrust`,data); + } // 获取止盈止损单 static getConditionEntrust(data) { return Serve.get(`/exchange/getConditionEntrust`,data); } + + //当前委托 + static stockholdPosition(data) { + return Serve.get(`/stock/holdPosition`,data); + } /** * 获取委托成交记录 @@ -64,6 +76,10 @@ class Order { static cancelEntrust(data) { return Serve.post(`/exchange/cancelEntrust`,data); } + + static stockcancelEntrust(data) { + return Serve.post(`/stock/cancelEntrust`,data); + } /** * 批量撤单 * @param {object} data diff --git a/app.js b/app.js index 85a76de..ceb9eb5 100644 --- a/app.js +++ b/app.js @@ -9,7 +9,7 @@ if (process.env.NODE_ENV == 'production'||true) { //生产环境 // socket地址 socketUrl: 'wss://adm.moabwalletss.com/ws1', socketUrl1: 'wss://adm.moabwalletss.com/ws2', - socketUrl3: 'wss://adm.moabwalletss.com/ws3', + socketUrl2: 'wss://adm.moabwalletss.com/ws3', // pc端地址 pcUrl:'https://www.moabwalletss.com/', // app名称 diff --git a/i18n/lang/en.json b/i18n/lang/en.json index ace38f1..1b87090 100644 --- a/i18n/lang/en.json +++ b/i18n/lang/en.json @@ -362,7 +362,17 @@ "g3": "Operation", "g4": "Cancel", "g5": "Whether to cancel the current order", - "g6": "Undo successfully" + "g6": "Undo successfully", + "g7": "Stock", + "g8": "Current Holdings", + "g9": "Code/Name", + "g10": "Market Value of Holdings", + "g11": "Quantity", + "g12": "Latest Price", + "g13": "Cost", + "g14": "Today's Profit/Loss", + "g15": "Position Profit/Loss", + "g16": "Position Profit/Loss Ratio" }, "option": { "a0": "Options", diff --git a/i18n/lang/zh-TW.json b/i18n/lang/zh-TW.json index d9b64a6..2ff0e9c 100644 --- a/i18n/lang/zh-TW.json +++ b/i18n/lang/zh-TW.json @@ -362,7 +362,17 @@ "g3": "操作", "g4": "撤銷", "g5": "是否撤銷當前委託", - "g6": "撤銷成功" + "g6": "撤銷成功", + "g7": "股票", + "g8": "当前持倉", + "g9": "代碼/名稱", + "g10": "持倉市值", + "g11": "數量", + "g12": "最新價", + "g13": "成本", + "g14": "今日盈虧", + "g15": "持倉盈虧", + "g16": "持倉盈虧比例" }, "option": { "a0": "期權", diff --git a/pages.json b/pages.json index ea3bb9a..e2b0118 100644 --- a/pages.json +++ b/pages.json @@ -176,6 +176,12 @@ { "path" : "pages/oncs/onservice" }, + { + "path": "pages/stockexchange/index" + }, + { + "path": "pages/stockexchange/exchangeHis" + }, { "path": "pages/service/index", "style": { diff --git a/pages/base/index.vue b/pages/base/index.vue index 5f1e3e8..ac35350 100644 --- a/pages/base/index.vue +++ b/pages/base/index.vue @@ -53,6 +53,8 @@ import OptionList from "./option-list"; // import List from "./list"; import Contract from "./contract"; +import StockexchangeOperation from "./stockexchange-operation"; + export default { name: "Base", components: { @@ -62,7 +64,8 @@ export default { Mine, Contract, Purchase, - Help + Help, + StockexchangeOperation }, computed: { navList() { @@ -85,6 +88,12 @@ export default { icon: "static/img/index/base_caidan_0.png", activeIcon: "static/img/index/base_caidan_1.png", }, + { + label: this.$t("exchange.g7"), + tel: "stockexchange-operation", + icon: "static/img/base_qukuai_0.png", + activeIcon: "static/img/base_qukuai_1.png", + }, // { // // label: this.$t("base.a4"), // // tel: "option-list", diff --git a/pages/base/stockexchange-operation.vue b/pages/base/stockexchange-operation.vue new file mode 100644 index 0000000..3562bc7 --- /dev/null +++ b/pages/base/stockexchange-operation.vue @@ -0,0 +1,242 @@ + + + \ No newline at end of file diff --git a/pages/stockexchange/coin-info.vue b/pages/stockexchange/coin-info.vue new file mode 100644 index 0000000..a2766a0 --- /dev/null +++ b/pages/stockexchange/coin-info.vue @@ -0,0 +1,96 @@ + + + \ No newline at end of file diff --git a/pages/stockexchange/current-commission.vue b/pages/stockexchange/current-commission.vue new file mode 100644 index 0000000..bda9f1d --- /dev/null +++ b/pages/stockexchange/current-commission.vue @@ -0,0 +1,90 @@ + + \ No newline at end of file diff --git a/pages/stockexchange/depth-map.vue b/pages/stockexchange/depth-map.vue new file mode 100644 index 0000000..ca04bb1 --- /dev/null +++ b/pages/stockexchange/depth-map.vue @@ -0,0 +1,202 @@ + + + + + + \ No newline at end of file diff --git a/pages/stockexchange/exchange-transaction.vue b/pages/stockexchange/exchange-transaction.vue new file mode 100644 index 0000000..b5903b1 --- /dev/null +++ b/pages/stockexchange/exchange-transaction.vue @@ -0,0 +1,1133 @@ + + + \ No newline at end of file diff --git a/pages/stockexchange/exchangeHis.vue b/pages/stockexchange/exchangeHis.vue new file mode 100644 index 0000000..8d372ac --- /dev/null +++ b/pages/stockexchange/exchangeHis.vue @@ -0,0 +1,177 @@ + + + diff --git a/pages/stockexchange/history-commisson.vue b/pages/stockexchange/history-commisson.vue new file mode 100644 index 0000000..c9e8e2f --- /dev/null +++ b/pages/stockexchange/history-commisson.vue @@ -0,0 +1,60 @@ + + \ No newline at end of file diff --git a/pages/stockexchange/index.vue b/pages/stockexchange/index.vue new file mode 100644 index 0000000..28cd1b8 --- /dev/null +++ b/pages/stockexchange/index.vue @@ -0,0 +1,566 @@ + + + diff --git a/pages/stockexchange/latest-transaction.vue b/pages/stockexchange/latest-transaction.vue new file mode 100644 index 0000000..5c8ad89 --- /dev/null +++ b/pages/stockexchange/latest-transaction.vue @@ -0,0 +1,46 @@ + + \ No newline at end of file diff --git a/pages/stockexchange/sale.vue b/pages/stockexchange/sale.vue new file mode 100644 index 0000000..13d05e7 --- /dev/null +++ b/pages/stockexchange/sale.vue @@ -0,0 +1,92 @@ + + + \ No newline at end of file diff --git a/pages/stockexchange/sell-and-buy.vue b/pages/stockexchange/sell-and-buy.vue new file mode 100644 index 0000000..8758794 --- /dev/null +++ b/pages/stockexchange/sell-and-buy.vue @@ -0,0 +1,132 @@ + + + \ No newline at end of file diff --git a/pages/stockexchange/symbol-list.vue b/pages/stockexchange/symbol-list.vue new file mode 100644 index 0000000..8198cb3 --- /dev/null +++ b/pages/stockexchange/symbol-list.vue @@ -0,0 +1,177 @@ + + + \ No newline at end of file diff --git a/pages/stockexchange/time-sharing.vue b/pages/stockexchange/time-sharing.vue new file mode 100644 index 0000000..37ee3e4 --- /dev/null +++ b/pages/stockexchange/time-sharing.vue @@ -0,0 +1,339 @@ + + + + \ No newline at end of file