y595705120 il y a 3 ans
commit
d39b92f3d9
100 fichiers modifiés avec 4216 ajouts et 0 suppressions
  1. 1 0
      .gitignore
  2. 145 0
      app.js
  3. 35 0
      app.json
  4. 218 0
      app.wxss
  5. BIN
      assets/carousel/1.jpg
  6. BIN
      assets/carousel/2.jpg
  7. BIN
      assets/carousel/3.jpg
  8. 16 0
      assets/css/select.wxss
  9. 56 0
      assets/css/style.wxss
  10. BIN
      assets/img_close.png
  11. BIN
      assets/img_gallery.png
  12. BIN
      assets/img_info.png
  13. BIN
      assets/img_share.png
  14. BIN
      assets/loading.gif
  15. BIN
      assets/tabBar/exam-select.png
  16. BIN
      assets/tabBar/exam.png
  17. BIN
      assets/tabBar/index-select.png
  18. BIN
      assets/tabBar/index.png
  19. BIN
      assets/tabBar/my-select.png
  20. BIN
      assets/tabBar/my.png
  21. BIN
      assets/tabBar/record-select.png
  22. BIN
      assets/tabBar/record.png
  23. BIN
      assets/tabBar/study-select.png
  24. BIN
      assets/tabBar/study.png
  25. 2 0
      component/calendar/iconfont/iconfont.wxss
  26. 2287 0
      component/calendar/index.js
  27. 3 0
      component/calendar/index.json
  28. 82 0
      component/calendar/index.wxml
  29. 204 0
      component/calendar/index.wxss
  30. 2 0
      component/calendar/theme/iconfont.wxss
  31. 52 0
      component/calendar/theme/theme-default.wxss
  32. 49 0
      component/calendar/theme/theme-elegant.wxss
  33. 47 0
      component/iView/action-sheet/index.js
  34. 8 0
      component/iView/action-sheet/index.json
  35. 23 0
      component/iView/action-sheet/index.wxml
  36. 1 0
      component/iView/action-sheet/index.wxss
  37. 37 0
      component/iView/alert/index.js
  38. 7 0
      component/iView/alert/index.json
  39. 15 0
      component/iView/alert/index.wxml
  40. 1 0
      component/iView/alert/index.wxss
  41. 20 0
      component/iView/avatar/index.js
  42. 3 0
      component/iView/avatar/index.json
  43. 4 0
      component/iView/avatar/index.wxml
  44. 1 0
      component/iView/avatar/index.wxss
  45. 29 0
      component/iView/badge/index.js
  46. 3 0
      component/iView/badge/index.json
  47. 5 0
      component/iView/badge/index.wxml
  48. 1 0
      component/iView/badge/index.wxss
  49. 37 0
      component/iView/base/index.js
  50. 80 0
      component/iView/button/index.js
  51. 3 0
      component/iView/button/index.json
  52. 20 0
      component/iView/button/index.wxml
  53. 1 0
      component/iView/button/index.wxss
  54. 26 0
      component/iView/card/index.js
  55. 3 0
      component/iView/card/index.json
  56. 11 0
      component/iView/card/index.wxml
  57. 84 0
      component/iView/card/index.wxss
  58. 33 0
      component/iView/cell-group/index.js
  59. 3 0
      component/iView/cell-group/index.json
  60. 3 0
      component/iView/cell-group/index.wxml
  61. 86 0
      component/iView/cell/index.js
  62. 3 0
      component/iView/cell/index.json
  63. 16 0
      component/iView/cell/index.wxml
  64. 1 0
      component/iView/cell/index.wxss
  65. 38 0
      component/iView/checkbox-group/index.js
  66. 7 0
      component/iView/checkbox-group/index.json
  67. 3 0
      component/iView/checkbox-group/index.wxml
  68. 0 0
      component/iView/checkbox-group/index.wxss
  69. 56 0
      component/iView/checkbox/index.js
  70. 7 0
      component/iView/checkbox/index.json
  71. 8 0
      component/iView/checkbox/index.wxml
  72. 1 0
      component/iView/checkbox/index.wxss
  73. 20 0
      component/iView/col/index.js
  74. 3 0
      component/iView/col/index.json
  75. 1 0
      component/iView/col/index.wxml
  76. 0 0
      component/iView/col/index.wxss
  77. 46 0
      component/iView/collapse-item/index.js
  78. 7 0
      component/iView/collapse-item/index.json
  79. 9 0
      component/iView/collapse-item/index.wxml
  80. 1 0
      component/iView/collapse-item/index.wxss
  81. 31 0
      component/iView/collapse/index.js
  82. 3 0
      component/iView/collapse/index.json
  83. 4 0
      component/iView/collapse/index.wxml
  84. 0 0
      component/iView/collapse/index.wxss
  85. 90 0
      component/iView/count-down/index.js
  86. 4 0
      component/iView/count-down/index.json
  87. 4 0
      component/iView/count-down/index.wxml
  88. 0 0
      component/iView/count-down/index.wxss
  89. 25 0
      component/iView/divider/index.js
  90. 3 0
      component/iView/divider/index.json
  91. 19 0
      component/iView/divider/index.wxml
  92. 1 0
      component/iView/divider/index.wxss
  93. 33 0
      component/iView/drawer/index.js
  94. 3 0
      component/iView/drawer/index.json
  95. 6 0
      component/iView/drawer/index.wxml
  96. 1 0
      component/iView/drawer/index.wxss
  97. 10 0
      component/iView/grid-icon/index.js
  98. 3 0
      component/iView/grid-icon/index.json
  99. 1 0
      component/iView/grid-icon/index.wxml
  100. 1 0
      component/iView/grid-icon/index.wxss

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/push.bat

+ 145 - 0
app.js

@@ -0,0 +1,145 @@
+const { $Message} = require('/component/iView/base/index');
+const md5 = require('./utils/md5.js');
+const secret = "117c0743819088468e590246464cc75e"
+const {baseUrl, showMsg} = require("./utils/util.js");
+const util = require('./utils/util.js');
+
+App({
+  globalData: {
+    pageSize: 10,
+    userInfo: {},
+    departments: [],
+    studyInfo: {},
+  },
+  onLaunch: function () {
+    this.autoUpgrade()
+  },
+  autoUpgrade: function () {
+    if (wx.canIUse('getUpdateManager')) {
+      const updateManager = wx.getUpdateManager()
+      updateManager.onCheckForUpdate(function (res) {
+        // 请求完新版本信息的回调
+        if (res.hasUpdate) {
+          console.log('res.hasUpdate====')
+          updateManager.onUpdateReady(function () {
+            wx.showModal({
+              title: '更新提示',
+              content: '新版本已经准备好,是否重启应用?',
+              success: function (res) {
+                console.log('success====', res)
+                if (res.confirm) {
+                  updateManager.applyUpdate()
+                }
+              }
+            })
+          })
+          updateManager.onUpdateFailed(function () {
+            // 新的版本下载失败
+            wx.showModal({
+              title: '已经有新版本了哟~',
+              content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
+            })
+          })
+        }
+      })
+    }
+  },
+  gotoLogin: function(){
+    console.log("gologin")
+    wx.navigateTo({
+      url: `/pages/user/identify/index`,
+    })
+  },
+  checkLogin: function (cb) {
+    let userInfo = this.globalData.userInfo
+    if( userInfo && userInfo.uid ){
+      cb && cb( userInfo)
+      return;
+    }
+    let _this = this
+    let openid = wx.getStorageSync('@openid');
+    if( !openid ) return cb && cb({code:401});
+    let param = {"openid": openid};
+    _this.formPost('Auth.wxLogin', param).then( res =>{
+      if (res.code == 200) {
+        _this.setUserInfo(res.data);
+        cb && cb(res.data);
+      }else{
+        return cb && cb({code:401});
+      }
+    })
+  },
+  message: function (content, type) {
+    $Message({
+      content: content,
+      type: type
+    });
+  },
+  formPost: function (action, data) {
+    let _this = this
+    let userInfo = this.globalData.userInfo||{}
+    let user_id = userInfo.uid||0;
+    let token = userInfo.token||'';
+    let timestamp = Date.now()
+    action = action.toLowerCase()
+    let signstr = `weixin_${token}_${action}_${timestamp}_${secret}`
+    let signsure = md5.md5(signstr).toLowerCase()
+    let headers = {
+      'Content-Type': 'application/json',
+      'x-signsure': signsure,
+      'x-timestamp': timestamp,
+      'x-userId': user_id
+    }
+    return new Promise(function (resolve, reject) {
+      wx.showNavigationBarLoading();
+      wx.request({
+        url: `${baseUrl}weixin/${action}`,
+        header: headers,
+        method: 'POST',
+        data,
+        success(res) {
+          if (res.statusCode !== 200 || typeof res.data !== 'object') {
+            reject('网络出错')
+            return false;
+          }
+          if(res.data.code != 200 && res.data.code != 401){
+            util.showMsg(res.data.msg )
+          }
+          if(  res.data.code == 401  &&  action.indexOf( "auth.") == -1  ){
+            _this.gotoLogin()
+            return
+          }
+          resolve(res.data);
+          return true;
+        },
+        fail(res) {
+          reject(res.msg)
+          return false;
+        },
+        complete(res) {
+          wx.hideNavigationBarLoading();
+        }
+      })
+    })
+  },
+  getSystemInfo(  cb ){
+    wx.getSystemInfo({
+      success: function(res) {
+        cb &&cb( res.system )
+      }
+    })
+  },
+  checkNavigateTo: function(url){
+    let openid = wx.getStorageSync('@openid');
+    if( !openid ) return this.gotoLogin()
+    wx.navigateTo({url})
+  },
+  setUserInfo: function (info) {
+    let {token, user} = info
+    console.log("setUserInfo", token, user)
+    this.globalData.userInfo = user;
+    wx.setStorageSync('@token', token)
+    wx.setStorageSync('@userId', user.userId )
+    this.loadDepartments()
+  }
+})

+ 35 - 0
app.json

@@ -0,0 +1,35 @@
+{
+  "pages": [
+    "pages/rili/index",
+    "pages/index/index",
+    "pages/user/index/index"
+    
+  ],
+  "tabBar": {
+    "color": "#6e6d6b",
+    "selectedColor": "#ff9966",
+    "borderStyle": "black",
+    "backgroundColor": "#ffffff",
+    "list": [
+      {
+        "pagePath": "pages/rili/index",
+        "text": "日历",
+        "iconPath": "/assets/tabBar/record.png",
+        "selectedIconPath": "/assets/tabBar/record-select.png"
+      },
+      {
+        "pagePath": "pages/user/index/index",
+        "text": "我的",
+        "iconPath": "/assets/tabBar/my.png",
+        "selectedIconPath": "/assets/tabBar/my-select.png"
+      }
+    ]
+  },
+  "window": {
+    "navigationBarBackgroundColor": "#ffffff",
+    "navigationBarTitleText": "莅临&外出",
+    "navigationBarTextStyle": "black",
+    "backgroundTextStyle": "dark"
+  },
+  "sitemapLocation": "sitemap.json"
+}

+ 218 - 0
app.wxss

