2***@qq.com
2***@qq.com
  • 发布:2020-06-14 16:51
  • 更新:2020-06-14 16:51
  • 阅读:486

【报Bug】 hbx 2.6.9 使用v3模式打包页面渲染卡顿 css样式也渲染不出来

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: 正式

HBuilderX版本号: 2.6.9

手机系统: Android

手机系统版本号: Android 9.0

手机厂商: 华为

手机机型: 华为畅享9

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

App下载地址或H5⽹址: https://service.dcloud.net.cn/build/download/0e94c040-ae18-11ea-bf54-2f6011f02613

示例代码:

<template>
<view class="content" :style="{ height: screenHeight }">
<view class="status_bar_fixed" v-show="nvabarShow"></view>
<view class="userTop">
<view class="userCode flexStart">
<view class="userimg">
<!-- <view class="userimg animated rotateIn delay-1s"> -->
<image v-if="userInfo.userData.avatar" :src="uploadurl+userInfo.userData.avatar"></image>
</view>
<view class="userma">
<view style="font-size: 38upx;">{{userInfo.username}}</view>
<view style="font-size: 26upx;color:#B9BACB;">ID:{{userInfo.id}}</view>
</view>
</view>
<view class="toprow flexbetween">
<view class="rowleft flexaround" @click="openurl('/pages/user/members')">
<image src="/static/new/rowleft.png"></image>
<text>社區中心</text>
</view>
<view class="rowleft flexaround" @click="openurl('/pages/user/safe-center')">
<image src="/static/new/rowright.png"></image>
<text>安全中心</text>
</view>
</view>
</view>
<view class="sharimg flexcenter" @click="openurl('/pages/mine/shafa')">
<image class="img" src="/static/new/shareimg.png"></image>
</view>
<view class="allbox">
<view class="forlistbox">
<!-- <view class="forlistbox animated fadeInUp"> -->
<view class="forlist" v-if='userInfo.real_status == 3 || userInfo.real_status == 0' @click="openurl('/pages/user/userauth')" >
<image src="../../static/new/uu1.png" class="rimg"></image>
<view class="listname">去實名認證</view>
<view style="font-size: 26upx;color:#fff;">{{userInfo.real_status_text}}</view><uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
<view class="forlist" v-else >
<image src="../../static/new/uu1.png" class="rimg"></image>
<view class="listname">實名認證</view>
<view style="font-size: 26upx;color:#fff;">{{userInfo.real_status_text}}</view><uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
</view>
<view class="forlistbox">
<view class="forlist" @click="openurl('/pages/user/setting')">
<image src="../../static/new/uu2.png" class="rimg"></image>
<view class="listname">設置中心</view>
<uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
</view>
<view class="forlistbox ">
<view class="forlist" @click="openurl('/pages/user/aboutme')" >
<image src="../../static/new/uu3.png" class="rimg"></image>
<view class="listname">關於我們</view>
<uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
</view>

    </view>  
</view>  

