是否是ios环境

This commit is contained in:
duan
2025-01-14 11:41:13 +08:00
parent ac16bec455
commit 976a192437
2 changed files with 109 additions and 112 deletions

21
App.vue
View File

@@ -1,22 +1,15 @@
<script> <script>
import { ref } from 'vue'; import {
ref
} from 'vue';
export default { export default {
onLaunch: function() { onLaunch: function() {
console.log('App Launch'); console.log('App Launch');
// const systemInfo = uni.getSystemInfoSync(); const sysInfo = uni.getSystemInfoSync();
// const isA = systemInfo.platform === 'android' let isIos = sysInfo.platform == 'ios'
// if (isA) { uni.setStorageSync('isIos', isIos)
// uni.setStorageSync('isAI', true)
// } else {
// uni.setStorageSync('isAI', false)
// }
}, },
onShow: function() { onShow: function() {
}, },
onHide: function() { onHide: function() {
console.log('App Hide'); console.log('App Hide');
@@ -114,9 +107,11 @@ web-view {
top: 800rpx; top: 800rpx;
transform: translateX(-50%); transform: translateX(-50%);
} }
.u-image { .u-image {
background-color: transparent !important; background-color: transparent !important;
} }
.u-status-bar { .u-status-bar {
height: var(--status-bar-height); height: var(--status-bar-height);
} }

View File

@@ -101,7 +101,9 @@ import {
onShow(() => { onShow(() => {
getTaskdata() getTaskdata()
getsignIn() getsignIn()
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'
console.log("is ios ", isIos);
// nextTick(() => { // nextTick(() => {
// currentInstance.ctx.$refs.adRewardedVideo.load(); // currentInstance.ctx.$refs.adRewardedVideo.load();
// }) // })