@@ -0,0 +1,218 @@
+/**app.wxss**/
+@import '/component/iView/button/index.wxss';
+@import '/component/iView/radio/index.wxss';
+@import '/component/iView/input/index.wxss';
+@import '/assets/css/style.wxss';
+@import '/assets/css/select.wxss';
+page {
+  /* Color 可以自定义相关配色 *//* 标准色 */
+  --red: #e54d42;
+  --orange: #f37b1d;
+  --yellow: #fbbd08;
+  --olive: #8dc63f;
+  --green: #39b54a;
+  --cyan: #1cbbb4;
+  --blue: #0081ff;
+  --purple: #6739b6;
+  --mauve: #9c26b0;
+  --pink: #e03997;
+  --brown: #a5673f;
+  --grey: #8799a3;
+  --black: #333;
+  --darkGray: #666;
+  --gray: #aaa;
+  --ghostWhite: #f1f1f1;
+  --white: #fff;
+  /* 浅色 */
+  --redLight: #fadbd9;
+  --orangeLight: #fde6d2;
+  --yellowLight: #fef2ce;
+  --oliveLight: #e8f4d9;
+  --greenLight: #d7f0db;
+  --cyanLight: #d2f1f0;
+  --blueLight: #cce6ff;
+  --purpleLight: #e1d7f0;
+  --mauveLight: #ebd4ef;
+  --pinkLight: #f9d7ea;
+  --brownLight: #ede1d9;
+  --greyLight: #e7ebed;
+  /* 渐变色 */
+  --gradualRed: linear-gradient(45deg, #f43f3b, #ec008c);
+  --gradualOrange: linear-gradient(45deg, #ff9700, #ed1c24);
+  --gradualGreen: linear-gradient(45deg, #39b54a, #8dc63f);
+  --gradualPurple: linear-gradient(45deg, #9000ff, #5e00ff);
+  --gradualPink: linear-gradient(45deg, #ec008c, #6739b6);
+  --gradualBlue: linear-gradient(45deg, #0081ff, #1cbbb4);
+  /* 阴影透明色 */
+  --ShadowSize: 6rpx 6rpx 8rpx;
+  --redShadow: rgba(204, 69, 59, 0.2);
+  --orangeShadow: rgba(217, 109, 26, 0.2);
+  --yellowShadow: rgba(224, 170, 7, 0.2);
+  --oliveShadow: rgba(124, 173, 55, 0.2);
+  --greenShadow: rgba(48, 156, 63, 0.2);
+  --cyanShadow: rgba(28, 187, 180, 0.2);
+  --blueShadow: rgba(0, 102, 204, 0.2);
+  --purpleShadow: rgba(88, 48, 156, 0.2);
+  --mauveShadow: rgba(133, 33, 150, 0.2);
+  --pinkShadow: rgba(199, 50, 134, 0.2);
+  --brownShadow: rgba(140, 88, 53, 0.2);
+  --greyShadow: rgba(114, 130, 138, 0.2);
+  --grayShadow: rgba(114, 130, 138, 0.2);
+  --blackShadow: rgba(26, 26, 26, 0.2);
+  background-color: var(--ghostWhite);
+  font-size: 28rpx;
+  color: var(--black);
+  font-family: Helvetica Neue, Helvetica, sans-serif;
+}
+
+.container {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  padding: 200rpx 0;
+  box-sizing: border-box;
+}
+
+.student-page {
+  background: white;
+}
+
+.student-page button {
+  height: 30px;
+  line-height: 30px;
+  margin-top: 7px;
+}
+
+.gapfilling-span {
+  color: red;
+  padding: 0px 30px;
+  margin: 0px 5px;
+  border-bottom: 3px double red;
+}
+
+.ueditor-p {
+  display: inline !important;
+}
+
+.exam-hidden {
+  display: none;
+}
+
+.exam-pick-input{
+  height: 30px;
+}
+.radio-answer {
+  line-height: 60rpx;
+  margin-top:16rpx;
+}
+.checkbox-answer{
+  margin-top:16rpx;
+  line-height: 60rpx;
+}
+.fs30{font-size: 30rpx;}
+.fs40{font-size: 40rpx;}
+.fs50{font-size: 50rpx;}
+.fs60{font-size: 60rpx;}
+
+
+.ml20{margin-left: 20rpx;}
+.ml40{margin-left: 40rpx;}
+.ml50{margin-left: 50rpx;}
+
+.mt5{margin-top: 5rpx;}
+.mt10{margin-top: 10rpx;}
+.mt20{margin-top: 20rpx;}
+.mt30{margin-top: 30rpx;}
+.mt40{margin-top: 40rpx;}
+.mt50{margin-top: 50rpx;}
+.mt120{margin-top: 120rpx;}
+.tc{text-align: center;}
+.tl{text-align: left;}
+.tr{text-align: right;}
+
+.fl{float: left;}
+.fr{float: right;}
+.pt20{ padding-top: 20rpx;}
+.pt30{ padding-top: 30rpx;}
+
+.p10{ padding:10rpx;}
+.p20{ padding:20rpx;}
+.p30{ padding:30rpx;}
+
+.m10{ margin:10rpx;}
+.m20{ margin:20rpx;}
+.m30{ margin:30rpx;}
+
+
+.cu-tabbar-height {
+  min-height: 100rpx;
+  height: calc(100rpx + env(safe-area-inset-bottom) / 2);
+}
+
+.bg-white{ background:var(--white); }
+
+
+
+.cate-section {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-justify-content: space-around;
+      -ms-flex-pack: distribute;
+          justify-content: space-around;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  -webkit-flex-wrap: wrap;
+      -ms-flex-wrap: wrap;
+          flex-wrap: wrap;
+  padding: 30rpx 22rpx;
+  background: #fff;
+  /* 原图标颜色太深,不想改图了,所以加了透明度 */
+}
+.cate-section .cate-item {
+    display: -webkit-box;
+    display: -webkit-flex;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-orient: vertical;
+    -webkit-box-direction: normal;
+    -webkit-flex-direction: column;
+        -ms-flex-direction: column;
+            flex-direction: column;
+    -webkit-box-align: center;
+    -webkit-align-items: center;
+        -ms-flex-align: center;
+            align-items: center;
+    font-size: 26rpx;
+    background: #fff;
+    color: #5d626b;
+}
+.cate-section image {
+  width: 60rpx;
+  height: 60rpx;
+  margin-bottom: 14rpx;
+  border-radius: 10%;
+  opacity: .7;
+  -webkit-box-shadow: 4rpx 4rpx 20rpx rgba(250, 67, 106, 0.3);
+          box-shadow: 4rpx 4rpx 20rpx rgba(250, 67, 106, 0.3);
+}
+
+button::after {
+  border: none
+}
+.cate-item-3{
+  width:33.33%;
+  height:160rpx;
+  margin-top:40rpx
+}
+
+.cate-item-4{
+  width:25%;
+  height:160rpx;
+  margin-top:40rpx
+}

BIN
assets/carousel/1.jpg


BIN
assets/carousel/2.jpg


BIN
assets/carousel/3.jpg


+ 16 - 0
assets/css/select.wxss

@@ -0,0 +1,16 @@
+checkbox {
+  margin:10rpx;
+  height: auto;
+  /* font-size:16rpx; */
+}
+/*checkbox 选项框大小  */
+checkbox .wx-checkbox-input {
+  width: 40rpx;
+  height: 40rpx;
+  flex: none;
+}
+.radio .wx-radio-input{
+  width: 40rpx;
+  height: 40rpx;
+  flex: none;
+}

+ 56 - 0
assets/css/style.wxss

@@ -0,0 +1,56 @@
+.f-header {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -webkit-align-items: center;
+      -ms-flex-align: center;
+          align-items: center;
+  height: 120rpx;
+  padding: 6rpx 30rpx 8rpx;
+  background: #fff;
+}
+.f-header image {
+    -webkit-flex-shrink: 0;
+        -ms-flex-negative: 0;
+            flex-shrink: 0;
+    width: 80rpx;
+    height: 80rpx;
+    margin-right: 20rpx;
+}
+.f-header .tit-box {
+    -webkit-box-flex: 1;
+    -webkit-flex: 1;
+        -ms-flex: 1;
+            flex: 1;
+    display: -webkit-box;
+    display: -webkit-flex;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-orient: vertical;
+    -webkit-box-direction: normal;
+    -webkit-flex-direction: column;
+        -ms-flex-direction: column;
+            flex-direction: column;
+}
+.f-header .tit {
+    font-size: 34rpx;
+    line-height: 1.3;
+}
+.f-header .tit2 {
+    font-size: 24rpx;
+    color: #909399;
+}
+.f-header .icon-you {
+    font-size: 34rpx;
+    color: #909399;
+}
+
+.bline{
+    border: 1px dashed #ccc;
+}
+
+.btline{
+    border-top: 1px dashed #ccc;
+}

BIN
assets/img_close.png


BIN
assets/img_gallery.png


BIN
assets/img_info.png


BIN
assets/img_share.png


BIN
assets/loading.gif


BIN
assets/tabBar/exam-select.png


BIN
assets/tabBar/exam.png


BIN
assets/tabBar/index-select.png


BIN
assets/tabBar/index.png


BIN
assets/tabBar/my-select.png


BIN
assets/tabBar/my.png


BIN
assets/tabBar/record-select.png


BIN
assets/tabBar/record.png


BIN
assets/tabBar/study-select.png


BIN
assets/tabBar/study.png


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
component/calendar/iconfont/iconfont.wxss


+ 2287 - 0
component/calendar/index.js

@@ -0,0 +1,2287 @@
+!(function(e) {
+  var t = {};
+  function a(n) {
+    if (t[n]) return t[n].exports;
+    var s = (t[n] = { i: n, l: !1, exports: {} });
+    return e[n].call(s.exports, s, s.exports, a), (s.l = !0), s.exports;
+  }
+  (a.m = e),
+    (a.c = t),
+    (a.d = function(e, t, n) {
+      a.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n });
+    }),
+    (a.r = function(e) {
+      'undefined' != typeof Symbol &&
+        Symbol.toStringTag &&
+        Object.defineProperty(e, Symbol.toStringTag, { value: 'Module' }),
+        Object.defineProperty(e, '__esModule', { value: !0 });
+    }),
+    (a.t = function(e, t) {
+      if ((1 & t && (e = a(e)), 8 & t)) return e;
+      if (4 & t && 'object' == typeof e && e && e.__esModule) return e;
+      var n = Object.create(null);
+      if (
+        (a.r(n),
+        Object.defineProperty(n, 'default', { enumerable: !0, value: e }),
+        2 & t && 'string' != typeof e)
+      )
+        for (var s in e)
+          a.d(
+            n,
+            s,
+            function(t) {
+              return e[t];
+            }.bind(null, s)
+          );
+      return n;
+    }),
+    (a.n = function(e) {
+      var t =
+        e && e.__esModule
+          ? function() {
+              return e.default;
+            }
+          : function() {
+              return e;
+            };
+      return a.d(t, 'a', t), t;
+    }),
+    (a.o = function(e, t) {
+      return Object.prototype.hasOwnProperty.call(e, t);
+    }),
+    (a.p = ''),
+    a((a.s = 7));
+})([
+  function(e, t, a) {
+    'use strict';
+    let n;
+    function s() {
+      return n || (n = wx.getSystemInfoSync());
+    }
+    Object.defineProperty(t, '__esModule', { value: !0 }),
+      (t.getSystemInfo = s),
+      (t.isComponent = function(e) {
+        return (
+          e &&
+          void 0 !== e.__wxExparserNodeId__ &&
+          'function' == typeof e.setData
+        );
+      }),
+      (t.isIos = c),
+      (t.getCurrentPage = l),
+      (t.getComponent = function(e) {
+        const t = new r();
+        let a = l() || {};
+        if (a.selectComponent && 'function' == typeof a.selectComponent) {
+          if (e) return a.selectComponent(e);
+          t.warn('请传入组件ID');
+        } else t.warn('该基础库暂不支持多个小程序日历组件');
+      }),
+      (t.uniqueArrayByDate = function(e = []) {
+        let t = {},
+          a = [];
+        e.forEach(e => {
+          t[`${e.year}-${e.month}-${e.day}`] = e;
+        });
+        for (let e in t) a.push(t[e]);
+        return a;
+      }),
+      (t.delRepeatedEnableDay = function(e = [], t = []) {
+        let a, n;
+        if (2 === t.length) {
+          const { startTimestamp: e, endTimestamp: s } = b(t);
+          (a = e), (n = s);
+        }
+        return d(e).filter(e => e < a || e > n);
+      }),
+      (t.convertEnableAreaToTimestamp = b),
+      (t.converEnableDaysToTimestamp = d),
+      (t.initialTasks = t.GetDate = t.Slide = t.Logger = void 0);
+    class r {
+      info(e) {
+        console.log(
+          '%cInfo: %c' + e,
+          'color:#FF0080;font-weight:bold',
+          'color: #FF509B'
+        );
+      }
+      warn(e) {
+        console.log(
+          '%cWarn: %c' + e,
+          'color:#FF6600;font-weight:bold',
+          'color: #FF9933'
+        );
+      }
+      tips(e) {
+        console.log(
+          '%cTips: %c' + e,
+          'color:#00B200;font-weight:bold',
+          'color: #00CC33'
+        );
+      }
+    }
+    t.Logger = r;
+    t.Slide = class {
+      isUp(e = {}, t = {}) {
+        const { startX: a, startY: n } = e,
+          s = t.clientX - a;
+        return (
+          t.clientY - n < -60 &&
+          s < 20 &&
+          s > -20 &&
+          ((this.slideLock = !1), !0)
+        );
+      }
+      isDown(e = {}, t = {}) {
+        const { startX: a, startY: n } = e,
+          s = t.clientX - a;
+        return t.clientY - n > 60 && s < 20 && s > -20;
+      }
+      isLeft(e = {}, t = {}) {
+        const { startX: a, startY: n } = e,
+          s = t.clientX - a,
+          r = t.clientY - n;
+        return s < -60 && r < 20 && r > -20;
+      }
+      isRight(e = {}, t = {}) {
+        const { startX: a, startY: n } = e,
+          s = t.clientX - a,
+          r = t.clientY - n;
+        return s > 60 && r < 20 && r > -20;
+      }
+    };
+    class o {
+      newDate(e, t, a) {
+        let n = `${+e}-${+t}-${+a}`;
+        return c() && (n = `${+e}/${+t}/${+a}`), new Date(n);
+      }
+      thisMonthDays(e, t) {
+        return new Date(Date.UTC(e, t, 0)).getUTCDate();
+      }
+      firstDayOfWeek(e, t) {
+        return new Date(Date.UTC(e, t - 1, 1)).getUTCDay();
+      }
+      dayOfWeek(e, t, a) {
+        return new Date(Date.UTC(e, t - 1, a)).getUTCDay();
+      }
+      todayDate() {
+        const e = new Date();
+        return {
+          year: e.getFullYear(),
+          month: e.getMonth() + 1,
+          date: e.getDate()
+        };
+      }
+      todayTimestamp() {
+        const { year: e, month: t, date: a } = this.todayDate();
+        return this.newDate(e, t, a).getTime();
+      }
+    }
+    function c() {
+      const e = s();
+      return /iphone|ios/i.test(e.platform);
+    }
+    function l() {
+      const e = getCurrentPages();
+      return e[e.length - 1];
+    }
+    function b(e = []) {
+      const t = new o(),
+        a = e[0].split('-'),
+        n = e[1].split('-'),
+        s = new r();
+      return 3 !== a.length || 3 !== n.length
+        ? (s.warn('enableArea() 参数格式为: ["2018-2-1", "2018-3-1"]'), {})
+        : {
+            start: a,
+            end: n,
+            startTimestamp: t.newDate(a[0], a[1], a[2]).getTime(),
+            endTimestamp: t.newDate(n[0], n[1], n[2]).getTime()
+          };
+    }
+    function d(e = []) {
+      const t = new r(),
+        a = new o(),
+        n = [];
+      return (
+        e.forEach(e => {
+          if ('string' != typeof e)
+            return t.warn('enableDays()入参日期格式错误');
+          const s = e.split('-');
+          if (3 !== s.length) return t.warn('enableDays()入参日期格式错误');
+          const r = a.newDate(s[0], s[1], s[2]).getTime();
+          n.push(r);
+        }),
+        n
+      );
+    }
+    t.GetDate = o;
+    t.initialTasks = { flag: 'finished', tasks: [] };
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    var n = class {
+      constructor(e) {
+        this.Component = e;
+      }
+      getData(e) {
+        const t = this.Component.data;
+        if (!e) return t;
+        if (e.includes('.')) {
+          return e.split('.').reduce((e, t) => e[t], t);
+        }
+        return this.Component.data[e];
+      }
+      setData(e, t = () => {}) {
+        e && 'object' == typeof e && this.Component.setData(e, t);
+      }
+    };
+    t.default = n;
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    const n = {
+        lunarInfo: [
+          19416,
+          19168,
+          42352,
+          21717,
+          53856,
+          55632,
+          91476,
+          22176,
+          39632,
+          21970,
+          19168,
+          42422,
+          42192,
+          53840,
+          119381,
+          46400,
+          54944,
+          44450,
+          38320,
+          84343,
+          18800,
+          42160,
+          46261,
+          27216,
+          27968,
+          109396,
+          11104,
+          38256,
+          21234,
+          18800,
+          25958,
+          54432,
+          59984,
+          28309,
+          23248,
+          11104,
+          100067,
+          37600,
+          116951,
+          51536,
+          54432,
+          120998,
+          46416,
+          22176,
+          107956,
+          9680,
+          37584,
+          53938,
+          43344,
+          46423,
+          27808,
+          46416,
+          86869,
+          19872,
+          42416,
+          83315,
+          21168,
+          43432,
+          59728,
+          27296,
+          44710,
+          43856,
+          19296,
+          43748,
+          42352,
+          21088,
+          62051,
+          55632,
+          23383,
+          22176,
+          38608,
+          19925,
+          19152,
+          42192,
+          54484,
+          53840,
+          54616,
+          46400,
+          46752,
+          103846,
+          38320,
+          18864,
+          43380,
+          42160,
+          45690,
+          27216,
+          27968,
+          44870,
+          43872,
+          38256,
+          19189,
+          18800,
+          25776,
+          29859,
+          59984,
+          27480,
+          21952,
+          43872,
+          38613,
+          37600,
+          51552,
+          55636,
+          54432,
+          55888,
+          30034,
+          22176,
+          43959,
+          9680,
+          37584,
+          51893,
+          43344,
+          46240,
+          47780,
+          44368,
+          21977,
+          19360,
+          42416,
+          86390,
+          21168,
+          43312,
+          31060,
+          27296,
+          44368,
+          23378,
+          19296,
+          42726,
+          42208,
+          53856,
+          60005,
+          54576,
+          23200,
+          30371,
+          38608,
+          19195,
+          19152,
+          42192,
+          118966,
+          53840,
+          54560,
+          56645,
+          46496,
+          22224,
+          21938,
+          18864,
+          42359,
+          42160,
+          43600,
+          111189,
+          27936,
+          44448,
+          84835,
+          37744,
+          18936,
+          18800,
+          25776,
+          92326,
+          59984,
+          27424,
+          108228,
+          43744,
+          41696,
+          53987,
+          51552,
+          54615,
+          54432,
+          55888,
+          23893,
+          22176,
+          42704,
+          21972,
+          21200,
+          43448,
+          43344,
+          46240,
+          46758,
+          44368,
+          21920,
+          43940,
+          42416,
+          21168,
+          45683,
+          26928,
+          29495,
+          27296,
+          44368,
+          84821,
+          19296,
+          42352,
+          21732,
+          53600,
+          59752,
+          54560,
+          55968,
+          92838,
+          22224,
+          19168,
+          43476,
+          41680,
+          53584,
+          62034,
+          54560
+        ],
+        solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+        Gan: ['甲', '乙', '丙', '丁', '戊', '己', '庚', '辛', '壬', '癸'],
+        Zhi: [
+          '子',
+          '丑',
+          '寅',
+          '卯',
+          '辰',
+          '巳',
+          '午',
+          '未',
+          '申',
+          '酉',
+          '戌',
+          '亥'
+        ],
+        Animals: [
+          '鼠',
+          '牛',
+          '虎',
+          '兔',
+          '龙',
+          '蛇',
+          '马',
+          '羊',
+          '猴',
+          '鸡',
+          '狗',
+          '猪'
+        ],
+        solarTerm: [
+          '小寒',
+          '大寒',
+          '立春',
+          '雨水',
+          '惊蛰',
+          '春分',
+          '清明',
+          '谷雨',
+          '立夏',
+          '小满',
+          '芒种',
+          '夏至',
+          '小暑',
+          '大暑',
+          '立秋',
+          '处暑',
+          '白露',
+          '秋分',
+          '寒露',
+          '霜降',
+          '立冬',
+          '小雪',
+          '大雪',
+          '冬至'
+        ],
+        sTermInfo: [
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c3598082c95f8c965cc920f',
+          '97bd0b06bdb0722c965ce1cfcc920f',
+          'b027097bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c359801ec95f8c965cc920f',
+          '97bd0b06bdb0722c965ce1cfcc920f',
+          'b027097bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c359801ec95f8c965cc920f',
+          '97bd0b06bdb0722c965ce1cfcc920f',
+          'b027097bd097c36b0b6fc9274c91aa',
+          '9778397bd19801ec9210c965cc920e',
+          '97b6b97bd19801ec95f8c965cc920f',
+          '97bd09801d98082c95f8e1cfcc920f',
+          '97bd097bd097c36b0b6fc9210c8dc2',
+          '9778397bd197c36c9210c9274c91aa',
+          '97b6b97bd19801ec95f8c965cc920e',
+          '97bd09801d98082c95f8e1cfcc920f',
+          '97bd097bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36c9210c9274c91aa',
+          '97b6b97bd19801ec95f8c965cc920e',
+          '97bcf97c3598082c95f8e1cfcc920f',
+          '97bd097bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36c9210c9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c3598082c95f8c965cc920f',
+          '97bd097bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c3598082c95f8c965cc920f',
+          '97bd097bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c359801ec95f8c965cc920f',
+          '97bd097bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c359801ec95f8c965cc920f',
+          '97bd097bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf97c359801ec95f8c965cc920f',
+          '97bd097bd07f595b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9210c8dc2',
+          '9778397bd19801ec9210c9274c920e',
+          '97b6b97bd19801ec95f8c965cc920f',
+          '97bd07f5307f595b0b0bc920fb0722',
+          '7f0e397bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36c9210c9274c920e',
+          '97b6b97bd19801ec95f8c965cc920f',
+          '97bd07f5307f595b0b0bc920fb0722',
+          '7f0e397bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36c9210c9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bd07f1487f595b0b0bc920fb0722',
+          '7f0e397bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf7f1487f595b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf7f1487f595b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf7f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c965cc920e',
+          '97bcf7f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b97bd19801ec9210c9274c920e',
+          '97bcf7f0e47f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '9778397bd097c36b0b6fc9210c91aa',
+          '97b6b97bd197c36c9210c9274c920e',
+          '97bcf7f0e47f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '9778397bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36c9210c9274c920e',
+          '97b6b7f0e47f531b0723b0b6fb0722',
+          '7f0e37f5307f595b0b0bc920fb0722',
+          '7f0e397bd097c36b0b6fc9210c8dc2',
+          '9778397bd097c36b0b70c9274c91aa',
+          '97b6b7f0e47f531b0723b0b6fb0721',
+          '7f0e37f1487f595b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc9210c8dc2',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f595b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '9778397bd097c36b0b6fc9274c91aa',
+          '97b6b7f0e47f531b0723b0787b0721',
+          '7f0e27f0e47f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '9778397bd097c36b0b6fc9210c91aa',
+          '97b6b7f0e47f149b0723b0787b0721',
+          '7f0e27f0e47f531b0723b0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '9778397bd097c36b0b6fc9210c8dc2',
+          '977837f0e37f149b0723b0787b0721',
+          '7f07e7f0e47f531b0723b0b6fb0722',
+          '7f0e37f5307f595b0b0bc920fb0722',
+          '7f0e397bd097c35b0b6fc9210c8dc2',
+          '977837f0e37f14998082b0787b0721',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e37f1487f595b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc9210c8dc2',
+          '977837f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '977837f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd097c35b0b6fc920fb0722',
+          '977837f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '977837f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '977837f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f149b0723b0787b0721',
+          '7f0e27f0e47f531b0b0bb0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '977837f0e37f14998082b0723b06bd',
+          '7f07e7f0e37f149b0723b0787b0721',
+          '7f0e27f0e47f531b0723b0b6fb0722',
+          '7f0e397bd07f595b0b0bc920fb0722',
+          '977837f0e37f14898082b0723b02d5',
+          '7ec967f0e37f14998082b0787b0721',
+          '7f07e7f0e47f531b0723b0b6fb0722',
+          '7f0e37f1487f595b0b0bb0b6fb0722',
+          '7f0e37f0e37f14898082b0723b02d5',
+          '7ec967f0e37f14998082b0787b0721',
+          '7f07e7f0e47f531b0723b0b6fb0722',
+          '7f0e37f1487f531b0b0bb0b6fb0722',
+          '7f0e37f0e37f14898082b0723b02d5',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e37f1487f531b0b0bb0b6fb0722',
+          '7f0e37f0e37f14898082b072297c35',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e37f0e37f14898082b072297c35',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e37f0e366aa89801eb072297c35',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f149b0723b0787b0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722',
+          '7f0e37f0e366aa89801eb072297c35',
+          '7ec967f0e37f14998082b0723b06bd',
+          '7f07e7f0e47f149b0723b0787b0721',
+          '7f0e27f0e47f531b0723b0b6fb0722',
+          '7f0e37f0e366aa89801eb072297c35',
+          '7ec967f0e37f14998082b0723b06bd',
+          '7f07e7f0e37f14998083b0787b0721',
+          '7f0e27f0e47f531b0723b0b6fb0722',
+          '7f0e37f0e366aa89801eb072297c35',
+          '7ec967f0e37f14898082b0723b02d5',
+          '7f07e7f0e37f14998082b0787b0721',
+          '7f07e7f0e47f531b0723b0b6fb0722',
+          '7f0e36665b66aa89801e9808297c35',
+          '665f67f0e37f14898082b0723b02d5',
+          '7ec967f0e37f14998082b0787b0721',
+          '7f07e7f0e47f531b0723b0b6fb0722',
+          '7f0e36665b66a449801e9808297c35',
+          '665f67f0e37f14898082b0723b02d5',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e36665b66a449801e9808297c35',
+          '665f67f0e37f14898082b072297c35',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e26665b66a449801e9808297c35',
+          '665f67f0e37f1489801eb072297c35',
+          '7ec967f0e37f14998082b0787b06bd',
+          '7f07e7f0e47f531b0723b0b6fb0721',
+          '7f0e27f1487f531b0b0bb0b6fb0722'
+        ],
+        nStr1: [
+          '日',
+          '一',
+          '二',
+          '三',
+          '四',
+          '五',
+          '六',
+          '七',
+          '八',
+          '九',
+          '十'
+        ],
+        nStr2: ['初', '十', '廿', '卅'],
+        nStr3: [
+          '正',
+          '二',
+          '三',
+          '四',
+          '五',
+          '六',
+          '七',
+          '八',
+          '九',
+          '十',
+          '冬',
+          '腊'
+        ],
+        lYearDays: function(e) {
+          let t,
+            a = 348;
+          for (t = 32768; t > 8; t >>= 1)
+            a += n.lunarInfo[e - 1900] & t ? 1 : 0;
+          return a + n.leapDays(e);
+        },
+        leapMonth: function(e) {
+          return 15 & n.lunarInfo[e - 1900];
+        },
+        leapDays: function(e) {
+          return n.leapMonth(e) ? (65536 & n.lunarInfo[e - 1900] ? 30 : 29) : 0;
+        },
+        monthDays: function(e, t) {
+          return t > 12 || t < 1
+            ? -1
+            : n.lunarInfo[e - 1900] & (65536 >> t)
+            ? 30
+            : 29;
+        },
+        solarDays: function(e, t) {
+          if (t > 12 || t < 1) return -1;
+          const a = t - 1;
+          return 1 == +a
+            ? (e % 4 == 0 && e % 100 != 0) || e % 400 == 0
+              ? 29
+              : 28
+            : n.solarMonth[a];
+        },
+        toGanZhiYear: function(e) {
+          let t = (e - 3) % 10,
+            a = (e - 3) % 12;
+          return (
+            0 == +t && (t = 10),
+            0 == +a && (a = 12),
+            n.Gan[t - 1] + n.Zhi[a - 1]
+          );
+        },
+        toAstro: function(e, t) {
+          return (
+            '魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯'.substr(
+              2 * e -
+                (t < [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22][e - 1]
+                  ? 2
+                  : 0),
+              2
+            ) + '座'
+          );
+        },
+        toGanZhi: function(e) {
+          return n.Gan[e % 10] + n.Zhi[e % 12];
+        },
+        getTerm: function(e, t) {
+          if (e < 1900 || e > 2100) return -1;
+          if (t < 1 || t > 24) return -1;
+          const a = n.sTermInfo[e - 1900],
+            s = [
+              parseInt('0x' + a.substr(0, 5)).toString(),
+              parseInt('0x' + a.substr(5, 5)).toString(),
+              parseInt('0x' + a.substr(10, 5)).toString(),
+              parseInt('0x' + a.substr(15, 5)).toString(),
+              parseInt('0x' + a.substr(20, 5)).toString(),
+              parseInt('0x' + a.substr(25, 5)).toString()
+            ],
+            r = [
+              s[0].substr(0, 1),
+              s[0].substr(1, 2),
+              s[0].substr(3, 1),
+              s[0].substr(4, 2),
+              s[1].substr(0, 1),
+              s[1].substr(1, 2),
+              s[1].substr(3, 1),
+              s[1].substr(4, 2),
+              s[2].substr(0, 1),
+              s[2].substr(1, 2),
+              s[2].substr(3, 1),
+              s[2].substr(4, 2),
+              s[3].substr(0, 1),
+              s[3].substr(1, 2),
+              s[3].substr(3, 1),
+              s[3].substr(4, 2),
+              s[4].substr(0, 1),
+              s[4].substr(1, 2),
+              s[4].substr(3, 1),
+              s[4].substr(4, 2),
+              s[5].substr(0, 1),
+              s[5].substr(1, 2),
+              s[5].substr(3, 1),
+              s[5].substr(4, 2)
+            ];
+          return parseInt(r[t - 1]);
+        },
+        toChinaMonth: function(e) {
+          if (e > 12 || e < 1) return -1;
+          let t = n.nStr3[e - 1];
+          return (t += '月');
+        },
+        toChinaDay: function(e) {
+          let t;
+          switch (e) {
+            case 10:
+              t = '初十';
+              break;
+            case 20:
+              t = '二十';
+              break;
+            case 30:
+              t = '三十';
+              break;
+            default:
+              (t = n.nStr2[Math.floor(e / 10)]), (t += n.nStr1[e % 10]);
+          }
+          return t;
+        },
+        getAnimal: function(e) {
+          return n.Animals[(e - 4) % 12];
+        },
+        solar2lunar: function(e, t, a) {
+          if (e < 1900 || e > 2100) return -1;
+          if (1900 == +e && 1 == +t && +a < 31) return -1;
+          let s,
+            r,
+            o = 0,
+            c = 0;
+          (e = (s = e
+            ? new Date(e, parseInt(t) - 1, a)
+            : new Date()).getFullYear()),
+            (t = s.getMonth() + 1),
+            (a = s.getDate());
+          let l =
+            (Date.UTC(s.getFullYear(), s.getMonth(), s.getDate()) -
+              Date.UTC(1900, 0, 31)) /
+            864e5;
+          for (r = 1900; r < 2101 && l > 0; r++) l -= c = n.lYearDays(r);
+          l < 0 && ((l += c), r--);
+          const b = new Date();
+          let d = !1;
+          b.getFullYear() === +e &&
+            b.getMonth() + 1 === +t &&
+            b.getDate() === +a &&
+            (d = !0);
+          let f = s.getDay();
+          const i = n.nStr1[f];
+          0 == +f && (f = 7);
+          const h = r;
+          o = n.leapMonth(r);
+          let u = !1;
+          for (r = 1; r < 13 && l > 0; r++)
+            o > 0 && r === o + 1 && !1 === u
+              ? (--r, (u = !0), (c = n.leapDays(h)))
+              : (c = n.monthDays(h, r)),
+              !0 === u && r === o + 1 && (u = !1),
+              (l -= c);
+          0 === l && o > 0 && r === o + 1 && (u ? (u = !1) : ((u = !0), --r)),
+            l < 0 && ((l += c), --r);
+          const y = r,
+            m = l + 1,
+            D = t - 1,
+            g = n.toGanZhiYear(h),
+            p = n.getTerm(e, 2 * t - 1),
+            w = n.getTerm(e, 2 * t);
+          let C = n.toGanZhi(12 * (e - 1900) + t + 11);
+          a >= p && (C = n.toGanZhi(12 * (e - 1900) + t + 12));
+          let T = !1,
+            M = null;
+          +p === a && ((T = !0), (M = n.solarTerm[2 * t - 2])),
+            +w === a && ((T = !0), (M = n.solarTerm[2 * t - 1]));
+          const k = Date.UTC(e, D, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10,
+            _ = n.toGanZhi(k + a - 1),
+            L = n.toAstro(t, a);
+          return {
+            lYear: h,
+            lMonth: y,
+            lDay: m,
+            Animal: n.getAnimal(h),
+            IMonthCn: (u ? '闰' : '') + n.toChinaMonth(y),
+            IDayCn: n.toChinaDay(m),
+            cYear: e,
+            cMonth: t,
+            cDay: a,
+            gzYear: g,
+            gzMonth: C,
+            gzDay: _,
+            isToday: d,
+            isLeap: u,
+            nWeek: f,
+            ncWeek: '星期' + i,
+            isTerm: T,
+            Term: M,
+            astro: L
+          };
+        },
+        lunar2solar: function(e, t, a, s) {
+          s = !!s;
+          const r = n.leapMonth(e);
+          if (s && r !== t) return -1;
+          if (
+            (2100 == +e && 12 == +t && +a > 1) ||
+            (1900 == +e && 1 == +t && +a < 31)
+          )
+            return -1;
+          const o = n.monthDays(e, t);
+          let c = o;
+          if ((s && (c = n.leapDays(e, t)), e < 1900 || e > 2100 || a > c))
+            return -1;
+          let l = 0;
+          for (let t = 1900; t < e; t++) l += n.lYearDays(t);
+          let b = 0,
+            d = !1;
+          for (let a = 1; a < t; a++)
+            (b = n.leapMonth(e)),
+              d || (b <= a && b > 0 && ((l += n.leapDays(e)), (d = !0))),
+              (l += n.monthDays(e, a));
+          s && (l += o);
+          const f = Date.UTC(1900, 1, 30, 0, 0, 0),
+            i = new Date(864e5 * (l + a - 31) + f),
+            h = i.getUTCFullYear(),
+            u = i.getUTCMonth() + 1,
+            y = i.getUTCDate();
+          return n.solar2lunar(h, u, y);
+        }
+      },
+      {
+        Gan: s,
+        Zhi: r,
+        nStr1: o,
+        nStr2: c,
+        nStr3: l,
+        Animals: b,
+        solarTerm: d,
+        lunarInfo: f,
+        sTermInfo: i,
+        solarMonth: h,
+        ...u
+      } = n;
+    var y = u;
+    t.default = y;
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    class n {
+      constructor(e) {
+        this.Component = e;
+      }
+      getCalendarConfig() {
+        return this.Component && this.Component.config
+          ? this.Component.config
+          : {};
+      }
+      setCalendarConfig(e, t) {
+        this.Component &&
+          this.Component.config &&
+          (this.Component.config[e] = t);
+      }
+    }
+    t.default = e => new n(e);
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    var n = l(a(1)),
+      s = l(a(5)),
+      r = l(a(3)),
+      o = l(a(2)),
+      c = a(0);
+    function l(e) {
+      return e && e.__esModule ? e : { default: e };
+    }
+    const b = new c.GetDate(),
+      d = new c.Logger();
+    class f extends n.default {
+      constructor(e) {
+        super(e),
+          (this.Component = e),
+          (this.getCalendarConfig = (0, r.default)(
+            this.Component
+          ).getCalendarConfig);
+      }
+      switchWeek(e, t) {
+        return new Promise((a, n) => {
+          if ((0, r.default)(this.Component).getCalendarConfig().multi)
+            return d.warn('多选模式不能切换周月视图');
+          const { selectedDay: o = [], curYear: c, curMonth: l } = this.getData(
+            'calendar'
+          );
+          if (!o.length) return this.__tipsWhenCanNotSwtich();
+          const b = o[0];
+          if ('week' === e) {
+            if (this.Component.weekMode) return;
+            const e = t || b,
+              { year: s, month: r } = e;
+            if (c !== s || l !== r) return this.__tipsWhenCanNotSwtich();
+            (this.Component.weekMode = !0),
+              this.setData({ 'calendar.weekMode': !0 }),
+              this.jump(e)
+                .then(a)
+                .catch(n);
+          } else
+            (this.Component.weekMode = !1),
+              this.setData({ 'calendar.weekMode': !1 }),
+              (0, s.default)(this.Component)
+                .renderCalendar(c, l, t)
+                .then(a)
+                .catch(n);
+        });
+      }
+      updateCurrYearAndMonth(e) {
+        let { days: t, curYear: a, curMonth: n } = this.getData('calendar');
+        const { month: s } = t[0],
+          { month: r } = t[t.length - 1],
+          o = b.thisMonthDays(a, n),
+          c = t[t.length - 1],
+          l = t[0];
+        return (
+          (c.day + 7 > o || (n === s && s !== r)) && 'next' === e
+            ? (n += 1) > 12 && ((a += 1), (n = 1))
+            : (+l.day <= 7 || (n === r && s !== r)) &&
+              'prev' === e &&
+              (n -= 1) <= 0 &&
+              ((a -= 1), (n = 12)),
+          { Uyear: a, Umonth: n }
+        );
+      }
+      calculateLastDay() {
+        const { days: e, curYear: t, curMonth: a } = this.getData('calendar');
+        return {
+          lastDayInThisWeek: e[e.length - 1].day,
+          lastDayInThisMonth: b.thisMonthDays(t, a)
+        };
+      }
+      calculateFirstDay() {
+        const { days: e } = this.getData('calendar');
+        return { firstDayInThisWeek: e[0].day };
+      }
+      firstWeekInMonth(e, t, a) {
+        let n = b.dayOfWeek(e, t, 1);
+        const [, r] = [0, 7 - n];
+        let o = this.getData('calendar.days') || [];
+        return (
+          this.Component.weekMode &&
+            (o = (0, s.default)(this.Component).buildDate(e, t)),
+          o.slice(0, a ? r + 1 : r)
+        );
+      }
+      lastWeekInMonth(e, t, a) {
+        const n = b.thisMonthDays(e, t),
+          r = b.dayOfWeek(e, t, n),
+          [o, c] = [n - r, n];
+        let l = this.getData('calendar.days') || [];
+        return (
+          this.Component.weekMode &&
+            (l = (0, s.default)(this.Component).buildDate(e, t)),
+          l.slice(a ? o : o - 1, c)
+        );
+      }
+      initSelectedDay(e) {
+        const t = [...e],
+          {
+            selectedDay: a = [],
+            todoLabels: n = [],
+            showLabelAlways: s
+          } = this.getData('calendar'),
+          r = a.map(e => `${+e.year}-${+e.month}-${+e.day}`),
+          c = n.map(e => `${+e.year}-${+e.month}-${+e.day}`),
+          l = this.getCalendarConfig();
+        return (
+          t.forEach(e => {
+            r.includes(`${+e.year}-${+e.month}-${+e.day}`)
+              ? (e.choosed = !0)
+              : (e.choosed = !1);
+            const t = c.indexOf(`${+e.year}-${+e.month}-${+e.day}`);
+            if (-1 !== t) {
+              e.showTodoLabel = !!s || !e.choosed;
+              const a = n[t] || {};
+              e.showTodoLabel && a.todoText && (e.todoText = a.todoText);
+            }
+            if (
+              (l.showLunar &&
+                (e.lunar = o.default.solar2lunar(+e.year, +e.month, +e.day)),
+              l.highlightToday)
+            ) {
+              const t = b.todayDate(),
+                a =
+                  +t.year == +e.year &&
+                  +t.month == +e.month &&
+                  +e.day == +t.date;
+              e.isToday = a;
+            }
+          }),
+          t
+        );
+      }
+      setEnableAreaOnWeekMode(e) {
+        let {
+          todayTimestamp: t,
+          enableAreaTimestamp: a = [],
+          enableDaysTimestamp: n = []
+        } = this.getData('calendar');
+        e.forEach(e => {
+          const s = b.newDate(e.year, e.month, e.day).getTime();
+          let o = !1;
+          a.length
+            ? (+a[0] > +s || +s > +a[1]) && !n.includes(+s) && (o = !0)
+            : n.length && !n.includes(+s) && (o = !0),
+            o && ((e.disable = !0), (e.choosed = !1));
+          const { disablePastDay: c } =
+            (0, r.default)(this.Component).getCalendarConfig() || {};
+          c && s - t < 0 && !e.disable && (e.disable = !0);
+        });
+      }
+      calculateNextWeekDays() {
+        let {
+            lastDayInThisWeek: e,
+            lastDayInThisMonth: t
+          } = this.calculateLastDay(),
+          { curYear: a, curMonth: n } = this.getData('calendar'),
+          s = [];
+        if (t - e >= 7) {
+          const { Uyear: t, Umonth: r } = this.updateCurrYearAndMonth('next');
+          (a = t), (n = r);
+          for (let t = e + 1; t <= e + 7; t++)
+            s.push({ year: a, month: n, day: t, week: b.dayOfWeek(a, n, t) });
+        } else {
+          for (let r = e + 1; r <= t; r++)
+            s.push({ year: a, month: n, day: r, week: b.dayOfWeek(a, n, r) });
+          const { Uyear: r, Umonth: o } = this.updateCurrYearAndMonth('next');
+          (a = r), (n = o);
+          for (let r = 1; r <= 7 - (t - e); r++)
+            s.push({ year: a, month: n, day: r, week: b.dayOfWeek(a, n, r) });
+        }
+        (s = this.initSelectedDay(s)),
+          this.setEnableAreaOnWeekMode(s),
+          this.setData({
+            'calendar.curYear': a,
+            'calendar.curMonth': n,
+            'calendar.days': s
+          });
+      }
+      calculatePrevWeekDays() {
+        let { firstDayInThisWeek: e } = this.calculateFirstDay(),
+          { curYear: t, curMonth: a } = this.getData('calendar'),
+          n = [];
+        if (e - 7 > 0) {
+          const { Uyear: s, Umonth: r } = this.updateCurrYearAndMonth('prev');
+          (t = s), (a = r);
+          for (let s = e - 7; s < e; s++)
+            n.push({ year: t, month: a, day: s, week: b.dayOfWeek(t, a, s) });
+        } else {
+          let s = [];
+          for (let n = 1; n < e; n++)
+            s.push({ year: t, month: a, day: n, week: b.dayOfWeek(t, a, n) });
+          const { Uyear: r, Umonth: o } = this.updateCurrYearAndMonth('prev');
+          (t = r), (a = o);
+          const c = b.thisMonthDays(t, a);
+          for (let s = c - Math.abs(e - 7); s <= c; s++)
+            n.push({ year: t, month: a, day: s, week: b.dayOfWeek(t, a, s) });
+          n = n.concat(s);
+        }
+        (n = this.initSelectedDay(n)),
+          this.setEnableAreaOnWeekMode(n),
+          this.setData({
+            'calendar.curYear': t,
+            'calendar.curMonth': a,
+            'calendar.days': n
+          });
+      }
+      calculateDatesWhenJump(
+        { year: e, month: t, day: a },
+        { firstWeekDays: n, lastWeekDays: s },
+        r
+      ) {
+        const o = this.__dateIsInWeek({ year: e, month: t, day: a }, n),
+          c = this.__dateIsInWeek({ year: e, month: t, day: a }, s);
+        let l = [];
+        return (l = o
+          ? this.__calculateDatesWhenInFirstWeek(n, r)
+          : c
+          ? this.__calculateDatesWhenInLastWeek(s, r)
+          : this.__calculateDates({ year: e, month: t, day: a }));
+      }
+      jump({ year: e, month: t, day: a }) {
+        return new Promise(n => {
+          if (!a) return;
+          const s = 'Mon' === this.getCalendarConfig().firstDayOfWeek,
+            r = this.firstWeekInMonth(e, t, s);
+          let o = this.lastWeekInMonth(e, t, s);
+          const c = this.calculateDatesWhenJump(
+            { year: e, month: t, day: a },
+            { firstWeekDays: r, lastWeekDays: o },
+            s
+          );
+          c.map(n => {
+            +n.year == +e && +n.month == +t && +n.day == +a && (n.choosed = !0);
+          }),
+            this.initSelectedDay(c),
+            this.setEnableAreaOnWeekMode(c),
+            this.setData(
+              {
+                'calendar.days': c,
+                'calendar.curYear': e,
+                'calendar.curMonth': t,
+                'calendar.empytGrids': [],
+                'calendar.lastEmptyGrids': []
+              },
+              n
+            );
+        });
+      }
+      __calculateDatesWhenInFirstWeek(e, t) {
+        const a = [...e];
+        if (a.length < 7) {
+          let e,
+            { year: t, month: n } = a[0],
+            s = 7 - a.length;
+          for (
+            n > 1
+              ? ((n -= 1), (e = b.thisMonthDays(t, n)))
+              : ((n = 12), (t -= 1), (e = b.thisMonthDays(t, n)));
+            s;
+
+          )
+            a.unshift({
+              year: t,
+              month: n,
+              day: e,
+              week: b.dayOfWeek(t, n, e)
+            }),
+              (e -= 1),
+              (s -= 1);
+        }
+        return a;
+      }
+      __calculateDatesWhenInLastWeek(e, t) {
+        const a = [...e];
+        if (t && a.length < 7) {
+          let { year: e, month: t } = a[0],
+            n = 7 - a.length,
+            s = 1;
+          for (t > 11 ? ((t = 1), (e += 1)) : (t += 1); n; )
+            a.push({ year: e, month: t, day: s, week: b.dayOfWeek(e, t, s) }),
+              (s += 1),
+              (n -= 1);
+        }
+        return a;
+      }
+      __calculateDates({ year: e, month: t, day: a }, n) {
+        const r = b.dayOfWeek(e, t, a);
+        let o = [a - r, a + (6 - r)];
+        return (
+          n && (o = [a + 1 - r, a + (7 - r)]),
+          (0, s.default)(this.Component)
+            .buildDate(e, t)
+            .slice(o[0] - 1, o[1])
+        );
+      }
+      __dateIsInWeek(e, t) {
+        return t.find(
+          t => +t.year == +e.year && +t.month == +e.month && +t.day == +e.day
+        );
+      }
+      __tipsWhenCanNotSwtich() {
+        d.info(
+          '当前月份未选中日期下切换为周视图,不能明确该展示哪一周的日期,故此情况不允许切换'
+        );
+      }
+    }
+    t.default = e => new f(e);
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    var n = c(a(6)),
+      s = c(a(1)),
+      r = c(a(2)),
+      o = a(0);
+    function c(e) {
+      return e && e.__esModule ? e : { default: e };
+    }
+    const l = new o.GetDate();
+    class b extends s.default {
+      constructor(e) {
+        super(e), (this.Component = e);
+      }
+      getCalendarConfig() {
+        return this.Component.config;
+      }
+      renderCalendar(e, t, a) {
+        return new Promise(s => {
+          this.calculateEmptyGrids(e, t), this.calculateDays(e, t, a);
+          const { todoLabels: r } = this.getData('calendar') || {};
+          r &&
+            r instanceof Array &&
+            r.find(e => +e.month == +t) &&
+            (0, n.default)(this.Component).setTodoLabels(),
+            this.Component.firstRender || s();
+        });
+      }
+      calculateEmptyGrids(e, t) {
+        this.calculatePrevMonthGrids(e, t), this.calculateNextMonthGrids(e, t);
+      }
+      calculatePrevMonthGrids(e, t) {
+        let a = [];
+        const n = l.thisMonthDays(e, t - 1);
+        let s = l.firstDayOfWeek(e, t);
+        const o = this.getCalendarConfig() || {};
+        if (
+          ('Mon' === o.firstDayOfWeek && (0 === s ? (s = 6) : (s -= 1)), s > 0)
+        ) {
+          const c = n - s,
+            { onlyShowCurrentMonth: l } = o,
+            { showLunar: b } = this.getCalendarConfig();
+          for (let s = n; s > c; s--)
+            l
+              ? a.push('')
+              : a.push({
+                  day: s,
+                  lunar: b ? r.default.solar2lunar(e, t - 1, s) : null
+                });
+          this.setData({ 'calendar.empytGrids': a.reverse() });
+        } else this.setData({ 'calendar.empytGrids': null });
+      }
+      calculateExtraEmptyDate(e, t, a) {
+        let n = 0;
+        if (2 == +t) {
+          n += 7;
+          let s = l.dayOfWeek(e, t, 1);
+          'Mon' === a.firstDayOfWeek
+            ? 1 == +s && (n += 7)
+            : 0 == +s && (n += 7);
+        } else {
+          let s = l.dayOfWeek(e, t, 1);
+          'Mon' === a.firstDayOfWeek
+            ? 0 !== s && s < 6 && (n += 7)
+            : s < 6 && (n += 7);
+        }
+        return n;
+      }
+      calculateNextMonthGrids(e, t) {
+        let a = [];
+        const n = l.thisMonthDays(e, t);
+        let s = l.dayOfWeek(e, t, n);
+        const o = this.getCalendarConfig() || {};
+        'Mon' === o.firstDayOfWeek && (0 === s ? (s = 6) : (s -= 1));
+        let c = 7 - (s + 1);
+        const { onlyShowCurrentMonth: b, showLunar: d } = o;
+        b || (c += this.calculateExtraEmptyDate(e, t, o));
+        for (let n = 1; n <= c; n++)
+          b
+            ? a.push('')
+            : a.push({
+                day: n,
+                lunar: d ? r.default.solar2lunar(e, t + 1, n) : null
+              });
+        this.setData({ 'calendar.lastEmptyGrids': a });
+      }
+      setSelectedDay(e, t, a) {
+        let n = [];
+        const s = this.getCalendarConfig();
+        if (s.noDefault) (n = []), (s.noDefault = !1);
+        else {
+          const s = this.getData('calendar') || {},
+            { showLunar: o } = this.getCalendarConfig();
+          n = a
+            ? [
+                {
+                  year: e,
+                  month: t,
+                  day: a,
+                  choosed: !0,
+                  week: l.dayOfWeek(e, t, a),
+                  lunar: o ? r.default.solar2lunar(e, t, a) : null
+                }
+              ]
+            : s.selectedDay;
+        }
+        return n;
+      }
+      buildDate(e, t) {
+        const a = l.todayDate(),
+          n = l.thisMonthDays(e, t),
+          s = [];
+        for (let r = 1; r <= n; r++) {
+          const n = +a.year == +e && +a.month == +t && r === +a.date,
+            o = this.getCalendarConfig();
+          s.push({
+            year: e,
+            month: t,
+            day: r,
+            choosed: !1,
+            week: l.dayOfWeek(e, t, r),
+            isToday: n && o.highlightToday
+          });
+        }
+        return s;
+      }
+      calculateDays(e, t, a) {
+        let n = [];
+        const { todayTimestamp: s, disableDays: o = [] } = this.getData(
+          'calendar'
+        );
+        n = this.buildDate(e, t);
+        const c = this.setSelectedDay(e, t, a),
+          b = c.map(e => `${+e.year}-${+e.month}-${+e.day}`),
+          d = o.map(e => `${+e.year}-${+e.month}-${+e.day}`);
+        n.forEach(e => {
+          const t = `${+e.year}-${+e.month}-${+e.day}`;
+          b.includes(t) && (e.choosed = !0), d.includes(t) && (e.disable = !0);
+          const a = l.newDate(e.year, e.month, e.day).getTime(),
+            {
+              showLunar: n,
+              disablePastDay: o,
+              disableLaterDay: c
+            } = this.getCalendarConfig();
+          n && (e.lunar = r.default.solar2lunar(+e.year, +e.month, +e.day));
+          let f = !1;
+          o
+            ? (f = o && a - s < 0 && !e.disable)
+            : c && (f = c && a - s > 0 && !e.disable),
+            (f || this.__isDisable(a)) && ((e.disable = !0), (e.choosed = !1));
+        }),
+          this.setData({ 'calendar.days': n, 'calendar.selectedDay': c || [] });
+      }
+      __isDisable(e) {
+        const {
+          enableArea: t = [],
+          enableDays: a = [],
+          enableAreaTimestamp: n = []
+        } = this.getData('calendar');
+        let s = !1,
+          r = (0, o.converEnableDaysToTimestamp)(a);
+        return (
+          t.length && (r = (0, o.delRepeatedEnableDay)(a, t)),
+          n.length
+            ? (+n[0] > +e || +e > +n[1]) && !r.includes(+e) && (s = !0)
+            : r.length && !r.includes(+e) && (s = !0),
+          s
+        );
+      }
+    }
+    t.default = e => new b(e);
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    var n,
+      s = (n = a(1)) && n.__esModule ? n : { default: n },
+      r = a(0);
+    const o = new r.Logger();
+    class c extends s.default {
+      constructor(e) {
+        super(e), (this.Component = e);
+      }
+      setTodoLabels(e) {
+        e && (this.Component.todoConfig = e);
+        const t = this.getData('calendar');
+        if (!t || !t.days) return o.warn('请等待日历初始化完成后再调用该方法');
+        const a = [...t.days],
+          { curYear: n, curMonth: s } = t,
+          {
+            circle: c,
+            dotColor: l = '',
+            pos: b = 'bottom',
+            showLabelAlways: d,
+            days: f = []
+          } = e || this.Component.todoConfig || {},
+          { todoLabels: i = [], todoLabelPos: h, todoLabelColor: u } = t,
+          y = this.getTodoLabels({ year: n, month: s });
+        let m = f.filter(e => +e.year == +n && +e.month == +s);
+        this.Component.weekMode && (m = f);
+        const D = y.concat(m);
+        for (let e of D) {
+          let t;
+          (t = this.Component.weekMode
+            ? a.find(
+                t =>
+                  +e.year == +t.year && +e.month == +t.month && +e.day == +t.day
+              )
+            : a[e.day - 1]) &&
+            ((t.showTodoLabel = !!d || !t.choosed),
+            t.showTodoLabel && e.todoText && (t.todoText = e.todoText));
+        }
+        const g = {
+          'calendar.days': a,
+          'calendar.todoLabels': (0, r.uniqueArrayByDate)(f.concat(i))
+        };
+        c ||
+          (b && b !== h && (g['calendar.todoLabelPos'] = b),
+          l && l !== u && (g['calendar.todoLabelColor'] = l)),
+          (g['calendar.todoLabelCircle'] = c || !1),
+          (g['calendar.showLabelAlways'] = d || !1),
+          this.setData(g);
+      }
+      deleteTodoLabels(e) {
+        if (!(e instanceof Array && e.length)) return;
+        const t = this.filterTodos(e),
+          { days: a, curYear: n, curMonth: s } = this.getData('calendar'),
+          r = t.filter(e => n === +e.year && s === +e.month);
+        a.forEach(e => {
+          e.showTodoLabel = !1;
+        }),
+          r.forEach(e => {
+            a[e.day - 1].showTodoLabel = !a[e.day - 1].choosed;
+          }),
+          this.setData({ 'calendar.days': a, 'calendar.todoLabels': t });
+      }
+      clearTodoLabels() {
+        const { days: e = [] } = this.getData('calendar'),
+          t = [].concat(e);
+        t.forEach(e => {
+          e.showTodoLabel = !1;
+        }),
+          this.setData({ 'calendar.days': t, 'calendar.todoLabels': [] });
+      }
+      getTodoLabels(e) {
+        const { todoLabels: t = [] } = this.getData('calendar');
+        if (e) {
+          const { year: a, month: n } = e;
+          return t.filter(e => +e.year == +a && +e.month == +n);
+        }
+        return t;
+      }
+      filterTodos(e) {
+        const t = this.getData('calendar.todoLabels') || [],
+          a = e.map(e => `${e.year}-${e.month}-${e.day}`);
+        return t.filter(e => !a.includes(`${e.year}-${e.month}-${e.day}`));
+      }
+      showTodoLabels(e, t, a) {
+        e.forEach(e => {
+          if (this.Component.weekMode)
+            t.forEach((n, s) => {
+              if (+n.day == +e.day) {
+                const n = t[s];
+                (n.hasTodo = !0),
+                  (n.todoText = e.todoText),
+                  a &&
+                    a.length &&
+                    +a[0].day == +e.day &&
+                    (n.showTodoLabel = !0);
+              }
+            });
+          else {
+            const n = t[e.day - 1];
+            if (!n) return;
+            (n.hasTodo = !0),
+              (n.todoText = e.todoText),
+              a &&
+                a.length &&
+                +a[0].day == +e.day &&
+                (t[a[0].day - 1].showTodoLabel = !0);
+          }
+        });
+      }
+    }
+    t.default = e => new c(e);
+  },
+  function(e, t, a) {
+    'use strict';
+    var n,
+      s = (n = a(4)) && n.__esModule ? n : { default: n },
+      r = a(0),
+      o = (function(e) {
+        if (e && e.__esModule) return e;
+        var t = {};
+        if (null != e)
+          for (var a in e)
+            if (Object.prototype.hasOwnProperty.call(e, a)) {
+              var n =
+                Object.defineProperty && Object.getOwnPropertyDescriptor
+                  ? Object.getOwnPropertyDescriptor(e, a)
+                  : {};
+              n.get || n.set ? Object.defineProperty(t, a, n) : (t[a] = e[a]);
+            }
+        return (t.default = e), t;
+      })(a(8));
+    const c = new r.Slide(),
+      l = new r.Logger();
+    Component({
+      options: { multipleSlots: !0 },
+      properties: { calendarConfig: { type: Object, value: {} } },
+      data: {
+        handleMap: {
+          prev_year: 'chooseYear',
+          prev_month: 'chooseMonth',
+          next_month: 'chooseMonth',
+          next_year: 'chooseYear'
+        }
+      },
+      lifetimes: {
+        attached: function() {
+          this.initComp();
+        }
+      },
+      attached: function() {
+        this.initComp();
+      },
+      methods: {
+        initComp() {
+          const e = this.properties.calendarConfig || {};
+          this.setTheme(e.theme), (0, o.default)(this, e);
+        },
+        setTheme(e) {
+          this.setData({ 'calendarConfig.theme': e || 'default' });
+        },
+        chooseDate(e) {
+          const { type: t } = e.currentTarget.dataset;
+          t && this[this.data.handleMap[t]](t);
+        },
+        chooseYear(e) {
+          const { curYear: t, curMonth: a } = this.data.calendar;
+          if (!t || !a) return l.warn('异常:未获取到当前年月');
+          if (this.weekMode) return console.warn('周视图下不支持点击切换年月');
+          let n = +t,
+            s = +a;
+          'prev_year' === e ? (n -= 1) : 'next_year' === e && (n += 1),
+            this.render(t, a, n, s);
+        },
+        chooseMonth(e) {
+          const { curYear: t, curMonth: a } = this.data.calendar;
+          if (!t || !a) return l.warn('异常:未获取到当前年月');
+          if (this.weekMode) return console.warn('周视图下不支持点击切换年月');
+          let n = +t,
+            s = +a;
+          'prev_month' === e
+            ? (s -= 1) < 1 && ((n -= 1), (s = 12))
+            : 'next_month' === e && (s += 1) > 12 && ((n += 1), (s = 1)),
+            this.render(t, a, n, s);
+        },
+        render(e, t, a, n) {
+          o.whenChangeDate.call(this, {
+            curYear: e,
+            curMonth: t,
+            newYear: a,
+            newMonth: n
+          }),
+            this.setData({ 'calendar.curYear': a, 'calendar.curMonth': n }),
+            o.renderCalendar.call(this, a, n);
+        },
+        tapDayItem(e) {
+          const { idx: t, disable: a } = e.currentTarget.dataset;
+          if (a) return;
+          const n = this.config || {},
+            { multi: s } = n;
+          s
+            ? o.whenMulitSelect.call(this, t)
+            : o.whenSingleSelect.call(this, t);
+        },
+        doubleClickToToday() {
+          if (!this.config.multi && !this.weekMode)
+            if (
+              (void 0 === this.count ? (this.count = 1) : (this.count += 1),
+              this.lastClick)
+            ) {
+              new Date().getTime() - this.lastClick < 500 &&
+                this.count >= 2 &&
+                o.jump.call(this),
+                (this.count = void 0),
+                (this.lastClick = void 0);
+            } else this.lastClick = new Date().getTime();
+        },
+        calendarTouchstart(e) {
+          const t = e.touches[0],
+            a = t.clientX,
+            n = t.clientY;
+          (this.slideLock = !0),
+            this.setData({ 'gesture.startX': a, 'gesture.startY': n });
+        },
+        calendarTouchmove(e) {
+          const { gesture: t } = this.data;
+          if (this.slideLock) {
+            if (c.isLeft(t, e.touches[0])) {
+              if ((this.setData({ 'calendar.leftSwipe': 1 }), this.weekMode))
+                return (
+                  (this.slideLock = !1),
+                  (this.currentDates = (0, o.getCalendarDates)()),
+                  (this.currentYM = (0, o.getCurrentYM)()),
+                  (0, s.default)(this).calculateNextWeekDays(),
+                  this.onSwipeCalendar('next_week'),
+                  void this.onWeekChange('next_week')
+                );
+              this.chooseMonth('next_month'),
+                this.onSwipeCalendar('next_month'),
+                (this.slideLock = !1);
+            }
+            if (c.isRight(t, e.touches[0])) {
+              if ((this.setData({ 'calendar.rightSwipe': 1 }), this.weekMode))
+                return (
+                  (this.slideLock = !1),
+                  (this.currentDates = (0, o.getCalendarDates)()),
+                  (this.currentYM = (0, o.getCurrentYM)()),
+                  (0, s.default)(this).calculatePrevWeekDays(),
+                  this.onSwipeCalendar('prev_week'),
+                  void this.onWeekChange('prev_week')
+                );
+              this.chooseMonth('prev_month'),
+                this.onSwipeCalendar('prev_month'),
+                (this.slideLock = !1);
+            }
+          }
+        },
+        calendarTouchend(e) {
+          this.setData({ 'calendar.leftSwipe': 0, 'calendar.rightSwipe': 0 });
+        },
+        onSwipeCalendar(e) {
+          this.triggerEvent('onSwipe', { directionType: e });
+        },
+        onWeekChange(e) {
+          this.triggerEvent('whenChangeWeek', {
+            current: {
+              currentYM: this.currentYM,
+              dates: [...this.currentDates]
+            },
+            next: {
+              currentYM: (0, o.getCurrentYM)(),
+              dates: (0, o.getCalendarDates)()
+            },
+            directionType: e
+          }),
+            (this.currentDates = null),
+            (this.currentYM = null);
+        }
+      }
+    });
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }),
+      (t.getCurrentYM = L),
+      (t.getSelectedDay = v),
+      (t.cancelAllSelectedDay = W),
+      (t.jump = S),
+      (t.setTodoLabels = $),
+      (t.deleteTodoLabels = Y),
+      (t.clearTodoLabels = O),
+      (t.getTodoLabels = x),
+      (t.disableDay = A),
+      (t.enableArea = E),
+      (t.enableDays = I),
+      (t.setSelectedDays = P),
+      (t.getCalendarConfig = j),
+      (t.setCalendarConfig = G),
+      (t.getCalendarDates = U),
+      (t.switchView = F),
+      (t.default = t.calculateNextWeekDays = t.calculatePrevWeekDays = t.whenMulitSelect = t.whenSingleSelect = t.renderCalendar = t.whenChangeDate = void 0);
+    var n = f(a(9)),
+      s = f(a(4)),
+      r = f(a(6)),
+      o = f(a(1)),
+      c = f(a(5)),
+      l = f(a(3)),
+      b = f(a(2)),
+      d = a(0);
+    function f(e) {
+      return e && e.__esModule ? e : { default: e };
+    }
+    let i = {},
+      h = new d.Logger(),
+      u = new d.GetDate(),
+      y = null;
+    function m(e) {
+      e && (i = (0, d.getComponent)(e));
+    }
+    function D(e, t) {
+      return m(t), (y = new o.default(i)).getData(e);
+    }
+    function g(e, t = () => {}) {
+      return new o.default(i).setData(e, t);
+    }
+    const p = {
+        renderCalendar(e, t, a) {
+          return (
+            (0, d.isComponent)(this) && (i = this),
+            new Promise((n, s) => {
+              (0, c.default)(i)
+                .renderCalendar(e, t, a)
+                .then(() => {
+                  !(function(e) {
+                    e.calendar = {
+                      jump: S,
+                      switchView: F,
+                      disableDay: A,
+                      enableArea: E,
+                      enableDays: I,
+                      getCurrentYM: L,
+                      getSelectedDay: v,
+                      cancelAllSelectedDay: W,
+                      setTodoLabels: $,
+                      getTodoLabels: x,
+                      deleteTodoLabels: Y,
+                      clearTodoLabels: O,
+                      setSelectedDays: P,
+                      getCalendarConfig: j,
+                      setCalendarConfig: G,
+                      getCalendarDates: U
+                    };
+                  })((0, d.getCurrentPage)()),
+                    i.triggerEvent('afterCalendarRender', i),
+                    (i.firstRender = !0),
+                    (d.initialTasks.flag = 'finished'),
+                    d.initialTasks.tasks.length &&
+                      d.initialTasks.tasks.shift()(),
+                    n();
+                });
+            })
+          );
+        },
+        whenChangeDate({ curYear: e, curMonth: t, newYear: a, newMonth: n }) {
+          i.triggerEvent('whenChangeMonth', {
+            current: { year: e, month: t },
+            next: { year: a, month: n }
+          });
+        },
+        whenMulitSelect(e) {
+          (0, d.isComponent)(this) && (i = this);
+          const { calendar: t = {} } = D(),
+            { days: a, todoLabels: n } = t;
+          let { selectedDay: s = [] } = t;
+          const r = a[e];
+          if (r) {
+            if (((r.choosed = !r.choosed), r.choosed)) {
+              r.cancel = !1;
+              const { showLabelAlways: e } = D('calendar');
+              e && r.showTodoLabel
+                ? (r.showTodoLabel = !0)
+                : (r.showTodoLabel = !1),
+                s.push(r);
+            } else {
+              r.cancel = !0;
+              const e = `${r.year}-${r.month}-${r.day}`;
+              (s = s.filter(t => e !== `${t.year}-${t.month}-${t.day}`)),
+                n &&
+                  n.forEach(t => {
+                    e === `${t.year}-${t.month}-${t.day}` &&
+                      (r.showTodoLabel = !0);
+                  });
+            }
+            if ((0, l.default)(i).getCalendarConfig().takeoverTap)
+              return i.triggerEvent('onTapDay', r);
+            g({ 'calendar.days': a, 'calendar.selectedDay': s }),
+              p.afterTapDay(r, s);
+          }
+        },
+        whenSingleSelect(e) {
+          (0, d.isComponent)(this) && (i = this);
+          const { calendar: t = {} } = D(),
+            { days: a, selectedDay: n = [], todoLabels: s } = t;
+          let o = [];
+          const c = a[e];
+          if (!c) return;
+          const b = (n[0] || {}).day,
+            f = (b && a[b - 1]) || {},
+            { month: h, year: u } = a[0] || {},
+            y = (0, l.default)(i).getCalendarConfig();
+          if (y.takeoverTap) return i.triggerEvent('onTapDay', c);
+          if ((p.afterTapDay(c), !y.inverse && f.day === c.day)) return;
+          i.weekMode &&
+            a.forEach((e, t) => {
+              e.day === b && (a[t].choosed = !1);
+            }),
+            s && (o = s.filter(e => +e.year === u && +e.month === h)),
+            (0, r.default)(i).showTodoLabels(o, a, n);
+          const m = { 'calendar.days': a };
+          f.day !== c.day
+            ? ((f.choosed = !1),
+              (c.choosed = !0),
+              (t.showLabelAlways && c.showTodoLabel) || (c.showTodoLabel = !1),
+              (m['calendar.selectedDay'] = [c]))
+            : y.inverse &&
+              ((c.choosed = !c.choosed),
+              c.choosed &&
+                (c.showTodoLabel && t.showLabelAlways
+                  ? (c.showTodoLabel = !0)
+                  : (c.showTodoLabel = !1)),
+              (m['calendar.selectedDay'] = [])),
+            g(m);
+        },
+        afterTapDay(e, t) {
+          const a = (0, l.default)(i).getCalendarConfig(),
+            { multi: n } = a;
+          n
+            ? i.triggerEvent('afterTapDay', {
+                currentSelected: e,
+                selectedDays: t
+              })
+            : i.triggerEvent('afterTapDay', e);
+        },
+        jumpToToday() {
+          const { year: e, month: t, date: a } = u.todayDate(),
+            n = u.todayTimestamp();
+          g({
+            'calendar.curYear': e,
+            'calendar.curMonth': t,
+            'calendar.selectedDay': [
+              {
+                year: e,
+                day: a,
+                month: t,
+                choosed: !0,
+                lunar: (0, l.default)(i).getCalendarConfig().showLunar
+                  ? b.default.solar2lunar(e, t, a)
+                  : null
+              }
+            ],
+            'calendar.todayTimestamp': n
+          }),
+            p.renderCalendar(e, t, a);
+        }
+      },
+      w = p.whenChangeDate;
+    t.whenChangeDate = w;
+    const C = p.renderCalendar;
+    t.renderCalendar = C;
+    const T = p.whenSingleSelect;
+    t.whenSingleSelect = T;
+    const M = p.whenMulitSelect;
+    t.whenMulitSelect = M;
+    const k = p.calculatePrevWeekDays;
+    t.calculatePrevWeekDays = k;
+    const _ = p.calculateNextWeekDays;
+    function L(e) {
+      return (
+        m(e), { year: D('calendar.curYear'), month: D('calendar.curMonth') }
+      );
+    }
+    function v(e) {
+      return m(e), D('calendar.selectedDay');
+    }
+    function W(e) {
+      m(e);
+      const t = [...D('calendar.days')];
+      t.map(e => {
+        e.choosed = !1;
+      }),
+        g({ 'calendar.days': t, 'calendar.selectedDay': [] });
+    }
+    function S(e, t, a, n) {
+      m(n);
+      const { selectedDay: r = [], weekMode: o } = D('calendar') || {},
+        { year: c, month: l, day: b } = r[0] || {};
+      if (+c != +e || +l != +t || +b != +a) {
+        if (o) return (0, s.default)(i).jump({ year: e, month: t, day: a });
+        if (e && t) {
+          if ('number' != typeof +e || 'number' != typeof +t)
+            return h.warn('jump 函数年月日参数必须为数字');
+          const n = u.todayTimestamp();
+          g(
+            {
+              'calendar.curYear': e,
+              'calendar.curMonth': t,
+              'calendar.todayTimestamp': n
+            },
+            () => {
+              if ('number' == typeof +a) return p.renderCalendar(e, t, a);
+              p.renderCalendar(e, t);
+            }
+          );
+        } else p.jumpToToday();
+      }
+    }
+    function $(e, t) {
+      m(t), (0, r.default)(i).setTodoLabels(e);
+    }
+    function Y(e, t) {
+      m(t), (0, r.default)(i).deleteTodoLabels(e);
+    }
+    function O(e) {
+      m(e), (0, r.default)(i).clearTodoLabels();
+    }
+    function x(e) {
+      return m(e), (0, r.default)(i).getTodoLabels();
+    }
+    function A(e = [], t) {
+      m(t), (0, n.default)(i).disableDays(e);
+    }
+    function E(e = [], t) {
+      m(t), (0, n.default)(i).enableArea(e);
+    }
+    function I(e = [], t) {
+      m(t), (0, n.default)(i).enableDays(e);
+    }
+    function P(e, t) {
+      m(t), (0, n.default)(i).setSelectedDays(e);
+    }
+    function j(e) {
+      m(e), (0, l.default)(i).getCalendarConfig();
+    }
+    function G(e, t, a) {
+      m(a), (0, l.default)(i).setCalendarConfig(e, t);
+    }
+    function U(e) {
+      return m(e), D('calendar.days', e);
+    }
+    function F(...e) {
+      return new Promise((t, a) => {
+        const n = e[0];
+        if (!e[1])
+          return (0, s.default)(i)
+            .switchWeek(n)
+            .then(t)
+            .catch(a);
+        'string' == typeof e[1]
+          ? (m(e[1]),
+            (0, s.default)(i)
+              .switchWeek(n, e[2])
+              .then(t)
+              .catch(a))
+          : 'object' == typeof e[1] &&
+            ('string' == typeof e[2] && m(e[1]),
+            (0, s.default)(i)
+              .switchWeek(n, e[1])
+              .then(t)
+              .catch(a));
+      });
+    }
+    function N(e, t) {
+      (d.initialTasks.flag = 'process'),
+        ((i = e).config = t),
+        (function(e) {
+          let t = ['日', '一', '二', '三', '四', '五', '六'];
+          'Mon' === e && (t = ['一', '二', '三', '四', '五', '六', '日']),
+            g({ 'calendar.weeksCh': t });
+        })(t.firstDayOfWeek),
+        (function(e) {
+          if (e && 'string' == typeof e) {
+            const t = e.split('-');
+            if (t.length < 3)
+              return h.warn('配置 jumpTo 格式应为: 2018-4-2 或 2018-04-02');
+            S(+t[0], +t[1], +t[2]);
+          } else e ? S() : ((i.config.noDefault = !0), S());
+        })(t.defaultDay),
+        h.tips(
+          '使用中若遇问题请反馈至 https://github.com/treadpit/wx_calendar/issues ✍️'
+        );
+    }
+    t.calculateNextWeekDays = _;
+    t.default = (e, t = {}) => {
+      if ('process' === d.initialTasks.flag)
+        return d.initialTasks.tasks.push(function() {
+          N(e, t);
+        });
+      N(e, t);
+    };
+  },
+  function(e, t, a) {
+    'use strict';
+    Object.defineProperty(t, '__esModule', { value: !0 }), (t.default = void 0);
+    var n = o(a(1)),
+      s = o(a(3)),
+      r = a(0);
+    function o(e) {
+      return e && e.__esModule ? e : { default: e };
+    }
+    const c = new r.Logger(),
+      l = new r.GetDate();
+    class b extends n.default {
+      constructor(e) {
+        super(e), (this.Component = e);
+      }
+      enableArea(e = []) {
+        if (2 === e.length) {
+          const { start: t, end: a, startTimestamp: n, endTimestamp: s } = (0,
+          r.convertEnableAreaToTimestamp)(e);
+          if (!t || !a) return;
+          const o = l.thisMonthDays(t[0], t[1]),
+            c = l.thisMonthDays(a[0], a[1]);
+          if (
+            this.__judgeParam({
+              start: t,
+              end: a,
+              startMonthDays: o,
+              endMonthDays: c,
+              startTimestamp: n,
+              endTimestamp: s
+            })
+          ) {
+            let { days: t = [], selectedDay: a = [] } = this.getData(
+              'calendar'
+            );
+            const r = this.__handleEnableArea(
+              { area: e, days: t, startTimestamp: n, endTimestamp: s },
+              a
+            );
+            this.setData({
+              'calendar.enableArea': e,
+              'calendar.days': r.dates,
+              'calendar.selectedDay': r.selectedDay,
+              'calendar.enableAreaTimestamp': [n, s]
+            });
+          }
+        } else
+          c.warn(
+            'enableArea()参数需为时间范围数组,形如:["2018-8-4" , "2018-8-24"]'
+          );
+      }
+      enableDays(e = []) {
+        const { enableArea: t = [] } = this.getData('calendar');
+        let a = [];
+        a = t.length
+          ? (0, r.delRepeatedEnableDay)(e, t)
+          : (0, r.converEnableDaysToTimestamp)(e);
+        let { days: n = [], selectedDay: s = [] } = this.getData('calendar');
+        const o = this.__handleEnableDays(
+          { days: n, expectEnableDaysTimestamp: a },
+          s
+        );
+        this.setData({
+          'calendar.days': o.dates,
+          'calendar.selectedDay': o.selectedDay,
+          'calendar.enableDays': e,
+          'calendar.enableDaysTimestamp': a
+        });
+      }
+      setSelectedDays(e) {
+        if (!(0, s.default)(this.Component).getCalendarConfig().multi)
+          return c.warn('单选模式下不能设置多日期选中,请配置 multi');
+        let { days: t } = this.getData('calendar'),
+          a = [];
+        if (e) {
+          if (e && e.length) {
+            const { dates: n, selectedDates: s } = this.__handleSelectedDays(
+              t,
+              a,
+              e
+            );
+            (t = n), (a = s);
+          }
+        } else
+          t.map(e => {
+            (e.choosed = !0), (e.showTodoLabel = !1);
+          }),
+            (a = t);
+        (0, s.default)(this.Component).setCalendarConfig('multi', !0),
+          this.setData({ 'calendar.days': t, 'calendar.selectedDay': a });
+      }
+      disableDays(e) {
+        const { disableDays: t = [], days: a } = this.getData('calendar');
+        if ('[object Array]' !== Object.prototype.toString.call(e))
+          return c.warn('disableDays 参数为数组');
+        let n = [];
+        if (e.length) {
+          const s = (n = (0, r.uniqueArrayByDate)(e.concat(t))).map(
+            e => `${e.year}-${e.month}-${e.day}`
+          );
+          a.forEach(e => {
+            const t = `${e.year}-${e.month}-${e.day}`;
+            s.includes(t) && (e.disable = !0);
+          });
+        } else
+          a.forEach(e => {
+            e.disable = !1;
+          });
+        this.setData({ 'calendar.days': a, 'calendar.disableDays': n });
+      }
+      __judgeParam(e) {
+        const {
+          start: t,
+          end: a,
+          startMonthDays: n,
+          endMonthDays: s,
+          startTimestamp: r,
+          endTimestamp: o
+        } = e;
+        return t[2] > n || t[2] < 1
+          ? (c.warn(
+              'enableArea() 开始日期错误,指定日期不在当前月份天数范围内'
+            ),
+            !1)
+          : t[1] > 12 || t[1] < 1
+          ? (c.warn('enableArea() 开始日期错误,月份超出1-12月份'), !1)
+          : a[2] > s || a[2] < 1
+          ? (c.warn(
+              'enableArea() 截止日期错误,指定日期不在当前月份天数范围内'
+            ),
+            !1)
+          : a[1] > 12 || a[1] < 1
+          ? (c.warn('enableArea() 截止日期错误,月份超出1-12月份'), !1)
+          : !(r > o) || (c.warn('enableArea()参数最小日期大于了最大日期'), !1);
+      }
+      __handleEnableArea(e = {}, t = []) {
+        const { area: a, days: n, startTimestamp: s, endTimestamp: o } = e,
+          c = this.getData('calendar.enableDays') || [];
+        let b = [];
+        c.length && (b = (0, r.delRepeatedEnableDay)(c, a));
+        const d = [...n];
+        return (
+          d.forEach(e => {
+            const a = l.newDate(e.year, e.month, e.day).getTime();
+            (+s > +a || +a > +o) && !b.includes(+a)
+              ? ((e.disable = !0),
+                e.choosed &&
+                  ((e.choosed = !1),
+                  (t = t.filter(
+                    t =>
+                      `${e.year}-${e.month}-${e.day}` !==
+                      `${t.year}-${t.month}-${t.day}`
+                  ))))
+              : e.disable && (e.disable = !1);
+          }),
+          { dates: d, selectedDay: t }
+        );
+      }
+      __handleEnableDays(e = {}, t = []) {
+        const { days: a, expectEnableDaysTimestamp: n } = e,
+          { enableAreaTimestamp: s = [] } = this.getData('calendar'),
+          r = [...a];
+        return (
+          r.forEach(e => {
+            const a = l.newDate(e.year, e.month, e.day).getTime();
+            let r = !1;
+            s.length
+              ? (+s[0] > +a || +a > +s[1]) && !n.includes(+a) && (r = !0)
+              : n.includes(+a) || (r = !0),
+              r
+                ? ((e.disable = !0),
+                  e.choosed &&
+                    ((e.choosed = !1),
+                    (t = t.filter(
+                      t =>
+                        `${e.year}-${e.month}-${e.day}` !==
+                        `${t.year}-${t.month}-${t.day}`
+                    ))))
+                : (e.disable = !1);
+          }),
+          { dates: r, selectedDay: t }
+        );
+      }
+      __handleSelectedDays(e = [], t = [], a) {
+        const { selectedDay: n, showLabelAlways: s } = this.getData('calendar');
+        t = n && n.length ? (0, r.uniqueArrayByDate)(n.concat(a)) : a;
+        const { year: o, month: c } = e[0],
+          l = [];
+        return (
+          t.forEach(e => {
+            +e.year == +o &&
+              +e.month == +c &&
+              l.push(`${e.year}-${e.month}-${e.day}`);
+          }),
+          [...e].map(e => {
+            l.includes(`${e.year}-${e.month}-${e.day}`) &&
+              ((e.choosed = !0),
+              s && e.showTodoLabel
+                ? (e.showTodoLabel = !0)
+                : (e.showTodoLabel = !1));
+          }),
+          { dates: e, selectedDates: t }
+        );
+      }
+    }
+    t.default = e => new b(e);
+  }
+]);
+

+ 3 - 0
component/calendar/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 82 - 0
component/calendar/index.wxml

@@ -0,0 +1,82 @@
+<view class="flex b tb ac" wx:if="{{calendar}}">
+  <view class="calendar b tb">
+    <!-- 头部操作栏 -->
+    <view wx:if="{{!calendarConfig.hideHeadOnWeekMode}}" class="handle {{calendarConfig.theme}}_handle-color fs28 b lr ac pc">
+      <view class="prev fs36" wx:if="{{calendarConfig.showHandlerOnWeekMode || !calendar.weekMode}}">
+        <text class="prev-handle iconfont icon-doubleleft" bindtap="chooseDate" data-type="prev_year"></text>
+        <text class="prev-handle iconfont icon-left" bindtap="chooseDate" data-type="prev_month"></text>
+      </view>
+      <view class="flex date-in-handle b lr cc" bindtap="doubleClickToToday">{{calendar.curYear || "--"}} 年 {{calendar.curMonth || "--"}} 月</view>
+      <view class="next fs36" wx:if="{{calendarConfig.showHandlerOnWeekMode || !calendar.weekMode}}">
+        <text class="next-handle iconfont icon-right" bindtap="chooseDate" data-type="next_month"></text>
+        <text class="next-handle iconfont icon-doubleright" bindtap="chooseDate" data-type="next_year"></text>
+      </view>
+    </view>
+    <!-- 星期栏 -->
+    <view class="weeks b lr ac {{calendarConfig.theme}}_week-color">
+      <view class="week fs28" wx:for="{{calendar.weeksCh}}" wx:key="{{index}}" data-idx="{{index}}">{{item}}</view>
+    </view>
+    <!-- 日历面板主体 -->
+    <view class="b lr wrap"
+        bindtouchstart="calendarTouchstart"
+        bindtouchmove="calendarTouchmove"
+        bindtouchend="calendarTouchend">
+        <!-- 上月日期格子 -->
+        <view
+          class="grid b ac pc {{calendarConfig.theme}}_prev-month-date"
+          wx:if="{{calendar.empytGrids}}"
+          wx:for="{{calendar.empytGrids}}"
+          wx:key="{{index}}"
+          data-idx="{{index}}">
+            <view class="date">
+              {{item.day}}
+              <view
+                wx:if="{{calendarConfig.showLunar && item.lunar}}"
+                class="date-desc date-desc-bottom">
+                  {{item.lunar.Term || item.lunar.IDayCn}}
+              </view>
+            </view>
+        </view>
+        <!-- 本月日期格子 -->
+        <view class="grid {{calendarConfig.theme}}_normal-date b ac pc"
+          wx:for="{{calendar.days}}"
+          wx:key="{{index}}"
+          data-disable="{{item.disable}}"
+          data-idx="{{index}}"
+          bindtap="tapDayItem">
+            <view
+              class="date-wrap b cc">
+              <view class="date b ac pc {{(item.week === 0 || item.week === 6) ? calendarConfig.theme + '_weekend-color' : ''}} {{calendar.todoLabelCircle && item.showTodoLabel && !item.choosed ? calendarConfig.theme + '_todo-circle todo-circle' : '' }} {{item.isToday ? calendarConfig.theme + '_today' : ''}} {{item.choosed ? calendarConfig.theme + '_choosed' : ''}} {{item.disable ? calendarConfig.theme + '_date-disable' : ''}}">
+                {{item.day}}
+                <view
+                  wx:if="{{(calendarConfig.showLunar && item.lunar && !item.showTodoLabel) || (item.showTodoLabel && calendar.todoLabelPos !== 'bottom')}}"
+                  class="date-desc {{calendarConfig.theme}}_date-desc date-desc-bottom {{(item.choosed || item.isToday) ? 'date-desc-bottom-always' : ''}} {{item.disable ? calendarConfig.theme + '_date-desc-disable' : ''}}">
+                  {{item.lunar.Term || item.lunar.IDayCn}}
+                </view>
+                <view
+                  wx:if="{{item.showTodoLabel && !calendar.todoLabelCircle}}"
+                  class="{{item.todoText ? 'date-desc' : calendarConfig.theme + '_todo-dot todo-dot'}} {{calendarConfig.showLunar ? calendarConfig.theme + '_date-desc-lunar' : ''}} {{calendar.todoLabelPos === 'bottom' ? 'date-desc-bottom todo-dot-bottom' : 'date-desc-top todo-dot-top'}} {{calendar.showLabelAlways && item.choosed && calendar.todoLabelPos === 'bottom' ? 'date-desc-bottom-always todo-dot-bottom-always' : ''}} {{calendar.showLabelAlways && item.choosed && calendar.todoLabelPos === 'top' ? 'date-desc-top-always todo-dot-top-always' : ''}}"
+                  style="background-color: {{calendar.todoLabelColor}};">
+                    {{item.todoText}}
+                </view>
+              </view>
+            </view>
+        </view>
+        <!-- 下月日期格子 -->
+        <view
+          class="grid b ac pc {{calendarConfig.theme}}_next-month-date"
+          wx:for="{{calendar.lastEmptyGrids}}"
+          wx:key="{{index}}"
+          data-idx="{{index}}">
+            <view class="date">
+              {{item.day}}
+              <view
+                wx:if="{{calendarConfig.showLunar && item.lunar}}"
+                class="date-desc date-desc-bottom">
+                  {{item.lunar.Term || item.lunar.IDayCn}}
+              </view>
+            </view>
+        </view>
+      </view>
+  </view>
+</view>

+ 204 - 0
component/calendar/index.wxss

@@ -0,0 +1,204 @@
+@import './theme/iconfont.wxss';
+@import './theme/theme-default.wxss';
+@import './theme/theme-elegant.wxss';
+
+.b {
+    display: flex;
+}
+
+.lr {
+    flex-direction: row;
+}
+
+.tb {
+    flex-direction: column;
+}
+
+.pc {
+    justify-content: center;
+}
+
+.ac {
+    align-items: center;
+}
+
+.cc {
+    align-items: center;
+    justify-content: center;
+}
+
+.wrap {
+    flex-wrap: wrap;
+}
+
+.flex {
+    flex-grow: 1;
+}
+
+.bg {
+    background-image: linear-gradient(to bottom, #faefe7, #ffcbd7);
+    overflow: hidden;
+}
+
+.white-color {
+    color: #fff;
+}
+
+.fs24 {
+    font-size: 24rpx;
+}
+
+.fs28 {
+    font-size: 28rpx;
+}
+
+.fs32 {
+    font-size: 32rpx;
+}
+
+.fs36 {
+    font-size: 36rpx;
+}
+
+.calendar {
+    width: 100%;
+    box-sizing: border-box;
+}
+
+/* 日历操作栏 */
+
+.handle {
+    height: 80rpx;
+}
+
+.prev-handle,
+.next-handle {
+    padding: 20rpx;
+}
+
+.date-in-handle {
+    height: 80rpx;
+}
+
+/* 星期栏 */
+
+.weeks {
+    height: 50rpx;
+    line-height: 50rpx;
+    opacity: 0.5;
+}
+
+.week {
+    text-align: center;
+}
+
+.grid,
+.week {
+    width: 14.286014285714286%;
+}
+
+.date-wrap {
+    height: 72rpx;
+    position: relative;
+    left: 0;
+    top: 0;
+}
+
+.date {
+    position: relative;
+    left: 0;
+    top: 0;
+    width: 55rpx;
+    height: 55rpx;
+    text-align: center;
+    line-height: 55rpx;
+    font-size: 26rpx;
+    font-weight: 200;
+    border-radius: 50%;
+    transition: all 0.3s;
+    animation-name: choosed;
+    animation-duration: 0.5s;
+    animation-timing-function: linear;
+    animation-iteration-count: 1;
+}
+
+.date-desc {
+    width: 150%;
+    height: 32rpx;
+    font-size: 20rpx;
+    line-height: 32rpx;
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+    overflow: hidden;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    -webkit-line-clamp: 1;
+    text-align: center;
+}
+
+@keyframes choosed {
+    from {
+        transform: scale(1);
+    }
+
+    50% {
+        transform: scale(0.9);
+    }
+
+    to {
+        transform: scale(1);
+    }
+}
+
+/* 日期圆圈标记 */
+.todo-circle {
+    border-width: 1rpx;
+    border-style: solid;
+    box-sizing: border-box;
+}
+
+/* 待办点标记相关样式 */
+.todo-dot {
+    width: 10rpx;
+    height: 10rpx;
+    border-radius: 50%;
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%);
+}
+
+.todo-dot-top {
+    top: 3rpx;
+}
+
+.todo-dot.todo-dot-top-always {
+    top: -8rpx;
+}
+
+.todo-dot.todo-dot-bottom {
+    bottom: 0;
+}
+
+.todo-dot.todo-dot-bottom-always {
+    bottom: -10rpx;
+}
+
+/* 日期描述文字(待办文字/农历)相关样式 */
+
+.date-desc.date-desc-top {
+    top: -6rpx;
+}
+
+.date-desc.date-desc-top-always {
+    top: -20rpx;
+}
+
+.date-desc.date-desc-bottom {
+    bottom: -14rpx;
+}
+
+.date-desc.date-desc-bottom-always {
+    bottom: -28rpx;
+}

Fichier diff supprimé car celui-ci est trop grand
+ 2 - 0
component/calendar/theme/iconfont.wxss


+ 52 - 0
component/calendar/theme/theme-default.wxss

@@ -0,0 +1,52 @@
+
+/* 日历主要颜色相关样式 */
+
+.default_color,
+.default_weekend-color,
+.default_handle-color,
+.default_week-color {
+    color: #ff629a;
+}
+
+.default_today {
+    color: #fff;
+    background-color: #874fb4;
+}
+
+.default_choosed {
+    color: #fff;
+    background-color: #ff629a;
+}
+
+.default_date-disable {
+    color: #c7c7c7;
+}
+
+.default_prev-month-date,
+.default_next-month-date {
+    color: #e2e2e2;
+}
+
+.default_normal-date {
+    color: #88d2ac;
+}
+
+.default_todo-circle {
+    border-color: #88d2ac;
+}
+
+.default_todo-dot {
+    background-color: #e54d42;
+}
+
+.default_date-desc {
+    color: #c2c2c2;
+}
+
+.default_date-desc-lunar {
+    color: #e54d42;
+}
+
+.default_date-desc-disable {
+    color: #e2e2e2;
+}

+ 49 - 0
component/calendar/theme/theme-elegant.wxss

@@ -0,0 +1,49 @@
+.elegant_color,
+.elegant_weekend-color,
+.elegant_handle-color,
+.elegant_week-color {
+    color: #333;
+}
+
+.elegant_today {
+    color: #000;
+    background-color: #e1e7f5;
+}
+
+.elegant_choosed {
+    color: #000;
+    background-color: #e2e2e2;
+}
+
+.elegant_date-disable {
+    color: #c7c7c7;
+}
+
+.elegant_prev-month-date,
+.elegant_next-month-date {
+    color: #e2e2e2;
+}
+
+.elegant_normal-date {
+    color: #333;
+}
+
+.elegant_todo-circle {
+    border-color: #161035;
+}
+
+.elegant_todo-dot {
+    background-color: #161035;
+}
+
+.elegant_date-desc {
+    color: #c2c2c2;
+}
+
+.elegant_date-desc-lunar {
+    color: #161035;
+}
+
+.elegant_date-desc-disable {
+    color: #e2e2e2;
+}

+ 47 - 0
component/iView/action-sheet/index.js

@@ -0,0 +1,47 @@
+Component({
+    externalClasses: ['i-class', 'i-class-mask', 'i-class-header'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    properties: {
+        visible: {
+            type: Boolean,
+            value: false
+        },
+        maskClosable: {
+            type: Boolean,
+            value: true
+        },
+        showCancel: {
+            type: Boolean,
+            value: false
+        },
+        cancelText: {
+            type: String,
+            value: '取消'
+        },
+        actions: {
+            type: Array,
+            value: []
+        }
+    },
+
+    methods: {
+        handleClickMask () {
+            if (!this.data.maskClosable) return;
+            this.handleClickCancel();
+        },
+
+        handleClickItem ({ currentTarget = {} }) {
+            const dataset = currentTarget.dataset || {};
+            const { index } = dataset;
+            this.triggerEvent('click', { index });
+        },
+
+        handleClickCancel () {
+            this.triggerEvent('cancel');
+        }
+    }
+});

+ 8 - 0
component/iView/action-sheet/index.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents":
+  {
+    "i-button": "../button/index",
+    "i-icon": "../icon/index"
+  }
+}

+ 23 - 0
component/iView/action-sheet/index.wxml

@@ -0,0 +1,23 @@
+<view class="i-as-mask i-class-mask {{ visible ? 'i-as-mask-show' : '' }}" bindtap="handleClickMask"></view>
+<view class="i-class i-as {{ visible ? 'i-as-show' : '' }}">
+    <view class="i-as-header i-class-header"><slot name="header"></slot></view>
+    <view class="i-as-actions">
+        <view class="i-as-action-item" wx:for="{{ actions }}" wx:key="name">
+            <i-button
+                bind:click="handleClickItem"
+                data-index="{{ index }}"
+                open-type="{{ item.openType }}"
+                type="ghost"
+                size="large"
+                long
+            >
+                <view class="i-as-btn-loading" wx:if="{{ item.loading }}"></view>
+                <i-icon wx:if="{{ item.icon }}" type="{{ item.icon }}" i-class="i-as-btn-icon"></i-icon>
+                <view class="i-as-btn-text" style="{{ item.color ? 'color: ' + item.color : '' }}">{{ item.name }}</view>
+            </i-button>
+        </view>
+    </view>
+    <view class="i-as-cancel" wx:if="{{ showCancel }}">
+        <i-button i-class="i-as-cancel-btn" type="ghost" size="large" long="true" bind:click="handleClickCancel">{{ cancelText }}</i-button>
+    </view>
+</view>

+ 1 - 0
component/iView/action-sheet/index.wxss

@@ -0,0 +1 @@
+.i-as{position:fixed;width:100%;box-sizing:border-box;left:0;right:0;bottom:0;background:#f7f7f7;transform:translate3d(0,100%,0);transform-origin:center;transition:all .2s ease-in-out;z-index:900;visibility:hidden}.i-as-show{transform:translate3d(0,0,0);visibility:visible}.i-as-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);z-index:900;transition:all .2s ease-in-out;opacity:0;visibility:hidden}.i-as-mask-show{opacity:1;visibility:visible}.i-as-action-item{position:relative}.i-as-action-item::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px}.i-as-header{background:#fff;text-align:center;position:relative;font-size:12px;color:#80848f}.i-as-header::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px}.i-as-cancel{margin-top:6px}.i-as-btn-loading{display:inline-block;vertical-align:middle;margin-right:10px;width:12px;height:12px;background:0 0;border-radius:50%;border:2px solid #e5e5e5;border-color:#666 #e5e5e5 #e5e5e5 #e5e5e5;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-as-btn-text{display:inline-block;vertical-align:middle}.i-as-btn-icon{font-size:14px!important;margin-right:4px}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

+ 37 - 0
component/iView/alert/index.js

@@ -0,0 +1,37 @@
+Component({
+    externalClasses: ['i-class'],
+    options: {
+        multipleSlots: true
+    },
+    properties: {
+        //info, success, warning, error
+        type: {
+            type: String,
+            value: 'info'
+        },
+        closable: {
+            type: Boolean,
+            value: false
+        },
+        showIcon: {
+            type: Boolean,
+            default: false
+        },
+        desc: {
+            type: Boolean,
+            default: false
+        },
+    },
+    data: {
+        closed: false
+    },
+    methods: {
+        handleTap() {
+            this.setData({
+                closed: !this.data.closed,
+            });
+            this.triggerEvent('close');
+        },
+
+    }
+});

+ 7 - 0
component/iView/alert/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-icon": "../icon/index"
+    }
+}

+ 15 - 0
component/iView/alert/index.wxml

@@ -0,0 +1,15 @@
+<view class="i-class i-alert {{'i-alert-'+type}} {{showIcon?'i-alert-with-icon':''}} {{desc?'i-alert-with-desc':''}}" wx:if="{{!closed}}">
+    <view wx:if="{{ showIcon }}" class="i-alert-icon">
+        <i-icon type="prompt" wx:if="{{ type === 'info' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="success" wx:if="{{ type === 'success' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="warning" wx:if="{{ type === 'warning' }}" size="{{desc?24:16}}"></i-icon>
+        <i-icon type="delete" wx:if="{{ type === 'error' }}" size="{{desc?24:16}}"></i-icon>
+    </view>
+    <slot></slot>
+    <view class="i-alert-desc">
+        <slot name="desc"></slot>
+    </view>
+    <view class="i-alert-close" wx:if="{{ closable }}" bindtap="handleTap">
+        <i-icon type="close"></i-icon>
+    </view>
+</view>

+ 1 - 0
component/iView/alert/index.wxss

@@ -0,0 +1 @@
+.i-alert{position:relative;margin:10px;padding:8px 48px 8px 16px;font-size:14px;border-radius:2px;color:#fff;background:#f7f7f7;color:#495060}.i-alert.i-alert-with-icon{padding:8px 48px 8px 38px}.i-alert-info{color:#fff;background:#2db7f5}.i-alert-success{color:#fff;background:#19be6b}.i-alert-warning{color:#fff;background:#f90}.i-alert-error{color:#fff;background:#ed3f14}.i-alert-icon{position:absolute;top:9px;left:16px;font-size:14px}.i-alert-desc{font-size:12px}.i-alert-with-desc{padding:16px;position:relative}.i-alert-with-desc.i-alert-with-icon{padding:16px 16px 16px 69px}.i-alert-with-desc .i-alert-icon{top:50%;left:24px;margin-top:-21px;font-size:28px}.i-alert-close{font-size:12px;position:absolute;right:16px;top:8px;overflow:hidden;cursor:pointer}

+ 20 - 0
component/iView/avatar/index.js

@@ -0,0 +1,20 @@
+Component({
+    externalClasses: ['i-class'],
+
+    properties: {
+        // circle || square
+        shape: {
+            type: String,
+            value: 'circle'
+        },
+        // small || large || default
+        size: {
+            type: String,
+            value: 'default'
+        },
+        src: {
+            type: String,
+            value: ''
+        }
+    }
+});

+ 3 - 0
component/iView/avatar/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 4 - 0
component/iView/avatar/index.wxml

@@ -0,0 +1,4 @@
+<view class="i-class i-avatar i-avatar-{{ shape }} i-avatar-{{ size }} {{ src ? 'i-avatar-image' : '' }}">
+    <image src="{{ src }}" wx:if="{{ src !== '' }}"></image>
+    <view class="i-avatar-string" wx:else><slot></slot></view>
+</view>

+ 1 - 0
component/iView/avatar/index.wxss

@@ -0,0 +1 @@
+.i-avatar{display:inline-block;text-align:center;background:#ccc;color:#fff;white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;width:32px;height:32px;line-height:32px;border-radius:16px;font-size:18px}.i-avatar .ivu-avatar-string{line-height:32px}.i-avatar-large{width:40px;height:40px;line-height:40px;border-radius:20px;font-size:24px}.i-avatar-large .ivu-avatar-string{line-height:40px}.i-avatar-small{width:24px;height:24px;line-height:24px;border-radius:12px;font-size:14px}.i-avatar-small .ivu-avatar-string{line-height:24px}.i-avatar-image{background:0 0}.i-avatar-square{border-radius:4px}.i-avatar>image{width:100%;height:100%}

+ 29 - 0
component/iView/badge/index.js

@@ -0,0 +1,29 @@
+Component({
+    externalClasses: ['i-class', 'i-class-alone'],
+
+    properties: {
+        count: {
+            type: Number,
+            value: 0,
+            observer: 'finalCount'
+        },
+        overflowCount: {
+            type: Number,
+            value: 99
+        },
+        dot: {
+            type: Boolean,
+            value: false
+        },
+    },
+    data: {
+        finalCount: 0
+    },
+    methods: {
+        finalCount() {
+            this.setData({
+                finalCount: parseInt(this.data.count) >= parseInt(this.data.overflowCount) ? `${this.data.overflowCount}+` : this.data.count
+            });
+        },
+    }
+});

+ 3 - 0
component/iView/badge/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 5 - 0
component/iView/badge/index.wxml

@@ -0,0 +1,5 @@
+<view class="i-class i-badge">
+    <slot></slot>
+    <view class="i-badge-dot" wx:if="{{ dot }}"></view>
+    <view class="i-badge-count i-class-alone" wx:elif="{{ count !== 0 }}">{{ finalCount }}</view>
+</view>

+ 1 - 0
component/iView/badge/index.wxss

@@ -0,0 +1 @@
+.i-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.i-badge-count{position:absolute;transform:translateX(50%);top:-6px;right:0;height:18px;border-radius:9px;min-width:18px;background:#ed3f14;border:1px solid transparent;color:#fff;line-height:18px;text-align:center;padding:0 5px;font-size:12px;white-space:nowrap;transform-origin:-10% center;z-index:10;box-shadow:0 0 0 1px #fff;box-sizing:border-box;text-rendering:optimizeLegibility}.i-badge-count-alone{top:auto;display:block;position:relative;transform:translateX(0)}.i-badge-dot{position:absolute;transform:translateX(-50%);transform-origin:0 center;top:-4px;right:-8px;height:8px;width:8px;border-radius:100%;background:#ed3f14;z-index:10;box-shadow:0 0 0 1px #fff}

+ 37 - 0
component/iView/base/index.js

@@ -0,0 +1,37 @@
+function getCtx (selector) {
+    const pages = getCurrentPages();
+    const ctx = pages[pages.length - 1];
+
+    const componentCtx = ctx.selectComponent(selector);
+
+    if (!componentCtx) {
+        console.error('无法找到对应的组件,请按文档说明使用组件');
+        return null;
+    }
+    return componentCtx;
+}
+
+function Toast(options) {
+    const { selector = '#toast' } = options;
+    const ctx = getCtx(selector);
+
+    ctx.handleShow(options);
+}
+
+Toast.hide = function (selector = '#toast') {
+    const ctx = getCtx(selector);
+
+    ctx.handleHide();
+};
+
+function Message(options) {
+    const { selector = '#message' } = options;
+    const ctx = getCtx(selector);
+
+    ctx.handleShow(options);
+}
+
+module.exports = {
+    $Toast: Toast,
+    $Message: Message
+};

+ 80 - 0
component/iView/button/index.js

@@ -0,0 +1,80 @@
+Component({
+    externalClasses: ['i-class'],
+
+    properties: {
+        // default, primary, ghost, info, success, warning, error
+        type: {
+            type: String,
+            value: '',
+        },
+        inline: {
+            type: Boolean,
+            value: false
+        },
+        // default, large, small
+        size: {
+            type: String,
+            value: '',
+        },
+        // circle, square
+        shape: {
+            type: String,
+            value: 'square'
+        },
+        disabled: {
+            type: Boolean,
+            value: false,
+        },
+        loading: {
+            type: Boolean,
+            value: false,
+        },
+        long: {
+            type: Boolean,
+            value: false
+        },
+        openType: String,
+        appParameter: String,
+        hoverStopPropagation: Boolean,
+        hoverStartTime: {
+            type: Number,
+            value: 20
+        },
+        hoverStayTime: {
+            type: Number,
+            value: 70
+        },
+        lang: {
+            type: String,
+            value: 'en'
+        },
+        sessionFrom: {
+            type: String,
+            value: ''
+        },
+        sendMessageTitle: String,
+        sendMessagePath: String,
+        sendMessageImg: String,
+        showMessageCard: Boolean
+    },
+
+    methods: {
+        handleTap () {
+            if (this.data.disabled) return false;
+
+            this.triggerEvent('click');
+        },
+        bindgetuserinfo({ detail = {} } = {}) {
+            this.triggerEvent('getuserinfo', detail);
+        },
+        bindcontact({ detail = {} } = {}) {
+            this.triggerEvent('contact', detail);
+        },
+        bindgetphonenumber({ detail = {} } = {}) {
+            this.triggerEvent('getphonenumber', detail);
+        },
+        binderror({ detail = {} } = {}) {
+            this.triggerEvent('error', detail);
+        }
+    }
+});

+ 3 - 0
component/iView/button/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 20 - 0
component/iView/button/index.wxml

@@ -0,0 +1,20 @@
+<button
+    class="i-class i-btn {{ long ? 'i-btn-long' : '' }} {{ 'i-btn-' + size }} {{ 'i-btn-' + type }} {{ 'i-btn-' + shape }} {{ loading ? 'i-btn-loading' : '' }} {{ disabled ? 'i-btn-disabled' : ''}} {{ inline ? 'i-btn-inline' : '' }}"
+    hover-class="i-btn-hover"
+    bindtap="handleTap"
+    open-type="{{ openType }}"
+    app-parameter="{{ appParameter }}"
+    hover-stop-propagation="{{ hoverStopPropagation }}"
+    hover-start-time="{{ hoverStartTime }}"
+    hover-stay-time="{{ hoverStayTime }}"
+    session-from="{{ sessionFrom }}"
+    send-message-title="{{ sendMessageTitle }}"
+    send-message-path="{{ sendMessagePath }}"
+    send-message-img="{{ sendMessageImg }}"
+    show-message-card="{{ showMessageCard }}"
+    bindcontact="bindcontact"
+    bindgetuserinfo="bindgetuserinfo"
+    bindgetphonenumber="bindgetphonenumber"
+    binderror="binderror"
+    plain="true"
+><view class="i-btn-loading-inner" wx:if="{{loading}}"></view><slot></slot></button>

+ 1 - 0
component/iView/button/index.wxss

@@ -0,0 +1 @@
+.i-btn{text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;white-space:nowrap;user-select:none;font-size:14px;border-radius:2px;border:0!important;position:relative;text-decoration:none;height:44px;line-height:44px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);color:#fff!important;background:#f7f7f7!important;color:#495060!important;margin:10px}.i-btn-hover{opacity:.9}.i-btn-long{border-radius:0;margin:0;box-shadow:none}.i-btn-large{height:48px;line-height:48px}.i-btn-small{height:40px;line-height:40px}.i-btn-primary{color:#fff!important;background:#2d8cf0!important}.i-btn-ghost{color:#fff!important;background:#fff!important;color:#495060!important}.i-btn-success{color:#fff!important;background:#19be6b!important}.i-btn-warning{color:#fff!important;background:#f90!important}.i-btn-error{color:#fff!important;background:#ed3f14!important}.i-btn-info{color:#fff!important;background:#2db7f5!important}.i-btn-circle{border-radius:44px}.i-btn-large.i-btn-circle{border-radius:48px}.i-btn-small.i-btn-circle{border-radius:40px}.i-btn-loading{opacity:.6}.i-btn-loading-inner{display:inline-block;margin-right:12px;vertical-align:middle;width:14px;height:14px;background:0 0;border-radius:50%;border:2px solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-btn-disabled{color:#bbbec4!important;background:#f7f7f7!important}.i-btn-inline{display:inline-block}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}

+ 26 - 0
component/iView/card/index.js

@@ -0,0 +1,26 @@
+Component({
+    externalClasses: ['i-class'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    properties: {
+        full: {
+            type: Boolean,
+            value: false
+        },
+        thumb: {
+            type: String,
+            value: ''
+        },
+        title: {
+            type: String,
+            value: ''
+        },
+        extra: {
+            type: String,
+            value: ''
+        }
+    }
+});

+ 3 - 0
component/iView/card/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 11 - 0
component/iView/card/index.wxml

@@ -0,0 +1,11 @@
+<view class="i-class i-card {{ full ? 'i-card-full' : '' }}">
+    <view class="i-class i-card-header">
+        <view class="i-card-header-content">
+            <image class="i-card-header-thumb" src="{{ thumb }}" mode="aspectFit" wx:if="{{ thumb }}" />
+            {{ title }}
+        </view>
+        <view class="i-card-header-extra" wx:if="{{ extra }}">{{ extra }}</view>
+    </view>
+    <view class="i-class i-card-body"><slot name="content"></slot></view>
+    <view class="i-class i-card-footer"><slot name="footer"></slot></view>
+</view>

+ 84 - 0
component/iView/card/index.wxss

@@ -0,0 +1,84 @@
+.i-card {
+  margin: 0 16px;
+  font-size: 14px;
+  overflow: hidden;
+  position: relative;
+  background: #fff;
+  border: 1rpx solid #dddee1;
+  border-radius: 5px
+}
+
+.i-card-full {
+  margin: 0;
+  border-left: none;
+  border-right: none;
+  border-radius: 0
+}
+
+.i-card-header {
+  display: flex;
+  padding: 6px 16px;
+  align-items: center
+}
+
+.i-card-header-content {
+  flex: 1;
+  color: #0081ff;
+  font-size: 32rpx;
+  text-align: left
+}
+
+.i-card-header-thumb {
+  display: inline-block;
+  width: 64px;
+  height: 64px;
+  position: relative;
+  margin-left: auto;
+  margin-right: auto;
+  overflow: hidden;
+  background-size: cover;
+  vertical-align: middle
+}
+
+.i-card-header-title {
+  display: inline-block;
+  vertical-align: middle;
+  font-size: 14px;
+  color: #1c2438
+}
+
+.i-card-header-extra {
+  flex: 1;
+  text-align: right;
+  font-size: 14px;
+  color: #80848f
+}
+
+.i-card-body {
+  position: relative;
+  padding: 6px 16px;
+  color: #495060;
+  font-size: 14px
+}
+
+.i-card-body::before {
+  content: '';
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 200%;
+  height: 200%;
+  transform: scale(.5);
+  transform-origin: 0 0;
+  pointer-events: none;
+  box-sizing: border-box;
+  border: 0 solid #e9eaec;
+  border-top-width: 1px
+}
+
+.i-card-footer {
+  position: relative;
+  padding: 6px 16px;
+  color: #80848f;
+  font-size: 12px
+}

+ 33 - 0
component/iView/cell-group/index.js

@@ -0,0 +1,33 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../cell/index': {
+            type: 'child',
+            linked () {
+                this._updateIsLastCell();
+            },
+            linkChanged () {
+                this._updateIsLastCell();
+            },
+            unlinked () {
+                this._updateIsLastCell();
+            }
+        }
+    },
+
+    methods: {
+        _updateIsLastCell() {
+            let cells = this.getRelationNodes('../cell/index');
+            const len = cells.length;
+
+            if (len > 0) {
+                let lastIndex = len - 1;
+
+                cells.forEach((cell, index) => {
+                    cell.updateIsLastCell(index === lastIndex);
+                });
+            }
+        }
+    }
+});

+ 3 - 0
component/iView/cell-group/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 3 - 0
component/iView/cell-group/index.wxml

@@ -0,0 +1,3 @@
+<view class="i-class i-cell-group">
+    <slot></slot>
+</view>

+ 86 - 0
component/iView/cell/index.js

@@ -0,0 +1,86 @@
+const warn = (msg, getValue) => {
+    console.warn(msg);
+    console.log('接受到的值为:', getValue);
+};
+
+Component({
+    externalClasses: ['i-class'],
+
+    options: {
+        multipleSlots: true
+    },
+
+    relations: {
+        '../cell-group/index': {
+            type: 'parent'
+        }
+    },
+
+    properties: {
+        // 左侧标题
+        title: {
+            type: String
+        },
+        // 标题下方的描述信息
+        label: {
+            type: String
+        },
+        // 右侧内容
+        value: {
+            type: String
+        },
+        // 只有点击 footer 区域才触发 tab 事件
+        onlyTapFooter: {
+            type: Boolean
+        },
+        // 是否展示右侧箭头并开启尝试以 url 跳转
+        isLink: {
+            type: null,
+            value: ''
+        },
+        // 链接类型,可选值为 navigateTo,redirectTo,switchTab,reLaunch
+        linkType: {
+            type: String,
+            value: 'navigateTo'
+        },
+        url: {
+            type: String,
+            value: ''
+        }
+    },
+
+    data: {
+        isLastCell: true
+    },
+
+    methods: {
+        navigateTo () {
+            const { url } = this.data;
+            const type = typeof this.data.isLink;
+
+            this.triggerEvent('click', {});
+
+            if (!this.data.isLink || !url || url === 'true' || url === 'false') return;
+
+            if (type !== 'boolean' && type !== 'string') {
+                warn('isLink 属性值必须是一个字符串或布尔值', this.data.isLink);
+                return;
+            }
+
+            if (['navigateTo', 'redirectTo', 'switchTab', 'reLaunch'].indexOf(this.data.linkType) === -1) {
+                warn('linkType 属性可选值为 navigateTo,redirectTo,switchTab,reLaunch', this.data.linkType);
+                return;
+            }
+            wx[this.data.linkType].call(wx, {url});
+        },
+        handleTap () {
+            if (!this.data.onlyTapFooter) {
+                this.navigateTo();
+            }
+        },
+
+        updateIsLastCell (isLastCell) {
+            this.setData({ isLastCell });
+        }
+    }
+});

+ 3 - 0
component/iView/cell/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 16 - 0
component/iView/cell/index.wxml

@@ -0,0 +1,16 @@
+<view bindtap="handleTap" class="i-class i-cell {{ isLastCell ? 'i-cell-last' : '' }} {{ isLink ? 'i-cell-access' : '' }}">
+    <view class="i-cell-icon">
+        <slot name="icon"></slot>
+    </view>
+    <view class="i-cell-bd">
+        <view wx:if="{{ title }}" class="i-cell-text">{{ title }}</view>
+        <view wx:if="{{ label }}" class="i-cell-desc">{{ label }}</view>
+        <slot></slot>
+    </view>
+    <view catchtap="navigateTo" class="i-cell-ft">
+        <block wx:if="{{value}}">{{ value }}</block>
+        <block wx:else>
+            <slot name="footer"></slot>
+        </block>
+    </view>
+</view>

+ 1 - 0
component/iView/cell/index.wxss

@@ -0,0 +1 @@
+.i-cell{position:relative;padding:12px 15px;display:flex;background:#fff;align-items:center;line-height:1.4;font-size:14px;overflow:hidden}.i-cell::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px;left:15px;right:0}.i-cell-last::after{display:none}.i-cell-icon{margin-right:5px}.i-cell-icon:empty{display:none}.i-cell-bd{flex:1}.i-cell-text{line-height:24px;font-size:14px}.i-cell-desc{line-height:1.2;font-size:12px;color:#80848f}.i-cell-ft{position:relative;text-align:right;color:#495060}.i-cell-access .i-cell-ft{padding-right:13px}.i-cell-access .i-cell-ft::after{content:" ";display:inline-block;width:6px;height:6px;position:absolute;top:50%;right:2px;border-width:2px 2px 0 0;border-color:#dddee1;border-style:solid;transform:translateY(-50%) matrix(.71,.71,-.71,.71,0,0)}

+ 38 - 0
component/iView/checkbox-group/index.js

@@ -0,0 +1,38 @@
+Component({
+    externalClasses: ['i-class'],
+    relations: {
+        '../checkbox/index': {
+            type: 'child',
+            linked() {
+                this.changeCurrent();
+            },
+            linkChanged() {
+                this.changeCurrent();
+            },
+            unlinked() {
+                this.changeCurrent();
+            }
+        }
+    },
+    properties: {
+        current: {
+            type: Array,
+            value: [],
+            observer: 'changeCurrent'
+        },
+    },
+    methods: {
+        changeCurrent(val = this.data.current) {
+            let items = this.getRelationNodes('../checkbox/index');
+            const len = items.length;
+            if (len > 0) {
+                items.forEach(item => {
+                    item.changeCurrent(val.indexOf(item.data.value) !== -1);
+                });
+            }
+        },
+        emitEvent(current) {
+            this.triggerEvent('change', current);
+        }
+    }
+});

+ 7 - 0
component/iView/checkbox-group/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-cell-group": "../cell-group/index"
+    }
+}

+ 3 - 0
component/iView/checkbox-group/index.wxml

@@ -0,0 +1,3 @@
+<i-cell-group class="i-class">
+    <slot></slot>
+</i-cell-group>

+ 0 - 0
component/iView/checkbox-group/index.wxss


+ 56 - 0
component/iView/checkbox/index.js

@@ -0,0 +1,56 @@
+const prefixCls = 'i-checkbox';
+
+Component({
+    externalClasses: ['i-class'],
+    relations: {
+        '../checkbox-group/index': {
+            type: 'parent'
+        }
+    },
+    properties: {
+        value: {
+            type: String,
+            value: ''
+        },
+        checked: {
+            type: Boolean,
+            value: false
+        },
+        disabled: {
+            type: Boolean,
+            value: false
+        },
+        color: {
+            type: String,
+            value: '#2d8cf0'
+        },
+        position: {
+            type: String,
+            value: 'left', //left right
+            observer: 'setPosition'
+        }
+    },
+    data: {
+        checked: true,
+        positionCls: `${prefixCls}-checkbox-left`,
+    },
+    attached() {
+        this.setPosition();
+    },
+    methods: {
+        changeCurrent(current) {
+            this.setData({ checked: current });
+        },
+        checkboxChange() {
+            if (this.data.disabled) return;
+            const item = { current: !this.data.checked, value: this.data.value };
+            const parent = this.getRelationNodes('../checkbox-group/index')[0];
+            parent ? parent.emitEvent(item) : this.triggerEvent('change', item);
+        },
+        setPosition() {
+            this.setData({
+                positionCls: this.data.position.indexOf('left') !== -1 ? `${prefixCls}-checkbox-left` : `${prefixCls}-checkbox-right`,
+            });
+        }
+    }
+});

+ 7 - 0
component/iView/checkbox/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents":
+    {
+        "i-cell": "../cell/index"
+    }
+}

+ 8 - 0
component/iView/checkbox/index.wxml

@@ -0,0 +1,8 @@
+<view class="i-class i-checkbox" catchtap="checkboxChange">
+    <i-cell i-class="i-checkbox-cell">
+        <label>
+            <radio value="{{value}}" checked="{{checked}}" color="{{checked?color:''}}" disabled="{{disabled}}" class="i-checkbox-radio {{positionCls}}" />
+            <view class="i-checkbox-title">{{value}}</view>
+        </label>
+    </i-cell>
+</view>

+ 1 - 0
component/iView/checkbox/index.wxss

@@ -0,0 +1 @@
+.i-checkbox-cell::after{display:block}.i-checkbox-checkbox-left{float:left}.i-checkbox-checkbox-right{float:right}.i-checkbox-radio{vertical-align:middle}.i-checkbox-title{display:inline-block;vertical-align:middle}

+ 20 - 0
component/iView/col/index.js

@@ -0,0 +1,20 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../row/index': {
+            type: 'parent'
+        }
+    },
+
+    properties: {
+        span: {
+            value: 0,
+            type: Number
+        },
+        offset: {
+            value: 0,
+            type: Number
+        }
+    }
+});

