12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import url from "./url.js"
- const install = (Vue, vm) => {
-
- Vue.prototype.$u.http.setConfig({
- baseUrl: url,
- loadingText: '努力加载中~',
- loadingTime: 800,
-
-
-
-
-
- });
-
- Vue.prototype.$u.http.interceptor.request = (config) => {
-
-
-
-
-
-
-
-
-
-
-
- const token = uni.getStorageSync('token');
-
- config.header.Authorization = token;
-
-
-
- return config;
-
-
- }
- }
- export default {
- install
- }
|