</template>
<script>
import util from '../../static/js/util.js';
import regex from '../../static/js/regex.js';
import {
mapGetters,
mapActions,
mapState
} from 'vuex';
export default {
computed: {
...mapGetters(['statusBarHeight', 'screenHeight']),
},
data() {
return {
nvabarShow: false,
userinfo: null,
userInfo:{},
uploadurl:util.uploadurl
};
},

    onShow() {  
            this.getUserInfo();  
    },  
    onPullDownRefresh(){  
          this.getUserInfo();  
    },  
    onPageScroll({scrollTop}) {  
        // this.nvabarShow = scrollTop > 40;  
    },  
    methods: {  
        // 获取用户信息  
        getUserInfo(){  
            util.getUserInfo(()=> {  
                uni.stopPullDownRefresh();  
                this.userInfo=uni.getStorageSync("userInfo").user;  
            });  
        },  
        // 獲取推薦價格  
        getrecommend_price() {  
            var that = this;  
            var option = {};  
            option.url = 'user/order/list';  
            option.data = {  

            };  
            option.success = function(res) {  
                // regex.showtoast(res.msg);  
                if (res.code) {  
                    that.recommend_price=res.data.config.recommend_price;  
                }  
            };  
            option.fail = function(res) {  
                regex.showtoast("網絡異常")  
            };  
            util.ajaxGet(option);  
        },  
        // 復制邀請碼  
        copyCode(con){  
            uni.setClipboardData({  
                data: con,  
                success: function(res) {  
                    uni.getClipboardData({  
                        success: function(res) {  
                            uni.showToast({  
                                title: '已復制到剪貼板'  
                            });  
                        }  
                    });  
                }  
            });  
        },  
        closeurl(url) {  
            regex.showtoast('平臺接入中')  
        },  
        webopenurl(url) {  
            uni.redirectTo({  
                url: url  
            })  
        },  
        openurl(url) {  
            if(url == ""){  
                regex.showtoast('開發中')  
            }else{  
                uni.navigateTo({  
                    url: url  
                });  
            }  
        },  
        // 獲取簽到記錄值  
        outlogin() {  

            // 驗證驗證碼的正確與否  
            var that = this;  
            var option = {};  
            option.url = "front/wallet/customer/information/logout";  
            option.success = function(res) {  
                 if(res.code){  

                 }  
            }  
            util.ajaxPost(option);  
        },  
        // 註冊  
        changelist() {  
            this.cat_box_show == false ? (this.cat_box_show = true) : (this.cat_box_show = false);  
        }  
    }  
};  

</script>
<style lang="scss" scoped>

.content{
background-color: #33333E;
position: fixed;
left:0;
top:0;
.userTop{
width:670upx;
height: 310upx;
background: #33333E;
padding:0 40upx;
padding-top:100upx;
.userCode{
height: 124upx;
font-size:26px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(255,255,255,1);
margin-bottom: 30upx;
.userimg{
width:124upx;
height: 124upx;
border-radius: 50%;
margin-right: 15upx;
overflow: hidden;
background: #545869;
image{
width:100%;
height: 100%;

            }  
        }  
        .usercopy{  
            width:74px;  
            height:34px;  
            background:rgba(255,255,255,0.2);  
            border-radius:17px;  
            margin-left:15upx;  
            color:rgba(255,255,255,1);  
        }  

    }  
    .toprow{  
        height: 138upx;  
        margin-top:20upx;  
        .rowleft{  
            width: 284upx;  
            height: 138upx;  
            background: #61667B;  
            border-radius: 10upx;  
            color:#fff;  
            padding:0 20upx;  
            font-size: 32upx;  
            image{  
                width: 88upx;  
                height: 88upx;  
                border-radius: 50%;  
                overflow: hidden;  
            }  
        };  
    }  
}  
.status_bar_fixed{  
    position: fixed;  
    top: 0;  
    left: 0;  
    z-index: 999;  
    height: var(--status-bar-height);  
    width: 100%;  
    background-color: #FD6158;  
}  

.allbox{  
    padding:40upx 20upx;  
    padding-bottom: 100upx;  
    .forlist{  
        display: flex;  
        align-items: center;  
        padding: 28rpx 20upx;  
        margin-bottom: 20upx;  
        transition: all .3s;  
        background-color: #545763;  
        border-radius: 10upx;  
        .rimg{  
            height: 56rpx;  
            width: 56rpx;  
            margin-right: 28rpx;  
            vertical-align: middle;  
        }  
        .listname{  
            display: inline-block;  
            font-size: 28rpx;  
            line-height: 56rpx;  
            flex: 1;  
            color: #fff;  
        }  
        .verify_status{  
            height: 26rpx;  
            width: 26rpx;  
            vertical-align: middle;  
        }  
        .right-icon{  
            font-size: 42rpx;  
            line-height: 56rpx;  
            color: #999;  
            vertical-align: middle;  
        }  
    }  
    .forlistbox{  
        padding: 0 22rpx;  
    }  
    // .forlistbox:active{  
    //  background-color: #eee;  
    // }  
}  
.sharimg{  
     height: 160upx;  
     margin-top: 5upx;  
    .img{  
        width:670upx;  
        height: 160upx;  

    }  
}  

}
</style>

