正在显示
20 个修改的文件
包含
272 行增加
和
149 行删除
@@ -49,6 +49,7 @@ Component({ | @@ -49,6 +49,7 @@ Component({ | ||
49 | that.data.backgroundAudioManager.onEnded(function () { //结束播放监听 | 49 | that.data.backgroundAudioManager.onEnded(function () { //结束播放监听 |
50 | console.log('播放结束!'); | 50 | console.log('播放结束!'); |
51 | that.setData({ | 51 | that.setData({ |
52 | + sliderValue:0, | ||
52 | audioPlay: false | 53 | audioPlay: false |
53 | }) | 54 | }) |
54 | }) | 55 | }) |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <text class="audio_title">{{audioName}}</text> | 2 | <text class="audio_title">{{audioName}}</text> |
3 | <view class="audio-time"> | 3 | <view class="audio-time"> |
4 | <view> | 4 | <view> |
5 | - <slider min="0" max="{{sliderMax}}" bindchange="sliderChange" block-size="14" value="{{sliderValue}}" activeColor="#8b8b8d" style="width: 64%;margin: 0 auto;"/> | 5 | + <slider disabled min="0" max="{{sliderMax}}" bindchange="sliderChange" block-size="14" value="{{sliderValue}}" activeColor="#8b8b8d" style="width: 64%;margin: 0 auto;"/> |
6 | </view> | 6 | </view> |
7 | <text>{{currentTimeStr}}</text> | 7 | <text>{{currentTimeStr}}</text> |
8 | <text>{{durationTimeStr}}</text> | 8 | <text>{{durationTimeStr}}</text> |
img/chat.png
0 → 100644
2.6 KB
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | </view> | 3 | </view> |
4 | <view class="nav"> | 4 | <view class="nav"> |
5 | <view class="nav-1"> | 5 | <view class="nav-1"> |
6 | - <image src="{{schoolData.avatar}}"></image> | 6 | + <image src="{{schoolData.avatar}}" mode="widthFix"></image> |
7 | </view> | 7 | </view> |
8 | <view class="anniu fs28" >当前分数·{{schoolData.number}}</view> | 8 | <view class="anniu fs28" >当前分数·{{schoolData.number}}</view> |
9 | </view> | 9 | </view> |
@@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
11 | position: absolute; | 11 | position: absolute; |
12 | left: 44rpx; | 12 | left: 44rpx; |
13 | top: -84rpx; | 13 | top: -84rpx; |
14 | +} | ||
15 | +.nav-1 image { | ||
14 | width: 168rpx; | 16 | width: 168rpx; |
15 | height: 168rpx; | 17 | height: 168rpx; |
16 | border-radius: 50%; | 18 | border-radius: 50%; |
@@ -123,7 +125,7 @@ | @@ -123,7 +125,7 @@ | ||
123 | } | 125 | } |
124 | 126 | ||
125 | .aihao { | 127 | .aihao { |
126 | - padding: 0 32rpx; | 128 | + padding: 0 20rpx; |
127 | color: rgba(196, 196, 196, 1); | 129 | color: rgba(196, 196, 196, 1); |
128 | font-size: 24rpx; | 130 | font-size: 24rpx; |
129 | font-weight: 400; | 131 | font-weight: 400; |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | <view>{{item.text}}</view> | 28 | <view>{{item.text}}</view> |
29 | </view> | 29 | </view> |
30 | <view bindtap="dianji" data-index="{{index}}"> | 30 | <view bindtap="dianji" data-index="{{index}}"> |
31 | - <view class="buka">{{item.TodayStatus == 0 ? '补卡' : '打卡'}}</view> | 31 | + <view class="buka" wx:if="{{item.type == 'today'}}">{{item.TodayStatus == 0 ? '补卡' : '打卡'}}</view> |
32 | </view> | 32 | </view> |
33 | <!-- <view bindtap="dianji" data-bool="{{item.bool}}" data-index="{{index}}"> | 33 | <!-- <view bindtap="dianji" data-bool="{{item.bool}}" data-index="{{index}}"> |
34 | <view class="{{item.bool?'buka':' buka yibuka'}}" bindtap="gotoday">{{item.bool?'打卡':'已打卡'}}</view> | 34 | <view class="{{item.bool?'buka':' buka yibuka'}}" bindtap="gotoday">{{item.bool?'打卡':'已打卡'}}</view> |
@@ -5,13 +5,15 @@ | @@ -5,13 +5,15 @@ | ||
5 | <view class="top-1"> | 5 | <view class="top-1"> |
6 | <text>{{meData.nickname}} 的阅读打卡</text> | 6 | <text>{{meData.nickname}} 的阅读打卡</text> |
7 | <view class="cent"> | 7 | <view class="cent"> |
8 | - 已连续打卡第 | 8 | + 已连续打卡 |
9 | <text class="color">{{clockData.clock_number}}</text> | 9 | <text class="color">{{clockData.clock_number}}</text> |
10 | - 天,共读过 | ||
11 | - <text class="color">{{clockData.readbook}}</text> | ||
12 | - 本书 | 10 | + 天, |
11 | + | ||
12 | + <text class="cent">阅读量<text class="color">{{clockData.readwords}}</text>词</text> | ||
13 | </view> | 13 | </view> |
14 | - <view class="cent">我的阅读量<text class="color">{{clockData.readwords}}</text>词</view> | 14 | + |
15 | + <text class="color">共读过<text class="color" style="color:rgba(226,201,155,1) ;margin: 0 8rpx;">{{clockData.readbook}}</text>本书</text> | ||
16 | + | ||
15 | </view> | 17 | </view> |
16 | <image src="/img/02.png"></image> | 18 | <image src="/img/02.png"></image> |
17 | </view> | 19 | </view> |
1 | /* pages/28/26.wxss */ | 1 | /* pages/28/26.wxss */ |
2 | +page{ | ||
3 | + padding-right:34rpx; | ||
4 | + padding-top: 70rpx; | ||
5 | + background:#383744; | ||
6 | +} | ||
2 | .top{ | 7 | .top{ |
3 | width: 100%; | 8 | width: 100%; |
4 | height: 1208rpx; | 9 | height: 1208rpx; |
5 | } | 10 | } |
6 | .tips{ | 11 | .tips{ |
7 | - background:#383744; | ||
8 | - text-align: right; | ||
9 | padding-right:34rpx; | 12 | padding-right:34rpx; |
10 | padding-top: 70rpx; | 13 | padding-top: 70rpx; |
14 | + text-align: right; | ||
15 | + position: absolute; | ||
16 | + right: 0; | ||
17 | + top: 0; | ||
11 | } | 18 | } |
12 | .tips image{ | 19 | .tips image{ |
13 | width: 144rpx; | 20 | width: 144rpx; |
@@ -6,7 +6,6 @@ innerAudioContext.autoplay = true | @@ -6,7 +6,6 @@ innerAudioContext.autoplay = true | ||
6 | let time = null | 6 | let time = null |
7 | let time_num = 0; | 7 | let time_num = 0; |
8 | Page({ | 8 | Page({ |
9 | - | ||
10 | /** | 9 | /** |
11 | * 页面的初始数据 | 10 | * 页面的初始数据 |
12 | */ | 11 | */ |
@@ -18,7 +17,7 @@ Page({ | @@ -18,7 +17,7 @@ Page({ | ||
18 | http_url:'', | 17 | http_url:'', |
19 | 18 | ||
20 | Count:0,//总题数 | 19 | Count:0,//总题数 |
21 | - current:0,//当前题号 | 20 | + current:"0",//当前题号 |
22 | today_id:'',//今日任务id | 21 | today_id:'',//今日任务id |
23 | match_id:'',//比赛任务id | 22 | match_id:'',//比赛任务id |
24 | all_data:[],//全部题目 | 23 | all_data:[],//全部题目 |
@@ -48,7 +47,9 @@ Page({ | @@ -48,7 +47,9 @@ Page({ | ||
48 | alterType:false,//弹窗状态 | 47 | alterType:false,//弹窗状态 |
49 | alterData:{},//弹窗数据 | 48 | alterData:{},//弹窗数据 |
50 | taskType:'',//任务类型 比赛任务 今日任务 | 49 | taskType:'',//任务类型 比赛任务 今日任务 |
51 | - TodayTaskType:''//1 打卡 0 补卡 | 50 | + TodayTaskType:'',//1 打卡 0 补卡 |
51 | + webImg:'',//第三方链接封面 | ||
52 | + pages_types:false,//页面加载 | ||
52 | }, | 53 | }, |
53 | PlayState(){ | 54 | PlayState(){ |
54 | this.selectComponent("#audio").changePlayState() | 55 | this.selectComponent("#audio").changePlayState() |
@@ -98,7 +99,7 @@ Page({ | @@ -98,7 +99,7 @@ Page({ | ||
98 | } | 99 | } |
99 | }else if(this.data.taskType == "match"){//比赛任务 | 100 | }else if(this.data.taskType == "match"){//比赛任务 |
100 | answer = { | 101 | answer = { |
101 | - 'match_subject_id': res.data.List[0].match_subject_id, //'题目ID', | 102 | + 'match_subject_id': this.data.all_data[index].match_subject_id, //'题目ID', |
102 | 'type':0,//题目类型:1=用户上传图片,2=用户上传音频, | 103 | 'type':0,//题目类型:1=用户上传图片,2=用户上传音频, |
103 | 'file_url': [] //'图片/音频 【多张图 , 分割 拼接字符串】' | 104 | 'file_url': [] //'图片/音频 【多张图 , 分割 拼接字符串】' |
104 | } | 105 | } |
@@ -134,6 +135,7 @@ Page({ | @@ -134,6 +135,7 @@ Page({ | ||
134 | var url = '' //接口地址 | 135 | var url = '' //接口地址 |
135 | //判断任务类型 | 136 | //判断任务类型 |
136 | var temporary = Math.ceil(time_num/60);//学习时间 | 137 | var temporary = Math.ceil(time_num/60);//学习时间 |
138 | + var all_data = JSON.stringify(this.data.allAnswer) | ||
137 | if(this.data.taskType == "today"){ //今日任务 | 139 | if(this.data.taskType == "today"){ //今日任务 |
138 | url = 'today/TodayTask' | 140 | url = 'today/TodayTask' |
139 | data = {today_id:this.data.today_id,json:all_data,learn_time:temporary,type:this.data.TodayTaskType} | 141 | data = {today_id:this.data.today_id,json:all_data,learn_time:temporary,type:this.data.TodayTaskType} |
@@ -141,7 +143,6 @@ Page({ | @@ -141,7 +143,6 @@ Page({ | ||
141 | url = 'match/MatchTask' | 143 | url = 'match/MatchTask' |
142 | data = {match_id:this.data.match_id,json:all_data,learn_time:temporary} | 144 | data = {match_id:this.data.match_id,json:all_data,learn_time:temporary} |
143 | } | 145 | } |
144 | - var all_data = JSON.stringify(this.data.allAnswer) | ||
145 | app.post(url,data ).then(res => { | 146 | app.post(url,data ).then(res => { |
146 | if(res.code == 1){ | 147 | if(res.code == 1){ |
147 | console.log(res) | 148 | console.log(res) |
@@ -180,6 +181,7 @@ Page({ | @@ -180,6 +181,7 @@ Page({ | ||
180 | http_url:app.globalData.imgBaseUrl, | 181 | http_url:app.globalData.imgBaseUrl, |
181 | }) | 182 | }) |
182 | var that = this; | 183 | var that = this; |
184 | + this.WebImage() | ||
183 | time = setInterval(function(){ | 185 | time = setInterval(function(){ |
184 | time_num++ | 186 | time_num++ |
185 | },1000) | 187 | },1000) |
@@ -226,9 +228,13 @@ Page({ | @@ -226,9 +228,13 @@ Page({ | ||
226 | }, | 228 | }, |
227 | //获取今日任务列表 | 229 | //获取今日任务列表 |
228 | TodayQuestion(){ | 230 | TodayQuestion(){ |
231 | + wx.showLoading({ | ||
232 | + title: '加载中...', | ||
233 | + }) | ||
229 | var that = this; | 234 | var that = this; |
230 | app.post("today/TodayQuestion", {today_id:this.data.today_id}).then(res => { | 235 | app.post("today/TodayQuestion", {today_id:this.data.today_id}).then(res => { |
231 | if(res.code == 1){ | 236 | if(res.code == 1){ |
237 | + wx.hideLoading() | ||
232 | console.log(res) | 238 | console.log(res) |
233 | 239 | ||
234 | let answer = { | 240 | let answer = { |
@@ -249,6 +255,7 @@ Page({ | @@ -249,6 +255,7 @@ Page({ | ||
249 | Count:res.data.Count,//总题数 | 255 | Count:res.data.Count,//总题数 |
250 | current:1,//当前题数 | 256 | current:1,//当前题数 |
251 | answer, | 257 | answer, |
258 | + pages_types:true, | ||
252 | }) | 259 | }) |
253 | } | 260 | } |
254 | }).catch(err => { | 261 | }).catch(err => { |
@@ -261,10 +268,13 @@ Page({ | @@ -261,10 +268,13 @@ Page({ | ||
261 | //比赛任务 | 268 | //比赛任务 |
262 | MatchQuestion(){ | 269 | MatchQuestion(){ |
263 | var that = this; | 270 | var that = this; |
271 | + wx.showLoading({ | ||
272 | + title: '加载中...', | ||
273 | + }) | ||
264 | app.post("match/MatchQuestion", {match_id:this.data.match_id}).then(res => { | 274 | app.post("match/MatchQuestion", {match_id:this.data.match_id}).then(res => { |
265 | if(res.code == 1){ | 275 | if(res.code == 1){ |
266 | console.log(res) | 276 | console.log(res) |
267 | - | 277 | + wx.hideLoading() |
268 | let answer = { | 278 | let answer = { |
269 | 'match_subject_id': res.data.List[0].match_subject_id, //'题目ID', | 279 | 'match_subject_id': res.data.List[0].match_subject_id, //'题目ID', |
270 | 'type':0,//题目类型:1=用户上传图片,2=用户上传音频, | 280 | 'type':0,//题目类型:1=用户上传图片,2=用户上传音频, |
@@ -283,6 +293,7 @@ Page({ | @@ -283,6 +293,7 @@ Page({ | ||
283 | Count:res.data.Count,//总题数 | 293 | Count:res.data.Count,//总题数 |
284 | current:1,//当前题数 | 294 | current:1,//当前题数 |
285 | answer, | 295 | answer, |
296 | + pages_types:true, | ||
286 | }) | 297 | }) |
287 | } | 298 | } |
288 | }).catch(err => { | 299 | }).catch(err => { |
@@ -292,6 +303,23 @@ Page({ | @@ -292,6 +303,23 @@ Page({ | ||
292 | }) | 303 | }) |
293 | }) | 304 | }) |
294 | }, | 305 | }, |
306 | + //答题页外部链接按钮图片 | ||
307 | + WebImage(){ | ||
308 | + var that = this; | ||
309 | + app.post("index/WebImage", {}).then(res => { | ||
310 | + if(res.code == 1){ | ||
311 | + console.log(res) | ||
312 | + this.setData({ | ||
313 | + webImg: res.data.web_image | ||
314 | + }) | ||
315 | + } | ||
316 | + }).catch(err => { | ||
317 | + wx.showToast({ | ||
318 | + title: err.msg, | ||
319 | + icon: 'none' | ||
320 | + }) | ||
321 | + }) | ||
322 | +}, | ||
295 | /** | 323 | /** |
296 | * 生命周期函数--监听页面初次渲染完成 | 324 | * 生命周期函数--监听页面初次渲染完成 |
297 | */ | 325 | */ |
@@ -303,14 +331,18 @@ Page({ | @@ -303,14 +331,18 @@ Page({ | ||
303 | * 生命周期函数--监听页面显示 | 331 | * 生命周期函数--监听页面显示 |
304 | */ | 332 | */ |
305 | onShow: function () { | 333 | onShow: function () { |
306 | - | 334 | + innerAudioContext.onEnded((res)=>{ // 监听音频自然播放至结束的事件 |
335 | + console.log(res) | ||
336 | + this.setData({ | ||
337 | + soundType : 2 | ||
338 | + }) | ||
339 | + }) | ||
307 | }, | 340 | }, |
308 | 341 | ||
309 | /** | 342 | /** |
310 | * 生命周期函数--监听页面隐藏 | 343 | * 生命周期函数--监听页面隐藏 |
311 | */ | 344 | */ |
312 | onHide: function () { | 345 | onHide: function () { |
313 | - | ||
314 | }, | 346 | }, |
315 | 347 | ||
316 | /** | 348 | /** |
@@ -318,6 +350,10 @@ Page({ | @@ -318,6 +350,10 @@ Page({ | ||
318 | */ | 350 | */ |
319 | onUnload: function () { | 351 | onUnload: function () { |
320 | clearInterval(time) | 352 | clearInterval(time) |
353 | + innerAudioContext.offEnded((res)=>{//取消监听音频自然播放至结束的事件 | ||
354 | + console.log(res) | ||
355 | + }) | ||
356 | + this.PlayState()//暂停后台播放的音乐 | ||
321 | }, | 357 | }, |
322 | 358 | ||
323 | /** | 359 | /** |
@@ -340,6 +376,7 @@ Page({ | @@ -340,6 +376,7 @@ Page({ | ||
340 | onShareAppMessage: function () { | 376 | onShareAppMessage: function () { |
341 | 377 | ||
342 | }, | 378 | }, |
379 | + | ||
343 | //第三方链接 | 380 | //第三方链接 |
344 | web_url(e){ | 381 | web_url(e){ |
345 | var webUrl = e.currentTarget.dataset.weburl; | 382 | var webUrl = e.currentTarget.dataset.weburl; |
@@ -377,6 +414,7 @@ Page({ | @@ -377,6 +414,7 @@ Page({ | ||
377 | //看原图 | 414 | //看原图 |
378 | showImg: function (e) { | 415 | showImg: function (e) { |
379 | var that = this; | 416 | var that = this; |
417 | + console.log(e.currentTarget.dataset.index) | ||
380 | wx.previewImage({ | 418 | wx.previewImage({ |
381 | urls: that.data.uploaderList, | 419 | urls: that.data.uploaderList, |
382 | current: that.data.uploaderList[e.currentTarget.dataset.index] | 420 | current: that.data.uploaderList[e.currentTarget.dataset.index] |
@@ -509,6 +547,8 @@ Page({ | @@ -509,6 +547,8 @@ Page({ | ||
509 | soundType:3,//录音结束 | 547 | soundType:3,//录音结束 |
510 | }) | 548 | }) |
511 | innerAudioContext.src = this.data.musicUrl | 549 | innerAudioContext.src = this.data.musicUrl |
550 | + innerAudioContext.play() | ||
551 | + console.log(innerAudioContext.paused) | ||
512 | innerAudioContext.onPlay(() => { // 监听音频播放事件 | 552 | innerAudioContext.onPlay(() => { // 监听音频播放事件 |
513 | console.log('开始播放') | 553 | console.log('开始播放') |
514 | }) | 554 | }) |
@@ -516,13 +556,14 @@ Page({ | @@ -516,13 +556,14 @@ Page({ | ||
516 | console.log(res.errMsg) | 556 | console.log(res.errMsg) |
517 | console.log(res.errCode) | 557 | console.log(res.errCode) |
518 | }) | 558 | }) |
559 | + | ||
519 | }, | 560 | }, |
520 | //录音暂停事件 | 561 | //录音暂停事件 |
521 | pause_voice(){ | 562 | pause_voice(){ |
522 | this.setData({ | 563 | this.setData({ |
523 | soundType:2,//录音结束 | 564 | soundType:2,//录音结束 |
524 | }) | 565 | }) |
525 | - console.log("暂停录音") | 566 | + console.log("暂停播放") |
526 | innerAudioContext.pause() | 567 | innerAudioContext.pause() |
527 | innerAudioContext.onPause(() => { // 监听音频暂停事件 | 568 | innerAudioContext.onPause(() => { // 监听音频暂停事件 |
528 | console.log('暂停播放') | 569 | console.log('暂停播放') |
@@ -531,5 +572,8 @@ Page({ | @@ -531,5 +572,8 @@ Page({ | ||
531 | console.log(res.errMsg) | 572 | console.log(res.errMsg) |
532 | console.log(res.errCode) | 573 | console.log(res.errCode) |
533 | }) | 574 | }) |
575 | + // innerAudioContext.offEnded((res)=>{//取消监听音频自然播放至结束的事件 | ||
576 | + // console.log(res) | ||
577 | + // }) | ||
534 | } | 578 | } |
535 | }) | 579 | }) |
1 | -<!-- 视频 --> | ||
2 | -<view class="video" wx:if="{{today_data.video_file}}"> | ||
3 | - <video src="{{today_data.video_file}}" loop show-fullscreen-btn="{{false}}"></video> | ||
4 | -</view> | ||
5 | -<!-- 音频 --> | ||
6 | -<view class="audio" wx:if="{{today_data.audio_file}}" > | ||
7 | - <!-- <audio controls src="http://m10.music.126.net/20210728150904/ef325f8ac68a3710a2c7cfec82a70096/ymusic/045e/000b/0f0f/34bf44037a7a4cb160928e5a21c314a0.mp3"></audio> --> | ||
8 | - | ||
9 | - <view style="width:686rpx;margin:0 auto"> | ||
10 | - <slider-audio audio-src="{{today_data.audio_file}}" id="audio" audioName="{{today_data.title}}"></slider-audio> | ||
11 | - </view> | ||
12 | -</view> | 1 | +<view wx-if="{{pages_types}}"> |
2 | + <!-- 视频 --> | ||
3 | + <view class="video" wx:if="{{today_data.video_file}}"> | ||
4 | + <video src="{{today_data.video_file}}" show-center-play-btn="{{true}}" show-progress="{{false}}" show-fullscreen-btn="{{true}}"></video> | ||
5 | + </view> | ||
6 | + <!-- 音频 --> | ||
7 | + <view class="audio" wx:if="{{today_data.audio_file}}" > | ||
8 | + <!-- <audio controls src="http://m10.music.126.net/20210728150904/ef325f8ac68a3710a2c7cfec82a70096/ymusic/045e/000b/0f0f/34bf44037a7a4cb160928e5a21c314a0.mp3"></audio> --> | ||
9 | + | ||
10 | + <view style="width:686rpx;margin:0 auto"> | ||
11 | + <slider-audio audio-src="{{today_data.audio_file}}" id="audio" audioName="{{today_data.title}}"></slider-audio> | ||
12 | + </view> | ||
13 | + </view> | ||
13 | 14 | ||
14 | -<!-- 播放音频 --> | ||
15 | -<view class="audio_play" bindtap="PlayState" wx:if="{{today_data.audio_file && today_data.type != 3}}"> | ||
16 | - <image class="audio_img" src="../../img/ic_voice56@2x.png"></image> | ||
17 | -</view> | 15 | + <!-- 播放音频 --> |
16 | + <view class="audio_play" bindtap="PlayState" wx:if="{{today_data.audio_file && today_data.type != 3}}"> | ||
17 | + <image class="audio_img" src="../../img/ic_voice56@2x.png"></image> | ||
18 | + </view> | ||
18 | 19 | ||
19 | -<!-- 文本 --> | ||
20 | -<view class="essay" wx:if="{{today_data.text}}"> | ||
21 | - <text>{{today_data.text}}</text> | ||
22 | -</view> | 20 | + <!-- 文本 --> |
21 | + <view class="essay" wx:if="{{today_data.text}}"> | ||
22 | + <text>{{today_data.text}}</text> | ||
23 | + </view> | ||
23 | 24 | ||
24 | -<!-- 第三方外部连接 --> | ||
25 | -<view class="essay" wx:if="{{today_data.web_url}}" bindtap="web_url" data-webUrl="{{today_data.web_url}}"> | ||
26 | - <image src="../../img/7.jpg"></image> | ||
27 | -</view> | ||
28 | -<!-- 图片 --> | ||
29 | -<view class="image" wx:if="{{today_data.image.length != 0}}"> | ||
30 | - <swiper indicator-dots | ||
31 | - autoplay interval="{{2000}}" > | ||
32 | - <block wx:for="{{today_data.image}}" wx:key="index"> | ||
33 | - <swiper-item> | ||
34 | - <image src="{{item}}" mode="widthFix"></image> | ||
35 | - </swiper-item> | ||
36 | - </block> | ||
37 | - </swiper> | ||
38 | -</view> | 25 | + <!-- 第三方外部连接 --> |
26 | + <view class="essay" wx:if="{{today_data.web_url}}" bindtap="web_url" data-webUrl="{{today_data.web_url}}"> | ||
27 | + <image src="{{webImg}}"></image> | ||
28 | + <image src="../../img/ic_play@2x.png" mode="widthFix"></image> | ||
29 | + </view> | ||
30 | + <!-- 图片 --> | ||
31 | + <view class="image" wx:if="{{today_data.image.length != 0}}"> | ||
32 | + <swiper indicator-dots | ||
33 | + autoplay interval="{{2000}}" > | ||
34 | + <block wx:for="{{today_data.image}}" wx:key="index"> | ||
35 | + <swiper-item> | ||
36 | + <image src="{{item}}" mode="widthFix"></image> | ||
37 | + </swiper-item> | ||
38 | + </block> | ||
39 | + </swiper> | ||
40 | + </view> | ||
39 | 41 | ||
40 | -<!-- 音频录制 --> | ||
41 | -<view class="recording" wx:if="{{today_data.type == 3}}"> | ||
42 | - <view class="art"> | ||
43 | - <!-- //录音状态 0未录音 1开始录音 2录音完成 3播放录音 --> | ||
44 | - <view> | ||
45 | - <image src="/img/ic_voice40@2x.png" bindtap="PlayState" wx:if="{{today_data.audio_file && today_data.type == 3}}"></image> | ||
46 | - </view> | ||
47 | - <image src="/img/ic_rec_n@2x.png" wx:if="{{soundType != 1 }}" bindtap="startRecord"></image> | ||
48 | - <image src="/img/ic_rec_s@2x.png" wx:if="{{soundType == 1}}" bindtap="stopRecord"></image> | ||
49 | - <image src="/img/ic_play_u@2x.png" wx:if="{{soundType == 0 || soundType == 1}}"></image> | ||
50 | - <image src="/img/ic_play_n@2x.png" wx:if="{{soundType == 2}}" bindtap="play_voice" ></image> | ||
51 | - <image src="/img/play.png" wx:if="{{soundType == 3}}" bindtap="pause_voice"></image> | ||
52 | - </view> | ||
53 | -</view> | 42 | + <!-- 音频录制 --> |
43 | + <view class="recording" wx:if="{{today_data.type == 3}}"> | ||
44 | + <view class="art"> | ||
45 | + <!-- //录音状态 0未录音 1开始录音 2录音完成 3播放录音 --> | ||
46 | + <view> | ||
47 | + <image src="/img/ic_voice40@2x.png" bindtap="PlayState" wx:if="{{today_data.audio_file && today_data.type == 3}}"></image> | ||
48 | + </view> | ||
49 | + <image src="/img/ic_rec_n@2x.png" wx:if="{{soundType != 1 }}" bindtap="startRecord"></image> | ||
50 | + <image src="/img/ic_rec_s@2x.png" wx:if="{{soundType == 1}}" bindtap="stopRecord"></image> | ||
51 | + <image src="/img/ic_play_u@2x.png" wx:if="{{soundType == 0 || soundType == 1}}"></image> | ||
52 | + <image src="/img/ic_play_n@2x.png" wx:if="{{soundType == 2}}" bindtap="play_voice" ></image> | ||
53 | + <image src="/img/play.png" wx:if="{{soundType == 3}}" bindtap="pause_voice"></image> | ||
54 | + </view> | ||
55 | + </view> | ||
54 | 56 | ||
55 | -<!-- 上传图片 --> | ||
56 | -<view class='ui_uploader_cell' wx:if="{{today_data.type == 2}}"> | ||
57 | - <!-- 根据已选择的图片临时路径数组展示图片--> | ||
58 | - <view class='ui_uploader_item' wx:for="{{imglist}}" wx:key="index"> | ||
59 | - <!-- 删除--> | ||
60 | - <icon class='ui_uploader_item_icon' bindtap='clearImg' data-index="{{index}}" type="clear" size="20" | ||
61 | - color="red" /> | ||
62 | - <!-- 图片--> | ||
63 | - <image bindtap='showImg' data-index="{{index}}" src=' {{http_url}}{{item}}'></image> | ||
64 | - </view> | ||
65 | - <!-- 上传按钮+框 --> | ||
66 | - <view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}"> | ||
67 | - <image src="../../img/upload.png"></image> | 57 | + <!-- 上传图片 --> |
58 | + <view class='ui_uploader_cell' wx:if="{{today_data.type == 2}}"> | ||
59 | + <!-- 根据已选择的图片临时路径数组展示图片--> | ||
60 | + <view class='ui_uploader_item' wx:for="{{imglist}}" wx:key="index"> | ||
61 | + <!-- 删除--> | ||
62 | + <icon class='ui_uploader_item_icon' bindtap='clearImg' data-index="{{index}}" type="clear" size="20" | ||
63 | + color="red" /> | ||
64 | + <!-- 图片--> | ||
65 | + <image bindtap='showImg' data-index="{{index}}" src=' {{http_url}}{{item}}'></image> | ||
66 | + </view> | ||
67 | + <!-- 上传按钮+框 --> | ||
68 | + <view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}"> | ||
69 | + <image src="../../img/upload.png"></image> | ||
70 | + </view> | ||
68 | </view> | 71 | </view> |
69 | - </view> | ||
70 | 72 | ||
71 | -<view class="porogress"> | ||
72 | - <text>{{current}}</text> | ||
73 | - <text>/</text> | ||
74 | - <text>{{Count}}</text> | ||
75 | -</view> | 73 | + <view class="porogress"> |
74 | + <text>{{current}}</text> | ||
75 | + <text>/</text> | ||
76 | + <text>{{Count}}</text> | ||
77 | + </view> | ||
76 | 78 | ||
77 | -<view class="box-end" bindtap="gotoday">{{current == Count ? '完成打卡' : 'Next'}}</view> | 79 | + <view class="box-end" bindtap="gotoday">{{current != Count ? 'Next' : ' 完成打卡'}}</view> |
78 | 80 | ||
79 | -<view class="alter" wx:if="{{alterType}}"> | ||
80 | - <view class="mask"> | ||
81 | - <image src="/img/img_star@2x.png"></image> | ||
82 | - </view> | ||
83 | - <view class="denglu" wx:if="alterType"> | ||
84 | - <view>恭喜你</view> | ||
85 | - <view wx:if="{{alterData.score}}">获得积分<text>{{alterData.score}}</text> </view> | ||
86 | - <view class="text_bar"> | ||
87 | - <view> | 81 | + <view class="alter" wx:if="{{alterType}}"> |
82 | + <view class="mask"> | ||
83 | + <image src="/img/img_star@2x.png"></image> | ||
84 | + </view> | ||
85 | + <view class="denglu" wx:if="alterType"> | ||
86 | + <view>恭喜你</view> | ||
87 | + <view wx:if="{{alterData.score}}">获得积分<text>{{alterData.score}}</text> </view> | ||
88 | + <view class="text_bar"> | ||
88 | <view> | 89 | <view> |
89 | - <text>{{alterData.score}}</text> | ||
90 | - <text>分</text> | 90 | + <view> |
91 | + <text>{{alterData.score}}</text> | ||
92 | + <text>分</text> | ||
93 | + </view> | ||
94 | + <text>今日学习时长</text> | ||
91 | </view> | 95 | </view> |
92 | - <text>今日学习时长</text> | ||
93 | - </view> | ||
94 | - <view> | ||
95 | <view> | 96 | <view> |
96 | - <text>{{alterData.readwords}}</text> | ||
97 | - <text>个</text> | 97 | + <view> |
98 | + <text>{{alterData.readwords}}</text> | ||
99 | + <text>个</text> | ||
100 | + </view> | ||
101 | + <text>打卡单词</text> | ||
98 | </view> | 102 | </view> |
99 | - <text>打卡单词</text> | ||
100 | - </view> | ||
101 | - <view> | ||
102 | <view> | 103 | <view> |
103 | - <text>{{alterData.readbook}}</text> | ||
104 | - <text>本</text> | 104 | + <view> |
105 | + <text>{{alterData.readbook}}</text> | ||
106 | + <text>本</text> | ||
107 | + </view> | ||
108 | + <text>打卡英语书</text> | ||
105 | </view> | 109 | </view> |
106 | - <text>打卡英语书</text> | ||
107 | </view> | 110 | </view> |
108 | - </view> | ||
109 | - <text>{{alterData.Happy}}</text> | ||
110 | - <view class="button" bindtap="gototram">开心收下</view> | 111 | + <text>{{alterData.Happy}}</text> |
112 | + <view class="button" bindtap="gototram">开心收下</view> | ||
113 | + </view> | ||
111 | </view> | 114 | </view> |
112 | </view> | 115 | </view> |
@@ -80,6 +80,7 @@ swiper{ | @@ -80,6 +80,7 @@ swiper{ | ||
80 | position: fixed; | 80 | position: fixed; |
81 | top: 30rpx; | 81 | top: 30rpx; |
82 | right: 20rpx; | 82 | right: 20rpx; |
83 | + background-color: #fff; | ||
83 | } | 84 | } |
84 | .porogress>text{ | 85 | .porogress>text{ |
85 | font-size: 24rpx; | 86 | font-size: 24rpx; |
@@ -101,10 +102,10 @@ swiper{ | @@ -101,10 +102,10 @@ swiper{ | ||
101 | .ui_uploader_item { | 102 | .ui_uploader_item { |
102 | float: left; | 103 | float: left; |
103 | position: relative; | 104 | position: relative; |
104 | - margin-right: 30rpx; | ||
105 | - margin-bottom: 30rpx; | ||
106 | - width: 165rpx; | ||
107 | - height: 165rpx; | 105 | + margin-right: 3%; |
106 | + margin-bottom: 40rpx; | ||
107 | + width: 30%; | ||
108 | + height: 204rpx; | ||
108 | 109 | ||
109 | } | 110 | } |
110 | 111 | ||
@@ -127,11 +128,14 @@ swiper{ | @@ -127,11 +128,14 @@ swiper{ | ||
127 | margin-right: 25rpx; | 128 | margin-right: 25rpx; |
128 | margin-bottom: 25rpx; | 129 | margin-bottom: 25rpx; |
129 | box-sizing: border-box; | 130 | box-sizing: border-box; |
131 | + width: 30%; | ||
132 | + } | ||
133 | + .ui_uploader:nth-child(3n){ | ||
134 | + margin-right: 0; | ||
130 | } | 135 | } |
131 | - | ||
132 | .ui_uploader image { | 136 | .ui_uploader image { |
133 | - width: 165rpx; | ||
134 | - height: 165rpx; | 137 | + width: 100%; |
138 | + height: 204rpx; | ||
135 | } | 139 | } |
136 | 140 | ||
137 | 141 | ||
@@ -150,6 +154,19 @@ swiper{ | @@ -150,6 +154,19 @@ swiper{ | ||
150 | .essay image{ | 154 | .essay image{ |
151 | width: 100%; | 155 | width: 100%; |
152 | } | 156 | } |
157 | +.essay{ | ||
158 | + position: relative; | ||
159 | +} | ||
160 | +.essay>image:last-child{ | ||
161 | + position: absolute; | ||
162 | + width: 164rpx; | ||
163 | + height: 164rpx; | ||
164 | + top: 50%; | ||
165 | + left: 50%; | ||
166 | + margin-left: -82rpx; | ||
167 | + margin-top: -82rpx; | ||
168 | + opacity: 0.5; | ||
169 | +} | ||
153 | 170 | ||
154 | /* */ | 171 | /* */ |
155 | .alter{ | 172 | .alter{ |
@@ -11,11 +11,12 @@ | @@ -11,11 +11,12 @@ | ||
11 | border-top-left-radius: 24rpx; | 11 | border-top-left-radius: 24rpx; |
12 | border-top-right-radius: 24rpx; | 12 | border-top-right-radius: 24rpx; |
13 | overflow: hidden; | 13 | overflow: hidden; |
14 | + border-radius: 24rpx 24rpx 0 0; | ||
14 | } | 15 | } |
15 | 16 | ||
16 | .top image { | 17 | .top image { |
17 | width: 100%; | 18 | width: 100%; |
18 | - height: 100%; | 19 | + border-radius: 24rpx 24rpx 0 0; |
19 | } | 20 | } |
20 | 21 | ||
21 | .box { | 22 | .box { |
@@ -6,17 +6,16 @@ | @@ -6,17 +6,16 @@ | ||
6 | <view>{{meData.score}}</view> | 6 | <view>{{meData.score}}</view> |
7 | </view> | 7 | </view> |
8 | <view class="moon"> | 8 | <view class="moon"> |
9 | - <view class="mony" wx:for="{{shoppingData}}" wx:key='key'> | 9 | + <view class="mony" wx:for="{{shoppingData}}" wx:key='key' > |
10 | <view> | 10 | <view> |
11 | <image src="{{item.image}}"></image> | 11 | <image src="{{item.image}}"></image> |
12 | </view> | 12 | </view> |
13 | <view class="mon-1"> | 13 | <view class="mon-1"> |
14 | <text>{{item.title}}</text> | 14 | <text>{{item.title}}</text> |
15 | <view class="mon-2"> | 15 | <view class="mon-2"> |
16 | - <view class="mon-4"> | ||
17 | - <image src="/img/ic_jifen@2x.png"></image> | ||
18 | - <view>{{item.number}}</view> | ||
19 | - </view> | 16 | + <view class="mon-4"><image src="/img/ic_jifen@2x.png"></image> |
17 | + <view>{{item.number}}</view> | ||
18 | + </view> | ||
20 | <view class="mon-3" bindtap="duihuan" data-id="{{item}}">兑换</view> | 19 | <view class="mon-3" bindtap="duihuan" data-id="{{item}}">兑换</view> |
21 | </view> | 20 | </view> |
22 | </view> | 21 | </view> |
@@ -26,14 +26,19 @@ page{ | @@ -26,14 +26,19 @@ page{ | ||
26 | display: flex; | 26 | display: flex; |
27 | margin-bottom: 40rpx; | 27 | margin-bottom: 40rpx; |
28 | flex-wrap: wrap; | 28 | flex-wrap: wrap; |
29 | - margin-left: 18rpx; | 29 | + padding: 34rpx; |
30 | + box-sizing: border-box; | ||
30 | } | 31 | } |
31 | .mony{ | 32 | .mony{ |
32 | - width:336rpx; | 33 | + border-radius: 12rpx; |
34 | + width:49%; | ||
33 | height:520rpx; | 35 | height:520rpx; |
34 | - margin-top:16rpx; | ||
35 | - margin-left: 14rpx; | ||
36 | background: #ffffff; | 36 | background: #ffffff; |
37 | + overflow: hidden; | ||
38 | + margin-top: 18rpx; | ||
39 | +} | ||
40 | +.mony:nth-child(2n){ | ||
41 | + margin-left: 2%; | ||
37 | } | 42 | } |
38 | .mony image{ | 43 | .mony image{ |
39 | width: 100%; | 44 | width: 100%; |
1 | +<view class="calendar_bg"> | ||
2 | + <view class="calendar"> | ||
3 | + <image src="/img/ic_date.png" catchtap="goCalend"></image> | ||
4 | +</view> | ||
5 | +</view> | ||
1 | <!--今日任务 --> | 6 | <!--今日任务 --> |
2 | <view class="cast" style="background:rgba(113,116,132,1);" bindtap="gotoday" data-type="today" | 7 | <view class="cast" style="background:rgba(113,116,132,1);" bindtap="gotoday" data-type="today" |
3 | data-id="{{raskData.Today.today_id}}" wx:if="{{raskData.Today}}"> | 8 | data-id="{{raskData.Today.today_id}}" wx:if="{{raskData.Today}}"> |
@@ -8,9 +13,9 @@ | @@ -8,9 +13,9 @@ | ||
8 | <view class="cast-logo"> | 13 | <view class="cast-logo"> |
9 | <image src="/img/ic_date_dangri@2x.png"></image> | 14 | <image src="/img/ic_date_dangri@2x.png"></image> |
10 | </view> | 15 | </view> |
11 | - <view class="cast-logos"> | 16 | + <!-- <view class="cast-logos"> |
12 | <image src="/img/ic_date.png" catchtap="goCalend"></image> | 17 | <image src="/img/ic_date.png" catchtap="goCalend"></image> |
13 | - </view> | 18 | + </view> --> |
14 | </view> | 19 | </view> |
15 | <!-- 比赛任务 --> | 20 | <!-- 比赛任务 --> |
16 | <view class="cast" style="background:rgba(109,134,157,1);" bindtap="gotoday" data-type="match" | 21 | <view class="cast" style="background:rgba(109,134,157,1);" bindtap="gotoday" data-type="match" |
@@ -44,8 +49,9 @@ | @@ -44,8 +49,9 @@ | ||
44 | 49 | ||
45 | <!-- --> | 50 | <!-- --> |
46 | <view class="footer"> | 51 | <view class="footer"> |
47 | - 分享到 | ||
48 | - <button open-type="share" class="share"> | 52 | + <text style="margin-right: 10rpx;">分享到</text> |
53 | + <image src="/img/chat.png" wx:if="{{raskData.Today.type != 1 && raskData.Match.type != 1 && raskData.Evaluation.type != 1 }}"></image> | ||
54 | + <button open-type="share" class="share" wx:if="{{raskData.Today.type == 1 && raskData.Match.type == 1 && raskData.Evaluation.type == 1 }}"> | ||
49 | <image src="/img/ic_wechat@2x.png"></image> | 55 | <image src="/img/ic_wechat@2x.png"></image> |
50 | </button> | 56 | </button> |
51 | </view> | 57 | </view> |
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | 53 | ||
54 | .footer { | 54 | .footer { |
55 | position: absolute; | 55 | position: absolute; |
56 | - bottom: 10%; | 56 | + bottom: 3%; |
57 | left: 50%; | 57 | left: 50%; |
58 | font-size: 28rpx; | 58 | font-size: 28rpx; |
59 | color: rgba(139, 139, 141, 1); | 59 | color: rgba(139, 139, 141, 1); |
@@ -82,4 +82,23 @@ | @@ -82,4 +82,23 @@ | ||
82 | text-align: center; | 82 | text-align: center; |
83 | font-size: 28rpx; | 83 | font-size: 28rpx; |
84 | color: gray; | 84 | color: gray; |
85 | +} | ||
86 | +.calendar_bg{ | ||
87 | + width: 686rpx; | ||
88 | + margin: 0 auto; | ||
89 | +} | ||
90 | +.calendar{ | ||
91 | + width: 80rpx; | ||
92 | + height: 80rpx; | ||
93 | + margin-left: auto; | ||
94 | + background-color: #ebebeb; | ||
95 | + border-radius: 20rpx; | ||
96 | + overflow: hidden; | ||
97 | +} | ||
98 | +.calendar image{ | ||
99 | + width: 80rpx; | ||
100 | + height: 80rpx; | ||
101 | +} | ||
102 | +.cast:nth-child(2){ | ||
103 | + margin-top: 42rpx; | ||
85 | } | 104 | } |
@@ -4,10 +4,16 @@ | @@ -4,10 +4,16 @@ | ||
4 | </view> | 4 | </view> |
5 | </navigator> | 5 | </navigator> |
6 | <view class="top"> | 6 | <view class="top"> |
7 | - <view class="top-1"> | ||
8 | - <image src="{{token ? meData.avatar : '../../img/ic_head@2x.png'}}"></image> | ||
9 | - <view class="bigtitle">{{meData.nickname}}</view> | ||
10 | - <text class="t3" bindtap="getmy">{{token ? '查看并编辑个人资料' : '您还没有登录,请进行登录'}}</text> | 7 | + <view class="top-1" bindtap="getmy"> |
8 | + <view> | ||
9 | + <view style="display: flex;justify-content: center;"> | ||
10 | + <image src="{{token ? meData.avatar : '../../img/ic_head@2x.png'}}" mode="widthFix"></image> | ||
11 | + </view> | ||
12 | + <view style="display: flex;justify-content: center;"> | ||
13 | + <view class="bigtitle">{{meData.nickname}}</view> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + <text class="t3" >{{token ? '查看并编辑个人资料' : '您还没有登录,请进行登录'}}</text> | ||
11 | </view> | 17 | </view> |
12 | <view class="right">积分·{{token ? meData.score : '0'}}</view> | 18 | <view class="right">积分·{{token ? meData.score : '0'}}</view> |
13 | </view> | 19 | </view> |
1 | -.logo { | 1 | +page{ |
2 | background: #3A3942; | 2 | background: #3A3942; |
3 | - padding-top: 36rpx; | 3 | +} |
4 | +.logo { | ||
5 | + padding-top: 20rpx; | ||
4 | padding-right: 48rpx; | 6 | padding-right: 48rpx; |
5 | } | 7 | } |
6 | .logo_bg{ | 8 | .logo_bg{ |
@@ -19,15 +21,14 @@ | @@ -19,15 +21,14 @@ | ||
19 | } | 21 | } |
20 | .top { | 22 | .top { |
21 | display: flex; | 23 | display: flex; |
22 | - justify-content: center; | 24 | + justify-content: space-between; |
23 | align-items: center; | 25 | align-items: center; |
24 | padding: 0 48rpx; | 26 | padding: 0 48rpx; |
25 | padding-bottom: 80rpx; | 27 | padding-bottom: 80rpx; |
26 | - background: #3A3942; | ||
27 | } | 28 | } |
28 | 29 | ||
29 | .top-1 { | 30 | .top-1 { |
30 | - flex: 7; | 31 | + width: 216rpx; |
31 | } | 32 | } |
32 | 33 | ||
33 | .top image { | 34 | .top image { |
@@ -38,7 +39,7 @@ | @@ -38,7 +39,7 @@ | ||
38 | 39 | ||
39 | .bigtitle { | 40 | .bigtitle { |
40 | font-size: 52rpx; | 41 | font-size: 52rpx; |
41 | - margin-top: 48rpx; | 42 | + margin-top: 28rpx; |
42 | font-weight: 600; | 43 | font-weight: 600; |
43 | color: white; | 44 | color: white; |
44 | } | 45 | } |
@@ -49,7 +50,6 @@ | @@ -49,7 +50,6 @@ | ||
49 | } | 50 | } |
50 | 51 | ||
51 | .right { | 52 | .right { |
52 | - flex: 3; | ||
53 | width: 202rpx; | 53 | width: 202rpx; |
54 | height: 72rpx; | 54 | height: 72rpx; |
55 | text-align: center; | 55 | text-align: center; |
@@ -65,6 +65,8 @@ | @@ -65,6 +65,8 @@ | ||
65 | display: flex; | 65 | display: flex; |
66 | flex-wrap: wrap; | 66 | flex-wrap: wrap; |
67 | justify-content: space-around; | 67 | justify-content: space-around; |
68 | + border-radius: 24rpx 24rpx 0 0; | ||
69 | + background-color: #fff; | ||
68 | } | 70 | } |
69 | .contents .cont:last-child{ | 71 | .contents .cont:last-child{ |
70 | margin-top:24rpx; | 72 | margin-top:24rpx; |
@@ -100,7 +102,8 @@ | @@ -100,7 +102,8 @@ | ||
100 | font-size:24rpx; | 102 | font-size:24rpx; |
101 | line-height: 42rpx; | 103 | line-height: 42rpx; |
102 | color:rgba(196,196,196,1); | 104 | color:rgba(196,196,196,1); |
103 | - margin-bottom: 100rpx; | 105 | + padding-bottom: 100rpx; |
106 | + background: #fff; | ||
104 | } | 107 | } |
105 | .footer{ | 108 | .footer{ |
106 | position: fixed; | 109 | position: fixed; |
1 | { | 1 | { |
2 | + "setting": {}, | ||
2 | "condition": { | 3 | "condition": { |
3 | "plugin": { | 4 | "plugin": { |
4 | "list": [] | 5 | "list": [] |
@@ -16,6 +17,12 @@ | @@ -16,6 +17,12 @@ | ||
16 | "pathName": "pages/question/question", | 17 | "pathName": "pages/question/question", |
17 | "query": "", | 18 | "query": "", |
18 | "scene": null | 19 | "scene": null |
20 | + }, | ||
21 | + { | ||
22 | + "name": "pages/integral/integral", | ||
23 | + "pathName": "pages/integral/integral", | ||
24 | + "query": "", | ||
25 | + "scene": null | ||
19 | } | 26 | } |
20 | ] | 27 | ] |
21 | } | 28 | } |
-
请 注册 或 登录 后发表评论