点灯
This commit is contained in:
parent
54c71e4e14
commit
e6b33e9d7e
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user