操作步骤:

<template>
<view class="content" :style="{ height: screenHeight }">
<view class="status_bar_fixed" v-show="nvabarShow"></view>
<view class="userTop">
<view class="userCode flexStart">
<view class="userimg">
<!-- <view class="userimg animated rotateIn delay-1s"> -->
<image v-if="userInfo.userData.avatar" :src="uploadurl+userInfo.userData.avatar"></image>
</view>
<view class="userma">
<view style="font-size: 38upx;">{{userInfo.username}}</view>
<view style="font-size: 26upx;color:#B9BACB;">ID:{{userInfo.id}}</view>
</view>
</view>
<view class="toprow flexbetween">
<view class="rowleft flexaround" @click="openurl('/pages/user/members')">
<image src="/static/new/rowleft.png"></image>
<text>社區中心</text>
</view>
<view class="rowleft flexaround" @click="openurl('/pages/user/safe-center')">
<image src="/static/new/rowright.png"></image>
<text>安全中心</text>
</view>
</view>
</view>
<view class="sharimg flexcenter" @click="openurl('/pages/mine/shafa')">
<image class="img" src="/static/new/shareimg.png"></image>
</view>
<view class="allbox">
<view class="forlistbox">
<!-- <view class="forlistbox animated fadeInUp"> -->
<view class="forlist" v-if='userInfo.real_status == 3 || userInfo.real_status == 0' @click="openurl('/pages/user/userauth')" >
<image src="../../static/new/uu1.png" class="rimg"></image>
<view class="listname">去實名認證</view>
<view style="font-size: 26upx;color:#fff;">{{userInfo.real_status_text}}</view><uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
<view class="forlist" v-else >
<image src="../../static/new/uu1.png" class="rimg"></image>
<view class="listname">實名認證</view>
<view style="font-size: 26upx;color:#fff;">{{userInfo.real_status_text}}</view><uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
</view>
<view class="forlistbox">
<view class="forlist" @click="openurl('/pages/user/setting')">
<image src="../../static/new/uu2.png" class="rimg"></image>
<view class="listname">設置中心</view>
<uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
</view>
<view class="forlistbox ">
<view class="forlist" @click="openurl('/pages/user/aboutme')" >
<image src="../../static/new/uu3.png" class="rimg"></image>
<view class="listname">關於我們</view>
<uni-view class="right-icon uni-icon uni-icon-arrowright"></uni-view>
</view>
</view>

    </view>  
</view>  

</template>
<script>
import util from '../../static/js/util.js';
import regex from '../../static/js/regex.js';
import {
mapGetters,
mapActions,
mapState
} from 'vuex';
export default {
computed: {
...mapGetters(['statusBarHeight', 'screenHeight']),
},
data() {
return {
nvabarShow: false,
userinfo: null,
userInfo:{},
uploadurl:util.uploadurl
};
},

    onShow() {  
            this.getUserInfo();  
    },  
    onPullDownRefresh(){  
          this.getUserInfo();  
    },  
    onPageScroll({scrollTop}) {  
        // this.nvabarShow = scrollTop > 40;  
    },  
    methods: {  
        // 获取用户信息  
        getUserInfo(){  
            util.getUserInfo(()=> {  
                uni.stopPullDownRefresh();  
                this.userInfo=uni.getStorageSync("userInfo").user;  
            });  
        },  
        // 獲取推薦價格  
        getrecommend_price() {  
            var that = this;  
            var option = {};  
            option.url = 'user/order/list';  
            option.data = {  

            };  
            option.success = function(res) {  
                // regex.showtoast(res.msg);  
                if (res.code) {  
                    that.recommend_price=res.data.config.recommend_price;  
                }  
            };  
            option.fail = function(res) {  
                regex.showtoast("網絡異常")  
            };  
            util.ajaxGet(option);  
        },  
        // 復制邀請碼  
        copyCode(con){  
            uni.setClipboardData({  
                data: con,  
                success: function(res) {  
                    uni.getClipboardData({  
                        success: function(res) {  
                            uni.showToast({  
                                title: '已復制到剪貼板'  
                            });  
                        }  
                    });  
                }  
            });  
        },  
        closeurl(url) {  
            regex.showtoast('平臺接入中')  
        },  
        webopenurl(url) {  
            uni.redirectTo({  
                url: url  
            })  
        },  
        openurl(url) {  
            if(url == ""){  
                regex.showtoast('開發中')  
            }else{  
                uni.navigateTo({  
                    url: url  
                });  
            }  
        },  
        // 獲取簽到記錄值  
        outlogin() {  

            // 驗證驗證碼的正確與否  
            var that = this;  
            var option = {};  
            option.url = "front/wallet/customer/information/logout";  
            option.success = function(res) {  
                 if(res.code){  

                 }  
            }  
            util.ajaxPost(option);  
        },  
        // 註冊  
        changelist() {  
            this.cat_box_show == false ? (this.cat_box_show = true) : (this.cat_box_show = false);  
        }  
    }  
};  

