1 line
159 KiB
JavaScript
1 line
159 KiB
JavaScript
|
var PlusObject=function(plusContext,param){plusContext.__param__=param;var dc_plusobjects={},dc_plusMouldes={};function PlusObject(e,t){for(var n in this.weex=t,this.weex_instance_id=e,this.__HtMl_Id__,this.__io__dc_vue_call_exec_sync="undefined"!=typeof global&&global.__io__dc_vue_call_exec_sync,this.__io__dc_vue_call_exec="undefined"!=typeof global&&global.__io__dc_vue_call_exec,this.weexBridge=t.requireModule("plus"),this.globalEvent=t.requireModule("globalEvent"),dc_plusMouldes)if(!this[n]){var i=dc_plusMouldes[n](plusContext,this,this.require,param[n]);i&&(this[n]=i)}}return PlusObject.prototype.updateConfigInfo=function(){var e=this.weexBridge.getConfigInfo();if(e)for(var t in"string"==typeof e&&(e=JSON.parse(e)),this.__WebVieW_Id__=e.__WebVieW_Id__,this.__HtMl_Id__=e.__HtMl_Id__,e){var n=this[t];if("object"==typeof n&&e[t])if(n.updateInfo)n.updateInfo(e[t]);else{var i=e[t];for(var o in i)n[o]=n[o]||i[o]}}},PlusObject.prototype.require=function(e){if(!this[e]){var t=dc_plusMouldes[e](plusContext,this,this.require,param[e]);t&&(this[e]=t)}return this[e]},PlusObject.prototype.importMoudle=function(name){if(this[name])return this[name];var script=this.weexBridge.importMoudle(name);return eval(script),this.require(name)},PlusObject.register=function(e,t){dc_plusMouldes[e]=t},PlusObject.newPlus=function(e,t){var n=dc_plusobjects[e];return n||((n=new PlusObject(e,t)).updateConfigInfo(),dc_plusobjects[e]=n),n},PlusObject.deletePlus=function(e){dc_plusobjects[e]&&delete dc_plusobjects[e]},PlusObject}(plusContext,param);function WebviewGroupMoudle(e,t,n){t=t;var i="WebviewGroup";function o(e,n){t.webview.NView.prototype.constructor.apply(this,[i]),this.__children=[];var o=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var s=e[r];s.styles=s.styles||{},s.styles.name=s.id;var a=new t.webview.Webview(s.url,s.styles,!0,s.extras);t.webview.__pushWindow__(a),this.__children.push(a);var c=[a.__uuid__,[s.url,s.styles,a.__callback_id__,location.host+location.pathname,s.extras]];o.push(c)}t.webview.exec(this,"createGroup",[o,n,this.__callback_id__])}var r=o.prototype;return t.tools.extend(r,n.NView.prototype),r.constructor=o,o.prototype.setSelectIndex=function(e){t.webview.exec(this,"setSelectIndex",[e])},o.prototype.children=function(){return this.__children},n.createGroup=function(e,t){return new o(e,t)},o}function LoadWebviewMoudle(e,t,n){var i=n,o="NWindow",r=(t=t).bridge,s=t.tools;function a(){return e.getLocationHerf(t)}function c(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)u(e[t])}function u(e){!function(e){if(e.onclick&&"function"==typeof e.onclick){var n=r.callbackId(function(){e.onclick(e)});e.__cb__={id:n,htmlId:t.__HtMl_Id__}}}(e)}function l(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&"input"==t.tag?t.inputStyles&&(t.inputStyles.onComplete&&"function"==typeof t.inputStyles.onComplete&&(t.inputStyles.__onCompleteCallBackId__=r.callbackId(t.inputStyles.onComplete)),t.inputStyles.onFocus&&"function"==typeof t.inputStyles.onFocus&&(t.inputStyles.__onFocusCallBackId__=r.callbackId(t.inputStyles.onFocus)),t.inputStyles.onBlur&&"function"==typeof t.inputStyles.onBlur&&(t.inputStyles.__onBlurCallBackId__=r.callbackId(t.inputStyles.onBlur))):t&&"richtext"==t.tag&&t.richTextStyles&&t.richTextStyles.onClick&&"function"==typeof t.richTextStyles.onClick&&(t.richTextStyles.__onClickCallBackId__=r.callbackId(t.richTextStyles.onClick))}function _(e,n,r,u){if(this.__view_array__=new Array,i.NView.prototype.constructor.apply(this,[o]),this.id=null,n&&n.name&&(this.id=n.name),u)for(var _ in u)this[_]=u[_];!this.id&&e&&(this.id=n.name=e),s.platform==s.IOS&&n&&n.navigationbar&&(this.__navigationbar__=n.navigationbar);var f=[],d=null;if(n&&(d=n.titleNView||n.navigationbar)&&(d.uuid="_Nav_Bar_"+this.__uuid__,f.push(d.uuid),t.nativeObj.__appendSubViewInfo(d),c(d.buttons),l(d.tags)),n&&n.subNViews&&Array.isArray(n.subNViews)){for(var p=0;p<n.subNViews.length;p++){var h=n.subNViews[p];l(h.tags),h.uuid=s.UUID("Nativeview"),f.push(h.uuid),t.nativeObj.__appendSubViewInfo(h)}this.__subNViewsUids__=f,this.checkJSObject=!0,se
|