1 Star 0 Fork 1

陕西国创岚烽科技/amdj-user

forked from hlai/amdj-user 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
App.vue 2.77 KB
一键复制 编辑 原始数据 按行查看 历史
lai 提交于 2024-08-25 10:26 . 初次提交代码
<script>
import indexConfig from '@/config/index.config';
export default {
onLaunch: function(options) {
console.log('App Launch',options)
},
onShow: function(options) {
console.log('App Show',options)
//alert(uni.getStorageSync('openid'));
// 微信公证号openid
// #ifdef H5
if (/(MicroMessenger)/i.test(navigator.userAgent)) {
let _codeMatch = window.location.href.match(/code=(\S*)&state/)
//alert(_codeMatch);
if (_codeMatch && _codeMatch.length > 1) {
this.$mStore.commit('getWxOpenid', {
code: _codeMatch[1],
})
} else if (!uni.getStorageSync('openid')) {
let href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${indexConfig.appid}&redirect_uri=${encodeURIComponent(window.location.href)}&response_type=code&scope=snsapi_base&state=wxopenid#wechat_redirect`
window.location.href = href
}
}
// #endif
if (uni.getStorageSync('location')) {
this.$mStore.dispatch('locationChange', uni.getStorageSync('location'));
}
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
// 设置整个项目的背景色
@import '@/static/iconfont/iconfont.css';
page {
background-color: #f5f5f5;
}
.page-box{
min-height: calc(100vh - 88rpx);
background-color: #0F0E0C;
}
/* #endif */
.null-box {
width: 710rpx;
height: 710rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 24rpx;
color: #ccc;
image {
width: 348rpx;
height: 348rpx;
background: none !important;
}
}
.example-info {
font-size: 14px;
color: #333;
padding: 10px;
}
image {}
.flex_sw {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
}
.flex {
display: flex !important;
align-items: center !important;
}
.flex_center {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
.arrow {
&::after {
display: block;
content: "";
width: 14rpx;
height: 26rpx;
background: url(./static/grey-arrow-right.png) no-repeat;
background-size: 100% auto;
margin-left: 10rpx;
}
}
b,
i,
span,
em {
font-weight: 400;
}
.status-bar{height: var(--status-bar-height);}
.status-bar_fixed{ width: 100%; height: var(--status-bar-height); background-color: #f5f5f5; position: fixed; left: 0; top: 0; z-index: 2; }
.status-bar_fixedh{ width: 100%; height: var(--status-bar-height);}
</style>
<style>
@import '@/static/css/common.css';
</style>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/jawei/amdj-user.git
git@gitee.com:jawei/amdj-user.git
jawei
amdj-user
amdj-user
master

搜索帮助