直播添加标签

This commit is contained in:
2020-07-16 11:20:59 +08:00
parent a2f522479b
commit 616af0337c
7 changed files with 72 additions and 23 deletions

View File

@@ -6,6 +6,12 @@ const install = (Vue, vm) => {
let api = {
getLiveSpec(){
return vm.$u.get("Streaming/getLiveSpec")
},
login({member_name,member_password}){
return vm.$u.post("Login/login",{member_name,member_password})
},
createLivesp({spec_name}){
return vm.$u.post("Streaming/createLivesp",{spec_name})
}
}
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下

View File

@@ -1,15 +1,20 @@
const install = (Vue, vm) => {
// 此为自定义配置参数,具体参数见上方说明
Vue.prototype.$u.http.setConfig({
baseUrl: 'https://dmmall.sdbairui.com//storeapi/',
baseUrl: 'https://dmmall.sdbairui.com//storeapi',
loadingText: '努力加载中~',
loadingTime: 800,
// 设置自定义头部content-type
// header: {
// 'content-type': 'xxx'
// "Authorization" : "122"
// }
// ......
});
});
Vue.prototype.$u.http.interceptor.request = (config) => {
const token = uni.getStorageSync('token');
config.header.Authorization = 'Bearer' + " " + token;
return config;
}
}
export default {