This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const employeesApi = require('../../api/employees')
|
||||
const { chooseImageFilePath, uploadObjectFile } = require('../../utils/upload')
|
||||
const { showErrorToast } = require('../../utils/toast')
|
||||
|
||||
const EMPLOYEE_COLORS = ['#7BA7C7', '#8FB89A', '#A894C7', '#D7A86E', '#D98DA5', '#79A6A3', '#B9A16B', '#9BA9C8']
|
||||
|
||||
@@ -66,7 +67,7 @@ Page({
|
||||
'form.avatarUrl': filePath
|
||||
})
|
||||
} catch (error) {
|
||||
wx.showToast({ title: error.message || '头像上传失败', icon: 'none' })
|
||||
showErrorToast(error, '头像上传失败')
|
||||
} finally {
|
||||
this.setData({ avatarUploading: false })
|
||||
}
|
||||
@@ -122,7 +123,7 @@ Page({
|
||||
}
|
||||
await this.offerPendingAssociation()
|
||||
} catch (error) {
|
||||
wx.showToast({ title: error.message || '新增失败', icon: 'none' })
|
||||
showErrorToast(error, '新增失败')
|
||||
} finally {
|
||||
this.setData({ creating: false })
|
||||
}
|
||||
@@ -207,7 +208,7 @@ Page({
|
||||
this.setData({ associationSheetVisible: false, onboardingVisible: true })
|
||||
wx.showToast({ title: '已预关联申请', icon: 'success' })
|
||||
} catch (error) {
|
||||
wx.showToast({ title: error.message || '关联失败,请重新选择', icon: 'none' })
|
||||
showErrorToast(error, '关联失败,请重新选择')
|
||||
this.setData({ associationSelectedId: '' })
|
||||
} finally {
|
||||
this.setData({ associationLoading: false })
|
||||
|
||||
Reference in New Issue
Block a user