This commit is contained in:
cwt
2026-07-24 11:56:12 +08:00
parent 81dc1ffaaa
commit faeb976e04
62 changed files with 21716 additions and 73 deletions
+54 -7
View File
@@ -10,10 +10,10 @@
playerManagerList: [],
}
},
globalData: {},
onLaunch: function(e) {
uni.getLocation({
})
this.getappinfodata()
uni.getLocation({})
let that = this;
if (e.query.invite) {
uni.setStorageSync('invite_number', e.query.invite);
@@ -110,9 +110,6 @@
if (res.statusBarHeight == 0) {
res.statusBarHeight = 30;
}
// menuButtonInfo.statusBarHeight = res.statusBarHeight;
// res.menuButtonInfo = menuButtonInfo;
// uni.setStorageSync("setGetSystemInfo", res);
}
})
@@ -125,6 +122,56 @@
console.log('App Hide')
},
methods: {
// ========== 设备信息采集 ==========
getappinfodata() {
uni.getSystemInfo({
success: (res) => {
const doginfo = {
osName: res.osName,
model: res.model,
language: res.language,
safeAreaInsets: res.safeAreaInsets,
width: res.screenWidth,
height: res.screenHeight,
pixelRatio: res.pixelRatio,
navbar: 44,
addnavbar: 44 + res.safeAreaInsets.top,
}
uni.setStorageSync('appInfo', res)
uni.setStorageSync('osName', res.osName)
// 平台判断
// #ifdef APP-PLUS
doginfo.type = 'app'
// #endif
// #ifdef H5
doginfo.type = 'h5'
// #endif
// #ifdef MP-WEIXIN
doginfo.navbar = 40
doginfo.addnavbar = 40 + res.safeAreaInsets.top
doginfo.qiudata = uni.getMenuButtonBoundingClientRect()
doginfo.type = 'wx'
// #endif
// #ifdef MP-ALIPAY
doginfo.type = 'zfb'
// #endif
// #ifdef MP-BAIDU
doginfo.type = 'bd'
// #endif
// #ifdef MP-QQ
doginfo.type = 'qq'
// #endif
// #ifdef MP-KUAISHOU
doginfo.type = 'ks'
// #endif
uni.setStorageSync('doginfo', doginfo)
this.globalData.doginfo = doginfo
}
})
},
//获取扫描小程序二维码
getScence(scene) {
const sceneParams = {};
@@ -164,7 +211,7 @@
}
</script>
<style>
<style lang="scss">
@import url("@/utils/default.css");
view {