From dc81426c1a60d4c35adbc9ae0c2db5416998d9c6 Mon Sep 17 00:00:00 2001 From: jscyl13849007907 <13849007907@163.com> Date: Mon, 8 Jun 2026 11:41:03 +0800 Subject: [PATCH] no message --- App.vue | 8 +-- manifest.json | 2 +- pages.json | 10 ++-- root/detail/bossinfo.vue | 125 +++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 131 insertions(+), 14 deletions(-) diff --git a/App.vue b/App.vue index 6f70591..d3b18fd 100644 --- a/App.vue +++ b/App.vue @@ -22,11 +22,11 @@ export default { // themeColor: "#00B666", // themeBackgroundColor: "#00B66621", - // themeColor: "#fea702", - // themeBackgroundColor: "#fea70221", + themeColor: "#fea702", + themeBackgroundColor: "#fea70221", - themeColor: "#2FC67D", - themeBackgroundColor: "#2FC67D21", + // themeColor: "#2FC67D", + // themeBackgroundColor: "#2FC67D21", logo: "", // #ifdef MP-WEIXIN diff --git a/manifest.json b/manifest.json index 66f1af8..df30c27 100644 --- a/manifest.json +++ b/manifest.json @@ -137,7 +137,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "wxfab5320942daaafa", + "appid" : "wx15bc9c758f4eb129", "setting" : { "urlCheck" : false, "es6" : true, diff --git a/pages.json b/pages.json index f24115c..ed2f0d1 100644 --- a/pages.json +++ b/pages.json @@ -861,31 +861,31 @@ "list": [ { "iconPath": "static/image/tabbar/home.png", - "selectedIconPath": "static/image/tabbar/home_green.png", + "selectedIconPath": "static/image/tabbar/home_yellow.png", "pagePath": "pages/home/index", "text": "首页" }, { "iconPath": "static/image/tabbar/message.png", - "selectedIconPath": "static/image/tabbar/message_green.png", + "selectedIconPath": "static/image/tabbar/message_yellow.png", "pagePath": "pages/message/index", "text": "消息" }, { "iconPath": "static/image/tabbar/plus-square.png", - "selectedIconPath": "static/image/tabbar/plus-square_green.png", + "selectedIconPath": "static/image/tabbar/plus-square_yellow.png", "pagePath": "pages/apply/index", "text": "报名" }, { "iconPath": "static/image/tabbar/order.png", - "selectedIconPath": "static/image/tabbar/order_green.png", + "selectedIconPath": "static/image/tabbar/order_yellow.png", "pagePath": "pages/order/index", "text": "工单" }, { "iconPath": "static/image/tabbar/user.png", - "selectedIconPath": "static/image/tabbar/user_green.png", + "selectedIconPath": "static/image/tabbar/user_yellow.png", "pagePath": "pages/person/index", "text": "我的" } diff --git a/root/detail/bossinfo.vue b/root/detail/bossinfo.vue index dd85927..782b172 100644 --- a/root/detail/bossinfo.vue +++ b/root/detail/bossinfo.vue @@ -6,9 +6,7 @@ {{ jobDetail.store.aliasName }} - - {{ jobDetail.store.storeInfo || "-" }} - +
@@ -18,7 +16,9 @@
-
+
+ {{ jobDetail.storeAddr || "-" }} +
@@ -53,6 +53,12 @@ export default { isFullscreen: false, }; }, + computed: { + storeInfoHtml() { + if (!this.jobDetail.store || !this.jobDetail.store.storeInfo) return ''; + return this.parseMarkdown(this.jobDetail.store.storeInfo); + }, + }, onLoad(options) { let that = this; if (options.jobDetail) { @@ -71,6 +77,45 @@ export default { } }, methods: { + parseMarkdown(str) { + if (!str) return ''; + if (/<[a-zA-Z][^>]*>/.test(str)) return str; + let html = str + .replace(/&/g, '&') + .replace(//g, '>'); + html = html.replace(/```([\s\S]*?)```/g, function(m, code) { + return '
' + code.trim() + '
'; + }); + html = html.replace(/`([^`]+)`/g, '$1'); + html = html.replace(/^#{6}\s+(.+)$/gm, '
$1
'); + html = html.replace(/^#{5}\s+(.+)$/gm, '
$1
'); + html = html.replace(/^#{4}\s+(.+)$/gm, '

$1

'); + html = html.replace(/^#{3}\s+(.+)$/gm, '

$1

'); + html = html.replace(/^#{2}\s+(.+)$/gm, '

$1

'); + html = html.replace(/^#{1}\s+(.+)$/gm, '

$1

'); + html = html.replace(/\*\*\*(.+?)\*\*\*/g, '$1'); + html = html.replace(/\*\*(.+?)\*\*/g, '$1'); + html = html.replace(/\*(.+?)\*/g, '$1'); + html = html.replace(/~~(.+?)~~/g, '$1'); + html = html.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '$1'); + html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1'); + html = html.replace(/^---+$/gm, '
'); + html = html.replace(/^\>\s+(.+)$/gm, '
$1
'); + html = html.replace(/\n{2,}/g, '

'); + html = html.replace(/\n/g, '
'); + html = '

' + html + '

'; + html = html.replace(/

\s*<\/p>/g, ''); + html = html.replace(/

\s*()/g, '$1'); + html = html.replace(/(<\/h[1-6]>)\s*<\/p>/g, '$1'); + html = html.replace(/

\s*()\s*<\/p>/g, '$1'); + html = html.replace(/

\s*(

)/g, '$1');
+			html = html.replace(/(<\/pre>)\s*<\/p>/g, '$1');
+			html = html.replace(/

\s*(

)/g, '$1'); + html = html.replace(/(<\/blockquote>)\s*<\/p>/g, '$1'); + html = html.replace(/(<\/blockquote>)\s*(
)/g, '$1$2'); + return html; + }, goAddress() { let that = this; var address = that.jobDetail; @@ -117,6 +162,78 @@ export default { color: #666; font-size: 16px; padding: 10px 0 0 0; + word-break: break-word; + ::v-deep { + h1, h2, h3, h4, h5, h6 { + color: #333; + margin: 10px 0 6px; + font-weight: 600; + } + h1 { font-size: 20px; } + h2 { font-size: 18px; } + h3 { font-size: 17px; } + p { + margin: 6px 0; + line-height: 1.7; + } + ul, ol { + padding-left: 20px; + margin: 6px 0; + } + li { + line-height: 1.7; + } + blockquote { + border-left: 4px solid #ddd; + padding: 4px 12px; + margin: 8px 0; + color: #999; + background: #f9f9f9; + } + code { + background: #f5f5f5; + padding: 2px 4px; + border-radius: 3px; + font-size: 14px; + } + pre { + background: #f5f5f5; + padding: 10px; + border-radius: 4px; + overflow-x: auto; + code { + background: none; + padding: 0; + } + } + img { + max-width: 100%; + height: auto; + } + a { + color: #1677ff; + text-decoration: none; + } + table { + border-collapse: collapse; + width: 100%; + margin: 8px 0; + } + th, td { + border: 1px solid #ddd; + padding: 6px 8px; + text-align: left; + } + th { + background: #f5f5f5; + font-weight: 600; + } + hr { + border: none; + border-top: 1px solid #eee; + margin: 10px 0; + } + } } .scroll-item{ width: 56px;