app.vue 1005 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="pageDetail">
  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. let userInfo = this.$store.state.$userInfo
  24. this.src = `${window._CONFIG.APP_READY}?path=miniapp&appid=${options.id}&token=${token}#/newbi/auth`
  25. window.$sensors.track('appPreview', {
  26. tenant_id: userInfo.tenantId, // 租户id
  27. attr1: appName, // 应用名称
  28. attr2: options.id, // 应用id
  29. attr3: createUserId, // 创建人id
  30. });
  31. })
  32. }
  33. }
  34. </script>
  35. <style>
  36. </style>