Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online
Commits
a35a72cf
提交
a35a72cf
authored
12月 03, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
5c57fee1
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
141 行增加
和
138 行删除
+141
-138
index.js
learnOnline/components/share/index.js
+5
-5
index.wxml
learnOnline/components/share/index.wxml
+2
-3
index.wxss
learnOnline/components/share/index.wxss
+97
-95
share.js
learnOnline/components/share/share.js
+34
-33
courseIntro.wxss
...es/learnSystem/courseContent/courseIntro/courseIntro.wxss
+3
-2
没有找到文件。
learnOnline/components/share/index.js
浏览文件 @
a35a72cf
...
...
@@ -62,9 +62,9 @@ Component({
methods
:
{
init
()
{
this
.
getShare
().
then
(
res
=>
{
//
if (!this.data.isNeed && !res.data.need_share) {
//
return
//
}
if
(
!
this
.
data
.
isNeed
&&
!
res
.
data
.
need_share
)
{
return
}
app
.
getUser
().
then
(
res
=>
{
res
.
realname
=
res
.
realname
||
res
.
nickname
if
(
res
.
avatar
)
{
...
...
@@ -140,7 +140,7 @@ Component({
this
.
widget
=
this
.
selectComponent
(
'.widget'
)
setTimeout
(()
=>
{
this
.
widget
.
renderToCanvas
({
wxml
:
wxml
(
this
.
data
),
style
})
.
renderToCanvas
({
wxml
:
wxml
(
this
.
data
),
style
:
style
(
this
.
data
)
})
.
then
(
res
=>
{
wx
.
hideLoading
()
})
...
...
@@ -162,7 +162,7 @@ Component({
wx
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
})
})
.
catch
(
error
=>
{
wx
.
showToast
({
title
:
'保存失败'
,
icon
:
'none'
})
wx
.
showToast
({
title
:
'保存失败
,请检查相册权限
'
,
icon
:
'none'
})
})
})
},
...
...
learnOnline/components/share/index.wxml
浏览文件 @
a35a72cf
...
...
@@ -24,9 +24,8 @@
<view class="text">{{ controls.text }}</view>
<view class="footer">
<view class="footer-left">
<view class="tips"
>我已坚持学习<text class="num">{{ share.used_day }}</text
>天</view
<view class="tips">
我已坚持学习<text class="num"> {{ share.used_day }} </text>天</view
>
<view>我离学位殿堂又近了一步</view>
</view>
...
...
learnOnline/components/share/index.wxss
浏览文件 @
a35a72cf
...
...
@@ -18,108 +18,111 @@
overflow-y: auto;
}
.share {
width:
600r
px;
height:
1064r
px;
width:
300
px;
height:
532
px;
position: relative;
overflow: hidden;
}
.bg {
width:
600r
px;
height:
1064r
px;
width:
300
px;
height:
532
px;
}
.cover {
position: absolute;
top:
70r
px;
left:
32r
px;
width:
534r
px;
height:
924r
px;
top:
36
px;
left:
17
px;
width:
267
px;
height:
462
px;
}
.main {
position: absolute;
left:
82r
px;
top:
230r
px;
/* right:
82r
px; */
width:
436r
px;
left:
40
px;
top:
120
px;
/* right:
41
px; */
width:
220
px;
}
.teacher {
font-size:
26r
px;
font-size:
13
px;
font-weight: bold;
color: #d78c4a;
line-height:
32r
px;
line-height:
16
px;
}
.course {
font-size:
26r
px;
font-size:
13
px;
font-weight: bold;
color: #d78c4a;
line-height: 32rpx;
line-height: 16px;
margin-left: -5px;
}
.user {
margin-top:
20r
px;
margin-top:
10
px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.avatar {
width:
130r
px;
height:
130r
px;
width:
65
px;
height:
65
px;
border-radius: 50%;
overflow: hidden;
}
.nickname {
font-size: 30rpx;
margin-top: 2px;
font-size: 15px;
font-weight: bold;
color: #d78c4a;
line-height:
48rpx
;
line-height:
1
;
}
.chapter {
margin-top:
10r
px;
margin-left:
18r
px;
margin-right:
18r
px;
height:
64r
px;
font-size:
28r
px;
margin-top:
6
px;
margin-left:
8
px;
margin-right:
8
px;
height:
32
px;
font-size:
14
px;
font-weight: bold;
color: #1a1a1a;
line-height:
32r
px;
line-height:
16
px;
text-align: center;
overflow: hidden;
}
.text {
margin-top:
116r
px;
margin-left:
30r
px;
margin-right:
30r
px;
height:
72r
px;
font-size:
26r
px;
font-weight:
500
;
margin-top:
56
px;
margin-left:
12
px;
margin-right:
12
px;
height:
36
px;
font-size:
13
px;
font-weight:
bold
;
/* font-style: italic; */
color: #1a1a1a;
line-height:
36r
px;
line-height:
18
px;
overflow: hidden;
}
.footer {
display: flex;
align-items: center;
margin-top:
30r
px;
margin-left: 1
8r
px;
margin-right: 1
8r
px;
margin-top:
15
px;
margin-left: 1
5
px;
margin-right: 1
5
px;
}
.footer-left {
flex: 1;
font-size:
24r
px;
font-size:
12
px;
color: #1a1a1a;
line-height:
36r
px;
line-height:
18
px;
}
.footer-left .tips {
display: flex;
align-items: center;
}
.num {
font-size:
34r
px;
font-size:
17
px;
color: #d78c4a;
font-weight:
B
old;
font-weight:
b
old;
}
.footer-right {
width:
98r
px;
height:
98r
px;
width:
50
px;
height:
50
px;
}
.controls {
position: relative;
...
...
@@ -134,36 +137,35 @@
background-color: #fff;
}
.controls.is-show .controls-main {
height:
260r
px;
height:
130
px;
}
.buttons {
position: absolute;
top: -
132r
px;
top: -
66
px;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
padding:
16rpx 26r
px;
padding:
8px 13
px;
}
.button {
position: relative;
width:
100r
px;
height:
100r
px;
width:
50
px;
height:
50
px;
background: #ffffff;
box-shadow: 0
rpx 2rpx 8rpx 0r
px rgba(0, 0, 0, 0.2);
box-shadow: 0
px 1px 4px 0
px rgba(0, 0, 0, 0.2);
border-radius: 50%;
font-size: 26rpx;
font-weight: 400;
font-size: 13px;
color: #d78c4a;
line-height:
30r
px;
line-height:
15
px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.wx-image {
width:
100r
px;
height:
100r
px;
width:
50
px;
height:
50
px;
}
.wx-button {
position: absolute;
...
...
@@ -182,12 +184,12 @@ button::after {
}
.controls-tabs {
display: flex;
height:
60r
px;
height:
30
px;
background: #ccc;
}
.controls-tab {
width:
150r
px;
line-height:
60r
px;
width:
75
px;
line-height:
30
px;
text-align: center;
background-color: #e6e6e6;
}
...
...
@@ -197,57 +199,57 @@ button::after {
}
.controls-content {
flex: 1;
height:
200r
px;
padding: 0
20r
px;
height:
100
px;
padding: 0
10
px;
display: flex;
align-items: center;
flex-wrap: nowrap;
}
.controls-content .is-active {
border:
5r
px solid #d78c4a;
border:
3
px solid #d78c4a;
}
.controls-bg-item {
flex: 0 0
92r
px;
width:
92r
px;
height:
162r
px;
margin: 0
30r
px;
border:
5r
px solid #fff;
border-radius:
5r
px;
flex: 0 0
46
px;
width:
46
px;
height:
80
px;
margin: 0
15
px;
border:
3
px solid #fff;
border-radius:
3
px;
overflow: hidden;
}
.controls-text-item {
margin: 0
30r
px;
flex: 0 0
455r
px;
width:
455r
px;
height:
125r
px;
margin: 0
15
px;
flex: 0 0
228
px;
width:
228
px;
height:
60
px;
display: flex;
align-items: center;
justify-content: center;
border:
5r
px solid #ccc;
border-radius:
12r
px;
border:
3
px solid #ccc;
border-radius:
6
px;
overflow: hidden;
padding:
30r
px;
font-size:
26r
px;
padding:
12
px;
font-size:
13
px;
color: #1a1a1a;
line-height:
36r
px;
line-height:
18
px;
box-sizing: border-box;
}
.controls-avatar-item {
position: relative;
margin: 0
30r
px;
flex: 0 0
120r
px;
width:
120r
px;
height:
125r
px;
margin: 0
15
px;
flex: 0 0
60
px;
width:
60
px;
height:
60
px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border:
5r
px solid #ccc;
border:
3
px solid #ccc;
border-radius: 50%;
overflow: hidden;
font-size:
26r
px;
font-size:
13
px;
color: #1a1a1a;
line-height:
36r
px;
line-height:
18
px;
box-sizing: border-box;
}
.image {
...
...
@@ -266,14 +268,14 @@ button::after {
flex-direction: column;
align-items: center;
justify-content: center;
padding:
75r
px 0;
padding:
38
px 0;
}
.close {
position: absolute;
right:
16r
px;
top:
16r
px;
width:
96r
px;
height:
96r
px;
right:
8
px;
top:
8
px;
width:
48
px;
height:
48
px;
background: url('https://webapp-pub.ezijing.com/weapp/share/close.png') no-repeat;
background-size: contain;
z-index: 999;
...
...
@@ -287,18 +289,18 @@ button::after {
overflow-y: auto;
}
.share-preivew .button {
width:
500r
px;
height:
100r
px;
border-radius:
50r
px;
width:
250
px;
height:
50
px;
border-radius:
25
px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin:
35r
px 0;
font-size:
26r
px;
margin:
18
px 0;
font-size:
13
px;
font-weight: 400;
color: #d78c4a;
line-height:
30r
px;
line-height:
15
px;
}
.share-preivew .button-default {
color: #d78c4a;
...
...
@@ -309,9 +311,9 @@ button::after {
background: #d78c4a;
}
.share-preivew .tips {
font-size:
26r
px;
font-size:
13
px;
font-weight: 400;
color: #fff;
line-height:
40r
px;
line-height:
15
px;
text-align: center;
}
learnOnline/components/share/share.js
浏览文件 @
a35a72cf
const
wxml
=
function
(
data
)
{
return
`
<view class="share">
<image src="
${
data
.
controls
.
bg
}
?x-oss-process=image/resize,m_fill,h_53
0
,w_300" class="bg"></image>
<image src="
${
data
.
controls
.
bg
}
?x-oss-process=image/resize,m_fill,h_53
2
,w_300" class="bg"></image>
<image src="https://webapp-pub.ezijing.com/weapp/share/cover.png" class="cover"></image>
<view class="main">
<text class="teacher">
${
data
.
share
.
lecturer
.
lecturer_name
}
</text>
...
...
@@ -23,19 +23,21 @@ const wxml = function (data) {
</view>`
}
const
style
=
{
const
style
=
function
(
data
)
{
const
numLength
=
data
.
share
.
used_day
.
toString
().
length
return
{
share
:
{
position
:
'relative'
,
width
:
300
,
height
:
530
height
:
532
},
bg
:
{
width
:
300
,
height
:
530
height
:
532
},
cover
:
{
position
:
'absolute'
,
top
:
35
,
top
:
36
,
left
:
17
,
width
:
267
,
height
:
462
...
...
@@ -43,26 +45,27 @@ const style = {
main
:
{
position
:
'absolute'
,
left
:
40
,
top
:
119
,
top
:
120
,
width
:
220
,
height
:
300
},
teacher
:
{
height
:
14
,
height
:
16
,
fontSize
:
13
,
lineHeight
:
1
,
color
:
'#D78C4A'
,
verticalAlign
:
'middle
'
fontWeight
:
'bold'
,
lineHeight
:
16
,
color
:
'#D78C4A
'
},
course
:
{
height
:
14
,
marginLeft
:
-
5
,
height
:
16
,
fontSize
:
13
,
lineHeight
:
14
,
color
:
'#D78C4A'
,
verticalAlign
:
'middle
'
fontWeight
:
'bold'
,
lineHeight
:
16
,
color
:
'#D78C4A
'
},
user
:
{
marginTop
:
12
,
marginTop
:
10
,
flexDirection
:
'column'
,
alignItems
:
'center'
},
...
...
@@ -72,18 +75,17 @@ const style = {
borderRadius
:
32.5
},
nickname
:
{
marginTop
:
4
,
marginTop
:
2
,
width
:
220
,
height
:
14
,
textAlign
:
'center'
,
verticalAlign
:
'middle'
,
fontSize
:
13
,
lineHeight
:
14
,
height
:
16
,
fontSize
:
15
,
fontWeight
:
'bold'
,
lineHeight
:
16
,
color
:
'#D78C4A'
,
textAlign
:
'center'
},
chapter
:
{
marginTop
:
8
,
marginTop
:
6
,
width
:
220
,
height
:
32
,
fontSize
:
14
,
...
...
@@ -93,7 +95,7 @@ const style = {
textAlign
:
'center'
},
text
:
{
marginTop
:
55
,
marginTop
:
56
,
marginLeft
:
12
,
width
:
200
,
height
:
36
,
...
...
@@ -104,11 +106,11 @@ const style = {
lineHeight
:
18
},
footer
:
{
marginTop
:
15
,
marginLeft
:
15
,
marginRight
:
15
,
width
:
190
,
height
:
60
,
marginTop
:
12
,
height
:
50
,
flexDirection
:
'row'
,
alignItems
:
'center'
},
...
...
@@ -127,37 +129,36 @@ const style = {
height
:
20
,
fontSize
:
12
,
lineHeight
:
20
,
color
:
'#1A1A1A'
,
verticalAlign
:
'middle'
color
:
'#1A1A1A'
},
t2
:
{
width
:
40
,
width
:
numLength
*
12
,
height
:
20
,
fontSize
:
17
,
fontWeight
:
'bold'
,
lineHeight
:
20
,
color
:
'#D78C4A'
,
textAlign
:
'center'
},
t3
:
{
width
:
40
,
width
:
12
,
height
:
20
,
fontSize
:
12
,
lineHeight
:
20
,
color
:
'#1A1A1A'
,
verticalAlign
:
'middle'
color
:
'#1A1A1A'
},
tips
:
{
width
:
140
,
height
:
20
,
fontSize
:
12
,
lineHeight
:
20
,
color
:
'#1A1A1A'
,
verticalAlign
:
'middle'
color
:
'#1A1A1A'
},
footerRight
:
{
width
:
50
,
height
:
50
}
}
}
export
{
wxml
,
style
}
learnOnline/pages/learnSystem/courseContent/courseIntro/courseIntro.wxss
浏览文件 @
a35a72cf
...
...
@@ -7,9 +7,9 @@
.course-intro .list-teacher { margin-top: 50rpx; padding: 0 25rpx; }
.course-intro .list-teacher .img { float: left; width: 150rpx; height: 150rpx; background: #c9c9c9; }
.course-intro .list-teacher .ctx { position: relative; margin-left: 170rpx; height: 150rpx; }
.course-intro .list-teacher .ctx .top-ctx {
position: absolute; top: -4rpx; width: 100%; overflow: hidden;
}
.course-intro .list-teacher .ctx .top-ctx {}
.course-intro .list-teacher .ctx .top-ctx .tit { font-size: 28rpx; color: #313131; line-height: 37rpx; overflow: hidden; word-break: break-all; }
.course-intro .list-teacher .ctx .bottom-ctx {
position: absolute; top: 50rpx; width: 100%; overflow: hidden;
}
.course-intro .list-teacher .ctx .bottom-ctx { }
.course-intro .list-teacher .ctx .bottom-ctx .t1 { font-size: 22rpx; line-height: 30rpx; color: #707070; overflow: hidden; word-break: break-all; }
.course-intro .list-teacher .ctx .bottom-ctx .t2 { font-size: 22rpx; line-height: 30rpx; color: #707070; overflow: hidden; word-break: break-all; }
.course-intro .list-teacher .ctx .bottom-ctx .t3 { font-size: 22rpx; color: #707070; text-overflow: ellipsis; overflow: hidden; word-break: break-all; }
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论