千家信息网

微信小程序怎么实现仿电影网站页面效果

发表于:2024-10-25 作者:千家信息网编辑
千家信息网最后更新 2024年10月25日,这篇"微信小程序怎么实现仿电影网站页面效果"文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这
千家信息网最后更新 2024年10月25日微信小程序怎么实现仿电影网站页面效果

这篇"微信小程序怎么实现仿电影网站页面效果"文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇"微信小程序怎么实现仿电影网站页面效果"文章吧。

微信小程序仿猫眼

实现效果图:

movie.js

Page({  data: {    movies:null,    scrollTop : 0,    scrollHeight:0  },  onLoad: function (options) {    // 生命周期函数--监听页面加载     // 这里要非常注意,微信的scroll-view必须要设置高度才能监听滚动事件,所以,需要在页面的onLoad事件中给scroll-view的高度赋值    var that = this;    wx.getSystemInfo({     success:function(res){       console.info(res.windowHeight);       that.setData({         scrollHeight:res.windowHeight       });     }   });   that.getAllMovies();  },  getAllMovies() {    let thispage=this;    //展示 加载框    wx.showToast({      title: '加载中',      icon: 'loading',      duration: 10000    })    //网络请求数据    wx.request({     url: 'http://m.maoyan.com/movie/list.json?type=hot&offset=0&limit=1000',     method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT     header: {'content-type':'json'}, // 设置请求的 header     success: function(res){      // success      let obj=res.data.data.movies;      //将获取到的数据设置到 page 中的movies上      thispage.setData({movies:obj});      //隐藏加载框      wx.hideToast();      //停止刷新      wx.stopPullDownRefresh();     },     fail: function() {      // fail     },     complete: function() {      // complete     }    })  },  //点击事件  itemClick(event){      },  //刷新  onPullDownRefresh: function () {  this.getAllMovies(); },})

movie.json

{  "enablePullDownRefresh": true}

movie.wxml

  深圳                     {{item.nm}}    <text class="threeD" wx:if='{{item["3d"]}}'>3D</text>    <text class="iMax" wx:if='{{item["imax"]}}'>IMAX</text>    <text class="score" wx:if="{{item.preSale !=1}}">{{item.sc}}<text style='font-size:11px'>分</text>    </text>    <text class="wish" wx:else>{{item.wish}}<text style='font-size:11px'>人想看</text>    </text>          {{item.cat}}          {{item.star}}          {{item.showInfo}}      购买   预售   

movie.wxss

page{ background-color: #f2f2f2;}.top { background-color: #f2f2f2; display: flex;}.top_text { margin-left: 15px; font-size: 15px; padding: 20px 0;}.top_input { border-radius: 10rpx; text-align: center; padding: 4px; font-size: 15px; flex: 1; margin: 10px 20px 10px 10px; background-color: #fff;}.item { background-color: #FFFFFF; position:relative; padding: 10px; display: flex; border-width:1px; border-bottom-style: solid; border-color: #ccc;}.item_press { background-color: #F0F0F0;}.pic image { margin-right: 10px; width: 70px; height: 100px;}.detail{  flex: 1;  display: flex;  flex-direction: column;}.detail title{  margin-top: 5px;  color: #222222;  flex: 1;  font-size: 16px;}.threeD{  border-radius: 2px;  padding: 3px;  background-color: #8bb7ce;  font-size: 10px;  color: white;}.iMax{  border-style:solid;  border-width:1px;  margin-left: -2px;  border-top-right-radius: 2px;  border-bottom-right-radius: 2px;  font-size: 10px;  color: #8bb7ce;  padding: 2px;}.score,.wish{  float:right;  color: orange;  margin-right: 15px;}.type,.star{  color: #666666;  font-size: 13px;  overflow:hidden;  white-space: nowrap;  text-overflow:ellipsis;  width: 210px;  flex: 1;}.showinfo{  color: #999999;  font-size: 13px;  flex: 1;}.buy{  padding: 8px;  border-radius: 5px;  font-size: 13px;  color: #FFFFFF;  background-color: #ee4137;  float: right;  position: absolute;  right: 10px;  top:52px;}

以上就是关于"微信小程序怎么实现仿电影网站页面效果"这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注行业资讯频道。

页面 内容 效果 程序 电影 电影网站 网站 事件 数据 文章 知识 篇文章 高度 监听 价值 函数 周期 周期函数 大部分 就是 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 服务器错误170000 厦门帮下互联网科技有限公司 迪哥闯世界服务器系列 云服务器租用服务 平度管理系统软件开发哪家靠谱 网络安全小剧本小学生 人机三位一体网络安全 中国cad制图软件开发公司 服务器装了新硬盘识别不了 pe破解服务器密码 身份认证属于网络安全服务吗 经信局网络安全工作总结 大连梓泉互联网科技有限公司 冒险岛怎么加入服务器 山西标准软件开发批发 医疗质量控制管理信息数据库 电商网络技术深度解析 上海软件开发平均薪资 巨杉数据库和飞腾互认证 数据库分类记忆法 网络安全法自什么开始实施 阿里云的数据库名称在哪里看 修改数据库字段所有数据 苏州戴尔服务器代理认证 海南品质软件开发服务价钱 消费类电子产品软件开发 大二下转网络安全宣传周 全国网络安全系统名字 图像处理软件开发程序架构 2022网络安全主题班会教案
0