Commit e5a5f9c3 by chenwq

移除草稿保存按钮,优化底部操作按钮栏布局

1 parent 1c068aea
......@@ -158,9 +158,6 @@ Page({
wx.hideLoading();
});
},
handleSaveDraft() {
this.saveOrderData("draft");
},
// handleValidChange(e) {
// this.setData({ isFormValid: e.detail.isValid });
......@@ -221,23 +218,21 @@ Page({
},
/**
* 封装的统一调用接口(草稿/上一步/下一步/发拍)
* @param {String} actionType 'draft' | 'prev' | 'next' | 'submit'
* 封装的统一调用接口(上一步/下一步/发拍)
* @param {String} actionType 'prev' | 'next' | 'submit'
*/
saveOrderData(actionType) {
if (this.data.isRequesting) return;
const { formData, currentStep, optType } = this.data;
// 按需求:true=提交发拍,false=保存草稿/上一步/下一步
// 按需求:true=提交发拍,false=上一步/下一步
const isSubmit = actionType === "submit";
// 当 optType 为 republish 且不是最终提交时,只做本地步骤切换,不调用接口
if (optType === "republish" && !isSubmit) {
const stepMap = { 1: "first", 2: "second", 3: "third", 4: "fourth" };
if (actionType === "draft") {
wx.p.router.goHome();
} else if (actionType === "prev") {
if (actionType === "prev") {
const prevNum = currentStep - 1;
this.setData({ currentStep: prevNum, step: stepMap[prevNum] });
} else if (actionType === "next") {
......@@ -280,12 +275,6 @@ Page({
const stepMap = { 1: "first", 2: "second", 3: "third", 4: "fourth" };
switch (actionType) {
case "draft":
setTimeout(() => {
wx.p.router.goHome();
}, 1000);
break;
case "prev":
const prevNum = currentStep - 1;
this.setData({ currentStep: prevNum, step: stepMap[prevNum] });
......
......@@ -375,18 +375,10 @@ page {
z-index: 100;
border-top: 1rpx solid #eeeeee;
.btn-draft {
font-size: var(--fontSize32);
color: #2F6DFA;
padding: 0 var(--fontSize40);
flex-shrink: 0;
font-weight: 500;
}
.right-btns {
display: flex;
flex: 1;
padding-right: var(--fontSize32);
padding: 0 var(--fontSize32);
gap: var(--fontSize24);
justify-content: flex-end;
......
......@@ -63,8 +63,6 @@
<!-- 底部操作按钮栏 -->
<view class="bottom-action-bar">
<view class="btn-draft" bindtap="handleSaveDraft">存草稿</view>
<view class="right-btns">
<view wx:if="{{currentStep > 1}}" class="action-btn btn-prev" bindtap="handlePrevStep">上一步</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!