app.vue 907 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <div style="height: 100vh">
  3. <yx-navbar :isBack="true" :title="title"></yx-navbar>
  4. <iframe class="iframe" v-if="src" :src="src" frameborder="0"></iframe>
  5. </div>
  6. </template>
  7. <script>
  8. import Cookies from 'js-cookie'
  9. import {setToken} from "@/util";
  10. import {appDetail} from "@/common/api";
  11. export default {
  12. data() {
  13. return {
  14. title: '详情',
  15. src: '',
  16. }
  17. },
  18. onLoad(options) {
  19. this.title = options.title
  20. appDetail({appId: options.id}).then(res => {
  21. let {createUserId,appName}= res.data
  22. let token = Cookies.get('congress')
  23. this.src = `${window._CONFIG.APP_READY}?path=miniapp&appid=${options.id}&token=${token}#/newbi/auth`
  24. window.$sensors.track('appPreview', {
  25. attr1: appName, // 应用名称
  26. attr2: options.id, // 应用id
  27. attr3: createUserId, // 创建人id
  28. });
  29. })
  30. }
  31. }
  32. </script>
  33. <style>
  34. </style>