index-legacy.b554edea.js 4.3 KB

1
  1. !function(){function e(e,t,o,n,r,c,a){try{var i=e[c](a),l=i.value}catch(s){return void o(s)}i.done?t(l):Promise.resolve(l).then(n,r)}function t(t){return function(){var o=this,n=arguments;return new Promise((function(r,c){var a=t.apply(o,n);function i(t){e(a,r,c,i,l,"next",t)}function l(t){e(a,r,c,i,l,"throw",t)}i(void 0)}))}}var o=document.createElement("style");o.innerHTML="._colProtocol_wgzww_1{font-size:.32rem;padding:.4rem .37333rem;color:#999}._colProtocol_wgzww_1 ._protocolText_wgzww_6{color:var(--van-primary);line-height:.4rem}._colProtocol_wgzww_1 ._boxStyle_wgzww_10{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._colProtocol_wgzww_1 .van-checkbox{display:inline-block;align-items:inherit;overflow:inherit}._colProtocol_wgzww_1 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._colProtocol_wgzww_1 .van-checkbox__label{line-height:.4rem}\n",document.head.appendChild(o),System.register(["./index-legacy.fba2875c.js","./index-legacy.45490234.js","./index-legacy.32d1c54d.js","./icon_checkbox_default-legacy.e33240bc.js","./icon_checkbox-tenant-legacy.2501219f.js","./index-legacy.e7460ea1.js"],(function(e){"use strict";var o,n,r,c,a,i,l,s,u,p,h,d,w;return{setters:[function(e){o=e.d,n=e.g,r=e.w,c=e.j,a=e.z,i=e.M,l=e.F,s=e.aR},function(e){u=e.C},function(){},function(e){p=e.a,h=e.i},function(e){d=e.a},function(e){w=e.C}],execute:function(){var f={colProtocol:"_colProtocol_wgzww_1",protocolText:"_protocolText_wgzww_6",boxStyle:"_boxStyle_wgzww_10"},m={BUY_ORDER:"《酷乐秀平台服务协议》",REGISTER:"《酷乐秀平台注册协议》"};e("C",o({name:"protocol",props:{showHeader:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},prototcolType:{type:String,default:"BUY_ORDER"}},data:function(){return{exists:!0,checked:this.modelValue,popupStatus:!1,protocolHTML:"",protocolPopup:null,baseUrl:"STUDENT"===n.platformType?"/api-student":"/api-teacher"}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.get(e.baseUrl+"/sysUserContractRecord/checkContractSign",{params:{contractType:e.prototcolType}});case 3:o=t.sent,e.exists=o.data,e.checked=e.checked||e.exists,e.$emit("update:modelValue",e.checked||e.exists),t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:e.checked=e.modelValue,window.addEventListener("hashchange",e.onHash,!1);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))()},unmounted:function(){window.removeEventListener("hashchange",this.onHash,!1)},watch:{checked:function(e){this.$emit("update:modelValue",e)}},methods:{getContractDetail:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,console.log("getContractDetail"),e.protocolHTML){t.next=8;break}return t.next=5,r.get(e.baseUrl+"/sysUserContractRecord/queryContract",{params:{contractType:e.prototcolType}});case 5:o=t.sent,e.protocolHTML=o.data,console.log(o);case 8:e.onPopupClose(),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),t,null,[[0,11]])})))()},onHash:function(){this.popupStatus=!1},onPopupClose:function(){if(this.popupStatus=!this.popupStatus,this.popupStatus){var e=this.$route,t=0;for(var o in e.query)t+=1;var n=window.location.href,r=t>0?"&pto="+ +new Date:"?pto="+ +new Date;history.pushState("","","".concat(n).concat(r))}else window.history.go(-1);this.protocolPopup&&(this.protocolPopup.scrollTop=0)}},render:function(){var e=this;return c("div",{class:f.colProtocol},[!this.exists&&c(u,{modelValue:this.checked,"onUpdate:modelValue":function(t){return e.checked=t}},{default:function(){return[a("我已阅读并同意")]},icon:function(e){return c(i,{class:f.boxStyle,name:e.checked?"tenant"===n.projectType?d:p:h,size:"15"},null)}}),this.exists&&c(l,null,[a("查看")]),c("span",{onClick:this.getContractDetail,class:f.protocolText},[m[this.prototcolType]]),c(s,{ref:this.protocolPopup,show:this.popupStatus,position:"bottom",style:{height:"100%"}},{default:function(){return[e.showHeader&&c(w,{title:"酷乐秀平台服务协议"},null),e.popupStatus&&c("div",{class:f.protocolContent,id:"mProtocol"},[c("div",{class:f.protocolContent,innerHTML:e.protocolHTML},null)])]}})])}}))}}}))}();