first.wxml
4.5 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
<view wx-if="{{pages_types}}">
<!-- 视频 -->
<view class="video" wx:if="{{today_data.video_file}}">
<video src="{{today_data.video_file}}" show-center-play-btn="{{true}}" show-progress="{{false}}" show-fullscreen-btn="{{true}}"></video>
</view>
<!-- 音频 -->
<view class="audio" wx:if="{{today_data.audio_file}}" >
<!-- <audio controls src="http://m10.music.126.net/20210728150904/ef325f8ac68a3710a2c7cfec82a70096/ymusic/045e/000b/0f0f/34bf44037a7a4cb160928e5a21c314a0.mp3"></audio> -->
<view style="width:686rpx;margin:0 auto">
<slider-audio audio-src="{{today_data.audio_file}}" id="audio" audioName="{{today_data.title}}"></slider-audio>
</view>
</view>
<!-- 播放音频 -->
<view class="audio_play" bindtap="PlayState" wx:if="{{today_data.audio_file && today_data.type != 3}}">
<image class="audio_img" src="../../img/ic_voice56@2x.png"></image>
</view>
<!-- 文本 -->
<view class="essay" wx:if="{{today_data.text}}">
<text>{{today_data.text}}</text>
</view>
<!-- 第三方外部连接 -->
<view class="essay" wx:if="{{today_data.web_url}}" bindtap="web_url" data-webUrl="{{today_data.web_url}}">
<image src="{{webImg}}"></image>
<image src="../../img/ic_play@2x.png" mode="widthFix"></image>
</view>
<!-- 图片 -->
<view class="image" wx:if="{{today_data.image.length != 0}}">
<swiper indicator-dots
autoplay interval="{{2000}}" >
<block wx:for="{{today_data.image}}" wx:key="index">
<swiper-item>
<image src="{{item}}" mode="widthFix"></image>
</swiper-item>
</block>
</swiper>
</view>
<!-- 音频录制 -->
<view class="recording" wx:if="{{today_data.type == 3}}">
<view class="art">
<!-- //录音状态 0未录音 1开始录音 2录音完成 3播放录音 -->
<view>
<image src="/img/ic_voice40@2x.png" bindtap="PlayState" wx:if="{{today_data.audio_file && today_data.type == 3}}"></image>
</view>
<image src="/img/ic_rec_n@2x.png" wx:if="{{soundType != 1 }}" bindtap="startRecord"></image>
<image src="/img/ic_rec_s@2x.png" wx:if="{{soundType == 1}}" bindtap="stopRecord"></image>
<image src="/img/ic_play_u@2x.png" wx:if="{{soundType == 0 || soundType == 1}}"></image>
<image src="/img/ic_play_n@2x.png" wx:if="{{soundType == 2}}" bindtap="play_voice" ></image>
<image src="/img/play.png" wx:if="{{soundType == 3}}" bindtap="pause_voice"></image>
</view>
</view>
<!-- 上传图片 -->
<view class='ui_uploader_cell' wx:if="{{today_data.type == 2}}">
<!-- 根据已选择的图片临时路径数组展示图片-->
<view class='ui_uploader_item' wx:for="{{imglist}}" wx:key="index">
<!-- 删除-->
<icon class='ui_uploader_item_icon' bindtap='clearImg' data-index="{{index}}" type="clear" size="20"
color="red" />
<!-- 图片-->
<image bindtap='showImg' data-index="{{index}}" src=' {{http_url}}{{item}}'></image>
</view>
<!-- 上传按钮+框 -->
<view class='ui_uploader' bindtap='upload' wx:if="{{showUpload}}">
<image src="../../img/upload.png"></image>
</view>
</view>
<view class="porogress">
<text>{{current}}</text>
<text>/</text>
<text>{{Count}}</text>
</view>
<view class="box-end" bindtap="gotoday">{{current != Count ? 'Next' : ' 完成打卡'}}</view>
<view class="alter" wx:if="{{alterType}}">
<view class="mask">
<image src="/img/img_star@2x.png"></image>
</view>
<view class="denglu" wx:if="alterType">
<view>恭喜你</view>
<view wx:if="{{alterData.score}}">获得积分<text>{{alterData.score}}</text> </view>
<view class="text_bar">
<view>
<view>
<text>{{alterData.score}}</text>
<text>分</text>
</view>
<text>今日学习时长</text>
</view>
<view>
<view>
<text>{{alterData.readwords}}</text>
<text>个</text>
</view>
<text>打卡单词</text>
</view>
<view>
<view>
<text>{{alterData.readbook}}</text>
<text>本</text>
</view>
<text>打卡英语书</text>
</view>
</view>
<text>{{alterData.Happy}}</text>
<view class="button" bindtap="gototram">开心收下</view>
</view>
</view>
</view>