直播添加标签
This commit is contained in:
parent
a2f522479b
commit
616af0337c
@ -6,6 +6,12 @@ const install = (Vue, vm) => {
|
|||||||
let api = {
|
let api = {
|
||||||
getLiveSpec(){
|
getLiveSpec(){
|
||||||
return vm.$u.get("Streaming/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)下
|
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
// 此为自定义配置参数,具体参数见上方说明
|
// 此为自定义配置参数,具体参数见上方说明
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'https://dmmall.sdbairui.com//storeapi/',
|
baseUrl: 'https://dmmall.sdbairui.com//storeapi',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
// 设置自定义头部content-type
|
// 设置自定义头部content-type
|
||||||
// header: {
|
// 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 {
|
export default {
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="titles">标签</view>
|
<view class="titles">标签</view>
|
||||||
<view class="form-view" @click="show_add()">+ 新建标签</view>
|
<view class="form-view" @click="show_add()">+ 新建标签</view>
|
||||||
<view class="form-view" :class=" {'cur': rSelect.indexOf(index)!=-1} " @tap="tapInfo(index)" v-for="(item,index) in fileListes"
|
<view class="form-view" :class=" {'cur': rSelect.indexOf(item.id)!=-1} " @tap="tapInfo(item.id)" v-for="(item,index) in fileListes"
|
||||||
:key="index">{{item}}</view>
|
:key="index">{{item.spec_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 添加标签的按钮 -->
|
<!-- 添加标签的按钮 -->
|
||||||
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
<u-popup v-model="show" mode="center" border-radius="14" :closeable="true">
|
||||||
@ -32,11 +32,11 @@
|
|||||||
// 演示地址,请勿直接使用
|
// 演示地址,请勿直接使用
|
||||||
action: 'http://www.example.com/upload',
|
action: 'http://www.example.com/upload',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
fileListes: ["美妆", "博主穿搭", "美妆", "美妆", "美妆", "美妆", "美妆", "博主穿搭"],
|
|
||||||
show: false,
|
show: false,
|
||||||
rSelect: []
|
rSelect: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props:['fileListes'],
|
||||||
methods: {
|
methods: {
|
||||||
show_add() {
|
show_add() {
|
||||||
console.log(this.show)
|
console.log(this.show)
|
||||||
|
22
pages.json
22
pages.json
@ -3,6 +3,17 @@
|
|||||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "pages/login/login",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": false,
|
||||||
|
"animationType": "slide-in-bottom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/release/tosign",
|
"path": "pages/release/tosign",
|
||||||
"style": {
|
"style": {
|
||||||
@ -38,17 +49,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "",
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"app-plus": {
|
|
||||||
"titleNView": false,
|
|
||||||
"animationType": "slide-in-bottom"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/release/video",
|
"path": "pages/release/video",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -194,7 +194,7 @@ export default {
|
|||||||
this.current = current;
|
this.current = current;
|
||||||
},
|
},
|
||||||
navto(url){
|
navto(url){
|
||||||
this.$u.router({
|
this.$u.route({
|
||||||
url:`/pages/${url}`
|
url:`/pages/${url}`
|
||||||
})
|
})
|
||||||
// console.log(`/pages/${url}`)
|
// console.log(`/pages/${url}`)
|
||||||
|
@ -9,15 +9,16 @@
|
|||||||
<view class="title">账号登录</view>
|
<view class="title">账号登录</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<image src=""></image>
|
<image src=""></image>
|
||||||
<input type="tel" placeholder="请输入账号" />
|
<input v-model="zhanghao" type="tel" placeholder="请输入账号" />
|
||||||
</view>
|
</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<image src=""></image>
|
<image src=""></image>
|
||||||
<input type="password" placeholder="请输入密码" />
|
<input v-model="mima" type="password" placeholder="请输入密码" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- denglu QQ weixin -->
|
<!-- denglu QQ weixin -->
|
||||||
<u-button>{{login}}</u-button>
|
<u-button @click="logins">{{login}}</u-button>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -32,6 +33,8 @@
|
|||||||
value: '',
|
value: '',
|
||||||
login: '登录',
|
login: '登录',
|
||||||
show: false,
|
show: false,
|
||||||
|
zhanghao:"",
|
||||||
|
mima:""
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -54,6 +57,34 @@
|
|||||||
},
|
},
|
||||||
loading(){
|
loading(){
|
||||||
|
|
||||||
|
},
|
||||||
|
logins(){
|
||||||
|
this.$u.api.login({member_name:this.zhanghao,member_password:this.mima}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
if(res.errCode != 0){
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.setStorageSync("token",res.data.token)
|
||||||
|
uni.setStorageSync("userinfo",res.data)
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/index/index",
|
||||||
|
type:"switchTab"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(){
|
||||||
|
let token = uni.getStorageSync('token');
|
||||||
|
|
||||||
|
if(token != undefined && token){
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/index/index"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<!-- 标签的引入 -->
|
<!-- 标签的引入 -->
|
||||||
<tap_tosign></tap_tosign>
|
<tap_tosign :fileListes="fileListes"></tap_tosign>
|
||||||
<view class="titles">直播封面图</view>
|
<view class="titles">直播封面图</view>
|
||||||
<u-upload :max-count="1" :show-progress="true" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
|
<u-upload :max-count="1" :show-progress="true" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
|
||||||
</view>
|
</view>
|
||||||
@ -56,7 +56,8 @@
|
|||||||
max : '优秀的标题可以卖的更好哦~',
|
max : '优秀的标题可以卖的更好哦~',
|
||||||
titleMaxLength : '20',
|
titleMaxLength : '20',
|
||||||
show: false,
|
show: false,
|
||||||
relerest: '开始直播'
|
relerest: '开始直播',
|
||||||
|
fileListes:[]
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -89,6 +90,12 @@
|
|||||||
this.max = String(this.max).slice(0, this.titleMaxLength);
|
this.max = String(this.max).slice(0, this.titleMaxLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onLoad(){
|
||||||
|
this.$u.api.getLiveSpec().then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
this.fileListes = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user