首页 > 小程序教程 > 微信小程序红色优惠券使用状态列表页设计制作开发教程

微信小程序红色优惠券使用状态列表页设计制作开发教程

上一篇 下一篇
本文给大家带来的是微信小程序红色优惠券使用状态列表页设计制作开发教程,制作好以后效果图如下:
一、wxml页面代码如下:
<!--couponNousedMember.wxml-->

<view class="top">
  <view class="noused"> 
      未使用 <text class="count">2</text> 
  </view>
  <view class="used">
        已使用 <text class="count">1</text>
  </view>
  <view class="expire">
        已过期 <text class="count">1</text>
  </view>
</view>

<view class="coupon">
  <block wx:for="{{coupon}}">
     <view class="outwrap">
        <view class="left8">
          <image mode="scaleToFill" src="../../images/member/notusedback.png" class="back"></image>
          <view class="word">
                <text class="coupon-name">{{item.name}}</text>
                <text class="coupon-during">{{item.during}}</text>
          </view>
        </view>
        <view class="right2">
          <image src="../../images/member/111.png" mode="aspectFit" class="img"></image>
        </view>
      </view> 
  </block>

</view>



 
二、wxss样式文件代码如下:
/* couponNousedMember.wxss */
.top{
background-color:#ffffff;
font-weight: bold;
display:flex;
justify-content:center;

}
.noused{
padding:20px 30px;
width:33.3%;
color: #f82f4a;
border-bottom: 1px solid #f82f4a;
}
.count{

}
.used{
width:33.3%;
padding:20px 30px;
color: #828282;
border-bottom: 1px solid #828282;

}
.expire{
  width:33.3%;
padding:20px 30px;
color: #828282;
border-bottom: 1px solid #828282;
}
.coupon{
padding:20px;

}
.outwrap{
background-color:#ffffff;
display:flex;
flex-flow:row wrap;
border-radius: 5px;
margin-bottom:10px;



}
.left8{
width:80%;
position:relative;
overflow:hidden;



}
.right2{
width:20%;
display:table-cell;
vertical-align:middle;
text-align:center;
text-align: center;



}
.img{

width:50px;
height:60px;





}
.word{
  position: absolute;
  z-index: 2;
color:#ffffff;
display:flex;
flex-flow:column wrap;
text-align:center;
width:100%;
height:100%;
padding:10px 0;

}
.coupon-name{
font-size:18px;

 

}
.coupon-during{
margin-top:8px;
font-size:12px;

}
.back{
height:100%;
width:100%;
z-index:1;
position: absolute;


}
三、js页面代码如下:
// couponNousedMember.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
      coupon:[
        { "name": "¥10-订单优惠券", "during": "2017-06-31-2017-07-31" },
        { "name": "¥20-订单优惠券", "during": "2017-06-31-2017-07-31" },
      ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})

模板简介:该模板名称为【微信小程序红色优惠券使用状态列表页设计制作开发教程】,大小是,文档格式为.,推荐使用打开,作品中的图片,文字等数据均可修改,图片请在作品中选中图片替换即可,文字修改直接点击文字修改即可,您也可以新增或修改作品中的内容,该模板来自用户分享,如有侵权行为请联系网站客服处理。欢迎来懒人模板【小程序教程】栏目查找您需要的精美模板。

相关搜索
  • 下载密码 lanrenmb
  • 下载次数 25,199次
  • 使用软件
  • 文件格式
  • 文件大小
  • 上传时间 08-10
  • 作者 网友投稿
  • 肖像权 人物画像及字体仅供参考
栏目分类 更多 >
热门推荐 更多 >
自适应 企业网站 响应式 微信文章 单页式简历模板 微信公众平台 html5 微信图片 微信素材 微信模板
您可能会喜欢的其他模板