| | |
| | | |
| | | <van-col span="3"> |
| | | <div style="text-align: right"> |
| | | {{ (item.gid || item.stockGid) == "nse" ? "NSE" : "BSE" }} |
| | | {{ (item.gid || item.stockGid).toUpperCase() }} |
| | | </div> |
| | | </van-col> |
| | | |
| | |
| | | <div style="text-align: right"> |
| | | <div |
| | | class="tp right_bs" |
| | | :class="`${item.color > 0 ? 'green' : 'red'}`" |
| | | :class="`${item.hcrateP.charAt(0) == '+' ? 'green' : 'red'}`" |
| | | > |
| | | <span class="price_color">{{ item.hcrateP }}</span> |
| | | </div> |
| | |
| | | refreshing: false, |
| | | }; |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | if (this.Trade) { |
| | | this.Trade.close(); |
| | | console.log('WebSocket disconnected'); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | |
| | | type: item.stock_type || "", |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | // return; |
| | | var codes = item.code; |
| | | var names = item.name; |
| | | var ifZhishu = "0"; |
| | |
| | | if (pageNumVal !== 1) { |
| | | this.listArr = [...this.listArr, ...data.data.list]; |
| | | } else { |
| | | console.log(this.active,'this.active'); |
| | | if (this.active) { |
| | | if (this.active === data.data.stockType) { |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | // this.finished = true; |
| | | if (!this.listArr.length || (this.listArr.length && this.listArr.length % 20)) { |
| | | if (this.listArr.length % 20) { |
| | | this.finished = true; |
| | | } |
| | | } else { |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | // this.finished = true; |
| | | if (!this.listArr.length || (this.listArr.length && this.listArr.length % 20)) { |
| | | if (this.listArr.length % 20) { |
| | | this.finished = true; |
| | | } |
| | | } |
| | |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | this.finished = true; |
| | | if (!this.listArr.length || (this.listArr.length && this.listArr.length % 20)) { |
| | | if (this.listArr.length % 20) { |
| | | this.finished = true; |
| | | } |
| | | } |
| | |
| | | initWebSocket() { |
| | | console.log("initWebSocket"); |
| | | this.Trade = new WhrWebSocket({ |
| | | path: `wss://ws.is4vc.com/websocket-server`, |
| | | path: `wss://ws.acapl.net/websocket-server`, |
| | | onmessage: this.getTradeMessage, |
| | | }); |
| | | |