This commit is contained in:
@@ -7,6 +7,7 @@ const { normalizeAvatar } = require('../../utils/profile-card')
|
||||
const profileCache = require('../../utils/profile-cache')
|
||||
const employeesApi = require('../../api/employees')
|
||||
const { showErrorToast, toUserMessage } = require('../../utils/toast')
|
||||
const { showActionModal } = require('../../utils/action-modal')
|
||||
|
||||
function canCreateAppointment() {
|
||||
const app = getApp()
|
||||
@@ -287,15 +288,11 @@ Page({
|
||||
}
|
||||
if (!summary.noticeEnabled || Number(summary.pendingCount || 0) <= 0) return false
|
||||
app.globalData.reviewNoticeShown = true
|
||||
const result = await new Promise(resolve => {
|
||||
wx.showModal({
|
||||
title: '有美甲师申请待审核',
|
||||
content: `当前有 ${summary.pendingCount} 条美甲师加入申请,请在小程序员工页面审核。是否立即处理?`,
|
||||
cancelText: '稍后处理',
|
||||
confirmText: '立即审核',
|
||||
success: resolve,
|
||||
fail: () => resolve({ confirm: false })
|
||||
})
|
||||
const result = await showActionModal(this, {
|
||||
title: '有美甲师申请待审核',
|
||||
content: `当前有 ${summary.pendingCount} 条美甲师加入申请,请在小程序员工页面审核。是否立即处理?`,
|
||||
cancelText: '稍后处理',
|
||||
confirmText: '立即审核'
|
||||
})
|
||||
if (!result.confirm) return false
|
||||
app.globalData.openEmployeeReview = true
|
||||
@@ -934,21 +931,18 @@ Page({
|
||||
wx.navigateTo({ url: `/pages/artist-transfer/index?id=${event.currentTarget.dataset.id}` })
|
||||
},
|
||||
|
||||
quickCancel(event) {
|
||||
async quickCancel(event) {
|
||||
const appointment = (this._calendarData && this._calendarData.appointments || []).find(item => String(item.orderItemId) === String(event.currentTarget.dataset.id))
|
||||
if (!appointment) return
|
||||
wx.showModal({
|
||||
const result = await showActionModal(this, {
|
||||
title: '取消预约',
|
||||
editable: true,
|
||||
placeholderText: '可填写取消原因',
|
||||
content: '',
|
||||
cancelText: '取消',
|
||||
confirmText: '确认取消',
|
||||
success: result => {
|
||||
if (result.confirm) {
|
||||
this.updateAppointmentStatus(appointment.orderId, 3, result.content || '')
|
||||
}
|
||||
}
|
||||
confirmType: 'danger'
|
||||
})
|
||||
if (result.confirm) this.updateAppointmentStatus(appointment.orderId, 3, result.content || '')
|
||||
},
|
||||
|
||||
async updateAppointmentStatus(orderId, status, cancelReason) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "日程"
|
||||
"navigationBarTitleText": "日程",
|
||||
"usingComponents": {
|
||||
"action-modal": "/components/action-modal/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<view class="wechat-avatar-hint">{{profileSaving ? '上传中' : '点击更换'}}</view>
|
||||
</button>
|
||||
<input class="wechat-nickname" type="nickname" value="{{profileForm.nickname}}" bindinput="onNicknameInput" placeholder="填写微信昵称" />
|
||||
<button class="profile-save" loading="{{profileSaving}}" bindtap="saveWechatProfile">保存资料</button><button class="profile-skip" bindtap="skipProfilePrompt">暂时跳过</button>
|
||||
<button class="primary-btn profile-save" loading="{{profileSaving}}" bindtap="saveWechatProfile">保存资料</button><button class="secondary-btn profile-skip" bindtap="skipProfilePrompt">暂时跳过</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -226,4 +226,5 @@
|
||||
</block>
|
||||
|
||||
<button wx:if="{{canCreateAppointment && businessHoursConfigured && !calendarError && (viewMode !== 'day' || currentShopOpen)}}" class="fab" bindtap="createAppointment">+</button>
|
||||
<action-modal id="actionModal" />
|
||||
</view>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
padding-top: 18rpx;
|
||||
}
|
||||
|
||||
.phone-banner { display:flex; align-items:center; margin-bottom:18rpx; padding:16rpx 18rpx; border-radius:14rpx; background:#fff2d8; color:#815f2b; overflow:hidden; }.phone-banner-track { display:flex; flex:1; width:0; gap:50rpx; white-space:nowrap; animation:phoneBannerScroll 10s linear infinite; font-size:22rpx; }.phone-banner-close { position:relative; z-index:2; margin-left:18rpx; padding:6rpx; background:#fff2d8; font-size:32rpx; }.profile-prompt-mask { position:fixed; z-index:30; inset:0; display:flex; align-items:center; justify-content:center; padding:40rpx; background:rgba(25,41,33,.55); }.profile-prompt { box-sizing:border-box; display:flex; width:100%; flex-direction:column; align-items:center; padding:36rpx; border-radius:24rpx; background:#fff; }.profile-prompt-title { color:#17211f; font-size:32rpx; font-weight:800; }.profile-prompt-desc { margin-top:10rpx; color:#71807a; font-size:22rpx; text-align:center; }.wechat-nickname { box-sizing:border-box; width:100%; height:80rpx; margin-top:24rpx; padding:0 22rpx; border:1rpx solid #dce8df; border-radius:13rpx; background:#f7faf8; }.profile-save { width:100%; height:80rpx; margin-top:22rpx; border-radius:14rpx; background:#247b63; color:#fff; line-height:80rpx; }.profile-skip { margin-top:12rpx; background:transparent; color:#7e8e85; font-size:23rpx; }
|
||||
.phone-banner { display:flex; align-items:center; margin-bottom:18rpx; padding:16rpx 18rpx; border-radius:14rpx; background:#fff2d8; color:#815f2b; overflow:hidden; }.phone-banner-track { display:flex; flex:1; width:0; gap:50rpx; white-space:nowrap; animation:phoneBannerScroll 10s linear infinite; font-size:22rpx; }.phone-banner-close { position:relative; z-index:2; margin-left:18rpx; padding:6rpx; background:#fff2d8; font-size:32rpx; }.profile-prompt-mask { position:fixed; z-index:30; inset:0; display:flex; align-items:center; justify-content:center; padding:40rpx; background:rgba(25,41,33,.55); }.profile-prompt { box-sizing:border-box; display:flex; width:100%; flex-direction:column; align-items:center; padding:36rpx; border-radius:24rpx; background:#fff; }.profile-prompt-title { color:#17211f; font-size:32rpx; font-weight:800; }.profile-prompt-desc { margin-top:10rpx; color:#71807a; font-size:22rpx; text-align:center; }.wechat-nickname { box-sizing:border-box; width:100%; height:80rpx; margin-top:24rpx; padding:0 22rpx; border:1rpx solid #dce8df; border-radius:13rpx; background:#f7faf8; }.profile-save { margin-top:22rpx; }.profile-skip { margin-top:20rpx; }
|
||||
|
||||
.wechat-avatar {
|
||||
position: relative;
|
||||
@@ -40,16 +40,18 @@
|
||||
|
||||
.wechat-avatar-hint {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 38rpx;
|
||||
background: rgba(22, 27, 25, 0.68);
|
||||
left: 50%;
|
||||
height: 44rpx;
|
||||
padding: 0 24rpx;
|
||||
border-radius: 22rpx;
|
||||
background: rgba(0, 0, 0, 0.55);
|
||||
color: #fff;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
line-height: 38rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
white-space: nowrap;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
@keyframes phoneBannerScroll { from { transform:translateX(0); } to { transform:translateX(-48%); } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user