是否是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

215
App.vue
View File

@@ -1,123 +1,118 @@
<script> <script>
import { ref } from 'vue'; import {
export default { ref
onLaunch: function () { } from 'vue';
console.log('App Launch'); export default {
// const systemInfo = uni.getSystemInfoSync(); onLaunch: function() {
// const isA = systemInfo.platform === 'android' console.log('App Launch');
// if (isA) { const sysInfo = uni.getSystemInfoSync();
// uni.setStorageSync('isAI', true) let isIos = sysInfo.platform == 'ios'
// } else { uni.setStorageSync('isIos', isIos)
// uni.setStorageSync('isAI', false) },
// } onShow: function() {
},
onHide: function() {
console.log('App Hide');
}, }
onShow: function () { };
},
onHide: function () {
console.log('App Hide');
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "uview-plus/index.scss"; @import "uview-plus/index.scss";
@import "@/commons/style/common.scss"; @import "@/commons/style/common.scss";
ul, ul,
li { li {
list-style: none; list-style: none;
} }
.show { .show {
display: block; display: block;
} }
.hidden { .hidden {
display: none !important; display: none !important;
} }
page, page,
view, view,
scroll-view, scroll-view,
swiper, swiper,
swiper-item, swiper-item,
match-media, match-media,
movable-area, movable-area,
movable-view, movable-view,
cover-view, cover-view,
cover-image, cover-image,
icon, icon,
text, text,
rich-text, rich-text,
progress, progress,
button, button,
checkbox-group, checkbox-group,
editor, editor,
form, form,
input, input,
label, label,
picker, picker,
picker-view, picker-view,
radio-group, radio-group,
slider, slider,
switch, switch,
textarea, textarea,
navigator, navigator,
audio, audio,
camera, camera,
image, image,
video, video,
live-player, live-player,
live-pusher, live-pusher,
map, map,
canvas, canvas,
web-view { web-view {
box-sizing: border-box; box-sizing: border-box;
padding: 0; padding: 0;
margin: 0; margin: 0;
text-decoration: none; text-decoration: none;
outline: none; outline: none;
} }
.initStyle { .initStyle {
padding: 20rpx; padding: 20rpx;
background-color: #2a2a2a; background-color: #2a2a2a;
height: 100vh; height: 100vh;
color: #fff; color: #fff;
} }
.fc { .fc {
color: #f4f693; color: #f4f693;
} }
.inputClass { .inputClass {
line-height: 80rpx; line-height: 80rpx;
} }
.inputClass input { .inputClass input {
background-color: #fff; background-color: #fff;
height: 80rpx; height: 80rpx;
padding: 10rpx; padding: 10rpx;
color: #000; color: #000;
} }
.result { .result {
position: absolute; position: absolute;
font-size: 100rpx; font-size: 100rpx;
left: 50%; left: 50%;
top: 800rpx; top: 800rpx;
transform: translateX(-50%); transform: translateX(-50%);
} }
.u-image {
background-color: transparent !important; .u-image {
} background-color: transparent !important;
.u-status-bar { }
height: var(--status-bar-height);
} .u-status-bar {
</style> height: var(--status-bar-height);
}
</style>

View File

@@ -69,7 +69,7 @@
</template> </template>
<script setup> <script setup>
import { import {
useCommonStore useCommonStore
} from '@/store/common.js' } from '@/store/common.js'
const $common = useCommonStore() const $common = useCommonStore()
@@ -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();
// }) // })