Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李俊赕
self-support
Commits
b2d898b7
Commit
b2d898b7
authored
Jun 07, 2021
by
zhengzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息通知栏
parent
9d504117
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
172 additions
and
129 deletions
+172
-129
.env.js
.env.js
+6
-6
learn.vue
src/pages/index/learn.vue
+105
-73
news-details.vue
src/pages/learn/news-details.vue
+61
-50
No files found.
.env.js
View file @
b2d898b7
;
(
function
()
{
let
NODE_ENV
=
'
prod
'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
(
function
()
{
let
NODE_ENV
=
'
test
'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
let
VERSION_NUMBER
=
'1.3.1'
;
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
let
VERSION_NUMBER
=
'1.3.1'
;
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
ENV_VAR
=
require
(
'./.env.dev.js'
);
...
...
@@ -22,8 +22,8 @@
}
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{};
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
;
process
.
uniEnv
[
'version_number'
]
=
VERSION_NUMBER
;
process
.
uniEnv
[
'node_env'
]
=
NODE_ENV
;
process
.
uniEnv
[
'version_number'
]
=
VERSION_NUMBER
;
for
(
let
key
in
ENV_VAR
)
{
process
.
uniEnv
[
key
]
=
ENV_VAR
[
key
];
}
...
...
src/pages/index/learn.vue
View file @
b2d898b7
This diff is collapsed.
Click to expand it.
src/pages/learn/news-details.vue
View file @
b2d898b7
<
template
>
<
template
>
<view>
<u-navbar
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000000"
:border-bottom=
"false"
>
</u-navbar>
<view
class=
"title"
>
{{
title
}}
<u-navbar
back-icon-color=
"#000000"
:background=
"background"
title-color=
"#000000"
:border-bottom=
"false"
>
</u-navbar>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"creat_at"
>
{{
create_at
}}
</view>
<view
class=
"u-content"
>
<u-parse
:html=
"body"
:tag-style=
"style"
></u-parse>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
title
:
''
,
body
:
''
}
},
onLoad
()
{
getApp
().
trackPage
(
'消息通知详情页'
)
var
that
=
this
;
const
eventChannel
=
this
.
getOpenerEventChannel
()
eventChannel
.
on
(
'acceptDataFromLearn'
,
function
(
data
)
{
that
.
title
=
data
.
title
;
that
.
body
=
data
.
body
;
})
this
.
$u
.
mpShare
.
path
=
''
},
}
</
script
>
<
style
>
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
margin-left
:
30
rpx
;
margin-top
:
30
rpx
;
}
.u-content
{
font-size
:
24
rpx
;
line-height
:
36
rpx
;
color
:
#666666
;
margin-left
:
30
rpx
;
margin-top
:
30
rpx
;
margin-right
:
30
rpx
;
}
</
style
>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
title
:
""
,
body
:
""
,
create_at
:
""
,
};
},
onLoad
()
{
getApp
().
trackPage
(
"消息通知详情页"
);
var
that
=
this
;
const
eventChannel
=
this
.
getOpenerEventChannel
();
eventChannel
.
on
(
"acceptDataFromLearn"
,
function
(
data
)
{
that
.
title
=
data
.
title
;
that
.
body
=
data
.
body
;
that
.
create_at
=
data
.
create_at
;
console
.
log
(
data
);
});
this
.
$u
.
mpShare
.
path
=
""
;
},
};
</
script
>
<
style
>
.title
{
font-size
:
32
rpx
;
font-weight
:
bold
;
margin-left
:
30
rpx
;
margin-top
:
30
rpx
;
}
.u-content
{
font-size
:
24
rpx
;
line-height
:
36
rpx
;
color
:
#666666
;
margin-left
:
30
rpx
;
margin-right
:
30
rpx
;
}
.creat_at
{
font-size
:
24
rpx
;
color
:
#999999
;
margin-left
:
30
rpx
;
margin-top
:
20
rpx
;
}
rich-text
{
margin-top
:
40
rpx
;
display
:
block
;
}
</
style
>
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