xyvcard-wechat-auth 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,7 +48,7 @@ Component({
|
|
|
48
48
|
},
|
|
49
49
|
lifetimes: {
|
|
50
50
|
ready() {
|
|
51
|
-
if (this.data.form) {
|
|
51
|
+
if (Object.keys(this.data.form).length > 0) {
|
|
52
52
|
this.setData({
|
|
53
53
|
userInfo: {
|
|
54
54
|
...this.properties.form
|
|
@@ -57,12 +57,6 @@ Component({
|
|
|
57
57
|
} else {
|
|
58
58
|
this.getUserInfo();
|
|
59
59
|
}
|
|
60
|
-
this.setData({
|
|
61
|
-
userInfo: {
|
|
62
|
-
requestId: Math.random() * 10 + "",
|
|
63
|
-
updateMask: "nickName,avatar,realName"
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
60
|
}
|
|
67
61
|
},
|
|
68
62
|
/**
|
|
@@ -124,6 +118,8 @@ Component({
|
|
|
124
118
|
},
|
|
125
119
|
// 更新用户信息
|
|
126
120
|
updateUserInfo() {
|
|
121
|
+
this.data.userInfo.requestId = Math.random() * 10 + "";
|
|
122
|
+
this.data.userInfo.updateMask = "nickName,avatar,realName";
|
|
127
123
|
authApi.updateUserInfo(this.data.userInfo).then((res) => {
|
|
128
124
|
if (res.code == 200) {
|
|
129
125
|
db.userInfoStorage(res.data);
|