|
@@ -7,6 +7,7 @@
|
|
<script>
|
|
<script>
|
|
import Cookies from 'js-cookie'
|
|
import Cookies from 'js-cookie'
|
|
import {setToken} from "@/util";
|
|
import {setToken} from "@/util";
|
|
|
|
+import {appDetail} from "@/common/api";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -16,9 +17,15 @@ export default {
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.title = options.title
|
|
this.title = options.title
|
|
- setToken().then(() => {
|
|
|
|
|
|
+ appDetail({appId: options.id}).then(res => {
|
|
|
|
+ let {createUserId,appName}= res.data
|
|
let token = Cookies.get('congress')
|
|
let token = Cookies.get('congress')
|
|
this.url = `${window._CONFIG.APP_READY}?path=miniapp&appid=${options.id}&token=${token}#/newbi/auth`
|
|
this.url = `${window._CONFIG.APP_READY}?path=miniapp&appid=${options.id}&token=${token}#/newbi/auth`
|
|
|
|
+ window.$sensors.track('appPreview', {
|
|
|
|
+ attr1: appName, // 应用名称
|
|
|
|
+ attr2: options.id, // 应用id
|
|
|
|
+ attr3: createUserId, // 创建人id
|
|
|
|
+ });
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|