Bladeren bron

优化判断是否登录初始化完成逻辑

xiaohaizhao 1 jaar geleden
bovenliggende
commit
0a699d2e84
8 gewijzigde bestanden met toevoegingen van 162 en 112 verwijderingen
  1. 4 0
      App.vue
  2. 125 69
      cloud/businessCard/index.vue
  3. 14 15
      pages/index/index.vue
  4. 4 9
      pages/index/modules/bottomSuspensionFrame.vue
  5. 1 7
      store/budget/result.vue
  6. 3 7
      team/team/getInvite.vue
  7. 3 5
      utils/login.js
  8. 8 0
      utils/tool.js

+ 4 - 0
App.vue

@@ -21,6 +21,10 @@ export default {
 	onHide: function () {
 
 	},
+	globalData: {
+		systemInitIsComplete: null,
+		HomePageStartRendering: [],
+	},
 }
 </script>
 

+ 125 - 69
cloud/businessCard/index.vue

@@ -1,17 +1,21 @@
 <template>
-    <view class="self-card" :style="{'--height': tovw(+CustomBar+10)}">
-        <view class="footer" :style="{ height: (tovw(CustomBar).replace('vw',''))*375 / 100+'px'}" style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%);top: 0;">
-            <view class="custom" :style="{ height: (tovw(Custom.height).replace('vw',''))*375 / 100+'px', top:(tovw(Custom.top).replace('vw',''))*375 / 100+'px' }">
-                <view v-if="userInfo.name">{{userInfo.name}}的名片</view>
-                <view v-else>暂无信息</view>    
-                <view class="back" :style="{ lineHeight: (tovw(Custom.height).replace('vw',''))*375 / 100+'px' }" @click="onBack">
+    <view class="self-card" :style="{ '--height': tovw(+CustomBar + 10) }">
+        <view class="footer" :style="{ height: (tovw(CustomBar).replace('vw', '')) * 375 / 100 + 'px' }"
+            style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%);top: 0;">
+            <view class="custom"
+                :style="{ height: (tovw(Custom.height).replace('vw', '')) * 375 / 100 + 'px', top: (tovw(Custom.top).replace('vw', '')) * 375 / 100 + 'px' }">
+                <view v-if="userInfo.name">{{ userInfo.name }}的名片</view>
+                <view v-else>暂无信息</view>
+                <view class="back" :style="{ lineHeight: (tovw(Custom.height).replace('vw', '')) * 375 / 100 + 'px' }"
+                    @click="onBack">
                     <text class=" iconfont icon-a-wodetiaozhuan" />
                 </view>
             </view>
         </view>
-        <view class="head" :style="[{ height: tovw(+CustomBar+184) }]" style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%)">
+        <view class="head" :style="[{ height: tovw(+CustomBar + 184) }]"
+            style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%)">
             <view class="custom" :style="{ height: tovw(Custom.height), top: tovw(Custom.top - 3) }">
-                <view v-if="userInfo.name">{{userInfo.name}}的名片</view>
+                <view v-if="userInfo.name">{{ userInfo.name }}的名片</view>
                 <view v-else>暂无信息</view>
                 <view class="back" :style="{ lineHeight: tovw(Custom.height) }" @click="onBack">
                     <text class=" iconfont icon-a-wodetiaozhuan" />
@@ -23,14 +27,16 @@
                 <view class="header">
                     <view class="left">
                         <view class="title">
-                            <text>{{ userInfo.name||'暂无' }}</text>
-                            <text>{{ userInfo.rolenames||'暂无' }}</text>
+                            <text>{{ userInfo.name || '暂无' }}</text>
+                            <text>{{ userInfo.rolenames || '暂无' }}</text>
                         </view>
-                        <text class="phone">{{ userInfo.phonebumber||'暂无' }}</text>
+                        <text class="phone">{{ userInfo.phonebumber || '暂无' }}</text>
                         <view class="redline"></view>
                     </view>
                     <navigator class="right">
-                        <image :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" mode="aspectFill">
+                        <image
+                            :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
+                            mode="aspectFill">
                         </image>
                     </navigator>
                 </view>
