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),//设置止盈止损