+ 3 - 0
component/iView/col/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
component/iView/col/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-col {{ span ? 'i-col-span-' + span : '' }} {{ offset ? 'i-col-offset-' + offset : '' }}"><slot></slot></view>

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
component/iView/col/index.wxss


+ 46 - 0
component/iView/collapse-item/index.js

@@ -0,0 +1,46 @@
+Component({
+    externalClasses: ['i-class-content', 'i-class-title', 'i-class'],
+
+    relations: {
+        '../collapse/index': {
+            type: 'parent',
+            linked: function (target) {
+                const options = {
+                    accordion: target.data.accordion
+                }
+                if (target.data.name === this.data.name) {
+                    options.showContent = 'i-collapse-item-show-content';
+                }
+                this.setData(options);
+            }
+        }
+    },
+
+    properties: {
+        title: String,
+        name: String
+    },
+
+    data: {
+        showContent: '',
+        accordion: false
+    },
+
+    options: {
+        multipleSlots: true
+    },
+
+    methods: {
+        trigger(e) {
+            const data = this.data;
+            if (data.accordion) {
+                this.triggerEvent('collapse', {name: data.name}, {composed: true, bubbles: true});
+            } else {
+                this.setData({
+                    showContent: data.showContent ? '' : 'i-collapse-item-show-content'
+                });
+            }
+        },
+    }
+});
+

