2023-02-28
功能完善
This commit is contained in:
@@ -144,8 +144,16 @@
|
||||
methods: {
|
||||
...mapMutations(['login']),
|
||||
selectType(index) {
|
||||
this.selectKey = index
|
||||
this.show = !this.show
|
||||
|
||||
if (index == 0) {
|
||||
this.show = true
|
||||
this.selectKey = 0
|
||||
}
|
||||
|
||||
if (index == 1) {
|
||||
this.show = false
|
||||
this.selectKey = 1
|
||||
}
|
||||
|
||||
},
|
||||
inputChange(e) {
|
||||
@@ -258,7 +266,7 @@
|
||||
uni.showToast({
|
||||
title: '登录成功'
|
||||
});
|
||||
that.login(res.data.data);
|
||||
that.login(res.data.data.userInfo);
|
||||
that.$db.set('token', res.data.data.tokenHead + res.data.data.token);
|
||||
that.$db.set('userInfos', res.data.data.userInfo);
|
||||
|
||||
@@ -354,7 +362,7 @@
|
||||
uni.showToast({
|
||||
title: '登录成功'
|
||||
});
|
||||
that.login(res.data.data);
|
||||
that.login(res.data.data.userInfo);
|
||||
that.$db.set('token', res.data.data.tokenHead + res.data.data.token);
|
||||
that.$db.set('userInfos', res.data.data.userInfo);
|
||||
|
||||
@@ -520,7 +528,7 @@
|
||||
//this.logining = false;
|
||||
if (data) {
|
||||
console.log(data);
|
||||
that.login(data)
|
||||
that.login(data.userInfo)
|
||||
uni.setStorageSync('userInfos', data.userInfo);
|
||||
uni.setStorageSync('token', data.tokenHead + data.token);
|
||||
console.log(uni.getStorageSync('token'))
|
||||
@@ -545,7 +553,7 @@
|
||||
let data = await Api.apiCall('post', Api.index.login, params);
|
||||
if (data) {
|
||||
console.log(data);
|
||||
that.login(data);
|
||||
that.login(data.userInfo);
|
||||
uni.setStorageSync('userInfos', data.userInfo);
|
||||
uni.setStorageSync('token', data.tokenHead + data.token);
|
||||
// uni.setStorageSync('adminToken', data.tokenHead + data.token);
|
||||
@@ -588,7 +596,7 @@
|
||||
// 登录成功 记录会员信息到本地
|
||||
if (res) {
|
||||
console.log(res);
|
||||
that.login(res.data.data);
|
||||
that.login(res.data.data.userInfo);
|
||||
uni.setStorageSync('userInfos', res.data
|
||||
.data.userInfo);
|
||||
uni.setStorageSync('token', res.data.data
|
||||
|
||||
Reference in New Issue
Block a user