|
|
|
|
@ -6,9 +6,7 @@
|
|
|
|
|
<view class="th-title">
|
|
|
|
|
{{ jobDetail.store.aliasName }}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="td-content">
|
|
|
|
|
{{ jobDetail.store.storeInfo || "-" }}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="td-content" v-html="storeInfoHtml"></view>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="div_dom">
|
|
|
|
|
@ -18,7 +16,9 @@
|
|
|
|
|
<view class="td-content" @click="goAddress">
|
|
|
|
|
<div class="g_flex_row_between">
|
|
|
|
|
<div class="g_flex_1 g_flex_column_center">
|
|
|
|
|
<div style="font-size: 16px;color: #666;" class="g_ell_2" v-html="jobDetail.storeAddr"></div>
|
|
|
|
|
<div style="font-size: 16px;color: #666;" class="g_ell_2">
|
|
|
|
|
{{ jobDetail.storeAddr || "-" }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_none g_flex_column_center" style="margin-left: 16px;">
|
|
|
|
|
<view class="g_flex_c" style="width: 32px;height: 32px;background-color: rgba(2, 122, 255, 0.08);border-radius: 50%;">
|
|
|
|
|
@ -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, '<')
|
|
|
|
|
.replace(/>/g, '>');
|
|
|
|
|
html = html.replace(/```([\s\S]*?)```/g, function(m, code) {
|
|
|
|
|
return '<pre><code>' + code.trim() + '</code></pre>';
|
|
|
|
|
});
|
|
|
|
|
html = html.replace(/`([^`]+)`/g, '<code>$1</code>');
|
|
|
|
|
html = html.replace(/^#{6}\s+(.+)$/gm, '<h6>$1</h6>');
|
|
|
|
|
html = html.replace(/^#{5}\s+(.+)$/gm, '<h5>$1</h5>');
|
|
|
|
|
html = html.replace(/^#{4}\s+(.+)$/gm, '<h4>$1</h4>');
|
|
|
|
|
html = html.replace(/^#{3}\s+(.+)$/gm, '<h3>$1</h3>');
|
|
|
|
|
html = html.replace(/^#{2}\s+(.+)$/gm, '<h2>$1</h2>');
|
|
|
|
|
html = html.replace(/^#{1}\s+(.+)$/gm, '<h1>$1</h1>');
|
|
|
|
|
html = html.replace(/\*\*\*(.+?)\*\*\*/g, '<strong><em>$1</em></strong>');
|
|
|
|
|
html = html.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>');
|
|
|
|
|
html = html.replace(/\*(.+?)\*/g, '<em>$1</em>');
|
|
|
|
|
html = html.replace(/~~(.+?)~~/g, '<del>$1</del>');
|
|
|
|
|
html = html.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '<img src="$2" alt="$1" style="max-width:100%;height:auto;" />');
|
|
|
|
|
html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>');
|
|
|
|
|
html = html.replace(/^---+$/gm, '<hr/>');
|
|
|
|
|
html = html.replace(/^\>\s+(.+)$/gm, '<blockquote>$1</blockquote>');
|
|
|
|
|
html = html.replace(/\n{2,}/g, '</p><p>');
|
|
|
|
|
html = html.replace(/\n/g, '<br/>');
|
|
|
|
|
html = '<p>' + html + '</p>';
|
|
|
|
|
html = html.replace(/<p>\s*<\/p>/g, '');
|
|
|
|
|
html = html.replace(/<p>\s*(<h[1-6]>)/g, '$1');
|
|
|
|
|
html = html.replace(/(<\/h[1-6]>)\s*<\/p>/g, '$1');
|
|
|
|
|
html = html.replace(/<p>\s*(<hr\/>)\s*<\/p>/g, '$1');
|
|
|
|
|
html = html.replace(/<p>\s*(<pre>)/g, '$1');
|
|
|
|
|
html = html.replace(/(<\/pre>)\s*<\/p>/g, '$1');
|
|
|
|
|
html = html.replace(/<p>\s*(<blockquote>)/g, '$1');
|
|
|
|
|
html = html.replace(/(<\/blockquote>)\s*<\/p>/g, '$1');
|
|
|
|
|
html = html.replace(/(<\/blockquote>)\s*(<blockquote>)/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;
|
|
|
|
|
|