Files
frontend-app/pages/rwa_package/setting/kefu.vue
T
2025-09-06 16:21:10 +08:00

88 lines
1.9 KiB
Vue

<template>
<view class="content">
<TopSafe></TopSafe>
<view class="setting-view" v-if="h5Url">
<iframe :src="h5Url" frameborder="no" border="0" class="web-view">
</iframe>
</view>
<!-- 腾讯电子签H5 → 集成到UniApp -->
</view>
</template>
<script>
import { getUserInfo,uploadAvatar } from '@/api/auth.js';
import { uploadImage, uploadImg } from '@/api/common.js';
import { IMG_TYPE } from '@/utils/enumUtils.js';
import { BASE_URL, Authorization } from '@/utils/config.js';
import { getStorageFun, TOKEN_NAME,clear } from '@/utils/auth.js';
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'
import MyBtn from '@/components/common/my-btn.vue'
import func from '@/utils/func.js';
export default {
components: { Header, TopSafe,MyBtn },
data() {
return {
h5Url:'',
};
},
onShow() {
},
onLoad(option) {
if(option.type ){
this.init(option.type);
}
},
methods: {
init(type) {
this.getUserInfo(type)
},
async getUserInfo(type) {
const result = await getUserInfo();
if (result && result.bizcode === 100) {
const data = result.data;
this.currentUserData = result.data || {};
let url = `https://www.aigcyun.cn/uniChat/#/?skillGroupId=${type}&enterpriseId=1435&extraData=`;
let addHyExtraData = {
customerId:data.id,
customerName:data.nickname,
};
this.h5Url = url + encodeURIComponent(JSON.stringify(addHyExtraData))
}
},
}
}
</script>
<style lang="scss" scoped>
.web-view{
height:100%;
width:100%;
position: relative;
}
.setting-view {
width: 100%;
height: calc(100% - var(--status-bar-height));
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
box-sizing: border-box;
position: relative;
}
</style>
<style>
.chatModel{
height:calc(100% - var(--status-bar-height));
margin-top:var(--status-bar-height);
}
</style>