Commit 7a231989 authored by 张杰's avatar 张杰

带班老师首页图片预览

parent 168f12ec
......@@ -16,6 +16,15 @@ Page({
},
previewPic: function(e) {
var current = this.data.records[e.target.dataset.index].arrPic[e.target.dataset.picIndex]
wx.previewImage({
current: current,
urls: this.data.records[e.target.dataset.index].arrPic
})
},
tapCell: function(e) {
console.log(e)
let index = e.currentTarget.dataset.index
......
......@@ -21,8 +21,8 @@
</view>
<!-- 图片 -->
<view class='home-student-picture-item'>
<view wx:for="{{item.arrPic}}" wx:for-item="picItem">
<image src='{{picItem}}' class='home-student-picture' mode='aspectFill'></image>
<view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex">
<image src='{{picItem}}' class='home-student-picture' bindtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
<!-- 行为 -->
......
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