图文视频发布,文章选择删除逻辑没有处理完,需要继续处理

This commit is contained in:
cmxdd
2020-07-31 10:14:46 +08:00
parent 2ed7b6798b
commit 3e45c9350a
4 changed files with 161 additions and 36 deletions

View File

@@ -61,7 +61,8 @@ export default {
zhanghaoA: '18953829598 ',
mimaA: '123456',
url: '',
state:0
state:0,
clickstate:false
};
},
methods: {
@@ -87,18 +88,30 @@ export default {
},
loading() {},
logins() {
// 判断是否可以点击
if(this.clickstate==false){
this.clickstate=true
}else{
this.$refs.uToast.show({
title: "不能重复提交",
type: 'error'
});
return
}
// 清除本地存储才可以正常登陆(具体原因没有仔细检查)
uni.clearStorage();
// 账号登录1达人0商家
if(this.state==1){
this.$u.api.login({ member_name: this.zhanghaoA, member_password: this.mimaA }).then(res => {
console.log(res);
if (res.errCode != 0) {
// 恢复按钮可点击状态
this.clickstate=false
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
uni.setStorageSync('token', res.data.token);
uni.setStorageSync('userinfo', res.data);
uni.setStorageSync('rongyun', res.data.rongcloud_token);
@@ -109,8 +122,9 @@ export default {
});
}else{
this.$u.api.shoplogin({ member_name: this.zhanghao, member_password: this.mima }).then(res => {
console.log(res);
if (res.errCode != 0) {
// 恢复按钮可点击状态
this.clickstate=false
this.$refs.uToast.show({
title: res.message,
type: 'error'