轻量化展示
简介
对接流程
接口列表
本地开发
<!DOCTYPE html>
<html lang="">
<head>
<!-- obv样式 -->
<link href="/zt/obv/bimviewer/viewer/v4/locale/locale.properties" rel="resource"
type="application/l10n">
<link rel="stylesheet" href="/zt/obv/bimviewer/viewer/v5/obv.css" type="text/css" />
<script src="/zt/obv/bimviewer/viewer/v5/obv.js"></script>
</html>
proxy: {
'/zt/obv': {
target: 'https://xxx/server', // 指向实际的轻量化服务地址
changeOrigin: true,
secure: false
}
}
// 创建实例需要传入的参数,部署环境serviceConfig 和 用户有效期getAccessToken
const applicationOptions = {
// 配置 OBV 服务端(BIMServer)API 服务的 origin,这个适合于私有部署的用户使用
getAccessToken: this.getAccessToken,
refreshAccessToken: this.getAccessToken,
serviceConfig: {
origin: `${window.location.protocol}//${window.location.host}/zt/obv`,
apiContextPath: '/zt/obv/bimserver/viewing/v3'
}
}
getAccessToken(callBack) {
callBack(this.obvToken, 36000)
}
修改于 2023-11-03 12:31:52