From 967459409c75f1a21c18a7d80714d60e00358d9e Mon Sep 17 00:00:00 2001 From: minimaxagent1 Date: Wed, 30 Jul 2025 16:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E5=83=A7=E8=AF=A6=E7=BB=86=E7=95=8C?= =?UTF-8?q?=E9=9D=A21.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/monkDetail.js | 76 +++++ enum/monk.js | 2 + pages.json | 87 +++--- pages/future/future.vue | 13 + .../institutionalStructure.vue | 4 +- pages/{Monk/Monk.vue => monk/monk.vue} | 18 +- pages/monk/monkDetail.vue | 293 ++++++++++++++++++ pages/walkInto/walkInto.vue | 4 +- utils/router.js | 8 +- 9 files changed, 453 insertions(+), 52 deletions(-) create mode 100644 api/monkDetail.js create mode 100644 pages/future/future.vue rename pages/{Monk/Monk.vue => monk/monk.vue} (94%) create mode 100644 pages/monk/monkDetail.vue diff --git a/api/monkDetail.js b/api/monkDetail.js new file mode 100644 index 0000000..41e1c8a --- /dev/null +++ b/api/monkDetail.js @@ -0,0 +1,76 @@ +/** + * 高僧详情相关API + */ +import { request } from '../utils/request.js'; + +/** + * 获取高僧详情 + * @param {string} monkId - 高僧ID + * @returns {Promise} 返回高僧详情数据 + */ +export function getMonkDetail(monkId) { + return request({ + url: '/app/monk/monkById', + method: 'GET', + params: { monkId } + }); +} + +/** + * 获取高僧列表 + * @param {Object} params - 查询参数 + * @param {number} params.pageNum - 页码 + * @param {number} params.pageSize - 每页数量 + * @param {string} params.name - 高僧姓名(可选) + * @returns {Promise} 返回高僧列表数据 + */ +export function getMonkList(params = {}) { + return request({ + url: '/app/monk/listMonk', + method: 'GET', + params: { + pageNum: 1, + pageSize: 10, + ...params + } + }); +} + +/** + * 创建高僧信息 + * @param {Object} data - 高僧信息 + * @returns {Promise} 返回创建结果 + */ +export function createMonk(data) { + return request({ + url: '/app/monk/createMonk', + method: 'POST', + data + }); +} + +/** + * 更新高僧信息 + * @param {Object} data - 高僧信息 + * @returns {Promise} 返回更新结果 + */ +export function updateMonk(data) { + return request({ + url: '/app/monk/updateMonk', + method: 'PUT', + data + }); +} + +/** + * 删除高僧信息 + * @param {string} id - 高僧ID + * @returns {Promise} 返回删除结果 + */ +export function deleteMonk(id) { + return request({ + url: '/app/monk/deleteMonk', + method: 'DELETE', + params: { id } + }); +} \ No newline at end of file diff --git a/enum/monk.js b/enum/monk.js index 8ee11d7..00d3088 100644 --- a/enum/monk.js +++ b/enum/monk.js @@ -2,6 +2,8 @@ export const MonkEnum = { SEARCH: "https://api.ccttiot.com/image-1753769500465.png", //返回的按钮图像 + MONK_IMAGE:"https://api.ccttiot.com/image-1753859218129.png" + }; export default MonkEnum; \ No newline at end of file diff --git a/pages.json b/pages.json index 5454509..881c5a5 100644 --- a/pages.json +++ b/pages.json @@ -3,7 +3,7 @@ "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" }, "lazyCodeLoading": "requiredComponents", - "entryPagePath": "pages/nearbystores/index", // 专门指定登录页为初始页 + "entryPagePath": "pages/monk/monkDetail", "pages": [{ "path": "pages/nearbystores/index", "style": { @@ -11,14 +11,14 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } - },{ - "path": "pages/login/login", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - },{ + }, { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/index/index", "style": { "navigationBarTitleText": "首页", @@ -35,48 +35,60 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } - },{ + }, { "path": "pages/tj", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" } - },{ + }, { "path": "pages/myorder/index", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" } - },{ + }, { "path": "pages/myorder/returned/index", "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" } - },{ - "path": "pages/institutionalStructure/institutionalStructure", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, - { - "path" : "pages/walkInto/walkInto", - "style" : - { + }, { + "path": "pages/institutionalStructure/institutionalStructure", + "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" } }, { - "path" : "pages/Monk/Monk", - "style" : - { + "path": "pages/walkInto/walkInto", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/monk/monk", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { + "path": "pages/monk/monkDetail", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { + "path": "pages/future/future", + "style": { "navigationBarTitleText": "", "enablePullDownRefresh": false, "navigationStyle": "custom" @@ -88,16 +100,14 @@ { "root": "page_user", - "pages": [ - { - "path": "upload", - "style": { - "navigationBarTitleText": "上传", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } + "pages": [{ + "path": "upload", + "style": { + "navigationBarTitleText": "上传", + "enablePullDownRefresh": false, + "navigationStyle": "custom" } - ] + }] } ], "tabBar": { @@ -105,9 +115,8 @@ "color": "#7C7C7C", "selectedColor": "#48893B", "borderStyle": "white", - "backgroundColor": "#ffffff", - "list": [ - { + "backgroundColor": "#ffffff", + "list": [{ "selectedIconPath": "/static/tabbar/oneactive.png", "iconPath": "/static/tabbar/one.png", "pagePath": "pages/index/index", diff --git a/pages/future/future.vue b/pages/future/future.vue new file mode 100644 index 0000000..bb787c0 --- /dev/null +++ b/pages/future/future.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/pages/institutionalStructure/institutionalStructure.vue b/pages/institutionalStructure/institutionalStructure.vue index 56d7c5c..757b6c8 100644 --- a/pages/institutionalStructure/institutionalStructure.vue +++ b/pages/institutionalStructure/institutionalStructure.vue @@ -8,7 +8,7 @@ - + 加载中... @@ -162,7 +162,7 @@ export default { page { background: #F5F0E7; } -.container { +.header { width: 100%; min-height: 100vh; display: flex; diff --git a/pages/Monk/Monk.vue b/pages/monk/monk.vue similarity index 94% rename from pages/Monk/Monk.vue rename to pages/monk/monk.vue index dd74cc4..b61d26a 100644 --- a/pages/Monk/Monk.vue +++ b/pages/monk/monk.vue @@ -3,7 +3,7 @@ - + @@ -86,10 +86,16 @@ return html.replace(/<[^>]+>/g, ''); // 正则替换所有 HTML 标签 }, goDetail(item) { - uni.showToast({ - title: '详情功能待开发', - icon: 'none' - }) + uni.navigateTo({ + url: `/pages/monk/monkDetail?id=${item.id}`, + fail: (err) => { + console.error('跳转失败:', err); + uni.showToast({ + title: '页面跳转失败', + icon: 'none' + }); + } + }); } } } @@ -103,7 +109,7 @@ border-radius: 0rpx 0rpx 0rpx 0rpx; } - .container { + .header { display: flex; flex-direction: column; align-items: center; diff --git a/pages/monk/monkDetail.vue b/pages/monk/monkDetail.vue new file mode 100644 index 0000000..16c937c --- /dev/null +++ b/pages/monk/monkDetail.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/pages/walkInto/walkInto.vue b/pages/walkInto/walkInto.vue index e016a8d..9ceacf5 100644 --- a/pages/walkInto/walkInto.vue +++ b/pages/walkInto/walkInto.vue @@ -3,7 +3,7 @@ - + 111 @@ -35,7 +35,7 @@ page { background: #F5F0E7; border-radius: 0rpx 0rpx 0rpx 0rpx; } -.container { +.header { min-height: 100vh; display: flex; align-items: flex-start; diff --git a/utils/router.js b/utils/router.js index a23fe2c..c379331 100644 --- a/utils/router.js +++ b/utils/router.js @@ -6,16 +6,17 @@ // 页面路由配置 export const PAGE_ROUTES = { // 主要功能页面 - MONK: '/pages/Monk/Monk', + MONK: '/pages/monk/monk', + MONK_DETAIL: '/pages/monk/monkDetail', WALK_INTO: '/pages/walkInto/walkInto', INSTITUTIONAL_STRUCTURE: '/pages/institutionalStructure/institutionalStructure', // 待开发页面 ACTIVITY: '/pages/activity/activity', NEWS: '/pages/news/news', - FUTURE: '/pages/future/future', ABBOT: '/pages/abbot/abbot', ANCIENT: '/pages/ancient/ancient', + FUTURE: '/pages/future/future', // 其他页面 LOGIN: '/pages/login/login', @@ -28,13 +29,14 @@ export const PAGE_ROUTES = { // 页面类型映射 export const PAGE_TYPE_MAP = { 'monk': PAGE_ROUTES.MONK, + 'monkDetail': PAGE_ROUTES.MONK_DETAIL, 'walkInto': PAGE_ROUTES.WALK_INTO, 'institutionalStructure': PAGE_ROUTES.INSTITUTIONAL_STRUCTURE, 'activity': PAGE_ROUTES.ACTIVITY, 'news': PAGE_ROUTES.NEWS, - 'future': PAGE_ROUTES.FUTURE, 'abbot': PAGE_ROUTES.ABBOT, 'ancient': PAGE_ROUTES.ANCIENT, + 'future': PAGE_ROUTES.FUTURE, 'index': PAGE_ROUTES.INDEX, };