添加鼠标移动到可点模块 鼠标样式改变 全局新增加载动画
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import axios from 'axios';
|
||||
import QS from 'qs';
|
||||
import { goTologin } from '@/utils/util.js'
|
||||
import {showFullScreenLoading,tryHideFullScreenLoading} from './loading'
|
||||
|
||||
axios.defaults.baseURL = 'https://app.gter.net'
|
||||
// axios.defaults.baseURL = '/index'
|
||||
axios.defaults.emulateJSON = true
|
||||
@@ -8,6 +10,7 @@ axios.defaults.withCredentials = true
|
||||
|
||||
axios.interceptors.request.use( //响应拦截
|
||||
async config => {
|
||||
showFullScreenLoading()
|
||||
// 开发时登录用的,可以直接替换小程序的 authorization
|
||||
// if (process.env.NODE_ENV == "development") config['headers']['authorization'] = "x2mmnl9grt51bpplj2k6ioiuummzhnw3"
|
||||
if (process.env.NODE_ENV == "development") config['headers']['authorization'] = "0h870ovk2xckoqfsh8a3t3sg4sg5z7eg"
|
||||
@@ -19,9 +22,9 @@ axios.interceptors.request.use( //响应拦截
|
||||
// 响应拦截器
|
||||
axios.interceptors.response.use(
|
||||
response => {
|
||||
tryHideFullScreenLoading()
|
||||
if (response.status === 200) return Promise.resolve(response); //进行中
|
||||
else return Promise.reject(response); //失败
|
||||
|
||||
},
|
||||
// 服务器状态码不是200的情况
|
||||
error => {
|
||||
|
||||
Reference in New Issue
Block a user