threethousanddream před 2 týdny
rodič
revize
16eed054d4

+ 5 - 1
App.vue

@@ -11,8 +11,11 @@ export default {
     setToken().then(() => {
       uni.$u.http.get('/api/blade-token/currentUser').then(res => {
         let {instType} = res.detail
+        let userInfo = res
+        userInfo = {...userInfo, ...res.detail}
         let isSingle = instType === 1
-        this.$store.commit('setUser', {isSingle})
+        userInfo.isSingle = isSingle
+        this.$store.commit('setUser', userInfo)
         const Yxtoken = Cookies.get('congress')
         const redirect = window.location.href;
         if (Yxtoken) {
@@ -38,6 +41,7 @@ export default {
 @import "@/uni_modules/uview-ui/index.scss";
 @import "common/demo.scss";
 @import "common/tool.css";
+@import "common/home.scss";
 page {
   background-color: #f6f6f6;
 }

+ 8 - 0
pages/home/home.less

@@ -5,6 +5,7 @@
   .pageIndex {
     width: 100%;
     height: calc(100vh - 380rpx);
+    margin-top: 176rpx;
     box-sizing: border-box;
     background-color: #fff;
     .tabs {
@@ -142,3 +143,10 @@
     }
   }
 }
+.pageDetail {
+  height: 100vh;
+  .iframe {
+    height: calc(100vh - 176rpx);
+    margin-top: 176rpx;
+  }
+}

+ 5 - 2
components/yx-navbar/yx-navbar.less

@@ -1,6 +1,9 @@
 .narBarCon {
   width: 100%;
-  position: relative;
+  position: fixed;
+  top: 0;
+  left: 0;
+  height: 176rpx;
   .topBarCon {
     width: 100%;
     height: 176rpx;
@@ -52,7 +55,7 @@
     width: 100%;
     height: auto;
     position: absolute;
-    margin-top: 0px;
+    margin-top: 0;
     z-index: 999;
     display: flex;
     flex-direction: column;

+ 4 - 2
pages/detail/app.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="height: 100vh">
+  <div class="pageDetail">
     <yx-navbar :isBack="true" :title="title"></yx-navbar>
     <iframe class="iframe" v-if="src" :src="src" frameborder="0"></iframe>
   </div>
@@ -18,10 +18,12 @@ export default {
   onLoad(options) {
     this.title = options.title
     appDetail({appId: options.id}).then(res => {
-      let {createUserId,appName}= res.data
+      let {createUserId, appName} = res.data
       let token = Cookies.get('congress')
+      let userInfo = this.$store.state.$userInfo
       this.src = `${window._CONFIG.APP_READY}?path=miniapp&appid=${options.id}&token=${token}#/newbi/auth`
       window.$sensors.track('appPreview', {
+        tenant_id: userInfo.tenantId, // 租户id
         attr1: appName, // 应用名称
         attr2: options.id, // 应用id
         attr3: createUserId, // 创建人id

+ 2 - 2
pages/detail/bigdata.vue

@@ -1,7 +1,7 @@
 <template>
-  <div style="height: 100vh">
+  <div class="pageDetail">
     <yx-navbar :isBack="true" :title="title"></yx-navbar>
-    <iframe id="iframe" :src="src" style="width: 100vw;height: 100vh;" frameborder="0"></iframe>
+    <iframe class="iframe" id="iframe" :src="src"  frameborder="0"></iframe>
   </div>
 </template>
 <script>

+ 0 - 1
pages/home/apps.vue

@@ -97,5 +97,4 @@ export default {
 }
 </script>
 <style lang="less">
-@import "./home.less";
 </style>

+ 0 - 1
pages/home/home.vue

@@ -219,5 +219,4 @@ export default {
 }
 </script>
 <style lang="less">
-@import "./home.less";
 </style>

+ 0 - 1
pages/home/me.vue

@@ -216,5 +216,4 @@ export default {
 }
 </script>
 <style lang="less">
-@import "./home.less";
 </style>

+ 1 - 2
pages/home/share.vue

@@ -35,8 +35,8 @@
           <image class="none" v-else src="../../static/img/no-data.png" style="width: 100%" mode="aspectFit"></image>
         </template>
       </scroll-view>
-      <tab-bar tabbarValue='分享给我'></tab-bar>
     </view>
+    <tab-bar tabbarValue='分享给我'></tab-bar>
   </view>
 </template>
 <script>
@@ -121,5 +121,4 @@ export default {
 }
 </script>
 <style lang="less">
-@import "./home.less";
 </style>

+ 15 - 1
static/common/js/config.js

@@ -10,4 +10,18 @@ window._CONFIG={
   // 多用户项目部署地址
   APP_READY:'http://bi.9n1m.com',
   SENSORS_HOST: 'http://sp.platomix.net',
-}
+}
+// window._CONFIG={
+//   //埋点地址
+//   SENSORS_HOST: 'https://bireport-openresty-single.9n1m.com',
+//   //接口请求地址
+//   APIHead:'https://91iam-gateway.9n1m.com/bireport-single',
+//   //应用编码
+//   APP_CODING:'bireport-single',
+//   //iam组件base_urls
+//   VUE_APP_BASE_URLS:'https://91iam-inst.9n1m.com',
+//   //iam组件env 用户端inst
+//   VUE_APP_ENV:'inst',
+//   // 多用户项目部署域名
+//   APP_READY:'https://bireport-single.9n1m.com/bi/'
+// }