feat: 添加跳转

This commit is contained in:
liulujian 2026-04-06 15:03:09 +08:00
parent 6961b3c804
commit 3995f7a613
2 changed files with 24 additions and 15 deletions

View File

@ -55,11 +55,11 @@
<div class="option-item-box-title">碳数字身份证</div>
<div class="option-btn-box ">
<div class="btn" @click="handleNavigate(buttonLinks['办证指南'])">办证指南</div>
<div class="btn" @click="handleNavigate(buttonLinks['碳证查询'])">碳证查询</div>
<div class="btn" @click="handleIframeNavigate(buttonLinks['碳证查询'])">碳证查询</div>
</div>
<div class="option-btn-box">
<div class="btn" @click="handleNavigate(buttonLinks['碳证核验'])">碳证核验</div>
<div class="btn" @click="handleNavigate(buttonLinks['碳证核验'])">碳证核验</div>
<div class="btn" @click="handleIframeNavigate(buttonLinks['碳证核验'])">碳证核验</div>
<div class="btn" @click="handleNavigate(buttonLinks['跨境互通'])">跨境互通</div>
</div>
</div>
<div class="option-item-box blue">
@ -80,7 +80,7 @@
<div class="btn" @click="handleNavigate(buttonLinks['需求市场'])">需求市场</div>
</div>
<div class="option-btn-box">
<div class="btn" @click="handleNavigate(buttonLinks['数据市场'])">数据市场</div>
<div class="btn" @click="handleNavigate(buttonLinks['金融市场'])">金融市场</div>
<div class="btn" @click="handleNavigate(buttonLinks['数据市场'])">数据市场</div>
</div>
</div>
@ -255,16 +255,18 @@ export default {
buttonLinks: {
//
'办证指南': 'https://www.kdocs.cn/l/cr5aavNI1Brn',
'碳证查询': '/yhzx/qyrenzheng',
'碳证核验': '/yhzx/qyrenzheng',
'碳证查询': 'https://ctn-web-pre.lingshu.net/trustedCarbonQuery/list?type=carbon-query',
'碳证核验': 'https://ctn-web-pre.lingshu.net/carbon-verify',
'跨境互通': '',
//
'上链指南': 'https://www.kdocs.cn/l/xxx1',
'上链标准': 'https://www.kdocs.cn/l/xxx2',
'上链工具': 'https://www.kdocs.cn/l/xxx3',
'碳证中心': '/yhzx/qyrenzheng',
'上链指南': '',
'上链标准': '',
'上链工具': '',
'碳证中心': '',
// 绿
'服务市场': '/tfwsc',
'需求市场': '/txqsc',
'金融市场': '/tjrsc',
'数据市场': '/tsjsc',
},
};
@ -273,18 +275,25 @@ export default {
Footer,
},
methods: {
//
// -
handleNavigate(link) {
if (!link) return;
//
if (link.startsWith('http://') || link.startsWith('https://')) {
//
window.open(link, '_blank');
} else {
//
this.$router.push(link);
}
},
// iframe - parentmain.vueiframe
handleIframeNavigate(url) {
console.log('url', url);
if (!url) return;
if (url.startsWith('http://') || url.startsWith('https://')) {
this.$emit('gotoIfreamPage', url);
} else {
this.$router.push(url);
}
},
//
handleSearch() {
if (this.inputValue) {

View File

@ -5,7 +5,7 @@
<iframe v-if="iframeUrl" :src="iframeUrl" width="100%" height="100%" frameborder="0" scrolling="yes">
</iframe>
<keep-alive v-else>
<router-view />
<router-view @gotoIfreamPage="gotoIfreamPage" @gotoPage="gotoPage" />
</keep-alive>
</div>
</div>