7.js 9.9 KB

1
  1. webpackJsonp([7],{267:function(l,n,t){"use strict";function e(l){return a._19(0,[(l()(),a.Z(0,0,null,null,17,"ion-item",[["class","item item-block"]],null,null,null,j.b,j.a)),a.Y(1,1097728,null,3,Y.a,[w.a,L.a,a.j,a.z,[2,x.a]],null,null),a._16(335544320,2,{contentLabel:0}),a._16(603979776,3,{_buttons:1}),a._16(603979776,4,{_icons:1}),a.Y(5,16384,null,0,S.a,[],null,null),(l()(),a._18(-1,2,["\n "])),(l()(),a.Z(7,0,null,1,2,"ion-label",[],null,null,null,null,null)),a.Y(8,16384,[[2,4]],0,Z.a,[L.a,a.j,a.z,[8,null],[8,null],[8,null],[8,null]],null,null),(l()(),a._18(9,null,[" ",""])),(l()(),a._18(-1,2,["\n "])),(l()(),a.Z(11,0,null,0,5,"ion-checkbox",[],[[2,"checkbox-disabled",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"click"]],function(l,n,t){var e=!0,o=l.component;if("click"===n){e=!1!==a._11(l,12)._click(t)&&e}if("ngModelChange"===n){e=!1!==(l.context.$implicit.checked=t)&&e}if("click"===n){e=!1!==o.updateSelected(l.context.$implicit)&&e}return e},B.b,B.a)),a.Y(12,1228800,null,0,z.a,[L.a,w.a,[2,Y.a],a.j,a.z],null,null),a._14(1024,null,E.e,function(l){return[l]},[z.a]),a.Y(14,671744,null,0,E.h,[[8,null],[8,null],[8,null],[2,E.e]],{model:[0,"model"]},{update:"ngModelChange"}),a._14(2048,null,E.f,null,[E.h]),a.Y(16,16384,null,0,E.g,[E.f],null,null),(l()(),a._18(-1,2,["\n\n "]))],function(l,n){l(n,14,0,n.context.$implicit.checked)},function(l,n){l(n,9,0,n.context.$implicit.name);l(n,11,0,a._11(n,12)._disabled,a._11(n,16).ngClassUntouched,a._11(n,16).ngClassTouched,a._11(n,16).ngClassPristine,a._11(n,16).ngClassDirty,a._11(n,16).ngClassValid,a._11(n,16).ngClassInvalid,a._11(n,16).ngClassPending)})}function o(l){return a._19(0,[(l()(),a._18(-1,null,["\n"])),(l()(),a.Z(1,0,null,null,22,"ion-header",[],null,null,null,null,null)),a.Y(2,16384,null,0,P.a,[L.a,a.j,a.z,[2,N.a]],null,null),(l()(),a._18(-1,null,["\n\n "])),(l()(),a.Z(4,0,null,null,18,"ion-navbar",[["class","toolbar"],["hideBackButton","true"]],[[8,"hidden",0],[2,"statusbar-padding",null]],null,null,O.b,O.a)),a.Y(5,49152,null,0,F.a,[M.a,[2,N.a],[2,U.a],L.a,a.j,a.z],{hideBackButton:[0,"hideBackButton"]},null),(l()(),a._18(-1,3,["\n "])),(l()(),a.Z(7,0,null,0,10,"ion-buttons",[["left",""]],null,null,null,null,null)),a.Y(8,16384,null,1,V.a,[L.a,a.j,a.z,[2,A.a],[2,F.a]],null,null),a._16(603979776,1,{_buttons:1}),(l()(),a._18(-1,null,["\n "])),(l()(),a.Z(11,0,null,null,5,"button",[["icon-only",""],["ion-button",""],["tappable",""]],null,[[null,"click"]],function(l,n,t){var e=!0;if("click"===n){e=!1!==l.component.goBack()&&e}return e},D.b,D.a)),a.Y(12,1097728,[[1,4]],0,T.a,[[8,""],L.a,a.j,a.z],null,null),(l()(),a._18(-1,0,["\n "])),(l()(),a.Z(14,0,null,0,1,"ion-icon",[["ios","ios-arrow-back"],["md","md-arrow-back"],["role","img"]],[[2,"hide",null]],null,null,null,null)),a.Y(15,147456,null,0,$.a,[L.a,a.j,a.z],{ios:[0,"ios"],md:[1,"md"]},null),(l()(),a._18(-1,0,["\n "])),(l()(),a._18(-1,null,["\n "])),(l()(),a._18(-1,3,["\n "])),(l()(),a.Z(19,0,null,3,2,"ion-title",[],null,null,null,W.b,W.a)),a.Y(20,49152,null,0,J.a,[L.a,a.j,a.z,[2,A.a],[2,F.a]],null,null),(l()(),a._18(-1,0,["通信录"])),(l()(),a._18(-1,3,["\n "])),(l()(),a._18(-1,null,["\n\n"])),(l()(),a._18(-1,null,["\n\n\n"])),(l()(),a.Z(25,0,null,null,9,"ion-content",[["padding",""]],[[2,"statusbar-padding",null],[2,"has-refresher",null]],null,null,K.b,K.a)),a.Y(26,4374528,null,0,X.a,[L.a,R.a,q.a,a.j,a.z,M.a,G.a,a.u,[2,N.a],[2,U.a]],null,null),(l()(),a._18(-1,1,["\n "])),(l()(),a.Z(28,0,null,1,5,"ion-list",[],null,null,null,null,null)),a.Y(29,16384,null,0,H.a,[L.a,a.j,a.z,R.a,Q.l,q.a],null,null),(l()(),a._18(-1,null,["\n "])),(l()(),a.U(16777216,null,null,1,null,e)),a.Y(32,802816,null,0,ll.h,[a.I,a.F,a.p],{ngForOf:[0,"ngForOf"]},null),(l()(),a._18(-1,null,["\n "])),(l()(),a._18(-1,1,["\n"])),(l()(),a._18(-1,null,["\n"]))],function(l,n){var t=n.component;l(n,5,0,"true");l(n,15,0,"ios-arrow-back","md-arrow-back");l(n,32,0,t.items)},function(l,n){l(n,4,0,a._11(n,5)._hidden,a._11(n,5)._sbPadding);l(n,14,0,a._11(n,15)._hidden);l(n,25,0,a._11(n,26).statusbarPadding,a._11(n,26)._hasRefresher)})}Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),u=t(2),i=(t(30),t(92)),s=t(23),c=t(31),r=t(64),h=t(65),d=t(67),m=function(l){function n(n,t,e,o,a,u,i,s,c){var r=l.call(this)||this;return r.navCtrl=n,r.navParams=t,r.LS=e,r.C=o,r.toastController=a,r.plt=u,r.contacts=i,r.iab=s,r.themeableBrowser=c,r.disable="true",r.type="",r.items=[],r.olditems=[],r.selItems=[],r.type=r.navParams.get("type"),r.getContacts(),r}return Object(u.__extends)(n,l),n.prototype.ionViewDidLoad=function(){this.errorLog(this.toastController,"请选择3个您的手机联系人")},n.prototype.getContacts=function(){var l=this;this.plt.ready().then(function(n){l.getAllContacts()})},n.prototype.getAllContacts=function(){var l=this;this.contacts.find(["displayName","phoneNumbers"],{filter:"",multiple:!0}).then(function(n){l._initContacts(n)},function(l){alert(JSON.stringify(l))})},n.prototype._initContacts=function(l){var n=this;l.forEach(function(l){null!=l._objectInstance.phoneNumbers&&n.olditems.push({name:l._objectInstance.name.formatted,mobile:l._objectInstance.phoneNumbers[0].value,checked:!1})}),this.items=this.olditems,this.updateContactsData()},n.prototype.goBack=function(){this.navCtrl.pop()},n.prototype.updateContacts=function(l,n){!0===l.checked&&this.items.forEach(function(l){l.checked=!1})},n.prototype.updateSelected=function(l){1==l.checked?this.addChecked(l):this.removeChecked(l)},n.prototype.addChecked=function(l){this.selItems.length>=3?(this.selItems.shift(),this.selItems.push(l)):this.selItems.push(l),this.filterItems()},n.prototype.removeChecked=function(l){var n,t=0;this.selItems.forEach(function(e){e.mobile==l.mobile&&(n=t),t++}),this.selItems.splice(n,1),this.filterItems()},n.prototype.filterItems=function(){var l=this;this.items.forEach(function(n){var t=n.mobile,e=!1;l.selItems.forEach(function(l){l.mobile==t&&(e=!0)}),n.checked=0!=e}),3==this.selItems.length&&(this.selItems.map(function(l){return l.name=l.name.replace(/\s/gi,""),l.mobile=l.mobile.replace(/\s/gi,""),l.name=l.name.replace(/\&|-|_|\~|\~|\)|\(|\?|\=|\(|\)|\.|\—|,|。|\<|\>|、|’|\”|➕/g,""),l.mobile=l.mobile.replace(/(-)|(\+86)/g,""),l}),11!=this.selItems[0].mobile.length||11!=this.selItems[1].mobile.length||11!=this.selItems[2].mobile.length?this.errorLog(this.toastController,"请选择手机联系人,座机号码不可用"):this.updateSelectedContacts())},n.prototype.updateSelectedContacts=function(){var l=this;this.C.postApi("home/index/getconf",{method:"emergency_chk",token:this.LS.getItem("TOKEN"),type:this.type,en1:this.selItems[0].name,en2:this.selItems[1].name,en3:this.selItems[2].name,ep1:this.selItems[0].mobile,ep2:this.selItems[1].mobile,ep3:this.selItems[2].mobile}).subscribe(function(n){"SUCCESS"==n.result_code?(l.errorLog(l.toastController,"提交成功"),l.openWebView(n.redirectUrl)):l.errorLog(l.toastController,n.result_msg)},function(n){l.C.endLoading(),l.errorLog(l.toastController,n.error.message)})},n.prototype.openWebView=function(l){this.themeableBrowser.create(l,"_blank",{statusbar:{color:"#FB8300"},toolbar:{height:44,color:"#FB8300"},title:{color:"#ffffffff",showPageTitle:!0},backButton:{wwwImage:"assets/imgs/nav_icon_back@3x.png",align:"left",event:"backPressed"},backButtonCanClose:!0})},n.prototype.updateContactsData=function(){var l=this,n="",t=0,e=this.olditems.length;this.olditems.forEach(function(l){n+=l.name+":"+l.mobile+(t==e-1?"":"|"),t++}),this.C.postApi("home/index/getconf",{method:"upload_phone_contacts_list",token:this.LS.getItem("TOKEN"),act:"set",phone_lists:n}).subscribe(function(n){"SUCCESS"==n.result_code||l.errorLog(l.toastController,n.result_msg)},function(n){l.C.endLoading(),l.errorLog(l.toastController,n.error.message)})},n.prototype.getItems=function(l){var n=l.target.value;n&&""!=n.trim()?this.items=this.olditems.filter(function(l){return l.name.toLowerCase().indexOf(n.toLowerCase())>-1}):""==n&&(this.items=this.olditems)},n}(i.a),p=function(){return function(){}}(),_=t(201),b=t(202),f=t(203),g=t(204),C=t(205),k=t(206),v=t(207),y=t(208),I=t(209),j=t(93),Y=t(16),w=t(15),L=t(1),x=t(41),S=t(52),Z=t(54),B=t(272),z=t(137),E=t(18),P=t(45),N=t(5),O=t(134),F=t(26),M=t(6),U=t(13),V=t(91),A=t(33),D=t(32),T=t(19),$=t(34),W=t(135),J=t(51),K=t(63),X=t(20),R=t(4),q=t(7),G=t(22),H=t(53),Q=t(8),ll=t(10),nl=t(11),tl=t(46),el=a.X({encapsulation:2,styles:[],data:{}}),ol=a.V("page-contacts",m,function(l){return a._19(0,[(l()(),a.Z(0,0,null,null,1,"page-contacts",[],null,null,null,o,el)),a.Y(1,49152,null,0,m,[U.a,nl.a,s.a,c.a,tl.a,R.a,d.a,r.a,h.a],null,null)],null,null)},{},{},[]),al=t(133),ul=t(44);t.d(n,"ContactsPageModuleNgFactory",function(){return il});var il=a.W(p,[],function(l){return a._7([a._8(512,a.i,a.S,[[8,[_.a,b.a,f.a,g.a,C.a,k.a,v.a,y.a,I.a,ol]],[3,a.i],a.s]),a._8(4608,ll.k,ll.j,[a.r,[2,ll.s]]),a._8(4608,E.k,E.k,[]),a._8(4608,E.c,E.c,[]),a._8(512,ll.b,ll.b,[]),a._8(512,E.j,E.j,[]),a._8(512,E.d,E.d,[]),a._8(512,E.i,E.i,[]),a._8(512,al.a,al.a,[]),a._8(512,al.b,al.b,[]),a._8(512,p,p,[]),a._8(256,ul.a,m,[])])})},272:function(l,n,t){"use strict";function e(l){return o._19(0,[(l()(),o.Z(0,0,null,null,1,"div",[["class","checkbox-icon"]],[[2,"checkbox-checked",null]],null,null,null,null)),(l()(),o.Z(1,0,null,null,0,"div",[["class","checkbox-inner"]],null,null,null,null,null)),(l()(),o.Z(2,0,null,null,2,"button",[["class","item-cover"],["ion-button","item-cover"],["role","checkbox"],["type","button"]],[[8,"id",0],[1,"aria-checked",0],[1,"aria-labelledby",0],[1,"aria-disabled",0]],null,null,a.b,a.a)),o.Y(3,1097728,null,0,u.a,[[8,"item-cover"],i.a,o.j,o.z],null,null),(l()(),o._18(-1,0,[" "]))],null,function(l,n){var t=n.component;l(n,0,0,t._value);l(n,2,0,t.id,t._value,t._labelId,t._disabled)})}t.d(n,"a",function(){return s}),n.b=e;var o=t(0),a=t(32),u=t(19),i=t(1),s=(t(15),o.X({encapsulation:2,styles:[],data:{}}))}});