+ 7 - 0
component/iView/collapse-item/index.json

@@ -0,0 +1,7 @@
+
+{
+  "component": true,
+  "usingComponents": {
+    "i-icon": "../icon/index"
+  }
+}

+ 9 - 0
component/iView/collapse-item/index.wxml

@@ -0,0 +1,9 @@
+<view id="{{name}}" class="i-class i-collapse-item ">
+    <view class="i-collapse-item-title-wrap" bindtap="trigger">
+        <i-icon size="16" type="enter" i-class="{{ showContent ? 'i-collapse-item-arrow-show' : 'i-collapse-item-arrow' }}"/>
+        <text class="i-collapse-item-title i-class-title">{{title}}</text>
+    </view>
+    <view class="i-collapse-item-content {{showContent}}  i-class-content">
+        <slot name="content"></slot>
+    </view>
+</view>

+ 1 - 0
component/iView/collapse-item/index.wxss

@@ -0,0 +1 @@
+.i-collapse-item{padding:2px 8px;border-top:1px solid #dddee1}.i-collapse-item-title{vertical-align:middle}.i-collapse-item-title-wrap{padding:2px 0 0}.i-collapse-item-content{padding:6px;display:none}.i-collapse-item-show-content{display:block}.i-collapse-item-arrow{transition:transform .2s ease-in-out}.i-collapse-item-arrow-show{transition:transform .2s ease-in-out;transform:rotate(90deg)}

+ 31 - 0
component/iView/collapse/index.js

@@ -0,0 +1,31 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../collapse-item/index': {
+            type: 'child'
+        }
+    },
+    properties: {
+        name: String,
+        accordion: Boolean
+    },
+    methods: {
+        clickfn(e) {
+            const params = e.detail;
+            const allList = this.getRelationNodes('../collapse-item/index');
+            allList.forEach((item) => {
+                if (params.name === item.data.name) {
+                    item.setData({
+                        showContent: 'i-collapse-item-show-content'
+                    });
+                } else {
+                    item.setData({
+                        showContent: ''
+                    });
+                }
+            });
+        },
+    }
+});
+

