修复动画不兼容老旧设备的bug

This commit is contained in:
weipengfei 2023-08-24 10:54:54 +08:00
parent 694cad2ed8
commit be9991340b
3 changed files with 16 additions and 4 deletions

View File

@ -7,7 +7,7 @@
:class="!ApproveList.length > 0 ? 'home_header_no_data' : ''" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''"
> >
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0 0 30rpx 30rpx;"> <view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0 0 30rpx 30rpx;">
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 400rpx;transform: scale(1.2);"/> <hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 400rpx;transform: scale(1.2);background-color: #033d94;"/>
</view> </view>
<!-- #ifdef APP-PLUS||H5 --> <!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height)"></view> <view style="height: var(--status-bar-height)"></view>

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="login"> <view class="login">
<!-- <image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image> --> <!-- <image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image> -->
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 100vh;transform: scale(1.1)"/> <hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 100vh;transform: scale(1.3);background-color: #033d94;"/>
<!-- #ifdef APP-PLUS||H5 --> <!-- #ifdef APP-PLUS||H5 -->
<!-- <view style="height: var(--status-bar-height)"></view> --> <!-- <view style="height: var(--status-bar-height)"></view> -->
<!-- #endif --> <!-- #endif -->
@ -75,6 +75,18 @@
onLoad() { onLoad() {
this.options.data = bj; this.options.data = bj;
// this.$refs.lottie.call('play'); // this.$refs.lottie.call('play');
uni.getSystemInfo({
success: function (res) {
//
var screenWidth = res.windowWidth;
//
var screenHeight = res.windowHeight;
//
var screenRatio = screenWidth / screenHeight;
console.log("屏幕比例:" + screenRatio);
}
});
}, },
methods: { methods: {
changeTabs(e) { changeTabs(e) {
@ -214,7 +226,7 @@
.body { .body {
position: absolute; position: absolute;
top: 50%; top: 45%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
display: flex; display: flex;

View File

@ -3,7 +3,7 @@
<view class="head_box" style="position: relative;"> <view class="head_box" style="position: relative;">
<!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> --> <!-- <image class="head_img" src="../../static/img/home/head-bg.png"></image> -->
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0 0 30rpx 30rpx;"> <view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0 0 30rpx 30rpx;">
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 400rpx;transform: scale(1.2);"/> <hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 400rpx;transform: scale(1.2);background-color: #033d94;"/>
</view> </view>
<!-- #ifdef APP-PLUS||H5 --> <!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view> <view style="height: var(--status-bar-height);"></view>