parent
581d0cd1c4
commit
6562b0baab
@ -0,0 +1,90 @@
|
||||
// pages/opera/stage/stage_photo.js
|
||||
import {
|
||||
httpUtil,
|
||||
http,
|
||||
login_check
|
||||
} from '../../../utils/util'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
picture_list: [],
|
||||
// picture_list:[
|
||||
// {
|
||||
// url:'https://mahuaimage.oss-cn-qingdao.aliyuncs.com/mini_app/video/6151925930ce307d3e76d552c946236e07918c526dc0d.jpg'
|
||||
// },
|
||||
// {
|
||||
// url:'https://mahuaimage.oss-cn-qingdao.aliyuncs.com/mini_app/video/6151924d6e398e1590603cd713bc3750f90be18d2c2fd.jpg'
|
||||
// },
|
||||
// ],
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
http("/api/v1/share-picture-list", "get", {
|
||||
abb_id: options.abb_id
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
picture_list: res.picture_list
|
||||
})
|
||||
})
|
||||
},
|
||||
previewMedia(e) {
|
||||
wx.previewMedia({
|
||||
sources: this.data.picture_list,
|
||||
current: e.currentTarget.dataset.index
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText":"分享剧照"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<view class="stage_photo">
|
||||
<view class="no" wx:if="{{picture_list.length<=0}}">暂无数据</view>
|
||||
<view class="stage_list">
|
||||
<view class="image" wx:for="{{picture_list}}">
|
||||
<image src="{{item.url}}" data-index="{{index}}" bindtap="previewMedia"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,24 @@
|
||||
/* pages/opera/stage/stage_photo.wxss */
|
||||
.no{
|
||||
text-align: center;
|
||||
line-height: 300rpx;
|
||||
}
|
||||
.stage_photo{
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.stage_list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content:space-between;
|
||||
}
|
||||
.stage_list .image{
|
||||
border-radius: 8rpx;
|
||||
width: 330rpx;
|
||||
height: 240rpx;
|
||||
margin: 0rpx 10rpx 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
Loading…
Reference in new issue