小程序浮层动作项按钮化并统一按钮样式
自动发布开发环境 Nacos 配置 / publish (push) Successful in 27s

This commit is contained in:
2026-11-07 00:38:22 +08:00
parent a5f050286b
commit 1482bda1fa
31 changed files with 322 additions and 78 deletions
@@ -2,6 +2,7 @@ const planningApi = require('../../api/planning')
const customersApi = require('../../api/customers')
const { markPlanningRefresh } = require('../../utils/planning-refresh')
const { showErrorToast, toUserMessage } = require('../../utils/toast')
const { showActionModal } = require('../../utils/action-modal')
function displayValue(value, fallback) {
if (value === null || value === undefined) return fallback
@@ -127,21 +128,20 @@ Page({
this.updateStatus(2)
},
cancel() {
async cancel() {
if (!this.data.showCancel || this.data.updating) return
this._cancelReason = ''
wx.showModal({
const result = await showActionModal(this, {
title: '取消预约',
editable: true,
placeholderText: '可填写取消原因',
content: '',
cancelText: '取消',
confirmText: '确认取消',
success: result => {
if (!result.confirm) return
this._cancelReason = result.content || ''
this.updateStatus(3)
}
confirmType: 'danger'
})
if (!result.confirm) return
this._cancelReason = result.content || ''
this.updateStatus(3)
},
async dialCustomer() {
@@ -1,3 +1,6 @@
{
"navigationBarTitleText": "预约详情"
"navigationBarTitleText": "预约详情",
"usingComponents": {
"action-modal": "/components/action-modal/index"
}
}
@@ -85,4 +85,5 @@
<button wx:if="{{showComplete}}" class="secondary-btn" loading="{{updating}}" disabled="{{updating}}" bindtap="complete">{{appointment.historicalBackfill ? '完成补单' : '完成服务'}}</button>
<button wx:if="{{showCancel}}" class="danger-btn" loading="{{updating}}" disabled="{{updating}}" bindtap="cancel">取消预约</button>
</view>
<action-modal id="actionModal" />
</view>