123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- // pages/movie/movie.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- guochan: {},
- zongyi: {},
- meiju: {}
- },
- //跳转
- goListPage(event) {
- let _id = event.currentTarget.dataset.id
- wx.navigateTo({
- url: '/pages/list/list?id=' + _id,
- })
- },
- //获取国产热播剧
- getGuochan() {
- wx.request({
- url: 'https://m.douban.com/rexxar/api/v2/subject_collection/tv_domestic/items?start=0&count=8',
- success: (res) => {
- console.log(res.data)
- this.setData({
- guochan: res.data
- })
- }
- })
- },
- //获取综艺节目
- getZongyi() {
- wx.request({
- url: 'https://m.douban.com/rexxar/api/v2/subject_collection/tv_variety_show/items?start=0&count=8',
- success: (res) => {
- console.log(res.data)
- this.setData({
- zongyi: res.data
- })
- }
- })
- },
- //获取美剧
- getMeiju() {
- wx.request({
- url: 'https://m.douban.com/rexxar/api/v2/subject_collection/tv_american/items?start=0&count=8',
- success: (res) => {
- this.setData({
- meiju: res.data
- })
- }
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- this.getGuochan()
- this.getZongyi()
- this.getMeiju()
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- console.log(111)
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|