Browse Source

修改期权交易

master
liaoxinyu 2 years ago
parent
commit
2972ed1392
  1. 4
      src/components/CommonHeader.vue
  2. 17
      src/views/option/index.vue
  3. 1
      src/views/option/option-operation.vue

4
src/components/CommonHeader.vue

@ -27,10 +27,10 @@
</li>
<!-- <li class="nav-item" >
<li class="nav-item" >
<router-link class="nav-link" :to="option.url">{{ option.label }}</router-link>
</li>
-->
<li class="nav-item" v-if="false">
<router-link class="nav-link" :to="market.url">{{ market.label }}</router-link>
</li>

17
src/views/option/index.vue

@ -32,7 +32,7 @@
@click="checkSymbol(minItem.pair_time_name)"
:key="minItem.scene_id"
>
<span>{{minItem.pair_time_name}}</span>
<span>{{minItem.time_name}}</span>
<span
:class="(minItem.increase*1)>=0?'increace':'decreace'"
>{{minItem.increaseStr}}</span>
@ -115,8 +115,7 @@ export default {
activeCoin() {
return (
this.symbolList
.map(item =>
this.symbolList.map(item =>
item.scenePairList.find(
minItem => minItem.pair_time_name == this.activeSymbol
)
@ -174,7 +173,7 @@ export default {
let { data, msg, code, sub, type, status } = res;
if (
sub ==
`newPrice_${this.activeCoin.pair_name
`newPrice_${this.activeCoin.pair_time_name
.split("/")
.join("")
.toLowerCase()}`
@ -198,7 +197,7 @@ export default {
item.increase = data.increase;
item.increaseStr = data.increaseStr;
item.pair_id = data.pair_id;
item.pair_name = data.pair_name;
item.pair_time_name = data.pair_time_name;
item.pair_time_name = data.pair_time_name;
item.symbol = data.symbol;
item.time_id = data.time_id;
@ -213,7 +212,7 @@ export default {
if (this.activeSymbol) {
this.sendMessage({
cmd: "unsub",
msg: `newPrice_${this.activeCoin.pair_name
msg: `newPrice_${this.activeCoin.pair_time_name
.split("/")
.join("")
.toLowerCase()}`
@ -226,7 +225,7 @@ export default {
//
getNewPriceBook() {
let data = {
symbol: this.activeCoin.pair_name
symbol: this.activeCoin.pair_time_name
};
Option.getNewPriceBook(data)
.then(res => {
@ -235,11 +234,11 @@ export default {
});
if (this.$refs.highChart) {
this.$refs.highChart.setData(arr);
this.$refs.highChart.setName(this.activeCoin.pair_name);
this.$refs.highChart.setName(this.activeCoin.pair_time_name);
}
this.sendMessage({
cmd: "sub",
msg: `newPrice_${this.activeCoin.pair_name
msg: `newPrice_${this.activeCoin.pair_time_name
.split("/")
.join("")
.toLowerCase()}`

1
src/views/option/option-operation.vue

@ -426,6 +426,7 @@ export default {
odds_uuid,
scene_id: this.next_scene.scene_id
};
console.log(data);
if (utils.validate(domName)) {
Option.betScene(data)
.then(res => {

Loading…
Cancel
Save