xyvcard-wechat-auth 0.0.13 → 0.0.14
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.
- package/dist/api/auth/types.d.ts +2 -2
- package/dist/components/auth-user/jmash-update-user/index.js +30 -2
- package/dist/components/auth-user/jmash-update-user/index.wxml +1 -1
- package/dist/components/auth-user/jmash-update-user/index.wxss +1 -1
- package/dist/components/jmash-login/index.wxss +1 -1
- package/dist/utils/config.js +1 -1
- package/package.json +1 -1
package/dist/api/auth/types.d.ts
CHANGED
|
@@ -7,26 +7,35 @@ Component({
|
|
|
7
7
|
* 组件的属性列表
|
|
8
8
|
*/
|
|
9
9
|
properties: {
|
|
10
|
-
//
|
|
10
|
+
// 是否显示用户头像
|
|
11
11
|
isUserAvatar: {
|
|
12
12
|
type: Boolean,
|
|
13
13
|
value: true
|
|
14
14
|
},
|
|
15
|
+
// 是否显示昵称
|
|
15
16
|
isUserNickName: {
|
|
16
17
|
type: Boolean,
|
|
17
18
|
value: true
|
|
18
19
|
},
|
|
20
|
+
// 是否显示姓名
|
|
19
21
|
isUserRealName: {
|
|
20
22
|
type: Boolean,
|
|
21
23
|
value: true
|
|
22
24
|
},
|
|
25
|
+
// 是否显示手机号
|
|
23
26
|
isUserMobilePhone: {
|
|
24
27
|
type: Boolean,
|
|
25
28
|
value: true
|
|
26
29
|
},
|
|
30
|
+
// 用户数据
|
|
27
31
|
form: {
|
|
28
32
|
type: Object,
|
|
29
33
|
value: {}
|
|
34
|
+
},
|
|
35
|
+
// 是否显示更换手机号
|
|
36
|
+
isChangePhone: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
value: true
|
|
30
39
|
}
|
|
31
40
|
},
|
|
32
41
|
/**
|
|
@@ -39,9 +48,17 @@ Component({
|
|
|
39
48
|
},
|
|
40
49
|
lifetimes: {
|
|
41
50
|
ready() {
|
|
51
|
+
if (this.data.form) {
|
|
52
|
+
this.setData({
|
|
53
|
+
userInfo: {
|
|
54
|
+
...this.properties.form
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
} else {
|
|
58
|
+
this.getUserInfo();
|
|
59
|
+
}
|
|
42
60
|
this.setData({
|
|
43
61
|
userInfo: {
|
|
44
|
-
...this.properties.form,
|
|
45
62
|
requestId: Math.random() * 10 + "",
|
|
46
63
|
updateMask: "nickName,avatar,realName"
|
|
47
64
|
}
|
|
@@ -52,6 +69,14 @@ Component({
|
|
|
52
69
|
* 组件的方法列表
|
|
53
70
|
*/
|
|
54
71
|
methods: {
|
|
72
|
+
// 获取用户信息
|
|
73
|
+
getUserInfo() {
|
|
74
|
+
authApi.userInfo().then((resp) => {
|
|
75
|
+
this.setData({
|
|
76
|
+
userInfo: resp.data
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
},
|
|
55
80
|
// 获取微信昵称
|
|
56
81
|
getNicknameValue(e) {
|
|
57
82
|
this.setData({
|
|
@@ -102,6 +127,9 @@ Component({
|
|
|
102
127
|
authApi.updateUserInfo(this.data.userInfo).then((res) => {
|
|
103
128
|
if (res.code == 200) {
|
|
104
129
|
db.userInfoStorage(res.data);
|
|
130
|
+
wx.navigateBack({
|
|
131
|
+
delta: 1
|
|
132
|
+
});
|
|
105
133
|
}
|
|
106
134
|
});
|
|
107
135
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<view class="phone-left">手机号</view>
|
|
28
28
|
<view class="phone-right">
|
|
29
29
|
<view>{{ userInfo.mobilePhone }}</view>
|
|
30
|
-
<button open-type="getPhoneNumber" class="phone-right-btn" bindgetphonenumber="getPhoneNumber" plain="true">更换手机号</button>
|
|
30
|
+
<button open-type="getPhoneNumber" class="phone-right-btn" bindgetphonenumber="getPhoneNumber" plain="true" wx:if="{{ isChangePhone }}">更换手机号</button>
|
|
31
31
|
</view>
|
|
32
32
|
</view>
|
|
33
33
|
</view>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.my-information{background-color:#f6f6f6;width:100%;
|
|
1
|
+
.my-information{background-color:#f6f6f6;width:100%;position:relative}.my-information .main{background-color:#fff;padding:0 15px}.my-information .main .main-profile,.my-information .main .main-nickname,.my-information .main .main-phone{display:flex;justify-content:space-between;align-items:center;height:55px;border-bottom:1px solid #f5f5f5}.my-information .main .main-profile .profile-left,.my-information .main .main-profile .nickname-left,.my-information .main .main-profile .nickname-right,.my-information .main .main-profile .phone-left,.my-information .main .main-nickname .profile-left,.my-information .main .main-nickname .nickname-left,.my-information .main .main-nickname .nickname-right,.my-information .main .main-nickname .phone-left,.my-information .main .main-phone .profile-left,.my-information .main .main-phone .nickname-left,.my-information .main .main-phone .nickname-right,.my-information .main .main-phone .phone-left{font-size:14px;color:#333}.my-information .main .main-profile .profile-right .profile-image,.my-information .main .main-nickname .profile-right .profile-image,.my-information .main .main-phone .profile-right .profile-image{width:35px;height:35px}.my-information .main .main-profile .phone-right,.my-information .main .main-nickname .phone-right,.my-information .main .main-phone .phone-right{display:flex;justify-content:space-between;align-items:center;font-size:15px;color:#333}.my-information .main .main-profile .phone-right .phone-right-btn,.my-information .main .main-nickname .phone-right .phone-right-btn,.my-information .main .main-phone .phone-right .phone-right-btn{background-color:#e6edff;border-radius:12px;margin-left:10px;border:none;font-size:12px;color:#0551ff}.my-information .main .image-box-bgc{background-color:rgba(0,0,0,0);border-radius:0;line-height:0;border:0;padding:0}.my-information .main .nickname-input{text-align:right}.my-information .main .main-phone{border:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.login_container{position:relative;margin-top:-35%;display:flex;flex-direction:column;align-items:center}.login_logo{width:250px}.login_box{border-top-left-radius:20px;border-top-right-radius:20px;background-color:#fff;padding:13% 3% 4%;margin-top:40px;display:flex;flex-direction:column;align-items:center}.login_box .login_btn{background-color:#2563eb;color:#fff;padding:16px 0;width:100%;font-size:14px}.login_box .protocol_agree{color:#999;font-size:14px;margin-top:20px}.login_box .protocol_agree text{color:#2563eb}.login_box .tips_box{color:#2563eb;font-size:12px;margin-top:40%}
|
package/dist/utils/config.js
CHANGED