小程序编译0.0.0

This commit is contained in:
魏啾
2024-11-13 09:25:34 +08:00
parent 1fbf346aec
commit 2147f86b93
65 changed files with 3745 additions and 852 deletions

37
App.vue
View File

@@ -1,8 +1,45 @@
<script>
import Api from '@/common/js/api.js'
export default {
onLaunch: function() {
// #ifdef MP-WEIXIN
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
uni.login({
provider: 'weixin',
success: async (data) => {
uni.cache.set('weixincode', data.code);
let res = await Api.getminiuserinfo({
code: uni.cache.get('weixincode') //临时登录凭证
})
uni.cache.set('open_id', res.data.openid)
this.$isResolve()
},
})
// #endif
// 异步获取系统信息
// uni.getSystemInfo({
// success: function(info) {
// console.log(info)
// if (info.platform === 'h5') {
// // H5环境
// if (uni.getStorageSync('navigationStyle') === 'custom') {
// // 全局原生导航栏被隐藏
// uni.hideNavigationBarLoading();
// } else {
// // 显示全局原生导航栏
// }
// } else {
// // 非H5环境
// if (uni.getStorageSync('navigationStyle') === 'custom') {
// // 自定义导航
// } else {
// // 非自定义导航
// }
// }
// }
// });
// #ifndef MP-WEIXIN
this.$isResolve()
// #endif
},
onShow: function() {