直播添加标签

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

@@ -194,7 +194,7 @@ export default {
this.current = current;
},
navto(url){
this.$u.router({
this.$u.route({
url:`/pages/${url}`
})
// console.log(`/pages/${url}`)

View File

@@ -9,15 +9,16 @@
<view class="title">账号登录</view>
<view class="labales">
<image src=""></image>
<input type="tel" placeholder="请输入账号" />
<input v-model="zhanghao" type="tel" placeholder="请输入账号" />
</view>
<view class="labales">
<image src=""></image>
<input type="password" placeholder="请输入密码" />
<input v-model="mima" type="password" placeholder="请输入密码" />
</view>
</view>
<!-- denglu QQ weixin -->
<u-button>{{login}}</u-button>
<u-button @click="logins">{{login}}</u-button>
<u-toast ref="uToast" />
</view>
</view>
</template>
@@ -32,6 +33,8 @@
value: '',
login: '登录',
show: false,
zhanghao:"",
mima:""
};
},
@@ -54,6 +57,34 @@
},
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"
})
}
}
};

View File

@@ -26,7 +26,7 @@
</u-form-item>
</u-form>
<!-- 标签的引入 -->
<tap_tosign></tap_tosign>
<tap_tosign :fileListes="fileListes"></tap_tosign>
<view class="titles">直播封面图</view>
<u-upload :max-count="1" :show-progress="true" del-color="#ececec" upload-text="上传" del-bg-color="#fff"></u-upload>
</view>
@@ -56,7 +56,8 @@
max : '优秀的标题可以卖的更好哦~',
titleMaxLength : '20',
show: false,
relerest: '开始直播'
relerest: '开始直播',
fileListes:[]
};
},
@@ -89,6 +90,12 @@
this.max = String(this.max).slice(0, this.titleMaxLength);
}
}
},
onLoad(){
this.$u.api.getLiveSpec().then((res)=>{
console.log(res)
this.fileListes = res.data
})
}
};
</script>