Salon美甲师注册申请关联微信账号
自动发布开发环境 Nacos 配置 / publish (push) Successful in 26s

This commit is contained in:
2026-10-30 03:46:24 +08:00
parent 5a787a93f3
commit 7b40ee1650
27 changed files with 733 additions and 91 deletions
+18 -1
View File
@@ -4,7 +4,7 @@ Page({
data: {
step: 1,
role: 'manager',
form: { shopName: '', shopAddress: '', shopId: '' },
form: { shopName: '', shopAddress: '', shopId: '', applicantNickname: '', applicantAvatarFileId: '', applicantAvatarUrl: '' },
registrationTicket: '',
applicationId: '',
shopOptions: [],
@@ -15,6 +15,7 @@ Page({
shopError: '',
selectedShopName: '',
loading: false,
avatarUploading: false,
ticketInvalid: false
},
@@ -49,6 +50,20 @@ Page({
},
onInput(event) { this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) },
async chooseApplicantAvatar(event) {
try {
const filePath = event && event.detail ? event.detail.avatarUrl : ''
if (!filePath) return
this.setData({ avatarUploading: true })
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' })
} finally {
this.setData({ avatarUploading: false })
}
},
selectRole(event) { this.setData({ role: event.currentTarget.dataset.role }) },
continueFromRole() { if (!this.data.ticketInvalid) this.setData({ step: 2 }) },
@@ -101,6 +116,8 @@ Page({
shopAddress: String(form.shopAddress || '').trim(),
shopId: form.shopId || undefined,
roleType: this.data.role === 'manager' ? 'MANAGER' : 'STAFF',
applicantNickname: this.data.role === 'staff' ? String(form.applicantNickname || '').trim() || undefined : undefined,
applicantAvatarFileId: this.data.role === 'staff' ? form.applicantAvatarFileId || undefined : undefined,
agreementAccepted: true
})
this.setData({ step: 3, registrationTicket: '' })