diff --git a/pages/future/future.vue b/pages/future/future.vue index de205c2..0d35d5a 100644 --- a/pages/future/future.vue +++ b/pages/future/future.vue @@ -85,7 +85,7 @@ - + @@ -112,62 +112,62 @@ export default { buddhaIcon: "https://api.ccttiot.com/image-1756353071821.png", loading: false, projectDetails: { - createBy: null, - createTime: "2025-07-08 17:50:26", - updateBy: null, - updateTime: null, - remark: null, - scope: null, - deleted: null, - areaPermissions: null, - id: "6", - templeId: "11", - proName: "123", - proProfile: "我们计划在202X-203X年完成这些重要建设,邀您共同见证", - formedYear: null, - imgUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", - proIntroduce: - "

项目介绍项目介绍项目介绍项目介绍项目介绍项目介

绍项目介绍项目介绍项目介绍项目介绍项目介绍

项目介绍项目介绍项目介绍项目介绍项目介绍项目介

绍项目介绍项目介绍项目

项目介绍项目介绍项目介绍项目介绍项目介绍项目介

绍项目介绍项目介绍项目介绍项目介绍项目介绍

", - totalAmount: 10000101.0, - state: "1", - createId: null, - templeName: "少林寺", - donorCount: 6, - amountSum: 6666666, + // createBy: null, + // createTime: "2025-07-08 17:50:26", + // updateBy: null, + // updateTime: null, + // remark: null, + // scope: null, + // deleted: null, + // areaPermissions: null, + // id: "6", + // templeId: "11", + // proName: "123", + // proProfile: "我们计划在202X-203X年完成这些重要建设,邀您共同见证", + // formedYear: null, + // imgUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", + // proIntroduce: + // "

项目介绍项目介绍项目介绍项目介绍项目介绍项目介

绍项目介绍项目介绍项目介绍项目介绍项目介绍

项目介绍项目介绍项目介绍项目介绍项目介绍项目介

绍项目介绍项目介绍项目

项目介绍项目介绍项目介绍项目介绍项目介绍项目介

绍项目介绍项目介绍项目介绍项目介绍项目介绍

", + // totalAmount: 10000101.0, + // state: "1", + // createId: null, + // templeName: "少林寺", + // donorCount: 6, + // amountSum: 6666666, }, winB_List: [ - { - id: "18", - templeId: "12", - title: "施工情况01", - content: "

施工情况02施工情况02...

", - status: "1", - templeName: "寒山寺", - createTime: "2025-07-09 13:50:57", - coverUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", - }, - - { - id: "19", - templeId: "12", - title: "施工情况01232", - content: - "

施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02...

", - status: "1", - templeName: "寒山寺", - createTime: "2025-07-09 13:50:57", - coverUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", - }, - { - id: "19", - templeId: "12", - title: "施工情况01232", - content: "

施工情况02施工情况02...

", - status: "1", - templeName: "寒山寺", - createTime: "2025-07-09 13:50:57", - coverUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", - }, + // { + // id: "18", + // templeId: "12", + // title: "施工情况01", + // content: "

施工情况02施工情况02...

", + // status: "1", + // templeName: "寒山寺", + // createTime: "2025-07-09 13:50:57", + // coverUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", + // }, + // + // { + // id: "19", + // templeId: "12", + // title: "施工情况01232", + // content: + // "

施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02施工情况02...

", + // status: "1", + // templeName: "寒山寺", + // createTime: "2025-07-09 13:50:57", + // coverUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", + // }, + // { + // id: "19", + // templeId: "12", + // title: "施工情况01232", + // content: "

施工情况02施工情况02...

", + // status: "1", + // templeName: "寒山寺", + // createTime: "2025-07-09 13:50:57", + // coverUrl: "https://api.ccttiot.com/IMG01-1751968117197.jpg", + // }, ], }; }, @@ -191,7 +191,8 @@ export default { // 处理机构详情数据 if (detailResponse?.code === 200) { - //this.projectDetails = detailResponse.data; + this.projectDetails = detailResponse.data; + console.log("projectDetails.state:", this.projectDetails.state); } else { console.warn("获取机构详情失败:", detailResponse?.message); uni.showToast({ @@ -241,9 +242,48 @@ export default { url: `/pages/institutionalStructure/projectDetail?title=${encodeURIComponent(item.title)}&content=${encodeURIComponent(item.content)}&createTime=${encodeURIComponent(item.createTime)}&coverUrl=${encodeURIComponent(item.coverUrl)}`, }); }, - // 计算筹款进度百分比 + handleDonate() { + console.log("根据state进行弹窗", this.projectDetails.state); + if (this.projectDetails.state === "1") { + uni.showToast({ + title: "捐款暂未开始", + icon: "none", + duration: 2000, + }); + } + + if (this.projectDetails.state !== "1") { + // 执行捐赠逻辑 + uni.showModal({ + title: "提示", // 标题(可选) + content: "确定要执行此操作吗?", // 内容 + confirmText: "确定", // 确认按钮文字(默认"确定") + cancelText: "取消", // 取消按钮文字(默认"取消") + confirmColor: "#007AFF", // 确认按钮颜色 + cancelColor: "#555555", // 取消按钮颜色 + showCancel: true, // 是否显示取消按钮(默认true) + success: (res) => { + if (res.confirm) { + console.log("用户点击确定"); + // 执行确认操作 + } else if (res.cancel) { + console.log("用户点击取消"); + // 执行取消操作 + } + }, + fail: (err) => { + console.error("弹窗调用失败:", err); + uni.showToast({ + title: "操作失败,请重试", + icon: "none", + }); + }, + }); + } + }, }, computed: { + // 计算筹款进度百分比 getProgressPercentage() { if ( !this.projectDetails.totalAmount || diff --git a/pages/institutionalStructure/institutionalStructure.vue b/pages/institutionalStructure/institutionalStructure.vue index 6794249..bc666db 100644 --- a/pages/institutionalStructure/institutionalStructure.vue +++ b/pages/institutionalStructure/institutionalStructure.vue @@ -89,7 +89,7 @@ export default { // 处理查看详细 handleViewDetail(data) { console.log("查看详细:", data.item); - if (data.item.topRight === "进行中") { + if (data.item.topRight === "进行中" || data.item.topRight === "规划") { uni.navigateTo({ url: `/pages/future/future?formedId=${data.item.formedId}`, fail: (err) => {