+ 3 - 0
component/iView/collapse/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 4 - 0
component/iView/collapse/index.wxml

@@ -0,0 +1,4 @@
+<view class="i-class i-collapse" bindcollapse="clickfn">
+  <slot></slot>
+</view>
+

+ 0 - 0
component/iView/collapse/index.wxss


+ 90 - 0
component/iView/count-down/index.js

@@ -0,0 +1,90 @@
+Component({
+    properties: {
+        target: Number,
+        showDay: Boolean,
+        callback: String,
+        format: Array,
+        clearTimer: Boolean
+    },
+    externalClasses: ['countdown-class'],
+    data: {
+        time: '',
+        resultFormat: [],
+        changeFormat: false
+    },
+    ready() {
+        this.getFormat();
+
+    },
+    methods: {
+        getFormat() {
+            const data = this.data;
+            const len = data.format.length;
+
+            if (!data.showDay) data.resultFormat.push('');
+
+            if (len >= 3) {
+                for (let i = 0; i < len; i++) {
+                    if (data.resultFormat.length >= 4) break;
+                    if (data.format[i]) {
+                        data.resultFormat.push(data.format[i].toString());
+                    }
+                }
+
+                if (data.resultFormat.length >= 4) data.changeFormat = true;
+            }
+
+            this.getLastTime();
+        },
+        init() {
+            const self = this;
+            setTimeout(function () {
+                self.getLastTime.call(self);
+            }, 1000);
+        },
+        getLastTime() {
+            const data = this.data;
+            const gapTime = Math.ceil((data.target - new Date().getTime()) / 1000);
+            let result = '';
+            let time = '00:00:00';
+            let day = '00';
+            const format = data.resultFormat;
+
+            if (gapTime > 0) {
+                day = this.formatNum(parseInt(gapTime / 86400));
+                let lastTime = gapTime % 86400;
+                const hour = this.formatNum(parseInt(lastTime / 3600));
+                lastTime = lastTime % 3600;
+                const minute = this.formatNum(parseInt(lastTime / 60));
+                const second = this.formatNum(lastTime % 60);
+
+                if (data.changeFormat) time = `${hour}${format[1]}${minute}${format[2]}${second}${format[3]}`;
+                else time = `${hour}:${minute}:${second}`;
+
+                if (!data.clearTimer) this.init.call(this);
+            } else {
+                this.endfn();
+            }
+
+            if (data.showDay) {
+                if (data.changeFormat) {
+                    result = `${day}${format[0]} ${time}`;
+                } else {
+                    result = `${day}d ${time}`;
+                }
+            } else {
+                result = time;
+            }
+            this.setData({
+                time: result
+            });
+
+        },
+        formatNum(num) {
+            return num > 9 ? num : `0${num}`;
+        },
+        endfn() {
+            this.triggerEvent('callback', {});
+        }
+    }
+});

