Browse Source

合约订单优化

master
vee 3 years ago
parent
commit
734019eb42
  1. 1
      components/entrustOrderList/entrustOrderList.vue
  2. 2
      manifest.json
  3. 14
      pages/markets/contractOrder.vue
  4. 2
      utils/api.js

1
components/entrustOrderList/entrustOrderList.vue

@ -380,6 +380,7 @@
* @param {*} type * @param {*} type
*/ */
onChangeType(type = 0) { onChangeType(type = 0) {
this.list=[];
this.type = type this.type = type
if (this.type == 0) { if (this.type == 0) {
this.status = 'undone' this.status = 'undone'

2
manifest.json

@ -119,7 +119,7 @@
}, },
"/market" : { "/market" : {
"ws" : false, "ws" : false,
"target" : "https://market.acefinex.com", "target" : "https://market.gream.ltd",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false, "secure" : false,
"pathRewrite" : { "pathRewrite" : {

14
pages/markets/contractOrder.vue

@ -236,7 +236,8 @@
}, },
mounted() { mounted() {
this.initWebSocket(); this.initWebSocket();
this.getContractOrderList() this.getmarketLatest();
// this.getContractOrderList()
}, },
// //
@ -339,6 +340,16 @@
this.itemData = item this.itemData = item
this.closeModalShow = true this.closeModalShow = true
}, },
getmarketLatest(){
const marketLatest = this.$api.getmarketLatest();
marketLatest.then(res => {
this.latest = res
console.log(1111,res)
this.getContractOrderList();
});
},
// //
getContractOrderList() { getContractOrderList() {
const orderList = this.$api.contractOrderList({ const orderList = this.$api.contractOrderList({
@ -364,6 +375,7 @@
* @param {*} type * @param {*} type
*/ */
onChangeType(type = 0) { onChangeType(type = 0) {
this.list=[];
this.type = type this.type = type
if (this.type == 0) { if (this.type == 0) {
this.status = 'undone' this.status = 'undone'

2
utils/api.js

@ -31,7 +31,9 @@ const api = {
marketDetail: (params) => Vue.prototype.$axios.post('/market/detail',params),//获取24显示行情(HTTP) marketDetail: (params) => Vue.prototype.$axios.post('/market/detail',params),//获取24显示行情(HTTP)
bboList: (params) => Vue.prototype.$axios.post('/market/bboList',params),//获取买卖单(HTTP) bboList: (params) => Vue.prototype.$axios.post('/market/bboList',params),//获取买卖单(HTTP)
tradeList: (params) => Vue.prototype.$axios.post('/market/tradeList',params),//获取成交记录(HTTP) tradeList: (params) => Vue.prototype.$axios.post('/market/tradeList',params),//获取成交记录(HTTP)
getmarketLatest: () => Vue.prototype.$axios.post('/market/latest'),
//--------------------------------- contract --------------------------------- //--------------------------------- contract ---------------------------------
contractOrder: (params) => Vue.prototype.$axios.post('/api/contract/order',params),//合约下单接口 contractOrder: (params) => Vue.prototype.$axios.post('/api/contract/order',params),//合约下单接口
setWinOrLossStopPrice: (params) => Vue.prototype.$axios.post('/api/contract/setWinOrLossStopPrice',params),//设置止盈止损 setWinOrLossStopPrice: (params) => Vue.prototype.$axios.post('/api/contract/setWinOrLossStopPrice',params),//设置止盈止损

Loading…
Cancel
Save