| | |
| | | title-inactive-color="#ffffff" title-active-color="#ffffff" |
| | | background="transparent"> |
| | | <van-tab :title="$t('hj45')" name="1"></van-tab> |
| | | <van-tab :title="$t('jy189')" name="2"></van-tab> |
| | | <van-tab :title="$t('jy187')" name="3"></van-tab> |
| | | <!-- <van-tab :title="$t('jy189')" name="2"></van-tab> --> |
| | | <!-- <van-tab :title="$t('jy187')" name="3"></van-tab> --> |
| | | <!-- <van-tab title="新债配售" name="4"></van-tab> --> |
| | | <van-tab :title="$t('jy86')" name="4"></van-tab> |
| | | <van-tab :title="$t('jy188')" name="5"></van-tab> |
| | | <van-tab v-if="isdisplay" :title="$t('jy86')" name="4"></van-tab> |
| | | <!-- <van-tab :title="$t('jy188')" name="5"></van-tab> --> |
| | | </van-tabs> |
| | | </div> |
| | | <div class="suo" @click="getsearch"><a class="tr"></a></div> |
| | | </div> |
| | | <div> |
| | | <div class="xuanhze"> |
| | | <xingusg v-if="tabactive == 1"></xingusg> |
| | | <xinguqc v-if="tabactive == 2"></xinguqc> |
| | | <xinzhaisg v-if="tabactive == 3"></xinzhaisg> |
| | | <!-- <xinzhaips v-if="tabactive == 4"></xinzhaips> --> |
| | | <dazongjiaoyi v-if="(tabactive == 4)"></dazongjiaoyi> |
| | | <vipqiangchou v-if="(tabactive == 5)"></vipqiangchou> |
| | | <xingusg v-if="tabactive == '1'"></xingusg> |
| | | <xinguqc v-if="tabactive == '2'"></xinguqc> |
| | | <xinzhaisg v-if="tabactive == '3'"></xinzhaisg> |
| | | <!-- <xinzhaips v-if="tabactive == '4'"></xinzhaips> --> |
| | | <dazongjiaoyi v-if="tabactive == '4'"></dazongjiaoyi> |
| | | <vipqiangchou v-if="tabactive == '5'"></vipqiangchou> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | tabactive: 1, |
| | | tabactive: "1", |
| | | isdisplay: false, |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.tabactive = this.$route.query.idx |
| | | this.initTab(); |
| | | this.getstockDzDisplay(); |
| | | }, |
| | | watch: { |
| | | '$route'(to, from) { |
| | | this.initTab(); |
| | | }, |
| | | 'isdisplay'(newVal) { |
| | | // 当 isdisplay 变为 true 后,如果当前 tabactive 是 4,需要重新设置以确保正确选中 |
| | | if (newVal) { |
| | | this.$nextTick(() => { |
| | | const idx = this.$route.query.idx; |
| | | if (idx) { |
| | | this.tabactive = String(idx); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | initTab() { |
| | | const idx = this.$route.query.idx; |
| | | this.tabactive = idx ? String(idx) : "1"; |
| | | }, |
| | | async getstockDzDisplay(){ |
| | | let data = await api.stockDzDisplay(); |
| | | this.isdisplay = data.data; |
| | | // 接口返回后,使用 nextTick 确保 DOM 更新完成后再设置 tabactive |
| | | if (this.isdisplay) { |
| | | this.$nextTick(() => { |
| | | const idx = this.$route.query.idx; |
| | | if (idx) { |
| | | this.tabactive = String(idx); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | getNewsList() { |
| | | |
| | | }, |