uptada BaiDuYun

This commit is contained in:
hrx 2025-09-18 14:54:12 +08:00
parent 3c1a5e5020
commit e8020c7e7d
5 changed files with 143 additions and 124 deletions

View File

@ -0,0 +1,8 @@
import request from '@/utils/request'
// 获取token
export function baiducloudAPI() {
return request({
url: `/baiduc/get_tokenid.dspy`,
method: 'get',
})
}

View File

@ -1,22 +1,67 @@
<template>
<div class="box">
<iframe src="https://console.vcp.baidu.com/billing/#/refund/list" frameborder="0" class="baidu-style"></iframe>
<div v-if="loading">正在加载...</div>
<iframe
v-else-if="url"
:src="url"
frameborder="0"
class="baidu-style">
</iframe>
<div v-else>
<p>请先登录百度云账号</p>
<button @click="getToken">重试</button>
</div>
</div>
</template>
<script>
export default {
import { baiducloudAPI } from '@/api/BaiDuTokenapi'
export default {
name: 'baiduProductShow',
data() {
return {
userToken: '',
url: '',
loading: true
}
},
async created() {
await this.getToken();
},
methods: {
async getToken() {
try {
this.loading = true;
const response = await baiducloudAPI();
this.userToken = response.data;
if (this.userToken) {
// URL
this.url = `https://console.vcp.baidu.com/api/loginvcp/login/securitytoken?redirectUrl=${(localStorage.getItem('redirectUrl'))}&signinSecurityToken=${encodeURIComponent(this.userToken)}`;
} else {
console.error('未能从API响应中获取到token:', response);
}
} catch (error) {
console.error('获取百度云Token失败:', error);
} finally {
this.loading = false;
}
}
}
}
</script>
<style lang="less" scoped>
.box {
padding: 10px;
height: 100%;
}
.baidu-style {
width: 100%;
height: calc(100vh - 100px);
}
</style>

View File

@ -4,9 +4,7 @@
<!-- 当homePath不等于/ncmatchHome/index时显示logo和导航 -->
<div class="logo" v-if="homePath !== '/ncmatchHome/index'">
<img v-if="JSON.stringify(logoInfoNew) !== '{}'" @click="$router.push(homePath)"
style="cursor:pointer;margin-right: 71px" class="logoImg"
:src=" logoInfoNew.home.logoImg || '' "
alt="">
style="cursor:pointer;margin-right: 71px" class="logoImg" :src="logoInfoNew.home.logoImg || ''" alt="">
<nav class="main-nav" v-if="!isNcmatchHome">
<ul>
@ -22,8 +20,7 @@
<!-- >促销活动</a></li>-->
<!-- <li @mouseleave="sildeOut" @mouseenter="sildeIn(storageData())"><a href="#">解决方案</a></li>-->
<li :class="{ active: $route.path.includes('/about') }" @mouseleave="sildeOut"
@click="$router.push('/homePage/about')"><a
>关于我们</a></li>
@click="$router.push('/homePage/about')"><a>关于我们</a></li>
</ul>
@ -34,9 +31,7 @@
<div class="logo" v-else>
<!-- 登录状态用户头像在最左侧 -->
<el-dropdown v-if="loginState" @visible-change="handleShow"
class="avatar-container left-menu-item hover-effect nick-name-style"
style="margin-right: 0"
trigger="click">
class="avatar-container left-menu-item hover-effect nick-name-style" style="margin-right: 0" trigger="click">
<div class="avatar-wrapper">
<i
style="font-size: 18px; color: #262626;font-weight: 400;cursor: pointer;display: flex;justify-content: flex-start;align-items: center">
@ -46,26 +41,17 @@
</i>
</div>
<el-dropdown-menu slot="dropdown" style="width: 230px;font-size: 16px;" divided>
<div
style="display: flex;flex-direction: column;padding:15px 15px;background-color: #f0f2f5">
<div style="display: flex;flex-direction: column;padding:15px 15px;background-color: #f0f2f5">
<span style="font-weight: bold;font-size: 20px;margin-bottom: 5px;color: #333333">{{ nick_name }}</span>
<span
style="font-size: 12px;color:#666;display: flex;justify-content:flex-start;align-items: center"> ID: <span
ref="contentToCopy">
<span style="font-size: 12px;color:#666;display: flex;justify-content:flex-start;align-items: center"> ID:
<span ref="contentToCopy">
{{
userId
}}
</span>
<svg
@click="copyBtn"
class="copy-btn"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
style="fill: #1019ab;"
>
<svg @click="copyBtn" class="copy-btn" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"
width="12" height="12" style="fill: #1019ab;">
<path
d="M394.666667 106.666667h448a74.666667 74.666667 0 0 1 74.666666 74.666666v448a74.666667 74.666667 0 0 1-74.666666 74.666667H394.666667a74.666667 74.666667 0 0 1-74.666667-74.666667V181.333333a74.666667 74.666667 0 0 1 74.666667-74.666666z m0 64a10.666667 10.666667 0 0 0-10.666667 10.666666v448a10.666667 10.666667 0 0 0 10.666667 10.666667h448a10.666667 10.666667 0 0 0 10.666666-10.666667V181.333333a10.666667 10.666667 0 0 0-10.666666-10.666666H394.666667z m245.333333 597.333333a32 32 0 0 1 64 0v74.666667a74.666667 74.666667 0 0 1-74.666667 74.666666H181.333333a74.666667 74.666667 0 0 1-74.666666-74.666666V394.666667a74.666667 74.666667 0 0 1 74.666666-74.666667h74.666667a32 32 0 0 1 0 64h-74.666667a10.666667 10.666667 0 0 0-10.666666 10.666667v448a10.666667 10.666667 0 0 0 10.666666 10.666666h448a10.666667 10.666667 0 0 0 10.666667-10.666666v-74.666667z"
p-id="1521"></path>
@ -73,12 +59,11 @@
</span>
</div>
<el-divider style="margin: 0!important;"></el-divider>
<div
v-if="role.includes('客户')"
<div v-if="role.includes('客户')"
style="padding: 0 18px; width: 100%;height: 60px;display: flex;justify-content: space-between;align-items: center">
<span style="color:#666;display: block;font-size: 14px;"
class="moneyNow"><span style="display: block;margin-bottom: 5px">余额</span>{{
<span style="color:#666;display: block;font-size: 14px;" class="moneyNow"><span
style="display: block;margin-bottom: 5px">余额</span>{{
mybalance ? mybalance : initMybalance()
}} </span>
<el-button v-if="!isShowKbossCharge" type="primary" @click="$router.push('/kbossCharge')" plain
@ -86,8 +71,7 @@
充值
</el-button>
</div>
<el-dropdown-item v-if="role.includes('客户')"
@click.native="$router.push('/customer/customerInformation')">
<el-dropdown-item v-if="role.includes('客户')" @click.native="$router.push('/customer/customerInformation')">
<span style="display: block">个人中心</span>
</el-dropdown-item>
<el-dropdown-item @click.native="logout">
@ -97,7 +81,8 @@
</el-dropdown>
<!-- 公司名称在中间 -->
<div class="company-name" @click="$router.push(homePath)" style="cursor:pointer;font-size: 24px;font-weight: bold;color: #222F60;margin: 0 auto;">
<div class="company-name" @click="$router.push(homePath)"
style="cursor:pointer;font-size: 24px;font-weight: bold;color: #222F60;margin: 0 auto;">
{{ (logoInfoNew.home && logoInfoNew.home.orgName) || '' }}
</div>
</div>
@ -110,19 +95,13 @@
query: {
fromPath: 'homePage'
}
})"
v-if="!loginState"
class="login-btn">登录</a>
<a @click="$router.push('/registrationPage')"
v-if="!loginState"
class="register-btn">立即注册</a>
})" v-if="!loginState" class="login-btn">登录</a>
<a @click="$router.push('/registrationPage')" v-if="!loginState" class="register-btn">立即注册</a>
<!-- <span style="text-decoration: underline; text-decoration-color: #1b5bff" v-if="!showRegisterButton">{{-->
<!-- username-->
<!-- }}</span>-->
<el-dropdown v-if="loginState && homePath !== '/ncmatchHome/index'" @visible-change="handleShow"
class="avatar-container right-menu-item hover-effect nick-name-style"
style="margin-right: 0"
trigger="click">
class="avatar-container right-menu-item hover-effect nick-name-style" style="margin-right: 0" trigger="click">
<div class="avatar-wrapper">
<!-- <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" /> -->
<i
@ -136,26 +115,17 @@
<!-- <div class="block"><el-avatar shape="square" size=small :src="squareUrl"></el-avatar></div> -->
</div>
<el-dropdown-menu slot="dropdown" style="width: 230px;font-size: 16px;" divided>
<div
style="display: flex;flex-direction: column;padding:15px 15px;background-color: #f0f2f5">
<div style="display: flex;flex-direction: column;padding:15px 15px;background-color: #f0f2f5">
<span style="font-weight: bold;font-size: 20px;margin-bottom: 5px;color: #333333">{{ nick_name }}</span>
<span
style="font-size: 12px;color:#666;display: flex;justify-content:flex-start;align-items: center"> ID: <span
ref="contentToCopy">
<span style="font-size: 12px;color:#666;display: flex;justify-content:flex-start;align-items: center"> ID:
<span ref="contentToCopy">
{{
userId
}}
</span>
<svg
@click="copyBtn"
class="copy-btn"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="12"
height="12"
style="fill: #1019ab;"
>
<svg @click="copyBtn" class="copy-btn" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"
width="12" height="12" style="fill: #1019ab;">
<path
d="M394.666667 106.666667h448a74.666667 74.666667 0 0 1 74.666666 74.666666v448a74.666667 74.666667 0 0 1-74.666666 74.666667H394.666667a74.666667 74.666667 0 0 1-74.666667-74.666667V181.333333a74.666667 74.666667 0 0 1 74.666667-74.666666z m0 64a10.666667 10.666667 0 0 0-10.666667 10.666666v448a10.666667 10.666667 0 0 0 10.666667 10.666667h448a10.666667 10.666667 0 0 0 10.666666-10.666667V181.333333a10.666667 10.666667 0 0 0-10.666666-10.666666H394.666667z m245.333333 597.333333a32 32 0 0 1 64 0v74.666667a74.666667 74.666667 0 0 1-74.666667 74.666666H181.333333a74.666667 74.666667 0 0 1-74.666666-74.666666V394.666667a74.666667 74.666667 0 0 1 74.666666-74.666667h74.666667a32 32 0 0 1 0 64h-74.666667a10.666667 10.666667 0 0 0-10.666666 10.666667v448a10.666667 10.666667 0 0 0 10.666666 10.666666h448a10.666667 10.666667 0 0 0 10.666667-10.666666v-74.666667z"
p-id="1521"></path>
@ -163,12 +133,11 @@
</span>
</div>
<el-divider style="margin: 0!important;"></el-divider>
<div
v-if="role.includes('客户')"
<div v-if="role.includes('客户')"
style="padding: 0 18px; width: 100%;height: 60px;display: flex;justify-content: space-between;align-items: center">
<span style="color:#666;display: block;font-size: 14px;"
class="moneyNow"><span style="display: block;margin-bottom: 5px">余额</span>{{
<span style="color:#666;display: block;font-size: 14px;" class="moneyNow"><span
style="display: block;margin-bottom: 5px">余额</span>{{
mybalance ? mybalance : initMybalance()
}} </span>
<el-button v-if="!isShowKbossCharge" type="primary" @click="$router.push('/kbossCharge')" plain
@ -176,8 +145,7 @@
充值
</el-button>
</div>
<el-dropdown-item v-if="role.includes('客户')"
@click.native="$router.push('/customer/customerInformation')">
<el-dropdown-item v-if="role.includes('客户')" @click.native="$router.push('/customer/customerInformation')">
<span style="display: block">个人中心</span>
</el-dropdown-item>
<!-- channelManagementShow=true-->
@ -213,9 +181,7 @@
<div class="inPanel">
<div class="panelLeft">
<ul class="outUl">
<li style="cursor: default" class="outLi"
v-for="item in showPanelData"
:key="item.firTitle">
<li style="cursor: default" class="outLi" v-for="item in showPanelData" :key="item.firTitle">
<!-- @mouseenter="sildeItemIn(item)"-->
<span style="cursor: default!important;" :class="['tilte', 'activeFir']">
{{
@ -249,12 +215,8 @@
<!-- <span class="subTitle">{{ showPanelRightData[0].thrTitle }}</span>-->
<ul class="leastMenu inBox">
<li class="clickItem"
style="font-size: 14px!important;margin: 8px 0;cursor: pointer"
v-for="itemR in showPanelRightData[0].value"
:key="itemR.id"
@click="clickGo(itemR)"
>
<li class="clickItem" style="font-size: 14px!important;margin: 8px 0;cursor: pointer"
v-for="itemR in showPanelRightData[0].value" :key="itemR.id" @click="clickGo(itemR)">
{{ itemR.name }} <span v-if="itemR.discount" class="zhe">{{ itemR.discount }}</span>
@ -771,7 +733,8 @@ export default Vue.extend({
font-size: 18px !important;
}
font-weight: 500; /* 使用数字值代替bold更精确 */
font-weight: 500;
/* 使用数字值代替bold更精确 */
color: #222F60 !important;
position: relative;
height: 84px;
@ -802,6 +765,7 @@ export default Vue.extend({
.main-nav {
z-index: 10000;
ul {
display: flex;
list-style: none;

View File

@ -497,8 +497,10 @@ export default Vue.extend({
// 使 scrollIntoView
this.$refs[sectionRef].scrollIntoView({
behavior: 'smooth',
block: 'start'
block: 'start',
inline: 'start'
});
}
}
},