</script>
<style lang="scss" scoped>

.content{
background-color: #33333E;
position: fixed;
left:0;
top:0;
.userTop{
width:670upx;
height: 310upx;
background: #33333E;
padding:0 40upx;
padding-top:100upx;
.userCode{
height: 124upx;
font-size:26px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(255,255,255,1);
margin-bottom: 30upx;
.userimg{
width:124upx;
height: 124upx;
border-radius: 50%;
margin-right: 15upx;
overflow: hidden;
background: #545869;
image{
width:100%;
height: 100%;

            }  
        }  
        .usercopy{  
            width:74px;  
            height:34px;  
            background:rgba(255,255,255,0.2);  
            border-radius:17px;  
            margin-left:15upx;  
            color:rgba(255,255,255,1);  
        }  

    }  
    .toprow{  
        height: 138upx;  
        margin-top:20upx;  
        .rowleft{  
            width: 284upx;  
            height: 138upx;  
            background: #61667B;  
            border-radius: 10upx;  
            color:#fff;  
            padding:0 20upx;  
            font-size: 32upx;  
            image{  
                width: 88upx;  
                height: 88upx;  
                border-radius: 50%;  
                overflow: hidden;  
            }  
        };  
    }  
}  
.status_bar_fixed{  
    position: fixed;  
    top: 0;  
    left: 0;  
    z-index: 999;  
    height: var(--status-bar-height);  
    width: 100%;  
    background-color: #FD6158;  
}  

.allbox{  
    padding:40upx 20upx;  
    padding-bottom: 100upx;  
    .forlist{  
        display: flex;  
        align-items: center;  
        padding: 28rpx 20upx;  
        margin-bottom: 20upx;  
        transition: all .3s;  
        background-color: #545763;  
        border-radius: 10upx;  
        .rimg{  
            height: 56rpx;  
            width: 56rpx;  
            margin-right: 28rpx;  
            vertical-align: middle;  
        }  
        .listname{  
            display: inline-block;  
            font-size: 28rpx;  
            line-height: 56rpx;  
            flex: 1;  
            color: #fff;  
        }  
        .verify_status{  
            height: 26rpx;  
            width: 26rpx;  
            vertical-align: middle;  
        }  
        .right-icon{  
            font-size: 42rpx;  
            line-height: 56rpx;  
            color: #999;  
            vertical-align: middle;  
        }  
    }  
    .forlistbox{  
        padding: 0 22rpx;  
    }  
    // .forlistbox:active{  
    //  background-color: #eee;  
    // }  
}  
.sharimg{  
     height: 160upx;  
     margin-top: 5upx;  
    .img{  
        width:670upx;  
        height: 160upx;  

    }  
}  

}
</style>

预期结果:

css渲染正常显示

实际结果:

css渲染卡顿延迟严重

bug描述:

2020-06-14 16:51 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复