123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <template>
- <view class="app-main fadeIn" >
- <view class="app-top">
- <image class='logo' src="/static/img/logo.png"></image>
- </view>
- <view class="app-foot">
- <view class='footer-text'>中国长城计算机进出口公司</view>
- <view>京ICP备2024043848号-3A</view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations
- } from 'vuex';
- import global from '@/config/global.js'
- export default {
- data() {
- return {
- fadeIn: "fadeIn",
- netIndex: 0
- }
- },
- onLoad(options) {
- this.getNetWord();
- },
- methods: {
- ...mapMutations(['setHttp']),
- getNetWord: function() {
- let httpAr = global.apiHttps;
- console.log(this.setHttp,'2333')
- if (this.netIndex >= httpAr.length) {
- this.setHttp(httpAr[this.netIndex - 1]);
- this.getHome();
- return;
- }
- let url = httpAr[this.netIndex];
- uni.request({
- url: url + "sign",
- timeout: 800,
- success: (res) => {
- if (res.data.code == 200) {
- this.setHttp(url);
- this.getHome();
- } else {
- this.netIndex++;
- this.getNetWord();
- }
- },
- fail: () => {
- this.netIndex++;
- this.getNetWord();
- }
- });
- },
- getHome: function() {
- uni.preloadPage({
- url: "/pages/index/index"
- });
- setTimeout(() => {
- uni.switchTab({
- url: "index"
- });
- }, 2000);
- }
- }
- }
- </script>
- <style>
- .app-main {
- background: #FFF;
- position: fixed;
- opacity: 0;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- border: 1px solid #000;
- transition: opacity 3s;
- }
- .logo {
- width: 162rpx;
- height: 162rpx;
- border-radius: 50%;
- }
- .app-top {
- text-align: center;
- padding-top: 375rpx;
- align-items: center;
- justify-content: center;
- }
- .app-foot {
- position: absolute;
- bottom: 40px;
- width: 750rpx;
- color: #333;
- font-size: 14px;
- justify-content: center;
- align-items: center;
- }
- .footer-text{
- font-size: 24rpx;
- }
- .fadeIn{
- opacity: 1;
- }
- </style>
|