编写登录页面,首页面,入库页面,样式修改,扫码功能实现

This commit is contained in:
赵正易
2024-03-12 17:41:00 +08:00
parent 504e33d447
commit b58b954436
28 changed files with 616 additions and 2025 deletions

74
App.vue
View File

@@ -1,34 +1,52 @@
<script>
import config from './config'
import store from '@/store'
import { getToken } from '@/utils/auth'
import config from './config';
import store from '@/store';
import { getToken } from '@/utils/auth';
export default {
onLaunch: function() {
this.initApp()
},
methods: {
// 初始化应用
initApp() {
// 初始化应用配置
this.initConfig()
// 检查用户登录状态
//#ifdef H5
this.checkLogin()
//#endif
},
initConfig() {
this.globalData.config = config
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login')
}
}
}
}
export default {
onLaunch: function () {
this.initApp();
},
methods: {
// 初始化应用
initApp() {
// 初始化应用配置
this.initConfig();
// 检查用户登录状态
//#ifdef H5
this.checkLogin();
//#endif
},
initConfig() {
const _windowsWidth = uni.getWindowInfo().windowWidth;
const _windowsHeight = uni.getWindowInfo().windowHeight;
// console.log(_windowsWidth,_windowsHeight);
this.globalData.config = config;
// 设置页面初始大小
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login');
}
}
}
};
</script>
<style lang="scss">
@import '@/static/scss/index.scss'
.content {
display: flex;
flex-direction: column;
background-image: url('static/images/background/background.jpg');
font-size: 36px;
font-weight: 700;
width: 360px;
height: 712px;
}
.main-box{
width:100%;
height: 100%;
}
@import '@/static/scss/index.scss';
</style>