This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const authApi = require('../../api/auth')
|
||||
const { showErrorToast } = require('../../utils/toast')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@@ -94,7 +95,7 @@ Page({
|
||||
const result = await authApi.uploadRegistrationAvatar(this.data.registrationTicket, filePath)
|
||||
this.setData({ 'form.applicantAvatarFileId': result.fileId || result.id, 'form.applicantAvatarUrl': filePath })
|
||||
} catch (error) {
|
||||
wx.showToast({ title: error.message || '头像上传失败', icon: 'none' })
|
||||
showErrorToast(error, '头像上传失败')
|
||||
} finally {
|
||||
this.setData({ avatarUploading: false })
|
||||
}
|
||||
@@ -209,7 +210,7 @@ Page({
|
||||
this.setData({ ticketInvalid: true })
|
||||
return
|
||||
}
|
||||
wx.showToast({ title: message, icon: 'none' })
|
||||
showErrorToast(error, '提交失败')
|
||||
} finally {
|
||||
this.setData({ loading: false })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user