+ 4 - 0
component/iView/count-down/index.json

@@ -0,0 +1,4 @@
+
+{
+  "component": true
+}

+ 4 - 0
component/iView/count-down/index.wxml

@@ -0,0 +1,4 @@
+<span class="countdown-class">
+  {{time}}
+</span>
+

+ 0 - 0
component/iView/count-down/index.wxss


+ 25 - 0
component/iView/divider/index.js

@@ -0,0 +1,25 @@
+Component({
+    externalClasses: ['i-class'],
+    properties: {
+        content: {
+            type: String,
+            value: ''
+        },
+        height : {
+            type: Number,
+            value: 48
+        },
+        color : {
+            type : String,
+            value : '#80848f'
+        },
+        lineColor : {
+            type : String,
+            value : '#e9eaec'
+        },
+        size : {
+            type: String,
+            value: 12
+        }
+    }
+});

+ 3 - 0
component/iView/divider/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 19 - 0
component/iView/divider/index.wxml

@@ -0,0 +1,19 @@
+<view class="i-divider i-class" style="{{parse.getStyle(color,size,height)}}">
+    <view class="i-divider-content" wx:if="{{content !== ''}}">
+        {{content}}
+    </view>
+    <view class="i-divider-content" wx:else>
+        <slot></slot>
+    </view>
+    <view class="i-divider-line" style="background:{{lineColor}}"></view>
+</view>
+<wxs module="parse">
+    module.exports = {
+        getStyle : function(color,size,height){
+            var color = 'color:' + color +';';
+            var size = 'font-size:' + size + 'px;';
+            var height = 'height:' + height+'px;'      
+            return color + size + height;
+        }
+    }
+</wxs>

