From 5aad954ffa600b49654ae3f87339c6e26c406235 Mon Sep 17 00:00:00 2001 From: jiechaowu Date: Fri, 7 Feb 2020 03:45:40 +0800 Subject: [PATCH] feat: 1. add tabbar; 2. traffic ui improve --- miniprogram/app.json | 21 +- .../components/actionsheet/actionsheet.js | 170 +++++ .../components/actionsheet/actionsheet.json | 4 + .../components/actionsheet/actionsheet.wxml | 50 ++ .../components/actionsheet/actionsheet.wxss | 1 + miniprogram/components/badge/badge.js | 114 ++++ miniprogram/components/badge/badge.json | 4 + miniprogram/components/badge/badge.wxml | 1 + miniprogram/components/badge/badge.wxss | 1 + miniprogram/components/cell/cell.js | 219 +++++++ miniprogram/components/cell/cell.json | 6 + miniprogram/components/cell/cell.wxml | 73 +++ miniprogram/components/cell/cell.wxss | 1 + miniprogram/components/cells/cells.js | 174 ++++++ miniprogram/components/cells/cells.json | 4 + miniprogram/components/cells/cells.wxml | 8 + .../checkbox-group/checkbox-group.js | 203 ++++++ .../checkbox-group/checkbox-group.json | 6 + .../checkbox-group/checkbox-group.wxml | 6 + .../checkbox-group/checkbox-group.wxss | 0 miniprogram/components/checkbox/checkbox.js | 172 +++++ miniprogram/components/checkbox/checkbox.json | 7 + miniprogram/components/checkbox/checkbox.wxml | 15 + miniprogram/components/checkbox/checkbox.wxss | 1 + miniprogram/components/dialog/dialog.js | 168 +++++ miniprogram/components/dialog/dialog.json | 4 + miniprogram/components/dialog/dialog.wxml | 21 + miniprogram/components/dialog/dialog.wxss | 1 + miniprogram/components/emoji/index.js | 193 ++++++ miniprogram/components/emoji/index.json | 5 + miniprogram/components/emoji/index.wxml | 25 + miniprogram/components/emoji/index.wxss | 1 + miniprogram/components/form-page/form-page.js | 131 ++++ .../components/form-page/form-page.json | 4 + .../components/form-page/form-page.wxml | 33 + .../components/form-page/form-page.wxss | 1 + miniprogram/components/form/form.js | 591 ++++++++++++++++++ miniprogram/components/form/form.json | 4 + miniprogram/components/form/form.wxml | 3 + miniprogram/components/gallery/gallery.js | 172 +++++ miniprogram/components/gallery/gallery.json | 4 + miniprogram/components/gallery/gallery.wxml | 13 + miniprogram/components/gallery/gallery.wxss | 1 + .../half-screen-dialog/half-screen-dialog.js | 165 +++++ .../half-screen-dialog.json | 4 + .../half-screen-dialog.wxml | 43 ++ .../half-screen-dialog.wxss | 1 + miniprogram/components/icon/icon.js | 295 +++++++++ miniprogram/components/icon/icon.json | 4 + miniprogram/components/icon/icon.wxml | 14 + miniprogram/components/icon/icon.wxss | 1 + miniprogram/components/index-list/index.js | 249 ++++++++ miniprogram/components/index-list/index.json | 4 + miniprogram/components/index-list/index.wxml | 33 + miniprogram/components/index-list/index.wxss | 1 + miniprogram/components/loading/loading.js | 181 ++++++ miniprogram/components/loading/loading.json | 4 + miniprogram/components/loading/loading.wxml | 9 + miniprogram/components/loading/loading.wxss | 1 + miniprogram/components/msg/msg.js | 132 ++++ miniprogram/components/msg/msg.json | 4 + miniprogram/components/msg/msg.wxml | 24 + miniprogram/components/msg/msg.wxss | 1 + .../navigation-bar/navigation-bar.js | 189 ++++++ .../navigation-bar/navigation-bar.json | 4 + .../navigation-bar/navigation-bar.wxml | 32 + .../navigation-bar/navigation-bar.wxss | 1 + miniprogram/components/searchbar/searchbar.js | 209 +++++++ .../components/searchbar/searchbar.json | 7 + .../components/searchbar/searchbar.wxml | 21 + .../components/searchbar/searchbar.wxss | 1 + miniprogram/components/slideview/slideview.js | 205 ++++++ .../components/slideview/slideview.json | 4 + .../components/slideview/slideview.wxml | 23 + .../components/slideview/slideview.wxs | 243 +++++++ .../components/slideview/slideview.wxss | 1 + miniprogram/components/tabbar/tabbar.js | 131 ++++ miniprogram/components/tabbar/tabbar.json | 6 + miniprogram/components/tabbar/tabbar.wxml | 10 + miniprogram/components/tabbar/tabbar.wxss | 1 + miniprogram/components/tabs/index.js | 148 +++++ miniprogram/components/tabs/index.json | 4 + miniprogram/components/tabs/index.wxml | 20 + miniprogram/components/tabs/index.wxss | 1 + miniprogram/components/toptips/toptips.js | 170 +++++ miniprogram/components/toptips/toptips.json | 4 + miniprogram/components/toptips/toptips.wxml | 6 + miniprogram/components/toptips/toptips.wxss | 1 + miniprogram/components/uploader/uploader.js | 261 ++++++++ miniprogram/components/uploader/uploader.json | 6 + miniprogram/components/uploader/uploader.wxml | 36 ++ miniprogram/components/uploader/uploader.wxss | 1 + miniprogram/components/video-swiper/index.js | 254 ++++++++ .../components/video-swiper/index.json | 4 + .../components/video-swiper/index.wxml | 37 ++ .../components/video-swiper/index.wxss | 1 + miniprogram/images/qr-code-active.png | Bin 0 -> 2897 bytes miniprogram/images/qr-code-default.png | Bin 0 -> 2835 bytes miniprogram/images/user-active.png | Bin 0 -> 5187 bytes miniprogram/images/user-default.png | Bin 0 -> 3868 bytes miniprogram/lib/weui-miniprogram/index.js | 100 +++ miniprogram/lib/weui-miniprogram/index.json | 24 + miniprogram/lib/weui-miniprogram/package.json | 7 + .../static/icon/s-arrow-back.png | Bin 0 -> 987 bytes .../static/icon/s-arrow-back.svg | 20 + .../weui-wxss/dist/style/weui.wxss | 6 + miniprogram/pages/focus/focus.js | 120 ++++ miniprogram/pages/focus/focus.json | 3 + miniprogram/pages/focus/focus.wxml | 8 + miniprogram/pages/focus/focus.wxss | 1 + miniprogram/pages/index/index.js | 133 ++-- miniprogram/pages/index/index.json | 13 +- miniprogram/pages/index/index.wxml | 131 +++- miniprogram/pages/index/index.wxss | 59 ++ 114 files changed, 6403 insertions(+), 70 deletions(-) create mode 100644 miniprogram/components/actionsheet/actionsheet.js create mode 100644 miniprogram/components/actionsheet/actionsheet.json create mode 100644 miniprogram/components/actionsheet/actionsheet.wxml create mode 100644 miniprogram/components/actionsheet/actionsheet.wxss create mode 100644 miniprogram/components/badge/badge.js create mode 100644 miniprogram/components/badge/badge.json create mode 100644 miniprogram/components/badge/badge.wxml create mode 100644 miniprogram/components/badge/badge.wxss create mode 100644 miniprogram/components/cell/cell.js create mode 100644 miniprogram/components/cell/cell.json create mode 100644 miniprogram/components/cell/cell.wxml create mode 100644 miniprogram/components/cell/cell.wxss create mode 100644 miniprogram/components/cells/cells.js create mode 100644 miniprogram/components/cells/cells.json create mode 100644 miniprogram/components/cells/cells.wxml create mode 100644 miniprogram/components/checkbox-group/checkbox-group.js create mode 100644 miniprogram/components/checkbox-group/checkbox-group.json create mode 100644 miniprogram/components/checkbox-group/checkbox-group.wxml create mode 100644 miniprogram/components/checkbox-group/checkbox-group.wxss create mode 100644 miniprogram/components/checkbox/checkbox.js create mode 100644 miniprogram/components/checkbox/checkbox.json create mode 100644 miniprogram/components/checkbox/checkbox.wxml create mode 100644 miniprogram/components/checkbox/checkbox.wxss create mode 100644 miniprogram/components/dialog/dialog.js create mode 100644 miniprogram/components/dialog/dialog.json create mode 100644 miniprogram/components/dialog/dialog.wxml create mode 100644 miniprogram/components/dialog/dialog.wxss create mode 100644 miniprogram/components/emoji/index.js create mode 100644 miniprogram/components/emoji/index.json create mode 100644 miniprogram/components/emoji/index.wxml create mode 100644 miniprogram/components/emoji/index.wxss create mode 100644 miniprogram/components/form-page/form-page.js create mode 100644 miniprogram/components/form-page/form-page.json create mode 100644 miniprogram/components/form-page/form-page.wxml create mode 100644 miniprogram/components/form-page/form-page.wxss create mode 100644 miniprogram/components/form/form.js create mode 100644 miniprogram/components/form/form.json create mode 100644 miniprogram/components/form/form.wxml create mode 100644 miniprogram/components/gallery/gallery.js create mode 100644 miniprogram/components/gallery/gallery.json create mode 100644 miniprogram/components/gallery/gallery.wxml create mode 100644 miniprogram/components/gallery/gallery.wxss create mode 100644 miniprogram/components/half-screen-dialog/half-screen-dialog.js create mode 100644 miniprogram/components/half-screen-dialog/half-screen-dialog.json create mode 100644 miniprogram/components/half-screen-dialog/half-screen-dialog.wxml create mode 100644 miniprogram/components/half-screen-dialog/half-screen-dialog.wxss create mode 100644 miniprogram/components/icon/icon.js create mode 100644 miniprogram/components/icon/icon.json create mode 100644 miniprogram/components/icon/icon.wxml create mode 100644 miniprogram/components/icon/icon.wxss create mode 100644 miniprogram/components/index-list/index.js create mode 100644 miniprogram/components/index-list/index.json create mode 100644 miniprogram/components/index-list/index.wxml create mode 100644 miniprogram/components/index-list/index.wxss create mode 100644 miniprogram/components/loading/loading.js create mode 100644 miniprogram/components/loading/loading.json create mode 100644 miniprogram/components/loading/loading.wxml create mode 100644 miniprogram/components/loading/loading.wxss create mode 100644 miniprogram/components/msg/msg.js create mode 100644 miniprogram/components/msg/msg.json create mode 100644 miniprogram/components/msg/msg.wxml create mode 100644 miniprogram/components/msg/msg.wxss create mode 100644 miniprogram/components/navigation-bar/navigation-bar.js create mode 100644 miniprogram/components/navigation-bar/navigation-bar.json create mode 100644 miniprogram/components/navigation-bar/navigation-bar.wxml create mode 100644 miniprogram/components/navigation-bar/navigation-bar.wxss create mode 100644 miniprogram/components/searchbar/searchbar.js create mode 100644 miniprogram/components/searchbar/searchbar.json create mode 100644 miniprogram/components/searchbar/searchbar.wxml create mode 100644 miniprogram/components/searchbar/searchbar.wxss create mode 100644 miniprogram/components/slideview/slideview.js create mode 100644 miniprogram/components/slideview/slideview.json create mode 100644 miniprogram/components/slideview/slideview.wxml create mode 100644 miniprogram/components/slideview/slideview.wxs create mode 100644 miniprogram/components/slideview/slideview.wxss create mode 100644 miniprogram/components/tabbar/tabbar.js create mode 100644 miniprogram/components/tabbar/tabbar.json create mode 100644 miniprogram/components/tabbar/tabbar.wxml create mode 100644 miniprogram/components/tabbar/tabbar.wxss create mode 100644 miniprogram/components/tabs/index.js create mode 100644 miniprogram/components/tabs/index.json create mode 100644 miniprogram/components/tabs/index.wxml create mode 100644 miniprogram/components/tabs/index.wxss create mode 100644 miniprogram/components/toptips/toptips.js create mode 100644 miniprogram/components/toptips/toptips.json create mode 100644 miniprogram/components/toptips/toptips.wxml create mode 100644 miniprogram/components/toptips/toptips.wxss create mode 100644 miniprogram/components/uploader/uploader.js create mode 100644 miniprogram/components/uploader/uploader.json create mode 100644 miniprogram/components/uploader/uploader.wxml create mode 100644 miniprogram/components/uploader/uploader.wxss create mode 100644 miniprogram/components/video-swiper/index.js create mode 100644 miniprogram/components/video-swiper/index.json create mode 100644 miniprogram/components/video-swiper/index.wxml create mode 100644 miniprogram/components/video-swiper/index.wxss create mode 100644 miniprogram/images/qr-code-active.png create mode 100644 miniprogram/images/qr-code-default.png create mode 100644 miniprogram/images/user-active.png create mode 100644 miniprogram/images/user-default.png create mode 100644 miniprogram/lib/weui-miniprogram/index.js create mode 100644 miniprogram/lib/weui-miniprogram/index.json create mode 100644 miniprogram/lib/weui-miniprogram/package.json create mode 100644 miniprogram/lib/weui-miniprogram/static/icon/s-arrow-back.png create mode 100644 miniprogram/lib/weui-miniprogram/static/icon/s-arrow-back.svg create mode 100644 miniprogram/lib/weui-miniprogram/weui-wxss/dist/style/weui.wxss create mode 100644 miniprogram/pages/focus/focus.js create mode 100644 miniprogram/pages/focus/focus.json create mode 100644 miniprogram/pages/focus/focus.wxml create mode 100644 miniprogram/pages/focus/focus.wxss diff --git a/miniprogram/app.json b/miniprogram/app.json index 13d5385..962b92f 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -15,7 +15,8 @@ "pages/im/room/room", "pages/room/room", "pages/report/report", - "pages/report/list" + "pages/report/list", + "pages/focus/focus" ], "window": { "backgroundColor": "#F6F6F6", @@ -25,5 +26,21 @@ "navigationBarTextStyle": "black" }, "sitemapLocation": "sitemap.json", - "style": "v2" + "style": "v2", + "tabBar": { + "list": [ + { + "pagePath": "pages/index/index", + "text": "行车登记", + "iconPath": "./images/qr-code-default.png", + "selectedIconPath": "./images/qr-code-active.png" + }, + { + "pagePath": "pages/focus/focus", + "text": "我的关注", + "iconPath": "./images/user-default.png", + "selectedIconPath": "./images/user-active.png" + } + ] + } } \ No newline at end of file diff --git a/miniprogram/components/actionsheet/actionsheet.js b/miniprogram/components/actionsheet/actionsheet.js new file mode 100644 index 0000000..25e9fae --- /dev/null +++ b/miniprogram/components/actionsheet/actionsheet.js @@ -0,0 +1,170 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + title: { + type: String, + value: '' + }, + showCancel: { + type: Boolean, + value: true + }, + cancelText: { + type: String, + value: '取消' + }, + maskClass: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + maskClosable: { + type: Boolean, + value: true + }, + mask: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: false + }, + actions: { + type: Array, + value: [], + observer: '_groupChange' + } + }, + methods: { + _groupChange: function _groupChange(e) { + if (e.length > 0 && typeof e[0] !== 'string' && !(e[0] instanceof Array)) { + this.setData({ + actions: [this.data.actions] + }); + } + }, + buttonTap: function buttonTap(e) { + var _e$currentTarget$data = e.currentTarget.dataset, + value = _e$currentTarget$data.value, + groupindex = _e$currentTarget$data.groupindex, + index = _e$currentTarget$data.index; + + this.triggerEvent('actiontap', { value: value, groupindex: groupindex, index: index }); + }, + closeActionSheet: function closeActionSheet(e) { + var type = e.currentTarget.dataset.type; + + if (this.data.maskClosable || type) { + this.setData({ + show: false + }); + this.triggerEvent('close'); + } + } + } +}); + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/miniprogram/components/actionsheet/actionsheet.json b/miniprogram/components/actionsheet/actionsheet.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/actionsheet/actionsheet.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/actionsheet/actionsheet.wxml b/miniprogram/components/actionsheet/actionsheet.wxml new file mode 100644 index 0000000..0b41d0d --- /dev/null +++ b/miniprogram/components/actionsheet/actionsheet.wxml @@ -0,0 +1,50 @@ + + var join = function(a,b) { + return a+b + }; + var isNotSlot = function(v) { + return typeof v !== 'string' + } + module.exports = { + join: join, + isNotSlot: isNotSlot + } + + + + + + + + {{title}} + + + + + + + {{item.text}} + + + + + + + {{cancelText}} + + diff --git a/miniprogram/components/actionsheet/actionsheet.wxss b/miniprogram/components/actionsheet/actionsheet.wxss new file mode 100644 index 0000000..ebbba8f --- /dev/null +++ b/miniprogram/components/actionsheet/actionsheet.wxss @@ -0,0 +1 @@ +.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.weui-actionsheet{position:fixed;left:0;bottom:0;transform:translate(0, 100%);backface-visibility:hidden;z-index:5000;width:100%;background-color:#EAE7E8;transition:transform .3s;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden}.weui-actionsheet__title{position:relative;height:56px;padding:0 24px;display:flex;justify-content:center;flex-direction:column;text-align:center;font-size:12px;color:rgba(0,0,0,0.5);line-height:1.4;background:#FFFFFF}.weui-actionsheet__title:before{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-actionsheet__title .weui-actionsheet__title-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-actionsheet__menu{color:rgba(0,0,0,0.9);background-color:#FFFFFF}.weui-actionsheet__action{margin-top:8px;background-color:#FFFFFF;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.weui-actionsheet__cell{position:relative;padding:16px;text-align:center;font-size:17px;line-height:1.41176471}.weui-actionsheet__cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-actionsheet__cell:active{background-color:#ECECEC}.weui-actionsheet__cell:first-child:before{display:none}.weui-actionsheet__cell_warn{color:#FA5151}.weui-skin_android .weui-actionsheet{position:fixed;left:50%;top:50%;bottom:auto;transform:translate(-50%, -50%);width:274px;box-sizing:border-box;backface-visibility:hidden;background:transparent;transition:transform .3s;border-radius:2px}.weui-skin_android .weui-actionsheet__action{display:none}.weui-skin_android .weui-actionsheet__menu{border-radius:2px;box-shadow:0 6px 30px 0 rgba(0,0,0,0.1)}.weui-skin_android .weui-actionsheet__cell{padding:16px;font-size:17px;line-height:1.41176471;color:rgba(0,0,0,0.9);text-align:left}.weui-skin_android .weui-actionsheet__cell:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.weui-skin_android .weui-actionsheet__cell:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.weui-actionsheet_toggle{transform:translate(0, 0)}.weui-mask.weui-mask_hidden{opacity:0;transform:scale3d(1, 1, 0)}.weui-mask{opacity:1;transform:scale3d(1, 1, 1);transition:all .3s} \ No newline at end of file diff --git a/miniprogram/components/badge/badge.js b/miniprogram/components/badge/badge.js new file mode 100644 index 0000000..cd5a2dd --- /dev/null +++ b/miniprogram/components/badge/badge.js @@ -0,0 +1,114 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 15); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 15: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + content: { + type: String, + value: '' + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/badge/badge.json b/miniprogram/components/badge/badge.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/badge/badge.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/badge/badge.wxml b/miniprogram/components/badge/badge.wxml new file mode 100644 index 0000000..b7caee3 --- /dev/null +++ b/miniprogram/components/badge/badge.wxml @@ -0,0 +1 @@ +{{content}} \ No newline at end of file diff --git a/miniprogram/components/badge/badge.wxss b/miniprogram/components/badge/badge.wxss new file mode 100644 index 0000000..3996e89 --- /dev/null +++ b/miniprogram/components/badge/badge.wxss @@ -0,0 +1 @@ +.weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#FA5151;color:#FFFFFF;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0} \ No newline at end of file diff --git a/miniprogram/components/cell/cell.js b/miniprogram/components/cell/cell.js new file mode 100644 index 0000000..18048aa --- /dev/null +++ b/miniprogram/components/cell/cell.js @@ -0,0 +1,219 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 9); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 9: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + properties: { + hover: { + type: Boolean, + value: false + }, + link: { + type: Boolean, + value: false + }, + extClass: { + type: String, + value: '' + }, + iconClass: { + type: String, + value: '' + }, + bodyClass: { + type: String, + value: '' + }, + icon: { + type: String, + value: '' + }, + title: { + type: String, + value: '' + }, + value: { + type: String, + value: '' + }, + showError: { + type: Boolean, + value: false + }, + prop: { + type: String, + value: '' + }, + url: { + type: String, + value: '' + }, + footerClass: { + type: String, + value: '' + }, + footer: { + type: String, + value: '' + }, + inline: { + type: Boolean, + value: true + }, + hasHeader: { + type: Boolean, + value: true + }, + hasFooter: { + type: Boolean, + value: true + }, + hasBody: { + type: Boolean, + value: true + } + }, + relations: { + '../form/form': { + type: 'ancestor' + }, + '../cells/cells': { + type: 'ancestor' + } + }, + data: { + inForm: false + }, + methods: { + setError: function setError(error) { + this.setData({ + error: error || false + }); + }, + setInForm: function setInForm() { + this.setData({ + inForm: true + }); + }, + setOuterClass: function setOuterClass(className) { + this.setData({ + outerClass: className + }); + }, + navigateTo: function navigateTo() { + var _this = this; + + var data = this.data; + if (data.url && data.link) { + wx.navigateTo({ + url: data.url, + success: function success(res) { + _this.triggerEvent('navigatesuccess', res, {}); + }, + fail: function fail(_fail) { + _this.triggerEvent('navigateerror', _fail, {}); + } + }); + } + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/cell/cell.json b/miniprogram/components/cell/cell.json new file mode 100644 index 0000000..38feec9 --- /dev/null +++ b/miniprogram/components/cell/cell.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "mp-cells": "../cells/cells" + } +} \ No newline at end of file diff --git a/miniprogram/components/cell/cell.wxml b/miniprogram/components/cell/cell.wxml new file mode 100644 index 0000000..6d61dbc --- /dev/null +++ b/miniprogram/components/cell/cell.wxml @@ -0,0 +1,73 @@ + + + + + + + + + + + {{title}} + + + + + + {{title}} + + + + + + + {{value}} + + + + + + {{footer}} + + + + + + + + + + + + + + + + + {{title}} + + + + + + {{title}} + + + + + + + {{value}} + + + + + + {{footer}} + + + + + + + \ No newline at end of file diff --git a/miniprogram/components/cell/cell.wxss b/miniprogram/components/cell/cell.wxss new file mode 100644 index 0000000..e33b369 --- /dev/null +++ b/miniprogram/components/cell/cell.wxss @@ -0,0 +1 @@ +.weui-cells{position:relative;margin-top:8px;background-color:#FFFFFF;line-height:1.41176471;font-size:17px}.weui-cells:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-cells:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-cells__title{margin-top:16px;margin-bottom:3px;padding-left:16px;padding-right:16px;color:rgba(0,0,0,0.5);font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:3px;color:rgba(0,0,0,0.5);padding-left:16px;padding-right:16px;font-size:14px}.weui-cell{padding:16px;position:relative;display:flex;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1);left:16px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ECECEC}.weui-cell_primary{align-items:flex-start}.weui-cell__bd{flex:1}.weui-cell__ft{text-align:right;color:rgba(0,0,0,0.5)}.weui-cell_wxss.weui-cell_wxss:before{display:block}.weui-cell_label-block{display:block}.weui-cell_label-block .weui-label{width:auto;word-break:initial;-webkit-hyphens:auto;hyphens:auto}.weui-cell_vcode{padding-top:0;padding-right:0;padding-bottom:0}.weui-vcode-img{margin-left:5px;height:3.29411765em;vertical-align:middle}.weui-vcode-btn{display:inline-block;height:3.29411765em;margin-left:5px;padding:0 .6em 0 .7em;border-left:1rpx solid rgba(0,0,0,0.1);line-height:3.29411765em;vertical-align:middle;font-size:17px;color:#576B95;white-space:nowrap}button.weui-vcode-btn{min-height:0;background-color:transparent;border:0;outline:0}.weui-vcode-btn:active{color:#767676} \ No newline at end of file diff --git a/miniprogram/components/cells/cells.js b/miniprogram/components/cells/cells.js new file mode 100644 index 0000000..d6c30c4 --- /dev/null +++ b/miniprogram/components/cells/cells.js @@ -0,0 +1,174 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 8); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 8: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + properties: { + title: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + footer: { + type: String, + value: '' + } + }, + data: { + firstItem: null, + checkboxCount: 0, + checkboxIsMulti: false, + outerClass: '', + childClass: '' + }, + relations: { + '../cell/cell': { + type: 'descendant', + linked: function linked(target) { + if (!this.data.firstItem) { + this.data.firstItem = target; + } + if (target !== this.data.firstItem) { + target.setOuterClass('weui-cell_wxss'); + } + } + }, + '../form-page/form-page': { + type: 'ancestor' + }, + '../checkbox-group/checkbox-group': { + type: 'descendant', + linked: function linked(target) { + this.setData({ + checkboxCount: this.data.checkboxCount + 1, + checkboxIsMulti: target.data.multi + }); + }, + unlinked: function unlinked(target) { + this.setData({ + checkboxCount: this.data.checkboxCount - 1, + checkboxIsMulti: target.data.multi + }); + } + } + }, + methods: { + setCellMulti: function setCellMulti(multi) { + this.setData({ + checkboxIsMulti: multi + }); + }, + setCellsClass: function setCellsClass(className) { + this.setData({ + childClass: className + }); + }, + setOuterClass: function setOuterClass(className) { + this.setData({ + outerClass: className + }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/cells/cells.json b/miniprogram/components/cells/cells.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/cells/cells.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/cells/cells.wxml b/miniprogram/components/cells/cells.wxml new file mode 100644 index 0000000..8c2a6ed --- /dev/null +++ b/miniprogram/components/cells/cells.wxml @@ -0,0 +1,8 @@ + + {{title}} + + + + {{footer}} + + \ No newline at end of file diff --git a/miniprogram/components/checkbox-group/checkbox-group.js b/miniprogram/components/checkbox-group/checkbox-group.js new file mode 100644 index 0000000..1c23eb0 --- /dev/null +++ b/miniprogram/components/checkbox-group/checkbox-group.js @@ -0,0 +1,203 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 23); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 23: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + properties: { + multi: { + type: Boolean, + value: true, + observer: '_multiChange' + }, + extClass: { + type: String, + value: '' + }, + prop: { + type: String, + value: '' + } + }, + data: { + targetList: [], + parentCell: null + }, + relations: { + '../checkbox/checkbox': { + type: 'descendant', + linked: function linked(target) { + this.data.targetList.push(target); + target.setMulti(this.data.multi); + if (!this.data.firstItem) { + this.data.firstItem = target; + } + if (target !== this.data.firstItem) { + target.setOuterClass('weui-cell_wxss'); + } + }, + unlinked: function unlinked(target) { + var index = -1; + this.data.targetList.forEach(function (item, idx) { + if (item === target) { + index = idx; + } + }); + this.data.targetList.splice(index, 1); + if (!this.data.targetList) { + this.data.firstItem = null; + } + } + }, + '../form/form': { + type: 'ancestor' + }, + '../cells/cells': { + type: 'ancestor', + linked: function linked(target) { + if (!this.data.parentCell) { + this.data.parentCell = target; + } + this.setParentCellsClass(); + }, + unlinked: function unlinked(target) { + this.data.parentCell = null; + } + } + }, + methods: { + checkedChange: function checkedChange(checked, target) { + console.log('checked change', checked); + if (this.data.multi) { + var vals = []; + this.data.targetList.forEach(function (item) { + if (item.data.checked) { + vals.push(item.data.value); + } + }); + this.triggerEvent('change', { value: vals }); + } else { + var val = ''; + this.data.targetList.forEach(function (item) { + if (item === target) { + val = item.data.value; + } else { + item.setData({ + checked: false + }); + } + }); + this.triggerEvent('change', { value: val }, {}); + } + }, + setParentCellsClass: function setParentCellsClass() { + var className = this.data.multi ? 'weui-cells_checkbox' : ''; + if (this.data.parentCell) { + this.data.parentCell.setCellsClass(className); + } + }, + _multiChange: function _multiChange(multi) { + this.data.targetList.forEach(function (target) { + target.setMulti(multi); + }); + if (this.data.parentCell) { + this.data.parentCell.setCellMulti(multi); + } + return multi; + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/checkbox-group/checkbox-group.json b/miniprogram/components/checkbox-group/checkbox-group.json new file mode 100644 index 0000000..38feec9 --- /dev/null +++ b/miniprogram/components/checkbox-group/checkbox-group.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "mp-cells": "../cells/cells" + } +} \ No newline at end of file diff --git a/miniprogram/components/checkbox-group/checkbox-group.wxml b/miniprogram/components/checkbox-group/checkbox-group.wxml new file mode 100644 index 0000000..9864e38 --- /dev/null +++ b/miniprogram/components/checkbox-group/checkbox-group.wxml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/miniprogram/components/checkbox-group/checkbox-group.wxss b/miniprogram/components/checkbox-group/checkbox-group.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram/components/checkbox/checkbox.js b/miniprogram/components/checkbox/checkbox.js new file mode 100644 index 0000000..7547def --- /dev/null +++ b/miniprogram/components/checkbox/checkbox.js @@ -0,0 +1,172 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 24); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 24: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + properties: { + multi: { + type: Boolean, + value: true + }, + checked: { + type: Boolean, + value: false + }, + value: { + type: String, + value: '' + }, + label: { + type: String, + value: 'label' + }, + extClass: { + type: String, + value: '' + } + }, + data: {}, + relations: { + '../checkbox-group/checkbox-group': { + type: 'ancestor', + linked: function linked(target) { + this.data.group = target; + }, + unlinked: function unlinked() { + this.data.group = null; + } + } + }, + methods: { + setMulti: function setMulti(multi) { + this.setData({ + multi: multi + }); + }, + setOuterClass: function setOuterClass(className) { + this.setData({ + outerClass: className + }); + }, + checkedChange: function checkedChange(e) { + if (this.data.multi) { + var checked = !this.data.checked; + this.setData({ + checked: checked + }); + if (this.data.group) { + this.data.group.checkedChange(checked, this); + } + } else { + var _checked = this.data.checked; + if (_checked) return; + this.setData({ + checked: true + }); + if (this.data.group) { + this.data.group.checkedChange(_checked, this); + } + } + this.triggerEvent('change', { value: this.data.value, checked: this.data.checked }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/checkbox/checkbox.json b/miniprogram/components/checkbox/checkbox.json new file mode 100644 index 0000000..6ebe5fc --- /dev/null +++ b/miniprogram/components/checkbox/checkbox.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "mp-cell": "../cell/cell", + "mp-checkbox-group": "../checkbox-group/checkbox-group" + } +} diff --git a/miniprogram/components/checkbox/checkbox.wxml b/miniprogram/components/checkbox/checkbox.wxml new file mode 100644 index 0000000..342c472 --- /dev/null +++ b/miniprogram/components/checkbox/checkbox.wxml @@ -0,0 +1,15 @@ + + + + + + + + + {{label}} + + + + + + \ No newline at end of file diff --git a/miniprogram/components/checkbox/checkbox.wxss b/miniprogram/components/checkbox/checkbox.wxss new file mode 100644 index 0000000..34a083c --- /dev/null +++ b/miniprogram/components/checkbox/checkbox.wxss @@ -0,0 +1 @@ +.weui-cells_checkbox .weui-check__label:before{left:55px}.weui-check__label:active{background-color:#ECECEC}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:16px}.weui-cell__ft_in-radio{padding-left:16px} \ No newline at end of file diff --git a/miniprogram/components/dialog/dialog.js b/miniprogram/components/dialog/dialog.js new file mode 100644 index 0000000..a105076 --- /dev/null +++ b/miniprogram/components/dialog/dialog.js @@ -0,0 +1,168 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 20); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 20: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + title: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + maskClosable: { + type: Boolean, + value: true + }, + mask: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: false, + observer: '_showChange' + }, + buttons: { + type: Array, + value: [] + } + }, + data: { + innerShow: false + }, + ready: function ready() { + var buttons = this.data.buttons; + var len = buttons.length; + buttons.forEach(function (btn, index) { + if (len === 1) { + btn.className = 'weui-dialog__btn_primary'; + } else if (index === 0) { + btn.className = 'weui-dialog__btn_default'; + } else { + btn.className = 'weui-dialog__btn_primary'; + } + }); + this.setData({ + buttons: buttons + }); + }, + + methods: { + buttonTap: function buttonTap(e) { + var index = e.currentTarget.dataset.index; + + this.triggerEvent('buttontap', { index: index, item: this.data.buttons[index] }, {}); + }, + close: function close() { + var data = this.data; + if (!data.maskClosable) return; + this.setData({ + show: false + }); + this.triggerEvent('close', {}, {}); + }, + stopEvent: function stopEvent() {} + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/dialog/dialog.json b/miniprogram/components/dialog/dialog.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/dialog/dialog.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/dialog/dialog.wxml b/miniprogram/components/dialog/dialog.wxml new file mode 100644 index 0000000..334fb9a --- /dev/null +++ b/miniprogram/components/dialog/dialog.wxml @@ -0,0 +1,21 @@ + + + + + {{title}} + + + + + + + + + {{item.text}} + + + + + + + diff --git a/miniprogram/components/dialog/dialog.wxss b/miniprogram/components/dialog/dialog.wxss new file mode 100644 index 0000000..494d260 --- /dev/null +++ b/miniprogram/components/dialog/dialog.wxss @@ -0,0 +1 @@ +.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.weui-dialog__wrp{position:fixed;z-index:5000;top:16px;bottom:16px;left:16px;right:16px;text-align:center;font-size:0;display:-webkit-box;display:-webkit-flex;display:flex;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-dialog__wrp .weui-dialog{max-height:100%}.weui-dialog{background-color:#FFFFFF;text-align:center;border-radius:12px;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;max-height:90%}.weui-dialog__hd{padding:32px 24px 16px}.weui-dialog__title{font-weight:700;font-size:17px;line-height:1.4}.weui-dialog__bd{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 24px;margin-bottom:32px;min-height:40px;font-size:17px;line-height:1.4;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;color:rgba(0,0,0,0.5)}.weui-dialog__bd:first-child{padding:32px 24px 0;font-weight:700;color:rgba(0,0,0,0.9);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-dialog__ft{position:relative;line-height:64px;min-height:64px;font-size:17px;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-dialog__btn{display:block;flex:1;color:#576B95;font-weight:700;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.weui-dialog__btn:active{background-color:#ECECEC}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:rgba(0,0,0,0.9)}@media screen and (min-width:352px){.weui-dialog{width:320px;margin:0 auto}}.weui-dialog.weui-dialog_hidden{opacity:0;transform:scale3d(1, 1, 0)}.weui-dialog{opacity:1;-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1);transition:all .3s ease-in}.weui-mask.weui-mask_hidden{opacity:0;transform:scale3d(1, 1, 0)}.weui-mask{opacity:1;transform:scale3d(1, 1, 1);transition:all .3s ease-in} \ No newline at end of file diff --git a/miniprogram/components/emoji/index.js b/miniprogram/components/emoji/index.js new file mode 100644 index 0000000..42df8b4 --- /dev/null +++ b/miniprogram/components/emoji/index.js @@ -0,0 +1,193 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +var emoji_data_1 = __webpack_require__(2); +var emoji_panel_data_1 = __webpack_require__(3); +var PADDING = 15; +var EMOTION_SIZE = 40; +var emotionMap = {}; +var emotionNames = []; +emoji_data_1.default.forEach(function (item) { + emotionMap[item.id] = item; + emotionNames.push(item.cn); +}); +var emotions = []; +emoji_panel_data_1.default.forEach(function (id) { + return emotions.push(emotionMap[id]); +}); +Component({ + options: { + addGlobalClass: true, + pureDataPattern: /^_/ + }, + properties: { + showDel: { + type: Boolean, + value: true + }, + showHistory: { + type: Boolean, + value: true + }, + height: { + type: Number, + value: 290 + } + }, + data: { + emojiPicture: 'http://q1b7ehu5b.bkt.clouddn.com/emoji-sprite-2.png', + history: [], + emotions: emotions, + extraPadding: 0, + _perLine: 0 + }, + lifetimes: { + attached: function attached() { + var data = this.data; + var areaWidth = wx.getSystemInfoSync().windowWidth; + data._perLine = Math.floor((areaWidth - PADDING * 2) / EMOTION_SIZE); + var extraPadding = Math.floor((areaWidth - PADDING * 2 - data._perLine * EMOTION_SIZE) / 2); + this.setData({ extraPadding: extraPadding }); + } + }, + methods: { + insertEmoji: function insertEmoji(evt) { + var data = this.data; + var idx = evt.currentTarget.dataset.idx; + var emotionName = data.emotions[idx].cn; + this.LRUCache(data.history, data._perLine, idx); + this.setData({ history: data.history }); + this.triggerEvent('insertemoji', { emotionName: emotionName }); + }, + deleteEmoji: function deleteEmoji(evt) { + this.triggerEvent('delemoji'); + }, + LRUCache: function LRUCache(arr, limit, data) { + var idx = arr.indexOf(data); + if (idx >= 0) { + arr.splice(idx, 1); + arr.unshift(data); + } else if (arr.length < limit) { + arr.push(data); + } else if (arr.length === limit) { + arr[limit - 1] = data; + } + } + } +}); + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = [{ 'id': 0, 'cn': '[微笑]', 'hk': '[微笑]', 'us': '[Smile]', 'code': '/::)', 'web_code': '/微笑', 'style': 'smiley_0' }, { 'id': 1, 'cn': '[撇嘴]', 'hk': '[撇嘴]', 'us': '[Grimace]', 'code': '/::~', 'web_code': '/撇嘴', 'style': 'smiley_1' }, { 'id': 2, 'cn': '[色]', 'hk': '[色]', 'us': '[Drool]', 'code': '/::B', 'web_code': '/色', 'style': 'smiley_2' }, { 'id': 3, 'cn': '[发呆]', 'hk': '[發呆]', 'us': '[Scowl]', 'code': '/::|', 'web_code': '/发呆', 'style': 'smiley_3' }, { 'id': 4, 'cn': '[得意]', 'hk': '[得意]', 'us': '[CoolGuy]', 'code': '/:8-)', 'web_code': '/得意', 'style': 'smiley_4' }, { 'id': 5, 'cn': '[流泪]', 'hk': '[流淚]', 'us': '[Sob]', 'code': '/::<', 'web_code': '/流泪', 'style': 'smiley_5' }, { 'id': 6, 'cn': '[害羞]', 'hk': '[害羞]', 'us': '[Shy]', 'code': '/::$', 'web_code': '/害羞', 'style': 'smiley_6' }, { 'id': 7, 'cn': '[闭嘴]', 'hk': '[閉嘴]', 'us': '[Silent]', 'code': '/::X', 'web_code': '/闭嘴', 'style': 'smiley_7' }, { 'id': 8, 'cn': '[睡]', 'hk': '[睡]', 'us': '[Sleep]', 'code': '/::Z', 'web_code': '/睡', 'style': 'smiley_8' }, { 'id': 9, 'cn': '[大哭]', 'hk': '[大哭]', 'us': '[Cry]', 'code': '/::"(', 'web_code': '/大哭', 'style': 'smiley_9' }, { 'id': 10, 'cn': '[尴尬]', 'hk': '[尷尬]', 'us': '[Awkward]', 'code': '/::-|', 'web_code': '/尴尬', 'style': 'smiley_10' }, { 'id': 11, 'cn': '[发怒]', 'hk': '[發怒]', 'us': '[Angry]', 'code': '/::@', 'web_code': '/发怒', 'style': 'smiley_11' }, { 'id': 12, 'cn': '[调皮]', 'hk': '[調皮]', 'us': '[Tongue]', 'code': '/::P', 'web_code': '/调皮', 'style': 'smiley_12' }, { 'id': 13, 'cn': '[呲牙]', 'hk': '[呲牙]', 'us': '[Grin]', 'code': '/::D', 'web_code': '/呲牙', 'style': 'smiley_13' }, { 'id': 14, 'cn': '[惊讶]', 'hk': '[驚訝]', 'us': '[Surprise]', 'code': '/::O', 'web_code': '/惊讶', 'style': 'smiley_14' }, { 'id': 15, 'cn': '[难过]', 'hk': '[難過]', 'us': '[Frown]', 'code': '/::(', 'web_code': '/难过', 'style': 'smiley_15' }, { 'id': 16, 'cn': '[酷]', 'hk': '[酷]', 'us': '[Ruthless]', 'code': '/::+', 'web_code': '/酷', 'style': 'smiley_16' }, { 'id': 17, 'cn': '[冷汗]', 'hk': '[冷汗]', 'us': '[Blush]', 'code': '/:--b', 'web_code': '/冷汗', 'style': 'smiley_17' }, { 'id': 18, 'cn': '[抓狂]', 'hk': '[抓狂]', 'us': '[Scream]', 'code': '/::Q', 'web_code': '/抓狂', 'style': 'smiley_18' }, { 'id': 19, 'cn': '[吐]', 'hk': '[吐]', 'us': '[Puke]', 'code': '/::T', 'web_code': '/吐', 'style': 'smiley_19' }, { 'id': 20, 'cn': '[偷笑]', 'hk': '[偷笑]', 'us': '[Chuckle]', 'code': '/:,@P', 'web_code': '/偷笑', 'style': 'smiley_20' }, { 'id': 21, 'cn': '[愉快]', 'hk': '[愉快]', 'us': '[Joyful]', 'code': '/:,@-D', 'web_code': '/可爱', 'style': 'smiley_21' }, { 'id': 22, 'cn': '[白眼]', 'hk': '[白眼]', 'us': '[Slight]', 'code': '/::d', 'web_code': '/白眼', 'style': 'smiley_22' }, { 'id': 23, 'cn': '[傲慢]', 'hk': '[傲慢]', 'us': '[Smug]', 'code': '/:,@o', 'web_code': '/傲慢', 'style': 'smiley_23' }, { 'id': 24, 'cn': '[饥饿]', 'hk': '[饑餓]', 'us': '[Hungry]', 'code': '/::g', 'web_code': '/饥饿', 'style': 'smiley_24' }, { 'id': 25, 'cn': '[困]', 'hk': '[累]', 'us': '[Drowsy]', 'code': '/:|-)', 'web_code': '/困', 'style': 'smiley_25' }, { 'id': 26, 'cn': '[惊恐]', 'hk': '[驚恐]', 'us': '[Panic]', 'code': '/::!', 'web_code': '/惊恐', 'style': 'smiley_26' }, { 'id': 27, 'cn': '[流汗]', 'hk': '[流汗]', 'us': '[Sweat]', 'code': '/::L', 'web_code': '/流汗', 'style': 'smiley_27' }, { 'id': 28, 'cn': '[憨笑]', 'hk': '[大笑]', 'us': '[Laugh]', 'code': '/::>', 'web_code': '/憨笑', 'style': 'smiley_28' }, { 'id': 29, 'cn': '[悠闲]', 'hk': '[悠閑]', 'us': '[Commando]', 'code': '/::,@', 'web_code': '/大兵', 'style': 'smiley_29' }, { 'id': 30, 'cn': '[奋斗]', 'hk': '[奮鬥]', 'us': '[Determined]', 'code': '/:,@f', 'web_code': '/奋斗', 'style': 'smiley_30' }, { 'id': 31, 'cn': '[咒骂]', 'hk': '[咒罵]', 'us': '[Scold]', 'code': '/::-S', 'web_code': '/咒骂', 'style': 'smiley_31' }, { 'id': 32, 'cn': '[疑问]', 'hk': '[疑問]', 'us': '[Shocked]', 'code': '/:?', 'web_code': '/疑问', 'style': 'smiley_32' }, { 'id': 33, 'cn': '[嘘]', 'hk': '[噓]', 'us': '[Shhh]', 'code': '/:,@x', 'web_code': '/嘘', 'style': 'smiley_33' }, { 'id': 34, 'cn': '[晕]', 'hk': '[暈]', 'us': '[Dizzy]', 'code': '/:,@@', 'web_code': '/晕', 'style': 'smiley_34' }, { 'id': 35, 'cn': '[疯了]', 'hk': '[瘋了]', 'us': '[Tormented]', 'code': '/::8', 'web_code': '/折磨', 'style': 'smiley_35' }, { 'id': 36, 'cn': '[衰]', 'hk': '[衰]', 'us': '[Toasted]', 'code': '/:,@!', 'web_code': '/衰', 'style': 'smiley_36' }, { 'id': 37, 'cn': '[骷髅]', 'hk': '[骷髏頭]', 'us': '[Skull]', 'code': '/:!!!', 'web_code': '/骷髅', 'style': 'smiley_37' }, { 'id': 38, 'cn': '[敲打]', 'hk': '[敲打]', 'us': '[Hammer]', 'code': '/:xx', 'web_code': '/敲打', 'style': 'smiley_38' }, { 'id': 39, 'cn': '[再见]', 'hk': '[再見]', 'us': '[Wave]', 'code': '/:bye', 'web_code': '/再见', 'style': 'smiley_39' }, { 'id': 40, 'cn': '[擦汗]', 'hk': '[擦汗]', 'us': '[Speechless]', 'code': '/:wipe', 'web_code': '/擦汗', 'style': 'smiley_40' }, { 'id': 41, 'cn': '[抠鼻]', 'hk': '[摳鼻]', 'us': '[NosePick]', 'code': '/:dig', 'web_code': '/抠鼻', 'style': 'smiley_41' }, { 'id': 42, 'cn': '[鼓掌]', 'hk': '[鼓掌]', 'us': '[Clap]', 'code': '/:handclap', 'web_code': '/鼓掌', 'style': 'smiley_42' }, { 'id': 43, 'cn': '[糗大了]', 'hk': '[羞辱]', 'us': '[Shame]', 'code': '/:&-(', 'web_code': '/糗大了', 'style': 'smiley_43' }, { 'id': 44, 'cn': '[坏笑]', 'hk': '[壞笑]', 'us': '[Trick]', 'code': '/:B-)', 'web_code': '/坏笑', 'style': 'smiley_44' }, { 'id': 45, 'cn': '[左哼哼]', 'hk': '[左哼哼]', 'us': '[Bah!L]', 'code': '/:<@', 'web_code': '/左哼哼', 'style': 'smiley_45' }, { 'id': 46, 'cn': '[右哼哼]', 'hk': '[右哼哼]', 'us': '[Bah!R]', 'code': '/:@>', 'web_code': '/右哼哼', 'style': 'smiley_46' }, { 'id': 47, 'cn': '[哈欠]', 'hk': '[哈欠]', 'us': '[Yawn]', 'code': '/::-O', 'web_code': '/哈欠', 'style': 'smiley_47' }, { 'id': 48, 'cn': '[鄙视]', 'hk': '[鄙視]', 'us': '[Pooh-pooh]', 'code': '/:>-|', 'web_code': '/鄙视', 'style': 'smiley_48' }, { 'id': 49, 'cn': '[委屈]', 'hk': '[委屈]', 'us': '[Shrunken]', 'code': '/:P-(', 'web_code': '/委屈', 'style': 'smiley_49' }, { 'id': 50, 'cn': '[快哭了]', 'hk': '[快哭了]', 'us': '[TearingUp]', 'code': '/::"|', 'web_code': '/快哭了', 'style': 'smiley_50' }, { 'id': 51, 'cn': '[阴险]', 'hk': '[陰險]', 'us': '[Sly]', 'code': '/:X-)', 'web_code': '/阴险', 'style': 'smiley_51' }, { 'id': 52, 'cn': '[亲亲]', 'hk': '[親親]', 'us': '[Kiss]', 'code': '/::*', 'web_code': '/亲亲', 'style': 'smiley_52' }, { 'id': 53, 'cn': '[吓]', 'hk': '[嚇]', 'us': '[Wrath]', 'code': '/:@x', 'web_code': '/吓', 'style': 'smiley_53' }, { 'id': 54, 'cn': '[可怜]', 'hk': '[可憐]', 'us': '[Whimper]', 'code': '/:8*', 'web_code': '/可怜', 'style': 'smiley_54' }, { 'id': 55, 'cn': '[菜刀]', 'hk': '[菜刀]', 'us': '[Cleaver]', 'code': '/:pd', 'web_code': '/菜刀', 'style': 'smiley_55' }, { 'id': 56, 'cn': '[西瓜]', 'hk': '[西瓜]', 'us': '[Watermelon]', 'code': '/:', 'web_code': '/西瓜', 'style': 'smiley_56' }, { 'id': 57, 'cn': '[啤酒]', 'hk': '[啤酒]', 'us': '[Beer]', 'code': '/:beer', 'web_code': '/啤酒', 'style': 'smiley_57' }, { 'id': 58, 'cn': '[篮球]', 'hk': '[籃球]', 'us': '[Basketball]', 'code': '/:basketb', 'web_code': '/篮球', 'style': 'smiley_58' }, { 'id': 59, 'cn': '[乒乓]', 'hk': '[乒乓]', 'us': '[PingPong]', 'code': '/:oo', 'web_code': '/乒乓', 'style': 'smiley_59' }, { 'id': 60, 'cn': '[咖啡]', 'hk': '[咖啡]', 'us': '[Coffee]', 'code': '/:coffee', 'web_code': '/咖啡', 'style': 'smiley_60' }, { 'id': 61, 'cn': '[饭]', 'hk': '[飯]', 'us': '[Rice]', 'code': '/:eat', 'web_code': '/饭', 'style': 'smiley_61' }, { 'id': 62, 'cn': '[猪头]', 'hk': '[豬頭]', 'us': '[Pig]', 'code': '/:pig', 'web_code': '/猪头', 'style': 'smiley_62' }, { 'id': 63, 'cn': '[玫瑰]', 'hk': '[玫瑰]', 'us': '[Rose]', 'code': '/:rose', 'web_code': '/玫瑰', 'style': 'smiley_63' }, { 'id': 64, 'cn': '[凋谢]', 'hk': '[枯萎]', 'us': '[Wilt]', 'code': '/:fade', 'web_code': '/凋谢', 'style': 'smiley_64' }, { 'id': 65, 'cn': '[嘴唇]', 'hk': '[嘴唇]', 'us': '[Lips]', 'code': '/:showlove', 'web_code': '/示爱', 'style': 'smiley_65' }, { 'id': 66, 'cn': '[爱心]', 'hk': '[愛心]', 'us': '[Heart]', 'code': '/:heart', 'web_code': '/爱心', 'style': 'smiley_66' }, { 'id': 67, 'cn': '[心碎]', 'hk': '[心碎]', 'us': '[BrokenHeart]', 'code': '/:break', 'web_code': '/心碎', 'style': 'smiley_67' }, { 'id': 68, 'cn': '[蛋糕]', 'hk': '[蛋糕]', 'us': '[Cake]', 'code': '/:cake', 'web_code': '/蛋糕', 'style': 'smiley_68' }, { 'id': 69, 'cn': '[闪电]', 'hk': '[閃電]', 'us': '[Lightning]', 'code': '/:li', 'web_code': '/闪电', 'style': 'smiley_69' }, { 'id': 70, 'cn': '[炸弹]', 'hk': '[炸彈]', 'us': '[Bomb]', 'code': '/:bome', 'web_code': '/炸弹', 'style': 'smiley_70' }, { 'id': 71, 'cn': '[刀]', 'hk': '[刀]', 'us': '[Dagger]', 'code': '/:kn', 'web_code': '/刀', 'style': 'smiley_71' }, { 'id': 72, 'cn': '[足球]', 'hk': '[足球]', 'us': '[Soccer]', 'code': '/:footb', 'web_code': '/足球', 'style': 'smiley_72' }, { 'id': 73, 'cn': '[瓢虫]', 'hk': '[甲蟲]', 'us': '[Ladybug]', 'code': '/:ladybug', 'web_code': '/瓢虫', 'style': 'smiley_73' }, { 'id': 74, 'cn': '[便便]', 'hk': '[便便]', 'us': '[Poop]', 'code': '/:shit', 'web_code': '/便便', 'style': 'smiley_74' }, { 'id': 75, 'cn': '[月亮]', 'hk': '[月亮]', 'us': '[Moon]', 'code': '/:moon', 'web_code': '/月亮', 'style': 'smiley_75' }, { 'id': 76, 'cn': '[太阳]', 'hk': '[太陽]', 'us': '[Sun]', 'code': '/:sun', 'web_code': '/太阳', 'style': 'smiley_76' }, { 'id': 77, 'cn': '[礼物]', 'hk': '[禮物]', 'us': '[Gift]', 'code': '/:gift', 'web_code': '/礼物', 'style': 'smiley_77' }, { 'id': 78, 'cn': '[拥抱]', 'hk': '[擁抱]', 'us': '[Hug]', 'code': '/:hug', 'web_code': '/拥抱', 'style': 'smiley_78' }, { 'id': 79, 'cn': '[强]', 'hk': '[強]', 'us': '[ThumbsUp]', 'code': '/:strong', 'web_code': '/强', 'style': 'smiley_79' }, { 'id': 80, 'cn': '[弱]', 'hk': '[弱]', 'us': '[ThumbsDown]', 'code': '/:weak', 'web_code': '/弱', 'style': 'smiley_80' }, { 'id': 81, 'cn': '[握手]', 'hk': '[握手]', 'us': '[Shake]', 'code': '/:share', 'web_code': '/握手', 'style': 'smiley_81' }, { 'id': 82, 'cn': '[胜利]', 'hk': '[勝利]', 'us': '[Peace]', 'code': '/:v', 'web_code': '/胜利', 'style': 'smiley_82' }, { 'id': 83, 'cn': '[抱拳]', 'hk': '[抱拳]', 'us': '[Fight]', 'code': '/:@)', 'web_code': '/抱拳', 'style': 'smiley_83' }, { 'id': 84, 'cn': '[勾引]', 'hk': '[勾引]', 'us': '[Beckon]', 'code': '/:jj', 'web_code': '/勾引', 'style': 'smiley_84' }, { 'id': 85, 'cn': '[拳头]', 'hk': '[拳頭]', 'us': '[Fist]', 'code': '/:@@', 'web_code': '/拳头', 'style': 'smiley_85' }, { 'id': 86, 'cn': '[差劲]', 'hk': '[差勁]', 'us': '[Pinky]', 'code': '/:bad', 'web_code': '/差劲', 'style': 'smiley_86' }, { 'id': 87, 'cn': '[爱你]', 'hk': '[愛你]', 'us': '[RockOn]', 'code': '/:lvu', 'web_code': '/爱你', 'style': 'smiley_87' }, { 'id': 88, 'cn': '[NO]', 'hk': '[NO]', 'us': '[Nuh-uh]', 'code': '/:no', 'web_code': '/NO', 'style': 'smiley_88' }, { 'id': 89, 'cn': '[OK]', 'hk': '[OK]', 'us': '[OK]', 'code': '/:ok', 'web_code': '/OK', 'style': 'smiley_89' }, { 'id': 90, 'cn': '[爱情]', 'hk': '[愛情]', 'us': '[InLove]', 'code': '/:love', 'web_code': '/爱情', 'style': 'smiley_90' }, { 'id': 91, 'cn': '[飞吻]', 'hk': '[飛吻]', 'us': '[Blowkiss]', 'code': '/:', 'web_code': '/飞吻', 'style': 'smiley_91' }, { 'id': 92, 'cn': '[跳跳]', 'hk': '[跳跳]', 'us': '[Waddle]', 'code': '/:jump', 'web_code': '/跳跳', 'style': 'smiley_92' }, { 'id': 93, 'cn': '[发抖]', 'hk': '[發抖]', 'us': '[Tremble]', 'code': '/:shake', 'web_code': '/发抖', 'style': 'smiley_93' }, { 'id': 94, 'cn': '[怄火]', 'hk': '[噴火]', 'us': '[Aaagh!]', 'code': '/:', 'web_code': '/怄火', 'style': 'smiley_94' }, { 'id': 95, 'cn': '[转圈]', 'hk': '[轉圈]', 'us': '[Twirl]', 'code': '/:circle', 'web_code': '/转圈', 'style': 'smiley_95' }, { 'id': 96, 'cn': '[磕头]', 'hk': '[磕頭]', 'us': '[Kotow]', 'code': '/:kotow', 'web_code': '/磕头', 'style': 'smiley_96' }, { 'id': 97, 'cn': '[回头]', 'hk': '[回頭]', 'us': '[Dramatic]', 'code': '/:turn', 'web_code': '/回头', 'style': 'smiley_97' }, { 'id': 98, 'cn': '[跳绳]', 'hk': '[跳繩]', 'us': '[JumpRope]', 'code': '/:skip', 'web_code': '/跳绳', 'style': 'smiley_98' }, { 'id': 99, 'cn': '[投降]', 'hk': '[投降]', 'us': '[Surrender]', 'code': '/:oY', 'web_code': '/挥手', 'style': 'smiley_99' }, { 'id': 100, 'cn': '[激动]', 'hk': '[激動]', 'us': '[Hooray]', 'code': '/:#-0', 'web_code': '/激动', 'style': 'smiley_100' }, { 'id': 101, 'cn': '[乱舞]', 'hk': '[亂舞]', 'us': '[Meditate]', 'code': '/:hiphot', 'web_code': '/街舞', 'style': 'smiley_101' }, { 'id': 102, 'cn': '[献吻]', 'hk': '[獻吻]', 'us': '[Smooch]', 'code': '/:kiss', 'web_code': '/献吻', 'style': 'smiley_102' }, { 'id': 103, 'cn': '[左太极]', 'hk': '[左太極]', 'us': '[TaiChi L]', 'code': '/:<&', 'web_code': '/左太极', 'style': 'smiley_103' }, { 'id': 104, 'cn': '[右太极]', 'hk': '[右太極]', 'us': '[TaiChi R]', 'code': '/:&>', 'web_code': '/右太极', 'style': 'smiley_104' }, { 'id': 204, 'cn': '[嘿哈]', 'hk': '[吼嘿]', 'us': '[Hey]', 'code': '', 'web_code': '', 'style': 'smiley_2_04' }, { 'id': 205, 'cn': '[捂脸]', 'hk': '[掩面]', 'us': '[Facepalm]', 'code': '', 'web_code': '', 'style': 'smiley_2_05' }, { 'id': 202, 'cn': '[奸笑]', 'hk': '[奸笑]', 'us': '[Smirk]', 'code': '', 'web_code': '', 'style': 'smiley_2_02' }, { 'id': 206, 'cn': '[机智]', 'hk': '[機智]', 'us': '[Smart]', 'code': '', 'web_code': '', 'style': 'smiley_2_06' }, { 'id': 212, 'cn': '[皱眉]', 'hk': '[皺眉]', 'us': '[Moue]', 'code': '', 'web_code': '', 'style': 'smiley_2_12' }, { 'id': 211, 'cn': '[耶]', 'hk': '[歐耶]', 'us': '[Yeah!]', 'code': '', 'web_code': '', 'style': 'smiley_2_11' }, { 'id': 207, 'cn': '[茶]', 'hk': '[茶]', 'us': '[Tea]', 'code': '', 'web_code': '', 'style': 'smiley_2_07' }, { 'id': 209, 'cn': '[红包]', 'hk': '[Packet]', 'us': '[Packet]', 'code': '', 'web_code': '', 'style': 'smiley_2_09' }, { 'id': 210, 'cn': '[蜡烛]', 'hk': '[蠟燭]', 'us': '[Candle]', 'code': '', 'web_code': '', 'style': 'smiley_2_10' }, { 'id': 215, 'cn': '[福]', 'hk': '[福]', 'us': '[Blessing]', 'code': '', 'web_code': '', 'style': 'smiley_2_15' }, { 'id': 214, 'cn': '[鸡]', 'hk': '[小雞]', 'us': '[Chick]', 'code': '', 'web_code': '', 'style': 'smiley_2_14' }, { 'id': 300, 'cn': '[笑脸]', 'emoji': '😄', 'hk': '', 'us': '', 'code': "\\ue415", 'web_code': '', 'style': 'smiley_u1F604' }, { 'id': 301, 'cn': '[生病]', 'emoji': '😷', 'hk': '', 'us': '', 'code': "\\ue40c", 'web_code': '', 'style': 'smiley_u1F637' }, { 'id': 302, 'cn': '[破涕为笑]', 'emoji': '😂', 'hk': '', 'us': '', 'code': "\\ue412", 'web_code': '', 'style': 'smiley_u1F602' }, { 'id': 303, 'cn': '[吐舌]', 'emoji': '😝', 'hk': '', 'us': '', 'code': "\\ue409", 'web_code': '', 'style': 'smiley_u1F61D' }, { 'id': 304, 'cn': '[脸红]', 'emoji': '😳', 'hk': '', 'us': '', 'code': "\\ue40d", 'web_code': '', 'style': 'smiley_u1F633' }, { 'id': 305, 'cn': '[恐惧]', 'emoji': '😱', 'hk': '', 'us': '', 'code': "\\ue107", 'web_code': '', 'style': 'smiley_u1F631' }, { 'id': 306, 'cn': '[失望]', 'emoji': '😔', 'hk': '', 'us': '', 'code': "\\ue403", 'web_code': '', 'style': 'smiley_u1F614' }, { 'id': 307, 'cn': '[无语]', 'emoji': '😒', 'hk': '', 'us': '', 'code': "\\ue40e", 'web_code': '', 'style': 'smiley_u1F612' }, { 'id': 308, 'cn': '[鬼魂]', 'emoji': '👻', 'hk': '', 'us': '', 'code': "\\ue11b", 'web_code': '', 'style': 'smiley_u1F47B' }, { 'id': 309, 'cn': '[合十]', 'emoji': '🙏', 'hk': '', 'us': '', 'code': "\\ue41d", 'web_code': '', 'style': 'smiley_u1F64F' }, { 'id': 310, 'cn': '[强壮]', 'emoji': '💪', 'hk': '', 'us': '', 'code': "\\ue14c", 'web_code': '', 'style': 'smiley_u1F4AA' }, { 'id': 311, 'cn': '[庆祝]', 'emoji': '🎉', 'hk': '', 'us': '', 'code': "\\ue312", 'web_code': '', 'style': 'smiley_u1F389' }, { 'id': 312, 'cn': '[礼物]', 'hk': '', 'us': '', 'code': "\\ue112", 'web_code': '', 'style': 'smiley_u1F381' }, { 'id': '17_1', 'cn': '[囧]', 'hk': '[囧]', 'us': '[Blush]', 'code': '', 'web_code': '', 'style': 'smiley_17' }, { 'id': '39_1', 'cn': '[再见]', 'hk': '[再見]', 'us': '[Bye]', 'code': '', 'web_code': '', 'style': 'smiley_39' }, { 'id': '83_1', 'cn': '[抱拳]', 'hk': '[抱拳]', 'us': '[Salute]', 'code': '', 'web_code': '', 'style': 'smiley_83' }, { 'id': '21smiley_2_1', 'cn': '[皱眉]', 'hk': '[皺眉]', 'us': '[Concerned]', 'code': '', 'web_code': '', 'style': 'smiley_2_12' }]; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 60, 62, 63, 64, 65, 66, 67, 68, 70, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 89, 92, 93, 94, 95, 300, 301, 302, 303, 304, 305, 306, 307, 204, 205, 202, 206, 212, 211, 308, 309, 310, 311, 312, 209, 214]; + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/miniprogram/components/emoji/index.json b/miniprogram/components/emoji/index.json new file mode 100644 index 0000000..78013bd --- /dev/null +++ b/miniprogram/components/emoji/index.json @@ -0,0 +1,5 @@ +{ + "component": true, + "usingComponents": { + } +} \ No newline at end of file diff --git a/miniprogram/components/emoji/index.wxml b/miniprogram/components/emoji/index.wxml new file mode 100644 index 0000000..3c41d19 --- /dev/null +++ b/miniprogram/components/emoji/index.wxml @@ -0,0 +1,25 @@ + + + + + + + 所有表情 + + + + + + + + + + + diff --git a/miniprogram/components/emoji/index.wxss b/miniprogram/components/emoji/index.wxss new file mode 100644 index 0000000..e36dcee --- /dev/null +++ b/miniprogram/components/emoji/index.wxss @@ -0,0 +1 @@ +.icon_emotion_del,.smiley_0,.smiley_1,.smiley_2,.smiley_2_02,.smiley_2_04,.smiley_2_05,.smiley_2_06,.smiley_2_09,.smiley_2_11,.smiley_2_12,.smiley_2_14,.smiley_3,.smiley_4,.smiley_5,.smiley_6,.smiley_7,.smiley_8,.smiley_9,.smiley_10,.smiley_11,.smiley_12,.smiley_13,.smiley_14,.smiley_15,.smiley_17,.smiley_18,.smiley_19,.smiley_20,.smiley_21,.smiley_22,.smiley_23,.smiley_25,.smiley_26,.smiley_27,.smiley_28,.smiley_29,.smiley_30,.smiley_31,.smiley_32,.smiley_33,.smiley_34,.smiley_36,.smiley_37,.smiley_38,.smiley_39,.smiley_40,.smiley_41,.smiley_42,.smiley_44,.smiley_45,.smiley_46,.smiley_47,.smiley_48,.smiley_49,.smiley_50,.smiley_51,.smiley_52,.smiley_54,.smiley_55,.smiley_56,.smiley_57,.smiley_60,.smiley_61,.smiley_62,.smiley_63,.smiley_64,.smiley_65,.smiley_66,.smiley_67,.smiley_68,.smiley_70,.smiley_74,.smiley_75,.smiley_76,.smiley_78,.smiley_79,.smiley_80,.smiley_81,.smiley_82,.smiley_83,.smiley_84,.smiley_85,.smiley_89,.smiley_92,.smiley_93,.smiley_94,.smiley_95,.smiley_u1F4AA,.smiley_u1F47B,.smiley_u1F61D,.smiley_u1F64F,.smiley_u1F381,.smiley_u1F389,.smiley_u1F602,.smiley_u1F604,.smiley_u1F612,.smiley_u1F614,.smiley_u1F631,.smiley_u1F633,.smiley_u1F637{display:inline-block;zoom:1;vertical-align:middle;background-repeat:no-repeat}.icon_emotion_del{width:30px;height:30px;background-position:0 0}.smiley_0{width:30px;height:30px;background-position:-40px 0}.smiley_1{width:30px;height:30px;background-position:-80px 0}.smiley_2{width:30px;height:30px;background-position:-120px 0}.smiley_2_02{width:30px;height:30px;background-position:-160px 0}.smiley_2_04{width:30px;height:30px;background-position:-200px 0}.smiley_2_05{width:30px;height:30px;background-position:-240px 0}.smiley_2_06{width:30px;height:30px;background-position:-280px 0}.smiley_2_09{width:30px;height:30px;background-position:-320px 0}.smiley_2_11{width:30px;height:30px;background-position:-360px 0}.smiley_2_12{width:30px;height:30px;background-position:-400px 0}.smiley_2_14{width:30px;height:30px;background-position:-440px 0}.smiley_3{width:30px;height:30px;background-position:-480px 0}.smiley_4{width:30px;height:30px;background-position:-520px 0}.smiley_5{width:30px;height:30px;background-position:-560px 0}.smiley_6{width:30px;height:30px;background-position:-600px 0}.smiley_7{width:30px;height:30px;background-position:-640px 0}.smiley_8{width:30px;height:30px;background-position:0 -40px}.smiley_9{width:30px;height:30px;background-position:-40px -40px}.smiley_10{width:30px;height:30px;background-position:-80px -40px}.smiley_11{width:30px;height:30px;background-position:-120px -40px}.smiley_12{width:30px;height:30px;background-position:-160px -40px}.smiley_13{width:30px;height:30px;background-position:-200px -40px}.smiley_14{width:30px;height:30px;background-position:-240px -40px}.smiley_15{width:30px;height:30px;background-position:-280px -40px}.smiley_17{width:30px;height:30px;background-position:-320px -40px}.smiley_18{width:30px;height:30px;background-position:-360px -40px}.smiley_19{width:30px;height:30px;background-position:-400px -40px}.smiley_20{width:30px;height:30px;background-position:-440px -40px}.smiley_21{width:30px;height:30px;background-position:-480px -40px}.smiley_22{width:30px;height:30px;background-position:-520px -40px}.smiley_23{width:30px;height:30px;background-position:-560px -40px}.smiley_25{width:30px;height:30px;background-position:-600px -40px}.smiley_26{width:30px;height:30px;background-position:-640px -40px}.smiley_27{width:30px;height:30px;background-position:0 -80px}.smiley_28{width:30px;height:30px;background-position:-40px -80px}.smiley_29{width:30px;height:30px;background-position:-80px -80px}.smiley_30{width:30px;height:30px;background-position:-120px -80px}.smiley_31{width:30px;height:30px;background-position:-160px -80px}.smiley_32{width:30px;height:30px;background-position:-200px -80px}.smiley_33{width:30px;height:30px;background-position:-240px -80px}.smiley_34{width:30px;height:30px;background-position:-280px -80px}.smiley_36{width:30px;height:30px;background-position:-320px -80px}.smiley_37{width:30px;height:30px;background-position:-360px -80px}.smiley_38{width:30px;height:30px;background-position:-400px -80px}.smiley_39{width:30px;height:30px;background-position:-440px -80px}.smiley_40{width:30px;height:30px;background-position:-480px -80px}.smiley_41{width:30px;height:30px;background-position:-520px -80px}.smiley_42{width:30px;height:30px;background-position:-560px -80px}.smiley_44{width:30px;height:30px;background-position:-600px -80px}.smiley_45{width:30px;height:30px;background-position:-640px -80px}.smiley_46{width:30px;height:30px;background-position:0 -120px}.smiley_47{width:30px;height:30px;background-position:-40px -120px}.smiley_48{width:30px;height:30px;background-position:-80px -120px}.smiley_49{width:30px;height:30px;background-position:-120px -120px}.smiley_50{width:30px;height:30px;background-position:-160px -120px}.smiley_51{width:30px;height:30px;background-position:-200px -120px}.smiley_52{width:30px;height:30px;background-position:-240px -120px}.smiley_54{width:30px;height:30px;background-position:-280px -120px}.smiley_55{width:30px;height:30px;background-position:-320px -120px}.smiley_56{width:30px;height:30px;background-position:-360px -120px}.smiley_57{width:30px;height:30px;background-position:-400px -120px}.smiley_60{width:30px;height:30px;background-position:-440px -120px}.smiley_61{width:30px;height:30px;background-position:-480px -120px}.smiley_62{width:30px;height:30px;background-position:-520px -120px}.smiley_63{width:30px;height:30px;background-position:-560px -120px}.smiley_64{width:30px;height:30px;background-position:-600px -120px}.smiley_65{width:30px;height:30px;background-position:-640px -120px}.smiley_66{width:30px;height:30px;background-position:0 -160px}.smiley_67{width:30px;height:30px;background-position:-40px -160px}.smiley_68{width:30px;height:30px;background-position:-80px -160px}.smiley_70{width:30px;height:30px;background-position:-120px -160px}.smiley_74{width:30px;height:30px;background-position:-160px -160px}.smiley_75{width:30px;height:30px;background-position:-200px -160px}.smiley_76{width:30px;height:30px;background-position:-240px -160px}.smiley_78{width:30px;height:30px;background-position:-280px -160px}.smiley_79{width:30px;height:30px;background-position:-320px -160px}.smiley_80{width:30px;height:30px;background-position:-360px -160px}.smiley_81{width:30px;height:30px;background-position:-400px -160px}.smiley_82{width:30px;height:30px;background-position:-440px -160px}.smiley_83{width:30px;height:30px;background-position:-480px -160px}.smiley_84{width:30px;height:30px;background-position:-520px -160px}.smiley_85{width:30px;height:30px;background-position:-560px -160px}.smiley_89{width:30px;height:30px;background-position:-600px -160px}.smiley_92{width:30px;height:30px;background-position:-640px -160px}.smiley_93{width:30px;height:30px;background-position:0 -200px}.smiley_94{width:30px;height:30px;background-position:-40px -200px}.smiley_95{width:30px;height:30px;background-position:-80px -200px}.smiley_u1F4AA{width:30px;height:30px;background-position:-120px -200px}.smiley_u1F47B{width:30px;height:30px;background-position:-160px -200px}.smiley_u1F61D{width:30px;height:30px;background-position:-200px -200px}.smiley_u1F64F{width:30px;height:30px;background-position:-240px -200px}.smiley_u1F381{width:30px;height:30px;background-position:-280px -200px}.smiley_u1F389{width:30px;height:30px;background-position:-320px -200px}.smiley_u1F602{width:30px;height:30px;background-position:-360px -200px}.smiley_u1F604{width:30px;height:30px;background-position:-400px -200px}.smiley_u1F612{width:30px;height:30px;background-position:-440px -200px}.smiley_u1F614{width:30px;height:30px;background-position:-480px -200px}.smiley_u1F631{width:30px;height:30px;background-position:-520px -200px}.smiley_u1F633{width:30px;height:30px;background-position:-560px -200px}.smiley_u1F637{width:30px;height:30px;background-position:-600px -200px}.emotion_list{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:normal;display:inline-block;vertical-align:top}.emotion_item{display:inline-block;width:40px;height:40px;margin-bottom:5px;text-align:center;line-height:40px}.icon_emotion{width:30px;height:30px;vertical-align:middle;display:inline-block}.emoji_area{width:100%;overflow-y:auto;padding:10px 15px 0;-webkit-overflow-scrolling:touch}swiper{height:180px}.left{text-align:left} \ No newline at end of file diff --git a/miniprogram/components/form-page/form-page.js b/miniprogram/components/form-page/form-page.js new file mode 100644 index 0000000..7db760d --- /dev/null +++ b/miniprogram/components/form-page/form-page.js @@ -0,0 +1,131 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 2); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 2: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + properties: { + title: { + type: String, + value: '' + }, + subtitle: { + type: String, + value: '' + } + }, + relations: { + '../cells/cells': { + type: 'descendant', + linked: function linked(target) { + if (!this.data.firstItem) { + this.data.firstItem = target; + } + if (target !== this.data.firstItem) { + target.setOuterClass('weui-cells__group_wxss'); + } + } + } + }, + data: { + firstItem: null + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/form-page/form-page.json b/miniprogram/components/form-page/form-page.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/form-page/form-page.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/form-page/form-page.wxml b/miniprogram/components/form-page/form-page.wxml new file mode 100644 index 0000000..9f067aa --- /dev/null +++ b/miniprogram/components/form-page/form-page.wxml @@ -0,0 +1,33 @@ + + + + {{title}} + {{subtitle}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/miniprogram/components/form-page/form-page.wxss b/miniprogram/components/form-page/form-page.wxss new file mode 100644 index 0000000..dcc182d --- /dev/null +++ b/miniprogram/components/form-page/form-page.wxss @@ -0,0 +1 @@ +.weui-cells__group_form:first-child .weui-cells__title{margin-top:0}.weui-cells__group_form .weui-cells__title{margin-top:24px;margin-bottom:8px;padding:0 32px}.weui-cells__group_form .weui-cells:before,.weui-cells__group_form .weui-cell:before{left:32px;right:32px}.weui-cells__group_form .weui-cells_checkbox .weui-check__label:before{left:72px}.weui-cells__group_form .weui-cells:after{left:32px;right:32px}.weui-cells__group_form .weui-cell{padding:16px 32px;color:rgba(0,0,0,0.9)}.weui-cells__group_form .weui-cell__hd{padding-right:16px}.weui-cells__group_form .weui-cell__ft{padding-left:16px}.weui-cells__group_form .weui-cell_warn input{color:#FA5151}.weui-cells__group_form .weui-label{max-width:5em;margin-right:8px}.weui-cells__group_form .weui-cells__tips{margin-top:8px;padding:0 32px;color:rgba(0,0,0,0.3)}.weui-cells__group_form .weui-cells__tips a{font-weight:700}.weui-cells__group_form .weui-cell_vcode{padding:12px 32px}.weui-cells__group_form .weui-vcode-btn{font-size:16px;padding:0 12px;margin-left:0;height:auto;width:auto;line-height:2em;color:#06AE56;background-color:#F2F2F2}.weui-cells__group_form .weui-vcode-btn:before{display:none}.weui-cells__group_form .weui-cell_select{padding:0}.weui-cells__group_form .weui-cell_select .weui-select{padding:0 32px}.weui-cells__group_form .weui-cell_select .weui-cell__bd:after{right:32px}.weui-cells__group_form .weui-cell_select-before .weui-label{margin-right:24px}.weui-cells__group_form .weui-cell_select-before .weui-select{padding-right:24px;box-sizing:initial}.weui-cells__group_form .weui-cell_select-after{padding-left:32px}.weui-cells__group_form .weui-cell_select-after .weui-select{padding-left:0}.weui-cells__group_form .weui-cell_switch{padding:12px 32px}.weui-cells__group_wxss.weui-cells__group_wxss .weui-cells__title{margin-top:24px}.weui-form{padding:56px 0 0;padding:calc(56px + constant(safe-area-inset-top)) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left);padding:calc(56px + env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:flex;flex-direction:column;min-height:100%;box-sizing:border-box;line-height:1.4;background-color:#FFFFFF}.weui-form a:not(.weui-btn){color:#576B95}.weui-form .weui-footer,.weui-form .weui-footer__link{font-size:12px}.weui-form .weui-agree{padding:0}.weui-form__text-area{padding:0 32px;color:rgba(0,0,0,0.9);text-align:center}.weui-form__control-area{flex:1;margin:48px 0}.weui-form__tips-area,.weui-form__extra-area{margin-bottom:24px;text-align:center}.weui-form__opr-area{margin-bottom:64px}.weui-form__opr-area:last-child{margin-bottom:96px}.weui-form__title{font-size:22px;font-weight:700;line-height:1.36}.weui-form__desc{font-size:17px;margin-top:16px}.weui-form__tips{color:rgba(0,0,0,0.5);font-size:12px} \ No newline at end of file diff --git a/miniprogram/components/form/form.js b/miniprogram/components/form/form.js new file mode 100644 index 0000000..a61d4b4 --- /dev/null +++ b/miniprogram/components/form/form.js @@ -0,0 +1,591 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 4); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.diff = function (old, newVal) { + if (!old && newVal || old && !newVal) return true; + for (var k in newVal) { + if (old[k] !== newVal[k]) return true; + } + for (var _k in old) { + if (old[_k] !== newVal[_k]) return true; + } + return false; +}; +exports.diffObject = function (old, newVal) { + if (!old && newVal) return newVal; + if (!newVal && old) return old; + var diffObj = {}; + var isDiff = false; + for (var k in newVal) { + if (old[k] !== newVal[k]) { + isDiff = true; + diffObj[k] = newVal[k]; + } + } + for (var _k2 in old) { + if (old[_k2] !== newVal[_k2]) { + isDiff = true; + diffObj[_k2] = newVal[_k2]; + } + } + return isDiff ? diffObj : null; +}; + +/***/ }), +/* 1 */, +/* 2 */, +/* 3 */, +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +var form_validator_1 = __webpack_require__(5); +var object_1 = __webpack_require__(0); +function linked(target) { + if (target.data.prop) { + this.data.formItems[target.data.prop] = target; + } + if (target.setInForm) { + target.setInForm(); + } + if (!this.data.firstItem) { + this.data.firstItem = target; + } + if (target !== this.data.firstItem) {} +} +function unlinked(target) { + if (target.data.prop) { + delete this.data.formItems[target.data.prop]; + } +} +Component({ + properties: { + models: { + type: Object, + value: {}, + observer: '_modelChange' + }, + rules: { + type: Array, + value: [], + observer: '_rulesChange' + }, + extClass: { + type: String, + value: '' + } + }, + data: { + errors: {}, + formItems: {}, + firstItem: null + }, + relations: { + '../cell/cell': { + type: 'descendant', + linked: linked, + unlinked: unlinked + }, + '../checkbox-group/checkbox-group': { + type: 'descendant', + linked: linked, + unlinked: unlinked + } + }, + attached: function attached() { + this.initRules(); + this.formValidator = new form_validator_1.default(this.data.models, this.data.newRules); + }, + + methods: { + initRules: function initRules(rules) { + var newRules = {}; + (rules || this.data.rules).forEach(function (rule) { + if (rule.name && rule.rules) { + newRules[rule.name] = rule.rules || []; + } + }); + this.setData({ newRules: newRules }); + return newRules; + }, + _modelChange: function _modelChange(newVal, oldVal, path) { + var _this = this; + + if (!this.isInit) { + this.isInit = true; + return newVal; + } + this.formValidator.setModel(newVal); + this.isInit = true; + var diffObj = object_1.diffObject(oldVal, newVal); + if (diffObj) { + (function () { + var isValid = true; + var errors = []; + var errorMap = {}; + + var _loop = function _loop(k) { + _this.formValidator.validateField(k, diffObj[k], function (isValided, error) { + if (error && error[k]) { + errors.push(error[k]); + errorMap[k] = error[k]; + } + isValid = isValided; + }); + }; + + for (var k in diffObj) { + _loop(k); + } + _this._showErrors(diffObj, errorMap); + _this.triggerEvent(isValid ? 'success' : 'fail', isValid ? { trigger: 'change' } : { errors: errors, trigger: 'change' }); + })(); + } + return newVal; + }, + _rulesChange: function _rulesChange(newVal) { + var newRules = this.initRules(newVal); + if (this.formValidator) { + this.formValidator.setRules(newRules); + } + return newVal; + }, + _showAllErrors: function _showAllErrors(errors) { + for (var k in this.data.newRules) { + this._showError(k, errors && errors[k]); + } + }, + _showErrors: function _showErrors(objs, errors) { + for (var k in objs) { + this._showError(k, errors && errors[k]); + } + }, + _showError: function _showError(prop, error) { + var formItem = this.data.formItems[prop]; + if (formItem && formItem.data.showError) { + formItem.setError(error); + } + }, + validate: function validate(cb) { + var _this2 = this; + + return this.formValidator.validate(function (isValid, errors) { + _this2._showAllErrors(errors); + var handleError = _this2.handleErrors(errors); + _this2.triggerEvent(isValid ? 'success' : 'fail', isValid ? { trigger: 'validate' } : { errors: handleError, trigger: 'validate' }); + cb && cb(isValid, handleError); + }); + }, + validateField: function validateField(name, value) { + var _this3 = this; + + var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (v) { + var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + }; + + return this.formValidator.validateField(name, value, function (isValid, errors) { + _this3._showError(name, errors); + var handleError = _this3.handleErrors(errors); + _this3.triggerEvent(isValid ? 'success' : 'fail', isValid ? { trigger: 'validate' } : { errors: handleError, trigger: 'validate' }); + cb && cb(isValid, handleError); + }); + }, + handleErrors: function handleErrors(errors) { + if (errors) { + var newErrors = []; + this.data.rules.forEach(function (rule) { + if (errors[rule.name]) { + errors[rule.name].name = rule.name; + newErrors.push(errors[rule.name]); + } + }); + return newErrors; + } + return errors; + }, + addMethod: function addMethod(ruleName, method) { + return this.formValidator.addMethod(ruleName, method); + } + } +}); +exports.default = form_validator_1.default; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +Object.defineProperty(exports, "__esModule", { value: true }); +var validator_1 = __webpack_require__(6); +var object_1 = __webpack_require__(0); +var toString = Object.prototype.toString; +var validateSingleRule = function validateSingleRule(rule, value) { + var param = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var models = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var message = ''; + for (var ruleKey in rule) { + if (ruleKey === 'name' || ruleKey === 'message') continue; + var validateMethod = typeof rule.validator !== 'undefined' ? rule.validator : validator_1.default[ruleKey]; + if (typeof validateMethod === 'function') { + message = validateMethod(rule, value, param, models); + if (message) { + return message; + } + } + } + return message; +}; + +var FormValidator = function () { + function FormValidator(models, rules) { + _classCallCheck(this, FormValidator); + + this.models = models; + this.rules = rules; + this.errors = {}; + } + + FormValidator.prototype.validate = function validate(cb) { + var _this = this; + + return new Promise(function (resolve) { + var fieldCount = 0; + var failCount = 0; + var errors = _this.errors; + var models = _this.models; + var errorChanged = false; + + var _loop = function _loop(k) { + (function (fieldName) { + var oldError = errors[fieldName]; + _this._innerValidateField(k, models[fieldName], function (valid, newError) { + fieldCount++; + if (!valid) failCount++; + if (object_1.diff(oldError, newError)) { + errors[fieldName] = newError; + errorChanged = true; + } + }); + })(k); + }; + + for (var k in _this.rules) { + _loop(k); + } + if (errorChanged) {} + var keys = Object.keys(errors); + keys.forEach(function (key) { + if (!errors[key]) delete errors[key]; + }); + resolve({ isValid: !failCount, errors: failCount ? errors : undefined }); + cb && cb(!failCount, failCount ? errors : undefined); + }); + }; + + FormValidator.prototype.validateField = function validateField(name, value) { + var _this2 = this; + + var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (v) { + var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + }; + + return new Promise(function (resolve) { + _this2._innerValidateField(name, value, function (valid, error) { + var errObj = {}; + errObj[name] = error; + resolve({ valid: valid, error: valid ? undefined : error }); + cb(valid, valid ? undefined : errObj); + var oldError = _this2.errors[name]; + var errorChanged = object_1.diff(oldError, error); + if (errorChanged) { + if (!error) delete _this2.errors[name]; + _this2.errors[name] = error; + } + }); + }); + }; + + FormValidator.prototype._innerValidateField = function _innerValidateField(name, value) { + var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (v) { + var errors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + }; + + var rules = this.rules[name]; + if (!rules) { + console.warn("[form-validtor] rule name " + name + " not exists."); + cb(true); + return; + } + if (typeof value === 'function') { + cb = value; + value = undefined; + } + var isFail = false; + var models = this.models; + if (toString.call(rules) === '[object Array]') { + rules.forEach(function (rule) { + rule.name = name; + var resMessage = validateSingleRule(rule, value || models[name], rule.param, models); + if (resMessage && !isFail) { + isFail = true; + var error = resMessage ? { message: resMessage, rule: rule } : undefined; + cb(false, error); + } + }); + if (!isFail) { + cb(!isFail); + } + } else { + var rule = rules; + rule.name = name; + var resMessage = validateSingleRule(rule, value || models[name], rule.param, models); + var error = resMessage ? { message: resMessage, rule: rule } : undefined; + if (resMessage) { + isFail = true; + } + cb(!isFail, error); + } + }; + + FormValidator.prototype.addMethod = function addMethod(ruleName, method) { + validator_1.default[ruleName] = method; + }; + + FormValidator.prototype.setModel = function setModel(newModel) { + this.models = newModel; + }; + + FormValidator.prototype.setRules = function setRules(newRules) { + this.rules = newRules; + }; + + return FormValidator; +}(); + +exports.default = FormValidator; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +var string_1 = __webpack_require__(7); +var defaultMessage = { + required: '%s必填', + minlength: '长度最少为%s', + maxlength: '长度最大为%s', + rangelength: '长度在%s和%s之间', + bytelength: '最多只能输入%s个字', + min: '值最小为%s', + max: '值最大为%s', + range: '值的范围为%s和%s之间', + mobile: '请输入正确的手机号', + email: '请输入正确的电子邮件', + url: '请输入正确的URL地址', + equalTo: '值和字段%s不相等' +}; +exports.default = { + required: function required(r, val, param, models) { + if (r.required === false) return; + if (!val) return string_1.sprintf(r.message || defaultMessage.required, r.name); + }, + minlength: function minlength(r, val) { + var minlen = r.minlength; + val = val || ''; + if (val.length < minlen) return string_1.sprintf(r.message || defaultMessage.minlength, minlen); + }, + maxlength: function maxlength(r, val) { + var maxlen = r.maxlength; + val = val || ''; + if (val.length > maxlen) return string_1.sprintf(r.message || defaultMessage.maxlength, maxlen); + }, + rangelength: function rangelength(r, val) { + var range = r.range; + val = val || ''; + if (val.length > range[1] || val.length < range[0]) return string_1.sprintf(r.message || defaultMessage.rangelength, range[0], range[1]); + }, + min: function min(r, val) { + var min = r.min; + if (val < min) return string_1.sprintf(r.message || defaultMessage.min, min); + }, + max: function max(r, val) { + var max = r.max; + if (val > max) return string_1.sprintf(r.message || defaultMessage.max, max); + }, + range: function range(r, val) { + var range = r.range; + if (val < range[0] || val > range[1]) return string_1.sprintf(r.message || defaultMessage.range, range[0], range[1]); + }, + mobile: function mobile(r, val) { + if (r.mobile === false) return; + val = val || ''; + if (val.length !== 11) return string_1.sprintf(r.message || defaultMessage.mobile); + }, + email: function email(r, value) { + if (r.email === false) return; + if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value)) { + return string_1.sprintf(r.message || defaultMessage.email); + } + }, + url: function url(r, value) { + if (r.url === false) return; + if (!/^(https?|s?ftp|weixin):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)) { + return r.message || defaultMessage.url; + } + }, + equalTo: function equalTo(r, value, param, models) { + var equalTo = r.equalTo; + if (value !== models[equalTo]) return string_1.sprintf(r.message || defaultMessage.equalTo, r.name); + }, + bytelength: function bytelength(r, value, param, models) { + param = r.param; + var len = value.replace(/[^\x00-\xff]/g, '**').length; + if (len > param) return string_1.sprintf(r.message || defaultMessage.bytelength, param); + } +}; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sprintf = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var i = void 0; + var result = args[0] || ''; + var para = void 0; + var reg = void 0; + var length = args.length - 1; + if (length < 1) { + return result; + } + i = 1; + while (i < length + 1) { + result = result.replace(/%s/, '{#' + i + '#}'); + i++; + } + result.replace('%s', ''); + i = 1; + while (true) { + para = args[i]; + if (para === undefined) { + break; + } + reg = new RegExp('{#' + i + '#}', 'g'); + result = result.replace(reg, para); + i++; + } + return result; +}; + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/miniprogram/components/form/form.json b/miniprogram/components/form/form.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/form/form.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/form/form.wxml b/miniprogram/components/form/form.wxml new file mode 100644 index 0000000..d58aa4d --- /dev/null +++ b/miniprogram/components/form/form.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/miniprogram/components/gallery/gallery.js b/miniprogram/components/gallery/gallery.js new file mode 100644 index 0000000..4d14d2e --- /dev/null +++ b/miniprogram/components/gallery/gallery.js @@ -0,0 +1,172 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 21); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 21: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + imgUrls: { + type: Array, + value: [], + observer: function observer(newVal, oldVal, changedPath) { + this.setData({ currentImgs: newVal }); + } + }, + showDelete: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: true + }, + current: { + type: Number, + value: 0 + }, + hideOnClick: { + type: Boolean, + value: true + }, + extClass: { + type: Boolean, + value: '' + } + }, + data: { + currentImgs: [] + }, + ready: function ready() { + var data = this.data; + this.setData({ currentImgs: data.imgUrls }); + }, + + methods: { + change: function change(e) { + this.setData({ + current: e.detail.current + }); + this.triggerEvent('change', { current: e.detail.current }, {}); + }, + deleteImg: function deleteImg() { + var data = this.data; + var imgs = data.currentImgs; + var url = imgs.splice(data.current, 1); + this.triggerEvent('delete', { url: url[0], index: data.current }, {}); + if (imgs.length === 0) { + this.hideGallery(); + return; + } + this.setData({ + current: 0, + currentImgs: imgs + }); + }, + hideGallery: function hideGallery() { + var data = this.data; + if (data.hideOnClick) { + this.setData({ + show: false + }); + this.triggerEvent('hide', {}, {}); + } + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/gallery/gallery.json b/miniprogram/components/gallery/gallery.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/gallery/gallery.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/gallery/gallery.wxml b/miniprogram/components/gallery/gallery.wxml new file mode 100644 index 0000000..2529a71 --- /dev/null +++ b/miniprogram/components/gallery/gallery.wxml @@ -0,0 +1,13 @@ + + {{current+1}}/{{currentImgs.length}} + + + + + + + + + 删除 + + diff --git a/miniprogram/components/gallery/gallery.wxss b/miniprogram/components/gallery/gallery.wxss new file mode 100644 index 0000000..5e6caa4 --- /dev/null +++ b/miniprogram/components/gallery/gallery.wxss @@ -0,0 +1 @@ +.weui-gallery{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000;z-index:1000;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;opacity:0;visibility:hidden;transition:opacity .3s}.weui-gallery_show{display:-webkit-box;display:-webkit-flex;display:flex;visibility:visible;opacity:1}.weui-gallery__img__wrp{-webkit-box-flex:1;-webkit-flex:1;flex:1;position:relative;font-size:0}.weui-gallery__img{background:center center no-repeat;background-size:contain;position:absoulte;width:100%;height:100%}.weui-gallery__opr{background-color:#0D0D0D;color:#FFFFFF;line-height:60px;min-height:60px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);text-align:center}.weui-gallery__opr navigator{color:#FFFFFF}.weui-gallery__del{display:block}.weui-gallery__info{color:#FFFFFF;font-size:17px;line-height:60px;min-height:60px;text-align:center} \ No newline at end of file diff --git a/miniprogram/components/half-screen-dialog/half-screen-dialog.js b/miniprogram/components/half-screen-dialog/half-screen-dialog.js new file mode 100644 index 0000000..9f7c6eb --- /dev/null +++ b/miniprogram/components/half-screen-dialog/half-screen-dialog.js @@ -0,0 +1,165 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 17); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 17: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + closabled: { + type: Boolean, + value: true + }, + title: { + type: String, + value: '' + }, + subTitle: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + desc: { + type: String, + value: '' + }, + tips: { + type: String, + value: '' + }, + maskClosable: { + type: Boolean, + value: true + }, + mask: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: false, + observer: '_showChange' + }, + buttons: { + type: Array, + value: [] + } + }, + methods: { + close: function close(e) { + var type = e.currentTarget.dataset.type; + + if (this.data.maskClosable || type === 'close') { + this.setData({ + show: false + }); + this.triggerEvent('close'); + } + }, + buttonTap: function buttonTap(e) { + var index = e.currentTarget.dataset.index; + + this.triggerEvent('buttontap', { index: index, item: this.data.buttons[index] }, {}); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/half-screen-dialog/half-screen-dialog.json b/miniprogram/components/half-screen-dialog/half-screen-dialog.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/half-screen-dialog/half-screen-dialog.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/half-screen-dialog/half-screen-dialog.wxml b/miniprogram/components/half-screen-dialog/half-screen-dialog.wxml new file mode 100644 index 0000000..7a74a5c --- /dev/null +++ b/miniprogram/components/half-screen-dialog/half-screen-dialog.wxml @@ -0,0 +1,43 @@ + + + + + + 关闭 + + + + {{title}} + {{subTitle}} + + + + + + + 更多 + + + + + {{desc}} + {{tips}} + + + + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/components/half-screen-dialog/half-screen-dialog.wxss b/miniprogram/components/half-screen-dialog/half-screen-dialog.wxss new file mode 100644 index 0000000..93f2fe2 --- /dev/null +++ b/miniprogram/components/half-screen-dialog/half-screen-dialog.wxss @@ -0,0 +1 @@ +.weui-half-screen-dialog{position:fixed;left:0;right:0;bottom:0;max-height:75%;z-index:5000;line-height:1.4;background-color:#FFFFFF;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden;padding:0 24px;padding:0 calc(24px + constant(safe-area-inset-right)) constant(safe-area-inset-bottom) calc(24px + constant(safe-area-inset-left));padding:0 calc(24px + env(safe-area-inset-right)) env(safe-area-inset-bottom) calc(24px + env(safe-area-inset-left))}.weui-half-screen-dialog__hd{font-size:8px;height:8em;display:flex;align-items:center}.weui-half-screen-dialog__hd .weui-icon-btn{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.weui-half-screen-dialog__hd__side{position:relative;left:-8px}.weui-half-screen-dialog__hd__main{flex:1}.weui-half-screen-dialog__hd__side+.weui-half-screen-dialog__hd__main{text-align:center;padding:0 40px}.weui-half-screen-dialog__hd__main+.weui-half-screen-dialog__hd__side{right:-8px;left:auto}.weui-half-screen-dialog__hd__main+.weui-half-screen-dialog__hd__side .weui-icon-btn{right:0}.weui-half-screen-dialog__title{display:block;color:rgba(0,0,0,0.9);font-weight:700;font-size:15px}.weui-half-screen-dialog__subtitle{display:block;color:rgba(0,0,0,0.5);font-size:10px}.weui-half-screen-dialog__bd{word-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;overflow-y:auto}.weui-half-screen-dialog__desc{padding-top:4px;font-size:17px;font-weight:700;color:rgba(0,0,0,0.9);line-height:1.4}.weui-half-screen-dialog__tips{padding-top:16px;font-size:14px;color:rgba(0,0,0,0.3);line-height:1.4}.weui-half-screen-dialog__ft{padding:40px 24px 32px;text-align:center}.weui-half-screen-dialog__ft .weui-btn:nth-last-child(n+2),.weui-half-screen-dialog__ft .weui-btn:nth-last-child(n+2)+.weui-btn{display:inline-block;vertical-align:top;margin:0 8px;width:120px}.weui-icon-btn{background-color:transparent;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;border:0;outline:0;font-size:0}.weui-icon-btn_goback{width:12px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cg fill='none' fill-rule='evenodd' transform='translate(-16 -20)'%3E %3Cpath fill='%23FFF' d='M0 12C0 5.373 5.367 0 12 0h390c6.628 0 12 5.374 12 12v52H0V12z'/%3E %3Cpath fill='%23000' fill-opacity='.9' d='M26 39.438L24.955 40.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42l7.666-7.79L26 24.563 18.682 32 26 39.438z'/%3E %3C/g%3E%3C/svg%3E")}.weui-icon-btn_close{width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24' height='24' viewBox='0 0 24 24'%3E %3Cdefs%3E %3Cpath id='33cf2e7b-22e9-42d7-9c56-a9f4a4e03565-a' d='M8 6.943L1.807.75.75 1.807 6.943 8 .75 14.193l1.057 1.057L8 9.057l6.193 6.193 1.057-1.057L9.057 8l6.193-6.193L14.193.75z'/%3E %3C/defs%3E %3Cg fill='none' fill-rule='evenodd' transform='translate(-16 -20)'%3E %3Cpath fill='%23FFF' d='M0 12C0 5.373 5.367 0 12 0h390c6.628 0 12 5.374 12 12v52H0V12z'/%3E %3Cuse fill='%23000' fill-opacity='.9' transform='translate(20 24)' xlink:href='%2333cf2e7b-22e9-42d7-9c56-a9f4a4e03565-a'/%3E %3C/g%3E%3C/svg%3E")}.weui-icon-btn_more{width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E %3Cg fill='none' fill-rule='evenodd' transform='translate(-374 -20)'%3E %3Cpath fill='%23FFF' d='M0 12C0 5.373 5.367 0 12 0h390c6.628 0 12 5.374 12 12v52H0V12z'/%3E %3Cpath fill='%23000' fill-opacity='.9' d='M380.75 32a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zm5.25-1.75a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5zm7 0a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5z'/%3E %3C/g%3E%3C/svg%3E")}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.weui-mask,.weui-half-screen-dialog{transition:all .3s}.weui-hidden .weui-mask{visibility:hidden;opacity:0}.weui-hidden .weui-half-screen-dialog{transform:translateY(100%)}.weui-show .weui-mask{opacity:1;visibility:visible}.weui-show .weui-half-screen-dialog{transform:translateY(0%)} \ No newline at end of file diff --git a/miniprogram/components/icon/icon.js b/miniprogram/components/icon/icon.js new file mode 100644 index 0000000..4b030ed --- /dev/null +++ b/miniprogram/components/icon/icon.js @@ -0,0 +1,295 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 10); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 10: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +var base64_1 = __webpack_require__(11); +var icondata_1 = __webpack_require__(12); +Component({ + options: { + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + type: { + type: String, + value: 'outline', + observer: '_genSrcByType' + }, + icon: { + type: String, + value: '', + observer: '_genSrcByIcon' + }, + size: { + type: Number, + value: 20 + }, + color: { + type: String, + value: '#000000' + } + }, + data: { + src: '', + height: 20, + width: 20 + }, + methods: { + _genSrcByIcon: function _genSrcByIcon(v) { + this._genSrc(icondata_1.default[v][this.data.type]); + }, + _genSrcByType: function _genSrcByType(v) { + this._genSrc(icondata_1.default[this.data.icon][v]); + }, + _genSrc: function _genSrc(rawData) { + if (!rawData) return; + var base64 = base64_1.default.encode(rawData); + this.setData({ + src: 'data:image/svg+xml;base64,' + base64 + }); + } + } +}); + +/***/ }), + +/***/ 11: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +var b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +var cb_encode = function cb_encode(ccc) { + var padlen = [0, 2, 1][ccc.length % 3], + ord = ccc.charCodeAt(0) << 16 | (ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8 | (ccc.length > 2 ? ccc.charCodeAt(2) : 0), + chars = [b64chars.charAt(ord >>> 18), b64chars.charAt(ord >>> 12 & 63), padlen >= 2 ? '=' : b64chars.charAt(ord >>> 6 & 63), padlen >= 1 ? '=' : b64chars.charAt(ord & 63)]; + return chars.join(''); +}; +var btoa = global.btoa ? function (b) { + return global.btoa(b); +} : function (b) { + return b.replace(/[\s\S]{1,3}/g, cb_encode); +}; +var fromCharCode = String.fromCharCode; +var cb_utob = function cb_utob(c) { + var cc; + if (c.length < 2) { + cc = c.charCodeAt(0); + return cc < 0x80 ? c : cc < 0x800 ? fromCharCode(0xc0 | cc >>> 6) + fromCharCode(0x80 | cc & 0x3f) : fromCharCode(0xe0 | cc >>> 12 & 0x0f) + fromCharCode(0x80 | cc >>> 6 & 0x3f) + fromCharCode(0x80 | cc & 0x3f); + } else { + cc = 0x10000 + (c.charCodeAt(0) - 0xD800) * 0x400 + (c.charCodeAt(1) - 0xDC00); + return fromCharCode(0xf0 | cc >>> 18 & 0x07) + fromCharCode(0x80 | cc >>> 12 & 0x3f) + fromCharCode(0x80 | cc >>> 6 & 0x3f) + fromCharCode(0x80 | cc & 0x3f); + } +}; +var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; +var utob = function utob(u) { + return u.replace(re_utob, cb_utob); +}; +var _encode = function _encode(u) { + var isUint8Array = Object.prototype.toString.call(u) === '[object Uint8Array]'; + return isUint8Array ? u.toString('base64') : btoa(utob(String(u))); +}; +var encode = function encode(u) { + var urisafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + return !urisafe ? _encode(u) : _encode(String(u)).replace(/[+\/]/g, function (m0) { + return m0 == '+' ? '-' : '_'; + }).replace(/=/g, ''); +}; +exports.default = { + encode: encode +}; + +/***/ }), + +/***/ 12: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { + "add-friends": { outline: "3.Icons/Outlined/add-friendsCreated with Sketch. ", field: " 3.Icons/Filled/add-friends Created with Sketch. " }, + "add": { outline: " 3.Icons/Outlined/add Created with Sketch. ", field: " 3.Icons/Filled/add Created with Sketch. " }, + "add2": { outline: " 3.Icons/Outlined/add2 Created with Sketch. ", field: " 3.Icons/Filled/add2 Created with Sketch. " }, + "album": { outline: " 3.Icons/Outlined/album Created with Sketch. ", field: " 3.Icons/Filled/album Created with Sketch. " }, + "arrow": { outline: " 3.Icons/Outlined/arrow Created with Sketch. ", field: " 3.Icons/Filled/arrow Created with Sketch. " }, + "at": { outline: " 3.Icons/Outlined/at Created with Sketch. ", field: " 3.Icons/Filled/at Created with Sketch. " }, + "back": { outline: " 3.Icons/Outlined/back Created with Sketch. ", field: " 3.Icons/Filled/back Created with Sketch. " }, + "back2": { outline: " 3.Icons/Outlined/back2 Created with Sketch. ", field: " 3.Icons/Filled/back2 Created with Sketch. " }, + "bellring-off": { outline: " 3.Icons/Outlined/bellring_off Created with Sketch. ", field: " 3.Icons/Filled/bell-ring_off Created with Sketch. " }, + "bellring-on": { outline: " 3.Icons/Outlined/bellring_on Created with Sketch. ", field: " 3.Icons/Filled/bell-ring_on Created with Sketch. " }, + "camera": { outline: " 3.Icons/Outlined/camera Created with Sketch. ", field: " 3.Icons/Filled/camera Created with Sketch. " }, + "cellphone": { outline: " 3.Icons/Outlined/cellphone Created with Sketch. ", field: " 3.Icons/Filled/cellphone Created with Sketch. " }, + "clip": { outline: " 3.Icons/Outlined/clip Created with Sketch. ", field: " 3.Icons/Filled/clip Created with Sketch. " }, + "close": { outline: " 3.Icons/Outlined/close Created with Sketch. ", field: " 3.Icons/Filled/close Created with Sketch. " }, + "close2": { outline: " 3.Icons/Outlined/close2 Created with Sketch. ", field: " 3.Icons/Filled/close2 Created with Sketch. " }, + "comment": { outline: " 3.Icons/Outlined/comment Created with Sketch. ", field: " 3.Icons/Filled/comment Created with Sketch. " }, + "contacts": { outline: " 3.Icons/Outlined/contacts Created with Sketch. ", field: " 3.Icons/Filled/contacts Created with Sketch. " }, + "copy": { outline: " 3.Icons/Outlined/copy Created with Sketch. ", field: " 3.Icons/Filled/copy Created with Sketch. " }, + "delete-on": { outline: " 3.Icons/Outlined/delete_on Created with Sketch. ", field: " 3.Icons/Filled/delete_on Created with Sketch. " }, + "delete": { outline: " 3.Icons/Outlined/delete Created with Sketch. ", field: " 3.Icons/Filled/delete Created with Sketch. " }, + "discover": { outline: " 3.Icons/Outlined/discover Created with Sketch. ", field: " 3.Icons/Filled/discover Created with Sketch. " }, + "display": { outline: " 3.Icons/Outlined/display Created with Sketch. ", field: " 3.Icons/Filled/display Created with Sketch. " }, + "done": { outline: " 3.Icons/Outlined/done Created with Sketch. ", field: " 3.Icons/Filled/done Created with Sketch. " }, + "done2": { outline: " 3.Icons/Outlined/done2 Created with Sketch. ", field: " 3.Icons/Filled/done2 Created with Sketch. " }, + "download": { outline: " 3.Icons/Outlined/download Created with Sketch. ", field: " 3.Icons/Filled/download Created with Sketch. " }, + "email": { outline: " 3.Icons/Outlined/email Created with Sketch. ", field: " 3.Icons/Filled/email Created with Sketch. " }, + "error": { outline: " 3.Icons/Outlined/error Created with Sketch. ", field: " 3.Icons/Filled/error Created with Sketch. " }, + "eyes-off": { outline: " 3.Icons/Outlined/eyes_off Created with Sketch. ", field: " 3.Icons/Filled/eyes_off Created with Sketch. " }, + "eyes-on": { outline: " 3.Icons/Outlined/eyes_on Created with Sketch. ", field: " 3.Icons/Filled/eyes_on Created with Sketch. " }, + "folder": { outline: " 3.Icons/Outlined/folder Created with Sketch. ", field: " 3.Icons/Filled/folder Created with Sketch. " }, + "group-detail": { outline: " 3.Icons/Outlined/group-detail Created with Sketch. ", field: " 3.Icons/Filled/group-detail Created with Sketch. " }, + "help": { outline: " 3.Icons/Outlined/help Created with Sketch. ", field: " 3.Icons/Filled/help Created with Sketch. " }, + "home": { outline: " 3.Icons/Outlined/home Created with Sketch. ", field: " 3.Icons/Filled/home Created with Sketch. " }, + "imac": { outline: " 3.Icons/Outlined/imac Created with Sketch. ", field: " 3.Icons/Filled/imac Created with Sketch. " }, + "info": { outline: " 3.Icons/Outlined/info Created with Sketch. ", field: " 3.Icons/Filled/info Created with Sketch. " }, + "keyboard": { outline: " 3.Icons/Outlined/keyboard Created with Sketch. ", field: " 3.Icons/Filled/keyboard Created with Sketch. " }, + "like": { outline: " 3.Icons/Outlined/like Created with Sketch. ", field: " 3.Icons/Filled/like Created with Sketch. " }, + "link": { outline: " 3.Icons/Outlined/link Created with Sketch. ", field: " 3.Icons/Filled/link Created with Sketch. " }, + "location": { outline: " 3.Icons/Outlined/location Created with Sketch. ", field: " 3.Icons/Filled/location Created with Sketch. " }, + "lock": { outline: " 3.Icons/Outlined/lock Created with Sketch. ", field: " 3.Icons/Filled/lock Created with Sketch. " }, + "max-window": { outline: " 3.Icons/Outlined/max-window Created with Sketch. ", field: " 3.Icons/Filled/max-window Created with Sketch. " }, + "me": { outline: " 3.Icons/Outlined/me Created with Sketch. ", field: " 3.Icons/Filled/me Created with Sketch. " }, + "mike": { outline: " 3.Icons/Outlined/mike Created with Sketch. ", field: " 3.Icons/Filled/mike Created with Sketch. " }, + "mike2": { outline: " 3.Icons/Outlined/mike2 Created with Sketch. ", field: " 3.Icons/Filled/mike2 Created with Sketch. " }, + "mobile-contacts": { outline: " 3.Icons/Outlined/mobile-contacts Created with Sketch. ", field: " 3.Icons/Filled/mobile-contacts Created with Sketch. " }, + "more": { outline: " 3.Icons/Outlined/more Created with Sketch. ", field: " 3.Icons/Filled/more Created with Sketch. " }, + "more2": { outline: " 3.Icons/Outlined/more2 Created with Sketch. ", field: " 3.Icons/Filled/more2 Created with Sketch. " }, + "mosaic": { outline: " 3.Icons/Outlined/mosaic Created with Sketch. ", field: " 3.Icons/Filled/mask Created with Sketch. " }, + "music-off": { outline: " 3.Icons/Outlined/music_off Created with Sketch. ", field: " 3.Icons/Filled/music-off Created with Sketch. " }, + "music": { outline: " 3.Icons/Outlined/music Created with Sketch. ", field: " 3.Icons/Filled/music Created with Sketch. " }, + "note": { outline: " 3.Icons/Outlined/note Created with Sketch. ", field: " 3.Icons/Filled/note Created with Sketch. " }, + "pad": { outline: " 3.Icons/Outlined/pad Created with Sketch. ", field: " 3.Icons/Filled/pad Created with Sketch. " }, + "pause": { outline: " 3.Icons/Outlined/pause Created with Sketch. ", field: " 3.Icons/Filled/pause Created with Sketch. " }, + "pencil": { outline: " 3.Icons/Outlined/pencil Created with Sketch. ", field: " 3.Icons/Filled/pencil Created with Sketch. " }, + "photo-wall": { outline: " 3.Icons/Outlined/photo-wall Created with Sketch. ", field: " 3.Icons/Filled/photo-wall Created with Sketch. " }, + "play": { outline: " 3.Icons/Outlined/play Created with Sketch. ", field: " 3.Icons/Filled/play Created with Sketch. " }, + "play2": { outline: " 3.Icons/Outlined/play2 Created with Sketch. ", field: " 3.Icons/Filled/play2 Created with Sketch. " }, + "previous": { outline: " 3.Icons/Outlined/previous Created with Sketch. ", field: " 3.Icons/Filled/previous Created with Sketch. " }, + "previous2": { outline: " 3.Icons/Outlined/previous2 Created with Sketch. ", field: " 3.Icons/Filled/previous2 Created with Sketch. " }, + "qr-code": { outline: " 3.Icons/Outlined/qr-code Created with Sketch. ", field: " 3.Icons/Filled/qr-code Created with Sketch. " }, + "refresh": { outline: " 3.Icons/Outlined/refresh Created with Sketch. ", field: " 3.Icons/Filled/refresh Created with Sketch. " }, + "report-problem": { outline: " 3.Icons/Outlined/report_problem Created with Sketch. ", field: " 3.Icons/Filled/report-problem Created with Sketch. " }, + "search": { outline: " 3.Icons/Outlined/search Created with Sketch. ", field: " 3.Icons/Filled/search Created with Sketch. " }, + "sending": { outline: " 3.Icons/Outlined/sending Created with Sketch. ", field: " 3.Icons/Filled/sending Created with Sketch. " }, + "setting": { outline: " 3.Icons/Outlined/setting Created with Sketch. ", field: " 3.Icons/Filled/setting Created with Sketch. " }, + "share": { outline: " 3.Icons/Outlined/share Created with Sketch. ", field: " 3.Icons/Filled/share Created with Sketch. " }, + "shop": { outline: " 3.Icons/Outlined/shop Created with Sketch. ", field: " 3.Icons/Filled/shop Created with Sketch. " }, + "star": { outline: " 3.Icons/Outlined/star Created with Sketch. ", field: " 3.Icons/Filled/star Created with Sketch. " }, + "sticker": { outline: " 3.Icons/Outlined/sticker Created with Sketch. ", field: " 3.Icons/Filled/sticker Created with Sketch. " }, + "tag": { outline: " 3.Icons/Outlined/tag Created with Sketch. ", field: " 3.Icons/Filled/tag Created with Sketch. " }, + "text": { outline: " 3.Icons/Outlined/text Created with Sketch. ", field: " 3.Icons/Filled/text Created with Sketch. " }, + "time": { outline: " 3.Icons/Outlined/time Created with Sketch. ", field: " 3.Icons/Filled/time Created with Sketch. " }, + "transfer-text": { outline: " 3.Icons/Outlined/transfer-text Created with Sketch. ", field: " 3.Icons/Filled/transfer-text Created with Sketch. " }, + "transfer2": { outline: " 3.Icons/Outlined/transfer2 Created with Sketch. ", field: " 3.Icons/Filled/transfer2 Created with Sketch. " }, + "translate": { outline: " 3.Icons/Outlined/translate Created with Sketch. ", field: " 3.Icons/Filled/translate Created with Sketch. " }, + "tv": { outline: " 3.Icons/Outlined/tv Created with Sketch. ", field: " 3.Icons/Filled/tv Created with Sketch. " }, + "video-call": { outline: " 3.Icons/Outlined/video-call Created with Sketch. ", field: " 3.Icons/Filled/video-call Created with Sketch. " }, + "voice": { outline: " 3.Icons/Outlined/voice Created with Sketch. ", field: " 3.Icons/Filled/voice Created with Sketch. " }, + "volume-down": { outline: " 3.Icons/Outlined/volume_down Created with Sketch. ", field: " 3.Icons/Filled/volume-down Created with Sketch. " }, + "volume-off": { outline: " 3.Icons/Outlined/volume_off Created with Sketch. ", field: " 3.Icons/Filled/volume-off Created with Sketch. " }, + "volume-up": { outline: " 3.Icons/Outlined/volume_up Created with Sketch. ", field: " 3.Icons/Filled/volume-up Created with Sketch. " } +}; + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/icon/icon.json b/miniprogram/components/icon/icon.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/icon/icon.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/icon/icon.wxml b/miniprogram/components/icon/icon.wxml new file mode 100644 index 0000000..dba5634 --- /dev/null +++ b/miniprogram/components/icon/icon.wxml @@ -0,0 +1,14 @@ + + var double = function(a) { + return 2*a + }; + var ifSpecialIcon = function(v) { + return v === 'arrow' || v === 'back' + } + module.exports = { + double: double, + ifSpecialIcon: ifSpecialIcon + } + + + diff --git a/miniprogram/components/icon/icon.wxss b/miniprogram/components/icon/icon.wxss new file mode 100644 index 0000000..f84d9ca --- /dev/null +++ b/miniprogram/components/icon/icon.wxss @@ -0,0 +1 @@ +.weui-icon{vertical-align:middle;display:inline-block;background:black;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;-moz-mask-repeat:no-repeat;mask-size:cover;-webkit-mask-size:cover;-moz-mask-size:cover} \ No newline at end of file diff --git a/miniprogram/components/index-list/index.js b/miniprogram/components/index-list/index.js new file mode 100644 index 0000000..482369e --- /dev/null +++ b/miniprogram/components/index-list/index.js @@ -0,0 +1,249 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 4); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 4: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var throttle = function throttle(func, wait, options) { + var context = void 0; + var args = void 0; + var result = void 0; + var timeout = null; + var previous = 0; + if (!options) options = {}; + var later = function later() { + previous = options.leading === false ? 0 : Date.now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + return function () { + var now = Date.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; +}; +Component({ + options: { + addGlobalClass: true, + pureDataPattern: /^_/ + }, + properties: { + list: { + type: Array, + value: [], + observer: function observer(newVal) { + var _this = this; + + if (newVal.length === 0) return; + var data = this.data; + var alphabet = data.list.map(function (item) { + return item.alpha; + }); + this.setData({ + alphabet: alphabet, + current: alphabet[0] + }, function () { + _this.computedSize(); + }); + } + }, + vibrated: { + type: Boolean, + value: true + } + }, + data: { + windowHeight: 612, + current: 'A', + intoView: '', + touching: false, + alphabet: [], + _tops: [], + _anchorItemH: 0, + _anchorItemW: 0, + _anchorTop: 0, + _listUpperBound: 0 + }, + lifetimes: { + created: function created() {}, + attached: function attached() { + this.__scrollTo = throttle(this._scrollTo, 100, {}); + this.__onScroll = throttle(this._onScroll, 100, {}); + + var _wx$getSystemInfoSync = wx.getSystemInfoSync(), + windowHeight = _wx$getSystemInfoSync.windowHeight; + + this.setData({ windowHeight: windowHeight }); + } + }, + methods: { + choose: function choose(e) { + var item = e.target.dataset.item; + this.triggerEvent('choose', { item: item }); + }, + scrollTo: function scrollTo(e) { + this.__scrollTo(e); + }, + _scrollTo: function _scrollTo(e) { + var data = this.data; + var clientY = e.changedTouches[0].clientY; + var index = Math.floor((clientY - data._anchorTop) / data._anchorItemH); + var current = data.alphabet[index]; + this.setData({ current: current, intoView: current, touching: true }); + if (data.vibrated) wx.vibrateShort(); + }, + computedSize: function computedSize() { + var data = this.data; + var query = this.createSelectorQuery(); + query.selectAll('.city_list_item').boundingClientRect(function (rects) { + var result = rects; + data._tops = result.map(function (item) { + return item.top; + }); + }).exec(); + query.select('.anchor-list').boundingClientRect(function (rect) { + data._anchorItemH = rect.height / data.alphabet.length; + data._anchorItemW = rect.width; + data._anchorTop = rect.top; + }).exec(); + query.select('.page-select-city').boundingClientRect(function (rect) { + data._listUpperBound = rect.top; + }); + }, + removeTouching: function removeTouching() { + var _this2 = this; + + setTimeout(function () { + _this2.setData({ touching: false }); + }, 150); + }, + onScroll: function onScroll(e) { + this.__onScroll(e); + }, + _onScroll: function _onScroll(e) { + var data = this.data; + var _tops = data._tops, + alphabet = data.alphabet; + + var scrollTop = e.detail.scrollTop; + var current = ''; + if (scrollTop < _tops[0]) { + current = alphabet[0]; + } else { + for (var i = 0, len = _tops.length; i < len - 1; i++) { + if (scrollTop >= _tops[i] && scrollTop < _tops[i + 1]) { + current = alphabet[i]; + } + } + } + if (!current) current = alphabet[alphabet.length - 1]; + this.setData({ current: current }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/index-list/index.json b/miniprogram/components/index-list/index.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/index-list/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/index-list/index.wxml b/miniprogram/components/index-list/index.wxml new file mode 100644 index 0000000..3ef2374 --- /dev/null +++ b/miniprogram/components/index-list/index.wxml @@ -0,0 +1,33 @@ + + + + + + {{item.alpha}} + + + + + {{subItem.name}} + + + + + + + + + + + + {{alpha}} + {{alpha}} + + + + + \ No newline at end of file diff --git a/miniprogram/components/index-list/index.wxss b/miniprogram/components/index-list/index.wxss new file mode 100644 index 0000000..d204d4c --- /dev/null +++ b/miniprogram/components/index-list/index.wxss @@ -0,0 +1 @@ +.wx-flex{display:flex;align-items:center}.wx-flex__item{flex:1}.thin-border-bottom{position:relative}.thin-border-bottom:after{content:"";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1px solid #EAEAEA;color:#e5e5e5;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5);z-index:2}.thin-border-top{position:relative}.thin-border-top:after{content:"";position:absolute;left:0;top:0;right:0;height:1px;border-bottom:1px solid #EAEAEA;color:#e5e5e5;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5);z-index:2}.square-tag{color:#9a9a9a;text-align:center;height:30px;line-height:30px;box-sizing:border-box;border-radius:2px;background-color:#f7f7f7;font-size:24rpx;position:relative}.square-tag:after{content:"";width:200%;height:200%;border:1px solid #f7f7f7;transform:scale(.5);transform-origin:0 0;position:absolute;left:0;top:0;box-sizing:border-box;border-radius:4px}.square-tag.selected{background:rgba(26,173,25,0.1);color:#1AAD19}.square-tag.selected:after{border:1px solid #1AAD19}.select-city__hd{padding:0 30rpx;position:fixed;height:50px;background-color:#fff;left:0;right:0;z-index:990}.select-city__hd.thin-border-bottom:after{left:24rpx;right:24rpx}.current-city__name{display:inline-block;margin-right:20rpx;margin-left:12rpx}.city-group_part .city-group__content{padding:0 30rpx}.city-group_part .city-group__title{padding-bottom:24rpx}.city-group__title{padding:24rpx 24rpx 12rpx}.city-group__content{font-size:0}.square-tag{width:200rpx;display:inline-block;margin-right:24rpx;margin-bottom:24rpx;height:80rpx;line-height:80rpx;font-size:30rpx;color:#000;background-color:rgba(0,0,0,0.02);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.city-group__item{padding:30rpx 24rpx;font-size:30rpx}.city-group__item.thin-border-bottom:after{left:24rpx}.city-group_all{padding-bottom:100rpx}.fixed__top{position:fixed;top:0}.anchor-bar__wrp{position:fixed;top:0;bottom:0;right:0;width:60rpx;z-index:999}.anchor-item{font-size:0;text-align:center;position:relative}.anchor-item__inner{line-height:28rpx;height:28rpx;width:28rpx;border-radius:50%;display:inline-block;font-size:20rpx;margin:2rpx 0;font-weight:500}.tapped .anchor-item__pop{display:block}.anchor-item__pop{position:absolute;font-size:64rpx;width:100rpx;height:100rpx;line-height:100rpx;color:#fff;background-color:#C9C9C9;border-radius:50%;right:80rpx;top:50%;transform:translateY(-50%);display:none}.anchor-item__pop:after{content:"";display:block;position:absolute;width:0;height:0;left:80rpx;border:40rpx solid;border-color:transparent transparent transparent #C9C9C9;top:50%;transform:translateY(-50%)}.anchor-item.selected .anchor-item__inner{color:#fff;background-color:#1aad19} \ No newline at end of file diff --git a/miniprogram/components/loading/loading.js b/miniprogram/components/loading/loading.js new file mode 100644 index 0000000..3c38b7a --- /dev/null +++ b/miniprogram/components/loading/loading.js @@ -0,0 +1,181 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 14); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 14: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + show: { + type: Boolean, + value: true, + observer: function observer(newValue) { + this._computedStyle(newValue, this.data.animated); + } + }, + animated: { + type: Boolean, + value: false, + observer: function observer(newValue) { + this._computedStyle(this.data.show, newValue); + } + }, + duration: { + type: Number, + value: 350 + }, + type: { + type: String, + value: 'dot-gray' + }, + tips: { + type: String, + value: '加载中' + } + }, + data: { + animationData: {}, + animationInstance: {}, + displayStyle: 'none' + }, + methods: { + _computedStyle: function _computedStyle(show, animated) { + if (!show) { + if (!animated) { + this.setData({ + displayStyle: 'none' + }); + } else { + this._startAnimation(); + } + } else { + this.setData({ + displayStyle: '' + }); + } + }, + _startAnimation: function _startAnimation() { + var _this = this; + + setTimeout(function () { + var data = _this.data; + var animation = data.animationInstance; + animation.height(0).step(); + _this.setData({ + animationData: animation.export() + }); + }, 0); + } + }, + lifetimes: { + attached: function attached() { + var data = this.data; + var animationInstance = wx.createAnimation({ + duration: data.duration, + timingFunction: 'ease' + }); + this.setData({ animationInstance: animationInstance }); + this._computedStyle(this.data.show, this.data.animated); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/loading/loading.json b/miniprogram/components/loading/loading.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/loading/loading.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/loading/loading.wxml b/miniprogram/components/loading/loading.wxml new file mode 100644 index 0000000..00b30ec --- /dev/null +++ b/miniprogram/components/loading/loading.wxml @@ -0,0 +1,9 @@ + + + + + + + {{tips}} + + \ No newline at end of file diff --git a/miniprogram/components/loading/loading.wxss b/miniprogram/components/loading/loading.wxss new file mode 100644 index 0000000..f5aa149 --- /dev/null +++ b/miniprogram/components/loading/loading.wxss @@ -0,0 +1 @@ +.weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;animation:weuiLoading 1s steps(12, end) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@keyframes weuiLoading{0%{transform:rotate3d(0, 0, 1, 0deg)}100%{transform:rotate3d(0, 0, 1, 360deg)}}.weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid rgba(0,0,0,0.1);margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-0.9em;padding:0 .55em;background-color:#FFFFFF;color:rgba(0,0,0,0.5)}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:rgba(0,0,0,0.1)}.wx_dot_loading,.wx_dot_loading:before,.wx_dot_loading:after{display:inline-block;vertical-align:middle;width:6px;height:6px;-webkit-border-radius:50%;border-radius:50%;background-color:rgba(0,0,0,0.3);font-size:0;animation:dot2 1.6s step-start infinite}.wx_dot_loading{position:relative}.wx_dot_loading:before{content:"";position:absolute;left:-12px;background-color:rgba(0,0,0,0.1);animation:dot1 1.6s step-start infinite}.wx_dot_loading:after{content:"";position:absolute;right:-12px;background-color:rgba(0,0,0,0.5);animation:dot3 1.6s step-start infinite}@keyframes dot1{0%,100%{background-color:rgba(0,0,0,0.1)}30%{background-color:rgba(0,0,0,0.5)}60%{background-color:rgba(0,0,0,0.3)}}@keyframes dot2{0%,100%{background-color:rgba(0,0,0,0.3)}30%{background-color:rgba(0,0,0,0.1)}60%{background-color:rgba(0,0,0,0.5)}}@keyframes dot3{0%,100%{background-color:rgba(0,0,0,0.5)}30%{background-color:rgba(0,0,0,0.3)}60%{background-color:rgba(0,0,0,0.1)}}.wx_dot_loading_white{background-color:rgba(255,255,255,0.3);animation:dotw2 1.6s step-start infinite}.wx_dot_loading_white:before{background-color:rgba(255,255,255,0.5);animation:dotw1 1.6s step-start infinite}.wx_dot_loading_white:after{background-color:rgba(255,255,255,0.1);animation:dotw3 1.6s step-start infinite}@keyframes dotw1{0%,100%{background-color:rgba(255,255,255,0.5)}30%{background-color:rgba(255,255,255,0.1)}60%{background-color:rgba(255,255,255,0.3)}}@keyframes dotw2{0%,100%{background-color:rgba(255,255,255,0.3)}30%{background-color:rgba(255,255,255,0.5)}60%{background-color:rgba(255,255,255,0.1)}}@keyframes dotw3{0%,100%{background-color:rgba(255,255,255,0.1)}30%{background-color:rgba(255,255,255,0.3)}60%{background-color:rgba(255,255,255,0.5)}}.wx_loading_view{display:flex;justify-content:center;align-items:center;overflow:hidden}.loading{color:rgba(255,255,255,0.9);font-size:17px;text-align:center}.loading_view_translation{transition:height .2s .3s ease} \ No newline at end of file diff --git a/miniprogram/components/msg/msg.js b/miniprogram/components/msg/msg.js new file mode 100644 index 0000000..6bc37ad --- /dev/null +++ b/miniprogram/components/msg/msg.js @@ -0,0 +1,132 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 19); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 19: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + properties: { + title: { + type: String, + value: '' + }, + type: { + type: String, + value: '' + }, + icon: { + type: String, + value: '' + }, + desc: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + size: { + type: Number, + value: 64 + } + }, + data: {} +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/msg/msg.json b/miniprogram/components/msg/msg.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/msg/msg.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/msg/msg.wxml b/miniprogram/components/msg/msg.wxml new file mode 100644 index 0000000..edc3148 --- /dev/null +++ b/miniprogram/components/msg/msg.wxml @@ -0,0 +1,24 @@ + + + + + + + {{title}} + + {{desc}} + + + + + + + + + + + + + + + diff --git a/miniprogram/components/msg/msg.wxss b/miniprogram/components/msg/msg.wxss new file mode 100644 index 0000000..4fc5590 --- /dev/null +++ b/miniprogram/components/msg/msg.wxss @@ -0,0 +1 @@ +.weui-msg{padding-top:36px;padding:calc(36px + constant(safe-area-inset-top)) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left);padding:calc(36px + env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);text-align:center;line-height:1.4;min-height:100%;box-sizing:border-box;display:flex;flex-direction:column;background-color:#FFFFFF}.weui-msg__link{color:#576B95;display:inline-block;vertical-align:baseline}.weui-msg__icon-area{margin-bottom:32px}.weui-msg__text-area{margin-bottom:32px;padding:0 32px;flex:1;line-height:1.6}.weui-msg__text-area:first-child{padding-top:96px}.weui-msg__title{margin-bottom:5px;font-weight:700;font-size:22px;word-wrap:break-word;word-break:break-all}.weui-msg__desc{font-size:17px;color:rgba(0,0,0,0.9);word-wrap:break-word;word-break:break-all;margin-bottom:16px}.weui-msg__desc-primary{font-size:14px;color:rgba(0,0,0,0.5);word-wrap:break-word;word-break:break-all;margin-bottom:16px}.weui-msg__opr-area{margin-bottom:16px}.weui-msg__opr-area .weui-btn-area{margin:0 16px}.weui-msg__opr-area .weui-btn+.weui-btn{margin-bottom:16px}.weui-msg__opr-area:last-child{margin-bottom:96px}.weui-msg__opr-area+.weui-msg__extra-area{margin-top:48px}.weui-msg__tips-area{margin-bottom:16px;padding:0 40px}.weui-msg__opr-area+.weui-msg__tips-area{margin-bottom:48px}.weui-msg__tips-area:last-child{margin-bottom:64px}.weui-msg__tips{font-size:12px;color:rgba(0,0,0,0.5)}.weui-msg__extra-area{position:static;margin-bottom:24px;font-size:12px;color:rgba(0,0,0,0.5)}.weui-msg__icon-area image{width:190rpx;height:190rpx} \ No newline at end of file diff --git a/miniprogram/components/navigation-bar/navigation-bar.js b/miniprogram/components/navigation-bar/navigation-bar.js new file mode 100644 index 0000000..d975c8c --- /dev/null +++ b/miniprogram/components/navigation-bar/navigation-bar.js @@ -0,0 +1,189 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 3); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 3: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + title: { + type: String, + value: '' + }, + background: { + type: String, + value: '' + }, + color: { + type: String, + value: '' + }, + back: { + type: Boolean, + value: true + }, + loading: { + type: Boolean, + value: false + }, + animated: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: true, + observer: '_showChange' + }, + delta: { + type: Number, + value: 1 + } + }, + data: { + displayStyle: '' + }, + attached: function attached() { + var _this = this; + + var isSupport = !!wx.getMenuButtonBoundingClientRect; + var rect = wx.getMenuButtonBoundingClientRect ? wx.getMenuButtonBoundingClientRect() : null; + wx.getSystemInfo({ + success: function success(res) { + var ios = !!(res.system.toLowerCase().search('ios') + 1); + _this.setData({ + ios: ios, + statusBarHeight: res.statusBarHeight, + innerWidth: isSupport ? 'width:' + rect.left + 'px' : '', + innerPaddingRight: isSupport ? 'padding-right:' + (res.windowWidth - rect.left) + 'px' : '', + leftWidth: isSupport ? 'width:' + (res.windowWidth - rect.left) + 'px' : '' + }); + } + }); + }, + + methods: { + _showChange: function _showChange(show) { + var animated = this.data.animated; + var displayStyle = ''; + if (animated) { + displayStyle = 'opacity: ' + (show ? '1' : '0') + ';-webkit-transition:opacity 0.5s;transition:opacity 0.5s;'; + } else { + displayStyle = 'display: ' + (show ? '' : 'none'); + } + this.setData({ + displayStyle: displayStyle + }); + }, + back: function back() { + var data = this.data; + if (data.delta) { + wx.navigateBack({ + delta: data.delta + }); + } + this.triggerEvent('back', { delta: data.delta }, {}); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/navigation-bar/navigation-bar.json b/miniprogram/components/navigation-bar/navigation-bar.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/navigation-bar/navigation-bar.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/navigation-bar/navigation-bar.wxml b/miniprogram/components/navigation-bar/navigation-bar.wxml new file mode 100644 index 0000000..6a8e1cc --- /dev/null +++ b/miniprogram/components/navigation-bar/navigation-bar.wxml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + {{title}} + + + + + + + + + + + diff --git a/miniprogram/components/navigation-bar/navigation-bar.wxss b/miniprogram/components/navigation-bar/navigation-bar.wxss new file mode 100644 index 0000000..c4f3460 --- /dev/null +++ b/miniprogram/components/navigation-bar/navigation-bar.wxss @@ -0,0 +1 @@ +page{--height:44px;--right:190rpx}.weui-navigation-bar{overflow:hidden}.weui-navigation-bar .android{--height:48px;--right:222rpx}.weui-navigation-bar__inner{position:fixed;top:0;left:0;z-index:5001;height:var(--height);display:flex;align-items:center;padding-right:var(--right);width:calc(100% - var(--right))}.weui-navigation-bar__inner .weui-navigation-bar__left{position:relative;width:var(--right);padding-left:16px;display:-webkit-box;display:-webkit-flex;display:flex;align-items:center;-webkit-box-pack:center}.weui-navigation-bar__inner .weui-navigation-bar__left .weui-navigation-bar__btn{display:inline-block;vertical-align:middle;background-repeat:no-repeat}.weui-navigation-bar__inner .weui-navigation-bar__left .weui-navigation-bar__btn_goback{font-size:12px;width:1em;height:2em;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E");background-position:50% 50%;background-size:cover}.weui-navigation-bar__inner .weui-navigation-bar__left .weui-navigation-bar__btn_goback:active{opacity:.5}.weui-navigation-bar__inner .weui-navigation-bar__center{font-size:17px;text-align:center;position:relative;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-navigation-bar__inner .weui-navigation-bar__loading{font-size:0}.weui-navigation-bar__inner .weui-navigation-bar__loading .weui-loading{margin-left:0}.weui-navigation-bar__inner .weui-navigation-bar__right{margin-right:16px}.weui-navigation-bar__placeholder{height:var(--height);background:#F8F8F8;position:relative;z-index:50} \ No newline at end of file diff --git a/miniprogram/components/searchbar/searchbar.js b/miniprogram/components/searchbar/searchbar.js new file mode 100644 index 0000000..9602201 --- /dev/null +++ b/miniprogram/components/searchbar/searchbar.js @@ -0,0 +1,209 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 25); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 25: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + focus: { + type: Boolean, + value: false + }, + placeholder: { + type: String, + value: '搜索' + }, + value: { + type: String, + value: '' + }, + search: { + type: Function, + value: null + }, + throttle: { + type: Number, + value: 500 + }, + cancelText: { + type: String, + value: '取消' + }, + cancel: { + type: Boolean, + value: true + } + }, + data: { + result: [] + }, + lastSearch: Date.now(), + lifetimes: { + attached: function attached() { + if (this.data.focus) { + this.setData({ + searchState: true + }); + } + } + }, + methods: { + clearInput: function clearInput() { + this.setData({ + value: '' + }); + this.triggerEvent('clear'); + }, + inputFocus: function inputFocus(e) { + this.triggerEvent('focus', e.detail); + }, + inputBlur: function inputBlur(e) { + this.setData({ + focus: false + }); + this.triggerEvent('blur', e.detail); + }, + showInput: function showInput() { + this.setData({ + focus: true, + searchState: true + }); + }, + hideInput: function hideInput() { + this.setData({ + searchState: false + }); + }, + inputChange: function inputChange(e) { + var _this = this; + + this.setData({ + value: e.detail.value + }); + this.triggerEvent('input', e.detail); + if (Date.now() - this.lastSearch < this.data.throttle) { + return; + } + if (typeof this.data.search !== 'function') { + return; + } + this.lastSearch = Date.now(); + this.timerId = setTimeout(function () { + _this.data.search(e.detail.value).then(function (json) { + _this.setData({ + result: json + }); + }).catch(function (err) { + console.log('search error', err); + }); + }, this.data.throttle); + }, + selectResult: function selectResult(e) { + var index = e.currentTarget.dataset.index; + + var item = this.data.result[index]; + this.triggerEvent('selectresult', { index: index, item: item }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/searchbar/searchbar.json b/miniprogram/components/searchbar/searchbar.json new file mode 100644 index 0000000..67ee694 --- /dev/null +++ b/miniprogram/components/searchbar/searchbar.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "mp-cells": "../cells/cells", + "mp-cell": "../cell/cell" + } +} \ No newline at end of file diff --git a/miniprogram/components/searchbar/searchbar.wxml b/miniprogram/components/searchbar/searchbar.wxml new file mode 100644 index 0000000..b7c3ee4 --- /dev/null +++ b/miniprogram/components/searchbar/searchbar.wxml @@ -0,0 +1,21 @@ + + + + + + + + + + + + {{cancelText}} + + + + {{item.text}} + + \ No newline at end of file diff --git a/miniprogram/components/searchbar/searchbar.wxss b/miniprogram/components/searchbar/searchbar.wxss new file mode 100644 index 0000000..a50b28e --- /dev/null +++ b/miniprogram/components/searchbar/searchbar.wxss @@ -0,0 +1 @@ +.weui-search-bar{position:relative;padding:8px;display:flex;box-sizing:border-box;background-color:#EDEDED;-webkit-text-size-adjust:100%;align-items:center}.weui-icon-search{margin-right:8px;font-size:14px;vertical-align:top;margin-top:.64em;height:1em;line-height:1em}.weui-icon-search_in-box{position:absolute;left:12px;top:50%;margin-top:-8px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:top}.weui-search-bar__form{position:relative;flex:auto;border-radius:4px;background:#FFFFFF}.weui-search-bar__box{position:relative;padding-left:32px;padding-right:32px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:32px;line-height:32px;font-size:14px;caret-color:#07C160}.weui-icon-clear{position:absolute;top:0;right:0;bottom:0;padding:0 12px;font-size:0}.weui-icon-clear:after{content:"";height:100%;vertical-align:middle;display:inline-block;width:0;overflow:hidden}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:4px;text-align:center;color:rgba(0,0,0,0.5);background:#FFFFFF;line-height:32px}.weui-search-bar__cancel-btn{margin-left:8px;line-height:32px;color:#576B95;white-space:nowrap} \ No newline at end of file diff --git a/miniprogram/components/slideview/slideview.js b/miniprogram/components/slideview/slideview.js new file mode 100644 index 0000000..50b239e --- /dev/null +++ b/miniprogram/components/slideview/slideview.js @@ -0,0 +1,205 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 18); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 18: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + multipleSlots: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + buttons: { + type: Array, + value: [], + observer: function observer(newVal) { + this.addClassNameForButton(); + } + }, + disable: { + type: Boolean, + value: false + }, + icon: { + type: Boolean, + value: false + }, + show: { + type: Boolean, + value: false + }, + duration: { + type: Number, + value: 350 + }, + throttle: { + type: Number, + value: 40 + }, + rebounce: { + type: Number, + value: 0 + } + }, + data: { + size: null + }, + ready: function ready() { + this.updateRight(); + this.addClassNameForButton(); + }, + + methods: { + updateRight: function updateRight() { + var _this = this; + + var data = this.data; + var query = wx.createSelectorQuery().in(this); + query.select('.left').boundingClientRect(function (res) { + console.log('right res', res); + var btnQuery = wx.createSelectorQuery().in(_this); + btnQuery.selectAll('.btn').boundingClientRect(function (rects) { + console.log('btn rects', rects); + _this.setData({ + size: { + buttons: rects, + button: res, + show: data.show, + disable: data.disable, + throttle: data.throttle, + rebounce: data.rebounce + } + }); + }).exec(); + }).exec(); + }, + addClassNameForButton: function addClassNameForButton() { + var _data = this.data, + buttons = _data.buttons, + icon = _data.icon; + + buttons.forEach(function (btn) { + if (icon) { + btn.className = ''; + } else if (btn.type === 'warn') { + btn.className = 'weui-slideview__btn-group_warn'; + } else { + btn.className = 'weui-slideview__btn-group_default'; + } + }); + this.setData({ + buttons: buttons + }); + }, + buttonTapByWxs: function buttonTapByWxs(data) { + this.triggerEvent('buttontap', data, {}); + }, + hide: function hide() { + this.triggerEvent('hide', {}, {}); + }, + show: function show() { + this.triggerEvent('show', {}, {}); + }, + transitionEnd: function transitionEnd() { + console.log('transitiion end'); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/slideview/slideview.json b/miniprogram/components/slideview/slideview.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/miniprogram/components/slideview/slideview.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/slideview/slideview.wxml b/miniprogram/components/slideview/slideview.wxml new file mode 100644 index 0000000..f1f49da --- /dev/null +++ b/miniprogram/components/slideview/slideview.wxml @@ -0,0 +1,23 @@ + + + + + + + + + + + {{item.text}} + + + + + + diff --git a/miniprogram/components/slideview/slideview.wxs b/miniprogram/components/slideview/slideview.wxs new file mode 100644 index 0000000..c62d085 --- /dev/null +++ b/miniprogram/components/slideview/slideview.wxs @@ -0,0 +1,243 @@ +/* eslint-disable */ +var touchstart = function(event, ownerInstance) { + var ins = event.instance + var st = ins.getState() + if (st.disable) return // disable的逻辑 + // console.log('touchstart st', JSON.stringify(st)) + if (!st.size) return + // console.log('touchstart', JSON.stringify(event)) + st.isMoving = true + st.startX = event.touches[0].pageX + st.startY = event.touches[0].pageY + st.firstAngle = 0 +} +var touchmove = function(event, ownerInstance) { + var ins = event.instance + var st = ins.getState() + if (!st.size || !st.isMoving) return + // console.log('touchmove', JSON.stringify(event)) + var pagex = event.touches[0].pageX - st.startX + var pagey = event.touches[0].pageY - st.startY + // 左侧45度角为界限,大于45度则允许水平滑动 + if (st.firstAngle === 0) { + st.firstAngle = Math.abs(pagex) - Math.abs(pagey) + } + if (st.firstAngle < 0) { + return + } + var movex = pagex > 0 ? Math.min(st.max, pagex) : Math.max(-st.max, pagex) + // 往回滑动的情况 + if (st.out) { + // 已经是划出来了,还要往左滑动,忽略 + if (movex < 0) return + ins.setStyle({ + 'transform': 'translateX(' + (st.transformx + movex) + 'px)', + 'transition': '' + }) + var btns = ownerInstance.selectAllComponents('.btn') + var transformTotal = 0 + var len = btns.length + var i = len - 1; + for (;i >= 0; i--) { + var transform = st.size.buttons[i].width / st.max * movex + var transformx = st.size.buttons[i].max - Math.min(st.size.buttons[i].max, transform + transformTotal) + btns[i].setStyle({ + 'transform': 'translateX(' + (-transformx) + 'px)', + 'transition': '' + }) + transformTotal += transform + } + return false + } + if (movex > 0) movex = 0 + ins.setStyle({ + 'transform': 'translateX(' + movex + 'px)', + 'transition': '' + }) + st.transformx = movex + var btns = ownerInstance.selectAllComponents('.btn') + var transformTotal = 0 + var len = btns.length + var i = len - 1; + for (;i >= 0; i--) { + var transform = st.size.buttons[i].width / st.max * movex + var transformx = Math.max(-st.size.buttons[i].max, transform + transformTotal) + btns[i].setStyle({ + 'transform': 'translateX(' + transformx + 'px)', + 'transition': '' + }) + st.size.buttons[i].transformx = transformx + transformTotal += transform + } + return false // 禁止垂直方向的滑动 +} +var touchend = function(event, ownerInstance) { + var ins = event.instance + var st = ins.getState() + if (!st.size || !st.isMoving) return + // 左侧45度角为界限,大于45度则允许水平滑动 + if (st.firstAngle < 0) { + return + } + var duration = st.duration / 1000 + st.isMoving = false + // console.log('touchend', JSON.stringify(event)) + var btns = ownerInstance.selectAllComponents('.btn') + var len = btns.length + var i = len - 1 + // console.log('len size', len) + if (Math.abs(event.changedTouches[0].pageX - st.startX) < st.throttle || event.changedTouches[0].pageX - st.startX > 0) { // 方向也要控制 + st.out = false + ins.setStyle({ + 'transform': 'translate3d(0px, 0, 0)', + 'transition': 'transform ' + (duration) + 's' + }) + for (;i >= 0; i--) { + btns[i].setStyle({ + 'transform': 'translate3d(0px, 0, 0)', + 'transition': 'transform ' + (duration) + 's' + }) + } + ownerInstance.callMethod('hide') + return + } + showButtons(ins, ownerInstance, duration) + ownerInstance.callMethod('show') +} +var REBOUNCE_TIME = 0.2 +var showButtons = function(ins, ownerInstance, withDuration) { + var st = ins.getState() + if (!st.size) return + var rebounceTime = st.rebounce ? REBOUNCE_TIME : 0 + var movex = st.max + st.out = true + var btns = ownerInstance.selectAllComponents('.btn') + var rebounce = st.rebounce || 0 + var len = btns.length + var i = len - 1 + ins.setStyle({ + 'transform': 'translate3d(' + (-movex - rebounce) + 'px, 0, 0)', + 'transition': 'transform ' + (withDuration) + 's' + }) + st.transformx = -movex + var transformTotal = 0 + for (;i >= 0; i--) { + var transform = st.size.buttons[i].width / st.max * movex + var transformx = (-(transform + transformTotal)) + btns[i].setStyle({ + 'transform': 'translate3d(' + transformx + 'px, 0, 0)', + 'transition': 'transform ' + (withDuration ? withDuration + rebounceTime : withDuration) + 's' + }) + st.size.buttons[i].transformx = transformx + transformTotal += transform + } +} +var innerHideButton = function(ownerInstance) { + var ins = ownerInstance.selectComponent('.left') + var st = ins.getState() + if (!st.size) return + var duration = st.duration ? st.duration / 1000 : 0 + var btns = ownerInstance.selectAllComponents('.btn') + var len = btns.length + var i = len - 1 + ins.setStyle({ + 'transform': 'translate3d(0px, 0, 0)', + 'transition': 'transform ' + (duration) + 's' + }) + st.transformx = 0 + for (;i >= 0; i--) { + btns[i].setStyle({ + 'transform': 'translate3d(0px, 0, 0)', + 'transition': 'transform ' + (duration) + 's' + }) + st.size.buttons[i].transformx = 0 + } +} +var hideButton = function(event, ownerInstance) { + innerHideButton(ownerInstance) + ownerInstance.callMethod('buttonTapByWxs', {index: event.currentTarget.dataset.index, data: event.currentTarget.dataset.data}) + return false +} +var sizeReady = function(newVal, oldVal, ownerInstance, ins) { + var st = ins.getState() + // st.disable = newVal && newVal.disable + if (newVal && newVal.button && newVal.buttons) { + st.size = newVal + st.transformx = 0 + // var min = newVal.button.width + var max = 0 + var len = newVal.buttons.length + var i = newVal.buttons.length - 1; + var total = 0 + for (; i >= 0; i--) { + max += newVal.buttons[i].width + // if (min > newVal.buttons[i]) { + // min = newVal.buttons[i].width + // } + total += newVal.buttons[i].width + newVal.buttons[i].max = total + newVal.buttons[i].transformx = 0 + } + st.throttle = st.size.throttle || 40 // 固定值 + st.rebounce = st.size.rebounce + st.max = max + ownerInstance.selectComponent('.right').setStyle({ + 'line-height': newVal.button.height + 'px', + left: (newVal.button.width) + 'px', + width: max + 'px' + }) + // console.log('st size', JSON.stringify(newVal)) + if (!st.size.disable && st.size.show) { + showButtons(ins, ownerInstance) + } + } +} +var disableChange = function(newVal, oldVal, ownerInstance, ins) { + var st = ins.getState() + st.disable = newVal +} +var durationChange = function(newVal, oldVal, ownerInstance, ins) { + var st = ins.getState() + st.duration = newVal || 400 +} +var showChange = function(newVal, oldVal, ownerInstance, ins) { + var st = ins.getState() + st.show = newVal + if (st.disable) return + // console.log('show change') + if (st.show) { + showButtons(ins, ownerInstance, st.duration) + } else { + innerHideButton(ownerInstance) + } +} +var rebounceChange = function(newVal, oldVal, ownerInstance, ins) { + var st = ins.getState() + // console.log('rebounce', st.rebounce) + st.rebounce = newVal +} +var transitionEnd = function(event, ownerInstance) { + // console.log('transition') + var ins = event.instance + var st = ins.getState() + // 回弹效果 + if (st.out && st.rebounce) { + console.log('transition rebounce', st.rebounce) + ins.setStyle({ + 'transform': 'translate3d(' + (-st.max) + 'px, 0, 0)', + 'transition': 'transform ' + REBOUNCE_TIME +'s' + }) + } +} +module.exports = { + touchstart: touchstart, + touchmove: touchmove, + touchend: touchend, + hideButton: hideButton, + sizeReady: sizeReady, + disableChange: disableChange, + durationChange: durationChange, + showChange: showChange, + rebounceChange: rebounceChange, + transitionEnd: transitionEnd +} \ No newline at end of file diff --git a/miniprogram/components/slideview/slideview.wxss b/miniprogram/components/slideview/slideview.wxss new file mode 100644 index 0000000..0129c65 --- /dev/null +++ b/miniprogram/components/slideview/slideview.wxss @@ -0,0 +1 @@ +:host{width:100%}.weui-slideview{overflow:hidden;position:relative}.weui-slideview{position:relative}.weui-slideview__left{position:relative;z-index:10}.weui-slideview__right{position:absolute;z-index:1;left:100%;top:0;height:100%}.weui-slideview__btn__wrp{position:absolute;left:0;bottom:0;text-align:center;min-width:69px;height:100%;white-space:nowrap}.weui-slideview__btn{color:#FFFFFF;padding:0 17px}.weui-slideview__btn-group_default .weui-slideview__btn{background:#C7C7CC}.weui-slideview__btn-group_default~.weui-slideview__btn-group_default:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #FFFFFF;color:#FFFFFF}.weui-slideview__btn-group_default:first-child:before{display:none}.weui-slideview__btn-group_warn .weui-slideview__btn{background:#FE3B30}.weui-slideview__btn-group_warn~.weui-slideview__btn-group_warn:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #FFFFFF;color:#FFFFFF}.weui-slideview__btn-group_warn:first-child:before{display:none}.weui-slideview_icon .weui-slideview__btn__wrp{background:transparent;font-size:0}.weui-slideview_icon .weui-slideview__btn__wrp:after{content:"";width:0;height:100%;vertical-align:middle;display:inline-block}.weui-slideview_icon .weui-slideview__btn__wrp:first-child{padding-left:16px}.weui-slideview_icon .weui-slideview__btn__wrp:last-child{padding-right:8px}.weui-slideview_icon .weui-slideview__btn{width:48px;height:48px;line-height:48px;padding:0;display:inline-block;vertical-align:middle;border-radius:50%;background-color:#FFFFFF}.weui-slideview_icon .weui-slideview__btn__icon{display:inline-block;vertical-align:middle;width:22px;height:22px} \ No newline at end of file diff --git a/miniprogram/components/tabbar/tabbar.js b/miniprogram/components/tabbar/tabbar.js new file mode 100644 index 0000000..e21c3aa --- /dev/null +++ b/miniprogram/components/tabbar/tabbar.js @@ -0,0 +1,131 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 16); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 16: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + list: { + type: Array, + value: [] + }, + current: { + type: Number, + value: 0 + } + }, + methods: { + tabChange: function tabChange(e) { + var index = e.currentTarget.dataset.index; + + if (index === this.data.current) { + return; + } + this.setData({ + current: index + }); + this.triggerEvent('change', { index: index, item: this.data.list[index] }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/tabbar/tabbar.json b/miniprogram/components/tabbar/tabbar.json new file mode 100644 index 0000000..e083792 --- /dev/null +++ b/miniprogram/components/tabbar/tabbar.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "mp-badge": "../badge/badge" + } +} \ No newline at end of file diff --git a/miniprogram/components/tabbar/tabbar.wxml b/miniprogram/components/tabbar/tabbar.wxml new file mode 100644 index 0000000..49ff2d9 --- /dev/null +++ b/miniprogram/components/tabbar/tabbar.wxml @@ -0,0 +1,10 @@ + + + + + + + + {{item.text}} + + \ No newline at end of file diff --git a/miniprogram/components/tabbar/tabbar.wxss b/miniprogram/components/tabbar/tabbar.wxss new file mode 100644 index 0000000..bccaad7 --- /dev/null +++ b/miniprogram/components/tabbar/tabbar.wxss @@ -0,0 +1 @@ +.weui-tabbar{display:flex;position:relative;z-index:500;background-color:#F7F7F7}.weui-tabbar:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-tabbar__item{display:block;flex:1;padding:8px 0 4px;padding-bottom:calc(8px + constant(safe-area-inset-bottom));padding-bottom:calc(8px + env(safe-area-inset-bottom));font-size:0;color:rgba(0,0,0,0.5);text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.weui-tabbar__item:first-child{padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left)}.weui-tabbar__item:last-child{padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon,.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon>i,.weui-tabbar__item.weui-bar__item_on .weui-tabbar__label{color:#07C160}.weui-tabbar__icon{display:inline-block;width:28px;height:28px;margin-bottom:2px}i.weui-tabbar__icon,.weui-tabbar__icon>i{font-size:24px;color:rgba(0,0,0,0.5)}.weui-tabbar__icon image{width:100%;height:100%}.weui-tabbar__label{color:rgba(0,0,0,0.9);font-size:10px;line-height:1.4} \ No newline at end of file diff --git a/miniprogram/components/tabs/index.js b/miniprogram/components/tabs/index.js new file mode 100644 index 0000000..cfb261f --- /dev/null +++ b/miniprogram/components/tabs/index.js @@ -0,0 +1,148 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 5); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 5: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + pureDataPattern: /^_/, + multipleSlots: true + }, + properties: { + tabs: { type: Array, value: [] }, + tabClass: { type: String, value: '' }, + swiperClass: { type: String, value: '' }, + activeClass: { type: String, value: '' }, + tabUnderlineColor: { type: String, value: '#07c160' }, + tabActiveTextColor: { type: String, value: '#000000' }, + tabInactiveTextColor: { type: String, value: '#000000' }, + tabBackgroundColor: { type: String, value: '#ffffff' }, + activeTab: { type: Number, value: 0 }, + swipeable: { type: Boolean, value: true }, + animation: { type: Boolean, value: true }, + duration: { type: Number, value: 500 } + }, + data: { + currentView: 0 + }, + observers: { + activeTab: function activeTab(_activeTab) { + var len = this.data.tabs.length; + if (len === 0) return; + var currentView = _activeTab - 1; + if (currentView < 0) currentView = 0; + if (currentView > len - 1) currentView = len - 1; + this.setData({ currentView: currentView }); + } + }, + lifetimes: { + created: function created() {} + }, + methods: { + handleTabClick: function handleTabClick(e) { + var index = e.currentTarget.dataset.index; + this.setData({ activeTab: index }); + this.triggerEvent('tabclick', { index: index }); + }, + handleSwiperChange: function handleSwiperChange(e) { + var index = e.detail.current; + this.setData({ activeTab: index }); + this.triggerEvent('change', { index: index }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/tabs/index.json b/miniprogram/components/tabs/index.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/tabs/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/tabs/index.wxml b/miniprogram/components/tabs/index.wxml new file mode 100644 index 0000000..105ed9c --- /dev/null +++ b/miniprogram/components/tabs/index.wxml @@ -0,0 +1,20 @@ + + + + + + + + {{item.title}} + + + + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/components/tabs/index.wxss b/miniprogram/components/tabs/index.wxss new file mode 100644 index 0000000..a6982e7 --- /dev/null +++ b/miniprogram/components/tabs/index.wxss @@ -0,0 +1 @@ +.weui-tabs{width:100%}.weui-tabs-bar__wrp{width:100%;background:#fff}.weui-tabs-bar__content{width:100%;white-space:nowrap}.weui-tabs-bar__item{display:inline-block}.weui-tabs-bar__title{display:inline-block;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent} \ No newline at end of file diff --git a/miniprogram/components/toptips/toptips.js b/miniprogram/components/toptips/toptips.js new file mode 100644 index 0000000..34513a5 --- /dev/null +++ b/miniprogram/components/toptips/toptips.js @@ -0,0 +1,170 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 13); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 13: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + type: { + type: String, + value: 'error', + observer: '_typeChange' + }, + show: { + type: Boolean, + value: false, + observer: '_showChange' + }, + msg: { + type: String, + value: '' + }, + delay: { + type: Number, + value: 2000 + }, + extClass: { + type: String, + value: '' + } + }, + data: { + typeClassMap: { + 'warn': 'weui-toptips_warn', + 'info': 'weui-toptips_info', + 'success': 'weui-toptips_success', + 'error': 'weui-toptips_error' + } + }, + attached: function attached() { + var data = this.data; + this.setData({ + className: data.typeClassMap[data.type] || '' + }); + }, + + methods: { + _typeChange: function _typeChange(newVal) { + this.setData({ + className: this.data.typeClassMap[newVal] || '' + }); + return newVal; + }, + _showChange: function _showChange(newVal) { + this._showToptips(newVal); + }, + _showToptips: function _showToptips(newVal) { + var _this = this; + + if (newVal && this.data.delay) { + setTimeout(function () { + _this.setData({ + show: false + }, function () { + _this.triggerEvent('hide', {}, {}); + }); + }, this.data.delay); + } + this.setData({ + show: newVal + }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/toptips/toptips.json b/miniprogram/components/toptips/toptips.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/toptips/toptips.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/toptips/toptips.wxml b/miniprogram/components/toptips/toptips.wxml new file mode 100644 index 0000000..61a337c --- /dev/null +++ b/miniprogram/components/toptips/toptips.wxml @@ -0,0 +1,6 @@ + + {{msg}} + + + + \ No newline at end of file diff --git a/miniprogram/components/toptips/toptips.wxss b/miniprogram/components/toptips/toptips.wxss new file mode 100644 index 0000000..a904311 --- /dev/null +++ b/miniprogram/components/toptips/toptips.wxss @@ -0,0 +1 @@ +.weui-toptips{position:fixed;-webkit-transform:translateZ(0) translateY(calc(-100% - 8px));transform:translateZ(0) translateY(calc(-100% - 8px));text-align:center;top:8px;left:16px;right:16px;border-radius:4px;padding:8px;-webkit-border-radius:4px;color:rgba(255,255,255,0.9);font-size:17px;line-height:1.4;background:rgba(250,81,81,0.9);z-index:5000;word-wrap:break-word;word-break:break-all;-webkit-transition:all .4s ease-in-out;transition:all .4s ease-in-out}.weui-toptips_show{-webkit-transform:translateZ(0) translateY(0);transform:translateZ(0) translateY(0);opacity:1}.weui-toptips_warn{background-color:#FA5151}.weui-toptips_success{background-color:#09BB07}.weui-toptips_error{background-color:#FA5151}.weui-toptips_info{background-color:#10AEFF} \ No newline at end of file diff --git a/miniprogram/components/uploader/uploader.js b/miniprogram/components/uploader/uploader.js new file mode 100644 index 0000000..13e0014 --- /dev/null +++ b/miniprogram/components/uploader/uploader.js @@ -0,0 +1,261 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 22); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 22: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true + }, + properties: { + title: { + type: String, + value: '图片上传' + }, + sizeType: { + type: Array, + value: ['original', 'compressed'] + }, + sourceType: { + type: Array, + value: ['album', 'camera'] + }, + maxSize: { + type: Number, + value: 5 * 1024 * 1024 + }, + maxCount: { + type: Number, + value: 1 + }, + files: { + type: Array, + value: [], + observer: function observer(newVal, oldVal, changedP) { + this.setData({ + currentFiles: newVal + }); + } + }, + select: { + type: Function, + value: function value() {} + }, + upload: { + type: Function, + value: null + }, + tips: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + showDelete: { + type: Boolean, + value: true + } + }, + data: { + currentFiles: [], + showPreview: false, + previewImageUrls: [] + }, + ready: function ready() {}, + + methods: { + previewImage: function previewImage(e) { + var index = e.currentTarget.dataset.index; + + var previewImageUrls = []; + this.data.files.map(function (item) { + previewImageUrls.push(item.url); + }); + this.setData({ + previewImageUrls: previewImageUrls, + previewCurrent: index, + showPreview: true + }); + }, + chooseImage: function chooseImage(e) { + var _this = this; + + if (this.uploading) return; + wx.chooseImage({ + count: this.data.maxCount - this.data.files.length, + success: function success(res) { + var invalidIndex = -1; + res.tempFiles.forEach(function (item, index) { + if (item.size > _this.data.maxSize) { + invalidIndex = index; + } + }); + if (typeof _this.data.select === 'function') { + var ret = _this.data.select(res); + if (ret === false) { + return; + } + } + if (invalidIndex >= 0) { + _this.triggerEvent('fail', { type: 1, errMsg: 'chooseImage:fail size exceed ' + _this.data.maxSize, total: res.tempFilePaths.length, index: invalidIndex }, {}); + return; + } + var mgr = wx.getFileSystemManager(); + var contents = res.tempFilePaths.map(function (item) { + var fileContent = mgr.readFileSync(item); + return fileContent; + }); + var obj = { tempFilePaths: res.tempFilePaths, tempFiles: res.tempFiles, contents: contents }; + _this.triggerEvent('select', obj, {}); + var files = res.tempFilePaths.map(function (item, i) { + return { loading: true, url: 'data:image/jpg;base64,' + wx.arrayBufferToBase64(contents[i]) }; + }); + if (!files || !files.length) return; + if (typeof _this.data.upload === 'function') { + var len = _this.data.files.length; + var newFiles = _this.data.files.concat(files); + _this.setData({ files: newFiles, currentFiles: newFiles }); + _this.loading = true; + _this.data.upload(obj).then(function (json) { + _this.loading = false; + if (json.urls) { + var oldFiles = _this.data.files; + json.urls.forEach(function (url, index) { + oldFiles[len + index].url = url; + oldFiles[len + index].loading = false; + }); + _this.setData({ files: oldFiles, currentFiles: newFiles }); + _this.triggerEvent('success', json, {}); + } else { + _this.triggerEvent('fail', { type: 3, errMsg: 'upload file fail, urls not found' }, {}); + } + }).catch(function (err) { + _this.loading = false; + var oldFiles = _this.data.files; + res.tempFilePaths.map(function (item, index) { + oldFiles[len + index].error = true; + oldFiles[len + index].loading = false; + }); + _this.setData({ files: oldFiles, currentFiles: newFiles }); + _this.triggerEvent('fail', { type: 3, errMsg: 'upload file fail', error: err }, {}); + }); + } + }, + fail: function fail(_fail) { + if (_fail.errMsg.indexOf('chooseImage:fail cancel') >= 0) { + _this.triggerEvent('cancel', {}, {}); + return; + } + _fail.type = 2; + _this.triggerEvent('fail', _fail, {}); + } + }); + }, + deletePic: function deletePic(e) { + var index = e.detail.index; + var files = this.data.files; + var file = files.splice(index, 1); + this.setData({ + files: files, + currentFiles: files + }); + this.triggerEvent('delete', { index: index, item: file[0] }); + } + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/miniprogram/components/uploader/uploader.json b/miniprogram/components/uploader/uploader.json new file mode 100644 index 0000000..e3479ce --- /dev/null +++ b/miniprogram/components/uploader/uploader.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "mp-gallery": "../gallery/gallery" + } +} diff --git a/miniprogram/components/uploader/uploader.wxml b/miniprogram/components/uploader/uploader.wxml new file mode 100644 index 0000000..9828c8d --- /dev/null +++ b/miniprogram/components/uploader/uploader.wxml @@ -0,0 +1,36 @@ + + +
+ {{title}} + {{currentFiles.length}}/{{maxCount}} + +
+ {{tips}} + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/miniprogram/components/uploader/uploader.wxss b/miniprogram/components/uploader/uploader.wxss new file mode 100644 index 0000000..1e3dad9 --- /dev/null +++ b/miniprogram/components/uploader/uploader.wxss @@ -0,0 +1 @@ +.weui-uploader{flex:1}.weui-uploader__hd{padding-bottom:16px}.weui-uploader__overview{display:flex;align-items:center}.weui-uploader__title{flex:1}.weui-uploader__tips{color:rgba(0,0,0,0.3);font-size:14px;line-height:1.4;padding-top:4px}.weui-uploader__info{color:rgba(0,0,0,0.3)}.weui-uploader__bd{margin-bottom:-8px;margin-right:-8px;overflow:hidden}.weui-uploader__file{float:left;margin-right:8px;margin-bottom:8px}.weui-uploader__img{display:block;width:96px;height:96px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,0.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);color:#FFFFFF}.weui-uploader__input-box{float:left;position:relative;margin-right:8px;margin-bottom:8px;width:96px;height:96px;box-sizing:border-box;background-color:#EDEDED}.weui-uploader__input-box:before,.weui-uploader__input-box:after{content:" ";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background-color:#A3A3A3}.weui-uploader__input-box:before{width:2px;height:32px}.weui-uploader__input-box:after{width:32px;height:2px}.weui-uploader__input-box:active{border-color:#8b8b8b}.weui-uploader__input-box:active:before,.weui-uploader__input-box:active:after{background-color:#8b8b8b}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}.weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;animation:weuiLoading 1s steps(12, end) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@keyframes weuiLoading{0%{transform:rotate3d(0, 0, 1, 0deg)}100%{transform:rotate3d(0, 0, 1, 360deg)}} \ No newline at end of file diff --git a/miniprogram/components/video-swiper/index.js b/miniprogram/components/video-swiper/index.js new file mode 100644 index 0000000..b1bec89 --- /dev/null +++ b/miniprogram/components/video-swiper/index.js @@ -0,0 +1,254 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + addGlobalClass: true, + pureDataPattern: /^_/ + }, + properties: { + duration: { + type: Number, + value: 500 + }, + easingFunction: { + type: String, + value: 'default' + }, + loop: { + type: Boolean, + value: true + }, + videoList: { + type: Array, + value: [], + observer: function observer() { + var newVal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + this._videoListChanged(newVal); + } + } + }, + data: { + nextQueue: [], + prevQueue: [], + curQueue: [], + circular: false, + _last: 1, + _change: -1, + _invalidUp: 0, + _invalidDown: 0, + _videoContexts: [] + }, + lifetimes: { + attached: function attached() { + this.data._videoContexts = [wx.createVideoContext('video_0', this), wx.createVideoContext('video_1', this), wx.createVideoContext('video_2', this)]; + } + }, + methods: { + _videoListChanged: function _videoListChanged(newVal) { + var _this = this; + + var data = this.data; + newVal.forEach(function (item) { + data.nextQueue.push(item); + }); + if (data.curQueue.length === 0) { + this.setData({ + curQueue: data.nextQueue.splice(0, 3) + }, function () { + _this.playCurrent(1); + }); + } + }, + animationfinish: function animationfinish(e) { + var _data = this.data, + _last = _data._last, + _change = _data._change, + curQueue = _data.curQueue, + prevQueue = _data.prevQueue, + nextQueue = _data.nextQueue; + + var current = e.detail.current; + var diff = current - _last; + if (diff === 0) return; + this.data._last = current; + this.playCurrent(current); + this.triggerEvent('change', { activeId: curQueue[current].id }); + var direction = diff === 1 || diff === -2 ? 'up' : 'down'; + if (direction === 'up') { + if (this.data._invalidDown === 0) { + var change = (_change + 1) % 3; + var add = nextQueue.shift(); + var remove = curQueue[change]; + if (add) { + prevQueue.push(remove); + curQueue[change] = add; + this.data._change = change; + } else { + this.data._invalidUp += 1; + } + } else { + this.data._invalidDown -= 1; + } + } + if (direction === 'down') { + if (this.data._invalidUp === 0) { + var _change2 = _change; + var _remove = curQueue[_change2]; + var _add = prevQueue.pop(); + if (_add) { + curQueue[_change2] = _add; + nextQueue.unshift(_remove); + this.data._change = (_change2 - 1 + 3) % 3; + } else { + this.data._invalidDown += 1; + } + } else { + this.data._invalidUp -= 1; + } + } + var circular = true; + if (nextQueue.length === 0 && current !== 0) { + circular = false; + } + if (prevQueue.length === 0 && current !== 2) { + circular = false; + } + this.setData({ + curQueue: curQueue, + circular: circular + }); + }, + playCurrent: function playCurrent(current) { + this.data._videoContexts.forEach(function (ctx, index) { + index !== current ? ctx.pause() : ctx.play(); + }); + }, + onPlay: function onPlay(e) { + this.trigger(e, 'play'); + }, + onPause: function onPause(e) { + this.trigger(e, 'pause'); + }, + onEnded: function onEnded(e) { + this.trigger(e, 'ended'); + }, + onError: function onError(e) { + this.trigger(e, 'error'); + }, + onTimeUpdate: function onTimeUpdate(e) { + this.trigger(e, 'timeupdate'); + }, + onWaiting: function onWaiting(e) { + this.trigger(e, 'wait'); + }, + onProgress: function onProgress(e) { + this.trigger(e, 'progress'); + }, + onLoadedMetaData: function onLoadedMetaData(e) { + this.trigger(e, 'loadedmetadata'); + }, + trigger: function trigger(e, type) { + var ext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var detail = e.detail; + var activeId = e.target.dataset.id; + this.triggerEvent(type, Object.assign(Object.assign(Object.assign({}, detail), { activeId: activeId }), ext)); + } + } +}); + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/miniprogram/components/video-swiper/index.json b/miniprogram/components/video-swiper/index.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/miniprogram/components/video-swiper/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/components/video-swiper/index.wxml b/miniprogram/components/video-swiper/index.wxml new file mode 100644 index 0000000..06c821d --- /dev/null +++ b/miniprogram/components/video-swiper/index.wxml @@ -0,0 +1,37 @@ + + + + + + + + + diff --git a/miniprogram/components/video-swiper/index.wxss b/miniprogram/components/video-swiper/index.wxss new file mode 100644 index 0000000..ea7f6f2 --- /dev/null +++ b/miniprogram/components/video-swiper/index.wxss @@ -0,0 +1 @@ +.container{width:100%;height:100%}.video-swiper{width:100%;height:100%}.video_item{height:100%;width:100%} \ No newline at end of file diff --git a/miniprogram/images/qr-code-active.png b/miniprogram/images/qr-code-active.png new file mode 100644 index 0000000000000000000000000000000000000000..ca132e5a12d76091f45efc025da64a358b785f4b GIT binary patch literal 2897 zcmb_e2~-o;8V-n5R1olKks_T2tw^2BOxDSih?uZM8$<+zV^JqF14NTdNJ0{D0eoFT zu`amqjx2gWrKN7+DP07i>JgWUOYITG=d)M~r?|j#Ls5A*Y_)yb`rdgtXEHPQe)Ij` z|Nq~;Gx@PGQJy3HM{+nEPi3?s4xHyYj}h+RziRC)F*tb`qLWP=4ll@gxY%}tSvVZ` z8clqXIZ5>%L9sd>NwaE(XVVz~n!^bVvl&QgDPxAzOqxb79l$iVUuzDcnNUr97ecMAH=*=#tnA{ zgpyRTkeoF#kccOSDNM+RBvKwGMx}h=G>DI45(JeXm;gpG0u>ViDKzlof@nrMm55VB z4#Wa?GH$xrY#BjLolgSilBUi&xZj5Hf8C}qz%@af(98BjEOR83}y|h zhn$S0n$0xJxIk%t3Od6Ot==?HCQvZMMj8-|hdNUl1gcbj4Atp|&?a+)1w@?lgGkMaqj zkPu4WL2&{_`=Kh}0-7|F{|Ocl0?=UbZ@?_ANzHl{s7ggB^(Hf^rx>L|#s#8y8VyY_ zC|@d-P-<9;iTE&v3MDWp5iu~HO7d}v!BGtB*9D$euvDhAc+ThhO-r*B;25e8K~tm% zmC_7Mk~9U2#6mTU<2VLmYKZ`+FtLahs{678Y;%knux?20^Q=x)G+Zi4)Gl29DT+$CSv8iS&X=K9FKui9_gUHLIn@G!_2p5Yf zp@70cA4wc$B+gEt6bh>aY6@j&3P%N!!NgxETuPvVLC600!Usx9rIY$J2JEc}_kU02 z)vW%q9{g_c{l8K{oEvJtw~*i4u5a$S%@;JWZwTz@&dZ@!3Ah=088LcLB_nv%lt!eV z;&9x;m5T6qTgk1`IrfBvfW|Pdy>Iu17ORDFuJDtO{3!RS_ra-TH=StJ zWkt@FNs8Nw7B^Tfm^h;RFM%O7-n1`P@u}a>8&9u3jS4*07f3v>*VSL|DYdRN-M(d< z-YE`SnbXw6e|V**=~3ysr-(O>Nb(Xk7Cg+8uUZk-N&e*6ul~k8H2GezTVhzl!nIQG z;rG23SGCU_@m<#C0=lZA-6uY8Qn`!hn+MAt z_w1CO%LPi5ieZIz_enmU(Of4fl%GDs_qmB~d$(fo?gM#Uj*idk_nwJM8fH70Gi}t9 z0PhyBw%j(?RyKX&3Pr#Y3X1qw_O6+l7$-yS?4$Y7_ovL>Tsf|sw@2C~I{aYD{?UFn zCb)jH+9p z$JTpn8)q%b6n|6@c(k|dS3FSaf4X8JQ~Pc&)cobyo7XOOjy3S9mfV%48NT=yhv)g5 z-@pIeKm0pC=WE`Z9zMP+;hK(FbN8o+o0VDW@Y#t+CAoFUmDPc>O|nssLxY}$H1CwP z=J;s8bX!1dP7Me2AqBy3$liPQoXCC3md`RTmfvKqt%~~AGNB8oBQOabUk#uxh(2xZErv~MzxHpEpg=6 zt>^jlcwcQ@px*v>d)tYEZr6Qt>~Bs+TG2-zE?ggSCV%?V{2Y&(;>$A=#$*1BZ1V$q zWy;JY70ZtQ_|B#I!5tTtHn1D-^g5!8F6LNnHI-f1653%edNA+UrUN_gxFjtqyd88u SxY7C1tBif&6JDjQee9miIrF;ryWju) z|NZX0*%B8U={muC0*}XYRYfV|x#wcX<>JKMc^~AS;qK!tQOj*Sp4-11*O)_4(6AbH3`Q^}5l%8%N@O=#9D{hlA$AK+tf5$emeSK^h44{rolroN3gI$|8d6)r zC<7gpWu=y6#U>D0YX~_h44E$owqqQDiDGeq-DEV|FuOuHz>9J3j%H9O7=W;A6v9wP zK!HXbCkSJ#lt3a10tgsI1X8&O4ua$e8Yn;@SPDW?5EcUvj6p$|SS}d)3At!iQisJW zBZgveUkagtWi1#8W@KcDGQ=Xrss~}YTn<7Ah#&xm0Bo6N7PkXt+st7GC1oS5w1uS^ zv%tZKYne1wA>@<}reLy+(3)*SW#S43+HngAiy%iz13;1(!CBI*#)04@0a8ZFM44F| zhlNM576ZdFHUsku)Fa(L3c!_CtsaT-MlB}ONC+Dnp3bE)RFF5KZ3&qc3XG?0Oq!LT z!qYjKGacDjurMoyvy3%?VT{8Q6*nwd5Edo~SVo&kCc`#+6r57xETs@45CQ=Z0zlFP z2*Jc+Oe~oT$uI~SgsK^m)@A-2%HgCKEd3FbGYpBd_-}$q0@E>86V9ben{Yh^TFiQ( zV5Epx7-M9tTwqQeJi1*K78Yk^bhMG{P%^9_5~t0a=llnhs@0gvY-4dVL8+7qAy*X< zO_LZ2!xF6=M*x@#5(7AeQh=7?{3+K#h%88^lZq+X@OULdq&eo^F@A6vkPN|b{Gbfc z$zT#8NkEH05CCgYjtHk9Kqi$+NK%Jr5iK#yw#Z6zD-k!2W_73{IYtiaI>D`wpCF0zo+v1JUOWG=c)W; z<^8`>0Udkkptr!E+HRn4)V|A2;y@F(nLA!bP7&^7sFT`U`KQRSrnKy;Tc7XAEBeCyy~eDEy;o2mDLcCIh%9&Q({1ssAM}c{{T94K`U4*rdKd&+^zjSeO#eT`W z`2OAPSJi!?btUy35z(f4=u`>+4FBkkPV#Be@!lyZ^B%SNuD~-BX``Wo59{inJ#l=rN zD;BMp^?dG(i!JR3#Ge&5ZF>K&_5FpLHuvrA*}DShUj6UB6rZE1CblAXdjkrW_ytY< zu9W|MZ1WI4AnlCTE;G7m!2l+ zjE{S~{fpHL%RUG_D7w3G<0byP$%%TuRiC-{x#TBKupU3MuE0H2|9VF` za3}i2(fz8$$?p3~Grzh1;T-2v(oZ`=L!33;2aeV@i0Z{P+S4;u-Cly(19qOg&C`4Q zy+)sxIBVfmpOh(OXtwL&t3Kr$#-8@NG^S|k^*?Xv-RH9IY4^DF8}C0n*0Y!YQQ_?D zW@(}C{ic{ykH$^cE?l17(#TqJlnXa%>ODLkm3Nueokym7G&k{=O)qOL69f0krd*>$X8FFXr1P#%w@#uOf zu4#r_CVkRZZr?qv@YS-arziKd+z6HSl=W-=GH0U2t7vv?qozarBFTMLUgxo3&z!GA zo2A6^)VyOZ;4RUe{RfbSxmT)_mZlb0sLDKzf%6Z_&*cPGjVGeq9)HLGXN{ly+zZVG zK6Dv4v-$JPiFwoggGIfQJEonkpScuuwlBR`J+7CRP9d literal 0 HcmV?d00001 diff --git a/miniprogram/images/user-active.png b/miniprogram/images/user-active.png new file mode 100644 index 0000000000000000000000000000000000000000..49089a65ce094522f87aeeb0fef461613c56fdfc GIT binary patch literal 5187 zcmd5=dpuO>|JUwM(nSfWzHO!s&Uv2q^ZC3#*XManqNn@H z8B^y^)zZ?M!E|xJUFjz7gLq=oqC=8Z{A<^(u#Q24TwMjT!nz!?c zab5729Wq2F6VuRWxm<27$6Jde!DuX%N=0LEXdDg&BT&*Pp$t%GTIw4mhS1)S zR1_frAx0#u(e%AFQkggO!Jq$NISijzEaP!MvsN?nCkH?Z-e;hinF*+vMwdWc2quG0!cs{j6wVrpL~uYFS0oVta0qzis@AZ#%4Vnv2!zXH-g%1=y!3QzgC};pU z=44P)W)KHCKFs?>s{ON|j)|3rKyWz!rU1uaQV~}s2PBYVFq{KlC~x%Vs7ry!zb6iH ziFh~#u_z833!z9j0ue<8V3$)!L_D0NSb#%<6YulHi5MD&@V*)R=fuY)gCT%07=m|F zH1e~ifFfZeB>5-~Vn71G8z>}^+9A0TkpKaR#e5z(S}y2FA!mGFnn(qNOoaH*H$JO} z14(!vIqhRD6BH2tMSWik5r~I~6bzRP9|dr5n_$BYgG%NAC;;FP2oM1aay6y@{~<(Q zH07UlvNHj=qYF zr+3z!{3gPv_PK}ra*|O1J#+FE#<$B;4wxeyS1on)H0z%uT%-%%%6o zU>~r}*t1T0?m>Jt^9;*mx#{)gx@J@6&Q4;4cs1yUM6)(i)Lp-1L=PT$(_(M8|5b-TBw|Cn`or4IGt>Fs(NcGYCEn|`9?4D) z8_r?s%WJ4ZdSy=}cQ>fAOKmSv3n2vsGPQ&GW7xd-mkFu15~U*;IFw?bWGHd&#{vg*>M{d_{L| zeD+ARwtLEh=&ro5<+kTr<}JPdHD$`mgxge?Nu`bJ+N{;b${d#JOs#AwSl4<3b%}cR zN$F|T*Xwge*sRi6!0dVvLFcmkksJp~KZ1=6NXb)iy;zr6KAy{gZ#& z(EG>6&UF{9?{qZ;K7ARl2e!E>{n>rl_h(!!7_l62+7hL6+5YK^JkM8`+T;%+&J&`~ zCzen5+56U2wS`gp{hYTq93`tNdMs^=M&^1LZQ9kqLdL9{er(Qq)Z|%tk}bQ#e)Y`l zIaD2O++=WmSI`;rW|E@4xJs=YBxZCij9nva)l0fL^wq{9pf`fwarf?4kEO}w$pHqH z9pNKw^YyAGnXg#>R5J5Np6NyP53RY*xe0i2K#6*mFz>PQ*uD63jg`ztp5pZH%fQ?O zV|j)++)XEex-Zde<(r@M@U%f!v*|VB@9Jw%!UupJpm;?JjMVz&^$&)n+Lp4$)G7Po104q}pJm&AqZ53_FaF!^m_GK2 z2iFSwJld)kxF z?z2!fhb~1Q89{)+D@s2_OER4DT)Qya>m}iL9l>ROg0L) zT9A6K_%*&ef0fWdFXiM$S4PGT5NBNG62Cw9pnvv-+g3WYE}`;Z0}FZfE5<3yh+c&S zsV=L`gu3+c4eyvh!t>1n8XDQ8 zGUuv@>wmmk9+ihMewL_}=@@?Q=d~M~@U}^(7kZSbiX{oZCC)H%)CA zLWV$F?U}}>qaW|9(w{+7U7aj2Fm3*Yw0=ci%c^?*J-d37$eT^3ZZ~Soxui}nd^S)K1=AjyT+_CB?y<_${+^{lw?%1DMoc%9Z z2y(b>4VBil(dw0xztS(IEA(n0`w-YOLl<@^tkNtuIV{ zQd|bc#wCP>hn2*ZhdY&6z7TRZ`=|~!k)|~h7Sy;t@=2dG*Li`fg_O}Al)H( zRK~2P{1AaOT6H-Rd6vE*at^k-vEO))OLpn{yE7lI*`aMFoA>s)`O~ zIns)G-nVbT2J@bpY4af&*9 z`Rb^`hn~;3xpYl(n4PH}ejOyuqAY)%9(AI;a(i&~TltAJf?qXlAbv-s?@J}6FaP0T z`N|4aOxr~YGc$>8KhKlE&i5=BvVk`iwVA9V6iB+#(3}BHGkCY zZ1+gdN9ri^>yE@kICZ+NgK^zHrEOY*HaVernD}DmgjN;>t;%r|2!Gh=2lBw3nth>$&PDoIo- zZ3o%6Qb<~nrIVzj)bsNG@bxN zkkD2r29AhFSX0nAD=Y<1v_#;sIBN{n8iOOCusAB#ib|j$rhiDtn}ErpdOIzj_67B9 zk%1x+pNheV#bUIWfaVF<7#xK{!C>(iJRSuhP{K&A2#7#&g+^a3IDtZjfWsGYcwB_k zB0%SD5!oUkre8t`<0SJhA0v{ePRwV{DP` zy>$JTGGOu;kd6N^BjM@RBnpmhv3IvD*6y1ucSC1n;SV@ zL2JOU=~f5_F{K(Rz>rphEs`OX0mwv74|BegkALKOdc8OhgpB@$K)!ev@>n74s#G%M63Kr@Tm;iyqB9U3Z*TBC^oJ7Tu zzbgB`CqA7LMj*gtgV3>xLH_Td{4-5{;rPc;eph+_uTU`3v-FF$Fu#}G)Z91cF0_eL zL(pL^ZO+^xP-o^I0=ZC@1kf#W;&e_13M{O0;=iPrZx-EZ2UR|&M_2B1h^|b~`+Ga@& zv)4J{hAKWD?AJpXk2o(IJ1)NT%D-;_<>>S zM{7~q>|Fc(pRQJU)|#FS0rw4tg&Tevwj7O2h*J45Ho&IW7qe=VV zu~ZWpkM%~!KRUa5PW!Q%P463W-p!ksh%HXb3i$Q@_H^CIp<*w|i&7R}Vg5^yq}aGV z+zoSU?V6b0>tRRl z7tuq`if;~X{P{yd!HQ(uD!N`*UXyW?2H|ZKtugX$_@2`~do0Scqs>{UC{Dlc<|h@- zv!W(d8{c-}OFiwftYoV;RIXxJCvRG#qmex(+_Uy^a76a~zA*tU4%0a|?N(b@&^-qe zn|n9H_RV6rS2E26DTy^YD!f<0S7T>oj>GHuvPae4Ep;^iS9Hl;;JIU;_%w6I~gyQGjtiZ3(j?I0Fb+ta-4_3ND9`@21FHj!A}pvmoYYrgc8`jxKw zk_VpWH6>z8dD$S>Xvg4*p!cIMeyG=1xvgdCps`)YVNgL1NW6ni&4<_dOq5vne)35V zNYQvOcR@nIW?}R5Cj=AlhRkLg? zVqHb)gKk1|*3+v!FZF*iJtgZrA^v5R{H}^zl^*(~g5Xr8Fzrtj9QorNj|@G~{M!-B zw`n47WykPqHl?!m$X;n!a8;=WM{6Ewo88~;I|!d_WB*j}F$}g)5TOy9s?z&J#`C6? zGH2mMFSVKgT9jYcjy=~xo~iaK$d+{l_$|J?Ju=}A8#aFcD;K+3wO0%F_`y>pgmq0p zGaII|Wxibbn=1wR72_1Wl83d5{HI}g#@H4^g@8f|y~8GvwJ$E0rq)5<_G+V(EAshA zt#TMettwWH!JaTcJbN2$R8z2G_JY`qdP@o6rBTOWVtHm)YV0NCefT`(t7e zP3$98-I3h{Uz}%=qB|w18Kwp<1g3P8aN=S(@r)AFrUFpq@d)Fl)~+Y|>7lvc=06 z)k|tFI?H5dsD>1wCx?87mV_$pOz`V0zd2x-sy}kFoMa$JzqIU?%MRajvClP>#ckX! z8H*ofW*3i8`+X~HEVYtG;I|H#!Nd>jf=$M^lk(hGT3@bzHgMCc^~E)fd`mm1lIVuG z$2}&6F=u5u=LB_k{5;wR>Ac=DTCt$W&ojPNw_om4l2}r*x}{RJR{mOfhJPG&mZc(r znt(9071Y10dZaCEJP~cu{8Ez-CS-k7GlDNln6q`bb0kR^nHjcLJ{UaEh<dvw~!N_FW@EyuxvdAm@?h;v3p)5S!)6hJLJ{h&2ip)Av-d1s|t|fkC62GZb{Q9 z9Y2(3>We!!d)3i(^PUndt|u?m8Jf&ry??Vsqqg&69m?GE-PK#`E*=zjhBvFMy)^!$ zHKlTMCSCOj{XjQVBwu`^uE^JZACestJZF5K2(ryLF`;UTP=EiLrx3Zn2|^@ z?C8ok7VnhkgB#x>V_xk(E}i{+FR!*Snn)M5&F5(i)6O7&=nidylqH`v29{ M*~96yPx&l}SWFRA>e5S-rApF%*tFx6rE?l`$0PR0=a@yn&%mcnXy#PC>*aF_lU^1_5U>nS_cL zIy{j`kkM!)BLPw@7H`AhkfLMo`G9=4jI(P<4TT%HV3((HPs{=*P2wW3wiW>lXtV!fBKT53u1Q}G zVZGL1!@zpIE)03(rf8H-OVQy9T8XO>`)oN)XMCf2JAnkTrGGpmz!LE$G$4 z0t + + + Icons/Filled/arrow Copy 2 + Created with Sketch. + + + + + + + + + + + + + + + diff --git a/miniprogram/lib/weui-miniprogram/weui-wxss/dist/style/weui.wxss b/miniprogram/lib/weui-miniprogram/weui-wxss/dist/style/weui.wxss new file mode 100644 index 0000000..0f09085 --- /dev/null +++ b/miniprogram/lib/weui-miniprogram/weui-wxss/dist/style/weui.wxss @@ -0,0 +1,6 @@ +/*! + * WeUI v2.0.1 (https://github.com/weui/weui-wxss) + * Copyright 2019 Tencent, Inc. + * Licensed under the MIT license + */ +page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle}.weui-cells{position:relative;margin-top:8px;background-color:#fff;line-height:1.41176471;font-size:17px}.weui-cells:before{top:0;border-top:1rpx solid rgba(0,0,0,.1)}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:rgba(0,0,0,.1)}.weui-cells:after{bottom:0;border-bottom:1rpx solid rgba(0,0,0,.1)}.weui-cells__title{margin-top:16px;margin-bottom:3px;padding-left:16px;padding-right:16px;color:rgba(0,0,0,.5);font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:3px;color:rgba(0,0,0,.5);padding-left:16px;padding-right:16px;font-size:14px}.weui-cell{padding:16px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1);left:16px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ececec}.weui-cell_primary{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.weui-cell__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-cell__ft{text-align:right;color:rgba(0,0,0,.5)}.weui-cell_label-block,.weui-cell_wxss.weui-cell_wxss:before{display:block}.weui-cell_label-block .weui-label{width:auto;word-break:normal;-webkit-hyphens:auto;hyphens:auto}.weui-cell_access{color:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0)}.weui-cell__ft_in-access{padding-right:16px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:8px;width:8px;border-width:2px 2px 0 0;border-color:#b2b2b2;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-5px;right:0}.weui-cell_link{color:#576b95;font-size:17px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block}.weui-cells_checkbox .weui-check__label:before{left:55px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:16px}.weui-cell__ft_in-radio{padding-left:16px}.weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:1.41176471em;min-height:1.41176471em;line-height:1.41176471}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:rgba(0,0,0,.3);text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#fa5151}.weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid rgba(0,0,0,.1)}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:rgba(0,0,0,.1)}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid rgba(0,0,0,.1)}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:16px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1);left:16px}.weui-form-preview__bd{padding:16px;font-size:.9em;text-align:right;color:rgba(0,0,0,.5);line-height:2}.weui-form-preview__ft{position:relative;line-height:56px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:rgba(0,0,0,.5);text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#576b95;text-align:center;font-weight:700;font-size:17px}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#ececec}.weui-form-preview__btn_default{color:rgba(0,0,0,.9)}.weui-form-preview__btn_primary{color:#576b95}.weui-cell_select{padding:0;overflow:hidden}.weui-cell_select .weui-select{padding-right:30px}.weui-cell_select .weui-cell__bd:after{content:" ";width:12px;height:24px;-webkit-mask-position:0 0;mask-position:0 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%;background-color:currentColor;color:rgba(0,0,0,.3);-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");position:absolute;top:50%;right:16px;margin-top:-12px}.weui-select{-webkit-appearance:none;border:0;outline:0;background-color:transparent;width:100%;font-size:inherit;height:56px;line-height:56px;position:relative;z-index:1;padding-left:16px}.weui-cell_select-before{padding-right:16px}.weui-cell_select-before .weui-select{width:105px;box-sizing:border-box}.weui-cell_select-before .weui-cell__hd{position:relative}.weui-cell_select-before .weui-cell__hd:after{content:" ";position:absolute;right:0;top:0;width:1px;bottom:0;border-right:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-cell_select-before .weui-cell__hd:before{content:" ";width:12px;height:24px;-webkit-mask-position:0 0;mask-position:0 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%;background-color:currentColor;color:rgba(0,0,0,.3);-webkit-mask-image:url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E");position:absolute;top:50%;right:16px;margin-top:-12px}.weui-cell_select-before .weui-cell__bd{padding-left:16px}.weui-cell_select-before .weui-cell__bd:after{display:none}.weui-cell_select-before.weui-cell_access .weui-cell__hd{line-height:56px;padding-left:32px}.weui-cell_select-after{padding-left:16px}.weui-cell_select-after .weui-select{padding-left:0}.weui-cell_select-after.weui-cell_access .weui-cell__bd{line-height:56px}.weui-cell_vcode{padding-top:0;padding-right:0;padding-bottom:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:3.29411765em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1rpx solid rgba(0,0,0,.1);line-height:3.29411765em;font-size:17px;color:#576b95;white-space:nowrap}button.weui-vcode-btn{min-height:0;background-color:transparent;border:0;outline:0}.weui-vcode-btn:active{color:#767676}.weui-cell_switch{padding-top:12px;padding-bottom:12px}.weui-uploader{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__hd{padding-bottom:16px}.weui-uploader__overview{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__tips{color:rgba(0,0,0,.3);font-size:14px;line-height:1.4;padding-top:4px}.weui-uploader__info{color:rgba(0,0,0,.3)}.weui-uploader__bd{margin-bottom:-8px;margin-right:-8px;overflow:hidden}.weui-uploader__file{float:left;margin-right:8px;margin-bottom:8px}.weui-uploader__img{display:block;width:96px;height:96px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:8px;margin-bottom:8px;width:96px;height:96px;box-sizing:border-box;background-color:#ededed}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#a3a3a3}.weui-uploader__input-box:before{width:2px;height:32px}.weui-uploader__input-box:after{width:32px;height:2px}.weui-uploader__input-box:active{border-color:#8b8b8b}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#8b8b8b}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}.weui-article{padding:24px 16px;padding:24px calc(16px + constant(safe-area-inset-right)) calc(24px + constant(safe-area-inset-bottom)) calc(16px + constant(safe-area-inset-left));padding:24px calc(16px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));font-size:17px;color:rgba(0,0,0,.9)}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:22px;font-weight:700;margin-bottom:.9em;line-height:1.4}.weui-article__h2{font-size:17px}.weui-article__h2,.weui-article__h3{font-weight:700;margin-bottom:.34em;line-height:1.4}.weui-article__h3{font-size:15px}.weui-article__p{margin:0 0 .8em}.weui-msg{padding-top:36px;padding:calc(36px + constant(safe-area-inset-top)) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left);padding:calc(36px + env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);text-align:center;line-height:1.4;min-height:100%;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;background-color:#fff}.weui-msg__link{color:#576b95;display:inline-block;vertical-align:baseline}.weui-msg__icon-area{margin-bottom:32px}.weui-msg__text-area{margin-bottom:32px;padding:0 32px;-webkit-box-flex:1;-webkit-flex:1;flex:1;line-height:1.6}.weui-msg__text-area:first-child{padding-top:96px}.weui-msg__title{margin-bottom:5px;font-weight:700;font-size:22px;word-wrap:break-word;word-break:break-all}.weui-msg__desc{font-size:17px;color:rgba(0,0,0,.9)}.weui-msg__desc,.weui-msg__desc-primary{word-wrap:break-word;word-break:break-all;margin-bottom:16px}.weui-msg__desc-primary{font-size:14px;color:rgba(0,0,0,.5)}.weui-msg__opr-area{margin-bottom:16px}.weui-msg__opr-area .weui-btn-area{margin:0 16px}.weui-msg__opr-area .weui-btn+.weui-btn{margin-bottom:16px}.weui-msg__opr-area:last-child{margin-bottom:96px}.weui-msg__opr-area+.weui-msg__extra-area{margin-top:48px}.weui-msg__tips-area{margin-bottom:16px;padding:0 40px}.weui-msg__opr-area+.weui-msg__tips-area{margin-bottom:48px}.weui-msg__tips-area:last-child{margin-bottom:64px}.weui-msg__extra-area,.weui-msg__tips{font-size:12px;color:rgba(0,0,0,.5)}.weui-msg__extra-area{position:static;margin-bottom:24px}.weui-cells__group_form:first-child .weui-cells__title{margin-top:0}.weui-cells__group_form .weui-cells__title{margin-top:24px;margin-bottom:8px;padding:0 32px}.weui-cells__group_form .weui-cell:before,.weui-cells__group_form .weui-cells:before{left:32px;right:32px}.weui-cells__group_form .weui-cells_checkbox .weui-check__label:before{left:72px}.weui-cells__group_form .weui-cells:after{left:32px;right:32px}.weui-cells__group_form .weui-cell{padding:16px 32px;color:rgba(0,0,0,.9)}.weui-cells__group_form .weui-cell__hd{padding-right:16px}.weui-cells__group_form .weui-cell__ft{padding-left:16px}.weui-cells__group_form .weui-cell_warn input{color:#fa5151}.weui-cells__group_form .weui-label{max-width:5em;margin-right:8px}.weui-cells__group_form .weui-cells__tips{margin-top:8px;padding:0 32px;color:rgba(0,0,0,.3)}.weui-cells__group_form .weui-cells__tips a{font-weight:700}.weui-cells__group_form .weui-cell_vcode{padding:12px 32px}.weui-cells__group_form .weui-vcode-btn{font-size:16px;padding:0 12px;margin-left:0;height:auto;width:auto;line-height:2em;color:#06ae56;background-color:#f2f2f2}.weui-cells__group_form .weui-vcode-btn:before{display:none}.weui-cells__group_form .weui-cell_select{padding:0}.weui-cells__group_form .weui-cell_select .weui-select{padding:0 32px}.weui-cells__group_form .weui-cell_select .weui-cell__bd:after{right:32px}.weui-cells__group_form .weui-cell_select-before .weui-label{margin-right:24px}.weui-cells__group_form .weui-cell_select-before .weui-select{padding-right:24px;box-sizing:initial}.weui-cells__group_form .weui-cell_select-after{padding-left:32px}.weui-cells__group_form .weui-cell_select-after .weui-select{padding-left:0}.weui-cells__group_form .weui-cell_switch{padding:12px 32px}.weui-cells__group_wxss.weui-cells__group_wxss .weui-cells__title{margin-top:24px}.weui-form{padding:56px 0 0;padding:calc(56px + constant(safe-area-inset-top)) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left);padding:calc(56px + env(safe-area-inset-top)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;min-height:100%;box-sizing:border-box;line-height:1.4;background-color:#fff}.weui-form a:not(.weui-btn){color:#576b95}.weui-form .weui-footer,.weui-form .weui-footer__link{font-size:12px}.weui-form .weui-agree{padding:0}.weui-form__text-area{padding:0 32px;color:rgba(0,0,0,.9);text-align:center}.weui-form__control-area{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin:48px 0}.weui-form__extra-area,.weui-form__tips-area{margin-bottom:24px;text-align:center}.weui-form__opr-area{margin-bottom:64px}.weui-form__opr-area:last-child{margin-bottom:96px}.weui-form__title{font-size:22px;font-weight:700;line-height:1.36}.weui-form__desc{font-size:17px;margin-top:16px}.weui-form__tips{color:rgba(0,0,0,.5);font-size:12px}.weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-btn+.weui-btn{margin-top:16px}.weui-btn.weui-btn_inline+.weui-btn.weui-btn_inline{margin-top:auto;margin-left:16px}.weui-btn-area{margin:48px 16px 8px}.weui-btn-area_inline{display:-webkit-box;display:-webkit-flex;display:flex}.weui-btn-area_inline .weui-btn{margin-top:auto;margin-right:16px;width:100%;-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-btn-area_inline .weui-btn:last-child{margin-right:0}.weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:rgba(0,0,0,.5)}.weui-agree__link{display:inline;color:#576b95}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px}.weui-footer{color:rgba(0,0,0,.3);font-size:14px;line-height:1.4;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:16px;bottom:calc(16px + constant(safe-area-inset-bottom));bottom:calc(16px + env(safe-area-inset-bottom));left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 8px;position:relative;font-size:14px;color:#576b95}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-8px;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}.weui-grids{border-top:1rpx solid rgba(0,0,0,.1);border-left:1rpx solid rgba(0,0,0,.1);overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid rgba(0,0,0,.1);border-bottom:1rpx solid rgba(0,0,0,.1)}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:rgba(0,0,0,.9);font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:a 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.wx_dot_loading,.wx_dot_loading:after,.wx_dot_loading:before{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;background-color:rgba(0,0,0,.3);font-size:0;-webkit-animation:c 1.6s step-start infinite;animation:c 1.6s step-start infinite}.wx_dot_loading{position:relative}.wx_dot_loading:before{content:"";position:absolute;left:-12px;background-color:rgba(0,0,0,.1);-webkit-animation:b 1.6s step-start infinite;animation:b 1.6s step-start infinite}.wx_dot_loading:after{content:"";position:absolute;right:-12px;background-color:rgba(0,0,0,.5);-webkit-animation:d 1.6s step-start infinite;animation:d 1.6s step-start infinite}@-webkit-keyframes b{0%,to{background-color:rgba(0,0,0,.1)}30%{background-color:rgba(0,0,0,.5)}60%{background-color:rgba(0,0,0,.3)}}@keyframes b{0%,to{background-color:rgba(0,0,0,.1)}30%{background-color:rgba(0,0,0,.5)}60%{background-color:rgba(0,0,0,.3)}}@-webkit-keyframes c{0%,to{background-color:rgba(0,0,0,.3)}30%{background-color:rgba(0,0,0,.1)}60%{background-color:rgba(0,0,0,.5)}}@keyframes c{0%,to{background-color:rgba(0,0,0,.3)}30%{background-color:rgba(0,0,0,.1)}60%{background-color:rgba(0,0,0,.5)}}@-webkit-keyframes d{0%,to{background-color:rgba(0,0,0,.5)}30%{background-color:rgba(0,0,0,.3)}60%{background-color:rgba(0,0,0,.1)}}@keyframes d{0%,to{background-color:rgba(0,0,0,.5)}30%{background-color:rgba(0,0,0,.3)}60%{background-color:rgba(0,0,0,.1)}}.wx_dot_loading_white{background-color:hsla(0,0%,100%,.3);-webkit-animation:f 1.6s step-start infinite;animation:f 1.6s step-start infinite}.wx_dot_loading_white:before{background-color:hsla(0,0%,100%,.5);-webkit-animation:e 1.6s step-start infinite;animation:e 1.6s step-start infinite}.wx_dot_loading_white:after{background-color:hsla(0,0%,100%,.1);-webkit-animation:g 1.6s step-start infinite;animation:g 1.6s step-start infinite}@-webkit-keyframes e{0%,to{background-color:hsla(0,0%,100%,.5)}30%{background-color:hsla(0,0%,100%,.1)}60%{background-color:hsla(0,0%,100%,.3)}}@keyframes e{0%,to{background-color:hsla(0,0%,100%,.5)}30%{background-color:hsla(0,0%,100%,.1)}60%{background-color:hsla(0,0%,100%,.3)}}@-webkit-keyframes f{0%,to{background-color:hsla(0,0%,100%,.3)}30%{background-color:hsla(0,0%,100%,.5)}60%{background-color:hsla(0,0%,100%,.1)}}@keyframes f{0%,to{background-color:hsla(0,0%,100%,.3)}30%{background-color:hsla(0,0%,100%,.5)}60%{background-color:hsla(0,0%,100%,.1)}}@-webkit-keyframes g{0%,to{background-color:hsla(0,0%,100%,.1)}30%{background-color:hsla(0,0%,100%,.3)}60%{background-color:hsla(0,0%,100%,.5)}}@keyframes g{0%,to{background-color:hsla(0,0%,100%,.1)}30%{background-color:hsla(0,0%,100%,.3)}60%{background-color:hsla(0,0%,100%,.5)}}.weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid rgba(0,0,0,.1);margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:rgba(0,0,0,.5)}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:rgba(0,0,0,.1)}.weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#fa5151;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0}.weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid rgba(0,0,0,.1)}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:rgba(0,0,0,.1)}.weui-panel:after{bottom:0;border-bottom:1rpx solid rgba(0,0,0,.1)}.weui-panel__hd{padding:16px 16px 13px;color:rgba(0,0,0,.9);font-size:15px;font-weight:700;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1);left:16px}.weui-media-box{padding:16px;position:relative}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1);left:1s6px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;color:rgba(0,0,0,.9);width:auto;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc,.weui-media-box__title{line-height:1.4;overflow:hidden;text-overflow:ellipsis}.weui-media-box__desc{color:rgba(0,0,0,.5);font-size:14px;padding-top:4px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-media-box__info{margin-top:16px;padding-bottom:4px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:16px;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none}.weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0}.weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:relative;z-index:500;background-color:#fff;border-bottom:1rpx solid rgba(0,0,0,.1);padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.weui-navbar+.weui-tab__panel{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:16px;padding:calc(16px + constant(safe-area-inset-top)) 16px 16px;padding:calc(16px + env(safe-area-inset-top)) 16px 16px;text-align:center;font-size:17px;line-height:1.41176471}.weui-navbar__item:after{content:" ";position:absolute;right:0;top:0;width:1px;bottom:0;border-right:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-navbar__item.weui-bar__item_on{background-color:#ececec}.weui-navbar__item:first-child{padding-left:calc(16px + constant(safe-area-inset-left));padding-left:calc(16px + env(safe-area-inset-left))}.weui-navbar__item:last-child{padding-right:calc(16px + constant(safe-area-inset-right));padding-right:calc(16px + env(safe-area-inset-right))}.weui-navbar__item:last-child:after{display:none}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:2px;background-color:#07c160;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;display:none}.weui-navbar__title{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.weui-tabbar{display:-webkit-box;display:-webkit-flex;display:flex;position:relative;z-index:500;background-color:#f7f7f7}.weui-tabbar:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-tabbar__item{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:8px 0 4px;padding-bottom:calc(8px + constant(safe-area-inset-bottom));padding-bottom:calc(8px + env(safe-area-inset-bottom));font-size:0;color:rgba(0,0,0,.5);text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.weui-tabbar__item:first-child{padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left)}.weui-tabbar__item:last-child{padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right)}.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon,.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon>i,.weui-tabbar__item.weui-bar__item_on .weui-tabbar__label{color:#07c160}.weui-tabbar__icon{display:inline-block;width:28px;height:28px;margin-bottom:2px}.weui-tabbar__icon>i,i.weui-tabbar__icon{font-size:24px;color:rgba(0,0,0,.5)}.weui-tabbar__icon image{width:100%;height:100%}.weui-tabbar__label{color:rgba(0,0,0,.9);font-size:10px;line-height:1.4}.weui-tab{display:-webkit-box;display:-webkit-flex;display:flex;height:100%;box-sizing:border-box;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.weui-tab__panel{box-sizing:border-box;-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}:host{width:100%}.weui-slideview{overflow:hidden;position:relative}.weui-slideview__left{position:relative;z-index:10}.weui-slideview__right{position:absolute;z-index:1;left:100%;top:0;height:100%}.weui-slideview__btn__wrp{position:absolute;left:0;bottom:0;text-align:center;min-width:69px;height:100%;white-space:nowrap}.weui-slideview__btn{color:#fff;padding:0 17px}.weui-slideview__btn-group_default .weui-slideview__btn{background:#c7c7cc}.weui-slideview__btn-group_default~.weui-slideview__btn-group_default:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #fff;color:#fff}.weui-slideview__btn-group_default:first-child:before{display:none}.weui-slideview__btn-group_warn .weui-slideview__btn{background:#fe3b30}.weui-slideview__btn-group_warn~.weui-slideview__btn-group_warn:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #fff;color:#fff}.weui-slideview__btn-group_warn:first-child:before{display:none}.weui-slideview_icon .weui-slideview__btn__wrp{background:transparent;font-size:0}.weui-slideview_icon .weui-slideview__btn__wrp:after{content:"";width:0;height:100%;vertical-align:middle;display:inline-block}.weui-slideview_icon .weui-slideview__btn__wrp:first-child{padding-left:16px}.weui-slideview_icon .weui-slideview__btn__wrp:last-child{padding-right:8px}.weui-slideview_icon .weui-slideview__btn{width:48px;height:48px;line-height:48px;padding:0;display:inline-block;vertical-align:middle;border-radius:50%;background-color:#fff}.weui-slideview_icon .weui-slideview__btn__icon{display:inline-block;vertical-align:middle;width:22px;height:22px}.weui-gallery{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;z-index:1000;-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;opacity:0;visibility:hidden;-webkit-transition:opacity .3s;transition:opacity .3s}.weui-gallery_show{display:-webkit-box;display:-webkit-flex;display:flex;visibility:visible;opacity:1}.weui-gallery__img__wrp{-webkit-box-flex:1;-webkit-flex:1;flex:1;position:relative;font-size:0}.weui-gallery__img{background:50% no-repeat;background-size:contain;position:absoulte;width:100%;height:100%}.weui-gallery__opr{background-color:#0d0d0d;color:#fff;line-height:60px;min-height:60px;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);text-align:center}.weui-gallery__opr navigator{color:#fff}.weui-gallery__del{display:block}.weui-gallery__info{color:#fff;font-size:17px;line-height:60px;min-height:60px;text-align:center}.weui-search-bar{position:relative;padding:8px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#ededed;-webkit-text-size-adjust:100%;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-icon-search{margin-right:8px;font-size:14px;vertical-align:top;margin-top:.64em;height:1em;line-height:1em}.weui-icon-search_in-box{position:absolute;left:12px;top:50%;margin-top:-8px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:top}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:4px;background:#fff}.weui-search-bar__box{position:relative;padding-left:32px;padding-right:32px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:32px;line-height:32px;font-size:14px;caret-color:#07c160}.weui-icon-clear{position:absolute;top:0;right:0;bottom:0;padding:0 12px;font-size:0}.weui-icon-clear:after{content:"";height:100%;vertical-align:middle;display:inline-block;width:0;overflow:hidden}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:4px;text-align:center;color:rgba(0,0,0,.5);background:#fff;line-height:32px}.weui-search-bar__cancel-btn{margin-left:8px;line-height:32px;color:#576b95;white-space:nowrap}icon[type=success]:after,icon[type=success]:before{color:#07c160!important}.weui-mask{background:rgba(0,0,0,.6)}.weui-mask,.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.weui-dialog__wrp{position:fixed;z-index:5000;top:16px;bottom:16px;left:16px;right:16px;text-align:center;font-size:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-dialog__wrp .weui-dialog{max-height:100%}.weui-dialog{background-color:#fff;text-align:center;border-radius:12px;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;max-height:90%}.weui-dialog__hd{padding:32px 24px 16px}.weui-dialog__title{font-weight:700;font-size:17px;line-height:1.4}.weui-dialog__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 24px;margin-bottom:32px;min-height:40px;font-size:17px;line-height:1.4;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;color:rgba(0,0,0,.5)}.weui-dialog__bd:first-child{padding:32px 24px 0;font-weight:700;color:rgba(0,0,0,.9);-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-dialog__bd:first-child,.weui-dialog__ft{display:-webkit-box;display:-webkit-flex;display:flex}.weui-dialog__ft{position:relative;line-height:64px;min-height:64px;font-size:17px}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#576b95;font-weight:700;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.weui-dialog__btn:active{background-color:#ececec}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:rgba(0,0,0,.9)}@media screen and (min-width:352px){.weui-dialog{width:320px;margin:0 auto}}.weui-actionsheet{position:fixed;left:0;bottom:0;-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:5000;width:100%;background-color:#eae7e8;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden}.weui-actionsheet__title{position:relative;height:56px;padding:0 24px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;text-align:center;font-size:12px;color:rgba(0,0,0,.5);line-height:1.4;background:#fff}.weui-actionsheet__title:before{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-actionsheet__title .weui-actionsheet__title-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-actionsheet__menu{color:rgba(0,0,0,.9);background-color:#fff}.weui-actionsheet__action{margin-top:8px;background-color:#fff;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.weui-actionsheet__cell{position:relative;padding:16px;text-align:center;font-size:17px;line-height:1.41176471}.weui-actionsheet__cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,.1);color:rgba(0,0,0,.1)}.weui-actionsheet__cell:active{background-color:#ececec}.weui-actionsheet__cell:first-child:before{display:none}.weui-actionsheet__cell_warn{color:#fa5151}.weui-skin_android .weui-actionsheet{position:fixed;left:50%;top:50%;bottom:auto;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:274px;box-sizing:border-box;-webkit-backface-visibility:hidden;backface-visibility:hidden;background:transparent;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;border-radius:2px}.weui-skin_android .weui-actionsheet__action{display:none}.weui-skin_android .weui-actionsheet__menu{border-radius:2px;box-shadow:0 6px 30px 0 rgba(0,0,0,.1)}.weui-skin_android .weui-actionsheet__cell{padding:16px;font-size:17px;line-height:1.41176471;color:rgba(0,0,0,.9);text-align:left}.weui-skin_android .weui-actionsheet__cell:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.weui-skin_android .weui-actionsheet__cell:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.weui-actionsheet_toggle{-webkit-transform:translate(0);transform:translate(0)}.weui-half-screen-dialog{position:fixed;left:0;right:0;bottom:0;max-height:75%;z-index:5000;line-height:1.4;background-color:#fff;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden;padding:0 24px;padding:0 calc(24px + constant(safe-area-inset-right)) constant(safe-area-inset-bottom) calc(24px + constant(safe-area-inset-left));padding:0 calc(24px + env(safe-area-inset-right)) env(safe-area-inset-bottom) calc(24px + env(safe-area-inset-left))}.weui-half-screen-dialog__hd{font-size:8px;height:8em;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-half-screen-dialog__hd .weui-icon-btn{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.weui-half-screen-dialog__hd__side{position:relative;left:-8px}.weui-half-screen-dialog__hd__main{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-half-screen-dialog__hd__side+.weui-half-screen-dialog__hd__main{text-align:center;padding:0 40px}.weui-half-screen-dialog__hd__main+.weui-half-screen-dialog__hd__side{right:-8px;left:auto}.weui-half-screen-dialog__hd__main+.weui-half-screen-dialog__hd__side .weui-icon-btn{right:0}.weui-half-screen-dialog__title{display:block;color:rgba(0,0,0,.9);font-weight:700;font-size:15px}.weui-half-screen-dialog__subtitle{display:block;color:rgba(0,0,0,.5);font-size:10px}.weui-half-screen-dialog__bd{word-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;overflow-y:auto}.weui-half-screen-dialog__desc{padding-top:4px;font-size:17px;font-weight:700;color:rgba(0,0,0,.9);line-height:1.4}.weui-half-screen-dialog__tips{padding-top:16px;font-size:14px;color:rgba(0,0,0,.3);line-height:1.4}.weui-half-screen-dialog__ft{padding:40px 24px 32px;text-align:center}.weui-half-screen-dialog__ft .weui-btn:nth-last-child(n+2),.weui-half-screen-dialog__ft .weui-btn:nth-last-child(n+2)+.weui-btn{display:inline-block;vertical-align:top;margin:0 8px;width:120px}.weui-icon-btn{background-color:transparent;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;border:0;outline:0;font-size:0}.weui-icon-btn_goback{width:12px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cg fill='none' fill-rule='evenodd' transform='translate(-16 -20)'%3E %3Cpath fill='%23FFF' d='M0 12C0 5.373 5.367 0 12 0h390c6.628 0 12 5.374 12 12v52H0V12z'/%3E %3Cpath fill='%23000' fill-opacity='.9' d='M26 39.438L24.955 40.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42l7.666-7.79L26 24.563 18.682 32 26 39.438z'/%3E %3C/g%3E%3C/svg%3E")}.weui-icon-btn_close{width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24' height='24' viewBox='0 0 24 24'%3E %3Cdefs%3E %3Cpath id='33cf2e7b-22e9-42d7-9c56-a9f4a4e03565-a' d='M8 6.943L1.807.75.75 1.807 6.943 8 .75 14.193l1.057 1.057L8 9.057l6.193 6.193 1.057-1.057L9.057 8l6.193-6.193L14.193.75z'/%3E %3C/defs%3E %3Cg fill='none' fill-rule='evenodd' transform='translate(-16 -20)'%3E %3Cpath fill='%23FFF' d='M0 12C0 5.373 5.367 0 12 0h390c6.628 0 12 5.374 12 12v52H0V12z'/%3E %3Cuse fill='%23000' fill-opacity='.9' transform='translate(20 24)' xlink:href='%2333cf2e7b-22e9-42d7-9c56-a9f4a4e03565-a'/%3E %3C/g%3E%3C/svg%3E")}.weui-icon-btn_more{width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E %3Cg fill='none' fill-rule='evenodd' transform='translate(-374 -20)'%3E %3Cpath fill='%23FFF' d='M0 12C0 5.373 5.367 0 12 0h390c6.628 0 12 5.374 12 12v52H0V12z'/%3E %3Cpath fill='%23000' fill-opacity='.9' d='M380.75 32a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0zm5.25-1.75a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5zm7 0a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5z'/%3E %3C/g%3E%3C/svg%3E")}.weui-toptips{position:fixed;-webkit-transform:translateZ(0) translateY(-108%);transform:translateZ(0) translateY(-108%);text-align:center;top:8px;left:16px;right:16px;border-radius:4px;padding:8px;-webkit-border-radius:4px;color:hsla(0,0%,100%,.9);font-size:17px;line-height:1.4;background:rgba(250,81,81,.9);z-index:5000;word-wrap:break-word;word-break:break-all;-webkit-transition:all .4s ease-in-out;transition:all .4s ease-in-out}.weui-toptips_show{-webkit-transform:translateZ(0) translateY(0);transform:translateZ(0) translateY(0);opacity:1}.weui-toptips_warn{background-color:#fa5151}.weui-toptips_success{background-color:#09bb07}.weui-toptips_error{background-color:#fa5151}.weui-toptips_info{background-color:#10aeff}page{--height:44px;--right:190rpx}.weui-navigation-bar{overflow:hidden}.weui-navigation-bar .android{--height:48px;--right:222rpx}.weui-navigation-bar__inner{position:fixed;top:0;left:0;z-index:5001;height:var(--height);padding-right:var(--right);width:calc(100% - var(--right))}.weui-navigation-bar__inner,.weui-navigation-bar__inner .weui-navigation-bar__left{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-navigation-bar__inner .weui-navigation-bar__left{position:relative;width:var(--right);padding-left:16px;-webkit-box-pack:center}.weui-navigation-bar__inner .weui-navigation-bar__left .weui-navigation-bar__btn{display:inline-block;vertical-align:middle;background-repeat:no-repeat}.weui-navigation-bar__inner .weui-navigation-bar__left .weui-navigation-bar__btn_goback{font-size:12px;width:1em;height:2em;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E");background-position:50% 50%;background-size:cover}.weui-navigation-bar__inner .weui-navigation-bar__left .weui-navigation-bar__btn_goback:active{opacity:.5}.weui-navigation-bar__inner .weui-navigation-bar__center{font-size:17px;text-align:center;position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-navigation-bar__inner .weui-navigation-bar__loading{font-size:0}.weui-navigation-bar__inner .weui-navigation-bar__loading .weui-loading{margin-left:0}.weui-navigation-bar__inner .weui-navigation-bar__right{margin-right:16px}.weui-navigation-bar__placeholder{height:var(--height);background:#f8f8f8;position:relative;z-index:50} \ No newline at end of file diff --git a/miniprogram/pages/focus/focus.js b/miniprogram/pages/focus/focus.js new file mode 100644 index 0000000..d12e471 --- /dev/null +++ b/miniprogram/pages/focus/focus.js @@ -0,0 +1,120 @@ +// miniprogram/pages/focus/focus.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + avatarUrl: './user-unlogin.png', + userInfo: {}, + logged: false, + takeSession: false, + requestResult: '', + roomId: '', + showMine: '', + mylist: [], + showText: '显示我的关注', + }, + + showMine: function() { + if (this.data.showMine == 'Y') { + this.setData({ + showText: '显示我的关注', + showMine: '', + }) + return + } + var self = this + console.log("openid", app.globalData.openid) + db.collection("member").where({ + openid: app.globalData.openid, + status: 0 + }).get({ + success: res => { + console.log("res", res) + let roomIds = [] + for (let i in res.data) { + if (res.data[i].roomId) { + roomIds.push(res.data[i].roomId) + } + } + if (roomIds.length == 0) { + wx.showToast({ + title: '无内容', + }) + return + } + + db.collection('roomInfo').where({ + _id: db.command.in(roomIds) + }).get({ + success: res => { + self.setData({ + showText: '收起我的关注', + showMine: 'Y', + mylist: res.data, + }) + } + }) + fail: console.log + }, + fail: console.log + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + + } +}) \ No newline at end of file diff --git a/miniprogram/pages/focus/focus.json b/miniprogram/pages/focus/focus.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/miniprogram/pages/focus/focus.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/miniprogram/pages/focus/focus.wxml b/miniprogram/pages/focus/focus.wxml new file mode 100644 index 0000000..a2ed094 --- /dev/null +++ b/miniprogram/pages/focus/focus.wxml @@ -0,0 +1,8 @@ + + + + + {{item.typeValue}} {{item.typeName}} {{item.date}} 查看 + + + \ No newline at end of file diff --git a/miniprogram/pages/focus/focus.wxss b/miniprogram/pages/focus/focus.wxss new file mode 100644 index 0000000..ab278ea --- /dev/null +++ b/miniprogram/pages/focus/focus.wxss @@ -0,0 +1 @@ +/* miniprogram/pages/focus/focus.wxss */ \ No newline at end of file diff --git a/miniprogram/pages/index/index.js b/miniprogram/pages/index/index.js index b2d8e03..96e24d7 100644 --- a/miniprogram/pages/index/index.js +++ b/miniprogram/pages/index/index.js @@ -1,11 +1,10 @@ - //index.js const app = getApp() const db = wx.cloud.database({ env: 'release-5b9ba9' }) -function getDateStr(){ +function getDateStr() { var dd = new Date() return dd.getFullYear().toString() + '-' + (dd.getMonth() + 1).toString() + '-' + dd.getDate().toString() } @@ -21,6 +20,28 @@ Page({ showMine: '', mylist: [], showText: '显示我的关注', + radioItems: [{ + name: '飞机', + value: 'airplane', + checked: true + }, + { + name: '火车', + value: 'train' + }, + { + name: '汽车', + value: 'car' + }, + { + name: '轮船', + value: 'ship' + }, + { + name: '其他', + value: 'other' + } + ] }, onLoad: function() { @@ -50,6 +71,15 @@ Page({ } } }) + + const titles = ['行车登记', '我的关注'] + const tabs = titles.map(item => ({ + title: item + })) + this.setData({ + tabs + }) + var ddstr = getDateStr() this.setData({ date: ddstr @@ -57,14 +87,14 @@ Page({ this.setTypeValue("airplane") }, - bindDateChange: function(e){ + bindDateChange: function(e) { this.setData({ date: e.detail.value }) }, - setTypeValue(n){ - switch (n){ + setTypeValue(n) { + switch (n) { case "airplane": this.setData({ typeName: '航班号', @@ -98,10 +128,10 @@ Page({ } }, - formSubmit: function(e){ + formSubmit: function(e) { var vals = e.detail.value console.log('submit', vals) - if(vals.typeValue == ""){ + if (vals.typeValue == "") { wx.showToast({ title: this.data.typeName + '不能为空', icon: 'none', @@ -121,20 +151,22 @@ Page({ var self = this db.collection("roomInfo").add({ data: roomInfo, - success: function (e) { + success: function(e) { console.log("add room succ", e._id) roomInfo.id = e._id self.onGetWXACode(roomInfo) }, - fail: function (e) { - db.collection("roomInfo").where({ key: roomInfo.key }).get({ - success: function (e) { + fail: function(e) { + db.collection("roomInfo").where({ + key: roomInfo.key + }).get({ + success: function(e) { console.log("get room succ", e) roomInfo.wxacode = e.data[0].wxacode roomInfo.id = e.data[0]._id self.onGetWXACode(roomInfo) }, - fail: function (e) { + fail: function(e) { wx.showToast({ title: '内部错误, 请稍后重试', }) @@ -146,19 +178,19 @@ Page({ }, onGetWXACode(e) { - if(this.getwxaCode(e)){ + if (this.getwxaCode(e)) { wx.hideLoading() } }, - getwxaCode(e){ + getwxaCode(e) { var roomId = e.id - if(!roomId){ + if (!roomId) { console.log("empty room id") return true } - if(e.wxacode){ + if (e.wxacode) { console.log("use cache wxacode", e.wxacode) this.setData({ roomId: roomId, @@ -167,9 +199,9 @@ Page({ }) return true } - + console.log("start get code", roomId) - + this.setData({ roomId: roomId, wxacodeSrc: '', @@ -178,7 +210,7 @@ Page({ var self = this // 此处为演示,将使用 localStorage 缓存,正常开发中文件 ID 应存在数据库中 - const fileID = wx.getStorageSync('wxacodeCloudID_'+roomId) + const fileID = wx.getStorageSync('wxacodeCloudID_' + roomId) if (fileID) { // 有云文件 ID 缓存,直接使用该 ID @@ -191,7 +223,7 @@ Page({ console.log(`从本地缓存中取得了小程序码的云文件 ID:${fileID}`) return true } - + wx.cloud.callFunction({ name: 'openapi', data: { @@ -201,17 +233,19 @@ Page({ success: res => { console.warn('[云函数] [openapi] wxacode.get 调用成功:', res) db.collection('roomInfo').doc(roomId).update({ - data: {'wxacode': res.result}, - success: function(){ + data: { + 'wxacode': res.result + }, + success: function() { self.setData({ roomId: roomId, wxacodeSrc: res.result, wxacodeResult: `云函数获取二维码成功`, }) - wx.setStorageSync('wxacodeCloudID_'+roomId, res.result) + wx.setStorageSync('wxacodeCloudID_' + roomId, res.result) wx.hideLoading() }, - fail: function(e){ + fail: function(e) { wx.hideLoading() }, }) @@ -225,12 +259,19 @@ Page({ console.error('[云函数] [openapi] wxacode.get 调用失败:', err) } }) - + return false }, - bindTypeChange: function(e){ + bindTypeChange: function(e) { this.setTypeValue(e.detail.value) + let radioItems = this.data.radioItems; + for (var i = 0, len = radioItems.length; i < len; ++i) { + radioItems[i].checked = radioItems[i].value == e.detail.value; + } + this.setData({ + radioItems: radioItems + }); }, onGetUserInfo: function(e) { @@ -243,8 +284,8 @@ Page({ } }, - showMine: function(){ - if(this.data.showMine == 'Y'){ + showMine: function() { + if (this.data.showMine == 'Y') { this.setData({ showText: '显示我的关注', showMine: '', @@ -253,24 +294,29 @@ Page({ } var self = this console.log("openid", app.globalData.openid) - db.collection("member").where({openid: app.globalData.openid, status: 0}).get({ + db.collection("member").where({ + openid: app.globalData.openid, + status: 0 + }).get({ success: res => { console.log("res", res) let roomIds = [] - for(let i in res.data){ - if(res.data[i].roomId){ + for (let i in res.data) { + if (res.data[i].roomId) { roomIds.push(res.data[i].roomId) } } - if(roomIds.length == 0){ + if (roomIds.length == 0) { wx.showToast({ title: '无内容', }) return } - db.collection('roomInfo').where({_id: db.command.in(roomIds)}).get({ - success: res =>{ + db.collection('roomInfo').where({ + _id: db.command.in(roomIds) + }).get({ + success: res => { self.setData({ showText: '收起我的关注', showMine: 'Y', @@ -283,4 +329,21 @@ Page({ fail: console.log }) }, -}) + + tabChange: function(e) { + switch (e.detail.index) { + case 0: + wx.redirectTo({ + url: '../index/index', + }) + break + case 1: + wx.redirectTo({ + url: '../focus/focus', + }) + break + default: + break + } + } +}) \ No newline at end of file diff --git a/miniprogram/pages/index/index.json b/miniprogram/pages/index/index.json index 8835af0..5deac75 100644 --- a/miniprogram/pages/index/index.json +++ b/miniprogram/pages/index/index.json @@ -1,3 +1,14 @@ { - "usingComponents": {} + "usingComponents": { + "mp-tabbar": "../components/tabbar/tabbar", + "mp-tabs": "../components/tabs/index", + "mp-toptips": "../components/toptips/toptips", + "mp-cells": "../components/cells/cells", + "mp-cell": "../components/cell/cell", + "mp-checkbox": "../components/checkbox/checkbox", + "mp-checkbox-group": "../components/checkbox-group/checkbox-group", + "mp-form": "../components/form/form", + "mp-slideview": "../components/slideview/slideview", + "mp-icon": "../components/icon/icon" + } } \ No newline at end of file diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml index 5901d3d..7f98072 100644 --- a/miniprogram/pages/index/index.wxml +++ b/miniprogram/pages/index/index.wxml @@ -1,47 +1,114 @@ -
- - 交通类型 - - - - - - - + + + + 全国新冠肺炎疫情 + 行车码 - - - {{typeName}} - + + + 您好,{{userInfo.nickName}} + - - 出发时间 - - {{date}} - - + + + + + 交通类型 + + + + + + + 乘坐信息 + + + + {{typeName}} + + + + + + + + 日期 + + + + {{date}} + + + + + + + + + - + - - - - - {{item.typeValue}} {{item.typeName}} {{item.date}} 查看 - + + + + + + + + {{item.typeValue}} {{item.typeName}} {{item.date}} 查看 + + - - + + 进入详情页面 - + \ No newline at end of file diff --git a/miniprogram/pages/index/index.wxss b/miniprogram/pages/index/index.wxss index c9be69a..620f3cb 100644 --- a/miniprogram/pages/index/index.wxss +++ b/miniprogram/pages/index/index.wxss @@ -1,5 +1,7 @@ /**index.wxss**/ +@import "../../lib/weui-miniprogram/weui-wxss/dist/style/weui.wxss"; + page { background: #f6f6f6; display: flex; @@ -151,3 +153,60 @@ page { line-height: 36rpx; word-break: break-all; } + + +.yq-m-l { + margin-left: 15rpx; +} + +.yq-m-l-lg { + margin-left: 30rpx; +} + + +.yq-title { + font-size: 14px; + padding-left: 15px; +} + +.yq-subtitle { + font-size: 12px; + padding-left: 5px; +} + +.yq-full-width { + width: 100%; +} + +.yq-nickname { + width: 100%; + text-align: center; + padding: 5px; +} + +.yq-banner { + background-color: rgb(7, 193, 96); + color: white; +} + +.yq-main { + width: 100%; + background: white; + padding-left: 15px; +} + +.yq-test { + margin-left: -5px; +} + +.tab-bar-title__selected { + font-size: 16px; + font-weight: bold; +} + +.weui-tabbar{ + position:fixed; + bottom:0; + left:0; + right:0; +} \ No newline at end of file -- Gitee