| | |
| | | <p class="first-line red">{{ formatMoney(chartData?.close) }}</p> |
| | | <p class="second-line"> |
| | | <span class="red">{{ chartData?.netChange }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio}%` }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span> |
| | | </p> |
| | | </div> |
| | | <div @click="handleClickShowMore()" class="line-r"> |
| | |
| | | <p class="first-line red">{{ formatMoney(chartData?.close) }}</p> |
| | | <p class="second-line"> |
| | | <span class="red">{{ chartData?.netChange }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio}%` }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span> |
| | | </p> |
| | | </div> |
| | | <div class="flex-r"> |
| | |
| | | <p class="first-line red">{{ formatMoney(chartData?.close) }}</p> |
| | | <p class="second-line"> |
| | | <span class="red">{{ chartData?.netChange }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio}%` }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span> |
| | | </p> |
| | | </div> |
| | | <div @click="handleClickShowMore()" class="line-r"> |
| | |
| | | <p class="first-line red">{{ formatMoney(chartData?.close) }}</p> |
| | | <p class="second-line"> |
| | | <span class="red">{{ chartData?.netChange }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio}%` }}</span> |
| | | <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span> |
| | | </p> |
| | | </div> |
| | | <div class="flex-r"> |
| | |
| | | methods: { |
| | | ...mapActions('home', [SET_COIN_LIST]), |
| | | onUpdate(symbol) { // 更新 |
| | | debugger |
| | | // debugger |
| | | this.currentType = 'long' |
| | | this.closeSocket() |
| | | // this.clearTimer() |
| | |
| | | }) |
| | | }, |
| | | handleQoutes(data) { |
| | | // console.log('handleQoutes: ', data); |
| | | if (data && data.length) { |
| | | const cur = data[0] |
| | | this.price = cur.close |
| | | this.range = cur.change_ratio + '' |
| | | this.range = cur.changeRatioStr + '' |
| | | this.quote = cur |
| | | this.updateKey++ |
| | | } |
| | |
| | | // }, 3000); |
| | | // }) |
| | | } |
| | | initFun() |
| | | // initFun() |
| | | } |
| | | if (type === 'close' || !type) { |
| | | let initFunTimer = null; |
| | |
| | | clearTimeout(initFunTimer) |
| | | initFunTimer = null |
| | | }).catch(err => { |
| | | initFunTimer = setTimeout(() => { |
| | | initFun() |
| | | }, 3000); |
| | | // initFunTimer = setTimeout(() => { |
| | | // initFun() |
| | | // }, 3000); |
| | | }) |
| | | } |
| | | initFunTimer = setTimeout(() => { |
| | | initFun() |
| | | }, 600); |
| | | // initFunTimer = setTimeout(() => { |
| | | // initFun() |
| | | // }, 600); |
| | | } |
| | | if (type === 'futrue' || !type) { |
| | | _futrueOrderInit(symbol).then(data => { |
| | |
| | | this.closeSocket() |
| | | this.clearTimer() |
| | | |
| | | this.symbol = symbol |
| | | this.fetchQoutes(symbol) |
| | | this.fetchDeepData(symbol) |
| | | this.initParam(symbol) // 'open' |
| | | this.clearTimer() |
| | | const _symbol = symbol || this.symbol |
| | | console.log('init: ',this.symbol, symbol) |
| | | this.fetchQoutes(_symbol) |
| | | this.fetchDeepData(_symbol) |
| | | this.initParam(_symbol) // 'open' |
| | | // this.clearTimer() |
| | | //if (this.curTab === 'fetchOrderListCur') { |
| | | if (this.curTab === 'fetchOrderListHold') { |
| | | //this.fetchOrderListCur(symbol) |
| | | this.fetchOrderListHold(symbol) |
| | | this.fetchOrderListHold(_symbol) |
| | | } else { |
| | | this.fetchFutrueHoldList(symbol) |
| | | this.fetchFutrueHoldList(_symbol) |
| | | } |
| | | |
| | | }, |