+ 1 - 0
component/iView/divider/index.wxss

@@ -0,0 +1 @@
+.i-divider{width:100%;text-align:center;font-size:12px;position:relative;display:flex;align-items:center;justify-content:center}.i-divider-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-divider-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px}

+ 33 - 0
component/iView/drawer/index.js

@@ -0,0 +1,33 @@
+Component({
+    externalClasses: ['i-class'],
+    properties: {
+        visible: {
+            type: Boolean,
+            value: false
+        },
+
+        mask: {
+            type: Boolean,
+            value: true
+        },
+
+        maskClosable: {
+            type: Boolean,
+            value: true
+        },
+
+        mode: {
+            type: String,
+            value: 'left' // left right
+        }
+    },
+    data: {},
+    methods: {
+        handleMaskClick() {
+            if (!this.data.maskClosable) {
+                return;
+            }
+            this.triggerEvent('close', {});
+        }
+    }
+});

+ 3 - 0
component/iView/drawer/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 6 - 0
component/iView/drawer/index.wxml

@@ -0,0 +1,6 @@
+<view class="i-class i-drawer {{ visible ? 'i-drawer-show' : '' }} {{ 'i-drawer-' + mode }}">
+    <view wx:if="{{ mask }}" class="i-drawer-mask" bindtap="handleMaskClick"></view>
+    <view class="i-drawer-container">
+        <slot></slot>
+    </view>
+</view>

