feat(supplementPersonal): 保存后跳转首页、身高标必填、sn 参数改为可选
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e5f76fc0a9
commit
feb494080c
@@ -42,7 +42,7 @@ export const checkOpenIdLogin = (code: string) =>
|
||||
post<LoginResult>('weighingScale/v2/checkOpenIdLogin', { code })
|
||||
|
||||
/** 根据身份证号查询用户信息 */
|
||||
export const getUserInfoByIdCard = (params: { sn: string; idCard: string; realname: string }) =>
|
||||
export const getUserInfoByIdCard = (params: { sn?: string; idCard: string; realname: string }) =>
|
||||
get<UserInfo | null>('weighingScale/v3/getUserInfoByIdcard', params, { loading: false })
|
||||
|
||||
/** 更新用户信息 */
|
||||
|
||||
@@ -39,7 +39,6 @@ Page({
|
||||
|
||||
fetchUser() {
|
||||
getUserInfoByIdCard({
|
||||
sn: '',
|
||||
idCard: this.data.idCard,
|
||||
realname: this.data.name,
|
||||
}).then((res) => {
|
||||
@@ -92,7 +91,7 @@ Page({
|
||||
birthday: parsed.birthday,
|
||||
}).then((res) => {
|
||||
wx.setStorageSync('userInfo', res.result)
|
||||
wx.showToast({ title: '保存成功', icon: 'success' })
|
||||
wx.switchTab({ url: '/pages/home/home' })
|
||||
}).catch(() => {
|
||||
wx.showToast({ title: '保存失败,请重试', icon: 'none' })
|
||||
})
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<view class="form-row">
|
||||
<view class="form-label">
|
||||
<text class="label-text">身高</text>
|
||||
<text class="label-star">*</text>
|
||||
</view>
|
||||
<view class="form-control">
|
||||
<view class="form-input-wrap">
|
||||
|
||||
Reference in New Issue
Block a user