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

View File

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

View File

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

View File

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