master #16

Merged
cmx merged 9 commits from master into cmx 2020-07-31 00:33:14 +00:00
3 changed files with 11 additions and 7 deletions
Showing only changes of commit 96adf9e6a9 - Show all commits

View File

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

View File

@ -76,7 +76,9 @@
}) })
} }
}) }).catch((res)=>{
console.log(res)
})
} }
}, },
onLoad(){ onLoad(){

View File

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