This commit is contained in:
2020-06-15 11:34:33 +08:00
parent 3f63d8ade9
commit b697270eb9
6 changed files with 66 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
const install = (Vue, vm) => {
// 此为自定义配置参数,具体参数见上方说明
Vue.prototype.$u.http.setConfig({
baseUrl: 'https://luyuan.tk/api',
baseUrl: 'https://dmmall.sdbairui.com/api',
loadingText: '努力加载中~',
loadingTime: 800
// ......
@@ -22,8 +22,8 @@ const install = (Vue, vm) => {
// 方式四如果token放在了Storage本地存储中拦截是每次请求都执行的
// 所以哪怕您重新登录修改了Storage下一次的请求将会是最新值
// const token = uni.getStorageSync('token');
// config.header.token = token;
const token = uni.getStorageSync('token');
config.header.token = token;
// config.header.Token = 'xxxxxx';
// 可以对某个url进行特别处理此url参数为this.$u.get(url)中的url值