Commit 6e91f1f1 authored by 吴颖's avatar 吴颖

'test'

parent 70b0cd76
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<view class="status"> <view class="status">
<view class="evaluation" data-id="{{item.child_id}}" data-class_single_id="{{item.class_single_id}}" catchtap="goperformance" wx:if="{{item.is_leave == 0 && item.sign_status == 1}}">运动评价</view> <view class="evaluation" data-id="{{item.child_id}}" data-class_single_id="{{item.class_single_id}}" catchtap="goperformance" wx:if="{{item.is_leave == 0 && item.sign_status == 1}}">运动评价</view>
<view class="leave" wx:else>已请假</view> <view class="leave" wx:else>已请假</view>
<view class="unread" wx:if="{{ !item.class_moment }}"></view> <!-- <view class="unread" wx:if="{{ !item.class_moment }}"></view> -->
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -123,7 +123,6 @@ Page({ ...@@ -123,7 +123,6 @@ Page({
that.setData({ that.setData({
imgBox: imgs imgBox: imgs
}); });
console.log(that.data.imgBox)
}) })
}, },
fail() { fail() {
...@@ -143,10 +142,14 @@ Page({ ...@@ -143,10 +142,14 @@ Page({
// 预览图片 // 预览图片
previewImg: function (e) { previewImg: function (e) {
var index = e.currentTarget.dataset.index var index = e.currentTarget.dataset.index
var arr = []
for (var i=0;i<this.data.imgBox.length;i++) {
arr.push(this.data.imgBox[i].url)
}
var imgs = this.data.imgBox var imgs = this.data.imgBox
wx.previewImage({ wx.previewImage({
current: imgs[index].url, current: imgs[index].url,
urls: this.data.imgBox urls: arr
}) })
}, },
save() { save() {
...@@ -174,5 +177,9 @@ Page({ ...@@ -174,5 +177,9 @@ Page({
} }
} }
base.newRequest(params) base.newRequest(params)
},
paly() { // 播放视频
} }
}) })
\ No newline at end of file
<view class="video"> <view wx:if="{{type != 'check'}}">
<view class="head"> <view class="video">
<text class="title">拍摄运动工程</text> <view class="head">
<text class="up">(可上传1个视频)</text> <text class="title">运动工程</text>
</view> </view>
<view class="imgBox flex-h"> <view class="imgBox flex-h">
<view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx"> <view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<video src="{{item.url}}" data-index="{{index}}"></video> <video src="{{item.url}}" data-index="{{index}}" bindplay='paly'></video>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo" wx:if="{{type != 'check'}}">
<text class='iconfont iconguanbi'></text>
</view> </view>
</view> </view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseVideo" wx:if="{{videoBox.length < 1}}"> </view>
<text class='iconfont iconshipin'></text> <view class="video">
<view class="head">
<text class="title">精彩瞬间</text>
</view>
<view class="imgBox flex-h flex-hw">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="video"> <view wx:else>
<view class="head"> <view class="video">
<text class="title">记录精彩瞬间</text> <view class="head">
<text class="up">(最多可上传9张照片)</text> <text class="title">拍摄运动工程</text>
</view> <text class="up">(可上传1个视频)</text>
<view class="imgBox flex-h flex-hw"> </view>
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx"> <view class="imgBox flex-h">
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image> <view class="img videoBox" wx:for="{{videoBox}}" wx:for-item="item" wx:key="idx">
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg" wx:if="{{type != 'check'}}"> <video src="{{item.url}}" data-index="{{index}}"></video>
<text class='iconfont iconguanbi'></text> <view class="delete-btn" data-index="{{index}}" catchtap="deleteVideo" wx:if="{{type != 'check'}}">
<text class='iconfont iconguanbi'></text>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseVideo" wx:if="{{videoBox.length < 1}}">
<text class='iconfont iconshipin'></text>
</view> </view>
</view> </view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg" wx:if="{{imgBox.length < 9 && type != 'check' }}"> </view>
<text class='iconfont iconxiangji'></text> <view class="video">
<view class="head">
<text class="title">记录精彩瞬间</text>
<text class="up">(最多可上传9张照片)</text>
</view>
<view class="imgBox flex-h flex-hw">
<view class="img" wx:for="{{imgBox}}" wx:for-item="item" wx:key="idx">
<image src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"></image>
<view class="delete-btn" data-index="{{index}}" catchtap="deleteImg" wx:if="{{type != 'check'}}">
<text class='iconfont iconguanbi'></text>
</view>
</view>
<view class='addBox flex-h flex-vc flex-hc' bindtap="chooseImg"
wx:if="{{imgBox.length < 9 && type != 'check' }}">
<text class='iconfont iconxiangji'></text>
</view>
</view> </view>
</view> </view>
</view> <view class="button" wx:if="{{type != 'check'}}">
<view class="button" wx:if="{{type != 'check'}}"> <view class="submit" catchtap="save">提交</view>
<view class="submit" catchtap="save">提交</view> </view>
</view> </view>
\ No newline at end of file
...@@ -24,7 +24,6 @@ Page({ ...@@ -24,7 +24,6 @@ Page({
let params = { let params = {
url: 'coach/reply', url: 'coach/reply',
data: { data: {
// coach_id : 4,
coach_id: app.globalData.coach_id coach_id: app.globalData.coach_id
}, },
callback: (data) => { callback: (data) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment