recordClock.vue
5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<template>
<!-- 打卡记录 -->
<view class="record_clock">
<!-- 打卡人信息 -->
<view class="record_people layer_nostar">
<view class="people_l layer_nostar">
<!-- 头像 -->
<image src="../../static/header.png" mode="" @click="toRecord()"></image>
<view class="">
<!-- 姓名 -->
<view class="people_name">张三</view>
<!-- 课程进度 -->
<view class="people_progress">已解锁2课时</view>
</view>
</view>
</view>
<!-- 本次打卡记录 -->
<view class="record_msg">
<!-- 课程信息 -->
<view class="record_course">
<!-- 右侧 -->
<view class="people_r" @click="toSubmit()">修改</view>
<!-- 课程名称 -->
<view class="layer_star course_name course_single">
<image class="course_icon" src="../../static/icon_01.png" mode=""></image>
<view class="">【深潜挑战】 21天专注力挑战</view>
</view>
<view class="layer_star course_single">
<image class="course_icon" src="../../static/icon_02.png" mode=""></image>
<view class="">第2课</view>
</view>
<view class="layer_star no_icon_single"><view class="">学习时间:2019年12月26日</view></view>
<view class="layer_star no_icon_single"><view class="">感悟:好</view></view>
<view class="layer_star no_icon_single">
完成事件打分:
<picker mode="selector" :range="completeList" @change="changeComplete">
<view class="score_picker layer_between">
<view>{{ completeList[complete] ? completeList[complete] : '请打分' }}</view>
<image src="../../static/start_01.png" mode="widthFix"></image>
</view>
</picker>
</view>
<view class="layer_star no_icon_single">
情绪状态打分:
<picker mode="selector" :range="completeList" @change="changeComplete">
<view class="score_picker layer_between">
<view>{{ completeList[complete] ? completeList[complete] : '请打分' }}</view>
<image src="../../static/start_01.png" mode="widthFix"></image>
</view>
</picker>
</view>
<!-- 评论、点赞按钮 -->
<view class="layer_noend">
<view class="course_btn justify_between" @click="toComment()">
<image src="../../static/pinglun_icon@2x.png" mode="widthFix"></image>
评论
</view>
<view class="course_btn justify_between" :class="{ active: isPoint }" @click="changePoint()">
<image :src="isPoint ? pointImg2 : pointImg1" mode="widthFix"></image>
点赞
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
completeList: ['1', '2', '3'],
complete: '',
// 点赞
isPoint:false,
pointImg1:require("../../static/zan_icon@2x.png"),
pointImg2:require("../../static/img_03.png"),
};
},
methods: {
// 去提交打卡页
toSubmit(){
uni.navigateTo({
url:"/pages/course/submitClock"
})
},
// 去评论页
toComment(){
uni.navigateTo({
url:"/pages/course/courseComment"
})
},
// 完成事件打分
changeComplete(e) {
this.complete = e.detail.value;
},
// 点赞
changePoint(){
this.isPoint = !this.isPoint
},
},
};
</script>
<style lang="scss">
page{
background-color: #fafbfd;
}
.record_clock {
// 打卡人信息
.record_people {
padding: 62upx 32upx;
height: 254upx;
background-color: #ee8b27;
// 左侧
.people_l {
color: #fff;
// 头像
image {
width: 92upx;
height: 92upx;
margin-right: 32upx;
}
// 姓名
.people_name {
font-size: 32upx;
margin-bottom: 12upx;
}
// 课程进度
.people_progress {
font-size: 24upx;
}
}
}
// 本次打卡记录
.record_msg {
padding: 0 32upx;
.record_course {
position: relative;
margin-top: -172upx;
background-color: #fff;
box-shadow: 0 0 12upx rgba(0, 0, 0, 0.04);
border-radius: 8upx;
padding: 56upx 32upx;
// 修改按钮
.people_r {
width: 112upx;
height: 56upx;
position: absolute;
top: 56upx;
right: 32upx;
border: 1px solid rgba(238, 139, 39, 1);
border-radius: 8upx;
color: #ee8b27;
font-size: 24upx;
text-align: center;
line-height: 56upx;
}
.course_icon {
width: 32upx;
height: 32upx;
}
.course_name {
color: #ee8b27;
}
.course_single {
margin-bottom: 14upx;
image {
margin-right: 20upx;
}
view{
width: 432upx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
// 无图标
.no_icon_single {
padding-left: 52upx;
font-size: 28upx;
color: #06121e;
margin-bottom: 14upx;
// 选择框
.score_picker {
width: 156upx;
height: 46upx;
background: rgba(249, 249, 249, 1);
border-radius: 8upx;
padding: 0 12upx 0 46upx;
color: #bdc4ce;
font-size: 24upx;
image {
width: 20upx;
}
}
}
// 评论、点赞
.course_btn {
padding: 12upx 28upx;
color: #8C9198;
font-size: 24upx;
border: 2upx solid rgba(140, 145, 152, 1);
border-radius: 8upx;
margin-left: 24upx;
margin-top: 34upx;
image {
width: 32upx;
margin-right: 14upx;
}
}
.active {
border-color: #ff7441;
color: #ff7441;
}
}
}
}
</style>