12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <script>
- var globalEvent = uni.requireNativePlugin('globalEvent');
-
- export default {
- onLaunch: function() {
- console.log('App Launch')
- //版本判断
- // this.$A.update()
- //启动界面判断缓存里面有没有token,没有跳转到登录页
- const token=uni.getStorageSync('token')
- if (token) {
- uni.reLaunch({
- url:"/pages/index/index"
- })
- }else{
- uni.reLaunch({
- url:"/pages/login/login"
- })
- }
- let info=uni.getSystemInfoSync()
- this.$store.commit('SAVE_SYSTEMINFO',info)
- // this.brand=info.brand
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- globalEvent.removeEventListener('iDataBarcodeEvent',()=>{})
- }
- }
- </script>
- <style lang="scss">
- /*每个页面公共css */
- @import url("@/common/styles/uni.css");
- @import url("@/common/styles/iconfont.css");
- @import url("@/common/styles/animate.css");
- @import url("@/common/styles/free.css");
- @import url("@/common/styles/common.css");
- page{
- background-color: var(--whiteMuted);
- color:var(--dark);
- min-height: 100vh;
- }
- .page{padding-left: 20rpx;padding-right: 20rpx;padding-bottom:20rpx;padding-top:1px;}
- .form-item-icon{ // btn-page 组件
- font-size:40rpx;
- width:100rpx;
- line-height: 100rpx;
- text-align: center;
- }
-
- .form-item-input{
- height:100rpx;
- line-height:100rpx;
- }
- .form-item-textarea{
- min-height:150rpx;
- }
- .form-item-textarea-blur{
- line-height:150rpx;
- }
- .form-item-input-minh{
- min-height:100rpx;
- }
- .list-input{
- min-height:80rpx;
- }
- .scan-icon{ //scan-input 组件
- width:44px;
- text-align: center;
- }
- .barcode-pic{
- width:100%;
- height:200rpx;
- }
- </style>
|