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 })
|
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 })
|
get<UserInfo | null>('weighingScale/v3/getUserInfoByIdcard', params, { loading: false })
|
||||||
|
|
||||||
/** 更新用户信息 */
|
/** 更新用户信息 */
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ Page({
|
|||||||
|
|
||||||
fetchUser() {
|
fetchUser() {
|
||||||
getUserInfoByIdCard({
|
getUserInfoByIdCard({
|
||||||
sn: '',
|
|
||||||
idCard: this.data.idCard,
|
idCard: this.data.idCard,
|
||||||
realname: this.data.name,
|
realname: this.data.name,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -92,7 +91,7 @@ Page({
|
|||||||
birthday: parsed.birthday,
|
birthday: parsed.birthday,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
wx.setStorageSync('userInfo', res.result)
|
wx.setStorageSync('userInfo', res.result)
|
||||||
wx.showToast({ title: '保存成功', icon: 'success' })
|
wx.switchTab({ url: '/pages/home/home' })
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
wx.showToast({ title: '保存失败,请重试', icon: 'none' })
|
wx.showToast({ title: '保存失败,请重试', icon: 'none' })
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<view class="form-label">
|
<view class="form-label">
|
||||||
<text class="label-text">身高</text>
|
<text class="label-text">身高</text>
|
||||||
|
<text class="label-star">*</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-control">
|
<view class="form-control">
|
||||||
<view class="form-input-wrap">
|
<view class="form-input-wrap">
|
||||||
|
|||||||
Reference in New Issue
Block a user