This commit is contained in:
WindowBird 2025-11-24 17:25:29 +08:00
parent 54c71e4e14
commit e6b33e9d7e
4 changed files with 42 additions and 42 deletions

View File

@ -2,10 +2,10 @@
<view class="enshrined-list">
<!-- 表格头部 -->
<view class="table-header">
<view class="header-cell worshiper-col">供奉</view>
<view class="header-cell time-col">供奉时间</view>
<view class="header-cell worshiper-col">点灯</view>
<view class="header-cell time-col">点灯时间</view>
<view class="header-cell time-col">结束时间</view>
<view class="header-cell type-col">供奉类型</view>
<view class="header-cell type-col">点灯类型</view>
</view>
<!-- 表格内容 -->
@ -32,7 +32,7 @@
<!-- 空状态 -->
<view v-if="!loading && enshrinedList.length === 0" class="empty-state">
<view class="empty-icon">📝</view>
<view class="empty-text">暂无供奉记录</view>
<view class="empty-text">暂无点灯记录</view>
</view>
<!-- 加载更多 -->
@ -132,7 +132,7 @@ export default {
this.hasMore = this.enshrinedList.length < total;
} catch (error) {
console.error("加载供奉列表失败:", error);
console.error("加载点灯列表失败:", error);
// 使
console.log("API 调用失败,使用模拟数据");
const mockData = this.getMockData();

View File

@ -2,10 +2,10 @@
<view class="enshrined-list">
<!-- 表格头部 -->
<view class="table-header">
<view class="header-cell worshiper-col">供奉</view>
<view class="header-cell time-col">供奉时间</view>
<view class="header-cell worshiper-col">点灯</view>
<view class="header-cell time-col">点灯时间</view>
<view class="header-cell time-col">结束时间</view>
<view class="header-cell type-col">供奉类型</view>
<view class="header-cell type-col">点灯类型</view>
</view>
<!-- 表格内容 -->
@ -16,23 +16,23 @@
class="table-row"
@click="handleItemClick(item)"
>
<view class="table-cell worshiper-col">{{
item.worshiperName || "未知"
}}</view>
<view class="table-cell time-col">{{
formatDate(item.startDate)
}}</view>
<view class="table-cell worshiper-col"
>{{ item.worshiperName || "未知" }}
</view>
<view class="table-cell time-col"
>{{ formatDate(item.startDate) }}
</view>
<view class="table-cell time-col">{{ formatDate(item.endDate) }}</view>
<view class="table-cell type-col">{{
item.thaliName || "未知类型"
}}</view>
<view class="table-cell type-col"
>{{ item.thaliName || "未知类型" }}
</view>
</view>
</view>
<!-- 空状态 -->
<view v-if="!loading && enshrinedList.length === 0" class="empty-state">
<view class="empty-icon">📝</view>
<view class="empty-text">暂无供奉记录</view>
<view class="empty-text">暂无点灯记录</view>
</view>
<!-- 加载更多 -->
@ -132,7 +132,7 @@ export default {
this.hasMore = this.enshrinedList.length < total;
} catch (error) {
console.error("加载供奉列表失败:", error);
console.error("加载点灯列表失败:", error);
// 使
console.log("API 调用失败,使用模拟数据");
const mockData = this.getMockData();

View File

@ -8,9 +8,9 @@
</view>
<!-- 标题 -->
<view class="modal-title">牌位供奉</view>
<view class="modal-title">牌位点灯</view>
<!-- 供奉时长选择 -->
<!-- 点灯时长选择 -->
<view class="duration-section">
<view class="duration-grid">
<view
@ -26,17 +26,17 @@
</view>
</view>
<!-- 供奉人信息 -->
<!-- 点灯人信息 -->
<view class="offerer-section">
<view class="section-label">供奉</view>
<view class="section-label">点灯</view>
<input
v-model="offererName"
class="offerer-input"
maxlength="20"
placeholder="请填写供奉人姓名"
placeholder="请填写点灯人姓名"
/>
</view>
<view class="input-tip">将在供奉名单上展现供奉人的姓名此为必填</view>
<view class="input-tip">将在点灯名单上展现点灯人的姓名此为必填</view>
<!-- 确认按钮 -->
<view class="confirm-section">
@ -44,7 +44,7 @@
<text class="total-price">¥{{ totalPrice }}</text>
</view>
<view class="confirm-btn" @click="handleConfirm">
<text class="btn-text">立即供奉</text>
<text class="btn-text">立即点灯</text>
</view>
</view>
</view>
@ -91,17 +91,17 @@ export default {
this.$emit("close");
},
//
//
selectDuration(value) {
this.selectedDuration = value;
},
//
//
handleConfirm() {
//
//
if (!this.offererName.trim()) {
uni.showToast({
title: "请填写供奉人姓名",
title: "请填写点灯人姓名",
icon: "none",
});
return;

View File

@ -109,7 +109,7 @@
@view-details="handleViewDetails"
/>
<view class="placeholder"></view>
<!-- 供奉列表 -->
<!-- 点灯列表 -->
<enshrined-list
v-if="!loading"
ref="enshrinedList"
@ -122,7 +122,7 @@
<bottom-button title="立即点灯" type="primary" @click="submitPrayer" />
</view>
<!-- 供奉弹窗 -->
<!-- 点灯弹窗 -->
<OfferingModal
:durationOptions="PackageList"
:visible="showOfferingModal"
@ -178,7 +178,7 @@ export default {
memorialDetail: null,
//
scrollTop: 0,
//
//
showOfferingModal: false,
//
isCollected: false,
@ -417,39 +417,39 @@ export default {
console.log("查看单元详情:", unitData);
},
//
//
submitPrayer() {
if (!checkLogin()) {
return;
}
console.log("显示供奉弹窗");
console.log("显示点灯弹窗");
this.showOfferingModal = true;
},
//
//
closeOfferingModal() {
this.showOfferingModal = false;
},
//
//
async handleOfferingConfirm(offeringData) {
offeringData = { ...offeringData, memorialId: this.selectedUnitId };
console.log("确认供奉:", offeringData);
console.log("确认点灯:", offeringData);
// API
// API
uni.showLoading({
title: "正在提交供奉...",
title: "正在提交点灯...",
});
let res = await ordersEnshrined(offeringData);
uni.hideLoading();
if (res.code === 200) {
uni.showToast({
title: "供奉成功!",
title: "点灯成功!",
icon: "success",
});
//
//
if (
this.$refs.statusBar &&
typeof this.$refs.statusBar.loadUnitData === "function"