@@ -38,18 +44,18 @@
                     <view class="left">
                         <view>
                             <i class="iconfont icon-qiye-hui"></i>
-                            <view class="text">{{ userInfo.enterprisename||'暂无' }}</view>
+                            <view class="text">{{ userInfo.enterprisename || '暂无' }}</view>
                         </view>
                         <view>
                             <i class="iconfont icon-youxiang"></i>
-                            <view class="text">{{ userInfo.email ||'暂无' }}</view>
+                            <view class="text">{{ userInfo.email || '暂无' }}</view>
                         </view>
                         <view style="margin-bottom: 0 !important;">
                             <i class="iconfont icon-dizhi_xian"></i>
-                            <view class="text u-line-2">{{ userInfo.address ||'暂无' }}</view>
+                            <view class="text u-line-2">{{ userInfo.address || '暂无' }}</view>
                         </view>
                     </view>
-                    <navigator class="right" :url="'/cloud/businessCard/share?id='+userid">
+                    <navigator class="right" :url="'/cloud/businessCard/share?id=' + userid">
                         <image class="code" src="/static/workbench/二维码.svg" />
                         <text>名片码</text>
                     </navigator>
@@ -61,15 +67,18 @@
                 <view class="left">
                     <view class="avatar">
                         <block v-for="item in userInfo.readusers">
-                            <image :src="item.headpic||'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" v-if="item.rowindex<4" :key="item.rowindex"/>
+                            <image
+                                :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
+                                v-if="item.rowindex < 4" :key="item.rowindex" />
                         </block>
                         <text style="color:#BBBBBB">...</text>
                     </view>
                     <view class="readcount">浏览了{{ userInfo.count_read }}</view>
-                </view>    
+                </view>
                 <navigator url="#" class="right" @click="goodClick">
-                    <i :class="['iconfont',userInfo.islike==1?' icon-yidianzan':' icon-weidianzan']" :style="{color:userInfo.islike?'#C30D23':'#666666'}"></i>
-                    <text>点赞{{ userInfo.count_like}}</text>
+                    <i :class="['iconfont', userInfo.islike == 1 ? ' icon-yidianzan' : ' icon-weidianzan']"
+                        :style="{ color: userInfo.islike ? '#C30D23' : '#666666' }"></i>
+                    <text>点赞{{ userInfo.count_like }}</text>
                 </navigator>
             </view>
             <view class="bottom">
@@ -83,13 +92,13 @@
                 </view>
             </view>
         </view>
-        
+
         <view class="user-info">
             <text class="title-max">简介</text>
             <view class="tag-box">
                 <text class="title-min">印象标签</text>
                 <view class="tag-list" v-if="userInfo.tag.length">
-                    <view class="tag" v-for="(item,index) in userInfo.tag" :key="index">{{ item }}</view>
+                    <view class="tag" v-for="(item, index) in userInfo.tag" :key="index">{{ item }}</view>
                 </view>
                 <text v-else style="font-weight: 500;font-size: 14px;color: #666666;">暂无</text>
             </view>
@@ -109,21 +118,21 @@
         </view>
 
         <view class="footer">
-            <navigator class="but" :url="'/cloud/businessCard/edit?id='+userid" @click="goEditPage">
+            <navigator class="but" :url="'/cloud/businessCard/edit?id=' + userid" @click="goEditPage">
                 <text>修改名片</text>
             </navigator>
         </view>
 
-        <u-popup :show="shareShow" mode="bottom" @close="shareShow=false">
+        <u-popup :show="shareShow" mode="bottom" @close="shareShow = false">
             <view class="share-box">
                 <contact openType="share">
                     <view class="item" hover-class="navigator-hover" @click="shareWx">
-                    <image mode="widthFix" src="/static/workbench/微信好友.svg" />
+                        <image mode="widthFix" src="/static/workbench/微信好友.svg" />
                         <text>微信好友</text>
                     </view>
                 </contact>
-                
-                <navigator class="item" :url="'/cloud/businessCard/share?id='+userid">
+
+                <navigator class="item" :url="'/cloud/businessCard/share?id=' + userid">
                     <image mode="widthFix" src="/static/workbench/名片海报.svg" />
                     <text>名片海报</text>
                 </navigator>
