(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/vendor"],{"00e8":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={data:function(){return{wxsProp:{optDown:{},scrollTop:0,bodyHeight:0,isDownScrolling:!1,isUpScrolling:!1,isScrollBody:!0,isUpBoth:!0,t:0},callProp:{callType:"",t:0},renderBiz:{propObserver:function(){}}}},methods:{wxsCall:function(e){"setWxsProp"===e.type?this.wxsProp={optDown:this.mescroll.optDown,scrollTop:this.mescroll.getScrollTop(),bodyHeight:this.mescroll.getBodyHeight(),isDownScrolling:this.mescroll.isDownScrolling,isUpScrolling:this.mescroll.isUpScrolling,isUpBoth:this.mescroll.optUp.isBoth,isScrollBody:this.mescroll.isScrollBody,t:Date.now()}:"setLoadType"===e.type?(this.downLoadType=e.downLoadType,this.$set(this.mescroll,"downLoadType",this.downLoadType),this.$set(this.mescroll,"isDownEndSuccess",null)):"triggerDownScroll"===e.type?this.mescroll.triggerDownScroll():"endDownScroll"===e.type?this.mescroll.endDownScroll():"triggerUpScroll"===e.type&&this.mescroll.triggerUpScroll(!0)}},mounted:function(){var e=this;this.mescroll.optDown.afterLoading=function(){e.callProp={callType:"showLoading",t:Date.now()}},this.mescroll.optDown.afterEndDownScroll=function(){e.callProp={callType:"endDownScroll",t:Date.now()};var t=300+(e.mescroll.optDown.beforeEndDelay||0);setTimeout((function(){4!==e.downLoadType&&0!==e.downLoadType||(e.callProp={callType:"clearTransform",t:Date.now()}),e.$set(e.mescroll,"downLoadType",e.downLoadType)}),t)},this.wxsCall({type:"setWxsProp"})}},o=r;t.default=o},"0462":function(e,t,n){(function(t){function n(e,n){t.showLoading({title:"加载中"}),t.downloadFile({url:e,success:function(e){var r=e.tempFilePath;t.openDocument({filePath:r,fileType:n,success:function(){t.hideLoading()},fail:function(){t.hideLoading()}})}})}e.exports={previepdf:n}}).call(this,n("543d")["default"])},"046c":function(e,t,n){"use strict";(function(e,n){function r(e){return s(e)||a(e)||i(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function a(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},o=r.action,i=r.callback,a=r.confirmTitle,s=r.confirmContent;e&&e.length&&n.showModal({title:a||"提示",content:s||"是否删除该数据",showCancel:!0,success:function(n){n.confirm&&t._execRemove(e,o,i)}})},_execLoadData:function(e){var t=this;this.loading||(this.loading=!0,this.errorMessage="",this._getExec().then((function(n){t.loading=!1;var o=n.result,i=o.data,a=o.count;if(t._isEnded=i.length=0;r--){var o=t.indexOf(n[r]._id);o>=0&&(n.splice(r,1),t.splice(o,1))}},_dispatchEvent:function(e,t){this._changeDataFunction?this._changeDataFunction(t,this._isEnded):this.$emit(e,t,this._isEnded)}}};t.default=p}).call(this,n("a9ff")["default"],n("543d")["default"])},"0d12":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={appid:"__UNI__EB9AA47"};t.default=r},"1eb9":function(e,t,n){(function(t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e,t,"GET")}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e,t,"put")}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e,t,"delete")}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e,t,"POST")}var a=getApp().globalData.url;function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET";return new Promise((function(o,i){t.showLoading({title:"加载中"}),t.request({url:a+e,method:r,data:n,header:{"mini-session":t.getStorageSync("session")||"",Accept:"application/json","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json"},success:function(e){e.data?e.data.error?(404!=e.data.error.code&&t.showToast({title:e.data.error.message,icon:"none"}),9999==e.data.error.code&&(t.clearStorageSync("session"),t.showToast({title:"登录失效,请重新登录",icon:"none"}),setTimeout((function(){t.reLaunch({url:"/pages/login/login"})}),1e3)),i(e.data.error.message)):o(e.data):(o(null),t.hideLoading())},fail:function(e){console.log(e),t.showToast({title:"请求超时,请重试",icon:"none"})}})}))}e.exports={get:n,post:i,put:r,deletes:o}}).call(this,n("543d")["default"])},"2c3e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("4382")),o=n("3bb4");function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return l(e)||c(e)||u(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function c(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function l(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[],r=function r(o){var i=o.root?o.root.getChildNodes(o.root.childNodesId):o.getChildNodes(o.childNodesId);i.forEach((function(o){(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&n.push(o.data),r(o)}))};return r(this),n}},{key:"getCheckedKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getCheckedNodes(t,n).map((function(t){return(t||{})[e.key]}))}},{key:"getHalfCheckedNodes",value:function(){var e=[],t=function t(n){var r=n.root?n.root.getChildNodes(n.root.childNodesId):n.getChildNodes(n.childNodesId);r.forEach((function(n){n.indeterminate&&e.push(n.data),t(n)}))};return t(this),e}},{key:"getHalfCheckedKeys",value:function(){var e=this;return this.getHalfCheckedNodes().map((function(t){return(t||{})[e.key]}))}},{key:"_getAllNodes",value:function(){var e=[],t=this.nodesMap;for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}},{key:"updateChildren",value:function(e,t){var n=this.nodesMap[e];if(n){for(var r=n.getChildNodes(n.childNodesId),o=r.length-1;o>=0;o--){var i=r[o];this.remove(i.data)}for(var a=0,s=t.length;a1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this._getAllNodes().sort((function(e,t){return t.level-e.level})),o=Object.create(null),i=Object.keys(n);r.forEach((function(e){return e.setChecked(!1,!1)}));for(var a=0,s=r.length;a-1;if(l){var f=u.getParent(u.parentId);while(f&&f.level>0)o[f.data[e]]=!0,f=f.getParent(f.parentId);u.isLeaf||this.checkStrictly?u.setChecked(!0,!1):(u.setChecked(!0,!0),t&&function(){u.setChecked(!1,!1);var e=function e(t){var n=t.getChildNodes(t.childNodesId);n.forEach((function(t){t.isLeaf||t.setChecked(!1,!1),e(t)}))};e(u)}())}else u.checked&&!o[c]&&u.setChecked(!1,!1)}}}},{key:"setCheckedNodes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.key,r={};e.forEach((function(e){r[(e||{})[n]]=!0})),this._setCheckedKeys(n,t,r)}},{key:"setCheckedKeys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.defaultCheckedKeys=e;var n=this.key,r={};e.forEach((function(e){r[e]=!0})),this._setCheckedKeys(n,t,r)}},{key:"setDefaultExpandedKeys",value:function(e){var t=this;e=e||[],this.defaultExpandedKeys=e,e.forEach((function(e){var n=t.getNode(e);n&&n.expand(null,t.autoExpandParent)}))}},{key:"setChecked",value:function(e,t,n){var r=this.getNode(e);r&&r.setChecked(!!t,n)}},{key:"getCurrentNode",value:function(){return this.currentNode}},{key:"setCurrentNode",value:function(e){var t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0,this.expandCurrentNodeParent&&this.currentNode.expand(null,!0)}},{key:"setUserCurrentNode",value:function(e){var t=e[this.key],n=this.nodesMap[t];this.setCurrentNode(n)}},{key:"setCurrentNodeKey",value:function(e){if(null===e||void 0===e)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);var t=this.getNode(e);t&&this.setCurrentNode(t)}}]),e}();t.default=v},"2d2b":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.debounce=void 0;var r=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return console.log(1),function(){console.log(123);var o=this,i=arguments;if(t&&clearTimeout(t),r){var a=!t;t=setTimeout((function(){t=null}),n),a&&e.apply(o,i)}else t=setTimeout((function(){e.apply(o,i)}),n)}};t.debounce=r;var o=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=0;return function(){var i=this,a=arguments;if(1===r){var s=Date.now();s-o>n&&(e.apply(i,a),o=s)}else 2===r&&(t||(t=setTimeout((function(){t=null,e.apply(i,a)}),n)))}};t.throttle=o},3364:function(e,t){},"3b20":function(e,t){(function(){var t={qiniuRegion:"",qiniuImageURLPrefix:"",qiniuUploadToken:"",qiniuUploadTokenURL:"",qiniuUploadTokenFunction:null,qiniuShouldUseQiniuFileName:!1};function n(e){t={qiniuRegion:"",qiniuImageURLPrefix:"",qiniuUploadToken:"",qiniuUploadTokenURL:"",qiniuUploadTokenFunction:null,qiniuShouldUseQiniuFileName:!1},r(e)}function r(e){e.region?t.qiniuRegion=e.region:console.error("qiniu uploader need your bucket region"),e.uptoken?t.qiniuUploadToken=e.uptoken:e.uptokenURL?t.qiniuUploadTokenURL=e.uptokenURL:e.uptokenFunc&&(t.qiniuUploadTokenFunction=e.uptokenFunc),e.domain&&(t.qiniuImageURLPrefix=e.domain),t.qiniuShouldUseQiniuFileName=e.shouldUseQiniuFileName}function o(e,n,o,s,u,c){if(null!=e)if(s&&r(s),t.qiniuUploadToken)i(e,n,o,s,u,c);else if(t.qiniuUploadTokenURL)a((function(){i(e,n,o,s,u,c)}));else{if(!t.qiniuUploadTokenFunction)return void console.error("qiniu uploader need one of [uptoken, uptokenURL, uptokenFunc]");if(t.qiniuUploadToken=t.qiniuUploadTokenFunction(),null==t.qiniuUploadToken&&t.qiniuUploadToken.length>0)return void console.error("qiniu UploadTokenFunction result is null, please check the return value");i(e,n,o,s,u,c)}else console.error("qiniu uploader need filePath to upload")}function i(e,n,r,o,i,a){if(null==t.qiniuUploadToken&&t.qiniuUploadToken.length>0)console.error("qiniu UploadToken is null, please check the init config or networking");else{var u=s(t.qiniuRegion),c=e.split("//")[1];o&&o.key&&(c=o.key);var l={token:t.qiniuUploadToken};t.qiniuShouldUseQiniuFileName||(l["key"]=c);var f=wx.uploadFile({url:u,filePath:e,name:"file",formData:l,success:function(e){var o=e.data;e.data.hasOwnProperty("type")&&"Buffer"===e.data.type&&(o=String.fromCharCode.apply(null,e.data.data));try{var i=JSON.parse(o),a=t.qiniuImageURLPrefix+"/"+i.key;i.imageURL=a,n&&n(i)}catch(s){console.log("parse JSON failed, origin String is: "+o),r&&r(s)}},fail:function(e){console.error(e),r&&r(e)}});f.onProgressUpdate((function(e){i&&i(e)})),a&&a((function(){f.abort()}))}}function a(e){wx.request({url:t.qiniuUploadTokenURL,success:function(n){var r=n.data.uptoken;r&&r.length>0?(t.qiniuUploadToken=r,e&&e()):console.error("qiniuUploader cannot get your token, please check the uptokenURL or server")},fail:function(e){console.error("qiniu UploadToken is null, please check the init config or networking: "+e)}})}function s(e){var t=null;switch(e){case"ECN":t="https://up.qbox.me";break;case"NCN":t="https://up-z1.qbox.me";break;case"SCN":t="https://up-z2.qbox.me";break;case"NA":t="https://up-na0.qbox.me";break;case"ASG":t="https://up-as0.qbox.me";break;default:console.error("please make the region is with one of [ECN, SCN, NCN, NA, ASG]")}return t}e.exports={init:n,upload:o}})()},"3bb4":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNull=t.getPropertyFromData=t.reInitChecked=t.getChildState=t.arrayFindIndex=t.objectAssign=t.getNodeKey=t.markNodeData=t.NODE_KEY=void 0;var r="$treeNodeId";t.NODE_KEY=r;var o=function(e,t){t&&!t[r]&&Object.defineProperty(t,r,{value:e.id,enumerable:!1,configurable:!1,writable:!1})};t.markNodeData=o;var i=function(e,t){return t?e?t[e]:t[r]:null};t.getNodeKey=i;var a=function(e){for(var t=1,n=arguments.length;t-1?t[n+1]:null,this.previousSibling=n>0?t[n-1]:null}else e={level:0};this.level=e.level+1}}},{key:"_handleProps",value:function(){var e=this.store().props;if(this.store().showNodeIcon&&(e&&"undefined"!==typeof e.icon?this.icon=(0,r.getPropertyFromData)(this,"icon"):console.warn('请配置props属性中的"icon"字段')),this.store().registerNode(this),e&&"undefined"!==typeof e.isLeaf){var t=(0,r.getPropertyFromData)(this,"isLeaf");"boolean"===typeof t&&(this.isLeafByUser=t)}}},{key:"_handleExpand",value:function(){if(!0!==this.store().lazy&&this.data?(this.setData(this.data),this.store().defaultExpandAll&&(this.expanded=!0)):this.level>0&&this.store().lazy&&this.store().defaultExpandAll&&this.expand(),Array.isArray(this.data)||(0,r.markNodeData)(this,this.data),this.data){var e=this.store().defaultExpandedKeys,t=this.store().key;t&&e&&-1!==e.indexOf(this.key)&&this.expand(null,this.store().autoExpandparent)}}},{key:"_handleCurrent",value:function(){var e=this.store().key;e&&void 0!==this.store().currentNodeKey&&this.key===this.store().currentNodeKey&&(this.store().currentNode=this,this.store().currentNode.isCurrent=!0)}},{key:"destroyStore",value:function(){s(null)}},{key:"setData",value:function(e){var t;Array.isArray(e)||(0,r.markNodeData)(this,e),this.data=e,this.childNodesId=[],t=0===this.level&&Array.isArray(this.data)?this.data:(0,r.getPropertyFromData)(this,"children")||[];for(var n=0,o=t.length;n1&&void 0!==arguments[1])||arguments[1],n=function n(r){for(var o=r.getChildNodes(r.childNodesId)||[],i=!1,a=0,s=o.length;a-1&&t.splice(n,1);var r=this.childNodesId.indexOf(e.key);r>-1&&(this.store()&&this.store().deregisterNode(e),e.parentId=null,this.childNodesId.splice(r,1)),this.updateLeafState()}},{key:"removeChildByData",value:function(e){for(var t=null,n=0;n0)r.expanded=!0,r=n.getParent(r.parentId)}n.expanded=!0,e&&e()};this.shouldLoadData()?this.loadData((function(e){Array.isArray(e)&&(this.checked?this.setChecked(!0,!0):this.store().checkStrictly||(0,r.reInitChecked)(this),o())})):o()}},{key:"doCreateChildren",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((function(e){t.insertChild((0,r.objectAssign)({data:e},n),void 0,!0)}))}},{key:"collapse",value:function(){this.expanded=!1}},{key:"shouldLoadData",value:function(){return!0===this.store().lazy&&this.store().load&&!this.loaded}},{key:"updateLeafState",value:function(){if(!0!==this.store().lazy||!0===this.loaded||"undefined"===typeof this.isLeafByUser){var e=this.childNodesId;!this.store().lazy||!0===this.store().lazy&&!0===this.loaded?this.isLeaf=!e||0===e.length:this.isLeaf=!1}else this.isLeaf=this.isLeafByUser}},{key:"setChecked",value:function(e,t,n,o){var i=this;if(this.indeterminate="half"===e,this.checked=!0===e,this.checked&&this.store().expandOnCheckNode&&this.expand(null,!0),!this.store().checkStrictly&&!this.store().showRadio){if(!this.shouldLoadData()||this.store().checkDescendants){var a=this.getChildNodes(this.childNodesId),s=(0,r.getChildState)(a),u=s.all,c=s.allWithoutDisable;this.isLeaf||u||!c||(this.checked=!1,e=!1);var l=function(){if(t){for(var n=i.getChildNodes(i.childNodesId),a=0,s=n.length;a0&&void 0!==arguments[0]&&arguments[0];if(0===this.level)return this.data;var t=this.data;if(!t)return null;var n=this.store().props,r="children";return n&&(r=n.children||"children"),void 0===t[r]&&(t[r]=null),e&&!t[r]&&(t[r]=[]),t[r]}},{key:"updateChildren",value:function(){var e=this,t=this.getChildNodes(this.childNodesId),n=this.getChildren()||[],o=t.map((function(e){return e.data})),i={},a=[];n.forEach((function(e,t){var n=e[r.NODE_KEY],s=!!n&&(0,r.arrayFindIndex)(o,(function(e){return e[r.NODE_KEY]===n}))>=0;s?i[n]={index:t,data:e}:a.push({index:t,data:e})})),this.store().lazy||o.forEach((function(t){i[t[r.NODE_KEY]]||e.removeChildByData(t)})),a.forEach((function(t){var n=t.index,r=t.data;e.insertChild({data:r},n)})),this.updateLeafState()}},{key:"loadData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!0!==this.store().lazy||!this.store().load||this.loaded||this.loading&&!Object.keys(n).length)e&&e.call(this);else{this.loading=!0;var r=function(r){t.loaded=!0,t.loading=!1,t.childNodesId=[],t.doCreateChildren(r,n),t.updateLeafState(),e&&e.call(t,r)};this.store().load(this,r)}}}]),e}();t.default=c},"4aab":function(e,t,n){"use strict";(function(e){function n(e,t){var n=this;n.version="1.3.3",n.options=e||{},n.isScrollBody=t||!1,n.isDownScrolling=!1,n.isUpScrolling=!1;var r=n.options.down&&n.options.down.callback;n.initDownScroll(),n.initUpScroll(),setTimeout((function(){(n.optDown.use||n.optDown.native)&&n.optDown.auto&&r&&(n.optDown.autoShowLoading?n.triggerDownScroll():n.optDown.callback&&n.optDown.callback(n)),n.isUpAutoLoad||setTimeout((function(){n.optUp.use&&n.optUp.auto&&!n.isUpAutoLoad&&n.triggerUpScroll()}),100)}),30)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype.extendDownScroll=function(e){n.extend(e,{use:!0,auto:!0,native:!1,autoShowLoading:!1,isLock:!1,offset:80,startTop:100,inOffsetRate:1,outOffsetRate:.2,bottomOffset:20,minAngle:45,textInOffset:"下拉刷新",textOutOffset:"释放更新",textLoading:"加载中 ...",textSuccess:"加载成功",textErr:"加载失败",beforeEndDelay:100,bgColor:"transparent",textColor:"gray",inited:null,inOffset:null,outOffset:null,onMoving:null,beforeLoading:null,showLoading:null,afterLoading:null,beforeEndDownScroll:null,endDownScroll:null,afterEndDownScroll:null,callback:function(e){e.resetUpScroll()}})},n.prototype.extendUpScroll=function(e){n.extend(e,{use:!0,auto:!0,isLock:!1,isBoth:!0,callback:null,page:{num:0,size:10,time:null},noMoreSize:5,offset:150,textLoading:"加载中 ...",textNoMore:"-- END --",bgColor:"transparent",textColor:"gray",inited:null,showLoading:null,showNoMore:null,hideUpScroll:null,errDistance:60,toTop:{src:null,offset:1e3,duration:300,btnClick:null,onShow:null,zIndex:9990,left:null,right:20,bottom:120,safearea:!1,width:72,radius:"50%"},empty:{use:!0,icon:null,tip:"~ 暂无相关数据 ~",btnText:"",btnClick:null,onShow:null,fixed:!1,top:"100rpx",zIndex:99},onScroll:!1})},n.extend=function(e,t){if(!e)return t;for(var r in t)if(null==e[r]){var o=t[r];e[r]=null!=o&&"object"===typeof o?n.extend({},o):o}else"object"===typeof e[r]&&n.extend(e[r],t[r]);return e},n.prototype.hasColor=function(e){if(!e)return!1;var t=e.toLowerCase();return"#fff"!=t&&"#ffffff"!=t&&"transparent"!=t&&"white"!=t},n.prototype.initDownScroll=function(){var e=this;e.optDown=e.options.down||{},!e.optDown.textColor&&e.hasColor(e.optDown.bgColor)&&(e.optDown.textColor="#fff"),e.extendDownScroll(e.optDown),e.isScrollBody&&e.optDown.native?e.optDown.use=!1:e.optDown.native=!1,e.downHight=0,e.optDown.use&&e.optDown.inited&&setTimeout((function(){e.optDown.inited(e)}),0)},n.prototype.touchstartEvent=function(e){this.optDown.use&&(this.startPoint=this.getPoint(e),this.startTop=this.getScrollTop(),this.startAngle=0,this.lastPoint=this.startPoint,this.maxTouchmoveY=this.getBodyHeight()-this.optDown.bottomOffset,this.inTouchend=!1)},n.prototype.touchmoveEvent=function(e){if(this.optDown.use){var t=this,n=t.getScrollTop(),r=t.getPoint(e),o=r.y-t.startPoint.y;if(o>0&&(t.isScrollBody&&n<=0||!t.isScrollBody&&(n<=0||n<=t.optDown.startTop&&n===t.startTop))&&!t.inTouchend&&!t.isDownScrolling&&!t.optDown.isLock&&(!t.isUpScrolling||t.isUpScrolling&&t.optUp.isBoth)){if(t.startAngle||(t.startAngle=t.getAngle(t.lastPoint,r)),t.startAngle0&&r.y>=t.maxTouchmoveY)return t.inTouchend=!0,void t.touchendEvent();t.preventDefault(e);var i=r.y-t.lastPoint.y;t.downHight0?i*t.optDown.outOffsetRate:i),t.downHight=Math.round(t.downHight);var a=t.downHight/t.optDown.offset;t.optDown.onMoving&&t.optDown.onMoving(t,a,t.downHight)}t.lastPoint=r}},n.prototype.touchendEvent=function(e){if(this.optDown.use)if(this.isMoveDown)this.downHight>=this.optDown.offset?this.triggerDownScroll():(this.downHight=0,this.endDownScrollCall(this)),this.movetype=0,this.isMoveDown=!1;else if(!this.isScrollBody&&this.getScrollTop()===this.startTop){var t=this.getPoint(e).y-this.startPoint.y<0;if(t){var n=this.getAngle(this.getPoint(e),this.startPoint);n>80&&this.triggerUpScroll(!0)}}},n.prototype.getPoint=function(e){return e?e.touches&&e.touches[0]?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches[0]?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.clientX,y:e.clientY}:{x:0,y:0}},n.prototype.getAngle=function(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y),o=Math.sqrt(n*n+r*r),i=0;return 0!==o&&(i=Math.asin(r/o)/Math.PI*180),i},n.prototype.triggerDownScroll=function(){this.optDown.beforeLoading&&this.optDown.beforeLoading(this)||(this.showDownScroll(),!this.optDown.native&&this.optDown.callback&&this.optDown.callback(this))},n.prototype.showDownScroll=function(){this.isDownScrolling=!0,this.optDown.native?(e.startPullDownRefresh(),this.showDownLoadingCall(0)):(this.downHight=this.optDown.offset,this.showDownLoadingCall(this.downHight))},n.prototype.showDownLoadingCall=function(e){this.optDown.showLoading&&this.optDown.showLoading(this,e),this.optDown.afterLoading&&this.optDown.afterLoading(this,e)},n.prototype.onPullDownRefresh=function(){this.isDownScrolling=!0,this.showDownLoadingCall(0),this.optDown.callback&&this.optDown.callback(this)},n.prototype.endDownScroll=function(){if(this.optDown.native)return this.isDownScrolling=!1,this.endDownScrollCall(this),void e.stopPullDownRefresh();var t=this,n=function(){t.downHight=0,t.isDownScrolling=!1,t.endDownScrollCall(t),t.isScrollBody||(t.setScrollHeight(0),t.scrollTo(0,0))},r=0;t.optDown.beforeEndDownScroll&&(r=t.optDown.beforeEndDownScroll(t),null==t.isDownEndSuccess&&(r=0)),"number"===typeof r&&r>0?setTimeout(n,r):n()},n.prototype.endDownScrollCall=function(){this.optDown.endDownScroll&&this.optDown.endDownScroll(this),this.optDown.afterEndDownScroll&&this.optDown.afterEndDownScroll(this)},n.prototype.lockDownScroll=function(e){null==e&&(e=!0),this.optDown.isLock=e},n.prototype.lockUpScroll=function(e){null==e&&(e=!0),this.optUp.isLock=e},n.prototype.initUpScroll=function(){var e=this;e.optUp=e.options.up||{use:!1},!e.optUp.textColor&&e.hasColor(e.optUp.bgColor)&&(e.optUp.textColor="#fff"),e.extendUpScroll(e.optUp),!1!==e.optUp.use&&(e.optUp.hasNext=!0,e.startNum=e.optUp.page.num+1,e.optUp.inited&&setTimeout((function(){e.optUp.inited(e)}),0))},n.prototype.onReachBottom=function(){this.isScrollBody&&!this.isUpScrolling&&!this.optUp.isLock&&this.optUp.hasNext&&this.triggerUpScroll()},n.prototype.onPageScroll=function(e){this.isScrollBody&&(this.setScrollTop(e.scrollTop),e.scrollTop>=this.optUp.toTop.offset?this.showTopBtn():this.hideTopBtn())},n.prototype.scroll=function(e,t){this.setScrollTop(e.scrollTop),this.setScrollHeight(e.scrollHeight),null==this.preScrollY&&(this.preScrollY=0),this.isScrollUp=e.scrollTop-this.preScrollY>0,this.preScrollY=e.scrollTop,this.isScrollUp&&this.triggerUpScroll(!0),e.scrollTop>=this.optUp.toTop.offset?this.showTopBtn():this.hideTopBtn(),this.optUp.onScroll&&t&&t()},n.prototype.triggerUpScroll=function(e){if(!this.isUpScrolling&&this.optUp.use&&this.optUp.callback){if(!0===e){var t=!1;if(!this.optUp.hasNext||this.optUp.isLock||this.isDownScrolling||this.getScrollBottom()<=this.optUp.offset&&(t=!0),!1===t)return}this.showUpScroll(),this.optUp.page.num++,this.isUpAutoLoad=!0,this.num=this.optUp.page.num,this.size=this.optUp.page.size,this.time=this.optUp.page.time,this.optUp.callback(this)}},n.prototype.showUpScroll=function(){this.isUpScrolling=!0,this.optUp.showLoading&&this.optUp.showLoading(this)},n.prototype.showNoMore=function(){this.optUp.hasNext=!1,this.optUp.showNoMore&&this.optUp.showNoMore(this)},n.prototype.hideUpScroll=function(){this.optUp.hideUpScroll&&this.optUp.hideUpScroll(this)},n.prototype.endUpScroll=function(e){null!=e&&(e?this.showNoMore():this.hideUpScroll()),this.isUpScrolling=!1},n.prototype.resetUpScroll=function(e){if(this.optUp&&this.optUp.use){var t=this.optUp.page;this.prePageNum=t.num,this.prePageTime=t.time,t.num=this.startNum,t.time=null,this.isDownScrolling||!1===e||(null==e?(this.removeEmpty(),this.showUpScroll()):this.showDownScroll()),this.isUpAutoLoad=!0,this.num=t.num,this.size=t.size,this.time=t.time,this.optUp.callback&&this.optUp.callback(this)}},n.prototype.setPageNum=function(e){this.optUp.page.num=e-1},n.prototype.setPageSize=function(e){this.optUp.page.size=e},n.prototype.endByPage=function(e,t,n){var r;this.optUp.use&&null!=t&&(r=this.optUp.page.nume.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(e[n])){var r=t[n];t[n]=function(t){M(e[n],t).then((function(e){return _(r)&&r(e)||e}))}}})),t}function B(e,t){var n=[];Array.isArray(A.returnValue)&&n.push.apply(n,p(A.returnValue));var r=j[e];return r&&Array.isArray(r.returnValue)&&n.push.apply(n,p(r.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function H(e){var t=Object.create(null);Object.keys(A).forEach((function(e){"returnValue"!==e&&(t[e]=A[e].slice())}));var n=j[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function V(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,o=new Array(r>1?r-1:0),i=1;i0&&(e.delta=n)}}}},ve={args:function(e){var t=parseInt(e.current);if(!isNaN(t)){var n=e.urls;if(Array.isArray(n)){var r=n.length;if(r)return t<0?t=0:t>=r&&(t=r-1),t>0?(e.current=n[t],e.urls=n.filter((function(e,r){return!(r2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(k(t)){var i=!0===o?t:{};for(var a in _(n)&&(n=n(t,i)||{}),t)if(S(n,a)){var s=n[a];_(s)&&(s=s(t[a],t,i)),s?w(s)?i[s]=t[a]:k(s)&&(i[s.name?s.name:a]=s.value):console.warn("微信小程序 ".concat(e,"暂不支持").concat(a))}else-1!==Se.indexOf(a)?_(t[a])&&(i[a]=Oe(e,t[a],r)):o||(i[a]=t[a]);return i}return _(t)&&(t=Oe(e,t,r)),t}function Te(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return _(_e.returnValue)&&(t=_e.returnValue(e,t)),xe(e,t,n,{},r)}function Pe(e,t){if(S(_e,e)){var n=_e[e];return n?function(t,r){var o=n;_(n)&&(o=n(t)),t=xe(e,t,o.args,o.returnValue);var i=[t];"undefined"!==typeof r&&i.push(r),_(o.name)?e=o.name(t):w(o.name)&&(e=o.name);var a=wx[e].apply(wx,i);return Q(e)?Te(e,a,o.returnValue,X(e)):a}:function(){console.error("微信小程序 暂不支持".concat(e))}}return t}var Ee=Object.create(null),Ae=["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"];function je(e){return function(t){var n=t.fail,r=t.complete,o={errMsg:"".concat(e,":fail:暂不支持 ").concat(e," 方法")};_(n)&&n(o),_(r)&&r(o)}}Ae.forEach((function(e){Ee[e]=je(e)}));var De={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};function Ce(e){var t=e.service,n=e.success,r=e.fail,o=e.complete,i=!1;De[t]?(i={errMsg:"getProvider:ok",service:t,provider:De[t]},_(n)&&n(i)):(i={errMsg:"getProvider:fail:服务["+t+"]不存在"},_(r)&&r(i)),_(o)&&o(i)}var Ne=Object.freeze({__proto__:null,getProvider:Ce}),Ie=function(){var e;return function(){return e||(e=new r.default),e}}();function Ue(e,t,n){return e[t].apply(e,n)}function qe(){return Ue(Ie(),"$on",Array.prototype.slice.call(arguments))}function $e(){return Ue(Ie(),"$off",Array.prototype.slice.call(arguments))}function Re(){return Ue(Ie(),"$once",Array.prototype.slice.call(arguments))}function Le(){return Ue(Ie(),"$emit",Array.prototype.slice.call(arguments))}var Me=Object.freeze({__proto__:null,$on:qe,$off:$e,$once:Re,$emit:Le}),Fe=Object.freeze({__proto__:null}),Be=Page,He=Component,Ve=/:/g,Ke=x((function(e){return P(e.replace(Ve,"-"))}));function ze(e){if(wx.canIUse("nextTick")){var t=e.triggerEvent;e.triggerEvent=function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};return Ge("onLoad",e),Be(e)},Page.after=Be.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ge("created",e),He(e)});var Ye=["onPullDownRefresh","onReachBottom","onAddToFavorites","onShareTimeline","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function We(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){S(n,t)&&(e[t]=n[t])}))}function Je(e,t){if(!t)return!0;if(r.default.options&&Array.isArray(r.default.options[e]))return!0;if(t=t.default||t,_(t))return!!_(t.extendOptions[e])||!!(t.super&&t.super.options&&Array.isArray(t.super.options[e]));if(_(t[e]))return!0;var n=t.mixins;return Array.isArray(n)?!!n.find((function(t){return Je(e,t)})):void 0}function Xe(e,t,n){t.forEach((function(t){Je(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function Qe(e,t){var n;return t=t.default||t,n=_(t)?t:e.extend(t),t=n.options,[n,t]}function Ze(e,t){if(Array.isArray(t)&&t.length){var n=Object.create(null);t.forEach((function(e){n[e]=!0})),e.$scopedSlots=e.$slots=n}}function et(e,t){e=(e||"").split(",");var n=e.length;1===n?t._$vueId=e[0]:2===n&&(t._$vueId=e[0],t._$vuePid=e[1])}function tt(e,t){var n=e.data||{},r=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(o){Object({VUE_APP_NAME:"大庆小程序",VUE_APP_PLATFORM:"mp-weixin",NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(o){}return k(n)||(n={}),Object.keys(r).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||S(n,e)||(n[e]=r[e])})),n}var nt=[String,Number,Boolean,Object,Array,null];function rt(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function ot(e,t){var n=e.behaviors,r=e.extends,o=e.mixins,i=e.props;i||(e.props=i=[]);var a=[];return Array.isArray(n)&&n.forEach((function(e){a.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(i)?(i.push("name"),i.push("value")):(i.name={type:String,default:""},i.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),k(r)&&r.props&&a.push(t({properties:at(r.props,!0)})),Array.isArray(o)&&o.forEach((function(e){k(e)&&e.props&&a.push(t({properties:at(e.props,!0)}))})),a}function it(e,t,n,r){return Array.isArray(t)&&1===t.length?t[0]:t}function at(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};return t||(n.vueId={type:String,value:""},n.generic={type:Object,value:null},n.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){n[e]={type:null,observer:rt(e)}})):k(e)&&Object.keys(e).forEach((function(t){var r=e[t];if(k(r)){var o=r.default;_(o)&&(o=o()),r.type=it(t,r.type),n[t]={type:-1!==nt.indexOf(r.type)?r.type:null,value:o,observer:rt(t)}}else{var i=it(t,r);n[t]={type:-1!==nt.indexOf(i)?i:null,observer:rt(t)}}})),n}function st(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=O,e.preventDefault=O,e.target=e.target||{},S(e,"detail")||(e.detail={}),S(e,"markerId")&&(e.detail="object"===typeof e.detail?e.detail:{},e.detail.markerId=e.markerId),k(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}function ut(e,t){var n=e;return t.forEach((function(t){var r=t[0],o=t[2];if(r||"undefined"!==typeof o){var i,a=t[1],s=t[3];Number.isInteger(r)?i=r:r?"string"===typeof r&&r&&(i=0===r.indexOf("#s#")?r.substr(3):e.__get_value(r,n)):i=n,Number.isInteger(i)?n=o:a?Array.isArray(i)?n=i.find((function(t){return e.__get_value(a,t)===o})):k(i)?n=Object.keys(i).find((function(t){return e.__get_value(a,i[t])===o})):console.error("v-for 暂不支持循环数据:",i):n=i[o],s&&(n=e.__get_value(s,n))}})),n}function ct(e,t,n){var r={};return Array.isArray(t)&&t.length&&t.forEach((function(t,o){"string"===typeof t?t?"$event"===t?r["$"+o]=n:"arguments"===t?n.detail&&n.detail.__args__?r["$"+o]=n.detail.__args__:r["$"+o]=[n]:0===t.indexOf("$event.")?r["$"+o]=e.__get_value(t.replace("$event.",""),n):r["$"+o]=e.__get_value(t):r["$"+o]=e:r["$"+o]=ut(e,t)})),r}function lt(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=!1;if(o&&(a=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return a?[t]:t.detail.__args__||t.detail;var s=ct(e,r,t),u=[];return n.forEach((function(e){"$event"===e?"__set_model"!==i||o?o&&!a?u.push(t.detail.__args__[0]):u.push(t):u.push(t.target.value):Array.isArray(e)&&"o"===e[0]?u.push(lt(e)):"string"===typeof e&&S(s,e)?u.push(s[e]):u.push(e)})),u}var pt="~",ht="^";function dt(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}function vt(e){var t=e.$parent;while(t&&t.$parent&&(t.$options.generic||t.$parent.$options.generic||t.$scope._$vuePid))t=t.$parent;return t&&t.$parent}function gt(e){var t=this;e=st(e);var n=(e.currentTarget||e.target).dataset;if(!n)return console.warn("事件信息不存在");var r=n.eventOpts||n["event-opts"];if(!r)return console.warn("事件信息不存在");var o=e.type,i=[];return r.forEach((function(n){var r=n[0],a=n[1],s=r.charAt(0)===ht;r=s?r.slice(1):r;var u=r.charAt(0)===pt;r=u?r.slice(1):r,a&&dt(o,r)&&a.forEach((function(n){var r=n[0];if(r){var o=t.$vm;if(o.$options.generic&&(o=vt(o)||o),"$emit"===r)return void o.$emit.apply(o,ft(t.$vm,e,n[1],n[2],s,r));var a=o[r];if(!_(a))throw new Error(" _vm.".concat(r," is not a function"));if(u){if(a.once)return;a.once=!0}var c=ft(t.$vm,e,n[1],n[2],s,r);c=Array.isArray(c)?c:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(a.toString())&&(c=c.concat([,,,,,,,,,,e])),i.push(a.apply(o,c))}}))})),"input"===o&&1===i.length&&"undefined"!==typeof i[0]?i[0]:void 0}var yt={},mt=[];function bt(e){if(e){var t=yt[e];return delete yt[e],t}return mt.shift()}var _t=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function wt(){r.default.prototype.getOpenerEventChannel=function(){return this.$scope.getOpenerEventChannel()};var e=r.default.prototype.__call_hook;r.default.prototype.__call_hook=function(t,n){return"onLoad"===t&&n&&n.__id__&&(this.__eventChannel__=bt(n.__id__),delete n.__id__),e.call(this,t,n)}}function kt(e,t){var n=t.mocks,o=t.initRefs;wt(),e.$options.store&&(r.default.prototype.$store=e.$options.store),r.default.prototype.mpHost="mp-weixin",r.default.mixin({beforeCreate:function(){this.$options.mpType&&(this.mpType=this.$options.mpType,this.$mp=f({data:{}},this.mpType,this.$options.mpInstance),this.$scope=this.$options.mpInstance,delete this.$options.mpType,delete this.$options.mpInstance,"app"!==this.mpType&&(o(this),We(this,n)))}});var i={onLaunch:function(t){this.$vm||(wx.canIUse("nextTick")||console.error("当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上"),this.$vm=e,this.$vm.$mp={app:this},this.$vm.$scope=this,this.$vm.globalData=this.globalData,this.$vm._isMounted=!0,this.$vm.__call_hook("mounted",t),this.$vm.__call_hook("onLaunch",t))}};i.globalData=e.$options.globalData||{};var a=e.$options.methods;return a&&Object.keys(a).forEach((function(e){i[e]=a[e]})),Xe(i,_t),i}var St=["__route__","__wxExparserNodeId__","__wxWebviewId__"];function Ot(e,t){for(var n,r=e.$children,o=r.length-1;o>=0;o--){var i=r[o];if(i.$scope._$vueId===t)return i}for(var a=r.length-1;a>=0;a--)if(n=Ot(r[a],t),n)return n}function xt(e){return Behavior(e)}function Tt(){return!!this.route}function Pt(e){this.triggerEvent("__l",e)}function Et(e,t,n){var r=e.selectAllComponents(t);r.forEach((function(e){var r=e.dataset.ref;n[r]=e.$vm||e,"scoped"===e.dataset.vueGeneric&&e.selectAllComponents(".scoped-ref").forEach((function(e){Et(e,t,n)}))}))}function At(e){var t=e.$scope;Object.defineProperty(e,"$refs",{get:function(){var e={};Et(t,".vue-ref",e);var n=t.selectAllComponents(".vue-ref-in-for");return n.forEach((function(t){var n=t.dataset.ref;e[n]||(e[n]=[]),e[n].push(t.$vm||t)})),e}})}function jt(e){var t,n=e.detail||e.value,r=n.vuePid,o=n.vueOptions;r&&(t=Ot(this.$vm,r)),t||(t=this.$vm),o.parent=t}function Dt(e){return kt(e,{mocks:St,initRefs:At})}function Ct(e){return App(Dt(e)),e}var Nt=/[!'()*]/g,It=function(e){return"%"+e.charCodeAt(0).toString(16)},Ut=/%2C/g,qt=function(e){return encodeURIComponent(e).replace(Nt,It).replace(Ut,",")};function $t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qt,n=e?Object.keys(e).map((function(n){var r=e[n];if(void 0===r)return"";if(null===r)return t(n);if(Array.isArray(r)){var o=[];return r.forEach((function(e){void 0!==e&&(null===e?o.push(t(n)):o.push(t(n)+"="+t(e)))})),o.join("&")}return t(n)+"="+t(r)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function Rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,o=t.initRelation,i=Qe(r.default,e),u=s(i,2),c=u[0],l=u[1],f=a({multipleSlots:!0,addGlobalClass:!0},l.options||{});l["mp-weixin"]&&l["mp-weixin"].options&&Object.assign(f,l["mp-weixin"].options);var p={options:f,data:tt(l,r.default.prototype),behaviors:ot(l,xt),properties:at(l.props,!1,l.__file),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};et(e.vueId,this),o.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new c(t),Ze(this.$vm,e.vueSlots),this.$vm.$mount()},ready:function(){this.$vm&&(this.$vm._isMounted=!0,this.$vm.__call_hook("mounted"),this.$vm.__call_hook("onReady"))},detached:function(){this.$vm&&this.$vm.$destroy()}},pageLifetimes:{show:function(e){this.$vm&&this.$vm.__call_hook("onPageShow",e)},hide:function(){this.$vm&&this.$vm.__call_hook("onPageHide")},resize:function(e){this.$vm&&this.$vm.__call_hook("onPageResize",e)}},methods:{__l:jt,__e:gt}};return l.externalClasses&&(p.externalClasses=l.externalClasses),Array.isArray(l.wxsCallMethods)&&l.wxsCallMethods.forEach((function(e){p.methods[e]=function(t){return this.$vm[e](t)}})),n?p:[p,c]}function Lt(e){return Rt(e,{isPage:Tt,initRelation:Pt})}var Mt=["onShow","onHide","onUnload"];function Ft(e,t){t.isPage,t.initRelation;var n=Lt(e);return Xe(n.methods,Mt,e),n.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+$t(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},n}function Bt(e){return Ft(e,{isPage:Tt,initRelation:Pt})}function Ht(e){return Component(Bt(e))}function Vt(e){return Component(Lt(e))}function Kt(e){var t=Dt(e),n=getApp({allowDefault:!0}),r=n.globalData;if(r&&Object.keys(t.globalData).forEach((function(e){S(r,e)||(r[e]=t.globalData[e])})),Object.keys(t).forEach((function(e){S(n,e)||(n[e]=t[e])})),_(t.onShow)&&wx.onAppShow&&wx.onAppShow((function(){for(var e=arguments.length,r=new Array(e),o=0;o=0&&Math.floor(t)===t&&isFinite(e)}function h(e){return o(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function d(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function g(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function _(e,t){return b.call(e,t)}function w(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var k=/-(\w)/g,S=w((function(e){return e.replace(k,(function(e,t){return t?t.toUpperCase():""}))})),O=w((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),x=/\B([A-Z])/g,T=w((function(e){return e.replace(x,"-$1").toLowerCase()}));function P(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function E(e,t){return e.bind(t)}var A=Function.prototype.bind?E:P;function j(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function D(e,t){for(var n in t)e[n]=t[n];return e}function C(e){for(var t={},n=0;n0),te=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===X),ne=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/),{}.watch);if(W)try{var re={};Object.defineProperty(re,"passive",{get:function(){}}),window.addEventListener("test-passive",null,re)}catch(no){}var oe=function(){return void 0===G&&(G=!W&&!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),G},ie=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"===typeof e&&/native code/.test(e.toString())}var se,ue="undefined"!==typeof Symbol&&ae(Symbol)&&"undefined"!==typeof Reflect&&ae(Reflect.ownKeys);se="undefined"!==typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ce=N,le=0,fe=function(){this.id=le++,this.subs=[]};function pe(e){fe.SharedObject.targetStack.push(e),fe.SharedObject.target=e,fe.target=e}function he(){fe.SharedObject.targetStack.pop(),fe.SharedObject.target=fe.SharedObject.targetStack[fe.SharedObject.targetStack.length-1],fe.target=fe.SharedObject.target}fe.prototype.addSub=function(e){this.subs.push(e)},fe.prototype.removeSub=function(e){m(this.subs,e)},fe.prototype.depend=function(){fe.SharedObject.target&&fe.SharedObject.target.addDep(this)},fe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(i&&!_(o,"default"))a=!1;else if(""===a||a===T(e)){var u=We(String,o.type);(u<0||s0&&(a=wt(a,(t||"")+"_"+n),_t(a[0])&&_t(c)&&(l[u]=ye(c.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?_t(c)?l[u]=ye(c.text+a):""!==a&&l.push(ye(a)):_t(a)&&_t(c)?l[u]=ye(c.text+a.text):(i(e._isVList)&&o(a.tag)&&r(a.key)&&o(t)&&(a.key="__vlist"+t+"_"+n+"__"),l.push(a)));return l}function kt(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function St(e){var t=Ot(e.$options.inject,e);t&&(Oe(!1),Object.keys(t).forEach((function(n){Ae(e,n,t[n])})),Oe(!0))}function Ot(e,t){if(e){for(var n=Object.create(null),r=ue?Reflect.ownKeys(e):Object.keys(e),o=0;o0,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var u in o={},e)e[u]&&"$"!==u[0]&&(o[u]=Et(t,u,e[u]))}else o={};for(var c in t)c in o||(o[c]=At(t,c));return e&&Object.isExtensible(e)&&(e._normalized=o),V(o,"$stable",a),V(o,"$key",s),V(o,"$hasNormal",i),o}function Et(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:bt(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function At(e,t){return function(){return e[t]}}function jt(e,t){var n,r,i,a,s;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,i=e.length;r1?j(n):n;for(var r=j(arguments,1),o='event handler for "'+e+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Mn=function(){return Fn.now()})}function Bn(){var e,t;for(Mn(),$n=!0,Nn.sort((function(e,t){return e.id-t.id})),Rn=0;RnRn&&Nn[n].id>e.id)n--;Nn.splice(n+1,0,e)}else Nn.push(e);qn||(qn=!0,ut(Bn))}}var Gn=0,Yn=function(e,t,n,r,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Gn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new se,this.newDepIds=new se,this.expression="","function"===typeof t?this.getter=t:(this.getter=z(t),this.getter||(this.getter=N)),this.value=this.lazy?void 0:this.get()};Yn.prototype.get=function(){var e;pe(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(no){if(!this.user)throw no;Je(no,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&<(e),he(),this.cleanupDeps()}return e},Yn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Yn.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Yn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():zn(this)},Yn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(no){Je(no,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Yn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Yn.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},Yn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var Wn={enumerable:!0,configurable:!0,get:N,set:N};function Jn(e,t,n){Wn.get=function(){return this[t][n]},Wn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Wn)}function Xn(e){e._watchers=[];var t=e.$options;t.props&&Qn(e,t.props),t.methods&&ar(e,t.methods),t.data?Zn(e):Ee(e._data={},!0),t.computed&&nr(e,t.computed),t.watch&&t.watch!==ne&&sr(e,t.watch)}function Qn(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;i||Oe(!1);var a=function(i){o.push(i);var a=Ke(i,t,n,e);Ae(r,i,a),i in e||Jn(e,"_props",i)};for(var s in t)a(s);Oe(!0)}function Zn(e){var t=e.$options.data;t=e._data="function"===typeof t?er(t,e):t||{},l(t)||(t={});var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);while(o--){var i=n[o];0,r&&_(r,i)||H(i)||Jn(e,"_data",i)}Ee(t,!0)}function er(e,t){pe();try{return e.call(t,t)}catch(no){return Je(no,t,"data()"),{}}finally{he()}}var tr={lazy:!0};function nr(e,t){var n=e._computedWatchers=Object.create(null),r=oe();for(var o in t){var i=t[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new Yn(e,a||N,N,tr)),o in e||rr(e,o,i)}}function rr(e,t,n){var r=!oe();"function"===typeof n?(Wn.get=r?or(t):ir(n),Wn.set=N):(Wn.get=n.get?r&&!1!==n.cache?or(t):ir(n.get):N,Wn.set=n.set||N),Object.defineProperty(e,t,Wn)}function or(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),fe.SharedObject.target&&t.depend(),t.value}}function ir(e){return function(){return e.call(this,this)}}function ar(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?N:A(t[n],e)}function sr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=j(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function yr(e){e.mixin=function(e){return this.options=He(this.options,e),this}}function mr(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name;var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=He(n.options,e),a["super"]=n,a.options.props&&br(a),a.options.computed&&_r(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,L.forEach((function(e){a[e]=n[e]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=D({},a.options),o[r]=a,a}}function br(e){var t=e.options.props;for(var n in t)Jn(e.prototype,"_props",n)}function _r(e){var t=e.options.computed;for(var n in t)rr(e.prototype,n,t[n])}function wr(e){L.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function kr(e){return e&&(e.Ctor.options.name||e.tag)}function Sr(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Or(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=kr(a.componentOptions);s&&!t(s)&&xr(n,i,r,o)}}}function xr(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,m(n,t)}fr(vr),cr(vr),Sn(vr),Pn(vr),pn(vr);var Tr=[String,RegExp,Array],Pr={name:"keep-alive",abstract:!0,props:{include:Tr,exclude:Tr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)xr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Or(e,(function(e){return Sr(t,e)}))})),this.$watch("exclude",(function(t){Or(e,(function(e){return!Sr(t,e)}))}))},render:function(){var e=this.$slots.default,t=yn(e),n=t&&t.componentOptions;if(n){var r=kr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Sr(i,r))||a&&r&&Sr(a,r))return t;var s=this,u=s.cache,c=s.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;u[l]?(t.componentInstance=u[l].componentInstance,m(c,l),c.push(l)):(u[l]=t,c.push(l),this.max&&c.length>parseInt(this.max)&&xr(u,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Er={KeepAlive:Pr};function Ar(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:ce,extend:D,mergeOptions:He,defineReactive:Ae},e.set=je,e.delete=De,e.nextTick=ut,e.observable=function(e){return Ee(e),e},e.options=Object.create(null),L.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,D(e.options.components,Er),gr(e),yr(e),mr(e),wr(e)}Ar(vr),Object.defineProperty(vr.prototype,"$isServer",{get:oe}),Object.defineProperty(vr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(vr,"FunctionalRenderContext",{value:Kt}),vr.version="2.6.11";var jr="[object Array]",Dr="[object Object]";function Cr(e,t){var n={};return Nr(e,t),Ir(e,t,"",n),n}function Nr(e,t){if(e!==t){var n=qr(e),r=qr(t);if(n==Dr&&r==Dr){if(Object.keys(e).length>=Object.keys(t).length)for(var o in t){var i=e[o];void 0===i?e[o]=null:Nr(i,t[o])}}else n==jr&&r==jr&&e.length>=t.length&&t.forEach((function(t,n){Nr(e[n],t)}))}}function Ir(e,t,n,r){if(e!==t){var o=qr(e),i=qr(t);if(o==Dr)if(i!=Dr||Object.keys(e).length1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Jr(e){return Array.isArray(e)?C(e):"string"===typeof e?Wr(e):e}var Xr=["createSelectorQuery","createIntersectionObserver","selectAllComponents","selectComponent"];function Qr(e,t){var n=t.split("."),r=n[0];return 0===r.indexOf("__$n")&&(r=parseInt(r.replace("__$n",""))),1===n.length?e[r]:Qr(e[r],n.slice(1).join("."))}function Zr(e){e.config.errorHandler=function(t,n,r){e.util.warn("Error in "+r+': "'+t.toString()+'"',n),console.error(t);var o=getApp();o&&o.onError&&o.onError(t)};var t=e.prototype.$emit;e.prototype.$emit=function(e){return this.$scope&&e&&this.$scope["triggerEvent"](e,{__args__:j(arguments,1)}),t.apply(this,arguments)},e.prototype.$nextTick=function(e){return Lr(this,e)},Xr.forEach((function(t){e.prototype[t]=function(e){return this.$scope&&this.$scope[t]?this.$scope[t](e):"undefined"!==typeof my?"createSelectorQuery"===t?my.createSelectorQuery(e):"createIntersectionObserver"===t?my.createIntersectionObserver(e):void 0:void 0}})),e.prototype.__init_provide=kt,e.prototype.__init_injections=St,e.prototype.__call_hook=function(e,t){var n=this;pe();var r,o=n.$options[e],i=e+" hook";if(o)for(var a=0,s=o.length;a0&&t<=20?t:2,e=parseFloat((e+"").replace(/[^\d\.-]/g,"")).toFixed(t)+"";for(var n=e.split(".")[0].split("").reverse(),r=e.split(".")[1],o="",i=0;i0){for(var f=0,p=t.length,h=0;h0&&(l+=o[0]),f=0,l+=o[parseInt(d)]+i[y]),0==y&&f<4&&(l+=a[g])}l+=c}if(""!=n)for(var m=n.length,b=0;b0&&void 0!==o[0]?o[0]:{},e.prev=1,e.next=4,S(t);case 4:n=e.sent,t.onSelectComplete&&t.onSelectComplete(n),e.next=12;break;case 8:return e.prev=8,e.t0=e["catch"](1),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 12:if(!n){e.next=14;break}return e.abrupt("return",this.qnFileUpload(u(u({},t),{},{files:n})));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"qnVideoUpload",value:function(){var e=f(r.default.mark((function e(){var t,n,o=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.prev=1,e.next=4,O(t);case 4:n=e.sent,t.onSelectComplete&&t.onSelectComplete(n),e.next=12;break;case 8:return e.prev=8,e.t0=e["catch"](1),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 12:if(!n){e.next=14;break}return e.abrupt("return",this.qnFileUpload(u(u({},t),{},{files:n})));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"qnFileUpload",value:function(){var e=f(r.default.mark((function e(){var t,n,o,i,a,s=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=s.length>0&&void 0!==s[0]?s[0]:{},e.prev=1,n=u(u(u({},this.config),t),{},{header:{},method:"FILE"}),!this.requestStart){e.next=11;break}if(o=this.requestStart(n),"object"!=typeof o){e.next=10;break}i=["load","files"],i.forEach((function(e){n[e]=o[e]})),e.next=11;break;case 10:throw{errMsg:"【request】请求开始拦截器未通过",statusCode:0,data:n.data,method:n.method,header:n.header,url:n.url};case 11:return e.next=13,x(n,this.getQnToken);case 13:return a=e.sent,e.abrupt("return",Promise.resolve(a));case 17:return e.prev=17,e.t0=e["catch"](1),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 21:return e.prev=21,this.requestEnd&&this.requestEnd(n),e.finish(21);case 24:case"end":return e.stop()}}),e,this,[[1,17,21,24]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"urlImgUpload",value:function(){var e=f(r.default.mark((function e(){var t,n=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t={},n[0]&&("string"==typeof n[0]?t.url=n[0]:"object"==typeof n[0]&&(t=Object.assign(t,n[0]))),n[1]&&"object"==typeof n[1]&&(t=Object.assign(t,n[1])),e.prev=3,e.next=6,S(t);case 6:t.files=e.sent,t.onSelectComplete&&t.onSelectComplete(t.files),e.next=14;break;case 10:return e.prev=10,e.t0=e["catch"](3),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 14:if(!t.files){e.next=16;break}return e.abrupt("return",this.urlFileUpload(t));case 16:case"end":return e.stop()}}),e,this,[[3,10]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"urlVideoUpload",value:function(){var e=f(r.default.mark((function e(){var t,n=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t={},n[0]&&("string"==typeof n[0]?t.url=n[0]:"object"==typeof n[0]&&(t=Object.assign(t,n[0]))),n[1]&&"object"==typeof n[1]&&(t=Object.assign(t,n[1])),e.prev=3,e.next=6,O(t);case 6:t.files=e.sent,t.onSelectComplete&&t.onSelectComplete(t.files),e.next=14;break;case 10:return e.prev=10,e.t0=e["catch"](3),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 14:if(!t.files){e.next=16;break}return e.abrupt("return",this.urlFileUpload(t));case 16:case"end":return e.stop()}}),e,this,[[3,10]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"urlFileUpload",value:function(){var e=f(r.default.mark((function e(){var t,n,o,a,s,u=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t={method:"FILE"},u[0]&&("string"==typeof u[0]?t.url=u[0]:"object"==typeof u[0]&&(t=Object.assign(t,u[0]))),u[1]&&"object"==typeof u[1]&&(t=Object.assign(t,u[1])),!t.url&&this.defaultUploadUrl&&(t.url=this.defaultUploadUrl),n=!1,e.prev=5,t.url){e.next=8;break}throw{errMsg:"【request】文件上传缺失数据url",statusCode:0,data:t.data,method:t.method,header:t.header,url:t.url};case 8:if(t=(0,i.mergeConfig)(this,t),n=!0,!this.requestStart){e.next=18;break}if(o=this.requestStart(t),"object"!=typeof o){e.next=17;break}a=["data","header","isPrompt","load","isFactory","files"],a.forEach((function(e){t[e]=o[e]})),e.next=18;break;case 17:throw{errMsg:"【request】请求开始拦截器未通过",statusCode:0,data:t.data,method:t.method,header:t.header,url:t.url};case 18:return e.next=20,T(t,this.dataFactory);case 20:return s=e.sent,e.abrupt("return",Promise.resolve(s));case 24:return e.prev=24,e.t0=e["catch"](5),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 28:return e.prev=28,n&&this.requestEnd&&this.requestEnd(t),e.finish(28);case 31:case"end":return e.stop()}}),e,this,[[5,24,28,31]])})));function t(){return e.apply(this,arguments)}return t}()}]),n}(o.default);t.default=P},8367:function(e,t,n){"use strict";(function(e){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n="0123456789qwertyuioplkjhgfdsazxcvbnm",r="",o=new Date,i=0;ic?l(c+1):n(u)}),(function(e){r(e)}),{region:t.region||"SCN",domain:t.visitPrefix,key:p,uptoken:t.token,uptokenURL:"UpTokenURL.com/uptoken"},(function(t){console.log(e),e.onProgressUpdate&&e.onProgressUpdate(Object.assign({},h,t))}))}"/"==t.visitPrefix.charAt(c-1)&&(t.visitPrefix=t.visitPrefix.substring(0,c-1)),l(0)})):r({errMsg:"请添加七牛云回调方法:getQnToken",statusCode:0})}else r({errMsg:"files 必须是数组类型",statusCode:0})}))};t.qiniuUpload=l;var f=function(t,n){return new Promise((function(r,i){if(t.header["Content-Type"]&&delete t.header["Content-Type"],t.header["content-type"]&&delete t.header["content-type"],Array.isArray(t.files)){var a=function a(c){var l=t.files[c],f=o({fileIndex:c,files:t.files},l),p={url:t.url,filePath:l.path,header:t.header,name:t.name||"file",success:function(e){t.isFactory&&n?n(o(o({},t),{},{response:e})).then((function(e){u.push(e),t.onEachUpdate&&t.onEachUpdate(o({data:e},f)),s<=c?r(u):a(c+1)}),(function(e){i(e)})):(t.onEachUpdate&&t.onEachUpdate(o({data:e},f)),u.push(e),s<=c?r(u):a(c+1))},fail:function(e){i(e)}};t.data&&(p.formData=t.data);var h=e.uploadFile(p);h.onProgressUpdate((function(e){t.onProgressUpdate&&t.onProgressUpdate(Object.assign({},f,e))}))},s=t.files.length-1,u=new Array;a(0)}else i({errMsg:"files 必须是数组类型",statusCode:0})}))};t.urlUpload=f}).call(this,n("543d")["default"])},"8e2b":function(e,t,n){(function(t){getApp().globalData.url;function n(){return new Promise((function(e,n){t.chooseMedia({count:1,mediaType:["image","video"],sourceType:["album","camera"],maxDuration:30,camera:"back",success:function(r){if(r.tempFiles.length>0){console.log(r,"看下是啥格式");var o=r.tempFiles[0].tempFilePath,i=r.tempFiles[0].size;if(i<8388608){t.showLoading({title:"上传中"});t.uploadFile({url:"https://www.huorantech.cn/dqwg/api-guarantee/dg-apply-amount-info/uploadFile",filePath:o,header:{token:t.getStorageSync("token"),"Content-Type":"multipart/form-data;boundary=----WebKitFormBoundaryi8lPVoSysovJLNqi",Accept:"application/json"},name:"file",success:function(r){if(500==r.statusCode)t.showToast({title:"上传失败",icon:"none"}),n("失败");else if(t.showToast({title:"上传成功",icon:"success"}),r.data){var o=JSON.parse(r.data).data[0],i=o.lastIndexOf("."),a=o.substr(i+1);e({imageurl:o,ext:a})}}})}else t.showToast({title:"超出限制大小",icon:"none"})}else t.showToast({title:"文件不存在",icon:"none"})}})}))}function r(){return new Promise((function(e,n){t.chooseMessageFile({count:1,type:"file",success:function(r){if(r.tempFiles.length>0){if(!(r.tempFiles[0].size<8388608))return void t.showToast({title:"超出限制大小",icon:"none"});t.showLoading({title:"上传中"}),t.uploadFile({url:"https://www.huorantech.cn/dqwg/api-guarantee/dg-apply-amount-info/uploadFile",filePath:r.tempFiles[0].path,name:"file",header:{token:t.getStorageSync("token"),"Content-Type":"multipart/form-data; boundary=----WebKitFormBoundaryi8lPVoSysovJLNqi",Accept:"application/json"},success:function(r){if(500!=r.statusCode)if(t.showToast({title:"文件上传成功",icon:"success"}),r.data){var o=JSON.parse(r.data).data[0],i=o.lastIndexOf("."),a=o.substr(i+1);e({pdfurl:o,ext:a})}else n("失败");else t.showToast({title:"服务器错误",icon:"none"})}})}else t.showToast({title:"文件不存在",icon:"none"})}})}))}e.exports={uploadImage:n,uploadPdf:r}}).call(this,n("543d")["default"])},"921b":function(e,t,n){"use strict";(function(e){var t=n("8189");function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function i(e){var t=u();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}function a(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;nm;return{residenceTime:t,overtime:n}}if("page"===e){var r=t>y;return{residenceTime:t,overtime:r}}return{residenceTime:t}},J=function(){var e=getCurrentPages(),t=e[e.length-1];if(!t)return"";var n=t.$vm;return"bd"===E()?n.$mp&&n.$mp.page.is:n.$scope&&n.$scope.route||n.$mp&&n.$mp.page.route},X=function(e){var t=getCurrentPages(),n=t[t.length-1];if(!n)return"";var r=n.$vm,o=e._query,i=o&&"{}"!==JSON.stringify(o)?"?"+JSON.stringify(o):"";return e._query="","bd"===E()?r.$mp&&r.$mp.page.is+i:r.$scope&&r.$scope.route+i||r.$mp&&r.$mp.page.route+i},Q=function(e){return!!("page"===e.mpType||e.$mp&&"page"===e.$mp.mpType||"page"===e.$options.mpType)},Z=function(e,t){return e?"string"!==typeof e?(console.error("uni.report [eventName] 参数类型错误,只能为 String 类型"),!0):e.length>255?(console.error("uni.report [eventName] 参数长度不能大于 255"),!0):"string"!==typeof t&&"object"!==typeof t?(console.error("uni.report [options] 参数类型错误,只能为 String 或 Object 类型"),!0):"string"===typeof t&&t.length>255?(console.error("uni.report [options] 参数长度不能大于 255"),!0):"title"===e&&"string"!==typeof t?(console.error("uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型"),!0):void 0:(console.error("uni.report 缺少 [eventName] 参数"),!0)},ee="Report_Data_Time",te="Report_Status",ne=function(){return new Promise((function(t,n){var r="",o=(new Date).getTime(),i=_,a=1;try{r=e.getStorageSync(ee),a=e.getStorageSync(te)}catch(s){r="",a=1}""!==a?(1===a&&t(),r||(e.setStorageSync(ee,o),r=o),o-r>i&&re((function(t){var n=t.enable;e.setStorageSync(ee,o),e.setStorageSync(te,n)}))):re((function(n){var r=n.enable;e.setStorageSync(ee,o),e.setStorageSync(te,r),1===r&&t()}))}))},re=function(t){var n={usv:d,conf:JSON.stringify({ak:w.appid})};e.request({url:v,method:"GET",data:n,success:function(e){var n=e.data;0===n.ret&&"function"===typeof t&&t({enable:n.enable})},fail:function(n){var r=1;try{r=e.getStorageSync(te)}catch(n){r=1}""===r&&(r=1),"function"===typeof t&&t({enable:r})}})},oe=n("6f9b").default,ie=n("0d12").default||n("0d12"),ae=e.getSystemInfoSync(),se=function(){function t(){l(this,t),this.self="",this._retry=0,this._platform="",this._query={},this._navigationBarTitle={config:"",page:"",report:"",lt:""},this._operatingTime=0,this._reportingRequestData={1:[],11:[]},this.__prevent_triggering=!1,this.__licationHide=!1,this.__licationShow=!1,this._lastPageRoute="",this.statData={uuid:O(),ut:E(),mpn:A(),ak:ie.appid,usv:d,v:j(),ch:D(),cn:"",pn:"",ct:"",t:P(),tt:"",p:"android"===ae.platform?"a":"i",brand:ae.brand||"",md:ae.model,sv:ae.system.replace(/(Android|iOS)\s/,""),mpsdk:ae.SDKVersion||"",mpv:ae.version||"",lang:ae.language,pr:ae.pixelRatio,ww:ae.windowWidth,wh:ae.windowHeight,sw:ae.screenWidth,sh:ae.screenHeight}}return p(t,[{key:"getIsReportData",value:function(){return ne()}},{key:"_applicationShow",value:function(){if(this.__licationHide){Y();var e=W("app");if(e.overtime){var t={path:this._lastPageRoute,scene:this.statData.sc};this._sendReportRequest(t)}this.__licationHide=!1}}},{key:"_applicationHide",value:function(e,t){this.__licationHide=!0,Y();var n=W();G();var r=X(this);this._sendHideRequest({urlref:r,urlref_ts:n.residenceTime},t)}},{key:"_pageShow",value:function(){var e=X(this),t=J();if(this._navigationBarTitle.config=oe&&oe.pages[t]&&oe.pages[t].titleNView&&oe.pages[t].titleNView.titleText||oe&&oe.pages[t]&&oe.pages[t].navigationBarTitleText||"",this.__licationShow)return G(),this.__licationShow=!1,void(this._lastPageRoute=e);Y(),this._lastPageRoute=e;var n=W("page");if(n.overtime){var r={path:this._lastPageRoute,scene:this.statData.sc};this._sendReportRequest(r)}G()}},{key:"_pageHide",value:function(){if(!this.__licationHide){Y();var e=W("page");return this._sendPageRequest({url:this._lastPageRoute,urlref:this._lastPageRoute,urlref_ts:e.residenceTime}),void(this._navigationBarTitle={config:"",page:"",report:"",lt:""})}}},{key:"_login",value:function(){this._sendEventRequest({key:"login"},0)}},{key:"_share",value:function(){this._sendEventRequest({key:"share"},0)}},{key:"_payment",value:function(e){this._sendEventRequest({key:e},0)}},{key:"_sendReportRequest",value:function(e){this._navigationBarTitle.lt="1";var t=e.query&&"{}"!==JSON.stringify(e.query)?"?"+JSON.stringify(e.query):"";this.statData.lt="1",this.statData.url=e.path+t||"",this.statData.t=P(),this.statData.sc=C(e.scene),this.statData.fvts=U(),this.statData.lvts=q(),this.statData.tvc=H(),"n"===E()?this.getProperty():this.getNetworkInfo()}},{key:"_sendPageRequest",value:function(e){var t=e.url,n=e.urlref,r=e.urlref_ts;this._navigationBarTitle.lt="11";var o={ak:this.statData.ak,uuid:this.statData.uuid,lt:"11",ut:this.statData.ut,url:t,tt:this.statData.tt,urlref:n,urlref_ts:r,ch:this.statData.ch,usv:this.statData.usv,t:P(),p:this.statData.p};this.request(o)}},{key:"_sendHideRequest",value:function(e,t){var n=e.urlref,r=e.urlref_ts,o={ak:this.statData.ak,uuid:this.statData.uuid,lt:"3",ut:this.statData.ut,urlref:n,urlref_ts:r,ch:this.statData.ch,usv:this.statData.usv,t:P(),p:this.statData.p};this.request(o,t)}},{key:"_sendEventRequest",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=void 0===t?"":t,r=e.value,o=void 0===r?"":r,i=this._lastPageRoute,a={ak:this.statData.ak,uuid:this.statData.uuid,lt:"21",ut:this.statData.ut,url:i,ch:this.statData.ch,e_n:n,e_v:"object"===typeof o?JSON.stringify(o):o.toString(),usv:this.statData.usv,t:P(),p:this.statData.p};this.request(a)}},{key:"getNetworkInfo",value:function(){var t=this;e.getNetworkType({success:function(e){t.statData.net=e.networkType,t.getLocation()}})}},{key:"getProperty",value:function(){var e=this;plus.runtime.getProperty(plus.runtime.appid,(function(t){e.statData.v=t.version||"",e.getNetworkInfo()}))}},{key:"getLocation",value:function(){var t=this;ie.getLocation?e.getLocation({type:"wgs84",geocode:!0,success:function(e){e.address&&(t.statData.cn=e.address.country,t.statData.pn=e.address.province,t.statData.ct=e.address.city),t.statData.lat=e.latitude,t.statData.lng=e.longitude,t.request(t.statData)}}):(this.statData.lat=0,this.statData.lng=0,this.request(this.statData))}},{key:"request",value:function(t,n){var r=this,o=P(),i=this._navigationBarTitle;t.ttn=i.page,t.ttpj=i.config,t.ttc=i.report;var a=this._reportingRequestData;if("n"===E()&&(a=e.getStorageSync("__UNI__STAT__DATA")||{}),a[t.lt]||(a[t.lt]=[]),a[t.lt].push(t),"n"===E()&&e.setStorageSync("__UNI__STAT__DATA",a),!(F()=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function _(e,t,n,r){var o=t&&t.prototype instanceof k?t:k,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=P(e,n,a),i}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function k(){}function S(){}function O(){}function x(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function T(e){function t(n,r,i,a){var s=w(e[n],e,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"===typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(c).then((function(e){u.value=e,i(u)}),(function(e){return t("throw",e,i,a)}))}a(s.arg)}var n;function r(e,r){function o(){return new Promise((function(n,o){t(e,r,n,o)}))}return n=n?n.then(o,o):o()}this._invoke=r}function P(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return N()}n.method=o,n.arg=i;while(1){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=w(e,t,n);if("normal"===u.type){if(r=n.done?d:p,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}function E(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,E(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=w(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function C(e){if(e){var t=e[a];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){while(++re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(i=0;i>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=function(t){t=t;var n=987654321,r=4294967295;return function(){var o=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},i=0;i>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,c=e.min(4*u,o);if(u){for(var l=0;l>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,a=e[t+0],u=e[t+1],h=e[t+2],d=e[t+3],v=e[t+4],g=e[t+5],y=e[t+6],m=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],k=e[t+11],S=e[t+12],O=e[t+13],x=e[t+14],T=e[t+15],P=i[0],E=i[1],A=i[2],j=i[3];P=c(P,E,A,j,a,7,s[0]),j=c(j,P,E,A,u,12,s[1]),A=c(A,j,P,E,h,17,s[2]),E=c(E,A,j,P,d,22,s[3]),P=c(P,E,A,j,v,7,s[4]),j=c(j,P,E,A,g,12,s[5]),A=c(A,j,P,E,y,17,s[6]),E=c(E,A,j,P,m,22,s[7]),P=c(P,E,A,j,b,7,s[8]),j=c(j,P,E,A,_,12,s[9]),A=c(A,j,P,E,w,17,s[10]),E=c(E,A,j,P,k,22,s[11]),P=c(P,E,A,j,S,7,s[12]),j=c(j,P,E,A,O,12,s[13]),A=c(A,j,P,E,x,17,s[14]),P=l(P,E=c(E,A,j,P,T,22,s[15]),A,j,u,5,s[16]),j=l(j,P,E,A,y,9,s[17]),A=l(A,j,P,E,k,14,s[18]),E=l(E,A,j,P,a,20,s[19]),P=l(P,E,A,j,g,5,s[20]),j=l(j,P,E,A,w,9,s[21]),A=l(A,j,P,E,T,14,s[22]),E=l(E,A,j,P,v,20,s[23]),P=l(P,E,A,j,_,5,s[24]),j=l(j,P,E,A,x,9,s[25]),A=l(A,j,P,E,d,14,s[26]),E=l(E,A,j,P,b,20,s[27]),P=l(P,E,A,j,O,5,s[28]),j=l(j,P,E,A,h,9,s[29]),A=l(A,j,P,E,m,14,s[30]),P=f(P,E=l(E,A,j,P,S,20,s[31]),A,j,g,4,s[32]),j=f(j,P,E,A,b,11,s[33]),A=f(A,j,P,E,k,16,s[34]),E=f(E,A,j,P,x,23,s[35]),P=f(P,E,A,j,u,4,s[36]),j=f(j,P,E,A,v,11,s[37]),A=f(A,j,P,E,m,16,s[38]),E=f(E,A,j,P,w,23,s[39]),P=f(P,E,A,j,O,4,s[40]),j=f(j,P,E,A,a,11,s[41]),A=f(A,j,P,E,d,16,s[42]),E=f(E,A,j,P,y,23,s[43]),P=f(P,E,A,j,_,4,s[44]),j=f(j,P,E,A,S,11,s[45]),A=f(A,j,P,E,T,16,s[46]),P=p(P,E=f(E,A,j,P,h,23,s[47]),A,j,a,6,s[48]),j=p(j,P,E,A,m,10,s[49]),A=p(A,j,P,E,x,15,s[50]),E=p(E,A,j,P,g,21,s[51]),P=p(P,E,A,j,S,6,s[52]),j=p(j,P,E,A,d,10,s[53]),A=p(A,j,P,E,w,15,s[54]),E=p(E,A,j,P,u,21,s[55]),P=p(P,E,A,j,b,6,s[56]),j=p(j,P,E,A,T,10,s[57]),A=p(A,j,P,E,y,15,s[58]),E=p(E,A,j,P,O,21,s[59]),P=p(P,E,A,j,v,6,s[60]),j=p(j,P,E,A,k,10,s[61]),A=p(A,j,P,E,h,15,s[62]),E=p(E,A,j,P,_,21,s[63]),i[0]=i[0]+P|0,i[1]=i[1]+E|0,i[2]=i[2]+A|0,i[3]=i[3]+j|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var i=e.floor(r/4294967296),a=r;n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+o+a;return(s<>>32-i)+t}function l(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+o+a;return(s<>>32-i)+t}function f(e,t,n,r,o,i,a){var s=e+(t^n^r)+o+a;return(s<>>32-i)+t}function p(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+o+a;return(s<>>32-i)+t}t.MD5=i._createHelper(u),t.HmacMD5=i._createHmacHelper(u)}(Math),n.MD5)})),P((function(e,t){var n,r,o;e.exports=(r=(n=E).lib.Base,o=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,u=a.words,c=0;c0&&void 0!==arguments[0]?arguments[0]:8,t="";t.length=400)return r(new I({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var o=e.data;if(o.error)return r(new I({code:o.error.code,message:o.error.message,requestId:t}));o.result=o.data,o.requestId=t,delete o.data,n(o)}}))}))}},H={request:function(e){return r.request(e)},uploadFile:function(e){return r.uploadFile(e)},setStorageSync:function(e,t){return r.setStorageSync(e,t)},getStorageSync:function(e){return r.getStorageSync(e)},removeStorageSync:function(e){return r.removeStorageSync(e)},clearStorageSync:function(){return r.clearStorageSync()}},V=function(){function e(t){d(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error("缺少参数"+e)})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=H}return p(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return B.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):this.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=B.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=B.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}},{key:"getAccessToken",value:function(){var e=this;return this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(t){return new Promise((function(n,r){t.result&&t.result.accessToken?(e.setAccessToken(t.result.accessToken),n(e.accessToken)):r(new I({code:"AUTH_FAILED",message:"获取accessToken失败"}))}))}))}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,o=e.name,i=e.filePath,a=e.fileType,s=e.onUploadProgress;return new Promise((function(e,u){var c=t.adapter.uploadFile({url:n,formData:r,name:o,filePath:i,fileType:a,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):u(new I({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){u(e)}});"function"==typeof s&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(e){var t=this,n=e.filePath,r=e.cloudPath,o=e.fileType,i=void 0===o?"image":o,a=e.onUploadProgress,s=e.config;if(!r)throw new I({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});var u,c,l=s&&s.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:l,filename:r}).then((function(e){var r=e.result;u=r.id,c="https://"+r.cdnDomain+"/"+r.ossPath;var o={url:"https://"+r.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:r.accessKeyId,Signature:r.signature,host:r.host,id:u,key:r.ossPath,policy:r.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:i};return t.uploadFileToOSS(Object.assign({},o,{onUploadProgress:a}))})).then((function(){return t.reportOSSUpload({id:u})})).then((function(e){return new Promise((function(t,r){e.success?t({success:!0,filePath:n,fileID:c}):r(new I({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:t[0]})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new I({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),K={init:function(e){var t=new V(e);["deleteFile","getTempFileURL"].forEach((function(e){t[e]=j(t[e]).bind(t)}));var n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},z=P((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getQuery=function(e,t){if("undefined"==typeof window)return!1;var n=t||window.location.search,r=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},t.getHash=function(e){var t=window.location.hash.match(new RegExp("[#?&/]"+e+"=([^&#]*)"));return t?t[1]:""},t.removeParam=function(e,t){var n=t.split("?")[0],r=[],o=-1!==t.indexOf("?")?t.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===e&&r.splice(i,1);n=n+"?"+r.join("&")}return n},t.createPromiseCallback=function(){var e;if(!Promise){(e=function(){}).promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e},t.getWeixinCode=function(){return t.getQuery("code")||t.getHash("code")},t.getMiniAppCode=function(){return new Promise((function(e,t){wx.login({success:function(t){e(t.code)},fail:function(e){t(e)}})}))},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isString=function(e){return"string"==typeof e},t.isUndefined=function(e){return void 0===e},t.isInstanceOf=function(e,t){return e instanceof t},t.isFormData=function(e){return"[object FormData]"===Object.prototype.toString.call(e)},t.genSeqId=function(){return Math.random().toString(16).slice(2)},t.getArgNames=function(e){var t=e.toString();return t.slice(t.indexOf("(")+1,t.indexOf(")")).match(/([^\s,]+)/g)},t.formatUrl=function(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";for(var i in n)""===o?!r&&(t+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t}})),G="dist/index.js",Y="./dist/index.d.ts",W={build:"npm run tsc && webpack",tsc:"tsc -p tsconfig.json","tsc:w":"tsc -p tsconfig.json -w",test:"jest --verbose false -i",e2e:'NODE_ENV=e2e webpack && jest --config="./jest.e2e.config.js" --verbose false -i "e2e"',start:"webpack-dev-server --hot --open",eslint:'eslint "./**/*.js" "./**/*.ts"',"eslint-fix":'eslint --fix "./**/*.js" "./**/*.ts"',test_web:"npm run tsc && webpack-dev-server --devtool eval-source-map --progress --colors --hot --inline --content-base ./dist --host jimmytest-088bef.tcb.qcloud.la --port 80 --disableHostCheck true --mode development --config webpack.test.js"},J={type:"git",url:"https://github.com/TencentCloudBase/tcb-js-sdk"},X=["tcb","js-sdk"],Q={"@cloudbase/adapter-interface":"^0.2.0","@cloudbase/adapter-wx_mp":"^0.2.1","@cloudbase/database":"^0.9.8"},Z={"@babel/core":"^7.6.2","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-proposal-object-rest-spread":"^7.6.2","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.2","@babel/preset-typescript":"^7.6.0","@babel/runtime":"^7.6.2","@types/jest":"^23.1.4","@types/node":"^10.14.4","@types/superagent":"^4.1.4",axios:"^0.19.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.6","babel-polyfill":"^6.26.0",eslint:"^5.16.0","eslint-config-alloy":"^1.4.2","eslint-config-prettier":"^4.1.0","eslint-plugin-prettier":"^3.0.1","eslint-plugin-typescript":"^1.0.0-rc.3",express:"^4.17.1",husky:"^3.1.0",jest:"^24.7.1","jest-puppeteer":"^4.3.0","lint-staged":"^9.5.0","power-assert":"^1.6.1",puppeteer:"^1.20.0","serve-static":"^1.14.1","ts-jest":"^23.10.4","ts-loader":"^6.2.1",typescript:"^3.4.3","typescript-eslint-parser":"^22.0.0",webpack:"^4.41.3","webpack-bundle-analyzer":"^3.4.1","webpack-cli":"^3.3.0","webpack-dev-server":"^3.3.1","webpack-merge":"^4.2.2","webpack-visualizer-plugin":"^0.1.11"},ee={hooks:{"pre-commit":"lint-staged"}},te={name:"tcb-js-sdk",version:"1.3.5",description:"js sdk for tcb",main:G,types:Y,scripts:W,repository:J,keywords:X,author:"jimmyjzhang",license:"ISC",dependencies:Q,devDependencies:Z,husky:ee,"lint-staged":{"*.{js,ts}":["eslint --fix","git add"]}},ne=(M=Object.freeze({__proto__:null,name:"tcb-js-sdk",version:"1.3.5",description:"js sdk for tcb",main:G,types:Y,scripts:W,repository:J,keywords:X,author:"jimmyjzhang",license:"ISC",dependencies:Q,devDependencies:Z,husky:ee,default:te}))&&M.default||M,re=P((function(e,t){var n=x&&x.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var r=n(ne);t.SDK_VERISON=r.version,t.ACCESS_TOKEN="access_token",t.ACCESS_TOKEN_Expire="access_token_expire",t.REFRESH_TOKEN="refresh_token",t.ANONYMOUS_UUID="anonymous_uuid",t.LOGIN_TYPE_KEY="login_type",t.protocol="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:",t.BASE_URL="//tcb-api.tencentcloudapi.com/web"}));!function(e){e.local="local",e.none="none",e.session="session"}(F||(F={}));var oe=function(){},ie=function(){},ae=Object.freeze({__proto__:null,get StorageType(){return F},AbstractSDKRequest:oe,AbstractStorage:ie,formatUrl:function(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";for(var i in n)""===o?!r&&(t+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t}}),se=P((function(e,t){var n,r=x&&x.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=x&&x.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0?JSON.parse(n).content:""},e.prototype.removeStore=function(e){this.storageClass.removeItem(e)},e}();t.Cache=o;var i=function(e){function t(){var t=e.call(this)||this;return ue.Adapter.adapter.root.tcbObject||(ue.Adapter.adapter.root.tcbObject={}),t}return r(t,e),t.prototype.setItem=function(e,t){ue.Adapter.adapter.root.tcbObject[e]=t},t.prototype.getItem=function(e){return ue.Adapter.adapter.root.tcbObject[e]},t.prototype.removeItem=function(e){delete ue.Adapter.adapter.root.tcbObject[e]},t.prototype.clear=function(){delete ue.Adapter.adapter.root.tcbObject},t}(ae.AbstractStorage)})),le=P((function(e,t){var n,r=x&&x.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=x&&x.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0},e}();t.IEventEmitter=s;var u=new s;t.addEventListener=function(e,t){u.on(e,t)},t.activateEvent=function(e,t){void 0===t&&(t={}),u.fire(e,t)},t.removeEventListener=function(e,t){u.off(e,t)},t.EVENTS={LOGIN_STATE_CHANGED:"loginStateChanged",LOGIN_STATE_EXPIRE:"loginStateExpire",LOGIN_TYPE_CHANGE:"loginTypeChanged",ANONYMOUS_CONVERTED:"anonymousConverted",REFRESH_ACCESS_TOKEN:"refreshAccessToken"}})),fe=P((function(e,t){var n=x&&x.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Date.now())return[2,{credential:{accessToken:e,refreshToken:this.cache.getStore(this.refreshTokenKey)}}];this.cache.removeStore(this.accessTokenKey),this.cache.removeStore(this.accessTokenExpireKey)}if(!1===Object.values(s).includes(s[this.scope]))throw new Error("错误的scope类型");return ue.Adapter.runtime!==ue.RUNTIME.WX_MP?[3,2]:[4,c.getMiniAppCode()];case 1:return n=i.sent(),[3,4];case 2:return[4,c.getWeixinCode()];case 3:if(!(n=i.sent()))return[2,this.redirect()];i.label=4;case 4:return r=function(e){switch(e){case s.snsapi_login:return"WECHAT-OPEN";default:return"WECHAT-PUBLIC"}}(this.scope),[4,this.getRefreshTokenByWXCode(this.appid,r,n)];case 5:return o=i.sent(),a=o.refreshToken,this.cache.setStore(this.refreshTokenKey,a),o.accessToken&&this.cache.setStore(this.accessTokenKey,o.accessToken),o.accessTokenExpire&&this.cache.setStore(this.accessTokenExpireKey,o.accessTokenExpire+Date.now()),le.activateEvent(le.EVENTS.LOGIN_STATE_CHANGED),le.activateEvent(le.EVENTS.LOGIN_TYPE_CHANGE,l.LOGINTYPE.WECHAT),[2,{credential:{refreshToken:a}}]}}))}))},t.prototype.redirect=function(){var e=c.removeParam("code",location.href);e=c.removeParam("state",e),e=encodeURIComponent(e);var t="//open.weixin.qq.com/connect/oauth2/authorize";"snsapi_login"===this.scope&&(t="//open.weixin.qq.com/connect/qrconnect"),"redirect"===u[this.loginMode]&&(location.href=t+"?appid="+this.appid+"&redirect_uri="+e+"&response_type=code&scope="+this.scope+"&state="+this.state+"#wechat_redirect")},t}(l.default);t.default=p})),de=P((function(e,t){var n,r=x&&x.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=x&&x.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg="chooseAndUploadFile:ok";var o=t.tempFiles,i=o.length,a=0;return new Promise((function(s){for(;a=i)!o.find((function(e){return!e.url&&!e.errMsg}))&&s(t);else{var c=o[n];e.uploadFile({filePath:c.path,cloudPath:c.cloudPath,fileType:c.fileType,onUploadProgress:function(e){e.index=n,e.tempFile=c,e.tempFilePath=c.path,r&&r(e)}}).then((function(e){c.url=e.fileID,n0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?i(e,function(e){var t=e.count,i=e.sizeType,a=e.sourceType,s=e.extension;return new Promise((function(e,u){r.chooseImage({count:t,sizeType:i,sourceType:a,extension:s,success:function(t){e(o(t,"image"))},fail:function(e){u({errMsg:e.errMsg.replace("chooseImage:fail",n)})}})}))}(t),t):"video"===t.type?i(e,function(e){var t=e.camera,i=e.compressed,a=e.maxDuration,s=e.sourceType,u=e.extension;return new Promise((function(e,c){r.chooseVideo({camera:t,compressed:i,maxDuration:a,sourceType:s,extension:u,success:function(t){var n=t.tempFilePath,r=t.duration,i=t.size,a=t.height,s=t.width;e(o({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:i,type:t.tempFile&&t.tempFile.type||"",width:s,height:a,duration:r,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){c({errMsg:e.errMsg.replace("chooseVideo:fail",n)})}})}))}(t),t):i(e,function(e){var t=e.count,i=e.extension;return new Promise((function(e,a){var s=r.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(s=wx.chooseMessageFile),"function"!=typeof s)return a({errMsg:n+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});s({type:"all",count:t,extension:i,success:function(t){e(o(t))},fail:function(e){a({errMsg:e.errMsg.replace("chooseFile:fail",n)})}})}))}(t),t)}}})));var Ue=new(function(){function e(){d(this,e)}return p(e,[{key:"init",value:function(e){var t={},n=!1!==e.debugFunction&&!1;switch(e.provider){case"tencent":t=xe.init(Object.assign(e,{useDebugFunction:n}));break;case"aliyun":t=K.init(Object.assign(e,{useDebugFunction:n}));break;default:throw new Error("未提供正确的provider参数")}t.isReady=!1;var o=t.auth();return t.initUniCloud=o.getLoginState().then((function(e){return e?Promise.resolve():o.signInAnonymously()})).then((function(){return Promise.resolve()})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.address,r=e.port;if(n)t.localAddress=n,t.localPort=r;else if(t.debugInfo){var o="warn",i=console[o];"remote"===t.debugInfo.initialLaunchType?(t.debugInfo.forceRemote=!0,i("当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试")):i("无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试")}})).then((function(){return new Promise((function(e){setTimeout((function(){N=r.getSystemInfoSync().platform,C=r.getStorageSync("__DC_CLOUD_UUID")||U(32),e()}),0)}))})).then((function(){t.isReady=!0})),Ee(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){var n,r=this;return n=this.isReady?Promise.resolve():this.initUniCloud,n.then((function(){return t.call(r,e)}))};var n=e.uploadFile;e.uploadFile=function(e){return j(n).call(this,e)}}(t),function(e){e.database=function(){if(this._database)return this._database;var t={},n={},r=function(){function r(e,t,n){d(this,r),this.content=e,this.prevStage=t,this.actionName=n}return p(r,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:e.$param}}))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",value:function(){return this._send("add",Array.from(arguments))}},{key:"remove",value:function(){return this._send("remove",Array.from(arguments))}},{key:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"set",value:function(){throw new Error("客户端禁止使用set方法")}},{key:"_send",value:function(r,o){var i=this.toJSON();return i.$db.push({$method:r,$param:o}),e.callFunction({name:"DCloud-clientDB",data:{action:this.actionName,command:i}}).then((function(e){var r=e.result,o=r.code,i=r.message,a=r.token,s=r.tokenExpired;return o?Promise.reject(new De(i,o)):(a&&s&&t.refreshToken&&t.refreshToken.forEach((function(e){e({token:a,tokenExpired:s})})),a&&s&&n.refreshToken&&n.refreshToken.forEach((function(e){e({token:a,tokenExpired:s})})),Promise.resolve(e))})).catch((function(e){var t=new De(e.message,e.code||"SYSTEM_ERROR");return n.error&&n.error.forEach((function(e){e(t)})),/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),Promise.reject(e)}))}},{key:"useAggregate",get:function(){for(var e=this,t=!1;e.prevStage;){e=e.prevStage;var n=e.content.$method;if("aggregate"===n||"pipeline"===n){t=!0;break}}return t}},{key:"count",get:function(){if(!this.useAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return s({$method:"count",$param:Ce(Array.from(arguments))},e,e.actionName)}}}]),r}(),o=["db.Geo","db.command","command.aggregate"];function a(e,t){return o.indexOf("".concat(e,".").concat(t))>-1}function s(e,t,n){return je(new r(e,t,n),{get:function(e,t){var r="db";return e&&e.content&&(r=e.content.$method),a(r,t)?s({$method:t},e,n):function(){return s({$method:t,$param:Ce(Array.from(arguments))},e,n)}}})}function u(e){var t=e.path,n=e.method;return function(){function e(){d(this,e),this.param=Array.from(arguments)}return p(e,[{key:"toJSON",value:function(){return{$newDb:[].concat(i(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}}]),e}()}var c={auth:{on:function(e,n){t[e]=t[e]||[],t[e].indexOf(n)>-1||t[e].push(n)},off:function(e,n){t[e]=t[e]||[];var r=t[e].indexOf(n);-1!==r&&t[e].splice(r,1)}},on:function(e,t){n[e]=n[e]||[],n[e].indexOf(t)>-1||n[e].push(t)},off:function(e,t){n[e]=n[e]||[];var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)},env:je({},{get:function(e,t){return{$env:t}}}),action:function(e){return je({},{get:function(t,n){return a("db",n)?s({$method:n},null,e):function(){return s({$method:n,$param:Ce(Array.from(arguments))},null,e)}}})},Geo:je({},{get:function(e,t){return u({path:["Geo"],method:t})}}),getCloudEnv:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}},get serverDate(){return u({path:[],method:"serverDate"})},get RegExp(){return u({path:[],method:"RegExp"})}},l=je(c,{get:function(e,t){return a("db",t)?s({$method:t}):function(){return s({$method:t,$param:Ce(Array.from(arguments))})}}});return this._database=l,l}}(t),function(e){e.getCurrentUserInfo=Ne,e.chooseAndUploadFile=j(Ie.initChooseAndUploadFile(e))}(t),t.init=this.init,t}}]),e}()),qe={};if(1===[].length)qe=[][0],Ue=Ue.init(qe);else{var $e=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo"],Re=[].length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在cloudfunctions目录右键关联服务空间";$e.forEach((function(e){Ue[e]=function(){return console.error(Re),Promise.reject(new I({code:"SYS_ERR",message:Re}))}}))}Object.assign(Ue,{get mixinDatacom(){return e=Ue,{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},collection:{type:String,default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){for(var r=!1,o=[],i=2;i0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,r=void 0!==n&&n,o=t.success,i=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,i=n.data,a=n.count;e.getcount&&(e.mixinDatacomPage.count=a),e.mixinDatacomHasMore=i.length0&&void 0!==arguments[0]?arguments[0]:{},n=e.database(),r=t.action||this.action;r&&(n=n.action(r));var o=t.collection||this.collection;n=n.collection(o);var i=t.where||this.where;i&&Object.keys(i).length&&(n=n.where(i));var a=t.field||this.field;a&&(n=n.field(a));var s=t.groupby||this.groupby;s&&(n=n.groupBy(s));var u=t.groupField||this.groupField;u&&(n=n.groupField(u)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(n=n.distinct());var c=t.orderby||this.orderby;c&&(n=n.orderBy(c));var l=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,f=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,p=void 0!==t.getcount?t.getcount:this.getcount,h=void 0!==t.gettree?t.gettree:this.gettree,d=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,v={getCount:p},g={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return h&&(v.getTree=g),d&&(v.getTreePath=g),n=n.skip(f*(l-1)).limit(f).get(v),n}}};var e}});var Le=Ue,Me=Le;t.default=Me}).call(this,n("c8ba"),n("543d")["default"])},aa0b:function(e,t,n){(function(t){function n(e){t.navigateTo({url:e})}function r(){t.navigateBack({delta:1})}e.exports={goto:n,back:r,vuemixin:{created:function(){console.log(1)}}}}).call(this,n("543d")["default"])},af5a:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n("a34a")),o=n("4e5a");function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,u,"next",e)}function u(e){a(i,r,o,s,u,"throw",e)}s(void 0)}))}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(c({method:"POST",data:t,url:e},n))}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(c({method:"GET",data:t,url:e},n))}},{key:"put",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(c({method:"PUT",data:t,url:e},n))}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(c({method:"DELETE",data:t,url:e},n))}},{key:"jsonp",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request(c({method:"JSONP",data:t,url:e},n))}},{key:"request",value:function(){var e=s(r.default.mark((function e(t){var n,i,a,s,u,l;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=!1,e.prev=1,t.url){e.next=4;break}throw{errMsg:"【request】缺失数据url",statusCode:0};case 4:if(n=(0,o.mergeConfig)(this,t),i=!0,!this.requestStart){e.next=14;break}if(a=this.requestStart(n),"object"!=typeof a){e.next=13;break}s=["data","header","isPrompt","load","isFactory"],s.forEach((function(e){n[e]=a[e]})),e.next=14;break;case 13:throw{errMsg:"【request】请求开始拦截器未通过",statusCode:0,data:n.data,method:n.method,header:n.header,url:n.url};case 14:if(u={},"JSONP"!=n.method){e.next=21;break}return e.next=18,(0,o.jsonpRequest)(n);case 18:u=e.sent,e.next=24;break;case 21:return e.next=23,(0,o.dispatchRequest)(n);case 23:u=e.sent;case 24:if(!n.isFactory||!this.dataFactory){e.next=31;break}return e.next=27,this.dataFactory(c(c({},n),{},{response:u}));case 27:return l=e.sent,e.abrupt("return",Promise.resolve(l));case 31:return e.abrupt("return",Promise.resolve(u));case 32:e.next=38;break;case 34:return e.prev=34,e.t0=e["catch"](1),this.requestError&&this.requestError(e.t0),e.abrupt("return",Promise.reject(e.t0));case 38:return e.prev=38,i&&this.requestEnd&&this.requestEnd(n),e.finish(38);case 41:case"end":return e.stop()}}),e,this,[[1,34,38,41]])})));function t(t){return e.apply(this,arguments)}return t}()}]),e}();t.default=d},b38e:function(e,t,n){"use strict";(function(e){function n(){return n=Object.assign||function(e){for(var t=1;t=i)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(n){return"[Circular]"}break;default:return e}}));return a}return o}function d(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}function v(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!d(t)||"string"!==typeof e||e))}function g(e,t,n){var r=[],o=0,i=e.length;function a(e){r.push.apply(r,e),o++,o===i&&n(r)}e.forEach((function(e){t(e,a)}))}function y(e,t,n){var r=0,o=e.length;function i(a){if(a&&a.length)n(a);else{var s=r;r+=1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},T={integer:function(e){return T.number(e)&&parseInt(e,10)===e},float:function(e){return T.number(e)&&!T.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===typeof e&&!T.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&!!e.match(x.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(x.url)},hex:function(e){return"string"===typeof e&&!!e.match(x.hex)}};function P(e,t,n,r,o){if(e.required&&void 0===t)S(e,t,n,r,o);else{var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;i.indexOf(a)>-1?T[a](t)||r.push(h(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(h(o.messages.types[a],e.fullField,e.type))}}function E(e,t,n,r,o){var i="number"===typeof e.len,a="number"===typeof e.min,s="number"===typeof e.max,u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=t,l=null,f="number"===typeof t,p="string"===typeof t,d=Array.isArray(t);if(f?l="number":p?l="string":d&&(l="array"),!l)return!1;d&&(c=t.length),p&&(c=t.replace(u,"_").length),i?c!==e.len&&r.push(h(o.messages[l].len,e.fullField,e.len)):a&&!s&&ce.max?r.push(h(o.messages[l].max,e.fullField,e.max)):a&&s&&(ce.max)&&r.push(h(o.messages[l].range,e.fullField,e.min,e.max))}var A="enum";function j(e,t,n,r,o){e[A]=Array.isArray(e[A])?e[A]:[],-1===e[A].indexOf(t)&&r.push(h(o.messages[A],e.fullField,e[A].join(", ")))}function D(e,t,n,r,o){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(h(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){var i=new RegExp(e.pattern);i.test(t)||r.push(h(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}var C={required:S,whitespace:O,type:P,range:E,enum:j,pattern:D};function N(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t,"string")&&!e.required)return n();C.required(e,t,r,i,o,"string"),v(t,"string")||(C.type(e,t,r,i,o),C.range(e,t,r,i,o),C.pattern(e,t,r,i,o),!0===e.whitespace&&C.whitespace(e,t,r,i,o))}n(i)}function I(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&C.type(e,t,r,i,o)}n(i)}function U(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(""===t&&(t=void 0),v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&(C.type(e,t,r,i,o),C.range(e,t,r,i,o))}n(i)}function q(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&C.type(e,t,r,i,o)}n(i)}function $(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),v(t)||C.type(e,t,r,i,o)}n(i)}function R(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&(C.type(e,t,r,i,o),C.range(e,t,r,i,o))}n(i)}function L(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&(C.type(e,t,r,i,o),C.range(e,t,r,i,o))}n(i)}function M(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if((void 0===t||null===t)&&!e.required)return n();C.required(e,t,r,i,o,"array"),void 0!==t&&null!==t&&(C.type(e,t,r,i,o),C.range(e,t,r,i,o))}n(i)}function F(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&C.type(e,t,r,i,o)}n(i)}var B="enum";function H(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o),void 0!==t&&C[B](e,t,r,i,o)}n(i)}function V(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t,"string")&&!e.required)return n();C.required(e,t,r,i,o),v(t,"string")||C.pattern(e,t,r,i,o)}n(i)}function K(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t,"date")&&!e.required)return n();var s;if(C.required(e,t,r,i,o),!v(t,"date"))s=t instanceof Date?t:new Date(t),C.type(e,s,r,i,o),s&&C.range(e,s.getTime(),r,i,o)}n(i)}function z(e,t,n,r,o){var i=[],a=Array.isArray(t)?"array":typeof t;C.required(e,t,r,i,o,a),n(i)}function G(e,t,n,r,o){var i=e.type,a=[],s=e.required||!e.required&&r.hasOwnProperty(e.field);if(s){if(v(t,i)&&!e.required)return n();C.required(e,t,r,a,o,i),v(t,i)||C.type(e,t,r,a,o)}n(a)}function Y(e,t,n,r,o){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(v(t)&&!e.required)return n();C.required(e,t,r,i,o)}n(i)}var W={string:N,method:I,number:U,boolean:q,regexp:$,integer:R,float:L,array:M,object:F,enum:H,pattern:V,date:K,url:G,hex:G,email:G,required:z,any:Y};function J(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var X=J();function Q(e){this.rules=null,this._messages=X,this.define(e)}Q.prototype={messages:function(e){return e&&(this._messages=k(J(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==typeof e||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var i,a,s=e,u=t,c=r;if("function"===typeof u&&(c=u,u={}),!this.rules||0===Object.keys(this.rules).length)return c&&c(),Promise.resolve();function l(e){var t,n=[],r={};function o(e){var t;Array.isArray(e)?n=(t=n).concat.apply(t,e):n.push(e)}for(t=0;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nr)return setTimeout((function(){e.showToast({title:"图片过大,请重新上传",icon:"none"})}),500),!1}}catch(a){o.e(a)}finally{o.f()}}return t.header["token"]=e.getStorageSync("token"),t},p.requestEnd=function(t){t.load&&(h-=1,h<=0&&e.hideLoading())};p.dataFactory=function(){var t=s(r.default.mark((function t(n){var o;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n.response.statusCode||200!=n.response.statusCode){t.next=20;break}if(o=n.response.data,"string"==typeof o&&(o=JSON.parse(o)),1e4!=o.code){t.next=7;break}return t.abrupt("return",Promise.resolve(o));case 7:if("401"!=o.code&&401!=o.code&&1100!=o.code){t.next=16;break}return e.removeStorageSync("token"),e.removeStorageSync("account"),e.removeStorageSync("headPortaritUrl"),console.log("在判断401,115行处抛出错误"),e.showModal({title:"登录过期",content:"请重新进行登录",confirmText:"去登录",cancelText:"取消",success:function(t){t.confirm&&e.switchTab({url:"/pages/user/user"})}}),t.abrupt("return",Promise.reject({statusCode:0,errMsg:"【request】"+o.message}));case 16:return n.isPrompt&&e.showToast({title:o.message,icon:"none",duration:3e3}),t.abrupt("return",Promise.reject({statusCode:0,errMsg:"【request】"+o.message,data:n.response.data}));case 18:t.next=22;break;case 20:return console.log("154行抛出"),t.abrupt("return",Promise.reject({statusCode:n.response.statusCode,errMsg:"【request】数据工厂验证不通过",data:n.response.data}));case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p.requestError=function(t){if(0===t.statusCode)throw t;e.showToast({title:"网络错误,请检查一下网络",icon:"none"})};var d=p;t.default=d}).call(this,n("543d")["default"])},bace:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("b38e"));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a={validate:function(e,t,n,r){var o={showMessage:!0};r=Object.assign({},o,r||{});var i=null;if("function"!==typeof n&&(i=new Promise((function(e,t){n=function(n){n?e(n):t(n)}}))),!t||Array.isArray(t)&&0===t.length||"object"===typeof t&&0===Object.keys(t).length)return n(!0,null),i||void 0;var s=[],u=Object.keys(t),c=0;for(var l in u){var f=u[l],p=a.getValueByProp(e,f);a.validateItem(t,f,p,(function(e){e&&e.length>0&&(s=s.concat(e)),c++,c===u.length&&(s.length>0?(r.showMessage&&a.showToast(s[0].message),n(!1,s)):n(!0,null))}))}return i||void 0},validateField:function(e,t,n,r,o){var i={showMessage:!0};o=Object.assign({},i,o||{});var s=null;if("function"!==typeof r&&(s=new Promise((function(e,t){r=function(n){n?e(n):t(n)}}))),n=[].concat(n),0!==n.length){var u=[],c=0;for(var l in n){var f=n[l],p=a.getValueByProp(e,f);a.validateItem(t,f,p,(function(e){e&&e.length>0&&(u=u.concat(e)),c++,c===n.length&&(u.length>0?(o.showMessage&&a.showToast(u[0].message),r(!1,u)):r(!0,null))}))}return s||void 0}},validateItem:function(e,t,n,o){if(!e||"{}"===JSON.stringify(e))return o instanceof Function&&o(),!0;var a=[].concat(e[t]||[]);a.forEach((function(e){e.pattern&&(e.pattern=new RegExp(e.pattern))}));var s=i({},t,a),u=new r.default(s),c=i({},t,n);u.validate(c,{firstFields:!0},(function(e){o(e)}))},getValueByProp:function(e,t){var n=e;t=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"");for(var r=t.split("."),o=0,i=r.length;o=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n("96cf"),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(a){r.regeneratorRuntime=void 0}},c383:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={data:function(){return{mescroll:null}},onPullDownRefresh:function(){this.mescroll&&this.mescroll.onPullDownRefresh()},onPageScroll:function(e){this.mescroll&&this.mescroll.onPageScroll(e)},onReachBottom:function(){this.mescroll&&this.mescroll.onReachBottom()},methods:{mescrollInit:function(e){this.mescroll=e,this.mescrollInitByRef()},mescrollInitByRef:function(){if(!this.mescroll||!this.mescroll.resetUpScroll){var e=this.$refs.mescrollRef;e&&(this.mescroll=e.mescroll)}},downCallback:function(){var e=this;this.mescroll.optUp.use?this.mescroll.resetUpScroll():setTimeout((function(){e.mescroll.endSuccess()}),500)},upCallback:function(){var e=this;setTimeout((function(){e.mescroll.endErr()}),500)}},mounted:function(){this.mescrollInitByRef()}},o=r;t.default=o},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},df7c:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e){"string"!==typeof e&&(e+="");var t,n=0,r=-1,o=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!o){n=t+1;break}}else-1===r&&(o=!1,r=t+1);return-1===r?"":e.slice(n,r)}function o(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!r;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,r="/"===a.charAt(0))}return t=n(o(t.split("/"),(function(e){return!!e})),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),a="/"===i(e,-1);return e=n(o(e.split("/"),(function(e){return!!e})),!r).join("/"),e||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0;n--)if(""!==e[n])break;return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u=1;--i)if(t=e.charCodeAt(i),47===t){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=r(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n("4362"))},f0c5:function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s,u,c){var l,f="function"===typeof e?e.options:e;if(u){f.components||(f.components={});var p=Object.prototype.hasOwnProperty;for(var h in u)p.call(u,h)&&!p.call(f.components,h)&&(f.components[h]=u[h])}if(c&&((c.beforeCreate||(c.beforeCreate=[])).unshift((function(){this[c.__module]=this})),(f.mixins||(f.mixins=[])).push(c)),t&&(f.render=t,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),i&&(f._scopeId="data-v-"+i),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},f._ssrRegister=l):o&&(l=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(f.functional){f._injectStyles=l;var d=f.render;f.render=function(e,t){return l.call(t),d(e,t)}}else{var v=f.beforeCreate;f.beforeCreate=v?[].concat(v,l):[l]}return{exports:e,options:f}}n.d(t,"a",(function(){return r}))},f1e1:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("a34a"));function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function s(e){var t=l();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){p(i,r,o,a,s,"next",e)}function s(e){p(i,r,o,a,s,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n16)&&this.date(e)},email:function(e){return"string"===typeof e&&!!e.match(y.email)&&e.length<255},url:function(e){return"string"===typeof e&&!!e.match(y.url)},pattern:function(e,t){try{return new RegExp(e).test(t)}catch(n){return!1}},method:function(e){return"function"===typeof e}},k=function(){function e(t){d(this,e),this._message=t}return g(e,[{key:"validateRule",value:function(){var e=h(r.default.mark((function e(t,n,o,i){var a,s,u,c,l,f,p,h,d;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=null,s=t.rules,u=s.findIndex((function(e){return e.required})),!(u<0)){e.next=8;break}if(null!==n&&void 0!==n){e.next=6;break}return e.abrupt("return",a);case 6:if("string"!==typeof n||n.length){e.next=8;break}return e.abrupt("return",a);case 8:if(c=this._message,void 0!==s){e.next=11;break}return e.abrupt("return",c["default"]);case 11:l=0;case 12:if(!(l-1&&(u=!0),u?null:b(e,o||n["enum"])},rangeNumber:function(e,t,n){if(!w.number(t))return b(e,e.errorMessage||n.pattern.mismatch);var r=e.minimum,o=e.maximum,i=e.exclusiveMinimum,a=e.exclusiveMaximum,s=i?t<=r:t=o:t>o;return void 0!==r&&s?b(e,e.errorMessage||n["number"].min):void 0!==o&&u?b(e,e.errorMessage||n["number"].max):void 0!==r&&void 0!==o&&(s||u)?b(e,e.errorMessage||n["number"].range):null},rangeLength:function(e,t,n){if(!w.string(t)&&!w.array(t))return b(e,e.errorMessage||n.pattern.mismatch);var r=e.minLength,o=e.maxLength,i=t.length;return void 0!==r&&io?b(e,e.errorMessage||n["length"].max):void 0!==r&&void 0!==o&&(io)?b(e,e.errorMessage||n["length"].range):null},pattern:function(e,t,n){return w["pattern"](e.pattern,t)?null:b(e,e.errorMessage||n.pattern.mismatch)},format:function(e,t,n){var r=Object.keys(w),o=m[e.format]?m[e.format]:e.format;return r.indexOf(o)>-1&&!w[o](t)?b(e,e.errorMessage||n.types[o]):null}},O=function(e){i(n,e);var t=s(n);function n(e,r){var o;return d(this,n),o=t.call(this,n.message),o._schema=e,o._options=r||null,o}return g(n,[{key:"updateSchema",value:function(e){this._schema=e}},{key:"validate",value:function(){var e=h(r.default.mark((function e(t,n){var o;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(o=this._checkFieldInSchema(t),o){e.next=5;break}return e.next=4,this.invokeValidate(t,!1,n);case 4:o=e.sent;case 5:return e.abrupt("return",o.length?o[0]:null);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"validateAll",value:function(){var e=h(r.default.mark((function e(t,n){var o;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(o=this._checkFieldInSchema(t),o){e.next=5;break}return e.next=4,this.invokeValidate(t,!0,n);case 4:o=e.sent;case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"validateUpdate",value:function(){var e=h(r.default.mark((function e(t,n){var o;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(o=this._checkFieldInSchema(t),o){e.next=5;break}return e.next=4,this.invokeValidateUpdate(t,!1,n);case 4:o=e.sent;case 5:return e.abrupt("return",o.length?o[0]:null);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"invokeValidate",value:function(){var e=h(r.default.mark((function e(t,n,o){var i,a,s,u,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=[],a=this._schema,e.t0=r.default.keys(a);case 3:if((e.t1=e.t0()).done){e.next=15;break}return s=e.t1.value,u=a[s],e.next=8,this.validateRule(u,t[s],t,o);case 8:if(c=e.sent,null==c){e.next=13;break}if(i.push({key:s,errorMessage:c}),n){e.next=13;break}return e.abrupt("break",15);case 13:e.next=3;break;case 15:return e.abrupt("return",i);case 16:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"invokeValidateUpdate",value:function(){var e=h(r.default.mark((function e(t,n,o){var i,a,s;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=[],e.t0=r.default.keys(t);case 2:if((e.t1=e.t0()).done){e.next=13;break}return a=e.t1.value,e.next=6,this.validateRule(this._schema[a],t[a],t,o);case 6:if(s=e.sent,null==s){e.next=11;break}if(i.push({key:a,errorMessage:s}),n){e.next=11;break}return e.abrupt("break",13);case 11:e.next=2;break;case 13:return e.abrupt("return",i);case 14:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"_checkFieldInSchema",value:function(e){var t=Object.keys(e),r=Object.keys(this._schema);return new Set(t.concat(r)).size===r.length?"":[{key:"invalid",errorMessage:n.message["defaultInvalid"]}]}}]),n}(k);function x(){return{default:"验证错误",defaultInvalid:"字段超出范围",required:"{label}必填",enum:"{label}超出范围",whitespace:"{label}不能为空",date:{format:"{label}日期{value}格式无效",parse:"{label}日期无法解析,{value}无效",invalid:"{label}日期{value}无效"},types:{string:"{label}类型无效",array:"{label}类型无效",object:"{label}类型无效",number:"{label}类型无效",date:"{label}类型无效",boolean:"{label}类型无效",integer:"{label}类型无效",float:"{label}类型无效",regexp:"{label}无效",email:"{label}类型无效",url:"{label}类型无效"},length:{min:"{label}长度不能少于{minLength}",max:"{label}长度不能超过{maxLength}",range:"{label}必须介于{minLength}和{maxLength}之间"},number:{min:"{label}不能小于{minimum}",max:"{label}不能大于{maximum}",range:"{label}必须介于{minimum}and{maximum}之间"},pattern:{mismatch:"{label}格式不匹配"}}}O.message=new x;var T=O;t.default=T}}]);