diff --git a/app.json b/app.json index 05fc1e1..6bcb296 100644 --- a/app.json +++ b/app.json @@ -33,7 +33,8 @@ "pages/user/wallet/code_exchange/code_exchange", "pages/user/viewer_list/viewer_list", "pages/index/calendar/calendar", - "pages/index/city/selectcity" + "pages/index/city/selectcity", + "pages/opera/stage/stage_photo" ], "usingComponents": { "van-icon": "@vant/weapp/icon/index", diff --git a/config.js b/config.js index 050532d..3f7df27 100644 --- a/config.js +++ b/config.js @@ -136,8 +136,10 @@ const router_list = [ { id: 34, router_name: "pages/index/city/selectcity" - - + }, + { + id: 35, + router_name: "pages/opera/stage/stage_photo" }, ] module.exports = { diff --git a/pages/index/search/search.js b/pages/index/search/search.js index 5f30368..4095b08 100644 --- a/pages/index/search/search.js +++ b/pages/index/search/search.js @@ -89,7 +89,7 @@ Page({ nav(e) { wx.navigateTo({ - url: '/pages/opera/IP_detail/IP_detail?abb_id=' + e.currentTarget.dataset.abb_id + url: '/pages/opera/IP_detail/IP_detail?=' + e.currentTarget.dataset.abb_id }) }, nav1(e) { diff --git a/pages/opera/show/show_detail.js b/pages/opera/show/show_detail.js index ef3d092..c4c7b30 100644 --- a/pages/opera/show/show_detail.js +++ b/pages/opera/show/show_detail.js @@ -21,20 +21,20 @@ Page({ var that = this; let video = that.data.show_detail.wonderful_list; for (var i in video) { - var index_video = 'video_' + i; - var videoContextPrev = wx.createVideoContext(index_video); - if (current_video != index_video) { - // 暂停其他的 - videoContextPrev.pause(); - } + var index_video = 'video_' + i; + var videoContextPrev = wx.createVideoContext(index_video); + if (current_video != index_video) { + // 暂停其他的 + videoContextPrev.pause(); + } } -}, -previewMedia(e) { - wx.previewMedia({ - sources: this.data.show_detail.wonderful_list, - current: e.currentTarget.dataset.index - }) -}, + }, + previewMedia(e) { + wx.previewMedia({ + sources: this.data.show_detail.wonderful_list, + current: e.currentTarget.dataset.index + }) + }, roll_spread() { this.setData({ rolled: !this.data.rolled @@ -73,36 +73,37 @@ previewMedia(e) { }, _like() { if (login_check()) { - let status - let follow =false - if('undefined' !== typeof(this.data.show_detail.is_follow)) - { + let status + let follow = false + if ('undefined' !== typeof (this.data.show_detail.is_follow)) { follow = this.data.show_detail.is_follow } let abb_id = this.data.show_detail.abb_id - if(follow){ - status=0 - }else if(!follow){ - status=1 + if (follow) { + status = 0 + } else if (!follow) { + status = 1 } http("/api/v1/follow", "get", { abb_id, status }).then(res => { - if( status == 1){ + if (status == 1) { wx.showToast({ - icon:'success', - title:'已添加到想看的演出列表', + icon: 'success', + title: '已添加到想看的演出列表', duration: 2000 - })}else if( status == 0){ - wx.showToast({ - icon:'success', - title:'已取消想看', - duration: 2000 - })} - let show_detail =this.data.show_detail - show_detail.is_follow=!show_detail.is_follow - this.setData({show_detail}) + }) + } else if (status == 0) { + wx.showToast({ + icon: 'success', + title: '已取消想看', + duration: 2000 + }) + } + let show_detail = this.data.show_detail + show_detail.is_follow = !show_detail.is_follow + this.setData({ show_detail }) }) } @@ -124,7 +125,7 @@ previewMedia(e) { latitude: e.currentTarget.dataset.latitude, longitude: e.currentTarget.dataset.longitude, name: this.data.show_detail.theater_name, - address:this.data.show_detail.traffic_info + address: this.data.show_detail.traffic_info }) } else { wx.showToast({ @@ -135,12 +136,19 @@ previewMedia(e) { } }, - tabcoupon(e){ - let url=e.currentTarget.dataset.router + tabcoupon(e) { + let url = e.currentTarget.dataset.router wx.navigateTo({ url }) }, + stage_click() { + let { abb_id } = this.data.Xshow_detail + wx.navigateTo({ + url: '/pages/opera/stage/stage_photo?abb_id='+abb_id, + }) + + }, /** * 生命周期函数--监听页面加载 */ @@ -162,6 +170,7 @@ previewMedia(e) { Xshow_detail: res.show_detail }) }) + if (cycle_id) { http("/api/v1/show-detail", "get", { cycle_id @@ -171,6 +180,7 @@ previewMedia(e) { suggest_show: res.suggest_show }) }) + } else { wx.showToast({ title: '未传入轮次id', @@ -179,6 +189,7 @@ previewMedia(e) { }) } + }, swith_tab: function (e) { @@ -199,20 +210,21 @@ previewMedia(e) { let windowHeight = this.data.windowHeight let arr let a - let query = wx.createSelectorQuery() - for(var i = 0 ; i < 4 ; i ++){ - query.select('#nav'+i).boundingClientRect() + let query = wx.createSelectorQuery() + for (var i = 0; i < 4; i++) { + query.select('#nav' + i).boundingClientRect() } - query.exec((res) => { - arr=[res[0].top,res[1].top,res[2].top,res[3].top] - for(var i = 0 ; i<4 ;i++){ - if(arr[i]<20){ - a=i - } - } - if(a){ -this.setData({swith_area:a})} - }) + query.exec((res) => { + arr = [res[0].top, res[1].top, res[2].top, res[3].top] + for (var i = 0; i < 4; i++) { + if (arr[i] < 20) { + a = i + } + } + if (a) { + this.setData({ swith_area: a }) + } + }) if (ev.scrollTop > windowHeight) { this.setData({ nav_show: true @@ -257,7 +269,7 @@ this.setData({swith_area:a})} * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { - + wx.stopPullDownRefresh() }, diff --git a/pages/opera/show/show_detail.wxml b/pages/opera/show/show_detail.wxml index 5a88498..8357f48 100644 --- a/pages/opera/show/show_detail.wxml +++ b/pages/opera/show/show_detail.wxml @@ -34,7 +34,9 @@ - + @@ -61,11 +63,12 @@ - + - + 查看更多 + @@ -117,12 +120,12 @@ - + + + - - diff --git a/pages/opera/show/show_detail.wxss b/pages/opera/show/show_detail.wxss index 46062b9..470c914 100644 --- a/pages/opera/show/show_detail.wxss +++ b/pages/opera/show/show_detail.wxss @@ -158,7 +158,14 @@ height: 360rpx; margin: 0 10rpx; } - +.more { + width: 540rpx; + height: 360rpx; + text-align: center; + line-height: 360rpx; + border: 1px solid #CCC; + border-radius: 8rpx; +} ._block .img1 { margin: 0 auto 0 30rpx; display: flex; @@ -173,7 +180,7 @@ ._block .roll { text-align: center; - margin: 20rpx 0; + padding: 20rpx 0; font-size: 24rpx; color: #1394F2; } diff --git a/pages/opera/stage/stage_photo.js b/pages/opera/stage/stage_photo.js new file mode 100644 index 0000000..3499eb6 --- /dev/null +++ b/pages/opera/stage/stage_photo.js @@ -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 () { + + } +}) \ No newline at end of file diff --git a/pages/opera/stage/stage_photo.json b/pages/opera/stage/stage_photo.json new file mode 100644 index 0000000..88430b8 --- /dev/null +++ b/pages/opera/stage/stage_photo.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText":"分享剧照" +} \ No newline at end of file diff --git a/pages/opera/stage/stage_photo.wxml b/pages/opera/stage/stage_photo.wxml new file mode 100644 index 0000000..569419c --- /dev/null +++ b/pages/opera/stage/stage_photo.wxml @@ -0,0 +1,8 @@ + + 暂无数据 + + + + + + \ No newline at end of file diff --git a/pages/opera/stage/stage_photo.wxss b/pages/opera/stage/stage_photo.wxss new file mode 100644 index 0000000..7cdce84 --- /dev/null +++ b/pages/opera/stage/stage_photo.wxss @@ -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%; +} \ No newline at end of file