|
@@ -167,7 +167,7 @@ export default {
|
|
|
countDownPop: false,
|
|
|
serviceTipsPop: false,
|
|
|
tabList: [],
|
|
|
- symbolOpen: '',
|
|
|
+ symbolOpen: {},
|
|
|
allTablist: [
|
|
|
// {
|
|
|
// title: '财务',
|
|
@@ -233,6 +233,7 @@ export default {
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
(this.tradeStateTimer && clearTimeout(this.tradeStateTimer))
|
|
|
+ bus.$off('updateChart', this.updateSymbolOpen)
|
|
|
},
|
|
|
created () {
|
|
|
this.symbol = this.$route.params.symbol
|
|
@@ -244,6 +245,7 @@ export default {
|
|
|
getData: [this.symbol],
|
|
|
subscribeList: [this.symbol],
|
|
|
});
|
|
|
+ bus.$on('updateChart', this.updateSymbolOpen)
|
|
|
if (this.isLogin) {
|
|
|
bus.$emit('updateAssets', ['getAccountList'])
|
|
|
var serviceTipsPop = sessionStorage.getItem('serviceTipsPop')
|
|
@@ -327,6 +329,10 @@ export default {
|
|
|
},
|
|
|
toExchange(url) {
|
|
|
if (this.isLogin) {
|
|
|
+ if (this.userInfo.group == 9999) {
|
|
|
+ bus.$emit('abnormalPopSign')
|
|
|
+ return
|
|
|
+ }
|
|
|
var trade_protocol = this.userInfo.trade_protocol ? JSON.parse(this.userInfo.trade_protocol) : [];
|
|
|
var sign = 0
|
|
|
trade_protocol.forEach(item => {
|
|
@@ -473,8 +479,18 @@ export default {
|
|
|
}
|
|
|
getPriceList(data).then(res => {
|
|
|
var list = res || [];
|
|
|
- this.symbolOpen = (list[list.length - 1] || {}).open || ''
|
|
|
+ this.symbolOpen = (list[list.length - 1] || {})
|
|
|
}).catch(() => {})
|
|
|
+ },
|
|
|
+ updateSymbolOpen(data) {
|
|
|
+ if ((this.symbol == data.symbol)) {
|
|
|
+ if (this.symbolOpen.high < data.ask) {
|
|
|
+ this.$set(this.symbolOpen, 'high', data.ask)
|
|
|
+ }
|
|
|
+ if (this.symbolOpen.low > data.ask) {
|
|
|
+ this.$set(this.symbolOpen, 'low', data.ask)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|