├── README.md ├── app.js ├── app.json ├── app.wxss ├── catalog.txt ├── mars ├── apps │ └── articleApp.js ├── common │ └── base.js ├── conf │ └── config.js ├── plugins │ ├── bluebird.js │ ├── crypto.js │ ├── html2wxml.js │ ├── validator.js │ └── wxcharts.js ├── services │ ├── baseService.js │ └── repository │ │ └── baseRepository.js └── templates │ └── base.wxml ├── pages ├── graph │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── index │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss └── users │ ├── index.js │ ├── index.json │ ├── index.wxml │ └── index.wxss ├── public ├── images │ ├── analys.png │ ├── analyss.png │ ├── avatar │ │ └── avatar_01.png │ ├── benefit.png │ ├── cat.png │ ├── home.png │ ├── homes.png │ ├── more.png │ ├── service.png │ ├── usr.png │ └── usrs.png └── style │ ├── base │ ├── fn.wxss │ ├── mixin │ │ ├── setArrow.wxss │ │ ├── setOnepx.wxss │ │ └── text.wxss │ ├── reset.wxss │ └── variable │ │ ├── color.wxss │ │ ├── global.wxss │ │ ├── weui-button.wxss │ │ ├── weui-cell.wxss │ │ ├── weui-dialog.wxss │ │ ├── weui-grid.wxss │ │ ├── weui-msg.wxss │ │ └── weui-progress.wxss │ ├── weui.wxss │ └── widget │ ├── weui-agree │ └── weui-agree.wxss │ ├── weui-animate │ └── weui-animate.wxss │ ├── weui-button │ └── weui-button.wxss │ ├── weui-cell │ ├── weui-access.wxss │ ├── weui-cell.wxss │ ├── weui-check.wxss │ ├── weui-form.wxss │ ├── weui-form │ │ ├── weui-form-preview.wxss │ │ ├── weui-form_common.wxss │ │ ├── weui-select.wxss │ │ └── weui-vcode.wxss │ ├── weui-switch.wxss │ └── weui-uploader.wxss │ ├── weui-flex │ └── weui-flex.wxss │ ├── weui-footer │ └── weui-footer.wxss │ ├── weui-grid │ └── weui-grid.wxss │ ├── weui-loading │ └── weui-loading.wxss │ ├── weui-media-box │ └── weui-media-box.wxss │ ├── weui-page │ ├── weui-article.wxss │ └── weui-msg.wxss │ ├── weui-panel │ └── weui-panel.wxss │ ├── weui-progress │ └── weui-progress.wxss │ ├── weui-searchbar │ └── weui-searchbar.wxss │ ├── weui-tab │ ├── weui-navbar.wxss │ └── weui-tab.wxss │ └── weui-tips │ ├── weui-badge.wxss │ └── weui-loadmore.wxss └── snap.png /README.md: -------------------------------------------------------------------------------- 1 | # marsmina 2 | ![Aaron Swartz](https://github.com/iomars/marsmina/raw/master/snap.png) 3 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | App({ 4 | 5 | /** 6 | * @type:{function} 7 | * @explain:完成程序初始化后触发一次 8 | */ 9 | onLaunch: function () { 10 | this.globalData.usrBaseInfo = '123' 11 | }, 12 | 13 | /** 14 | * @type:{function} 15 | * @explain:用户基础信息获取 16 | */ 17 | getUsrInfo: function (cb) { 18 | var that = this 19 | if (this.globalData.usrDesInfo) { 20 | typeof cb == "function" && cb(this.globalData.usrBaseInfo) 21 | } else { 22 | /*wx.redirectTo({ 23 | url: '登录页面', 24 | })*/ 25 | wx.login({ 26 | success: function () { 27 | wx.getUserInfo({ 28 | success: function (res) { 29 | that.globalData.usrBaseInfo = res.userInfo 30 | typeof cb == "function" && cb(that.globalData.usrBaseInfo) 31 | } 32 | }) 33 | } 34 | }) 35 | } 36 | }, 37 | 38 | /** 39 | * @type:{function} 40 | * @explain:用户加密信息获取 41 | */ 42 | getUsrDes: function (cb) { 43 | var that = this 44 | if (this.globalData.usrDesInfo) { 45 | typeof cb == "function" && cb(this.globalData.usrBaseInfo) 46 | } else { 47 | wx.redirectTo({ 48 | url: 'String', 49 | }) 50 | } 51 | }, 52 | 53 | /** 54 | * @type:{object} 55 | * @explain:全局参数 56 | */ 57 | globalData: { 58 | usrBaseInfo: null, 59 | usrDesInfo: null, 60 | } 61 | 62 | }) -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/users/index", 5 | "pages/graph/index" 6 | ], 7 | "window": { 8 | "backgroundTextStyle": "light", 9 | "navigationBarBackgroundColor": "#1B82D1", 10 | "navigationBarTitleText": "marsmina", 11 | "navigationBarTextStyle": "white" 12 | }, 13 | "tabBar": { 14 | "color": "#707070", 15 | "selectedColor": "#1B82D1", 16 | "borderStyle": "white", 17 | "backgroundColor": "#fff", 18 | "list": [ 19 | { 20 | "pagePath": "pages/index/index", 21 | "iconPath": "public/images/home.png", 22 | "selectedIconPath": "public/images/homes.png", 23 | "text": "首页" 24 | }, 25 | { 26 | "pagePath": "pages/graph/index", 27 | "iconPath": "public/images/analys.png", 28 | "selectedIconPath": "public/images/analyss.png", 29 | "text": "统计" 30 | }, 31 | { 32 | "pagePath": "pages/users/index", 33 | "iconPath": "public/images/usr.png", 34 | "selectedIconPath": "public/images/usrs.png", 35 | "text": "账户" 36 | } 37 | ] 38 | }, 39 | "networkTimeout": { 40 | "request": 8000, 41 | "connectSocket": 8000, 42 | "uploadFile": 8000, 43 | "downloadFile": 8000 44 | }, 45 | "debug": true 46 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | @import 'public/style/weui.wxss'; 2 | 3 | page { 4 | background-color: #f8f8f8; 5 | } 6 | 7 | .container { 8 | height: 100%; 9 | display: flex; 10 | flex-direction: column; 11 | align-items: center; 12 | justify-content: space-between; 13 | padding: 200rpx 0; 14 | box-sizing: border-box; 15 | } 16 | -------------------------------------------------------------------------------- /catalog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/catalog.txt -------------------------------------------------------------------------------- /mars/apps/articleApp.js: -------------------------------------------------------------------------------- 1 | import baseFun from '../common/base' 2 | 3 | (function (exports) { 4 | /** 5 | *@explai:新闻列表 6 | */ 7 | exports.getArtList = function (params, callback) { 8 | params.url = "/A/getArtList" //统一使用配置文件中的请求头部 9 | baseFun.WxRequest(params, callback) 10 | } 11 | 12 | } (module.exports)) -------------------------------------------------------------------------------- /mars/common/base.js: -------------------------------------------------------------------------------- 1 | 2 | import config from '../../hiway/conf/config' 3 | import Promise from '../plugins/bluebird' 4 | 5 | (function (exports) { 6 | 7 | /** 8 | * @explain:执行微信请求并返回回调函数 9 | */ 10 | exports.WxRequest = function (params, callback) { 11 | if (!params.method) params.method = "POST" //此处设置默认请求方式POST 12 | wx.request({ 13 | url: config.domain + params.url, //请求地址 14 | data: Object.assign({}, params.data), 15 | header: { 16 | 'content-type': 'application/json' 17 | }, 18 | method: params.method, 19 | success: function (res) { 20 | if (res.statusCode == 200) { 21 | callback(res.data) 22 | } else { 23 | console.log('Request "' + params.url + '" failed') 24 | } 25 | } 26 | }) 27 | } 28 | 29 | /** 30 | * @explain:记录日志 31 | * @param {Mixed} 记录的信息 32 | * @returns {Void} 33 | */ 34 | function log(msg) { 35 | if (!msg) return; 36 | if (getApp().settings['debug']) 37 | console.log(msg); 38 | let logs = wx.getStorageSync('logs') || []; 39 | logs.unshift(msg) 40 | wx.setStorageSync('logs', logs) 41 | } 42 | 43 | /** 44 | * @param {Function} func 接口 45 | * @param {Object} options 接口参数 46 | * @returns {Promise} Promise对象 47 | */ 48 | function promiseHandle(func, options) { 49 | options = options || {}; 50 | return new Promise((resolve, reject) => { 51 | if (typeof func !== 'function') 52 | reject(); 53 | options.success = resolve; 54 | options.fail = reject; 55 | func(options); 56 | }); 57 | } 58 | 59 | } (module.exports)) -------------------------------------------------------------------------------- /mars/conf/config.js: -------------------------------------------------------------------------------- 1 | const CONFIG = { 2 | 3 | "domain": "http://www.hiwaycrowd.com/", 4 | 5 | "app_info": { 6 | "app_name": "marsmina", 7 | "app_version": "v0.1.0108", 8 | }, 9 | 10 | "share_info": { 11 | "title": "marsmina", 12 | "desc": "marsmina是一个微信小程序简约开发框架。", 13 | "path": "https://github.com/iomars/wx-mars", 14 | }, 15 | } 16 | 17 | export default CONFIG -------------------------------------------------------------------------------- /mars/plugins/bluebird.js: -------------------------------------------------------------------------------- 1 | /* @preserve 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2013-2015 Petka Antonov 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | * 24 | */ 25 | /** 26 | * bluebird build version 3.4.6 27 | * Features enabled: core 28 | * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each 29 | */ 30 | !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(a,s){if(!e[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=s},{"./queue":17,"./schedule":18,"./util":21}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var f={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,a,void 0,u,f),l._then(s,c,void 0,u,f),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],3:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":15}],4:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],7:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+I.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?I.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function s(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function f(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function h(){this._trace=new S(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=k(t);I.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),I.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&X){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),c=C(s),l=c.length-1;l>=0;--l){var u=c[l];if(!V.test(u)){var p=u.match(Q);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var f=c[0],l=0;l0&&(a="\n"+s[l-1]);break}}var h="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(h,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new U(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=k(o);o.stack=a.message+"\n"+a.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function g(t,e){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var c=r[s];if(e[i]!==c)break;e.pop(),i--}e=r}}function C(t){for(var e=[],n=0;n0&&(e=e.slice(n)),e}function k(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?w(t):[" (No stack trace)"],{message:n,stack:C(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(I.isObject(t)){var i=t.stack;r=e+G(i,t)}else r=e+String(t);"function"==typeof L?L(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function j(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){B.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():I.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+T(e)+">, no stack trace)"}function T(t){var e=41;return t.lengtha||0>s||!n||!r||n!==r||a>=s||(nt=function(t){if(D.test(t))return!0;var e=P(t);return e&&e.fileName===n&&a<=e.line&&e.line<=s?!0:!1})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var x,A,L,N=e._getDomain,B=e._async,U=t("./errors").Warning,I=t("./util"),H=I.canAttachTrace,D=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,V=/\((?:timers\.js):\d+:\d+\)/,Q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,G=null,M=!1,W=!(0==I.env("BLUEBIRD_DEBUG")||!I.env("BLUEBIRD_DEBUG")&&"development"!==I.env("NODE_ENV")),$=!(0==I.env("BLUEBIRD_WARNINGS")||!W&&!I.env("BLUEBIRD_WARNINGS")),z=!(0==I.env("BLUEBIRD_LONG_STACK_TRACES")||!W&&!I.env("BLUEBIRD_LONG_STACK_TRACES")),X=0!=I.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&($||!!I.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){j("rejectionHandled",x,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),j("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=N();A="function"==typeof t?null===e?t:I.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=N();x="function"==typeof t?null===e?t:I.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&O()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(B.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),B.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=h,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&O()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!I.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return I.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!I.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),I.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!I.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return I.isNode?function(){return process.emit.apply(process,arguments)}:I.global?function(t){var e="on"+t.toLowerCase(),n=I.global[e];return n?(n.apply(I.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){B.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){B.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,X=ot.warnings,I.isObject(n)&&"wForgottenReturn"in n&&(X=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=s,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=a,e.prototype._execute=o,et=u,ot.cancellation=!0}"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i))},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;I.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var a=e[r].stack,s=n[a];if(void 0!==s&&s!==r){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>s?(c._parent=e[s+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=k(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;b(r),m(r),I.notEnumerableProp(t,"stack",g(n,r)),I.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,G=e;var n=Error.captureStackTrace;return nt=function(t){return D.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,G=e,M=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(G=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,G=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(L=function(t){console.warn(t)},I.isNode&&process.stderr.isTTY?L=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:I.isNode||"string"!=typeof(new Error).stack||(L=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:$,longStackTraces:!1,cancellation:!1,monitoring:!1};return z&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return f},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":9,"./util":21}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],9:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),c=s.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,f=r("Warning","warning"),h=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(v){o=r("TypeError","type error"),a=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function a(){return c.call(this,this.promise._target()._settledValue())}function s(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var f=n(l,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var h=new u("late cancellation observer");return r._attachExtraTrace(h),p.e=h,p}f.isPending()&&f._attachCancellationCallback(new i(this))}return f._then(a,s,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":21}],12:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":21}],13:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=s(t).apply(this,arguments),a=r._popContext();return o.checkForgottenReturns(i,a,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=a.isArray(l)?s(t).apply(u,l):s(t).call(u,l)}else c=s(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":21}],14:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!h.isObject(o))return p("expecting an object but got A catch statement predicate "+h.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,O(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(F.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+h.classString(t);arguments.length>1&&(n+=", "+h.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+h.classString(t)):this.all()._then(t,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"), 31 | new E(this).promise()},i.prototype.error=function(t){return this.caught(h.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=S(t)(P(e,n));return r===R&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=k(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+h.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var a=void 0!==o,s=a?o:new i(b),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var p=c();if(0!==(50397184&u)){var f,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,f=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),f=e),v.invoke(d,l,{handler:null===p?f:"function"==typeof f&&h.domainBind(p,f),promise:s,receiver:r,value:_})}else l._addCallbacks(t,e,s,r,p);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===f?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:h.domainBind(i,e));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof t&&(this[a+0]=null===i?t:h.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:h.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=k(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;a>s;++s)r._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=h.ensureErrorObject(t),i=r===t;if(!i&&!n&&F.warnings()){var o="a promise was rejected with a non-error: "+h.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===C?n&&"number"==typeof n.length?o=S(t).apply(this._boundValue(),n):(o=R,o.e=new g("cannot .spread() a non-array: "+h.classString(n))):o=S(t).call(e,n);var a=r._popContext();i=r._bitField,0===(65536&i)&&(o===w?r._reject(n):o===R?r._rejectCallback(o.e,!1):(F.checkForgottenReturns(o,a,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var a=t instanceof i,s=this._bitField,c=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,S(e).call(r,o)===R&&t._reject(R.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?a?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):a&&(c&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,h.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){F.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:a}},h.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,k,p,F),t("./bind")(i,b,k,F),t("./cancel")(i,E,p,F),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,k,b,v,c),i.Promise=i,i.version="3.4.6",h.toFastProperties(i),h.toFastProperties(i.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new i(b)),F.setBounds(d.firstLineError,h.lastLineError),i}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;if(this._values=o,0===(50397184&s))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&s))return 0!==(16777216&s)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(a(n))):void this._iterate(o)},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;n>s;++s){var c=r(t[s],i);c instanceof e?(c=c._target(),a=c._bitField):a=null,o?null!==a&&c.suppressUnhandledRejections():null!==a?0===(50397184&a)?(c._proxy(this,s),this._values[s]=c):o=0!==(33554432&a)?this._promiseFulfilled(c._value(),s):0!==(16777216&a)?this._promiseRejected(c._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(c,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;no;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacityn;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function f(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function h(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return L.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(e){}}function m(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function C(t){return{}.toString.call(t)}function w(t,e,n){for(var r=F.names(t),i=0;i10||t[0]>0}(),H.isNode&&H.toFastProperties(process);try{throw new Error}catch(D){H.lastLineError=D}e.exports=H},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); 32 | -------------------------------------------------------------------------------- /mars/plugins/crypto.js: -------------------------------------------------------------------------------- 1 | 2 | var hexcase = 0; var b64pad = ""; var chrsz = 8; 3 | 4 | var MD5 = function () { }; 5 | 6 | MD5.hex_md5 = function (s) { 7 | return this.binl2hex(this.core_md5(this.str2binl(s), s.length * chrsz)); 8 | } 9 | 10 | MD5.b64_md5 = function (s) { 11 | return this.binl2b64(this.core_md5(this.str2binl(s), s.length * chrsz)); 12 | } 13 | 14 | MD5.hex_hmac_md5 = function (key, data) { 15 | return this.binl2hex(this.core_hmac_md5(key, data)); 16 | } 17 | 18 | MD5.b64_hmac_md5 = function (key, data) { 19 | return this.binl2b64(this.core_hmac_md5(key, data)); 20 | } 21 | 22 | MD5.calcMD5 = function (s) { 23 | return this.binl2hex(this.core_md5(str2binl(s), s.length * chrsz)); 24 | } 25 | 26 | MD5.md5_vm_test = function () { 27 | return this.hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; 28 | } 29 | 30 | MD5.core_md5 = function (x, len) { 31 | 32 | x[len >> 5] |= 0x80 << ((len) % 32); 33 | x[(((len + 64) >>> 9) << 4) + 14] = len; 34 | var a = 1732584193; 35 | var b = -271733879; 36 | var c = -1732584194; 37 | var d = 271733878; 38 | for (var i = 0; i < x.length; i += 16) { 39 | var olda = a; 40 | var oldb = b; 41 | var oldc = c; 42 | var oldd = d; 43 | 44 | a = this.md5_ff(a, b, c, d, x[i + 0], 7, -680876936); 45 | d = this.md5_ff(d, a, b, c, x[i + 1], 12, -389564586); 46 | c = this.md5_ff(c, d, a, b, x[i + 2], 17, 606105819); 47 | b = this.md5_ff(b, c, d, a, x[i + 3], 22, -1044525330); 48 | a = this.md5_ff(a, b, c, d, x[i + 4], 7, -176418897); 49 | d = this.md5_ff(d, a, b, c, x[i + 5], 12, 1200080426); 50 | c = this.md5_ff(c, d, a, b, x[i + 6], 17, -1473231341); 51 | b = this.md5_ff(b, c, d, a, x[i + 7], 22, -45705983); 52 | a = this.md5_ff(a, b, c, d, x[i + 8], 7, 1770035416); 53 | d = this.md5_ff(d, a, b, c, x[i + 9], 12, -1958414417); 54 | c = this.md5_ff(c, d, a, b, x[i + 10], 17, -42063); 55 | b = this.md5_ff(b, c, d, a, x[i + 11], 22, -1990404162); 56 | a = this.md5_ff(a, b, c, d, x[i + 12], 7, 1804603682); 57 | d = this.md5_ff(d, a, b, c, x[i + 13], 12, -40341101); 58 | c = this.md5_ff(c, d, a, b, x[i + 14], 17, -1502002290); 59 | b = this.md5_ff(b, c, d, a, x[i + 15], 22, 1236535329); 60 | a = this.md5_gg(a, b, c, d, x[i + 1], 5, -165796510); 61 | d = this.md5_gg(d, a, b, c, x[i + 6], 9, -1069501632); 62 | c = this.md5_gg(c, d, a, b, x[i + 11], 14, 643717713); 63 | b = this.md5_gg(b, c, d, a, x[i + 0], 20, -373897302); 64 | a = this.md5_gg(a, b, c, d, x[i + 5], 5, -701558691); 65 | d = this.md5_gg(d, a, b, c, x[i + 10], 9, 38016083); 66 | c = this.md5_gg(c, d, a, b, x[i + 15], 14, -660478335); 67 | b = this.md5_gg(b, c, d, a, x[i + 4], 20, -405537848); 68 | a = this.md5_gg(a, b, c, d, x[i + 9], 5, 568446438); 69 | d = this.md5_gg(d, a, b, c, x[i + 14], 9, -1019803690); 70 | c = this.md5_gg(c, d, a, b, x[i + 3], 14, -187363961); 71 | b = this.md5_gg(b, c, d, a, x[i + 8], 20, 1163531501); 72 | a = this.md5_gg(a, b, c, d, x[i + 13], 5, -1444681467); 73 | d = this.md5_gg(d, a, b, c, x[i + 2], 9, -51403784); 74 | c = this.md5_gg(c, d, a, b, x[i + 7], 14, 1735328473); 75 | b = this.md5_gg(b, c, d, a, x[i + 12], 20, -1926607734); 76 | a = this.md5_hh(a, b, c, d, x[i + 5], 4, -378558); 77 | d = this.md5_hh(d, a, b, c, x[i + 8], 11, -2022574463); 78 | c = this.md5_hh(c, d, a, b, x[i + 11], 16, 1839030562); 79 | b = this.md5_hh(b, c, d, a, x[i + 14], 23, -35309556); 80 | a = this.md5_hh(a, b, c, d, x[i + 1], 4, -1530992060); 81 | d = this.md5_hh(d, a, b, c, x[i + 4], 11, 1272893353); 82 | c = this.md5_hh(c, d, a, b, x[i + 7], 16, -155497632); 83 | b = this.md5_hh(b, c, d, a, x[i + 10], 23, -1094730640); 84 | a = this.md5_hh(a, b, c, d, x[i + 13], 4, 681279174); 85 | d = this.md5_hh(d, a, b, c, x[i + 0], 11, -358537222); 86 | c = this.md5_hh(c, d, a, b, x[i + 3], 16, -722521979); 87 | b = this.md5_hh(b, c, d, a, x[i + 6], 23, 76029189); 88 | a = this.md5_hh(a, b, c, d, x[i + 9], 4, -640364487); 89 | d = this.md5_hh(d, a, b, c, x[i + 12], 11, -421815835); 90 | c = this.md5_hh(c, d, a, b, x[i + 15], 16, 530742520); 91 | b = this.md5_hh(b, c, d, a, x[i + 2], 23, -995338651); 92 | a = this.md5_ii(a, b, c, d, x[i + 0], 6, -198630844); 93 | d = this.md5_ii(d, a, b, c, x[i + 7], 10, 1126891415); 94 | c = this.md5_ii(c, d, a, b, x[i + 14], 15, -1416354905); 95 | b = this.md5_ii(b, c, d, a, x[i + 5], 21, -57434055); 96 | a = this.md5_ii(a, b, c, d, x[i + 12], 6, 1700485571); 97 | d = this.md5_ii(d, a, b, c, x[i + 3], 10, -1894986606); 98 | c = this.md5_ii(c, d, a, b, x[i + 10], 15, -1051523); 99 | b = this.md5_ii(b, c, d, a, x[i + 1], 21, -2054922799); 100 | a = this.md5_ii(a, b, c, d, x[i + 8], 6, 1873313359); 101 | d = this.md5_ii(d, a, b, c, x[i + 15], 10, -30611744); 102 | c = this.md5_ii(c, d, a, b, x[i + 6], 15, -1560198380); 103 | b = this.md5_ii(b, c, d, a, x[i + 13], 21, 1309151649); 104 | a = this.md5_ii(a, b, c, d, x[i + 4], 6, -145523070); 105 | d = this.md5_ii(d, a, b, c, x[i + 11], 10, -1120210379); 106 | c = this.md5_ii(c, d, a, b, x[i + 2], 15, 718787259); 107 | b = this.md5_ii(b, c, d, a, x[i + 9], 21, -343485551); 108 | 109 | a = this.safe_add(a, olda); 110 | b = this.safe_add(b, oldb); 111 | c = this.safe_add(c, oldc); 112 | d = this.safe_add(d, oldd); 113 | } 114 | return Array(a, b, c, d); 115 | 116 | } 117 | 118 | MD5.md5_cmn = function (q, a, b, x, s, t) { 119 | return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s), b); 120 | } 121 | 122 | MD5.md5_ff = function (a, b, c, d, x, s, t) { 123 | return this.md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); 124 | } 125 | 126 | MD5.md5_gg = function (a, b, c, d, x, s, t) { 127 | return this.md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); 128 | } 129 | 130 | MD5.md5_hh = function (a, b, c, d, x, s, t) { 131 | return this.md5_cmn(b ^ c ^ d, a, b, x, s, t); 132 | } 133 | 134 | MD5.md5_ii = function (a, b, c, d, x, s, t) { 135 | return this.md5_cmn(c ^ (b | (~d)), a, b, x, s, t); 136 | } 137 | 138 | MD5.core_hmac_md5 = function (key, data) { 139 | var bkey = str2binl(key); 140 | if (bkey.length > 16) bkey = this.core_md5(bkey, key.length * chrsz); 141 | 142 | var ipad = Array(16), opad = Array(16); 143 | for (var i = 0; i < 16; i++) { 144 | ipad[i] = bkey[i] ^ 0x36363636; 145 | opad[i] = bkey[i] ^ 0x5C5C5C5C; 146 | } 147 | 148 | var hash = this.core_md5(ipad.concat(this.str2binl(data)), 512 + data.length * chrsz); 149 | return this.core_md5(opad.concat(hash), 512 + 128); 150 | } 151 | 152 | MD5.safe_add = function (x, y) { 153 | var lsw = (x & 0xFFFF) + (y & 0xFFFF); 154 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 155 | return (msw << 16) | (lsw & 0xFFFF); 156 | } 157 | 158 | MD5.bit_rol = function (num, cnt) { 159 | return (num << cnt) | (num >>> (32 - cnt)); 160 | } 161 | 162 | MD5.str2binl = function (str) { 163 | var bin = Array(); 164 | var mask = (1 << chrsz) - 1; 165 | for (var i = 0; i < str.length * chrsz; i += chrsz) 166 | bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32); 167 | return bin; 168 | } 169 | 170 | MD5.binl2hex = function (binarray) { 171 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 172 | var str = ""; 173 | for (var i = 0; i < binarray.length * 4; i++) { 174 | str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + 175 | hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF); 176 | } 177 | return str; 178 | } 179 | 180 | MD5.binl2b64 = function (binarray) { 181 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 182 | var str = ""; 183 | for (var i = 0; i < binarray.length * 4; i += 3) { 184 | var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) 185 | | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) 186 | | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF); 187 | for (var j = 0; j < 4; j++) { 188 | if (i * 8 + j * 6 > binarray.length * 32) str += b64pad; 189 | else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F); 190 | } 191 | } 192 | return str; 193 | } 194 | 195 | module.exports = MD5; -------------------------------------------------------------------------------- /mars/plugins/html2wxml.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by kevenfeng on 2016/10/12. 3 | */ 4 | // Regular Expressions for parsing tags and attributes 5 | var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, 6 | endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/, 7 | attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; 8 | 9 | // Empty Elements - HTML 5 10 | var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"); 11 | 12 | // Block Elements - HTML 5 13 | var block = makeMap("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"); 14 | 15 | // Inline Elements - HTML 5 16 | var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"); 17 | 18 | // Elements that you can, intentionally, leave open 19 | // (and which close themselves) 20 | var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); 21 | 22 | // Attributes that have their values filled in disabled="disabled" 23 | var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"); 24 | 25 | // Special Elements (can contain anything) 26 | var special = makeMap("script,style"); 27 | 28 | var HTMLParser = function (html, handler) { 29 | var index, chars, match, stack = [], last = html; 30 | stack.last = function () { 31 | return this[this.length - 1]; 32 | }; 33 | 34 | while (html) { 35 | chars = true; 36 | 37 | // Make sure we're not in a script or style element 38 | if (!stack.last() || !special[stack.last()]) { 39 | 40 | // Comment 41 | if (html.indexOf(""); 43 | 44 | if (index >= 0) { 45 | if (handler.comment) 46 | handler.comment(html.substring(4, index)); 47 | html = html.substring(index + 3); 48 | chars = false; 49 | } 50 | 51 | // end tag 52 | } else if (html.indexOf("/g, ""); 79 | if (handler.chars) 80 | handler.chars(text); 81 | } 82 | 83 | } else { 84 | html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) { 85 | text = text.replace(/|/g, "$1$2"); 86 | text = text.replace(/ /g, " "); //转义字符处理 87 | if (handler.chars) 88 | handler.chars(text); 89 | 90 | return ""; 91 | }); 92 | 93 | parseEndTag("", stack.last()); 94 | } 95 | 96 | if (html == last) 97 | throw "Parse Error: " + html; 98 | last = html; 99 | } 100 | 101 | // Clean up any remaining tags 102 | parseEndTag(); 103 | 104 | function parseStartTag(tag, tagName, rest, unary) { 105 | tagName = tagName.toLowerCase(); 106 | 107 | if (block[tagName]) { 108 | while (stack.last() && inline[stack.last()]) { 109 | parseEndTag("", stack.last()); 110 | } 111 | } 112 | 113 | if (closeSelf[tagName] && stack.last() == tagName) { 114 | parseEndTag("", tagName); 115 | } 116 | 117 | unary = empty[tagName] || !!unary; 118 | 119 | if (!unary) 120 | stack.push(tagName); 121 | 122 | if (handler.start) { 123 | var attrs = []; 124 | 125 | rest.replace(attr, function (match, name) { 126 | var value = arguments[2] ? arguments[2] : 127 | arguments[3] ? arguments[3] : 128 | arguments[4] ? arguments[4] : 129 | fillAttrs[name] ? name : ""; 130 | 131 | attrs.push({ 132 | name: name, 133 | value: value, 134 | escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //" 135 | }); 136 | }); 137 | 138 | if (handler.start) 139 | handler.start(tagName, attrs, unary); 140 | } 141 | } 142 | 143 | function parseEndTag(tag, tagName) { 144 | // If no tag name is provided, clean shop 145 | if (!tagName) 146 | var pos = 0; 147 | 148 | // Find the closest opened tag of the same type 149 | else 150 | for (var pos = stack.length - 1; pos >= 0; pos--) 151 | if (stack[pos] == tagName) 152 | break; 153 | 154 | if (pos >= 0) { 155 | // Close all the open elements, up the stack 156 | for (var i = stack.length - 1; i >= pos; i--) 157 | if (handler.end) 158 | handler.end(stack[i]); 159 | 160 | // Remove the open elements from the stack 161 | stack.length = pos; 162 | } 163 | } 164 | }; 165 | 166 | function makeMap(str) { 167 | var obj = {}, items = str.split(","); 168 | for (var i = 0; i < items.length; i++) 169 | obj[items[i]] = true; 170 | return obj; 171 | } 172 | var global = {}; 173 | var debug = function () { }; 174 | 175 | function q(v) { 176 | return '"' + v + '"'; 177 | } 178 | 179 | function removeDOCTYPE(html) { 180 | return html 181 | .replace(/<\?xml.*\?>\n/, '') 182 | .replace(/\n/, '') 183 | .replace(/\n/, ''); 184 | } 185 | global.html2json = function html2json(html) { 186 | html = removeDOCTYPE(html); 187 | var bufArray = []; 188 | var results = { 189 | node: 'root', 190 | child: [], 191 | }; 192 | HTMLParser(html, { 193 | start: function (tag, attrs, unary) { 194 | debug(tag, attrs, unary); 195 | // node for this element 196 | var node = { 197 | node: 'element', 198 | tag: tag, 199 | }; 200 | if (attrs.length !== 0) { 201 | node.attr = attrs.reduce(function (pre, attr) { 202 | var name = attr.name; 203 | var value = attr.value; 204 | 205 | // has multi attibutes 206 | // make it array of attribute 207 | if (value.match(/ /)) { 208 | value = value.split(' '); 209 | } 210 | 211 | // if attr already exists 212 | // merge it 213 | if (pre[name]) { 214 | if (Array.isArray(pre[name])) { 215 | // already array, push to last 216 | pre[name].push(value); 217 | } else { 218 | // single value, make it array 219 | pre[name] = [pre[name], value]; 220 | } 221 | } else { 222 | // not exist, put it 223 | pre[name] = value; 224 | } 225 | 226 | return pre; 227 | }, {}); 228 | } 229 | if (unary) { 230 | // if this tag dosen't have end tag 231 | // like 232 | // add to parents 233 | var parent = bufArray[0] || results; 234 | if (parent.child === undefined) { 235 | parent.child = []; 236 | } 237 | parent.child.push(node); 238 | } else { 239 | bufArray.unshift(node); 240 | } 241 | }, 242 | end: function (tag) { 243 | debug(tag); 244 | // merge into parent tag 245 | var node = bufArray.shift(); 246 | if (node.tag !== tag) console.error('invalid state: mismatch end tag'); 247 | 248 | if (bufArray.length === 0) { 249 | results.child.push(node); 250 | } else { 251 | var parent = bufArray[0]; 252 | if (parent.child === undefined) { 253 | parent.child = []; 254 | } 255 | parent.child.push(node); 256 | } 257 | }, 258 | chars: function (text) { 259 | debug(text); 260 | var node = { 261 | node: 'text', 262 | text: text, 263 | }; 264 | if (bufArray.length === 0) { 265 | results.child.push(node); 266 | } else { 267 | var parent = bufArray[0]; 268 | if (parent.child === undefined) { 269 | parent.child = []; 270 | } 271 | parent.child.push(node); 272 | } 273 | }, 274 | comment: function (text) { 275 | debug(text); 276 | var node = { 277 | node: 'comment', 278 | text: text, 279 | }; 280 | var parent = bufArray[0]; 281 | if (parent.child === undefined) { 282 | parent.child = []; 283 | } 284 | parent.child.push(node); 285 | }, 286 | }); 287 | return results; 288 | }; 289 | 290 | global.json2html = function json2html(json) { 291 | // Empty Elements - HTML 4.01 292 | var empty = ['area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'embed']; 293 | 294 | var child = ''; 295 | if (json.child) { 296 | child = json.child.map(function (c) { 297 | return json2html(c); 298 | }).join(''); 299 | } 300 | 301 | //console.log(json) 302 | 303 | var attr = ''; 304 | if (json.attr) { 305 | attr = Object.keys(json.attr).map(function (key) { 306 | var value = json.attr[key]; 307 | if (Array.isArray(value)) value = value.join(' '); 308 | return key + '=' + q(value); 309 | }).join(' '); 310 | if (attr !== '') attr = ' ' + attr; 311 | } 312 | 313 | if (json.node === 'element') { 314 | var tag = json.tag; 315 | if (empty.indexOf(tag) > -1) { 316 | // empty element 317 | return '<' + json.tag + attr + '/>'; 318 | } 319 | 320 | // non empty element 321 | var open = '<' + json.tag + attr + '>'; 322 | var close = ''; 323 | return open + child + close; 324 | } 325 | 326 | if (json.node === 'text') { 327 | return json.text; 328 | } 329 | 330 | if (json.node === 'comment') { 331 | return ''; 332 | } 333 | 334 | if (json.node === 'root') { 335 | return child; 336 | } 337 | }; 338 | 339 | var html2wxwebview = function (html) { 340 | var htmlNode = global.html2json(html); 341 | //console.log("htmlNode:",htmlNode); 342 | htmlNode = parseHtmlNode(htmlNode); 343 | //console.log("parseHtmlNode:",htmlNode); 344 | htmlNode = arrangeNode(htmlNode); 345 | //console.log("arrangeNode:",htmlNode); 346 | return htmlNode; 347 | } 348 | //整理节点 349 | var arrangeNode = function (htmlNode) { 350 | var arrangeArray = []; 351 | var nodeObj = []; 352 | for (var i = 0, j = htmlNode.length; i < j; i++) { 353 | if (i == 0) { 354 | if (htmlNode[i].type == "view") { 355 | continue; 356 | } 357 | arrangeArray.push(htmlNode[i]); 358 | } else { 359 | if (htmlNode[i].type == "view") { 360 | if (arrangeArray.length > 0) { 361 | var obj = { 362 | type: "view", 363 | child: arrangeArray 364 | } 365 | nodeObj.push(obj); 366 | } 367 | arrangeArray = []; 368 | } else if (htmlNode[i].type == "img") { 369 | if (arrangeArray.length > 0) { 370 | var obj = { 371 | type: "view", 372 | child: arrangeArray 373 | } 374 | nodeObj.push(obj); 375 | } 376 | 377 | var obj = { 378 | type: "img", 379 | attr: htmlNode[i].attr 380 | } 381 | nodeObj.push(obj); 382 | 383 | arrangeArray = []; 384 | } else { 385 | arrangeArray.push(htmlNode[i]); 386 | if (i == (j - 1)) { 387 | var obj = { 388 | type: "view", 389 | child: arrangeArray 390 | } 391 | nodeObj.push(obj); 392 | } 393 | } 394 | } 395 | } 396 | 397 | return nodeObj; 398 | } 399 | 400 | //将html节点转成小程序可用的接口 401 | var parseHtmlNode = function (htmlNode) { 402 | var tagsArray = []; 403 | var parsetags = function (node) { 404 | var tag = {}; 405 | if (node.node == "root") { 406 | 407 | } else if (node.node == "element") { 408 | switch (node.tag) { 409 | case "a": 410 | tag = { 411 | type: "a", 412 | text: node.child[0].text, 413 | } 414 | break; 415 | case "img": 416 | tag = { 417 | type: "img", 418 | text: node.text, 419 | } 420 | break; 421 | case "p": 422 | tag = { 423 | type: "view", 424 | text: node.text, 425 | } 426 | break; 427 | case "div": 428 | tag = { 429 | type: "view", 430 | text: node.text, 431 | } 432 | break; 433 | } 434 | } else if (node.node == "text") { 435 | tag = { 436 | type: "text", 437 | text: node.text, 438 | } 439 | } 440 | 441 | if (node.attr) { 442 | tag.attr = node.attr; 443 | } 444 | 445 | if (Object.keys(tag).length != 0) { 446 | // if(tag.text||node.tag=="img"){ 447 | tagsArray.push(tag); 448 | // } 449 | } 450 | 451 | if (node.tag == "a") {//如果是a标签就不去解析他的child 452 | return; 453 | } 454 | 455 | var child = node.child; 456 | 457 | if (child) { 458 | for (var val in child) { 459 | parsetags(child[val]); 460 | } 461 | } 462 | } 463 | 464 | parsetags(htmlNode); 465 | return tagsArray; 466 | } 467 | 468 | module.exports = { 469 | html2json: html2wxwebview 470 | } 471 | 472 | -------------------------------------------------------------------------------- /mars/plugins/validator.js: -------------------------------------------------------------------------------- 1 | 2 | //数字 3 | function isDigits(str) { 4 | return /^\d+$/.test(str) 5 | } 6 | 7 | //最多保留两位小数的数字 8 | function fmtDigits(str) { 9 | return /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/.test(str) 10 | } 11 | 12 | //字母 13 | function isLetters(str) { 14 | return /^[a-z]+$/i.test(str) 15 | } 16 | 17 | //日期(yyyyyyy-mm-dd) 18 | function isDate(str) { 19 | return /^\d{4}-\d{2}-\d{2}$/.test(str) 20 | } 21 | 22 | //时间 00:00到23:59 23 | function isTime(str) { 24 | return /^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(str) 25 | } 26 | 27 | //邮箱 28 | function isEmail(str) { 29 | return /^[\w\+\-]+(\.[\w\+\-]+)*@[a-z\d\-]+(\.[a-z\d\-]+)*\.([a-z]{2,4})$/i.test(str) 30 | } 31 | 32 | //Url地址 33 | function isUrl(str) { 34 | return /^(https?|s?ftp):\/\/\S+$/i.test(str) 35 | } 36 | 37 | //QQ号码 38 | function isQQ(str) { 39 | return /^[1-9]\d{4,}$/.test(str) 40 | } 41 | 42 | //身份证号 43 | function isIDCard(str) { 44 | return /^[1-9]\d{4,}$/.test(str) 45 | } 46 | 47 | //座机号 48 | function isTel(str) { 49 | return /^(?:(?:0\d{2,3}[\- ]?[1-9]\d{6,7})|(?:[48]00[\- ]?[1-9]\d{6}))$/.test(str) 50 | } 51 | 52 | //手机号 53 | function isMobile(str) { 54 | return /^1[3-9]\d{9}$/.test(str) 55 | } 56 | 57 | //邮政编码 58 | function isZipCode(str) { 59 | return /^\d{6}$/.test(str) 60 | } 61 | 62 | //中文字符 63 | function isChinese(str) { 64 | return /^[\u0391-\uFFE5]+$/.test(str) 65 | } 66 | 67 | //用户名 3-12位数字、字母、下划线 68 | function isUsrUsrName(str) { 69 | return /^\w{3,12}$/.test(str) 70 | } 71 | 72 | //密码 6-16位字符,不能包含空格 73 | function isPassWd(str) { 74 | return /^[\S]{6,16}$/.test(str) 75 | } 76 | 77 | //6-16个由数字、字母组成的用户名 78 | function isUsrName(str) { 79 | return /^[A-Za-z0-9]{6,16}$/.test(str) 80 | } 81 | 82 | //校验返回true/false 83 | module.exports = { 84 | isDigits: isDigits, //数字 85 | isLetters: isLetters, //字母 86 | isDate: isDate, //日期 87 | isTime: isTime, //时间 88 | isEmail: isEmail, //邮箱 89 | isUrl: isUrl, //URL地址 90 | isQQ: isQQ, //QQ 91 | isTel: isTel, // 固定号码 92 | isIDCard: isIDCard, //身份证号 93 | isMobile: isMobile, //手机号 94 | isZipCode: isZipCode, //邮编 95 | isChinese: isChinese, //中文字符 96 | isUsrUsrName: isUsrUsrName, //用户名 97 | isPassWd: isPassWd, //密码 98 | fmtDigits: fmtDigits,//最多保留两位小数的正数 99 | isUsrName: isUsrName,//6-16个由数字、字母组成的用户名 100 | } 101 | -------------------------------------------------------------------------------- /mars/plugins/wxcharts.js: -------------------------------------------------------------------------------- 1 | /* 2 | * charts for WeChat small app v1.0 3 | * 4 | * https://github.com/xiaolin3303/wx-charts 5 | * 2016-11-28 6 | * 7 | * Designed and built with all the love of Web 8 | */ 9 | 10 | "use strict";function assign(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),a=1;a0?t.start.y--:t.start.x<0?t.start.y++:t.start.y>0?t.start.y++:t.start.y--;return t}function fillSeriesColor(t,e){var i=0;return t.map(function(t){return t.color||(t.color=e.colors[i],i=(i+1)%e.colors.length),t})}function getDataRange(t,e){var i=0,a=e-t;return i=a>=1e4?1e3:a>=1e3?100:a>=100?10:a>=10?5:a>=1?1:a>=.1?.1:.01,{minRange:findRange(t,"lower",i),maxRange:findRange(e,"upper",i)}}function mesureText(t){t=String(t);var t=t.split(""),e=0;return t.forEach(function(t){e+=/[a-zA-Z]/.test(t)?7:/[0-9]/.test(t)?5.5:/\./.test(t)?2.7:/-/.test(t)?3.25:/[\u4e00-\u9fa5]/.test(t)?10:/\(|\)/.test(t)?3.73:/\s/.test(t)?2.5:/%/.test(t)?8:10}),e}function dataCombine(t){return t.reduce(function(t,e){return(t.data?t.data:t).concat(e.data)},[])}function calCategoriesData(t,e,i){var a={angle:0,xAxisHeight:i.xAxisHeight},n=getXAxisPoints(t,e,i),o=n.eachSpacing,r=t.map(function(t){return mesureText(t)}),s=Math.max.apply(this,r);return s+2*i.xAxisTextPadding>o&&(a.angle=45*Math.PI/180,a.xAxisHeight=2*i.xAxisTextPadding+s*Math.sin(a.angle)+i.padding),a}function getPieDataPoints(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=0,a=0;return t.forEach(function(t){i+=t.data}),t.forEach(function(t){t._proportion_=t.data/i*e}),t.forEach(function(t){t._start_=a,a+=2*t._proportion_*Math.PI}),t}function getPieTextMaxLength(t){t=getPieDataPoints(t);var e=0;return t.forEach(function(t){var i=t.format?t.format(+t._proportion_.toFixed(2)):util.toFixed(100*t._proportion_)+"%";e=Math.max(e,mesureText(i))}),e}function fixColumeData(t,e,i,a,n){return t.map(function(t){return t.width=(e-2*n.columePadding)/i,t.width=Math.min(t.width,25),t.x+=(a+.5-i/2)*t.width,t})}function getXAxisPoints(t,e,i){var a=i.yAxisWidth+i.yAxisTitleWidth,n=e.width-2*i.padding-a,o=n/t.length,r=[],s=i.padding+a,l=e.width-i.padding;return t.forEach(function(t,e){r.push(s+e*o)}),r.push(l),{xAxisPoints:r,startX:s,endX:l,eachSpacing:o}}function getDataPoints(t,e,i,a,n,o,r){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,l=[],h=o.height-2*r.padding-r.xAxisHeight-r.legendHeight;return t.forEach(function(t,d){var c={};c.x=a[d]+Math.round(n/2);var x=h*(t-e)/(i-e);x*=s,c.y=o.height-r.xAxisHeight-r.legendHeight-Math.round(x)-r.padding,l.push(c)}),l}function getYAxisTextList(t,e,i){var a=dataCombine(t),n="number"==typeof e.yAxis.min?e.yAxis.min:Math.min.apply(this,a),o=Math.max.apply(this,a);if(n===o){var r=o||1;n-=r,o+=r}for(var s=getDataRange(n,o),l=s.minRange,h=s.maxRange,d=[],c=(h-l)/i.yAxisSplit,x=0;x<=i.yAxisSplit;x++)d.push(l+c*x);return d.reverse()}function calYAxisData(t,e,i){var a=getYAxisTextList(t,e,i),n=i.yAxisWidth,o=a.map(function(t){return t=util.toFixed(t,2),t=e.yAxis.format?e.yAxis.format(Number(t)):t,n=Math.max(n,mesureText(t)+5),t});return e.yAxis.disabled===!0&&(n=0),{rangesFormat:o,ranges:a,yAxisWidth:n}}function drawPointShape(t,e,i,a){a.beginPath(),a.setStrokeStyle("#ffffff"),a.setLineWidth(1),a.setFillStyle(e),"diamond"===i?t.forEach(function(t,e){a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y),a.lineTo(t.x,t.y+4.5),a.lineTo(t.x+4.5,t.y),a.lineTo(t.x,t.y-4.5)}):"circle"===i?t.forEach(function(t,e){a.moveTo(t.x+3.5,t.y),a.arc(t.x,t.y,4,0,2*Math.PI,!1)}):"rect"===i?t.forEach(function(t,e){a.moveTo(t.x-3.5,t.y-3.5),a.rect(t.x-3.5,t.y-3.5,7,7)}):"triangle"===i&&t.forEach(function(t,e){a.moveTo(t.x,t.y-4.5),a.lineTo(t.x-4.5,t.y+4.5),a.lineTo(t.x+4.5,t.y+4.5),a.lineTo(t.x,t.y-4.5)}),a.closePath(),a.fill(),a.stroke()}function drawPointText(t,e,i,a){var n=e.data;a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle("#666666"),t.forEach(function(t,i){var o=e.format?e.format(n[i]):n[i];a.fillText(o,t.x-mesureText(o)/2,t.y-2)}),a.closePath(),a.stroke()}function drawPieText(t,e,i,a,n,o){var r=n+i.pieChartLinePadding,s=(r+i.pieChartTextPadding,[]),l=null,h=t.map(function(t){var e=2*Math.PI-(t._start_+2*Math.PI*t._proportion_/2),i=t.format?t.format(+t._proportion_.toFixed(2)):util.toFixed(100*t._proportion_)+"%",a=t.color;return{arc:e,text:i,color:a}});h.forEach(function(t){var e=Math.cos(t.arc)*r,a=Math.sin(t.arc)*r,o=Math.cos(t.arc)*n,h=Math.sin(t.arc)*n,d=e>=0?e+i.pieChartTextPadding:e-i.pieChartTextPadding,c=a,x=mesureText(t.text),g=c;l&&util.isSameXCoordinateArea(l.start,{x:d})&&(g=d>0?Math.min(c,l.start.y):e<0?Math.max(c,l.start.y):c>0?Math.max(c,l.start.y):Math.min(c,l.start.y)),d<0&&(d-=x);var f={lineStart:{x:o,y:h},lineEnd:{x:e,y:a},start:{x:d,y:g},width:x,height:i.fontSize,text:t.text,color:t.color};l=avoidCollision(f,l),s.push(l)}),s.forEach(function(t){var e=convertCoordinateOrigin(t.lineStart.x,t.lineStart.y,o),n=convertCoordinateOrigin(t.lineEnd.x,t.lineEnd.y,o),r=convertCoordinateOrigin(t.start.x,t.start.y,o);a.setLineWidth(1),a.setFontSize(i.fontSize),a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(t.color),a.moveTo(e.x,e.y);var s=t.start.x<0?r.x+t.width:r.x,l=t.start.x<0?r.x-5:r.x+5;a.quadraticCurveTo(n.x,n.y,s,r.y),a.moveTo(e.x,e.y),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(r.x+t.width,r.y),a.arc(s,r.y,2,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.setFillStyle("#666666"),a.fillText(t.text,l,r.y+3),a.closePath(),a.stroke(),a.closePath()})}function drawYAxisTitle(t,e,i,a){var n=i.xAxisHeight+(e.height-i.xAxisHeight-mesureText(t))/2;a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle("#333333"),a.translate(0,e.height),a.rotate(-90*Math.PI/180),a.fillText(t,n,i.padding+.5*i.fontSize),a.stroke(),a.closePath(),a.restore()}function drawColumnDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,d=r.pop(),c=r.shift();e.height-i.padding-i.xAxisHeight-i.legendHeight;t.forEach(function(o,r){var s=o.data,x=getDataPoints(s,d,c,l,h,e,i,n);x=fixColumeData(x,h,t.length,r,i),a.beginPath(),a.setFillStyle(o.color),x.forEach(function(t,n){var o=t.x-t.width/2+1,r=e.height-t.y-i.padding-i.xAxisHeight-i.legendHeight;a.moveTo(o,t.y),a.rect(o,t.y,t.width-2,r)}),a.closePath(),a.fill()}),t.forEach(function(o,r){var s=o.data,x=getDataPoints(s,d,c,l,h,e,i,n);x=fixColumeData(x,h,t.length,r,i),e.dataLabel!==!1&&1===n&&drawPointText(x,o,i,a)})}function drawAreaDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,d=r.pop(),c=r.shift(),x=e.height-i.padding-i.xAxisHeight-i.legendHeight;t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,d,c,l,h,e,i,n),g=s[0],f=s[s.length-1];if(a.beginPath(),a.setStrokeStyle(t.color),a.setFillStyle(t.color),a.setGlobalAlpha(.6),a.setLineWidth(2),a.moveTo(g.x,g.y),s.forEach(function(t,e){e>0&&a.lineTo(t.x,t.y)}),a.lineTo(f.x,x),a.lineTo(g.x,x),a.lineTo(g.x,g.y),a.closePath(),a.fill(),a.setGlobalAlpha(1),e.dataPointShape!==!1){var u=i.dataPointShape[o%i.dataPointShape.length];drawPointShape(s,t.color,u,a)}}),e.dataLabel!==!1&&1===n&&t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,d,c,l,h,e,i,n);drawPointText(s,t,i,a)})}function drawLineDataPoints(t,e,i,a){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=calYAxisData(t,e,i),r=o.ranges,s=getXAxisPoints(e.categories,e,i),l=s.xAxisPoints,h=s.eachSpacing,d=r.pop(),c=r.shift();t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,d,c,l,h,e,i,n);if(a.beginPath(),a.setStrokeStyle(t.color),a.setLineWidth(2),a.moveTo(s[0].x,s[0].y),s.forEach(function(t,e){e>0&&a.lineTo(t.x,t.y)}),a.moveTo(s[0].x,s[0].y),a.closePath(),a.stroke(),e.dataPointShape!==!1){var x=i.dataPointShape[o%i.dataPointShape.length];drawPointShape(s,t.color,x,a)}}),e.dataLabel!==!1&&1===n&&t.forEach(function(t,o){var r=t.data,s=getDataPoints(r,d,c,l,h,e,i,n);drawPointText(s,t,i,a)})}function drawXAxis(t,e,i,a){var n=getXAxisPoints(t,e,i),o=n.xAxisPoints,r=n.startX,s=n.endX,l=n.eachSpacing,h=e.height-i.padding-i.xAxisHeight-i.legendHeight,d=h+i.xAxisLineHeight;a.beginPath(),a.setStrokeStyle("#cccccc"),a.setLineWidth(1),a.moveTo(r,h),a.lineTo(s,h),e.xAxis.disableGrid!==!0&&o.forEach(function(t,e){a.moveTo(t,h),a.lineTo(t,d)}),a.closePath(),a.stroke(),0===i._xAxisTextAngle_?(a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle("#666666"),t.forEach(function(t,e){var n=l/2-mesureText(t)/2;a.fillText(t,o[e]+n,h+i.fontSize+5)}),a.closePath(),a.stroke()):t.forEach(function(t,n){a.save(),a.beginPath(),a.setFontSize(i.fontSize),a.setFillStyle("#666666");var r=mesureText(t),s=l/2-r,d=calRotateTranslate(o[n]+l/2,h+i.fontSize/2+5,e.height),c=d.transX,x=d.transY;a.rotate(-1*i._xAxisTextAngle_),a.translate(c,x),a.fillText(t,o[n]+s,h+i.fontSize+5),a.closePath(),a.stroke(),a.restore()})}function drawYAxis(t,e,i,a){if(e.yAxis.disabled!==!0){for(var n=calYAxisData(t,e,i),o=n.rangesFormat,r=i.yAxisWidth+i.yAxisTitleWidth,s=e.height-2*i.padding-i.xAxisHeight-i.legendHeight,l=Math.floor(s/i.yAxisSplit),h=i.padding+r,d=e.width-i.padding,c=(i.padding,e.height-i.padding-i.xAxisHeight-i.legendHeight),x=[],g=0;g4&&void 0!==arguments[4]?arguments[4]:1;t=getPieDataPoints(t,n);var o={x:e.width/2,y:(e.height-i.legendHeight)/2},r=Math.min(o.x-i.pieChartLinePadding-i.pieChartTextPadding-i._pieTextMaxLength_,o.y-i.pieChartLinePadding-i.pieChartTextPadding);r-=e.dataLabel?10:2*i.padding,t.forEach(function(t){a.beginPath(),a.setLineWidth(2),a.setStrokeStyle("#ffffff"),a.setFillStyle(t.color),a.moveTo(o.x,o.y),a.arc(o.x,o.y,r,t._start_,t._start_+2*t._proportion_*Math.PI),a.closePath(),a.fill(),a.stroke()}),"ring"===e.type&&(a.beginPath(),a.setFillStyle("#ffffff"),a.moveTo(o.x,o.y),a.arc(o.x,o.y,.6*r,0,2*Math.PI),a.closePath(),a.fill()),e.dataLabel!==!1&&1===n&&drawPieText(t,e,i,a,r,o)}function drawCanvas(t,e){e.draw()}function Animation(t){function e(a){if(null===a)return t.onProcess&&t.onProcess(1),void(t.onAnimationFinish&&t.onAnimationFinish());if(null===o&&(o=a),a-ot.end.x||e.end.xt.start.y||e.start.y 3 | -------------------------------------------------------------------------------- /pages/graph/index.js: -------------------------------------------------------------------------------- 1 | 2 | var _wxcharts = require('../../mars/plugins/wxcharts') 3 | 4 | Page({ 5 | data: { 6 | currtab: 0, 7 | swipertab: [{ name: '条形', index: 0 }, { name: '折线', index: 1 }, { name: '饼', index: 2 }, { name: '区域', index: 3 },] 8 | }, 9 | onLoad: function (options) { 10 | // 页面初始化 options为页面跳转所带来的参数 11 | }, 12 | onReady: function () { 13 | // 页面渲染完成 14 | this.getDeviceInfo() 15 | this.graphShow() 16 | }, 17 | 18 | /** 19 | * @Explain:获取设备信息 20 | */ 21 | getDeviceInfo: function () { 22 | let that = this 23 | wx.getSystemInfo({ 24 | success: function (res) { 25 | that.setData({ 26 | deviceW: res.windowWidth, 27 | deviceH: res.windowHeight 28 | }) 29 | } 30 | }) 31 | }, 32 | 33 | /** 34 | * @Explain:选项卡切换 35 | */ 36 | tabChange: function (e) { 37 | this.setData({ currtab: e.detail.current }) 38 | this.graphShow() 39 | }, 40 | 41 | /** 42 | * @Explain:选项卡点击切换 43 | */ 44 | tabSwitch: function (e) { 45 | var that = this 46 | if (this.data.currtab === e.target.dataset.current) { 47 | return false 48 | } else { 49 | that.setData({ 50 | currtab: e.target.dataset.current 51 | }) 52 | } 53 | }, 54 | 55 | /** 56 | * @Explain:初始化静态图表 57 | */ 58 | graphShow: function () { 59 | let that = this 60 | switch (this.data.currtab) { 61 | case 0: 62 | that.barShow() 63 | break 64 | case 1: 65 | that.lineShow() 66 | break 67 | case 2: 68 | that.pieShow() 69 | break 70 | case 3: 71 | that.areaShow() 72 | break 73 | } 74 | }, 75 | 76 | pieShow: function () { 77 | let pie = { 78 | canvasId: 'pieGraph', 79 | type: 'pie', 80 | series: [{ 81 | name: 'cat1', 82 | data: 50, 83 | }, { 84 | name: 'cat2', 85 | data: 30, 86 | }, { 87 | name: 'cat3', 88 | data: 1, 89 | }, { 90 | name: 'cat4', 91 | data: 1, 92 | }, { 93 | name: 'cat5', 94 | data: 46, 95 | }], 96 | width: 360, 97 | height: 300, 98 | dataLabel: true 99 | } 100 | new _wxcharts(pie) 101 | }, 102 | 103 | barShow: function () { 104 | let bar = { 105 | canvasId: 'barGraph', 106 | type: 'column', 107 | categories: ['2012', '2013', '2014', '2015', '2016', '2017'], 108 | series: [{ 109 | name: '成交量1', 110 | data: [15, 20, 45, 37, 4, 80] 111 | }, { 112 | name: '成交量2', 113 | data: [70, 40, 65, 100, 34, 18] 114 | }], 115 | yAxis: { 116 | format: function (val) { 117 | return val + '万'; 118 | } 119 | }, 120 | width: 320, 121 | height: 200 122 | } 123 | new _wxcharts(bar) 124 | }, 125 | 126 | lineShow: function () { 127 | let line = { 128 | canvasId: 'lineGraph', 129 | type: 'line', 130 | categories: ['2012', '2013', '2014', '2015', '2016', '2017'], 131 | series: [{ 132 | name: '成交量1', 133 | data: [0.15, 0.2, 0.45, 0.37, 0.4, 0.8], 134 | format: function (val) { 135 | return val.toFixed(2) + '万'; 136 | } 137 | }, { 138 | name: '成交量2', 139 | data: [0.30, 0.37, 0.65, 0.78, 0.69, 0.94], 140 | format: function (val) { 141 | return val.toFixed(2) + '万'; 142 | } 143 | }], 144 | yAxis: { 145 | title: '成交金额 (万元)', 146 | format: function (val) { 147 | return val.toFixed(2); 148 | }, 149 | min: 0 150 | }, 151 | width: 320, 152 | height: 200 153 | } 154 | new _wxcharts(line) 155 | }, 156 | 157 | areaShow: function () { 158 | let area = { 159 | canvasId: 'areaGraph', 160 | type: 'area', 161 | categories: ['2016-08', '2016-09', '2016-10', '2016-11', '2016-12', '2017'], 162 | series: [{ 163 | name: '成交量1', 164 | data: [70, 40, 65, 100, 34, 18], 165 | format: function (val) { 166 | return val.toFixed(2) + '万'; 167 | } 168 | }, { 169 | name: '成交量2', 170 | data: [15, 20, 45, 37, 4, 80], 171 | format: function (val) { 172 | return val.toFixed(2) + '万'; 173 | } 174 | }], 175 | yAxis: { 176 | format: function (val) { 177 | return val + '万'; 178 | } 179 | }, 180 | width: 320, 181 | height: 200 182 | } 183 | new _wxcharts(area) 184 | } 185 | 186 | }) -------------------------------------------------------------------------------- /pages/graph/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/graph/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{item.name}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{swipertab[0].name}}图 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{swipertab[1].name}}图 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | {{swipertab[2].name}}图 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | {{swipertab[3].name}}图 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /pages/graph/index.wxss: -------------------------------------------------------------------------------- 1 | .swiper-tab { 2 | height: 30px; 3 | line-height: 30px; 4 | background: #1b82d1; 5 | color: rgba(255, 255, 255, 1); 6 | display: flex; 7 | position: relative; 8 | z-index: 2; 9 | flex-direction: row; 10 | justify-content: center; 11 | align-items: center; 12 | } 13 | 14 | .swiper-tab-list { 15 | margin: 0 20px; 16 | padding: 0 4px; 17 | font-size: 28rpx; 18 | } 19 | 20 | .on { 21 | border-bottom: 2px solid #fff; 22 | color: #fff; 23 | } 24 | 25 | .title { 26 | padding: 10rpx 0 10rpx 20rpx; 27 | background-color: #fff; 28 | } 29 | 30 | .title text { 31 | border-left: 2px solid #1b82d1; 32 | padding-left: 20rpx; 33 | } 34 | 35 | .swiper-box { 36 | display: block; 37 | height: 100%; 38 | width: 100%; 39 | overflow: hidden; 40 | } 41 | 42 | swiper-item scroll-view { 43 | height: 100%; 44 | } 45 | 46 | scroll-view .canvas { 47 | width: 100%; 48 | height: 100%; 49 | margin-top: 20rpx; 50 | } 51 | -------------------------------------------------------------------------------- /pages/index/index.js: -------------------------------------------------------------------------------- 1 | 2 | import _conf from '../../mars/conf/config' 3 | 4 | Page({ 5 | data: { 6 | catelogimg:'/snap.png' 7 | }, 8 | onLoad: function (options) { 9 | // 生命周期函数--监听页面加载 10 | 11 | }, 12 | onReady: function () { 13 | // 生命周期函数--监听页面初次渲染完成 14 | 15 | }, 16 | onShareAppMessage: function () { 17 | // 用户点击右上角分享 18 | return { 19 | title: _conf.share_info.title, // 分享标题 20 | desc: _conf.share_info.desc, // 分享描述 21 | path: _conf.share_info.path // 分享路径 22 | } 23 | }, 24 | 25 | }) 26 | -------------------------------------------------------------------------------- /pages/index/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | 2 | .img-wrapper{ 3 | padding: 20rpx; 4 | } -------------------------------------------------------------------------------- /pages/users/index.js: -------------------------------------------------------------------------------- 1 | 2 | var _app = getApp() 3 | 4 | Page({ 5 | data: { 6 | menuitems: [ 7 | { text: '优惠券', url: '', icon: '/public/images/benefit.png', tips: '提示语' }, 8 | { text: '服务', url: '', icon: '/public/images/service.png', tips: '提示语' }, 9 | { text: '宠物', url: '', icon: '/public/images/cat.png', tips: '提示语' }, 10 | { text: '更多', url: '', icon: '/public/images/more.png', tips: '提示语' } 11 | ] 12 | }, 13 | onLoad: function (options) { 14 | let that = this 15 | _app.getUsrInfo(function (usrinfo) { 16 | console.log(usrinfo) 17 | that.setData({ 18 | usrinfo: usrinfo, 19 | }) 20 | }) 21 | }, 22 | onReady: function () { 23 | // 页面渲染完成 24 | }, 25 | onShow: function () { 26 | // 页面显示 27 | }, 28 | onHide: function () { 29 | // 页面隐藏 30 | }, 31 | onUnload: function () { 32 | // 页面关闭 33 | } 34 | }) -------------------------------------------------------------------------------- /pages/users/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /pages/users/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{usrinfo.nickName}} 9 | 注册 / 登录 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{item.text}} 21 | {{item.tips}} 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /pages/users/index.wxss: -------------------------------------------------------------------------------- 1 | .avatar-wrapper { 2 | background: #1b82d1; 3 | padding: 25px 0; 4 | } 5 | 6 | .avatar-wrapper .avatar { 7 | margin: 0 auto; 8 | text-align: center; 9 | } 10 | 11 | .avatar-wrapper .avatar image { 12 | width: 100px; 13 | height: 100px; 14 | } 15 | 16 | .avatar-wrapper .text { 17 | text-align: center; 18 | color: #fff; 19 | } 20 | 21 | .weui-cell__hd image { 22 | margin-right: 5px; 23 | vertical-align: middle; 24 | width: 20px; 25 | height: 20px; 26 | } 27 | 28 | .weui-cells::after{ 29 | content: none; 30 | border-bottom: none; 31 | } 32 | 33 | .weui-cells::before{ 34 | border-top: none; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /public/images/analys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/analys.png -------------------------------------------------------------------------------- /public/images/analyss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/analyss.png -------------------------------------------------------------------------------- /public/images/avatar/avatar_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/avatar/avatar_01.png -------------------------------------------------------------------------------- /public/images/benefit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/benefit.png -------------------------------------------------------------------------------- /public/images/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/cat.png -------------------------------------------------------------------------------- /public/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/home.png -------------------------------------------------------------------------------- /public/images/homes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/homes.png -------------------------------------------------------------------------------- /public/images/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/more.png -------------------------------------------------------------------------------- /public/images/service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/service.png -------------------------------------------------------------------------------- /public/images/usr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/usr.png -------------------------------------------------------------------------------- /public/images/usrs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/images/usrs.png -------------------------------------------------------------------------------- /public/style/base/fn.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/fn.wxss -------------------------------------------------------------------------------- /public/style/base/mixin/setArrow.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/mixin/setArrow.wxss -------------------------------------------------------------------------------- /public/style/base/mixin/setOnepx.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/mixin/setOnepx.wxss -------------------------------------------------------------------------------- /public/style/base/mixin/text.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/mixin/text.wxss -------------------------------------------------------------------------------- /public/style/base/reset.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | line-height: 1.6; 3 | font-family: -apple-system-font, "Helvetica Neue", sans-serif; 4 | } 5 | icon { 6 | vertical-align: middle; 7 | } 8 | -------------------------------------------------------------------------------- /public/style/base/variable/color.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/color.wxss -------------------------------------------------------------------------------- /public/style/base/variable/global.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/global.wxss -------------------------------------------------------------------------------- /public/style/base/variable/weui-button.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/weui-button.wxss -------------------------------------------------------------------------------- /public/style/base/variable/weui-cell.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/weui-cell.wxss -------------------------------------------------------------------------------- /public/style/base/variable/weui-dialog.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/weui-dialog.wxss -------------------------------------------------------------------------------- /public/style/base/variable/weui-grid.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/weui-grid.wxss -------------------------------------------------------------------------------- /public/style/base/variable/weui-msg.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/weui-msg.wxss -------------------------------------------------------------------------------- /public/style/base/variable/weui-progress.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/public/style/base/variable/weui-progress.wxss -------------------------------------------------------------------------------- /public/style/weui.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | line-height: 1.6; 3 | font-family: -apple-system-font, "Helvetica Neue", sans-serif; 4 | } 5 | 6 | icon { 7 | vertical-align: middle; 8 | } 9 | 10 | .weui-cells { 11 | position: relative; 12 | margin-top: 1.17647059em; 13 | background-color: #fff; 14 | line-height: 1.41176471; 15 | font-size: 17px; 16 | } 17 | 18 | .weui-cells:before { 19 | content: " "; 20 | position: absolute; 21 | left: 0; 22 | top: 0; 23 | right: 0; 24 | height: 1px; 25 | border-top: 1rpx solid #d9d9d9; 26 | color: #d9d9d9; 27 | } 28 | 29 | .weui-cells:after { 30 | content: " "; 31 | position: absolute; 32 | left: 0; 33 | bottom: 0; 34 | right: 0; 35 | height: 1px; 36 | border-bottom: 1rpx solid #d9d9d9; 37 | color: #d9d9d9; 38 | } 39 | 40 | .weui-cells__title { 41 | margin-top: 0.77em; 42 | margin-bottom: 0.3em; 43 | padding-left: 15px; 44 | padding-right: 15px; 45 | color: #999; 46 | font-size: 14px; 47 | } 48 | 49 | .weui-cells_after-title { 50 | margin-top: 0; 51 | } 52 | 53 | .weui-cells__tips { 54 | margin-top: 0.3em; 55 | color: #999; 56 | padding-left: 15px; 57 | padding-right: 15px; 58 | font-size: 14px; 59 | } 60 | 61 | .weui-cell { 62 | padding: 10px 15px; 63 | position: relative; 64 | display: -webkit-box; 65 | display: -webkit-flex; 66 | display: flex; 67 | -webkit-box-align: center; 68 | -webkit-align-items: center; 69 | align-items: center; 70 | } 71 | 72 | .weui-cell:before { 73 | content: " "; 74 | position: absolute; 75 | top: 0; 76 | right: 0; 77 | height: 1px; 78 | border-top: 1rpx solid #d9d9d9; 79 | color: #d9d9d9; 80 | left: 15px; 81 | } 82 | 83 | .weui-cell:first-child:before { 84 | display: none; 85 | } 86 | 87 | .weui-cell_active { 88 | background-color: #ececec; 89 | } 90 | 91 | .weui-cell_primary { 92 | -webkit-box-align: start; 93 | -webkit-align-items: flex-start; 94 | align-items: flex-start; 95 | } 96 | 97 | .weui-cell__bd { 98 | -webkit-box-flex: 1; 99 | -webkit-flex: 1; 100 | flex: 1; 101 | } 102 | 103 | .weui-cell__ft { 104 | text-align: right; 105 | color: #999; 106 | } 107 | 108 | .weui-cell_access { 109 | color: inherit; 110 | } 111 | 112 | .weui-cell__ft_in-access { 113 | padding-right: 13px; 114 | position: relative; 115 | } 116 | 117 | .weui-cell__ft_in-access:after { 118 | content: " "; 119 | display: inline-block; 120 | height: 6px; 121 | width: 6px; 122 | border-width: 1px 1px 0 0; 123 | border-color: #707070; 124 | border-style: solid; 125 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 126 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 127 | top: -2px; 128 | position: absolute; 129 | top: 50%; 130 | margin-top: -4px; 131 | right: 2px; 132 | } 133 | 134 | .weui-cell_link { 135 | color: #586c94; 136 | font-size: 14px; 137 | } 138 | 139 | .weui-cell_link:active { 140 | background-color: #ececec; 141 | } 142 | 143 | .weui-cell_link:first-child:before { 144 | display: block; 145 | } 146 | 147 | .weui-icon-radio { 148 | margin-left: 3.2px; 149 | margin-right: 3.2px; 150 | } 151 | 152 | .weui-icon-checkbox_circle, .weui-icon-checkbox_success { 153 | margin-left: 4.6px; 154 | margin-right: 4.6px; 155 | } 156 | 157 | .weui-check__label:active { 158 | background-color: #ececec; 159 | } 160 | 161 | .weui-check { 162 | position: absolute; 163 | left: -9999px; 164 | } 165 | 166 | .weui-check__hd_in-checkbox { 167 | padding-right: 0.35em; 168 | } 169 | 170 | .weui-cell__ft_in-radio { 171 | padding-left: 0.35em; 172 | } 173 | 174 | .weui-cell_input { 175 | padding-top: 0; 176 | padding-bottom: 0; 177 | } 178 | 179 | .weui-label { 180 | width: 105px; 181 | word-wrap: break-word; 182 | word-break: break-all; 183 | } 184 | 185 | .weui-input { 186 | height: 2.58823529em; 187 | min-height: 2.58823529em; 188 | line-height: 2.58823529em; 189 | } 190 | 191 | .weui-toptips { 192 | position: fixed; 193 | -webkit-transform: translateZ(0); 194 | transform: translateZ(0); 195 | top: 0; 196 | left: 0; 197 | right: 0; 198 | padding: 5px; 199 | font-size: 14px; 200 | text-align: center; 201 | color: #fff; 202 | z-index: 5000; 203 | word-wrap: break-word; 204 | word-break: break-all; 205 | } 206 | 207 | .weui-toptips_warn { 208 | background-color: #e64340; 209 | } 210 | 211 | .weui-textarea { 212 | display: block; 213 | width: 100%; 214 | } 215 | 216 | .weui-textarea-counter { 217 | color: #b2b2b2; 218 | text-align: right; 219 | } 220 | 221 | .weui-textarea-counter_warn { 222 | color: #e64340; 223 | } 224 | 225 | .weui-cell_warn { 226 | color: #e64340; 227 | } 228 | 229 | .weui-form-preview { 230 | position: relative; 231 | background-color: #fff; 232 | } 233 | 234 | .weui-form-preview:before { 235 | content: " "; 236 | position: absolute; 237 | left: 0; 238 | top: 0; 239 | right: 0; 240 | height: 1px; 241 | border-top: 1rpx solid #d9d9d9; 242 | color: #d9d9d9; 243 | } 244 | 245 | .weui-form-preview:after { 246 | content: " "; 247 | position: absolute; 248 | left: 0; 249 | bottom: 0; 250 | right: 0; 251 | height: 1px; 252 | border-bottom: 1rpx solid #d9d9d9; 253 | color: #d9d9d9; 254 | } 255 | 256 | .weui-form-preview__value { 257 | font-size: 14px; 258 | } 259 | 260 | .weui-form-preview__value_in-hd { 261 | font-size: 26px; 262 | } 263 | 264 | .weui-form-preview__hd { 265 | position: relative; 266 | padding: 10px 15px; 267 | text-align: right; 268 | line-height: 2.5em; 269 | } 270 | 271 | .weui-form-preview__hd:after { 272 | content: " "; 273 | position: absolute; 274 | bottom: 0; 275 | right: 0; 276 | height: 1px; 277 | border-bottom: 1rpx solid #d9d9d9; 278 | color: #d9d9d9; 279 | left: 15px; 280 | } 281 | 282 | .weui-form-preview__bd { 283 | padding: 10px 15px; 284 | font-size: 0.9em; 285 | text-align: right; 286 | color: #999; 287 | line-height: 2; 288 | } 289 | 290 | .weui-form-preview__ft { 291 | position: relative; 292 | line-height: 50px; 293 | display: -webkit-box; 294 | display: -webkit-flex; 295 | display: flex; 296 | } 297 | 298 | .weui-form-preview__ft:after { 299 | content: " "; 300 | position: absolute; 301 | left: 0; 302 | top: 0; 303 | right: 0; 304 | height: 1px; 305 | border-top: 1rpx solid #d5d5d6; 306 | color: #d5d5d6; 307 | } 308 | 309 | .weui-form-preview__item { 310 | overflow: hidden; 311 | } 312 | 313 | .weui-form-preview__label { 314 | float: left; 315 | margin-right: 1em; 316 | min-width: 4em; 317 | color: #999; 318 | text-align: justify; 319 | text-align-last: justify; 320 | } 321 | 322 | .weui-form-preview__value { 323 | display: block; 324 | overflow: hidden; 325 | word-break: normal; 326 | word-wrap: break-word; 327 | } 328 | 329 | .weui-form-preview__btn { 330 | position: relative; 331 | display: block; 332 | -webkit-box-flex: 1; 333 | -webkit-flex: 1; 334 | flex: 1; 335 | color: #3cc51f; 336 | text-align: center; 337 | } 338 | 339 | .weui-form-preview__btn:after { 340 | content: " "; 341 | position: absolute; 342 | left: 0; 343 | top: 0; 344 | width: 1px; 345 | bottom: 0; 346 | border-left: 1rpx solid #d5d5d6; 347 | color: #d5d5d6; 348 | } 349 | 350 | .weui-form-preview__btn:first-child:after { 351 | display: none; 352 | } 353 | 354 | .weui-form-preview__btn_active { 355 | background-color: #eee; 356 | } 357 | 358 | .weui-form-preview__btn_default { 359 | color: #999; 360 | } 361 | 362 | .weui-form-preview__btn_primary { 363 | color: #0bb20c; 364 | } 365 | 366 | .weui-cell_select { 367 | padding: 0; 368 | } 369 | 370 | .weui-select { 371 | position: relative; 372 | padding-left: 15px; 373 | padding-right: 30px; 374 | height: 2.58823529em; 375 | min-height: 2.58823529em; 376 | line-height: 2.58823529em; 377 | border-right: 1rpx solid #d9d9d9; 378 | } 379 | 380 | .weui-select:before { 381 | content: " "; 382 | display: inline-block; 383 | height: 6px; 384 | width: 6px; 385 | border-width: 2px 2px 0 0; 386 | border-color: #c8c8cd; 387 | border-style: solid; 388 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 389 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 390 | top: -2px; 391 | position: absolute; 392 | top: 50%; 393 | right: 15px; 394 | margin-top: -4px; 395 | } 396 | 397 | .weui-select_in-select-after { 398 | padding-left: 0; 399 | } 400 | 401 | .weui-cell__hd_in-select-after, .weui-cell__bd_in-select-before { 402 | padding-left: 15px; 403 | } 404 | 405 | .weui-cell_vcode { 406 | padding-right: 0; 407 | } 408 | 409 | .weui-vcode-img { 410 | margin-left: 5px; 411 | height: 2.58823529em; 412 | vertical-align: middle; 413 | } 414 | 415 | .weui-vcode-btn { 416 | display: inline-block; 417 | height: 2.58823529em; 418 | margin-left: 5px; 419 | padding: 0 0.6em 0 0.7em; 420 | border-left: 1px solid #e5e5e5; 421 | line-height: 2.58823529em; 422 | vertical-align: middle; 423 | font-size: 17px; 424 | color: #3cc51f; 425 | white-space: nowrap; 426 | } 427 | 428 | .weui-vcode-btn:active { 429 | color: #52a341; 430 | } 431 | 432 | .weui-cell_switch { 433 | padding-top: 6px; 434 | padding-bottom: 6px; 435 | } 436 | 437 | .weui-uploader__hd { 438 | display: -webkit-box; 439 | display: -webkit-flex; 440 | display: flex; 441 | padding-bottom: 10px; 442 | -webkit-box-align: center; 443 | -webkit-align-items: center; 444 | align-items: center; 445 | } 446 | 447 | .weui-uploader__title { 448 | -webkit-box-flex: 1; 449 | -webkit-flex: 1; 450 | flex: 1; 451 | } 452 | 453 | .weui-uploader__info { 454 | color: #b2b2b2; 455 | } 456 | 457 | .weui-uploader__bd { 458 | margin-bottom: -4px; 459 | margin-right: -9px; 460 | overflow: hidden; 461 | } 462 | 463 | .weui-uploader__file { 464 | float: left; 465 | margin-right: 9px; 466 | margin-bottom: 9px; 467 | } 468 | 469 | .weui-uploader__img { 470 | display: block; 471 | width: 79px; 472 | height: 79px; 473 | } 474 | 475 | .weui-uploader__file_status { 476 | position: relative; 477 | } 478 | 479 | .weui-uploader__file_status:before { 480 | content: " "; 481 | position: absolute; 482 | top: 0; 483 | right: 0; 484 | bottom: 0; 485 | left: 0; 486 | background-color: rgba(0, 0, 0, 0.5); 487 | } 488 | 489 | .weui-uploader__file-content { 490 | position: absolute; 491 | top: 50%; 492 | left: 50%; 493 | -webkit-transform: translate(-50%, -50%); 494 | transform: translate(-50%, -50%); 495 | color: #fff; 496 | } 497 | 498 | .weui-uploader__input-box { 499 | float: left; 500 | position: relative; 501 | margin-right: 9px; 502 | margin-bottom: 9px; 503 | width: 77px; 504 | height: 77px; 505 | border: 1px solid #d9d9d9; 506 | } 507 | 508 | .weui-uploader__input-box:before, .weui-uploader__input-box:after { 509 | content: " "; 510 | position: absolute; 511 | top: 50%; 512 | left: 50%; 513 | -webkit-transform: translate(-50%, -50%); 514 | transform: translate(-50%, -50%); 515 | background-color: #d9d9d9; 516 | } 517 | 518 | .weui-uploader__input-box:before { 519 | width: 2px; 520 | height: 39.5px; 521 | } 522 | 523 | .weui-uploader__input-box:after { 524 | width: 39.5px; 525 | height: 2px; 526 | } 527 | 528 | .weui-uploader__input-box:active { 529 | border-color: #999; 530 | } 531 | 532 | .weui-uploader__input-box:active:before, .weui-uploader__input-box:active:after { 533 | background-color: #999; 534 | } 535 | 536 | .weui-uploader__input { 537 | position: absolute; 538 | z-index: 1; 539 | top: 0; 540 | left: 0; 541 | width: 100%; 542 | height: 100%; 543 | opacity: 0; 544 | } 545 | 546 | .weui-article { 547 | padding: 20px 15px; 548 | font-size: 15px; 549 | } 550 | 551 | .weui-article__section { 552 | margin-bottom: 1.5em; 553 | } 554 | 555 | .weui-article__h1 { 556 | font-size: 18px; 557 | font-weight: 400; 558 | margin-bottom: 0.9em; 559 | } 560 | 561 | .weui-article__h2 { 562 | font-size: 16px; 563 | font-weight: 400; 564 | margin-bottom: 0.34em; 565 | } 566 | 567 | .weui-article__h3 { 568 | font-weight: 400; 569 | font-size: 15px; 570 | margin-bottom: 0.34em; 571 | } 572 | 573 | .weui-article__p { 574 | margin: 0 0 0.8em; 575 | } 576 | 577 | .weui-msg { 578 | padding-top: 36px; 579 | text-align: center; 580 | } 581 | 582 | .weui-msg__link { 583 | display: inline; 584 | color: #586c94; 585 | } 586 | 587 | .weui-msg__icon-area { 588 | margin-bottom: 30px; 589 | } 590 | 591 | .weui-msg__text-area { 592 | margin-bottom: 25px; 593 | padding: 0 20px; 594 | } 595 | 596 | .weui-msg__title { 597 | margin-bottom: 5px; 598 | font-weight: 400; 599 | font-size: 20px; 600 | } 601 | 602 | .weui-msg__desc { 603 | font-size: 14px; 604 | color: #999; 605 | } 606 | 607 | .weui-msg__opr-area { 608 | margin-bottom: 25px; 609 | } 610 | 611 | .weui-msg__extra-area { 612 | margin-bottom: 15px; 613 | font-size: 14px; 614 | color: #999; 615 | } 616 | 617 | @media screen and (min-height: 438px) { 618 | .weui-msg__extra-area { 619 | position: fixed; 620 | left: 0; 621 | bottom: 0; 622 | width: 100%; 623 | text-align: center; 624 | } 625 | } 626 | 627 | .weui-flex { 628 | display: -webkit-box; 629 | display: -webkit-flex; 630 | display: flex; 631 | } 632 | 633 | .weui-flex__item { 634 | -webkit-box-flex: 1; 635 | -webkit-flex: 1; 636 | flex: 1; 637 | } 638 | 639 | .weui-btn { 640 | margin-top: 15px; 641 | } 642 | 643 | .weui-btn:first-child { 644 | margin-top: 0; 645 | } 646 | 647 | .weui-btn-area { 648 | margin: 1.17647059em 15px 0.3em; 649 | } 650 | 651 | .weui-agree { 652 | display: block; 653 | padding: 0.5em 15px; 654 | font-size: 13px; 655 | } 656 | 657 | .weui-agree__text { 658 | color: #999; 659 | } 660 | 661 | .weui-agree__link { 662 | display: inline; 663 | color: #586c94; 664 | } 665 | 666 | .weui-agree__checkbox { 667 | position: absolute; 668 | left: -9999px; 669 | } 670 | 671 | .weui-agree__checkbox-icon { 672 | position: relative; 673 | top: 2px; 674 | display: inline-block; 675 | border: 1px solid #d1d1d1; 676 | background-color: #fff; 677 | border-radius: 3px; 678 | width: 11px; 679 | height: 11px; 680 | } 681 | 682 | .weui-agree__checkbox-icon-check { 683 | position: absolute; 684 | top: 1px; 685 | left: 1px; 686 | } 687 | 688 | .weui-footer { 689 | color: #999; 690 | font-size: 14px; 691 | text-align: center; 692 | } 693 | 694 | .weui-footer_fixed-bottom { 695 | position: fixed; 696 | bottom: 0.52em; 697 | left: 0; 698 | right: 0; 699 | } 700 | 701 | .weui-footer__links { 702 | font-size: 0; 703 | } 704 | 705 | .weui-footer__link { 706 | display: inline-block; 707 | vertical-align: top; 708 | margin: 0 0.62em; 709 | position: relative; 710 | font-size: 14px; 711 | color: #586c94; 712 | } 713 | 714 | .weui-footer__link:before { 715 | content: " "; 716 | position: absolute; 717 | left: 0; 718 | width: 1px; 719 | border-left: 1rpx solid #c7c7c7; 720 | color: #c7c7c7; 721 | left: -0.65em; 722 | top: 0.36em; 723 | bottom: 0.36em; 724 | } 725 | 726 | .weui-footer__link:first-child:before { 727 | display: none; 728 | } 729 | 730 | .weui-footer__text { 731 | padding: 0 0.34em; 732 | font-size: 12px; 733 | } 734 | 735 | .weui-grids { 736 | border-top: 1rpx solid #d9d9d9; 737 | border-left: 1rpx solid #d9d9d9; 738 | overflow: hidden; 739 | } 740 | 741 | .weui-grid { 742 | position: relative; 743 | float: left; 744 | padding: 20px 10px; 745 | width: 33.33333333%; 746 | box-sizing: border-box; 747 | border-right: 1rpx solid #d9d9d9; 748 | border-bottom: 1rpx solid #d9d9d9; 749 | } 750 | 751 | .weui-grid_active { 752 | background-color: #ececec; 753 | } 754 | 755 | .weui-grid__icon { 756 | display: block; 757 | width: 28px; 758 | height: 28px; 759 | margin: 0 auto; 760 | } 761 | 762 | .weui-grid__label { 763 | margin-top: 5px; 764 | display: block; 765 | text-align: center; 766 | color: #000; 767 | font-size: 14px; 768 | white-space: nowrap; 769 | text-overflow: ellipsis; 770 | overflow: hidden; 771 | } 772 | 773 | .weui-loading { 774 | margin: 0 5px; 775 | width: 20px; 776 | height: 20px; 777 | display: inline-block; 778 | vertical-align: middle; 779 | -webkit-animation: weuiLoading 1s steps(12, end) infinite; 780 | animation: weuiLoading 1s steps(12, end) infinite; 781 | background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat; 782 | background-size: 100%; 783 | } 784 | 785 | @-webkit-keyframes weuiLoading { 786 | 0% { 787 | -webkit-transform: rotate3d(0, 0, 1, 0deg); 788 | transform: rotate3d(0, 0, 1, 0deg); 789 | } 790 | 791 | 100% { 792 | -webkit-transform: rotate3d(0, 0, 1, 360deg); 793 | transform: rotate3d(0, 0, 1, 360deg); 794 | } 795 | } 796 | 797 | @keyframes weuiLoading { 798 | 0% { 799 | -webkit-transform: rotate3d(0, 0, 1, 0deg); 800 | transform: rotate3d(0, 0, 1, 0deg); 801 | } 802 | 803 | 100% { 804 | -webkit-transform: rotate3d(0, 0, 1, 360deg); 805 | transform: rotate3d(0, 0, 1, 360deg); 806 | } 807 | } 808 | 809 | .weui-badge { 810 | display: inline-block; 811 | padding: 0.15em 0.4em; 812 | min-width: 8px; 813 | border-radius: 18px; 814 | background-color: #f43530; 815 | color: #fff; 816 | line-height: 1.2; 817 | text-align: center; 818 | font-size: 12px; 819 | vertical-align: middle; 820 | } 821 | 822 | .weui-badge_dot { 823 | padding: 0.4em; 824 | min-width: 0; 825 | } 826 | 827 | .weui-loadmore { 828 | width: 65%; 829 | margin: 1.5em auto; 830 | line-height: 1.6em; 831 | font-size: 14px; 832 | text-align: center; 833 | } 834 | 835 | .weui-loadmore__tips { 836 | display: inline-block; 837 | vertical-align: middle; 838 | } 839 | 840 | .weui-loadmore_line { 841 | border-top: 1px solid #e5e5e5; 842 | margin-top: 2.4em; 843 | } 844 | 845 | .weui-loadmore__tips_in-line { 846 | position: relative; 847 | top: -0.9em; 848 | padding: 0 0.55em; 849 | background-color: #fff; 850 | color: #999; 851 | } 852 | 853 | .weui-loadmore__tips_in-dot { 854 | position: relative; 855 | padding: 0 0.16em; 856 | width: 4px; 857 | height: 1.6em; 858 | } 859 | 860 | .weui-loadmore__tips_in-dot:before { 861 | content: " "; 862 | position: absolute; 863 | top: 50%; 864 | left: 50%; 865 | margin-top: -1px; 866 | margin-left: -2px; 867 | width: 4px; 868 | height: 4px; 869 | border-radius: 50%; 870 | background-color: #e5e5e5; 871 | } 872 | 873 | .weui-panel { 874 | background-color: #fff; 875 | margin-top: 10px; 876 | position: relative; 877 | overflow: hidden; 878 | } 879 | 880 | .weui-panel:first-child { 881 | margin-top: 0; 882 | } 883 | 884 | .weui-panel:before { 885 | content: " "; 886 | position: absolute; 887 | left: 0; 888 | top: 0; 889 | right: 0; 890 | height: 1px; 891 | border-top: 1rpx solid #e5e5e5; 892 | color: #e5e5e5; 893 | } 894 | 895 | .weui-panel:after { 896 | content: " "; 897 | position: absolute; 898 | left: 0; 899 | bottom: 0; 900 | right: 0; 901 | height: 1px; 902 | border-bottom: 1rpx solid #e5e5e5; 903 | color: #e5e5e5; 904 | } 905 | 906 | .weui-panel__hd { 907 | padding: 14px 15px 10px; 908 | color: #999; 909 | font-size: 13px; 910 | position: relative; 911 | } 912 | 913 | .weui-panel__hd:after { 914 | content: " "; 915 | position: absolute; 916 | bottom: 0; 917 | right: 0; 918 | height: 1px; 919 | border-bottom: 1rpx solid #e5e5e5; 920 | color: #e5e5e5; 921 | left: 15px; 922 | } 923 | 924 | .weui-media-box { 925 | padding: 15px; 926 | position: relative; 927 | } 928 | 929 | .weui-media-box:before { 930 | content: " "; 931 | position: absolute; 932 | top: 0; 933 | right: 0; 934 | height: 1px; 935 | border-top: 1rpx solid #e5e5e5; 936 | color: #e5e5e5; 937 | left: 15px; 938 | } 939 | 940 | .weui-media-box:first-child:before { 941 | display: none; 942 | } 943 | 944 | .weui-media-box__title { 945 | font-weight: 400; 946 | font-size: 17px; 947 | width: auto; 948 | overflow: hidden; 949 | text-overflow: ellipsis; 950 | white-space: nowrap; 951 | word-wrap: break-word; 952 | word-break: break-all; 953 | } 954 | 955 | .weui-media-box__desc { 956 | color: #999; 957 | font-size: 13px; 958 | line-height: 1.2; 959 | overflow: hidden; 960 | text-overflow: ellipsis; 961 | display: -webkit-box; 962 | -webkit-box-orient: vertical; 963 | -webkit-line-clamp: 2; 964 | } 965 | 966 | .weui-media-box__info { 967 | margin-top: 15px; 968 | padding-bottom: 5px; 969 | font-size: 13px; 970 | color: #cecece; 971 | line-height: 1em; 972 | list-style: none; 973 | overflow: hidden; 974 | } 975 | 976 | .weui-media-box__info__meta { 977 | float: left; 978 | padding-right: 1em; 979 | } 980 | 981 | .weui-media-box__info__meta_extra { 982 | padding-left: 1em; 983 | border-left: 1px solid #cecece; 984 | } 985 | 986 | .weui-media-box__title_in-text { 987 | margin-bottom: 8px; 988 | } 989 | 990 | .weui-media-box_appmsg { 991 | display: -webkit-box; 992 | display: -webkit-flex; 993 | display: flex; 994 | -webkit-box-align: center; 995 | -webkit-align-items: center; 996 | align-items: center; 997 | } 998 | 999 | .weui-media-box__thumb { 1000 | width: 100%; 1001 | height: 100%; 1002 | vertical-align: top; 1003 | } 1004 | 1005 | .weui-media-box__hd_in-appmsg { 1006 | margin-right: 0.8em; 1007 | width: 60px; 1008 | height: 60px; 1009 | line-height: 60px; 1010 | text-align: center; 1011 | } 1012 | 1013 | .weui-media-box__bd_in-appmsg { 1014 | -webkit-box-flex: 1; 1015 | -webkit-flex: 1; 1016 | flex: 1; 1017 | min-width: 0; 1018 | } 1019 | 1020 | .weui-media-box_small-appmsg { 1021 | padding: 0; 1022 | } 1023 | 1024 | .weui-cells_in-small-appmsg { 1025 | margin-top: 0; 1026 | } 1027 | 1028 | .weui-cells_in-small-appmsg:before { 1029 | display: none; 1030 | } 1031 | 1032 | .weui-progress { 1033 | display: -webkit-box; 1034 | display: -webkit-flex; 1035 | display: flex; 1036 | -webkit-box-align: center; 1037 | -webkit-align-items: center; 1038 | align-items: center; 1039 | } 1040 | 1041 | .weui-progress__bar { 1042 | -webkit-box-flex: 1; 1043 | -webkit-flex: 1; 1044 | flex: 1; 1045 | } 1046 | 1047 | .weui-progress__opr { 1048 | margin-left: 15px; 1049 | font-size: 0; 1050 | } 1051 | 1052 | .weui-navbar { 1053 | display: -webkit-box; 1054 | display: -webkit-flex; 1055 | display: flex; 1056 | position: absolute; 1057 | z-index: 500; 1058 | top: 0; 1059 | width: 100%; 1060 | border-bottom: 1rpx solid #ccc; 1061 | } 1062 | 1063 | .weui-navbar__item { 1064 | position: relative; 1065 | display: block; 1066 | -webkit-box-flex: 1; 1067 | -webkit-flex: 1; 1068 | flex: 1; 1069 | padding: 13px 0; 1070 | text-align: center; 1071 | font-size: 0; 1072 | } 1073 | 1074 | .weui-navbar__item.weui-bar__item_on { 1075 | color: #1aad19; 1076 | } 1077 | 1078 | .weui-navbar__slider { 1079 | position: absolute; 1080 | content: " "; 1081 | left: 0; 1082 | bottom: 0; 1083 | width: 6em; 1084 | height: 3px; 1085 | background-color: #1aad19; 1086 | -webkit-transition: -webkit-transform 0.3s; 1087 | transition: -webkit-transform 0.3s; 1088 | transition: transform 0.3s, -webkit-transform 0.3s; 1089 | } 1090 | 1091 | .weui-navbar__title { 1092 | display: inline-block; 1093 | font-size: 15px; 1094 | max-width: 8em; 1095 | width: auto; 1096 | overflow: hidden; 1097 | text-overflow: ellipsis; 1098 | white-space: nowrap; 1099 | word-wrap: normal; 1100 | } 1101 | 1102 | .weui-tab { 1103 | position: relative; 1104 | height: 100%; 1105 | } 1106 | 1107 | .weui-tab__panel { 1108 | box-sizing: border-box; 1109 | height: 100%; 1110 | padding-top: 50px; 1111 | overflow: auto; 1112 | -webkit-overflow-scrolling: touch; 1113 | } 1114 | 1115 | .weui-search-bar { 1116 | position: relative; 1117 | padding: 8px 10px; 1118 | display: -webkit-box; 1119 | display: -webkit-flex; 1120 | display: flex; 1121 | box-sizing: border-box; 1122 | background-color: #efeff4; 1123 | border-top: 1rpx solid #d7d6dc; 1124 | border-bottom: 1rpx solid #d7d6dc; 1125 | } 1126 | 1127 | .weui-icon-search { 1128 | margin-right: 8px; 1129 | font-size: inherit; 1130 | } 1131 | 1132 | .weui-icon-search_in-box { 1133 | position: absolute; 1134 | left: 10px; 1135 | top: 7px; 1136 | } 1137 | 1138 | .weui-search-bar__text { 1139 | display: inline-block; 1140 | font-size: 14px; 1141 | vertical-align: middle; 1142 | } 1143 | 1144 | .weui-search-bar__form { 1145 | position: relative; 1146 | -webkit-box-flex: 1; 1147 | -webkit-flex: auto; 1148 | flex: auto; 1149 | border-radius: 5px; 1150 | background: #fff; 1151 | border: 1rpx solid #e6e6ea; 1152 | } 1153 | 1154 | .weui-search-bar__box { 1155 | position: relative; 1156 | padding-left: 30px; 1157 | padding-right: 30px; 1158 | width: 100%; 1159 | box-sizing: border-box; 1160 | z-index: 1; 1161 | } 1162 | 1163 | .weui-search-bar__input { 1164 | height: 28px; 1165 | line-height: 28px; 1166 | font-size: 14px; 1167 | } 1168 | 1169 | .weui-icon-clear { 1170 | position: absolute; 1171 | top: 0; 1172 | right: 0; 1173 | padding: 7px 8px; 1174 | font-size: 0; 1175 | } 1176 | 1177 | .weui-search-bar__label { 1178 | position: absolute; 1179 | top: 0; 1180 | right: 0; 1181 | bottom: 0; 1182 | left: 0; 1183 | z-index: 2; 1184 | border-radius: 3px; 1185 | text-align: center; 1186 | color: #9b9b9b; 1187 | background: #fff; 1188 | line-height: 28px; 1189 | } 1190 | 1191 | .weui-search-bar__cancel-btn { 1192 | margin-left: 10px; 1193 | line-height: 28px; 1194 | color: #09bb07; 1195 | white-space: nowrap; 1196 | } 1197 | -------------------------------------------------------------------------------- /public/style/widget/weui-agree/weui-agree.wxss: -------------------------------------------------------------------------------- 1 | .weui-agree { 2 | display: block; 3 | padding: .5em 15px; 4 | font-size: 13px; 5 | } 6 | .weui-agree__text { 7 | color: #999999; 8 | } 9 | .weui-agree__link { 10 | display: inline; 11 | color: #586C94; 12 | } 13 | .weui-agree__checkbox { 14 | position: absolute; 15 | left: -9999px; 16 | } 17 | .weui-agree__checkbox-icon { 18 | position: relative; 19 | top: 2px; 20 | display: inline-block; 21 | border: 1px solid #D1D1D1; 22 | background-color: #FFFFFF; 23 | border-radius: 3px; 24 | width: 11px; 25 | height: 11px; 26 | } 27 | .weui-agree__checkbox-icon-check { 28 | position: absolute; 29 | top: 1px; 30 | left: 1px; 31 | } 32 | -------------------------------------------------------------------------------- /public/style/widget/weui-animate/weui-animate.wxss: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes slideUp { 2 | from { 3 | -webkit-transform: translate3d(0, 100%, 0); 4 | transform: translate3d(0, 100%, 0); 5 | } 6 | to { 7 | -webkit-transform: translate3d(0, 0, 0); 8 | transform: translate3d(0, 0, 0); 9 | } 10 | } 11 | @keyframes slideUp { 12 | from { 13 | -webkit-transform: translate3d(0, 100%, 0); 14 | transform: translate3d(0, 100%, 0); 15 | } 16 | to { 17 | -webkit-transform: translate3d(0, 0, 0); 18 | transform: translate3d(0, 0, 0); 19 | } 20 | } 21 | .weui-animate-slide-up { 22 | -webkit-animation: slideUp ease .3s forwards; 23 | animation: slideUp ease .3s forwards; 24 | } 25 | @-webkit-keyframes slideDown { 26 | from { 27 | -webkit-transform: translate3d(0, 0, 0); 28 | transform: translate3d(0, 0, 0); 29 | } 30 | to { 31 | -webkit-transform: translate3d(0, 100%, 0); 32 | transform: translate3d(0, 100%, 0); 33 | } 34 | } 35 | @keyframes slideDown { 36 | from { 37 | -webkit-transform: translate3d(0, 0, 0); 38 | transform: translate3d(0, 0, 0); 39 | } 40 | to { 41 | -webkit-transform: translate3d(0, 100%, 0); 42 | transform: translate3d(0, 100%, 0); 43 | } 44 | } 45 | .weui-animate-slide-down { 46 | -webkit-animation: slideDown ease .3s forwards; 47 | animation: slideDown ease .3s forwards; 48 | } 49 | @-webkit-keyframes fadeIn { 50 | from { 51 | opacity: 0; 52 | } 53 | to { 54 | opacity: 1; 55 | } 56 | } 57 | @keyframes fadeIn { 58 | from { 59 | opacity: 0; 60 | } 61 | to { 62 | opacity: 1; 63 | } 64 | } 65 | .weui-animate-fade-in { 66 | -webkit-animation: fadeIn ease .3s forwards; 67 | animation: fadeIn ease .3s forwards; 68 | } 69 | @-webkit-keyframes fadeOut { 70 | from { 71 | opacity: 1; 72 | } 73 | to { 74 | opacity: 0; 75 | } 76 | } 77 | @keyframes fadeOut { 78 | from { 79 | opacity: 1; 80 | } 81 | to { 82 | opacity: 0; 83 | } 84 | } 85 | .weui-animate-fade-out { 86 | -webkit-animation: fadeOut ease .3s forwards; 87 | animation: fadeOut ease .3s forwards; 88 | } 89 | -------------------------------------------------------------------------------- /public/style/widget/weui-button/weui-button.wxss: -------------------------------------------------------------------------------- 1 | .weui-btn { 2 | margin-top: 15px; 3 | } 4 | .weui-btn:first-child { 5 | margin-top: 0; 6 | } 7 | .weui-btn-area { 8 | margin: 1.17647059em 15px 0.3em; 9 | } 10 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-access.wxss: -------------------------------------------------------------------------------- 1 | .weui-cell_access { 2 | color: inherit; 3 | } 4 | .weui-cell__ft_in-access { 5 | padding-right: 13px; 6 | position: relative; 7 | } 8 | .weui-cell__ft_in-access:after { 9 | content: " "; 10 | display: inline-block; 11 | height: 6px; 12 | width: 6px; 13 | border-width: 2px 2px 0 0; 14 | border-color: #C8C8CD; 15 | border-style: solid; 16 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 17 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 18 | position: relative; 19 | top: -2px; 20 | position: absolute; 21 | top: 50%; 22 | margin-top: -4px; 23 | right: 2px; 24 | } 25 | .weui-cell_link { 26 | color: #586C94; 27 | font-size: 14px; 28 | } 29 | .weui-cell_link:active { 30 | background-color: #ECECEC; 31 | } 32 | .weui-cell_link:first-child:before { 33 | display: block; 34 | } 35 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-cell.wxss: -------------------------------------------------------------------------------- 1 | .weui-cells { 2 | position: relative; 3 | margin-top: 1.17647059em; 4 | background-color: #FFFFFF; 5 | line-height: 1.41176471; 6 | font-size: 17px; 7 | } 8 | .weui-cells:before { 9 | content: " "; 10 | position: absolute; 11 | left: 0; 12 | top: 0; 13 | right: 0; 14 | height: 1px; 15 | border-top: 1rpx solid #D9D9D9; 16 | color: #D9D9D9; 17 | } 18 | .weui-cells:after { 19 | content: " "; 20 | position: absolute; 21 | left: 0; 22 | bottom: 0; 23 | right: 0; 24 | height: 1px; 25 | border-bottom: 1rpx solid #D9D9D9; 26 | color: #D9D9D9; 27 | } 28 | .weui-cells__title { 29 | margin-top: .77em; 30 | margin-bottom: .3em; 31 | padding-left: 15px; 32 | padding-right: 15px; 33 | color: #999999; 34 | font-size: 14px; 35 | } 36 | .weui-cells_after-title { 37 | margin-top: 0; 38 | } 39 | .weui-cells__tips { 40 | margin-top: .3em; 41 | color: #999999; 42 | padding-left: 15px; 43 | padding-right: 15px; 44 | font-size: 14px; 45 | } 46 | .weui-cell { 47 | padding: 10px 15px; 48 | position: relative; 49 | display: -webkit-box; 50 | display: -webkit-flex; 51 | display: flex; 52 | -webkit-box-align: center; 53 | -webkit-align-items: center; 54 | align-items: center; 55 | } 56 | .weui-cell:before { 57 | content: " "; 58 | position: absolute; 59 | left: 0; 60 | top: 0; 61 | right: 0; 62 | height: 1px; 63 | border-top: 1rpx solid #D9D9D9; 64 | color: #D9D9D9; 65 | left: 15px; 66 | } 67 | .weui-cell:first-child:before { 68 | display: none; 69 | } 70 | .weui-cell_active { 71 | background-color: #ECECEC; 72 | } 73 | .weui-cell_primary { 74 | -webkit-box-align: start; 75 | -webkit-align-items: flex-start; 76 | align-items: flex-start; 77 | } 78 | .weui-cell__bd { 79 | -webkit-box-flex: 1; 80 | -webkit-flex: 1; 81 | flex: 1; 82 | } 83 | .weui-cell__ft { 84 | text-align: right; 85 | color: #999999; 86 | } 87 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-check.wxss: -------------------------------------------------------------------------------- 1 | .weui-icon-radio { 2 | margin-left: 3.2px; 3 | margin-right: 3.2px; 4 | } 5 | .weui-icon-checkbox_circle, 6 | .weui-icon-checkbox_success { 7 | margin-left: 4.6px; 8 | margin-right: 4.6px; 9 | } 10 | .weui-check__label:active { 11 | background-color: #ECECEC; 12 | } 13 | .weui-check { 14 | position: absolute; 15 | left: -9999px; 16 | } 17 | .weui-check__hd_in-checkbox { 18 | padding-right: 0.35em; 19 | } 20 | .weui-cell__ft_in-radio { 21 | padding-left: 0.35em; 22 | } 23 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-form.wxss: -------------------------------------------------------------------------------- 1 | .weui-cell_input { 2 | padding-top: 0; 3 | padding-bottom: 0; 4 | } 5 | .weui-label { 6 | width: 105px; 7 | word-wrap: break-word; 8 | word-break: break-all; 9 | } 10 | .weui-input { 11 | height: 2.58823529em; 12 | min-height: 2.58823529em; 13 | line-height: 2.58823529em; 14 | } 15 | .weui-toptips { 16 | position: fixed; 17 | -webkit-transform: translateZ(0); 18 | transform: translateZ(0); 19 | top: 0; 20 | left: 0; 21 | right: 0; 22 | padding: 5px; 23 | font-size: 14px; 24 | text-align: center; 25 | color: #FFFFFF; 26 | z-index: 5000; 27 | word-wrap: break-word; 28 | word-break: break-all; 29 | } 30 | .weui-toptips_warn { 31 | background-color: #E64340; 32 | } 33 | .weui-textarea { 34 | display: block; 35 | width: 100%; 36 | } 37 | .weui-textarea-counter { 38 | color: #B2B2B2; 39 | text-align: right; 40 | } 41 | .weui-textarea-counter_warn { 42 | color: #E64340; 43 | } 44 | .weui-cell_warn { 45 | color: #E64340; 46 | } 47 | .weui-form-preview { 48 | position: relative; 49 | background-color: #FFFFFF; 50 | } 51 | .weui-form-preview:before { 52 | content: " "; 53 | position: absolute; 54 | left: 0; 55 | top: 0; 56 | right: 0; 57 | height: 1px; 58 | border-top: 1rpx solid #D9D9D9; 59 | color: #D9D9D9; 60 | } 61 | .weui-form-preview:after { 62 | content: " "; 63 | position: absolute; 64 | left: 0; 65 | bottom: 0; 66 | right: 0; 67 | height: 1px; 68 | border-bottom: 1rpx solid #D9D9D9; 69 | color: #D9D9D9; 70 | } 71 | .weui-form-preview__value { 72 | font-size: 14px; 73 | } 74 | .weui-form-preview__value_in-hd { 75 | font-size: 26px; 76 | } 77 | .weui-form-preview__hd { 78 | position: relative; 79 | padding: 10px 15px; 80 | text-align: right; 81 | line-height: 2.5em; 82 | } 83 | .weui-form-preview__hd:after { 84 | content: " "; 85 | position: absolute; 86 | left: 0; 87 | bottom: 0; 88 | right: 0; 89 | height: 1px; 90 | border-bottom: 1rpx solid #D9D9D9; 91 | color: #D9D9D9; 92 | left: 15px; 93 | } 94 | .weui-form-preview__bd { 95 | padding: 10px 15px; 96 | font-size: .9em; 97 | text-align: right; 98 | color: #999999; 99 | line-height: 2; 100 | } 101 | .weui-form-preview__ft { 102 | position: relative; 103 | line-height: 50px; 104 | display: -webkit-box; 105 | display: -webkit-flex; 106 | display: flex; 107 | } 108 | .weui-form-preview__ft:after { 109 | content: " "; 110 | position: absolute; 111 | left: 0; 112 | top: 0; 113 | right: 0; 114 | height: 1px; 115 | border-top: 1rpx solid #D5D5D6; 116 | color: #D5D5D6; 117 | } 118 | .weui-form-preview__item { 119 | overflow: hidden; 120 | } 121 | .weui-form-preview__label { 122 | float: left; 123 | margin-right: 1em; 124 | min-width: 4em; 125 | color: #999999; 126 | text-align: justify; 127 | text-align-last: justify; 128 | } 129 | .weui-form-preview__value { 130 | display: block; 131 | overflow: hidden; 132 | word-break: normal; 133 | word-wrap: break-word; 134 | } 135 | .weui-form-preview__btn { 136 | position: relative; 137 | display: block; 138 | -webkit-box-flex: 1; 139 | -webkit-flex: 1; 140 | flex: 1; 141 | color: #3CC51F; 142 | text-align: center; 143 | } 144 | .weui-form-preview__btn:after { 145 | content: " "; 146 | position: absolute; 147 | left: 0; 148 | top: 0; 149 | width: 1px; 150 | bottom: 0; 151 | border-left: 1rpx solid #D5D5D6; 152 | color: #D5D5D6; 153 | } 154 | .weui-form-preview__btn:first-child:after { 155 | display: none; 156 | } 157 | .weui-form-preview__btn_active { 158 | background-color: #EEEEEE; 159 | } 160 | .weui-form-preview__btn_default { 161 | color: #999999; 162 | } 163 | .weui-form-preview__btn_primary { 164 | color: #0BB20C; 165 | } 166 | .weui-cell_select { 167 | padding: 0; 168 | } 169 | .weui-select { 170 | position: relative; 171 | padding-left: 15px; 172 | padding-right: 30px; 173 | height: 2.58823529em; 174 | min-height: 2.58823529em; 175 | line-height: 2.58823529em; 176 | border-right: 1rpx solid #D9D9D9; 177 | } 178 | .weui-select:before { 179 | content: " "; 180 | display: inline-block; 181 | height: 6px; 182 | width: 6px; 183 | border-width: 2px 2px 0 0; 184 | border-color: #C8C8CD; 185 | border-style: solid; 186 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 187 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 188 | position: relative; 189 | top: -2px; 190 | position: absolute; 191 | top: 50%; 192 | right: 15px; 193 | margin-top: -4px; 194 | } 195 | .weui-select_in-select-after { 196 | padding-left: 0; 197 | } 198 | .weui-cell__hd_in-select-after, 199 | .weui-cell__bd_in-select-before { 200 | padding-left: 15px; 201 | } 202 | .weui-cell_vcode { 203 | padding-right: 0; 204 | } 205 | .weui-vcode-img { 206 | margin-left: 5px; 207 | height: 2.58823529em; 208 | vertical-align: middle; 209 | } 210 | .weui-vcode-btn { 211 | display: inline-block; 212 | height: 2.58823529em; 213 | margin-left: 5px; 214 | padding: 0 0.6em 0 0.7em; 215 | border-left: 1px solid #E5E5E5; 216 | line-height: 2.58823529em; 217 | vertical-align: middle; 218 | font-size: 17px; 219 | color: #3CC51F; 220 | white-space: nowrap; 221 | } 222 | .weui-vcode-btn:active { 223 | color: #52a341; 224 | } 225 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-form/weui-form-preview.wxss: -------------------------------------------------------------------------------- 1 | .weui-form-preview { 2 | position: relative; 3 | background-color: #FFFFFF; 4 | } 5 | .weui-form-preview:before { 6 | content: " "; 7 | position: absolute; 8 | left: 0; 9 | top: 0; 10 | right: 0; 11 | height: 1px; 12 | border-top: 1rpx solid #D9D9D9; 13 | color: #D9D9D9; 14 | } 15 | .weui-form-preview:after { 16 | content: " "; 17 | position: absolute; 18 | left: 0; 19 | bottom: 0; 20 | right: 0; 21 | height: 1px; 22 | border-bottom: 1rpx solid #D9D9D9; 23 | color: #D9D9D9; 24 | } 25 | .weui-form-preview__value { 26 | font-size: 14px; 27 | } 28 | .weui-form-preview__value_in-hd { 29 | font-size: 26px; 30 | } 31 | .weui-form-preview__hd { 32 | position: relative; 33 | padding: 10px 15px; 34 | text-align: right; 35 | line-height: 2.5em; 36 | } 37 | .weui-form-preview__hd:after { 38 | content: " "; 39 | position: absolute; 40 | left: 0; 41 | bottom: 0; 42 | right: 0; 43 | height: 1px; 44 | border-bottom: 1rpx solid #D9D9D9; 45 | color: #D9D9D9; 46 | left: 15px; 47 | } 48 | .weui-form-preview__bd { 49 | padding: 10px 15px; 50 | font-size: .9em; 51 | text-align: right; 52 | color: #999999; 53 | line-height: 2; 54 | } 55 | .weui-form-preview__ft { 56 | position: relative; 57 | line-height: 50px; 58 | display: -webkit-box; 59 | display: -webkit-flex; 60 | display: flex; 61 | } 62 | .weui-form-preview__ft:after { 63 | content: " "; 64 | position: absolute; 65 | left: 0; 66 | top: 0; 67 | right: 0; 68 | height: 1px; 69 | border-top: 1rpx solid #D5D5D6; 70 | color: #D5D5D6; 71 | } 72 | .weui-form-preview__item { 73 | overflow: hidden; 74 | } 75 | .weui-form-preview__label { 76 | float: left; 77 | margin-right: 1em; 78 | min-width: 4em; 79 | color: #999999; 80 | text-align: justify; 81 | text-align-last: justify; 82 | } 83 | .weui-form-preview__value { 84 | display: block; 85 | overflow: hidden; 86 | word-break: normal; 87 | word-wrap: break-word; 88 | } 89 | .weui-form-preview__btn { 90 | position: relative; 91 | display: block; 92 | -webkit-box-flex: 1; 93 | -webkit-flex: 1; 94 | flex: 1; 95 | color: #3CC51F; 96 | text-align: center; 97 | } 98 | .weui-form-preview__btn:after { 99 | content: " "; 100 | position: absolute; 101 | left: 0; 102 | top: 0; 103 | width: 1px; 104 | bottom: 0; 105 | border-left: 1rpx solid #D5D5D6; 106 | color: #D5D5D6; 107 | } 108 | .weui-form-preview__btn:first-child:after { 109 | display: none; 110 | } 111 | .weui-form-preview__btn_active { 112 | background-color: #EEEEEE; 113 | } 114 | .weui-form-preview__btn_default { 115 | color: #999999; 116 | } 117 | .weui-form-preview__btn_primary { 118 | color: #0BB20C; 119 | } 120 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-form/weui-form_common.wxss: -------------------------------------------------------------------------------- 1 | .weui-cell_input { 2 | padding-top: 0; 3 | padding-bottom: 0; 4 | } 5 | .weui-label { 6 | width: 105px; 7 | word-wrap: break-word; 8 | word-break: break-all; 9 | } 10 | .weui-input { 11 | height: 2.58823529em; 12 | min-height: 2.58823529em; 13 | line-height: 2.58823529em; 14 | } 15 | .weui-toptips { 16 | position: fixed; 17 | -webkit-transform: translateZ(0); 18 | transform: translateZ(0); 19 | top: 0; 20 | left: 0; 21 | right: 0; 22 | padding: 5px; 23 | font-size: 14px; 24 | text-align: center; 25 | color: #FFFFFF; 26 | z-index: 5000; 27 | word-wrap: break-word; 28 | word-break: break-all; 29 | } 30 | .weui-toptips_warn { 31 | background-color: #E64340; 32 | } 33 | .weui-textarea { 34 | display: block; 35 | width: 100%; 36 | } 37 | .weui-textarea-counter { 38 | color: #B2B2B2; 39 | text-align: right; 40 | } 41 | .weui-textarea-counter_warn { 42 | color: #E64340; 43 | } 44 | .weui-cell_warn { 45 | color: #E64340; 46 | } 47 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-form/weui-select.wxss: -------------------------------------------------------------------------------- 1 | .weui-cell_select { 2 | padding: 0; 3 | } 4 | .weui-select { 5 | position: relative; 6 | padding-left: 15px; 7 | padding-right: 30px; 8 | height: 2.58823529em; 9 | min-height: 2.58823529em; 10 | line-height: 2.58823529em; 11 | border-right: 1rpx solid #D9D9D9; 12 | } 13 | .weui-select:before { 14 | content: " "; 15 | display: inline-block; 16 | height: 6px; 17 | width: 6px; 18 | border-width: 2px 2px 0 0; 19 | border-color: #C8C8CD; 20 | border-style: solid; 21 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 22 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); 23 | position: relative; 24 | top: -2px; 25 | position: absolute; 26 | top: 50%; 27 | right: 15px; 28 | margin-top: -4px; 29 | } 30 | .weui-select_in-select-after { 31 | padding-left: 0; 32 | } 33 | .weui-cell__hd_in-select-after, 34 | .weui-cell__bd_in-select-before { 35 | padding-left: 15px; 36 | } 37 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-form/weui-vcode.wxss: -------------------------------------------------------------------------------- 1 | .weui-cell_vcode { 2 | padding-right: 0; 3 | } 4 | .weui-vcode-img { 5 | margin-left: 5px; 6 | height: 2.58823529em; 7 | vertical-align: middle; 8 | } 9 | .weui-vcode-btn { 10 | display: inline-block; 11 | height: 2.58823529em; 12 | margin-left: 5px; 13 | padding: 0 0.6em 0 0.7em; 14 | border-left: 1px solid #E5E5E5; 15 | line-height: 2.58823529em; 16 | vertical-align: middle; 17 | font-size: 17px; 18 | color: #3CC51F; 19 | white-space: nowrap; 20 | } 21 | .weui-vcode-btn:active { 22 | color: #52a341; 23 | } 24 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-switch.wxss: -------------------------------------------------------------------------------- 1 | .weui-cell_switch { 2 | padding-top: 6px; 3 | padding-bottom: 6px; 4 | } 5 | -------------------------------------------------------------------------------- /public/style/widget/weui-cell/weui-uploader.wxss: -------------------------------------------------------------------------------- 1 | .weui-uploader__hd { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: flex; 5 | padding-bottom: 10px; 6 | -webkit-box-align: center; 7 | -webkit-align-items: center; 8 | align-items: center; 9 | } 10 | .weui-uploader__title { 11 | -webkit-box-flex: 1; 12 | -webkit-flex: 1; 13 | flex: 1; 14 | } 15 | .weui-uploader__info { 16 | color: #B2B2B2; 17 | } 18 | .weui-uploader__bd { 19 | margin-bottom: -4px; 20 | margin-right: -9px; 21 | overflow: hidden; 22 | } 23 | .weui-uploader__file { 24 | float: left; 25 | margin-right: 9px; 26 | margin-bottom: 9px; 27 | } 28 | .weui-uploader__img { 29 | display: block; 30 | width: 79px; 31 | height: 79px; 32 | } 33 | .weui-uploader__file_status { 34 | position: relative; 35 | } 36 | .weui-uploader__file_status:before { 37 | content: " "; 38 | position: absolute; 39 | top: 0; 40 | right: 0; 41 | bottom: 0; 42 | left: 0; 43 | background-color: rgba(0, 0, 0, 0.5); 44 | } 45 | .weui-uploader__file-content { 46 | position: absolute; 47 | top: 50%; 48 | left: 50%; 49 | -webkit-transform: translate(-50%, -50%); 50 | transform: translate(-50%, -50%); 51 | color: #FFFFFF; 52 | } 53 | .weui-uploader__input-box { 54 | float: left; 55 | position: relative; 56 | margin-right: 9px; 57 | margin-bottom: 9px; 58 | width: 77px; 59 | height: 77px; 60 | border: 1px solid #D9D9D9; 61 | } 62 | .weui-uploader__input-box:before, 63 | .weui-uploader__input-box:after { 64 | content: " "; 65 | position: absolute; 66 | top: 50%; 67 | left: 50%; 68 | -webkit-transform: translate(-50%, -50%); 69 | transform: translate(-50%, -50%); 70 | background-color: #D9D9D9; 71 | } 72 | .weui-uploader__input-box:before { 73 | width: 2px; 74 | height: 39.5px; 75 | } 76 | .weui-uploader__input-box:after { 77 | width: 39.5px; 78 | height: 2px; 79 | } 80 | .weui-uploader__input-box:active { 81 | border-color: #999999; 82 | } 83 | .weui-uploader__input-box:active:before, 84 | .weui-uploader__input-box:active:after { 85 | background-color: #999999; 86 | } 87 | .weui-uploader__input { 88 | position: absolute; 89 | z-index: 1; 90 | top: 0; 91 | left: 0; 92 | width: 100%; 93 | height: 100%; 94 | opacity: 0; 95 | } 96 | -------------------------------------------------------------------------------- /public/style/widget/weui-flex/weui-flex.wxss: -------------------------------------------------------------------------------- 1 | .weui-flex { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: flex; 5 | } 6 | .weui-flex__item { 7 | -webkit-box-flex: 1; 8 | -webkit-flex: 1; 9 | flex: 1; 10 | } 11 | -------------------------------------------------------------------------------- /public/style/widget/weui-footer/weui-footer.wxss: -------------------------------------------------------------------------------- 1 | .weui-footer { 2 | color: #999999; 3 | font-size: 14px; 4 | text-align: center; 5 | } 6 | .weui-footer_fixed-bottom { 7 | position: fixed; 8 | bottom: .52em; 9 | left: 0; 10 | right: 0; 11 | } 12 | .weui-footer__links { 13 | font-size: 0; 14 | } 15 | .weui-footer__link { 16 | display: inline-block; 17 | vertical-align: top; 18 | margin: 0 .62em; 19 | position: relative; 20 | font-size: 14px; 21 | color: #586C94; 22 | } 23 | .weui-footer__link:before { 24 | content: " "; 25 | position: absolute; 26 | left: 0; 27 | top: 0; 28 | width: 1px; 29 | bottom: 0; 30 | border-left: 1rpx solid #C7C7C7; 31 | color: #C7C7C7; 32 | left: -0.65em; 33 | top: .36em; 34 | bottom: .36em; 35 | } 36 | .weui-footer__link:first-child:before { 37 | display: none; 38 | } 39 | .weui-footer__text { 40 | padding: 0 .34em; 41 | font-size: 12px; 42 | } 43 | -------------------------------------------------------------------------------- /public/style/widget/weui-grid/weui-grid.wxss: -------------------------------------------------------------------------------- 1 | .weui-grids { 2 | border-top: 1rpx solid #D9D9D9; 3 | border-left: 1rpx solid #D9D9D9; 4 | overflow: hidden; 5 | } 6 | .weui-grid { 7 | position: relative; 8 | float: left; 9 | padding: 20px 10px; 10 | width: 33.33333333%; 11 | box-sizing: border-box; 12 | border-right: 1rpx solid #D9D9D9; 13 | border-bottom: 1rpx solid #D9D9D9; 14 | } 15 | .weui-grid_active { 16 | background-color: #ECECEC; 17 | } 18 | .weui-grid__icon { 19 | display: block; 20 | width: 28px; 21 | height: 28px; 22 | margin: 0 auto; 23 | } 24 | .weui-grid__label { 25 | margin-top: 5px; 26 | display: block; 27 | text-align: center; 28 | color: #000000; 29 | font-size: 14px; 30 | white-space: nowrap; 31 | text-overflow: ellipsis; 32 | overflow: hidden; 33 | } 34 | -------------------------------------------------------------------------------- /public/style/widget/weui-loading/weui-loading.wxss: -------------------------------------------------------------------------------- 1 | .weui-loading { 2 | margin: 0 5px; 3 | width: 20px; 4 | height: 20px; 5 | display: inline-block; 6 | vertical-align: middle; 7 | -webkit-animation: weuiLoading 1s steps(12, end) infinite; 8 | animation: weuiLoading 1s steps(12, end) infinite; 9 | background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat; 10 | background-size: 100%; 11 | } 12 | @-webkit-keyframes weuiLoading { 13 | 0% { 14 | -webkit-transform: rotate3d(0, 0, 1, 0deg); 15 | transform: rotate3d(0, 0, 1, 0deg); 16 | } 17 | 100% { 18 | -webkit-transform: rotate3d(0, 0, 1, 360deg); 19 | transform: rotate3d(0, 0, 1, 360deg); 20 | } 21 | } 22 | @keyframes weuiLoading { 23 | 0% { 24 | -webkit-transform: rotate3d(0, 0, 1, 0deg); 25 | transform: rotate3d(0, 0, 1, 0deg); 26 | } 27 | 100% { 28 | -webkit-transform: rotate3d(0, 0, 1, 360deg); 29 | transform: rotate3d(0, 0, 1, 360deg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /public/style/widget/weui-media-box/weui-media-box.wxss: -------------------------------------------------------------------------------- 1 | .weui-media-box { 2 | padding: 15px; 3 | position: relative; 4 | } 5 | .weui-media-box:before { 6 | content: " "; 7 | position: absolute; 8 | left: 0; 9 | top: 0; 10 | right: 0; 11 | height: 1px; 12 | border-top: 1rpx solid #E5E5E5; 13 | color: #E5E5E5; 14 | left: 15px; 15 | } 16 | .weui-media-box:first-child:before { 17 | display: none; 18 | } 19 | .weui-media-box__title { 20 | font-weight: 400; 21 | font-size: 17px; 22 | width: auto; 23 | overflow: hidden; 24 | text-overflow: ellipsis; 25 | white-space: nowrap; 26 | word-wrap: normal; 27 | word-wrap: break-word; 28 | word-break: break-all; 29 | } 30 | .weui-media-box__desc { 31 | color: #999999; 32 | font-size: 13px; 33 | line-height: 1.2; 34 | overflow: hidden; 35 | text-overflow: ellipsis; 36 | display: -webkit-box; 37 | -webkit-box-orient: vertical; 38 | -webkit-line-clamp: 2; 39 | } 40 | .weui-media-box__info { 41 | margin-top: 15px; 42 | padding-bottom: 5px; 43 | font-size: 13px; 44 | color: #CECECE; 45 | line-height: 1em; 46 | list-style: none; 47 | overflow: hidden; 48 | } 49 | .weui-media-box__info__meta { 50 | float: left; 51 | padding-right: 1em; 52 | } 53 | .weui-media-box__info__meta_extra { 54 | padding-left: 1em; 55 | border-left: 1px solid #CECECE; 56 | } 57 | .weui-media-box__title_in-text { 58 | margin-bottom: 8px; 59 | } 60 | .weui-media-box_appmsg { 61 | display: -webkit-box; 62 | display: -webkit-flex; 63 | display: flex; 64 | -webkit-box-align: center; 65 | -webkit-align-items: center; 66 | align-items: center; 67 | } 68 | .weui-media-box__thumb { 69 | width: 100%; 70 | height: 100%; 71 | vertical-align: top; 72 | } 73 | .weui-media-box__hd_in-appmsg { 74 | margin-right: .8em; 75 | width: 60px; 76 | height: 60px; 77 | line-height: 60px; 78 | text-align: center; 79 | } 80 | .weui-media-box__bd_in-appmsg { 81 | -webkit-box-flex: 1; 82 | -webkit-flex: 1; 83 | flex: 1; 84 | min-width: 0; 85 | } 86 | .weui-media-box_small-appmsg { 87 | padding: 0; 88 | } 89 | .weui-cells_in-small-appmsg { 90 | margin-top: 0; 91 | } 92 | .weui-cells_in-small-appmsg:before { 93 | display: none; 94 | } 95 | -------------------------------------------------------------------------------- /public/style/widget/weui-page/weui-article.wxss: -------------------------------------------------------------------------------- 1 | .weui-article { 2 | padding: 20px 15px; 3 | font-size: 15px; 4 | } 5 | .weui-article__section { 6 | margin-bottom: 1.5em; 7 | } 8 | .weui-article__h1 { 9 | font-size: 18px; 10 | font-weight: 400; 11 | margin-bottom: .9em; 12 | } 13 | .weui-article__h2 { 14 | font-size: 16px; 15 | font-weight: 400; 16 | margin-bottom: .34em; 17 | } 18 | .weui-article__h3 { 19 | font-weight: 400; 20 | font-size: 15px; 21 | margin-bottom: .34em; 22 | } 23 | .weui-article__p { 24 | margin: 0 0 .8em; 25 | } 26 | -------------------------------------------------------------------------------- /public/style/widget/weui-page/weui-msg.wxss: -------------------------------------------------------------------------------- 1 | .weui-msg { 2 | padding-top: 36px; 3 | text-align: center; 4 | } 5 | .weui-msg__link { 6 | display: inline; 7 | color: #586C94; 8 | } 9 | .weui-msg__icon-area { 10 | margin-bottom: 30px; 11 | } 12 | .weui-msg__text-area { 13 | margin-bottom: 25px; 14 | padding: 0 20px; 15 | } 16 | .weui-msg__title { 17 | margin-bottom: 5px; 18 | font-weight: 400; 19 | font-size: 20px; 20 | } 21 | .weui-msg__desc { 22 | font-size: 14px; 23 | color: #999999; 24 | } 25 | .weui-msg__opr-area { 26 | margin-bottom: 25px; 27 | } 28 | .weui-msg__extra-area { 29 | margin-bottom: 15px; 30 | font-size: 14px; 31 | color: #999999; 32 | } 33 | @media screen and (min-height: 438px) { 34 | .weui-msg__extra-area { 35 | position: fixed; 36 | left: 0; 37 | bottom: 0; 38 | width: 100%; 39 | text-align: center; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/style/widget/weui-panel/weui-panel.wxss: -------------------------------------------------------------------------------- 1 | .weui-panel { 2 | background-color: #FFFFFF; 3 | margin-top: 10px; 4 | position: relative; 5 | overflow: hidden; 6 | } 7 | .weui-panel:first-child { 8 | margin-top: 0; 9 | } 10 | .weui-panel:before { 11 | content: " "; 12 | position: absolute; 13 | left: 0; 14 | top: 0; 15 | right: 0; 16 | height: 1px; 17 | border-top: 1rpx solid #E5E5E5; 18 | color: #E5E5E5; 19 | } 20 | .weui-panel:after { 21 | content: " "; 22 | position: absolute; 23 | left: 0; 24 | bottom: 0; 25 | right: 0; 26 | height: 1px; 27 | border-bottom: 1rpx solid #E5E5E5; 28 | color: #E5E5E5; 29 | } 30 | .weui-panel__hd { 31 | padding: 14px 15px 10px; 32 | color: #999999; 33 | font-size: 13px; 34 | position: relative; 35 | } 36 | .weui-panel__hd:after { 37 | content: " "; 38 | position: absolute; 39 | left: 0; 40 | bottom: 0; 41 | right: 0; 42 | height: 1px; 43 | border-bottom: 1rpx solid #E5E5E5; 44 | color: #E5E5E5; 45 | left: 15px; 46 | } 47 | -------------------------------------------------------------------------------- /public/style/widget/weui-progress/weui-progress.wxss: -------------------------------------------------------------------------------- 1 | .weui-progress { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: flex; 5 | -webkit-box-align: center; 6 | -webkit-align-items: center; 7 | align-items: center; 8 | } 9 | .weui-progress__bar { 10 | -webkit-box-flex: 1; 11 | -webkit-flex: 1; 12 | flex: 1; 13 | } 14 | .weui-progress__opr { 15 | margin-left: 15px; 16 | font-size: 0; 17 | } 18 | -------------------------------------------------------------------------------- /public/style/widget/weui-searchbar/weui-searchbar.wxss: -------------------------------------------------------------------------------- 1 | .weui-search-bar { 2 | position: relative; 3 | padding: 8px 10px; 4 | display: -webkit-box; 5 | display: -webkit-flex; 6 | display: flex; 7 | box-sizing: border-box; 8 | background-color: #EFEFF4; 9 | border-top: 1rpx solid #D7D6DC; 10 | border-bottom: 1rpx solid #D7D6DC; 11 | } 12 | .weui-icon-search { 13 | margin-right: 8px; 14 | font-size: inherit; 15 | } 16 | .weui-icon-search_in-box { 17 | position: absolute; 18 | left: 10px; 19 | top: 7px; 20 | } 21 | .weui-search-bar__text { 22 | display: inline-block; 23 | font-size: 14px; 24 | vertical-align: middle; 25 | } 26 | .weui-search-bar__form { 27 | position: relative; 28 | -webkit-box-flex: 1; 29 | -webkit-flex: auto; 30 | flex: auto; 31 | border-radius: 5px; 32 | background: #FFFFFF; 33 | border: 1rpx solid #E6E6EA; 34 | } 35 | .weui-search-bar__box { 36 | position: relative; 37 | padding-left: 30px; 38 | padding-right: 30px; 39 | width: 100%; 40 | box-sizing: border-box; 41 | z-index: 1; 42 | } 43 | .weui-search-bar__input { 44 | height: 28px; 45 | line-height: 28px; 46 | font-size: 14px; 47 | } 48 | .weui-icon-clear { 49 | position: absolute; 50 | top: 0; 51 | right: 0; 52 | padding: 7px 8px; 53 | font-size: 0; 54 | } 55 | .weui-search-bar__label { 56 | position: absolute; 57 | top: 0; 58 | right: 0; 59 | bottom: 0; 60 | left: 0; 61 | z-index: 2; 62 | border-radius: 3px; 63 | text-align: center; 64 | color: #9B9B9B; 65 | background: #FFFFFF; 66 | line-height: 28px; 67 | } 68 | .weui-search-bar__cancel-btn { 69 | margin-left: 10px; 70 | line-height: 28px; 71 | color: #09BB07; 72 | white-space: nowrap; 73 | } 74 | -------------------------------------------------------------------------------- /public/style/widget/weui-tab/weui-navbar.wxss: -------------------------------------------------------------------------------- 1 | .weui-navbar { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: flex; 5 | position: absolute; 6 | z-index: 500; 7 | top: 0; 8 | width: 100%; 9 | border-bottom: 1rpx solid #CCCCCC; 10 | } 11 | .weui-navbar__item { 12 | position: relative; 13 | display: block; 14 | -webkit-box-flex: 1; 15 | -webkit-flex: 1; 16 | flex: 1; 17 | padding: 13px 0; 18 | text-align: center; 19 | font-size: 0; 20 | } 21 | .weui-navbar__item.weui-bar__item_on { 22 | color: #1AAD19; 23 | } 24 | .weui-navbar__slider { 25 | position: absolute; 26 | content: " "; 27 | left: 0; 28 | bottom: 0; 29 | width: 6em; 30 | height: 3px; 31 | background-color: #1AAD19; 32 | -webkit-transition: -webkit-transform .3s; 33 | transition: -webkit-transform .3s; 34 | transition: transform .3s; 35 | transition: transform .3s, -webkit-transform .3s; 36 | } 37 | .weui-navbar__title { 38 | display: inline-block; 39 | font-size: 15px; 40 | max-width: 8em; 41 | width: auto; 42 | overflow: hidden; 43 | text-overflow: ellipsis; 44 | white-space: nowrap; 45 | word-wrap: normal; 46 | } 47 | -------------------------------------------------------------------------------- /public/style/widget/weui-tab/weui-tab.wxss: -------------------------------------------------------------------------------- 1 | .weui-navbar { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: flex; 5 | position: absolute; 6 | z-index: 500; 7 | top: 0; 8 | width: 100%; 9 | border-bottom: 1rpx solid #CCCCCC; 10 | } 11 | .weui-navbar__item { 12 | position: relative; 13 | display: block; 14 | -webkit-box-flex: 1; 15 | -webkit-flex: 1; 16 | flex: 1; 17 | padding: 13px 0; 18 | text-align: center; 19 | font-size: 0; 20 | } 21 | .weui-navbar__item.weui-bar__item_on { 22 | color: #1AAD19; 23 | } 24 | .weui-navbar__slider { 25 | position: absolute; 26 | content: " "; 27 | left: 0; 28 | bottom: 0; 29 | width: 6em; 30 | height: 3px; 31 | background-color: #1AAD19; 32 | -webkit-transition: -webkit-transform .3s; 33 | transition: -webkit-transform .3s; 34 | transition: transform .3s; 35 | transition: transform .3s, -webkit-transform .3s; 36 | } 37 | .weui-navbar__title { 38 | display: inline-block; 39 | font-size: 15px; 40 | max-width: 8em; 41 | width: auto; 42 | overflow: hidden; 43 | text-overflow: ellipsis; 44 | white-space: nowrap; 45 | word-wrap: normal; 46 | } 47 | .weui-tab { 48 | position: relative; 49 | height: 100%; 50 | } 51 | .weui-tab__panel { 52 | box-sizing: border-box; 53 | height: 100%; 54 | padding-top: 50px; 55 | overflow: auto; 56 | -webkit-overflow-scrolling: touch; 57 | } 58 | -------------------------------------------------------------------------------- /public/style/widget/weui-tips/weui-badge.wxss: -------------------------------------------------------------------------------- 1 | .weui-badge { 2 | display: inline-block; 3 | padding: .15em .4em; 4 | min-width: 8px; 5 | border-radius: 18px; 6 | background-color: #F43530; 7 | color: #FFFFFF; 8 | line-height: 1.2; 9 | text-align: center; 10 | font-size: 12px; 11 | vertical-align: middle; 12 | } 13 | .weui-badge_dot { 14 | padding: .4em; 15 | min-width: 0; 16 | } 17 | -------------------------------------------------------------------------------- /public/style/widget/weui-tips/weui-loadmore.wxss: -------------------------------------------------------------------------------- 1 | .weui-loadmore { 2 | width: 65%; 3 | margin: 1.5em auto; 4 | line-height: 1.6em; 5 | font-size: 14px; 6 | text-align: center; 7 | } 8 | .weui-loadmore__tips { 9 | display: inline-block; 10 | vertical-align: middle; 11 | } 12 | .weui-loadmore_line { 13 | border-top: 1px solid #E5E5E5; 14 | margin-top: 2.4em; 15 | } 16 | .weui-loadmore__tips_in-line { 17 | position: relative; 18 | top: -0.9em; 19 | padding: 0 .55em; 20 | background-color: #FFFFFF; 21 | color: #999999; 22 | } 23 | .weui-loadmore__tips_in-dot { 24 | position: relative; 25 | padding: 0 .16em; 26 | width: 4px; 27 | height: 1.6em; 28 | } 29 | .weui-loadmore__tips_in-dot:before { 30 | content: " "; 31 | position: absolute; 32 | top: 50%; 33 | left: 50%; 34 | margin-top: -1px; 35 | margin-left: -2px; 36 | width: 4px; 37 | height: 4px; 38 | border-radius: 50%; 39 | background-color: #E5E5E5; 40 | } 41 | -------------------------------------------------------------------------------- /snap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iomars/marsmina/0e88ef54ae22e9db3ce23e9bfc70a5524cce6fa5/snap.png --------------------------------------------------------------------------------