@@ -136,51 +145,51 @@
 import contact from "../../components/contact"
 import { viewImage } from "../../utils/settleFiles.js"
 export default {
-    components:{contact},
-    data () {
+    components: { contact },
+    data() {
         return {
-            userInfo:{tag:[],images:[]},
-            userid:uni.getStorageSync('userMsg').userid,
-            shareShow:false
+            userInfo: { tag: [], images: [] },
+            userid: uni.getStorageSync('userMsg').userid,
+            shareShow: false
         }
     },
     computed: {
     },
-    methods: {  
-        preview (url) {
+    methods: {
+        preview(url) {
             viewImage(url)
         },
-        goEditPage () {
-            this.$Http.editUser = function (id){
-                this.getuserInfo (id)
+        goEditPage() {
+            this.$Http.editUser = function (id) {
+                this.getuserInfo(id)
                 delete this.$Http.editUser
             }.bind(this)
         },
-        async getuserInfo (id) {
+        async getuserInfo(id) {
             let res = await this.$Http.basic({
                 "id": 20240514161502,
                 "content": {
-                    userid:id
+                    userid: id
                 },
             })
             this.userInfo = res.data
             this.userInfo.headpic = this.userInfo.attinfos.find(v => v.usetype == "headportrait") && this.userInfo.attinfos.find(v => v.usetype == "headportrait").url || '';
             this.userInfo.images = this.userInfo.attinfos.filter(v => v.usetype != "headportrait")
-            console.log(this.userInfo,'用户信息');
+            console.log(this.userInfo, '用户信息');
         },
-        shareClick () {
+        shareClick() {
             this.shareShow = true
         },
         onBack() {
             uni.navigateBack()
         },
-        async goodClick () {
+        async goodClick() {
             let res = await this.$Http.basic({
                 "id": 20240416133702,
                 "content": {
                     "ownertable": "sys_users",
                     "ownerid": this.userid,
-                    "type":2//1:收藏,2:点赞
+                    "type": 2//1:收藏,2:点赞
                 },
             })
             if (this.cutoff(res.msg)) return;
@@ -188,7 +197,7 @@ export default {
         },
         copy() {
             uni.setClipboardData({
-                data:this.userInfo.phonenumber,
+                data: this.userInfo.phonenumber,
                 success: (result) => {
                     uni.showToast({
                         title: "已复制",
@@ -207,20 +216,14 @@ export default {
         };
     },
     onLoad(options) {
-        console.log("被邀请加入团队", options)
-        const systemInitIsComplete = this.$Http.systemInitIsComplete;
-        if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
-            this.$Http.HomePageStartRendering = render(this)
-        } else {
-            render(this)
-        }
-        function render(that) {
+        this.isInitializeLogin(render.bind(this))
+        function render() {
             if (options.q) {
-                let params = that.getUrlParams(options.q);
+                let params = this.getUrlParams(options.q);
                 user.wechatBindUserid = params.wechatBindUserid;
-                that.userid = params.wechatBindUserid
+                this.userid = params.wechatBindUserid
             }
-            that.getuserInfo(that.userid)
+            this.getuserInfo(this.userid)
         }
     },
 }
@@ -231,6 +234,7 @@ export default {
     .head {
         position: relative;
         width: 100vw;
+
         .bg-bottom {
             position: absolute;
             bottom: -1px;
@@ -238,6 +242,7 @@ export default {
             width: 100vw;
 
         }
+
         .custom {
             position: absolute;
             width: 100vw;
@@ -258,36 +263,42 @@ export default {
                 transform: rotateY(180deg);
             }
         }
+
         .card {
             width: 355px;
             height: 220px;
             box-sizing: border-box;
             background: #FFFFFF;
-            box-shadow: 0px 2px 10px 1px rgba(0,0,0,0.16);
+            box-shadow: 0px 2px 10px 1px rgba(0, 0, 0, 0.16);
             border-radius: 8px 8px 8px 8px;
             position: absolute;
             top: var(--height);
             left: 10px;
             padding: 20px;
             font-family: Source Han Sans SC, Source Han Sans SC;
+
             .header {
                 display: flex;
                 justify-content: space-between;
                 align-content: center;
                 align-items: center;
+
                 .left {
                     display: flex;
                     flex-direction: column;
                     justify-content: space-between;
+
                     .title {
                         display: flex;
                         align-items: center;
+
                         text {
                             &:first-child {
                                 font-weight: 500;
                                 font-size: 18px;
                                 color: #333333;
                             }
+
                             &:last-child {
                                 font-weight: 400;
                                 font-size: 12px;
@@ -295,13 +306,16 @@ export default {
                                 margin-left: 10px;
                             }
                         }
+
                         margin-bottom: 5px;
                     }
+
                     .phone {
                         font-weight: 500;
                         font-size: 16px;
                         color: #333333;
                     }
+
                     .redline {
                         width: 24px;
                         height: 2px;
@@ -309,6 +323,7 @@ export default {
                         margin-top: 15px;
                     }
                 }
+
                 .right {
                     width: 56px;
                     height: 56px;
@@ -316,6 +331,7 @@ export default {
                     box-shadow: 0px 3px 6px 1px #E0D6D7;
                     border: 2px solid #FFFFFF;
                     border-radius: 50%;
+
                     image {
                         width: 100%;
                         height: 100%;
@@ -323,42 +339,50 @@ export default {
                     }
                 }
             }
+
             .bottom {
                 display: flex;
-                justify-content: space-between;                
+                justify-content: space-between;
                 font-family: Source Han Sans SC, Source Han Sans SC;
                 font-weight: 400;
                 font-size: 12px;
                 color: #666666;
                 margin-top: 22px;
+
                 .left {
                     display: flex;
                     flex-direction: column;
+
                     >view {
                         margin-bottom: 13px;
                         display: flex;
                         align-content: center;
                         align-items: center;
+
                         i {
                             font-size: 16px;
                         }
+
                         .text {
                             margin-left: 10px;
                             max-width: 211px;
                         }
                     }
                 }
+
                 .right {
                     display: flex;
                     flex-direction: column;
                     align-items: center;
                     align-content: center;
+
                     text {
                         font-weight: 400;
                         font-size: 12px;
                         color: #666666;
-                        
+
                     }
+
                     .code {
                         width: 32px;
                         height: 32px;
@@ -368,10 +392,12 @@ export default {
             }
         }
     }
+
     .card-handle {
         padding: 50px 10px 20px 10px;
         background: #ffffff;
         margin-top: 15px;
+
         .top {
             display: flex;
             justify-content: space-between;
@@ -380,48 +406,58 @@ export default {
             font-family: Source Han Sans SC, Source Han Sans SC;
             font-size: 12px;
             color: #999999;
+
             .left {
                 display: flex;
                 flex-direction: column;
+
                 .avatar {
                     display: flex;
-                    align-items:flex-start;
+                    align-items: flex-start;
                     align-content: center;
+
                     image {
                         margin-right: 5px;
                         width: 24px;
                         height: 24px;
                     }
+
                     text {
                         transform: scale(1.5);
                     }
                 }
-                .readcount{
+
+                .readcount {
                     margin-top: 5px;
                     display: block;
                 }
             }
+
             .right {
                 display: flex;
                 flex-direction: column;
                 align-content: center;
                 align-items: center;
+
                 i {
                     display: block;
                     color: #666666;
                 }
+
                 text {
                     margin-top: 5px;
                     display: block;
                 }
             }
         }
+
         .bottom {
             display: flex;
             justify-content: space-between;
             align-items: center;
             align-content: center;
             margin-top: 25px;
+
             .but {
                 display: flex;
                 align-items: center;
@@ -435,33 +471,39 @@ export default {
                 height: 50px;
                 line-height: 50px;
                 text-align: center;
+
                 &:nth-child(1) {
                     background: #FFFFFF;
                     border: 1px solid #CCCCCC;
                     color: #666666;
                 }
+
                 &:nth-child(2) {
                     background: #C30D23;
                     color: #FFFFFF;
                 }
+
                 view {
                     margin-right: 10px;
                 }
             }
         }
     }
+
     .user-info {
         padding: 12px 10px 70px 10px;
         font-family: PingFang SC, PingFang SC;
         background: #ffffff;
         margin-top: 10px;
-        .title-min{
+
+        .title-min {
             margin-bottom: 10px;
             font-weight: 500;
             font-size: 14px;
             color: #666666;
             display: block;
         }
+
         .title-max {
             margin-bottom: 21px;
             font-weight: 500;
@@ -469,16 +511,20 @@ export default {
             color: #333333;
             display: block;
         }
+
         .tag-box {
             display: flex;
             flex-direction: column;
             margin-bottom: 20px;
-            .title-min{}
-            .tag-list{
+
+            .title-min {}
+
+            .tag-list {
                 display: flex;
                 align-content: center;
                 align-items: center;
                 flex-wrap: wrap;
+
                 .tag {
                     margin-right: 10px;
                     padding: 6px 10px;
@@ -488,25 +534,30 @@ export default {
                     font-weight: 400;
                     font-size: 14px;
                     color: #333333;
+
                     &:last-child {
                         margin-right: 0;
                     }
                 }
             }
         }
+
         .descript-box {
             margin-bottom: 20px;
             display: flex;
             flex-direction: column;
+
             .descript {
                 font-weight: 400;
                 font-size: 14px;
                 color: #666666;
             }
         }
+
         .image-box {
             display: flex;
             flex-direction: column;
+
             .image {
                 width: 100%;
                 height: 240px;
@@ -514,6 +565,7 @@ export default {
             }
         }
     }
+
     .footer {
         display: flex;
         align-items: center;
@@ -527,6 +579,7 @@ export default {
         box-sizing: border-box;
         z-index: 9;
         padding: 5px 10px;
+
         .custom {
             position: absolute;
             width: 100vw;
@@ -547,7 +600,8 @@ export default {
                 transform: rotateY(180deg);
             }
         }
-        .but { 
+
+        .but {
             width: 355px;
             height: 45px;
             font-family: PingFang SC, PingFang SC;
@@ -571,15 +625,18 @@ export default {
     align-items: center;
     align-content: center;
     justify-content: space-evenly;
+
     .item {
         display: flex;
         flex-direction: column;
-        align-items:center;
-        align-content:center;
+        align-items: center;
+        align-content: center;
+
         image {
-            width:50px;
-            height:50px;
+            width: 50px;
+            height: 50px;
         }
+
         text {
             margin-top: 5px;
             font-family: Source Han Sans SC, Source Han Sans SC;
@@ -589,5 +646,4 @@ export default {
         }
     }
 }
-
 </style>

+ 14 - 15
pages/index/index.vue

@@ -16,6 +16,9 @@
 </template>
 
 <script>
+import Vue from 'vue';
+
+
 import index from './index/index.vue'
 import store from './index/store.vue'
 import myCase from './index/myCase.vue'
@@ -46,27 +49,22 @@ export default {
 			this.user.userName = options.userName;
 		}
 		if (options.q) this.user = this.getUrlParams(options.q);
-
 	},
 	onShow() {
-		const systemInitIsComplete = this.$Http.systemInitIsComplete;
-		if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
-			this.$Http.HomePageStartRendering = render(this)
-		} else {
-			render(this)
-		}
-		function render(that) {
-			that.$Http.changePage = function (itemId, page, params) {
-				that.$refs.pages.onClick(itemId, page, false, params)
-			}.bind(that)
+		this.isInitializeLogin(render.bind(this))
+		function render() {
+			let that = this;
+			this.$Http.changePage = function (itemId, page, params) {
+				this.$refs.pages.onClick(itemId, page, false, params)
+			}.bind(this)
 			// #ifdef MP-WEIXIN
-			that.updatePageData(that.swiperItemID, that.page)
+			this.updatePageData(this.swiperItemID, this.page)
 			// #endif
-			if (that.user.wechatBindUserid) {
-				console.log("被邀请绑定账号", that.user);
+			if (this.user.wechatBindUserid) {
+				console.log("被邀请绑定账号", this.user);
 				uni.showModal({
 					title: '提醒',
-					content: `账号"${that.user.userName}"是否与当前微信号绑定`,
+					content: `账号"${this.user.userName}"是否与当前微信号绑定`,
 					confirmText: '确定绑定',
 					success: function ({ confirm }) {
 						if (confirm) uni.login({
@@ -108,6 +106,7 @@ export default {
 		}
 	},
 	methods: {
+
 		updatePageData(itemId, page) {
 			if (this.$refs[this.page].updatePage) this.$refs.pages.onClick(itemId, page)
 		},

+ 4 - 9
pages/index/modules/bottomSuspensionFrame.vue

@@ -73,17 +73,12 @@ export default {
     },
     methods: {
         init() {
-            const systemInitIsComplete = this.$Http.systemInitIsComplete;
-            if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
-                this.$Http.HomePageStartRendering = render(this)
-            } else {
-                render(this)
-            }
-            function render(that) {
+            this.isInitializeLogin(render.bind(this))
+            function render() {
                 let sightseer = uni.getStorageSync('userMsg').usertype == 99;
-                that.sightseer = sightseer;
+                this.sightseer = sightseer;
                 console.log('是否游客', sightseer)
-                if (sightseer) that.index = that.index.concat({ name: "我的" })
+                if (sightseer) this.index = this.index.concat({ name: "我的" })
             }
         },
         onClick(current, name, update = false, params = null) {

+ 1 - 7
store/budget/result.vue

@@ -40,16 +40,10 @@ export default {
         console.log("options", options)
         let data = JSON.parse(options.data);
         this.extrajson = data;
-
         uni.setNavigationBarTitle({
             title: '装修预算'
         });
-        const systemInitIsComplete = this.$Http.systemInitIsComplete;
-        if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
-            this.$Http.HomePageStartRendering = render(this)
-        } else {
-            render(this)
-        }
+        this.isInitializeLogin(render.bind(this))
         function render(that) {
             that.calculate(options.sa_storeid || uni.getStorageSync('shop').sa_storeid)
         }

+ 3 - 7
team/team/getInvite.vue

@@ -52,13 +52,9 @@ export default {
         }
     },
     onLoad(options) {
-        const systemInitIsComplete = this.$Http.systemInitIsComplete;
-        if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
-            this.$Http.HomePageStartRendering = render(this)
-        } else {
-            render(this)
-        }
-        function render(that) {
+        this.isInitializeLogin(render.bind(this))
+        function render() {
+            let that = this;
             let count = setInterval(() => {
                 if (uni.getStorageSync('userMsg').token) {
                     clearInterval(count)

+ 3 - 5
utils/login.js

@@ -86,8 +86,6 @@ function parsingAuth(list) {
     })
     uni.setStorageSync('authList', authList)
 }
-
-
 class Login {
     wechatLogin() {
         return new Promise((resolve, reject) => {
@@ -104,9 +102,9 @@ class Login {
                             key: 'userMsg',
                         })
                         uni.setStorageSync('userMsg', res.account_list[0])
-                        Vue.prototype.$Http.systemInitIsComplete = Promise.all([query_userauth(), querySite_Parameter(), querySite()]).then(res => {
-                            Vue.prototype.$Http.systemInitIsComplete = true
-                            Vue.prototype.$Http.HomePageStartRendering && Vue.prototype.$Http.HomePageStartRendering()
+                        getApp().globalData.systemInitIsComplete = Promise.all([query_userauth(), querySite_Parameter(), querySite()]).then(res => {
+                            getApp().globalData.systemInitIsComplete = true
+                            getApp().globalData.HomePageStartRendering.forEach(v => v())
                         })
                     })
                 }

+ 8 - 0
utils/tool.js

@@ -293,6 +293,14 @@ function mount() {
         }
         console.log(app);
     }
+    Vue.prototype.isInitializeLogin = (fun) => {
+        const systemInitIsComplete = getApp().globalData.systemInitIsComplete;
+        if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
+            getApp().globalData.HomePageStartRendering.push(fun)
+        } else {
+            fun()
+        }
+    }
 }
 
 module.exports = {