1 |
- define(["$","template","native","config","api"],function(e,t,n,r,i){function s(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"placeOrder"})}return{title:"壹管家上门服务",body:"",init:function(i,o){var u=this,a=e(document),f=t("agreement/index",{showNavBar:!r.isWX&&!r.isChubao});e(".spa-page-body",u).html(f),setTimeout(function(){i.scroll=new IScroll("#agreementScroll")},50),e.newTouch(".back-button",function(e){s.call(this,e)},u),u.on("tapBackButton",function(e){s.call(this,e)}),u.on("swipeRight",function(e){s.call(this,e)}),e.newTouch(".service-telephone",function(e){e.preventDefault(),n.call("4000328170")},u),o.resolve()},beforeopen:function(e,t){t.resolve()},afteropen:function(n,s){var o=this,u=e(document);u.trigger("spa:openloader"),i.getAgreement({},function(i){if(i.success){var a=t("agreement/index",{showNavBar:!r.isWX});e(".spa-page-body",o).html(a),e(".page-content",o).html(i.data.content),setTimeout(function(){n.scroll=new IScroll("#agreementScroll")},500),s.resolve(),u.trigger("spa:closeloader")}})},beforeclose:function(e,t){t.resolve()}}});
|