12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <view>
- <web-view v-if="webViewUrl" :src="webViewUrl"></web-view>
- </view>
- </template>
- <script>
- import config from "@/config";
- import {
- getBimViewToken
- } from '@/request/api/bim.js'
- export default {
- data() {
- return {
- webViewUrl: null,
- option: {
- type: 'model',
- fileId: 10000898047083,
- showType: '1',
- title: '模型'
- }
- }
- },
- onShow() {
- this.initBadge();
- },
- onLoad(body) {
- this.initModel();
- },
- methods: {
- initModel() {
- getBimViewToken(this.option.fileId).then(res => {
- this.webViewUrl =
- `${config.baseUrl}/webview/bim/preview.html?viewToken=${res.data}&title=${this.option.title}&showType=${this.option.showType}`;
- })
- }
- }
- }
- </script>
- <style>
- </style>
|