1234567891011121314 |
- ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._openLive_etct8_1 .el-dialog{--el-dialog-border-radius: 18px !important;--el-dialog-width: 488px;background:url(./assets/open_live-bg.f4421891.png) no-repeat top center #fff;background-size:contain}._openLive_etct8_1 .el-dialog__header{padding:0}._openLive_etct8_1 .el-button.is-disabled{background:#bababa;border-color:#bababa;opacity:1}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.3e06faf1.js','./vendor-legacy.2ed87b03.js'],function(exports){'use strict';var state,request,defineComponent,createVNode,createTextVNode,ElButton,ElDialog;return{setters:[function(module){state=module.c;request=module.r;},function(module){defineComponent=module.d;createVNode=module.c;createTextVNode=module.a;ElButton=module.l;ElDialog=module.W;}],execute:function execute(){var iconTips="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABepJREFUWEfVWU2MFEUU/l7PriA/M1UD041KYkRAxAOInoxGPKgLRg5oIj+K4sXIyYAXwy6JgnggqCdIPCjRCGqiiSi66EGJxpP4cxBWVAiEID2zTNXsogvsTj9TPd2zvc3szvTsTCJ1mnTXe/X1m6/e9+oVYRLjPDCdstl7ifl+Bu4gYCEzzwYwM3A7SET9DJwg4DcmOsLF4vdzgH+aXZaSGjJAhWz2YTA/w8AqANcn9DFEwEEQ7csVi4cJ4CT2iQC7s2athudtA7AkySLjzSXgV7asV5wLFz5p1F9DgPPp9Hy2rD0genAcxycB/EBAH5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xvPmiSWmeDLBatm4mcyssa7RXYaQ5XvyAeZujdVhwJMZgauF+IVaWATqu9aFmqr5w0bwQ3RwvfgI1aUl5aXy5Upq6uiv4C3ttpcyRJ/H4BuhYLOWJCB0q5aUPOFbAp5g3zG6igM+n0ws4lTKLVMfUcnlBpoEWVPyLXCGeAtG74fMxBXyNI9IZW6nbKWHDpJROZ4cs6xyFygkMdQI3ZJUyfY2GBwPT8hMdkfy/stKZjB5CX3e03tLwKsHEgpTrPWCX38Yi2mIXix8l9eEKsRtEm6t28UNo+CJ+zCdgVU6pQ0kXnMz8vJQrAXxW95jvc9m0VVOpn8JOpWlRdTIvl23u+kSywlIQGeEJW1YTN1KMYa1W1XVAV7tB54VYykBvolZV9UtjbVYTaQLWt4seAQ32RyJrivXGmoFVPtdut75pa92TNHuMx2k/GwixnYhemFS7dbxIB8/PgLn7mNYHmlUxXxSEWIuKisUb2jttpeJN9Oo3N31lAOAUMb/NzAcabQuY2oCI1jLRs6GCRaI/+SuDaqTrX8qcMpcyzNxnAWctYMDYekDaA+YSUXgp41dd8dHSS5mo87ZcexFtd4rFhs+RdSkRj8Y1dbEYB++XpsPD417dMtFFCyi08ur2P3doEzRRv2OUAAAAAElFTkSuQmCC";var liveBg="./assets/live_bg.1e1284cb.png";var liveClass="./assets/live_class.c89433d2.png";var openLive$1="./assets/open_live.3f689a8c.png";var openLive="_openLive_etct8_1";var styles={openLive:openLive};var index=exports('default',defineComponent({name:'open-live',computed:{users:function users(){return state.user.data;},btnStatus:function btnStatus(){var users=this.users;var fansNum=this.fansNum;var expTime=this.overClassNum;return(users===null||users===void 0?void 0:users.fansNum)>=fansNum&&(users===null||users===void 0?void 0:users.expTime)>=expTime;}},data:function data(){return{fansNum:0,overClassNum:0,openStatus:false};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var _state$user$data;var liveFlag,res,result;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:liveFlag=(_state$user$data=state.user.data)===null||_state$user$data===void 0?void 0:_state$user$data.liveFlag;state.openLiveStatus=liveFlag===1?true:false;_context.prev=2;_context.next=5;return request.get('/api-website/sysConfig/queryByParamNameList',{params:{paramNames:'open_live_fans_num,open_list_over_class'}});case 5:res=_context.sent;result=res.data;result.forEach(function(item){if(item.paramName==='open_live_fans_num'){_this.fansNum=Number(item.paramValue);}else if(item.paramName==='open_list_over_class'){_this.overClassNum=Number(item.paramValue);}});// 如果没有达人认证,则需要先去认证
- // if (!state.user.data?.entryFlag) {
- // Dialog.alert({
- // message: '您尚未完成达人认证,达人认证后才可开通直播权限哦!',
- // confirmButtonColor: '#2DC7AA'
- // }).then(() => {
- // this.$router.replace('/teacherCert')
- // })
- // }
- _context.next=12;break;case 10:_context.prev=10;_context.t0=_context["catch"](2);case 12:case"end":return _context.stop();}}},_callee,null,[[2,10]]);}))();},methods:{onOpenLive:function onOpenLive(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-website/teacher/openLive',{});case 3:// Toast('开通成功')
- // ElMessage.success('开通成功')
- _this2.openStatus=true;_context2.next=8;break;case 6:_context2.prev=6;_context2.t0=_context2["catch"](0);case 8:case"end":return _context2.stop();}}},_callee2,null,[[0,6]]);}))();},getRate:function getRate(target,rate){// this.users?.fansNum
- // this.fansNum
- if(rate>0){return target/rate>=1?'100%':"".concat((target/rate*100).toFixed(2),"%");}else{return'100%';}}},render:function render(){var _this3=this;return createVNode("div",{"class":styles.openLive},[createVNode("div",{"class":"text-2xl font-semibold text-black leading-none px-6 pt-5 pb-8 flex items-center justify-between"},[createVNode("span",null,[createTextVNode("\u5F00\u901A\u76F4\u64AD")]),createVNode(ElButton,{"type":"primary","round":true,"size":"large","disabled":!this.btnStatus,"onClick":this.onOpenLive},{default:function _default(){return[createTextVNode("\u5F00\u901A\u76F4\u64AD")];}})]),createVNode("div",{"class":"px-6"},[!this.btnStatus&&createVNode("div",{"class":"py-3 px-[18px] rounded-lg text-sm text-[#E11212] flex items-center","style":{background:'linear-gradient(139deg, #FFEEEE 0%, #FFDDDD 100%)'}},[createVNode("img",{"src":iconTips,"class":"w-[22px] h-[22px] mr-2.5"},null),createTextVNode("\u4F60\u5C1A\u672A\u8FBE\u5230\u5F00\u901A\u76F4\u64AD\u7684\u6761\u4EF6")]),createVNode("div",{"class":['text-2xl text-[#333] pb-4 mt-8',!this.btnStatus&&'mt-8']},[createTextVNode("\u5F00\u901A\u6761\u4EF6")]),createVNode("div",{"class":['flex justify-between']},[createVNode("div",{"class":"w-[334px] rounded-[10px] px-7 py-7","style":{boxShadow:'0px 2px 10px 0px rgba(0,0,0,0.1000)'}},[createVNode("div",{"class":"flex justify-between items-center"},[createVNode("span",{"class":"text-xl text-[#666]"},[createVNode("i",{"class":"text-[#E32121] pr-1"},[createTextVNode("*")]),createTextVNode("\u7C89\u4E1D\u6570")]),createVNode("div",{"class":"text-2xl text-[#999] font-semibold flex items-center"},[createVNode("span",{"class":"text-4xl text-black leading-none"},[this.fansNum]),createVNode("span",{"class":"mt-1 text-xl text-black"},[createTextVNode("\u4EBA")])])])]),createVNode("div",{"class":"w-[334px] rounded-[10px] px-7 py-7","style":{boxShadow:'0px 2px 10px 0px rgba(0,0,0,0.1000)'}},[createVNode("div",{"class":"flex justify-between items-center"},[createVNode("span",{"class":"text-xl text-[#666]"},[createVNode("i",{"class":"text-[#E32121] pr-1"},[createTextVNode("*")]),createTextVNode("\u8BFE\u7A0B\u6570")]),createVNode("div",{"class":"text-2xl text-[#999] font-semibold flex items-center"},[createVNode("span",{"class":"text-4xl text-black leading-none"},[this.overClassNum]),createVNode("span",{"class":"mt-1 text-xl text-black"},[createTextVNode("\u8BFE\u65F6")])])])])]),createVNode("div",{"class":"mt-20"},[createVNode("h2",{"class":"text-2xl text-[#333] mb-4"},[createTextVNode("\u76F4\u64AD")]),createVNode("div",{"class":"text-lg text-[#999]"},[createTextVNode("\u5F00\u901A\u76F4\u64AD\u529F\u80FD\u540E\uFF0C\u60A8\u53EF\u4EE5\u521B\u5EFA\u81EA\u5DF1\u7684\u76F4\u64AD\u95F4\u5F00\u542F\u76F4\u64AD\u3002")]),createVNode("img",{"src":liveBg,"class":"w-[422px] m-auto pt-16"},null)]),createVNode("div",{"class":"mt-20 mb-14"},[createVNode("h2",{"class":"text-2xl text-[#333] mb-4"},[createTextVNode("\u76F4\u64AD\u8BFE")]),createVNode("div",{"class":"text-lg text-[#999]"},[createTextVNode("\u60A8\u53EF\u5236\u5B9A\u6559\u5B66\u65B9\u6848\u8BBE\u7F6E\u76F4\u64AD\u8BFE\u7A0B\uFF0C\u5B66\u5458\u8D2D\u4E70\u540E\uFF0C\u60A8\u53EF\u5728\u76F4\u64AD\u95F4\u5BF9\u8D2D\u4E70\u76F4\u64AD\u8BFE\u7684\u5B66\u5458\u8FDB\u884C\u76F4\u64AD\u6559\u5B66\uFF0C\u76F4\u64AD\u8BFE\u7A0B\u65E0\u4EBA\u6570\u4E0A\u9650\uFF0C\u53EF\u6781\u5927\u7684\u63D0\u9AD8\u8BFE\u7A0B\u6536\u5165\u3002")]),createVNode("img",{"src":liveClass,"class":"w-[422px] m-auto pt-16"},null)])]),createVNode(ElDialog,{"modelValue":this.openStatus,"onUpdate:modelValue":function onUpdateModelValue(val){return _this3.openStatus=val;},"closeOnClickModal":false,"closeOnPressEscape":false},{default:function _default(){return[createVNode("div",{"class":"text-center"},[createVNode("img",{"src":openLive$1,"class":"w-[290px] m-auto"},null),createVNode("p",{"class":"text-xl font-semibold text-[#333] pt-7 pb-8"},[createTextVNode("\u5F00\u901A\u6210\u529F\uFF0C\u5FEB\u53BB\u521B\u5EFA\u76F4\u64AD\u8BFE\u5427")]),createVNode(ElButton,{"type":"primary","round":true,"class":"!w-44 !h-12 m-auto","onClick":function onClick(){_this3.openStatus=false;_this3.$router.replace('/userInfo/liveOperation?type=create');}},{default:function _default(){return[createTextVNode("\u521B\u5EFA\u76F4\u64AD\u8BFE")];}})])];}})]);}}));}};});})();
|