修正了错误弹窗

This commit is contained in:
luyuan 2020-07-29 09:37:59 +08:00
parent 7245d83dcd
commit 96adf9e6a9
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
3 changed files with 11 additions and 7 deletions

View File

@ -4,17 +4,18 @@ const install = (Vue, vm) => {
baseUrl: 'https://dmmall.sdbairui.com//storeapi',
loadingText: '努力加载中~',
loadingTime: 800,
// 设置自定义头部content-type
// header: {
// "Authorization" : "122"
// }
// ......
originalData: true,
});
Vue.prototype.$u.http.interceptor.request = (config) => {
const token = uni.getStorageSync('token');
config.header.Authorization = 'Bearer' + " " + token;
return config;
}
Vue.prototype.$u.http.interceptor.response = (res) => {
// todo 判断状态码
return res.data;
}
}
export default {

View File

@ -76,6 +76,8 @@
})
}
}).catch((res)=>{
console.log(res)
})
}
},

View File

@ -472,5 +472,6 @@
left: 0;
right: 0;
margin: auto;
z-index: 10;
}
</style>