src/views/account/components/Position.vue
@@ -127,6 +127,8 @@ </template> <script> let teimss2 = null; // 轮询获取持仓数据计时器 import mixins from "@/mixins/myMixins"; // 混入 import * as api from "@/axios/api"; export default { @@ -163,6 +165,13 @@ this.opt.stockType = this.type; this.apiInterface = api.getchicang; // 赋值接口 this.init(); // 获取记录列表 teimss2 = setInterval(() => { this.getList(); }, 3000); }, beforeDestroy() { clearInterval(teimss2); }, methods: { // 关闭弹窗