@uxda/appkit 4.2.46 → 4.2.48
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/appkit.css +9 -9
- package/dist/index.js +208 -104
- package/package.json +3 -1
- package/src/Appkit.ts +1 -0
- package/src/balance/api/index.ts +2 -2
- package/src/balance/components/AccountView.vue +34 -29
- package/src/components/bt-cropper/index.vue +2 -2
- package/src/index.ts +3 -1
- package/src/notice/api/index.ts +2 -2
- package/src/notice/components/NoticeBanner.vue +14 -22
- package/src/notice/components/NoticeEntry.vue +2 -2
- package/src/notice/components/NoticeList.vue +6 -2
- package/src/notice/components/useCommonList.ts +5 -5
- package/src/payment/api/endpoints.ts +17 -22
- package/src/payment/api/index.ts +2 -2
- package/src/payment/components/RechargeView.vue +39 -19
- package/src/payment/components/TradeView.vue +3 -3
- package/src/payment/services/request-payment.ts +34 -4
- package/src/payment/types.ts +8 -7
- package/src/register/components/SelfRegistration.vue +2 -2
- package/src/shared/components/AppDrawer.vue +9 -10
- package/src/shared/components/OcrBusinessLicense.vue +6 -6
- package/src/shared/components/OcrIcon.vue +7 -7
- package/src/shared/index.ts +5 -1
- package/src/shared/weixin/index.ts +9 -1
- package/src/shared/weixin/jssdk.ts +91 -0
- package/src/user/api/index.ts +3 -3
- package/src/user/components/UserAuth.vue +26 -63
- package/src/user/components/UserBinding.vue +41 -70
- package/src/user/components/UserBindingSuccess.vue +2 -2
- package/src/user/components/UserFeedback.vue +40 -43
- package/src/user/components/UserInfo.vue +56 -181
|
@@ -1,117 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<scroll-view
|
|
3
|
-
:scroll-y="!userState.visible && !avatarVisible"
|
|
4
|
-
class="user-info"
|
|
5
|
-
>
|
|
2
|
+
<scroll-view :scroll-y="!userState.visible && !avatarVisible" class="user-info">
|
|
6
3
|
<DdSkeleton v-if="firstLoading" :row="3"></DdSkeleton>
|
|
7
4
|
<div v-else class="user-info-wrap">
|
|
8
5
|
<div class="user-info-tit">账号信息</div>
|
|
9
6
|
<div class="user-info-head">
|
|
10
7
|
<div class="user-info-head-avatar" @click="avatarVisible = true">
|
|
11
|
-
<img
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
v-if="userInfo.avatar"
|
|
15
|
-
:src="userInfo.avatar"
|
|
16
|
-
alt=""
|
|
17
|
-
/>
|
|
18
|
-
<img
|
|
19
|
-
class="user-info-head-img"
|
|
20
|
-
mode="aspectFit"
|
|
21
|
-
v-else
|
|
22
|
-
src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png"
|
|
23
|
-
alt=""
|
|
24
|
-
/>
|
|
8
|
+
<img class="user-info-head-img" mode="aspectFit" v-if="userInfo.avatar" :src="userInfo.avatar" alt="" />
|
|
9
|
+
<img class="user-info-head-img" mode="aspectFit" v-else
|
|
10
|
+
src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png" alt="" />
|
|
25
11
|
<div class="user-info-head-upload">
|
|
26
|
-
<img
|
|
27
|
-
class="user-info-head-upload-icon"
|
|
28
|
-
mode="aspectFit"
|
|
12
|
+
<img class="user-info-head-upload-icon" mode="aspectFit"
|
|
29
13
|
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHZpZXdCb3g9IjAgMCAzNCAzNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMi4wOTk5IDE4LjQyMjRDMjIuMDk5OSAxNS41ODMyIDE5LjgxNjYgMTMuMjgxNiAxNi45OTk5IDEzLjI4MTZDMTQuMTgzMyAxMy4yODE2IDExLjg5OTkgMTUuNTgzMiAxMS44OTk5IDE4LjQyMjRDMTEuODk5OSAyMS4yNjE2IDE0LjE4MzMgMjMuNTYzMiAxNi45OTk5IDIzLjU2MzJDMTkuODE2NiAyMy41NjMyIDIyLjA5OTkgMjEuMjYxNiAyMi4wOTk5IDE4LjQyMjRWMTguNDIyNFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMi41NSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIzLjc5OTkgNS45OTg4QzIzLjc5OTkgNi4yMzUzOSAyMy45OTAyIDYuNDI3MiAyNC4yMjQ5IDYuNDI3MkgyNS45MjVDMjkuNDQ1OCA2LjQyNzIgMzIuMyA5LjMwNDIxIDMyLjMgMTIuODUzMlYyMy45OTE2QzMyLjMgMjcuNTQwNiAyOS40NDU4IDMwLjQxNzYgMjUuOTI1IDMwLjQxNzZIOC4wNzQ5NEM0LjU1NDE0IDMwLjQxNzYgMS42OTk5NSAyNy41NDA2IDEuNjk5OTUgMjMuOTkxNlYxMi44NTMyQzEuNjk5OTUgOS4zMDQyMSA0LjU1NDE0IDYuNDI3MiA4LjA3NDk0IDYuNDI3Mkg5Ljc3NDk1QzEwLjAwOTcgNi40MjcyIDEwLjIgNi4yMzUzOSAxMC4yIDUuOTk4OEMxMC4yIDUuNzA5NDkgMTAuMjQwNiA1LjQyOTc1IDEwLjMxNjUgNS4xNjUwNkMxMC42NzQ4IDMuOTE0NTEgMTEuODE4OSAzIDEzLjE3NSAzSDIwLjgyNUMyMi40NjggMyAyMy43OTk5IDQuMzQyNjEgMjMuNzk5OSA1Ljk5ODhWNS45OTg4WiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyLjU1IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNy42NDk5IDEwLjI4MjhDOC44MjM1MSAxMC4yODI4IDkuNzc0OSAxMS4yNDE4IDkuNzc0OSAxMi40MjQ4QzkuNzc0OSAxMy42MDc4IDguODIzNTEgMTQuNTY2OCA3LjY0OTkgMTQuNTY2OEM2LjQ3NjMgMTQuNTY2OCA1LjUyNDkgMTMuNjA3OCA1LjUyNDkgMTIuNDI0OEM1LjUyNDkgMTEuMjQxOCA2LjQ3NjMgMTAuMjgyOCA3LjY0OTkgMTAuMjgyOFoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo="
|
|
30
|
-
alt=""
|
|
31
|
-
/>
|
|
14
|
+
alt="" />
|
|
32
15
|
</div>
|
|
33
16
|
</div>
|
|
34
|
-
<nut-cell
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
:desc="encodePhone(userInfo.mobile || '')"
|
|
38
|
-
@click="toBinding"
|
|
39
|
-
/>
|
|
40
|
-
<nut-cell
|
|
41
|
-
v-if="props.isPersonal"
|
|
42
|
-
title="昵称"
|
|
43
|
-
is-link
|
|
44
|
-
@click="onNickNameChange"
|
|
45
|
-
:desc="userInfo?.nickName || '--'"
|
|
46
|
-
/>
|
|
17
|
+
<nut-cell title="登录手机号" is-link :desc="encodePhone(userInfo.mobile || '')" @click="toBinding" />
|
|
18
|
+
<nut-cell v-if="props.isPersonal" title="昵称" is-link @click="onNickNameChange"
|
|
19
|
+
:desc="userInfo?.nickName || '--'" />
|
|
47
20
|
<nut-cell v-else title="昵称" :desc="userInfo?.nickName || '--'" />
|
|
48
21
|
<nut-cell title="认证信息" is-link @click="toAuth">
|
|
49
22
|
<template #desc>
|
|
50
23
|
<span v-if="userInfo?.verifyResult === 1">已认证</span>
|
|
51
|
-
<span v-if="userInfo?.verifyResult === 0" style="color: #e8523f"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<span
|
|
55
|
-
v-if="userInfo?.verifyResult != 0 && userInfo?.verifyResult != 1"
|
|
56
|
-
style="color: #017fff"
|
|
57
|
-
>未认证,去认证</span
|
|
58
|
-
>
|
|
24
|
+
<span v-if="userInfo?.verifyResult === 0" style="color: #e8523f">已失效,重新认证</span>
|
|
25
|
+
<span v-if="userInfo?.verifyResult != 0 && userInfo?.verifyResult != 1"
|
|
26
|
+
style="color: #017fff">未认证,去认证</span>
|
|
59
27
|
</template>
|
|
60
28
|
</nut-cell>
|
|
61
29
|
</div>
|
|
62
30
|
<div v-if="hasQiyezuhu" class="user-info-tit">企业/团队</div>
|
|
63
31
|
<div class="user-info-team">
|
|
64
|
-
<div
|
|
65
|
-
v-if="hasQiyezuhu"
|
|
66
|
-
v-for="(item, key) in userInfo.tenantInfoList"
|
|
67
|
-
:key="key"
|
|
68
|
-
class="user-info-team-item"
|
|
69
|
-
>
|
|
32
|
+
<div v-if="hasQiyezuhu" v-for="(item, key) in userInfo.tenantInfoList" :key="key" class="user-info-team-item">
|
|
70
33
|
<div class="user-info-team-item-avatar">
|
|
71
|
-
<img
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
:src="item.tenantLogo"
|
|
76
|
-
alt=""
|
|
77
|
-
/>
|
|
78
|
-
<img
|
|
79
|
-
v-else
|
|
80
|
-
class="user-info-team-item-avatar-img empty"
|
|
81
|
-
mode="aspectFit"
|
|
82
|
-
src="https://cdn.ddjf.com/static/images/customer-center/tenant-logo.png"
|
|
83
|
-
alt=""
|
|
84
|
-
/>
|
|
34
|
+
<img v-if="item.tenantLogo" class="user-info-team-item-avatar-img" mode="aspectFit" :src="item.tenantLogo"
|
|
35
|
+
alt="" />
|
|
36
|
+
<img v-else class="user-info-team-item-avatar-img empty" mode="aspectFit"
|
|
37
|
+
src="https://cdn.ddjf.com/static/images/customer-center/tenant-logo.png" alt="" />
|
|
85
38
|
</div>
|
|
86
39
|
<div class="user-info-team-item-bd">
|
|
87
40
|
<div class="user-info-team-item-title">{{ item.tenantName }}</div>
|
|
88
41
|
<div class="user-info-team-item-app" v-if="item.appRoleInfo">
|
|
89
|
-
<div
|
|
90
|
-
class="user-info-team-item-app-tag"
|
|
91
|
-
v-for="(aitem, akey) in item.appRoleInfo || []"
|
|
92
|
-
:key="akey"
|
|
93
|
-
>
|
|
42
|
+
<div class="user-info-team-item-app-tag" v-for="(aitem, akey) in item.appRoleInfo || []" :key="akey">
|
|
94
43
|
{{ aitem.appAbbr }}
|
|
95
44
|
</div>
|
|
96
|
-
<div
|
|
97
|
-
class="user-info-team-item-role-btn"
|
|
98
|
-
@click="toShowRole(item)"
|
|
99
|
-
>
|
|
45
|
+
<div class="user-info-team-item-role-btn" @click="toShowRole(item)">
|
|
100
46
|
角色详情
|
|
101
|
-
<img
|
|
102
|
-
:class="{ showRole: item.showRole }"
|
|
103
|
-
class="user-info-team-item-role-btn-icon"
|
|
47
|
+
<img :class="{ showRole: item.showRole }" class="user-info-team-item-role-btn-icon"
|
|
104
48
|
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE4IDlMMTIgMTVMNiA5IiBzdHJva2U9IiMwMTdGRkYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="
|
|
105
|
-
alt=""
|
|
106
|
-
/>
|
|
49
|
+
alt="" />
|
|
107
50
|
</div>
|
|
108
51
|
</div>
|
|
109
52
|
<div class="user-info-team-item-role" v-if="item.showRole">
|
|
110
|
-
<div
|
|
111
|
-
class="user-info-team-item-role-item"
|
|
112
|
-
v-for="(aitem, akey) in item.appRoleInfo || []"
|
|
113
|
-
:key="akey"
|
|
114
|
-
>
|
|
53
|
+
<div class="user-info-team-item-role-item" v-for="(aitem, akey) in item.appRoleInfo || []" :key="akey">
|
|
115
54
|
<div class="user-info-team-item-role-item-name">
|
|
116
55
|
{{ aitem.appAbbr }}
|
|
117
56
|
</div>
|
|
@@ -122,19 +61,11 @@
|
|
|
122
61
|
</div>
|
|
123
62
|
<div class="user-info-team-item-user">
|
|
124
63
|
{{ item.fullName }}
|
|
125
|
-
<img
|
|
126
|
-
|
|
127
|
-
class="user-info-team-item-user-icon"
|
|
128
|
-
src="https://cdn.ddjf.com/static/images/appkit/edit.png"
|
|
129
|
-
alt=""
|
|
130
|
-
/>
|
|
64
|
+
<img @click="toUserNameChange(item)" class="user-info-team-item-user-icon"
|
|
65
|
+
src="https://cdn.ddjf.com/static/images/appkit/edit.png" alt="" />
|
|
131
66
|
</div>
|
|
132
67
|
<div class="user-info-team-item-dept">
|
|
133
|
-
<div
|
|
134
|
-
v-for="(ditem, dkey) in item.deptNames"
|
|
135
|
-
:key="dkey"
|
|
136
|
-
class="user-info-team-item-dept-item"
|
|
137
|
-
>
|
|
68
|
+
<div v-for="(ditem, dkey) in item.deptNames" :key="dkey" class="user-info-team-item-dept-item">
|
|
138
69
|
{{ ditem }}
|
|
139
70
|
</div>
|
|
140
71
|
</div>
|
|
@@ -143,118 +74,61 @@
|
|
|
143
74
|
</div>
|
|
144
75
|
|
|
145
76
|
<div class="user-info-ft">
|
|
146
|
-
<nut-button
|
|
147
|
-
|
|
148
|
-
style="width: 100%; margin-top: 12px"
|
|
149
|
-
@click="toLogout"
|
|
150
|
-
plain
|
|
151
|
-
type="primary"
|
|
152
|
-
>退出登录</nut-button
|
|
153
|
-
>
|
|
77
|
+
<nut-button class="user-info-ft-btn" style="width: 100%; margin-top: 12px" @click="toLogout" plain
|
|
78
|
+
type="primary">退出登录</nut-button>
|
|
154
79
|
</div>
|
|
155
80
|
</div>
|
|
156
81
|
</scroll-view>
|
|
157
82
|
|
|
158
83
|
<!-- 修改用户名弹框 -->
|
|
159
|
-
<nut-dialog
|
|
160
|
-
|
|
161
|
-
:
|
|
162
|
-
pop-class="change-username-popup"
|
|
163
|
-
v-model:visible="userState.visible"
|
|
164
|
-
@cancel="onUserNameCancel"
|
|
165
|
-
>
|
|
166
|
-
<nut-input
|
|
167
|
-
:max-length="20"
|
|
168
|
-
placeholder="请输入新的用户名"
|
|
169
|
-
v-model="userState.value"
|
|
170
|
-
/>
|
|
84
|
+
<nut-dialog title="输入新的用户名" :border="false" pop-class="change-username-popup" v-model:visible="userState.visible"
|
|
85
|
+
@cancel="onUserNameCancel">
|
|
86
|
+
<nut-input :max-length="20" placeholder="请输入新的用户名" v-model="userState.value" />
|
|
171
87
|
<template #footer>
|
|
172
|
-
<nut-button
|
|
173
|
-
class="change-username-popup-cancel"
|
|
174
|
-
type="default"
|
|
175
|
-
@click="onUserNameCancel"
|
|
176
|
-
>
|
|
88
|
+
<nut-button class="change-username-popup-cancel" type="default" @click="onUserNameCancel">
|
|
177
89
|
取消
|
|
178
90
|
</nut-button>
|
|
179
|
-
<nut-button
|
|
180
|
-
class="change-username-popup-ok"
|
|
181
|
-
type="primary"
|
|
182
|
-
@click="onUserNameOk"
|
|
183
|
-
>
|
|
91
|
+
<nut-button class="change-username-popup-ok" type="primary" @click="onUserNameOk">
|
|
184
92
|
确定
|
|
185
93
|
</nut-button>
|
|
186
94
|
</template>
|
|
187
95
|
</nut-dialog>
|
|
188
96
|
|
|
189
97
|
<!-- 修改昵称弹框 -->
|
|
190
|
-
<nut-dialog
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
pop-class="change-username-popup"
|
|
194
|
-
v-model:visible="nickNameState.visible"
|
|
195
|
-
@cancel="onNickNameCancel"
|
|
196
|
-
>
|
|
197
|
-
<input
|
|
198
|
-
v-model="nickNameState.value"
|
|
199
|
-
style="
|
|
98
|
+
<nut-dialog title="输入新的昵称" :border="false" pop-class="change-username-popup" v-model:visible="nickNameState.visible"
|
|
99
|
+
@cancel="onNickNameCancel">
|
|
100
|
+
<input v-model="nickNameState.value" style="
|
|
200
101
|
background: #f5f5f5;
|
|
201
102
|
border-radius: 6px;
|
|
202
103
|
line-height: 40px;
|
|
203
104
|
padding: 10px 25px;
|
|
204
105
|
font-size: 16px;
|
|
205
|
-
"
|
|
206
|
-
:max-length="20"
|
|
207
|
-
placeholder="请输入新的昵称"
|
|
208
|
-
type="nickname"
|
|
209
|
-
/>
|
|
106
|
+
" :max-length="20" placeholder="请输入新的昵称" type="nickname" />
|
|
210
107
|
|
|
211
108
|
<template #footer>
|
|
212
|
-
<nut-button
|
|
213
|
-
class="change-username-popup-cancel"
|
|
214
|
-
type="default"
|
|
215
|
-
@click="onNickNameCancel"
|
|
216
|
-
>
|
|
109
|
+
<nut-button class="change-username-popup-cancel" type="default" @click="onNickNameCancel">
|
|
217
110
|
取消
|
|
218
111
|
</nut-button>
|
|
219
|
-
<nut-button
|
|
220
|
-
class="change-username-popup-ok"
|
|
221
|
-
type="primary"
|
|
222
|
-
@click="onNickNameOk"
|
|
223
|
-
>
|
|
112
|
+
<nut-button class="change-username-popup-ok" type="primary" @click="onNickNameOk">
|
|
224
113
|
确定
|
|
225
114
|
</nut-button>
|
|
226
115
|
</template>
|
|
227
116
|
</nut-dialog>
|
|
228
117
|
|
|
229
118
|
<!-- 修改头像弹框 -->
|
|
230
|
-
<nut-popup
|
|
231
|
-
|
|
232
|
-
style="background: transparent"
|
|
233
|
-
v-model:visible="avatarVisible"
|
|
234
|
-
:overlay-style="{ background: 'rgba(0, 0, 0, 0.9)' }"
|
|
235
|
-
>
|
|
119
|
+
<nut-popup pop-class="upload-avatar-popup" style="background: transparent" v-model:visible="avatarVisible"
|
|
120
|
+
:overlay-style="{ background: 'rgba(0, 0, 0, 0.9)' }">
|
|
236
121
|
<div class="upload-avatar-popup-box">
|
|
237
|
-
<img
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
v-if="userInfo.avatar"
|
|
241
|
-
:src="userInfo.avatar"
|
|
242
|
-
alt=""
|
|
243
|
-
/>
|
|
244
|
-
<img
|
|
245
|
-
class="upload-avatar-popup-avatar"
|
|
246
|
-
mode="aspectFit"
|
|
247
|
-
v-else
|
|
248
|
-
src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png"
|
|
249
|
-
alt=""
|
|
250
|
-
/>
|
|
122
|
+
<img class="upload-avatar-popup-avatar" mode="aspectFit" v-if="userInfo.avatar" :src="userInfo.avatar" alt="" />
|
|
123
|
+
<img class="upload-avatar-popup-avatar" mode="aspectFit" v-else
|
|
124
|
+
src="https://cdn.ddjf.com/static/images/wx-yunservice/account-head.png" alt="" />
|
|
251
125
|
<div class="upload-avatar-popup-btn" @click="toUpload">更换头像</div>
|
|
252
126
|
</div>
|
|
253
127
|
</nut-popup>
|
|
254
128
|
</template>
|
|
255
129
|
|
|
256
130
|
<script lang="ts" setup>
|
|
257
|
-
import Taro, { useDidShow } from "@tarojs/taro";
|
|
131
|
+
import Taro, { useDidShow, showToast, showLoading, hideLoading } from "@tarojs/taro";
|
|
258
132
|
import { ref, onMounted, reactive, onUnmounted } from "vue";
|
|
259
133
|
import { useAppKitOptions } from "../../Appkit";
|
|
260
134
|
import { useEncode } from "../../shared/composables/useEncode";
|
|
@@ -336,7 +210,7 @@ async function toUpload() {
|
|
|
336
210
|
|
|
337
211
|
// 上传图片
|
|
338
212
|
async function updateImage(filePath: string) {
|
|
339
|
-
|
|
213
|
+
showLoading({
|
|
340
214
|
title: "上传中...",
|
|
341
215
|
});
|
|
342
216
|
const appkitOptions = useAppKitOptions();
|
|
@@ -365,16 +239,16 @@ async function updateImage(filePath: string) {
|
|
|
365
239
|
userId: props.userId,
|
|
366
240
|
})
|
|
367
241
|
.then(() => {
|
|
368
|
-
|
|
369
|
-
|
|
242
|
+
hideLoading();
|
|
243
|
+
showToast({ title: "头像上传成功", icon: "none" });
|
|
370
244
|
getUserInfoByUserId();
|
|
371
245
|
emits("avatar-success", res.result);
|
|
372
246
|
})
|
|
373
247
|
.catch(() => {
|
|
374
|
-
|
|
248
|
+
hideLoading();
|
|
375
249
|
});
|
|
376
250
|
} else {
|
|
377
|
-
|
|
251
|
+
hideLoading();
|
|
378
252
|
}
|
|
379
253
|
}
|
|
380
254
|
|
|
@@ -416,13 +290,13 @@ function onNickNameChange() {
|
|
|
416
290
|
}
|
|
417
291
|
function onUserNameOk() {
|
|
418
292
|
if (!userState.value) {
|
|
419
|
-
return
|
|
293
|
+
return showToast({
|
|
420
294
|
title: "请输入用户名",
|
|
421
295
|
icon: "none",
|
|
422
296
|
});
|
|
423
297
|
}
|
|
424
298
|
if (userState.value === userState.oldName) {
|
|
425
|
-
return
|
|
299
|
+
return showToast({
|
|
426
300
|
title: "用户名不能与原用户名相同",
|
|
427
301
|
icon: "none",
|
|
428
302
|
});
|
|
@@ -437,7 +311,7 @@ function onUserNameOk() {
|
|
|
437
311
|
userId: props.userId,
|
|
438
312
|
})
|
|
439
313
|
.then(() => {
|
|
440
|
-
|
|
314
|
+
showToast({ title: "用户名修改成功", icon: "none" });
|
|
441
315
|
getUserInfoByUserId();
|
|
442
316
|
onUserNameCancel();
|
|
443
317
|
emits("username-success");
|
|
@@ -446,13 +320,13 @@ function onUserNameOk() {
|
|
|
446
320
|
|
|
447
321
|
function onNickNameOk() {
|
|
448
322
|
if (!nickNameState.value) {
|
|
449
|
-
return
|
|
323
|
+
return showToast({
|
|
450
324
|
title: "请输入昵称",
|
|
451
325
|
icon: "none",
|
|
452
326
|
});
|
|
453
327
|
}
|
|
454
328
|
// if (userState.value === userState.oldName) {
|
|
455
|
-
// return
|
|
329
|
+
// return showToast({
|
|
456
330
|
// title: "用户名不能与原用户名相同",
|
|
457
331
|
// icon: "none",
|
|
458
332
|
// });
|
|
@@ -465,7 +339,7 @@ function onNickNameOk() {
|
|
|
465
339
|
nickName: nickNameState.value,
|
|
466
340
|
})
|
|
467
341
|
.then(() => {
|
|
468
|
-
|
|
342
|
+
showToast({ title: "昵称修改成功", icon: "none" });
|
|
469
343
|
getUserInfoByUserId();
|
|
470
344
|
onNickNameCancel();
|
|
471
345
|
// emits("username-success");
|
|
@@ -519,6 +393,7 @@ defineExpose({
|
|
|
519
393
|
<style lang="scss">
|
|
520
394
|
.user-info {
|
|
521
395
|
height: 100vh;
|
|
396
|
+
|
|
522
397
|
.nut-cell {
|
|
523
398
|
border-radius: 0px;
|
|
524
399
|
}
|