优化手机显示效果

This commit is contained in:
gyq 2025-01-09 09:24:48 +08:00
parent 81d57343a2
commit b81a4ab5cd
4 changed files with 26 additions and 19 deletions

View File

@ -2,7 +2,7 @@
"version" : "1.0",
"configurations" : [
{
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android"
}
]

30
App.vue
View File

@ -1,9 +1,9 @@
<script>
import { init } from '@/api/init.js'
import http from '@/http/http.js'
import { init } from '@/api/init.js';
import http from '@/http/http.js';
export default {
onLaunch: function () {
console.log('App Launch')
console.log('App Launch');
// const systemInfo = uni.getSystemInfoSync();
// const isA = systemInfo.platform === 'android'
// if (isA) {
@ -11,28 +11,27 @@ export default {
// } else {
// uni.setStorageSync('isAI', false)
// }
},
onShow: function () {
init()
init();
// ios
http.request({
url: '/common/type/919',
}).then(res => {
url: '/common/type/919'
}).then((res) => {
if (res.code == 0) {
uni.setStorageSync('isExamine', res.data.value)
uni.setStorageSync('isExamine', res.data.value);
}
})
});
},
onHide: function () {
console.log('App Hide')
console.log('App Hide');
}
}
};
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-plus/index.scss";
@import 'uview-plus/index.scss';
ul,
li {
@ -119,7 +118,10 @@ web-view {
top: 800rpx;
transform: translateX(-50%);
}
.u-image{
background-color: transparent!important;
.u-image {
background-color: transparent !important;
}
.u-status-bar {
height: var(--status-bar-height);
}
</style>

View File

@ -61,10 +61,12 @@ onLoad((e) => {
});
</script>
<style scoped lang="scss">
<style>
page {
background: #f5f5f5;
}
</style>
<style scoped lang="scss">
.container {
padding: 28upx;
}

View File

@ -167,11 +167,14 @@ onShow(() => {
});
</script>
<style>
page {
background: #f5f7ff;
}
</style>
<style scoped lang="scss">
$bgColor: #f5f7ff;
page {
background: $bgColor;
}
.container {
font-size: 28upx;
color: #333;