• <center id="sm46c"></center>
  • <dfn id="sm46c"></dfn>
  • <strike id="sm46c"></strike>
  • <cite id="sm46c"><source id="sm46c"></source></cite>
    • <strike id="sm46c"><source id="sm46c"></source></strike>
      <option id="sm46c"></option>
      国产精品天天看天天狠,女高中生强奷系列在线播放,久久无码免费的a毛片大全,国产日韩综合av在线,亚洲国产中文综合专区在,特殊重囗味sm在线观看无码,中文字幕一区二区三区四区在线,无码任你躁久久久久久老妇蜜桃

      微信小程序?qū)崿F(xiàn)倒計時,蘋果手機不顯示

      2018-8-30    seo達人

      如果您想訂閱本博客內(nèi)容,每天自動發(fā)到您的郵箱中, 請點這里

      JS頁面代碼段:

      
          
      1. const app = getApp()
      2. let goodsList = [
      3. { actEndTime: '2018-07-21 21:00:34' },
      4. { actEndTime: '2028-07-17 21:00:37' },
      5. { actEndTime: '2018-09-21 05:00:59' },
      6. { actEndTime: '2018-08-19 07:00:48' },
      7. { actEndTime: '2018-08-28 03:00:11' }
      8. ]
      9. Page({
      10. data: {
      11. countDownList: [],
      12. actEndTimeList: []
      13. },
      14. onLoad: function () {
      15. let endTimeList = [];
      16. // 將活動的結(jié)束時間參數(shù)提成一個單獨的數(shù)組,方便操作
      17. goodsList.forEach(o => { endTimeList.push(o.actEndTime) })
      18. this.setData({ actEndTimeList: endTimeList });
      19. // 執(zhí)行倒計時函數(shù)
      20. this.countDown();
      21. },
      22. //當時間小于兩位數(shù)時十位數(shù)補零。
      23. timeFormat: function (param) {//小于10的格式化函數(shù)
      24. return param < 10 ? '0' + param : param;
      25. },
      26. //倒計時函數(shù)
      27. countDown: function () {
      28. // 獲取當前時間,同時得到活動結(jié)束時間數(shù)組
      29. let newTime = new Date().getTime();//當前時間
      30. let endTimeList = this.data.actEndTimeList;//結(jié)束時間的數(shù)組集合
      31. let countDownArr = [];//初始化倒計時數(shù)組
      32. // 對結(jié)束時間進行處理渲染到頁面
      33. endTimeList.forEach(o => {
      34. let endTime = new Date(o).getTime();
      35. let obj = null;
      36. // 如果活動未結(jié)束,對時間進行處理
      37. if (endTime - newTime > 0) {
      38. let time = (endTime - newTime) / 1000;
      39. // 獲取天、時、分、秒
      40. let day = parseInt(time / (60 * 60 * 24));
      41. let hou = parseInt(time % (60 * 60 * 24) / 3600);
      42. let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
      43. let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
      44. obj = {
      45. day: this.timeFormat(day),
      46. hou: this.timeFormat(hou),
      47. min: this.timeFormat(min),
      48. sec: this.timeFormat(sec)
      49. }
      50. } else {//活動已結(jié)束,全部設(shè)置為'00'
      51. obj = {
      52. day: '00',
      53. hou: '00',
      54. min: '00',
      55. sec: '00'
      56. }
      57. }
      58. countDownArr.push(obj);
      59. })
      60. //每隔一秒執(zhí)行一次倒計時函數(shù), 渲染
      61. this.setData({ countDownList: countDownArr })
      62. setTimeout(this.countDown, 1000);
      63. }
      64. })

      wxml頁面代碼段

      
          
      1. <view class='tui-countdown-content' wx:for="{{countDownList}}" wx:key="countDownList">
      2. 距結(jié)束
      3. <text class='tui-conutdown-box'>{{item.day}}</text>天
      4. <text class='tui-conutdown-box'>{{item.hou}}</text>時
      5. <text class='tui-conutdown-box'>{{item.min}}</text>分
      6. <text class='tui-conutdown-box tui-countdown-bg'>{{item.sec}}</text>秒
      7. </view>

       

      wxss頁面代碼段

      
          
      1. page{
      2. background: #f5f5f5;
      3. }
      4. .tui-countdown-content{
      5. height: 50px;
      6. line-height: 50px;
      7. text-align: center;
      8. background-color: #fff;
      9. margin-top: 15px;
      10. padding: 0 15px;
      11. font-size: 18px;
      12. }
      13. .tui-conutdown-box{
      14. display: inline-block;
      15. height: 26px;
      16. width: 26px;
      17. line-height: 26px;
      18. text-align: center;
      19. background:#ccc;
      20. color: #000;
      21. margin: 0 5px;
      22. }
      23. .tui-countdown-bg{
      24. background: red;
      25. color: #fff;
      26. }
      27. .container{
      28. width: 100%;
      29. display: flex;
      30. justify-content: center;
      31. }
      32. .backView{
      33. width:690rpx;
      34. background: #fff;
      35. display: flex;
      36. flex-direction: column;
      37. margin-bottom: 30rpx;
      38. }
      39. .createDate
      40. {
      41. background: #f5f5f5;
      42. padding:15rpx 15rpx 10rpx 15rpx;
      43. line-height: 50rpx;
      44. font-size: 28rpx;
      45. color: gainsboro;
      46. text-align: center;
      47. }
      48. .backViewitem1{
      49. display: flex;
      50. flex-direction: row;
      51. height: 55rpx;
      52. align-items: center;
      53. padding:8rpx 40rpx;
      54. border-bottom: 2rpx solid #f5f5f5;
      55. }
      56. .ico
      57. {
      58. width:35rpx;
      59. height:35rpx;
      60. }
      61. .name
      62. {
      63. color: #c13176;
      64. margin-left: 20rpx;
      65. font-size: 28rpx;
      66. }
      67. .details
      68. {
      69. font-size:24rpx;
      70. letter-spacing: 2rpx;
      71. }
      72. .backViewitem2{
      73. display: flex;
      74. flex-direction: row;
      75. line-height: 35rpx;
      76. min-height: 70rpx;
      77. padding: 15rpx 40rpx 10rpx 40rpx;
      78. border-bottom: 2rpx solid #f5f5f5;
      79. }
      80. .details1
      81. {
      82. color:#888;
      83. font-size:23rpx;
      84. letter-spacing: 2rpx;
      85. }

       藍藍設(shè)計www.li-bodun.cn )是一家專注而深入的界面設(shè)計公司,為期望卓越的國內(nèi)外企業(yè)提供卓越的UI界面設(shè)計、BS界面設(shè)計 、 cs界面設(shè)計 、 ipad界面設(shè)計 、 包裝設(shè)計 、 圖標定制 、 用戶體驗 、交互設(shè)計、 網(wǎng)站建設(shè) 平面設(shè)計服務(wù)

      日歷

      鏈接

      個人資料

      藍藍設(shè)計的小編 http://www.li-bodun.cn

      存檔

      主站蜘蛛池模板: 国产欧美另类久久精品蜜芽| 国产日产精品久久久久久| 四川丰满少妇无套内谢| 性夜夜春夜夜爽aa片a| √天堂资源在线中文8在线最新版| 国产精品人妇一区二区三区| 福利一区二区三区视频在线观看 | 九九久久国产精品大片| 人妻无码中文字幕免费视频蜜桃| 欧美黄片在线看| 色噜噜亚洲精品中文字幕| 亚洲国产AV无码一区二区三区| 亚洲欧洲精品a片久久99| 一级有乳奶水毛片免费| 熟妇丰满多毛的大隂户| AV网站中文| 韩国深夜福利视频在线观看| 仁寿县| 99久久精品费精品国产| 亚洲中文字幕无码久久精品1 | 五月天国产成人AV免费观看| 亚洲成年网站| a亚洲视频| 精品一区二区不卡无码av| 少妇又爽又刺激视频| 中文字幕肉感巨大的乳专区| 日韩人妻精品中文字幕| 在线看一级无码毛片| 无码av中文一区二区三区| 中文字幕日韩有码一区| 日韩无码视频网站| 中文无码乱人伦中文视频在线| 小荡货奶真大水真多紧视频| 国产午夜精华无码网站| 民勤县| 国产中文三级全黄| 日韩精品卡1卡2日韩在线| 中文字幕人妻精品在线| 亚洲乱人伦中文字幕无码| 免费无码又爽又刺激激情视频| 午夜性色一区二区三区不卡视频 |