Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-customer-new-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-customer-new-master
Commits
b5a2f890
Commit
b5a2f890
authored
Dec 19, 2024
by
Smile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app站内信修改支持多语言
parent
91ac125d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
lang.js
src/common/lang.js
+8
-1
msg.vue
src/pages/msg/msg.vue
+1
-1
msg_info.vue
src/pages/msg_info/msg_info.vue
+4
-4
No files found.
src/common/lang.js
View file @
b5a2f890
...
...
@@ -27,6 +27,8 @@ const languageData = {
coverImage
:
'
coverImageZh
'
,
activityDesc
:
'
activityDescZh
'
,
startAddress
:
'
startAddressZh
'
,
msgTitle
:
'
title
'
,
msgContent
:
'
content
'
,
},
'
en
'
:
{
label
:
'
labelEn
'
,
...
...
@@ -45,6 +47,8 @@ const languageData = {
coverImage
:
'
coverImageEn
'
,
activityDesc
:
'
activityDescEn
'
,
startAddress
:
'
startAddressEn
'
,
msgTitle
:
'
titleEn
'
,
msgContent
:
'
contentEn
'
,
},
'
fr
'
:
{
label
:
'
labelFr
'
,
...
...
@@ -63,6 +67,8 @@ const languageData = {
coverImage
:
'
coverImageFr
'
,
activityDesc
:
'
activityDescFr
'
,
startAddress
:
'
startAddressFr
'
,
msgTitle
:
'
titleFr
'
,
msgContent
:
'
contentFr
'
,
}
};
...
...
@@ -89,6 +95,8 @@ function getLanguageData(local = 'zh') {
coverImage
:
languageData
[
local
].
coverImage
,
activityDesc
:
languageData
[
local
].
activityDesc
,
startAddress
:
languageData
[
local
].
startAddress
,
msgTitle
:
languageData
[
local
].
msgTitle
,
msgContent
:
languageData
[
local
].
msgContent
,
};
}
...
...
@@ -97,7 +105,6 @@ export default {
locale
:
uni
.
getStorageSync
(
'
locale
'
)
||
'
zh
'
,
...
getLanguageData
(
uni
.
getStorageSync
(
'
locale
'
)
||
'
zh
'
),
setLang
(
msg
)
{
debugger
this
.
lang
=
languages
[
msg
]
||
languages
[
'
zh
'
];
// 默认返回中文语言包
this
.
locale
=
msg
},
...
...
src/pages/msg/msg.vue
View file @
b5a2f890
...
...
@@ -13,7 +13,7 @@
<view
class=
"notice-list-top"
>
<image
v-if=
"item.status == 1"
src=
"../../static/img/notice-1.png"
mode=
""
></image>
<image
v-else
src=
"../../static/img/notice-2.png"
mode=
""
></image>
<view
class=
""
>
{{
item
.
title
}}
</view>
<view
class=
""
>
{{
item
[
$lang
.
msgTitle
]
}}
</view>
</view>
<view
class=
"times"
>
<image
src=
"../../static/img/time.png"
mode=
""
></image>
...
...
src/pages/msg_info/msg_info.vue
View file @
b5a2f890
...
...
@@ -4,13 +4,13 @@
<view
class=
"start-bar"
></view>
<view
class=
"notice_info"
>
<view
class=
"notice_title"
>
<text>
{{
noticeData
.
title
}}
</text>
<text>
{{
noticeData
[
$lang
.
msgTitle
]
}}
</text>
</view>
<view
class=
"notice_tag"
>
<text>
{{
getDate
(
noticeData
.
createTime
)
}}
</text>
</view>
<view
class=
"notice_content"
>
<rich-text
:nodes=
"noticeData
.content
"
></rich-text>
<rich-text
:nodes=
"noticeData
[$lang.msgContent]
"
></rich-text>
</view>
</view>
</view>
...
...
@@ -44,7 +44,7 @@
},
setReaded
(
id
){
this
.
$request
.
get
(
'
/app-api/ecw/internal-message/redInternalMessage
'
,{
messageId
:
id
}).
then
(
res
=>
{
})
},
getDate
(
time
)
{
...
...
@@ -60,7 +60,7 @@
day
=
day
>
9
?
day
:
'
0
'
+
day
;
min
=
min
>
9
?
min
:
'
0
'
+
min
;
sec
=
sec
>
9
?
sec
:
'
0
'
+
sec
;
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hour
}
:
${
min
}
:
${
sec
}
`
;
},
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment