From 734019eb42c7320e78cba15d4f7af1aaec108348 Mon Sep 17 00:00:00 2001 From: vee <897831508@qq.com> Date: Wed, 14 Sep 2022 12:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E7=BA=A6=E8=AE=A2=E5=8D=95=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/entrustOrderList/entrustOrderList.vue | 1 + manifest.json | 2 +- pages/markets/contractOrder.vue | 14 +++++++++++++- utils/api.js | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/components/entrustOrderList/entrustOrderList.vue b/components/entrustOrderList/entrustOrderList.vue index b7f4506..93e03ae 100644 --- a/components/entrustOrderList/entrustOrderList.vue +++ b/components/entrustOrderList/entrustOrderList.vue @@ -380,6 +380,7 @@ * @param {*} type */ onChangeType(type = 0) { + this.list=[]; this.type = type if (this.type == 0) { this.status = 'undone' diff --git a/manifest.json b/manifest.json index 8a1d626..60c42ff 100644 --- a/manifest.json +++ b/manifest.json @@ -119,7 +119,7 @@ }, "/market" : { "ws" : false, - "target" : "https://market.acefinex.com", + "target" : "https://market.gream.ltd", "changeOrigin" : true, "secure" : false, "pathRewrite" : { diff --git a/pages/markets/contractOrder.vue b/pages/markets/contractOrder.vue index b1331ca..cb58ab5 100644 --- a/pages/markets/contractOrder.vue +++ b/pages/markets/contractOrder.vue @@ -236,7 +236,8 @@ }, mounted() { this.initWebSocket(); - this.getContractOrderList() + this.getmarketLatest(); + // this.getContractOrderList() }, //全局事件在组件实例创建完成定义 @@ -339,6 +340,16 @@ this.itemData = item this.closeModalShow = true }, + getmarketLatest(){ + const marketLatest = this.$api.getmarketLatest(); + marketLatest.then(res => { + this.latest = res + console.log(1111,res) + this.getContractOrderList(); + }); + }, + + // 合约订单列表 getContractOrderList() { const orderList = this.$api.contractOrderList({ @@ -364,6 +375,7 @@ * @param {*} type */ onChangeType(type = 0) { + this.list=[]; this.type = type if (this.type == 0) { this.status = 'undone' diff --git a/utils/api.js b/utils/api.js index 21c8308..9c0a546 100644 --- a/utils/api.js +++ b/utils/api.js @@ -31,7 +31,9 @@ const api = { marketDetail: (params) => Vue.prototype.$axios.post('/market/detail',params),//获取24显示行情(HTTP) bboList: (params) => Vue.prototype.$axios.post('/market/bboList',params),//获取买卖单(HTTP) tradeList: (params) => Vue.prototype.$axios.post('/market/tradeList',params),//获取成交记录(HTTP) + getmarketLatest: () => Vue.prototype.$axios.post('/market/latest'), + //--------------------------------- contract --------------------------------- contractOrder: (params) => Vue.prototype.$axios.post('/api/contract/order',params),//合约下单接口 setWinOrLossStopPrice: (params) => Vue.prototype.$axios.post('/api/contract/setWinOrLossStopPrice',params),//设置止盈止损