Compare commits

..

No commits in common. "cce9d63ef14f4c77281990938bc07997fd6d7416" and "76a25d329bdbc02aef7ffa0a95215f2dd860de28" have entirely different histories.

2 changed files with 8 additions and 8 deletions

View File

@ -46,8 +46,8 @@
'image-wrap-left': phone == 'iphone' && shouldApplyTailLeft(index) && isImageMsg(message), 'image-wrap-left': phone == 'iphone' && shouldApplyTailLeft(index) && isImageMsg(message),
'image-wrap-right': phone == 'iphone' && shouldApplyTailRight(index) && isImageMsg(message) 'image-wrap-right': phone == 'iphone' && shouldApplyTailRight(index) && isImageMsg(message)
}"> }">
<image :src="getImageSrc(message)" :mode="getImageMode(message, phone)" class="chat-image" <image :src="getImageSrc(message)" :mode="getImageMode(message, phone)"
:class="{ class="chat-image" :class="{
'chat-image-left': phone == 'iphone' && shouldApplyTailLeft(index) && isImageMsg(message), 'chat-image-left': phone == 'iphone' && shouldApplyTailLeft(index) && isImageMsg(message),
'chat-image-right': phone == 'iphone' && shouldApplyTailRight(index) && isImageMsg(message) 'chat-image-right': phone == 'iphone' && shouldApplyTailRight(index) && isImageMsg(message)
}" :style="phone == 'iphone' ? '' : getImageStyle(message)" }" :style="phone == 'iphone' ? '' : getImageStyle(message)"
@ -355,14 +355,15 @@ const shouldShowTime = (index) => {
return Math.abs(currentMsgTime - prevMsgTime) > 180000; return Math.abs(currentMsgTime - prevMsgTime) > 180000;
} }
// 5线 // 5 线
const formatMessageContent = (content, isMe) => { const formatMessageContent = (content, isMe) => {
if (!content) return ''; if (!content) return '';
// url 5 YYYY-MM-DD HH:mm:ss // url 5
const combinedRegex = /((?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:\/[a-zA-Z0-9_/%-]*)*)|(\b\d{5,}(?:\.\d+)?\b)|(\d{4}-\d{2}-\d{2}\s\d{1,2}:\d{2}:\d{2})/g; // URL: http(s)://... xxx.xxx/...
const combinedRegex = /((?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:\/[a-zA-Z0-9_/%-]*)*)|(\b\d{5,}(?:\.\d+)?\b)/g;
return content.replace(combinedRegex, (match, p1, p2, p3) => { return content.replace(combinedRegex, (match, p1, p2) => {
// 线 // 线
if (p2 && p2.includes('.')) { if (p2 && p2.includes('.')) {
return match; return match;
@ -372,7 +373,6 @@ const formatMessageContent = (content, isMe) => {
if (props.phone == 'iphone') color = '#0B7AE3' if (props.phone == 'iphone') color = '#0B7AE3'
if (props.phone == 'mi') color = '#3A85F8' if (props.phone == 'mi') color = '#3A85F8'
if (props.phone == 'oppo') color = '#03A311' if (props.phone == 'oppo') color = '#03A311'
if (props.phone == 'huawei') color = '#0052D9' //
const colorStyle = !isMe ? `color: ${color};` : ''; const colorStyle = !isMe ? `color: ${color};` : '';
return `<span style="text-decoration: underline; ${colorStyle}">${match}</span>`; return `<span style="text-decoration: underline; ${colorStyle}">${match}</span>`;
}); });

View File

@ -29,7 +29,7 @@ export function createApp() {
app.config.globalProperties.$system = plus.os.name; app.config.globalProperties.$system = plus.os.name;
// #endif // #endif
app.config.globalProperties.$systemInfo = systemInfo app.config.globalProperties.$systemInfo = systemInfo
uni.setStorageSync('version', '1.0.6.sp16') uni.setStorageSync('version', '1.0.6.sp15')
app.config.globalProperties.$version = uni.getStorageSync('version') app.config.globalProperties.$version = uni.getStorageSync('version')
app.use(globalMethods); app.use(globalMethods);
return { return {