| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <script lang="ts">
- import { fetchToken } from "./api/auth";
- export default <any>{
- globalData: {
- token: "",
- lastData: {},
- stations: [],
- normalCode: "",
- },
- onLaunch() {
- uni.getSystemInfo({
- success: (res) => {
- this.globalData.device = res;
- },
- });
- return fetchToken().then((cache) => {
- if (cache) {
- this.globalData.token = cache;
- }
- });
- },
- onPageNotFound() {
- uni.switchTab({
- url: "/pages/map/map",
- });
- },
- };
- </script>
- <style lang="scss">
- @import "./styles/flex.scss";
- @import "./styles/font.scss";
- @import "./styles/layout.scss";
- view {
- box-sizing: border-box;
- --color-primary: #2d9e95;
- --color-warning: #ff9900;
- --color-sec: #f7f7f7;
- }
- .box-content {
- box-sizing: content-box;
- }
- image {
- width: 20rpx;
- height: 20rpx;
- }
- .relative {
- position: relative;
- }
- .color-fff {
- color: #fff;
- }
- .color-000 {
- color: #000;
- }
- .color-000-5 {
- color: rgba(0, 0, 0, 0.5);
- }
- .color-000-6 {
- color: rgba(0, 0, 0, 0.6);
- }
- .color-000-08 {
- color: rgba(0, 0, 0, 0.08);
- }
- .color-333 {
- color: #333;
- }
- .color-666 {
- color: #666;
- }
- .color-999 {
- color: #999;
- }
- .color-primary {
- color: var(--color-primary);
- }
- .color-warning {
- color: var(--color-warning);
- }
- .bg-fff {
- background-color: #fff;
- }
- .bg-666 {
- background-color: #666;
- }
- .bg-000-08 {
- background-color: rgba(0, 0, 0, 0.08);
- }
- .bg-primary {
- background-color: var(--color-primary);
- }
- .full-percent {
- height: 100%;
- width: 100%;
- }
- .absolute-top-left {
- position: absolute;
- left: 0px;
- top: 0px;
- }
- .absolute-full {
- position: absolute;
- left: 0px;
- top: 0px;
- width: 100%;
- height: 100%;
- }
- .absolute-center {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- }
- .transition {
- transition: all 0.3s;
- }
- .hover-scale {
- transition: all 0.3s;
- transform: scale(0.98);
- }
- .animation-loading {
- animation: animation-turn 2s linear infinite;
- }
- @keyframes animation-turn {
- 0% {
- transform: rotate(0deg);
- }
- 50% {
- transform: rotate(180deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- }
- </style>
|