orchestra-information-legacy.50fe3dc0.js 7.1 KB

1
  1. !function(){function e(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 t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,c,"next",e)}function c(e){r(a,i,o,s,c,"throw",e)}s(void 0)}))}}var o=document.createElement("style");o.innerHTML="._information_1b28o_1{overflow:hidden}._information_1b28o_1 ._addPhone_1b28o_4{color:var(--van-primary-text);font-size:.37333rem}._information_1b28o_1 ._img_1b28o_8{width:3.78667rem;height:2.13333rem;border-radius:.26667rem;overflow:hidden;margin-right:.4rem;flex-shrink:0}._information_1b28o_1 ._title_1b28o_16{font-size:.37333rem;font-weight:500;color:#333;line-height:.56rem;padding-bottom:.05333rem;max-width:4.8rem}._information_1b28o_1 ._content_1b28o_24{font-size:.32rem;color:#777;line-height:.45333rem;word-break:break-all;word-wrap:break-word}._information_1b28o_1 ._time_1b28o_31{padding-top:.13333rem;font-size:.32rem;color:#aaa;line-height:.45333rem}._information_1b28o_1 ._informationGroup_1b28o_37{margin-bottom:.85333rem}\n",document.head.appendChild(o),System.register(["./index-legacy.90c82f08.js","./index-legacy.f1d613e0.js","./index-legacy.02f13b7a.js","./index-legacy.84457c4c.js","./index-legacy.789a0824.js","./index-legacy.f3e5e283.js","./index-legacy.eb4bc59e.js","./index-legacy.2870cc6d.js","./use-tab-status-legacy.bafe466c.js"],(function(e){"use strict";var n,r,o,a,s,c,l,u,f,d,m,p,h,g,b,_,v,y,w,S,O;return{setters:[function(e){n=e.d,r=e.ah,o=e.ag,a=e.r,s=e.$,c=e.c,l=e.aj,u=e.q,f=e.ai,d=e.a5,m=e.ak,p=e.al,h=e.m,g=e.b9},function(e){b=e.O},function(e){_=e.O},function(e){v=e.O},function(e){y=e.L},function(e){w=e.C},function(e){S=e.I},function(e){O=e.A},function(){}],execute:function(){var x={information:"_information_1b28o_1",addPhone:"_addPhone_1b28o_4",img:"_img_1b28o_8",title:"_title_1b28o_16",content:"_content_1b28o_24",time:"_time_1b28o_31",informationGroup:"_informationGroup_1b28o_37"};e("default",n({name:"orchestra-information",setup:function(){var e=r(),n=o(),j=a({addStatus:!1,isLoading:!1,dialogStatus:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},params:{type:"HOT_CONSULTATION",clientType:"SCHOOL",page:1,rows:20},oPopover:!1,selectItem:{},selectType:"add"}),k=function(){var n=i(regeneratorRuntime.mark((function n(){var r,i,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!j.isLoading){n.next=3;break}return n.abrupt("return");case 3:return j.isLoading=!0,n.next=6,h.post("/api-school/sysNewsInformation/page",{data:t(t({},j.params),{},{orchestraPhotoAlbumId:e.query.photoId})});case 6:if(r=n.sent,j.listState.loading=!1,j.listState.refreshing=!1,i=r.data||{},!(j.list.length>0&&1===i.current)){n.next=12;break}return n.abrupt("return");case 12:o=i.rows||[],j.list=j.list.concat(o),j.listState.finished=i.current>=i.pages,j.params.page=i.current+1,j.listState.dataShow=j.list.length>0,j.isLoading=!1,n.next=26;break;case 20:n.prev=20,n.t0=n.catch(0),j.listState.dataShow=!1,j.listState.finished=!0,j.listState.refreshing=!1,j.isLoading=!1;case 26:case"end":return n.stop()}}),n,null,[[0,20]])})));return function(){return n.apply(this,arguments)}}(),P=function(){j.params.page=1,j.list=[],j.listState.dataShow=!0,j.listState.loading=!1,j.listState.finished=!1,k()},C=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.push({name:"add-information",query:{id:j.selectItem.id}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g({message:"您确认删除该资讯吗?"}).then(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h.post("/api-school/sysNewsInformation/remove",{requestType:"form",data:{id:j.selectItem.id}});case 3:P(),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])}))));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return s((function(){k()})),function(){var e;return c("div",{class:[x.information,!j.listState.dataShow&&"emptyRootContainer"]},[c(v,{position:"top",onGetHeight:function(e){j.listState.height=e}},{default:function(){return[c(l,null,{right:function(){return c("span",{class:x.addPhone,onClick:function(){n.push("/add-information")}},[u("添加资讯")])}})]}}),j.listState.dataShow?c(_,{modelValue:j.listState.refreshing,"onUpdate:modelValue":function(e){return j.listState.refreshing=e},onRefresh:P,style:{minHeight:"calc(100vh - ".concat(j.listState.height,"px)")}},{default:function(){return[c(y,{finished:j.listState.finished,finishedText:" ",onLoad:k,immediateCheck:!1,class:x.informationGroup},(t=e=j.list.map((function(e,t){return c(w,{center:!0,class:x.cell,onClick:function(){return function(e){try{console.log(e,"item"),e.linkUrl?window.location.href=e.linkUrl:n.push({path:"/information-detail",query:{id:e.id}})}catch(t){}}(e)}},{icon:function(){return c(S,{src:e.coverImage,class:x.img,fit:"cover"},null)},title:function(){return c("div",null,[c("div",{class:[x.title,"van-ellipsis"]},[e.title]),c("div",{class:[x.content,"van-multi-ellipsis--l2"]},[e.summary]),c("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},[c("div",{class:x.time},[e.createTime?f(e.createTime).format("YYYY年MM月DD日"):""]),c(d,{name:"ellipsis",size:23,color:"#777777",style:{fontWeight:"bold"},onClick:function(t){t.stopPropagation(),j.selectItem=e,j.oPopover=!0}},null)])])}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!p(t)?e:{default:function(){return[e]}}))];var t}}):c(m,{btnStatus:!1,tips:"暂无资讯"},null),c(O,{cancelText:"取消",show:j.oPopover,"onUpdate:show":function(e){return j.oPopover=e},closeOnClickAction:!0,actions:[{name:"修改",callback:function(){return C()}},{name:"删除",color:"#F44541",callback:function(){j.dialogStatus=!0}}]},null),c(b,{show:j.dialogStatus,"onUpdate:show":function(e){return j.dialogStatus=e},title:"删除资讯",message:"是否删除该资讯?确认后学员端、伴学端将同步删除",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",showCancelButton:!0,onConfirm:I},null)])}}}))}}}))}();