+ 1 - 0
component/iView/drawer/index.wxss

@@ -0,0 +1 @@
+.i-drawer{visibility:hidden}.i-drawer-show{visibility:visible}.i-drawer-show .i-drawer-mask{display:block;opacity:1}.i-drawer-show .i-drawer-container{opacity:1}.i-drawer-show.i-drawer-left .i-drawer-container,.i-drawer-show.i-drawer-right .i-drawer-container{transform:translate3d(0,-50%,0)}.i-drawer-mask{opacity:0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:6;background:rgba(0,0,0,.6);transition:all .3s ease-in-out}.i-drawer-container{position:fixed;left:50%;top:50%;transform:translate3d(-50%,-50%,0);transform-origin:center;transition:all .3s ease-in-out;z-index:7;opacity:0}.i-drawer-left .i-drawer-container{left:0;top:50%;transform:translate3d(-100%,-50%,0)}.i-drawer-right .i-drawer-container{right:0;top:50%;left:auto;transform:translate3d(100%,-50%,0)}

+ 10 - 0
component/iView/grid-icon/index.js

@@ -0,0 +1,10 @@
+Component({
+    externalClasses: ['i-class'],
+
+    relations: {
+        '../grid-item/index': {
+            type: 'parent'
+        }
+    },
+
+});

+ 3 - 0
component/iView/grid-icon/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 1 - 0
component/iView/grid-icon/index.wxml

@@ -0,0 +1 @@
+<view class="i-class i-grid-icon"><slot></slot></view>

+ 1 - 0
component/iView/grid-icon/index.wxss

@@ -0,0 +1 @@
+.i-grid-icon{display:block;width:28px;height:28px;margin:0 auto}.i-grid-icon image{width:100%;height:100%}

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff