update
This commit is contained in:
@@ -180,9 +180,15 @@
|
||||
return false
|
||||
} else {
|
||||
me.loginIn(res.data.token); //存储一个字符传值
|
||||
uni.navigateTo({
|
||||
url: '/pageA/topick/topick'
|
||||
})
|
||||
if (res.data.member.has_labels) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pageA/topick/topick'
|
||||
})
|
||||
}
|
||||
// 缓存用户的信息
|
||||
// uni.setStorageSync({
|
||||
// key: 'user_info',
|
||||
@@ -198,7 +204,6 @@
|
||||
}
|
||||
|
||||
// 存储接口请求所需token
|
||||
me.loginIn(res.data.token); //存储一个字符传值
|
||||
// // 注册返回参数
|
||||
// this.$refs.uToast.show({
|
||||
// title: res.message,
|
||||
|
||||
@@ -59,25 +59,35 @@
|
||||
},
|
||||
// 点击切换颜色
|
||||
tapClick(index, id) {
|
||||
// console.log(id);
|
||||
// console.log(index);
|
||||
if (this.rSelect.indexOf(index) == -1) {
|
||||
this.rSelect.push(index); // 选中状态
|
||||
this.list.push(id); //选中添加到数组里
|
||||
if (this.rSelect.length > 9) {
|
||||
this.$u.toast("只能选择10个标签!");
|
||||
return false;
|
||||
}
|
||||
this.rSelect.push(index); // 选中状态
|
||||
this.list.push(id); //选中添加到数组里
|
||||
} else {
|
||||
this.rSelect.splice(this.rSelect.indexOf(index), 1); //取消
|
||||
this.list.splice(this.rSelect.indexOf(id), 1); //取消
|
||||
}
|
||||
// console.log(this.rSelect);
|
||||
// console.log(this.list);
|
||||
console.log(this.list);
|
||||
},
|
||||
toHomePage() {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
this.$u.post("StartUp/addLabel", {
|
||||
label_ids: this.list
|
||||
}).then(res => {
|
||||
// console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
// this.$u.toast(res.message);
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user