| | |
| | | </div> --> |
| | | </div> |
| | | <div class="rights"> |
| | | <div class="buy_btn"> |
| | | <!-- <div class="buy_btn"> |
| | | <div class="top_buy" @click="goBuy(0)"> |
| | | <span>{{ $t("hj84") }}</span> |
| | | </div> |
| | | <!-- <div class="bottom_buy"> |
| | | <span>{{ singDetails.nowPrice }}</span> |
| | | </div> --> |
| | | </div> |
| | | </div> --> |
| | | <div class="sell_btn" @click="goBuy(1)"> |
| | | <div class="top_sell"> |
| | | <span>{{ $t("hj85") }}</span> |
| | | </div> |
| | | <!-- <div class="bottom_sell"> |
| | | <span>{{ singDetails.nowPrice }}</span> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | newsdetailList: [], |
| | | bayType: "", |
| | | timer: null, |
| | | key: 0 |
| | | key: 0, |
| | | messageInstances: [] // 保存所有消息提示实例 |
| | | }; |
| | | }, |
| | | components: { |
| | |
| | | // 进入页面的时候清除所以得计时器,防止页面切换的时候出现多个定时器 |
| | | let end = setTimeout(function() {}, 0); |
| | | for (let i = 0; i <= end; i++) { |
| | | clearTimeout(i); |
| | | clearInterval(i); |
| | | } |
| | | |
| | |
| | | this.getSingDetailUs(); |
| | | } else { |
| | | this.getSingDetails(); |
| | | |
| | | this.timer = setInterval(() => { |
| | | this.getSingDetails(); |
| | | }, 5000); |
| | |
| | | this.getNohknews(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | // 关闭所有消息提示 |
| | | this.messageInstances.forEach(instance => { |
| | | if (instance && typeof instance.close === 'function') { |
| | | instance.close(); |
| | | } |
| | | }); |
| | | this.messageInstances = []; |
| | | }, |
| | | destroyed() { |
| | | this.clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | // 确保所有消息提示都已关闭 |
| | | this.messageInstances.forEach(instance => { |
| | | if (instance && typeof instance.close === 'function') { |
| | | instance.close(); |
| | | } |
| | | }); |
| | | this.messageInstances = []; |
| | | }, |
| | | // beforeDestroy() { |
| | | // this.Klinetype = false; |
| | |
| | | if (data.status === 0) { |
| | | this.getOpation(); |
| | | this.optionBtn = false; |
| | | this.$message({ |
| | | const messageInstance = this.$message({ |
| | | message: this.$t("hj97"), |
| | | type: "success" |
| | | }); |
| | | this.messageInstances.push(messageInstance); |
| | | } else { |
| | | this.optionBtn = false; |
| | | this.$message({ |
| | | const messageInstance = this.$message({ |
| | | message: data.msg, |
| | | type: "warning" |
| | | }); |
| | | this.messageInstances.push(messageInstance); |
| | | } |
| | | } else { |
| | | let data = await api.addOption({ code: this.kLineDetails.code }); |
| | | if (data.status === 0) { |
| | | this.getOpation(); |
| | | this.optionBtn = false; |
| | | this.$message({ |
| | | const messageInstance = this.$message({ |
| | | message: this.$t("hj96"), |
| | | type: "success" |
| | | }); |
| | | this.messageInstances.push(messageInstance); |
| | | } else { |
| | | this.$message({ |
| | | const messageInstance = this.$message({ |
| | | message: data.msg, |
| | | type: "warning" |
| | | }); |
| | | this.messageInstances.push(messageInstance); |
| | | this.optionBtn = false; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | .sell_btn { |
| | | width: 50%; |
| | | width: 100%; |
| | | height: 80%; |
| | | background: #c4d600; |
| | | color: #fff; |
| | | border-radius: 0 3rem 3rem 0 !important; |
| | | // border-radius: 0 3rem 3rem 0 !important; |
| | | border-radius: 3rem !important; |
| | | |
| | | .top_sell { |
| | | width: 100%; |