index.vue 305 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493
  1. <template>
  2. <div class="course-detail">
  3. <Header></Header>
  4. <section class="section">
  5. <div class="container">
  6. <div class="section__header">
  7. <div class="container">
  8. <el-breadcrumb separator="/">
  9. <el-breadcrumb-item :to="{ path: '/index' }"
  10. >首页</el-breadcrumb-item
  11. >
  12. <el-breadcrumb-item>课程详情</el-breadcrumb-item>
  13. </el-breadcrumb>
  14. </div>
  15. </div>
  16. <div class="section__body">
  17. <div class="container">
  18. <div class="course-info">
  19. <div class="course-info__header clearfix">
  20. <div class="title">
  21. <span>{{ changeName(courseId) }}</span>
  22. <el-button
  23. v-if="courseTotal > 1"
  24. size="mini"
  25. type="primary"
  26. plain
  27. icon="el-icon-sort"
  28. style="margin-left: 14px"
  29. @click="openChangeCourseBoxs"
  30. >切换课程</el-button
  31. >
  32. </div>
  33. <div
  34. class="left-box"
  35. :style="{
  36. backgroundImage: `url(${$tools.splitImgHost(
  37. goodsData.coverUrl,
  38. false
  39. )})`,
  40. }"
  41. >
  42. <div v-show="vid" id="player"></div>
  43. <div v-show="vidzb" id="playerzb"></div>
  44. <div class="recordStyle" v-if="showRecordStatus">
  45. 您上次看到{{
  46. $tools.secondToTime(recordObj.videoCurrentTime)
  47. }},正在自动续播<span
  48. style="
  49. display: inline-block;
  50. width: 50px;
  51. text-align: center;
  52. "
  53. >|</span
  54. >
  55. <span class="btn_sty" @click="backLI">从头播放</span>
  56. </div>
  57. </div>
  58. <div class="right-box">
  59. <div class="right-box__header">
  60. <div class="tabs">
  61. <el-tabs v-model="courseTabIndex" @tab-click="handleClick">
  62. <el-tab-pane
  63. :name="tab.name"
  64. v-for="(tab, index) in menuTab"
  65. :key="index"
  66. >
  67. <div slot="label">
  68. <span class="label">{{ tab.label }}</span>
  69. </div>
  70. <!-- 章节目录 -->
  71. <template v-if="tab.name == '1'">
  72. <div class="right-box__body">
  73. <div
  74. class="item"
  75. v-for="(menu, index) in menuList"
  76. :key="index"
  77. >
  78. <template v-if="menu.type == 1">
  79. <div
  80. class="item__title"
  81. @click="openModule(menu)"
  82. >
  83. <i
  84. :class="{
  85. 'el-icon-caret-right': !menu.showList,
  86. 'el-icon-caret-bottom': menu.showList,
  87. }"
  88. ></i>
  89. {{ menu.menuName }}
  90. </div>
  91. <div class="item__content">
  92. <div
  93. class="bank-chapter"
  94. v-if="menu.showList"
  95. >
  96. <div
  97. class="bank-chapter__item"
  98. v-for="(
  99. chapter, chapterIndex
  100. ) in menu.list"
  101. :key="chapterIndex"
  102. >
  103. <div
  104. class="bank-chapter__item__text"
  105. @click="openChapter(chapter)"
  106. >
  107. <i
  108. :class="{
  109. 'el-icon-caret-right':
  110. !chapter.showList,
  111. 'el-icon-caret-bottom':
  112. chapter.showList,
  113. }"
  114. ></i
  115. >{{ chapter.name }}
  116. </div>
  117. <div
  118. class="bank-section"
  119. v-if="chapter.showList"
  120. >
  121. <div
  122. class="bank-section__item"
  123. :class="{
  124. active: isActive(section),
  125. }"
  126. v-for="(
  127. section, sectionIndex
  128. ) in chapter.list"
  129. :key="sectionIndex"
  130. @click="getResource(section)"
  131. >
  132. <template v-if="section.type != 2">
  133. <template>
  134. <div
  135. class="note note--blue"
  136. v-if="
  137. section.sectionType == 1
  138. "
  139. >
  140. 录播
  141. </div>
  142. <div
  143. class="note"
  144. v-if="
  145. section.sectionType == 2
  146. "
  147. >
  148. 直播
  149. </div>
  150. <div
  151. class="note note--yellow"
  152. v-if="
  153. section.sectionType == 3
  154. "
  155. >
  156. 回放
  157. </div>
  158. <div
  159. class="
  160. bank-section__item__text
  161. "
  162. >
  163. {{ section.name }}
  164. <div
  165. style="font-size: 12px"
  166. v-if="
  167. section.liveStartTime >
  168. nowTime
  169. "
  170. >
  171. <span>{{
  172. $tools.timestampToTime(
  173. section.liveStartTime,
  174. (isDay = false)
  175. )
  176. }}</span
  177. >-
  178. <span>{{
  179. $tools.timestampToTime(
  180. section.liveEndTime,
  181. (isDay = false)
  182. )
  183. }}</span>
  184. </div>
  185. </div>
  186. </template>
  187. <template
  188. v-if="section.durationTime > 0"
  189. >
  190. <div class="during">
  191. {{
  192. $tools.secondToDate(
  193. section.durationTime
  194. )
  195. }}
  196. </div>
  197. </template>
  198. <template>
  199. <div
  200. class="btn"
  201. v-if="section.rebuild > 0"
  202. >
  203. 待重修
  204. </div>
  205. <template v-else>
  206. <div
  207. class="btn btn--green"
  208. v-if="section.learning == 1"
  209. >
  210. 已看完
  211. </div>
  212. </template>
  213. </template>
  214. <template
  215. v-if="
  216. section.liveStartTime &&
  217. section.sectionType == 2
  218. "
  219. >
  220. <div
  221. class="
  222. live-btn live-btn--blue
  223. "
  224. v-if="
  225. section.liveStartTime >
  226. nowTime
  227. "
  228. >
  229. 待开播
  230. </div>
  231. <div
  232. class="
  233. live-btn live-btn--yellow
  234. "
  235. v-if="
  236. section.liveStartTime <=
  237. nowTime &&
  238. section.liveEndTime >
  239. nowTime
  240. "
  241. >
  242. 直播中
  243. </div>
  244. <div
  245. class="live-btn"
  246. v-if="
  247. section.liveEndTime <
  248. nowTime
  249. "
  250. >
  251. 已结束
  252. </div>
  253. </template>
  254. </template>
  255. <template v-if="section.type == 2">
  256. <template>
  257. <div
  258. class="test-btn"
  259. v-if="section.doType == 1"
  260. >
  261. 练习
  262. </div>
  263. <div
  264. class="test-btn"
  265. v-if="section.doType != 1"
  266. >
  267. 考试
  268. </div>
  269. </template>
  270. <div
  271. class="bank-section__item__text"
  272. >
  273. {{ section.name }}
  274. </div>
  275. <template>
  276. <div
  277. class="btn"
  278. v-if="section.rebuild > 0"
  279. >
  280. 待重修
  281. </div>
  282. <template v-else>
  283. <div
  284. class="btn btn--green"
  285. v-if="section.learning == 1"
  286. >
  287. 合格
  288. </div>
  289. <div
  290. class="btn btn--red"
  291. v-if="section.learning == 0"
  292. >
  293. 不合格
  294. </div>
  295. <div
  296. class="btn btn--green"
  297. v-if="section.rebuild > 0"
  298. >
  299. 待重测
  300. </div>
  301. </template>
  302. </template>
  303. </template>
  304. </div>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. </template>
  310. <template v-if="menu.type == 2">
  311. <div class="item__content">
  312. <div class="bank-chapter">
  313. <div class="bank-chapter__item">
  314. <div
  315. class="bank-chapter__item__text"
  316. @click="openChapter(menu)"
  317. >
  318. <i
  319. :class="{
  320. 'el-icon-caret-right':
  321. !menu.showList,
  322. 'el-icon-caret-bottom':
  323. menu.showList,
  324. }"
  325. ></i
  326. >{{ menu.menuName }}
  327. </div>
  328. <div
  329. class="bank-section"
  330. v-if="menu.showList"
  331. >
  332. <div
  333. class="bank-section__item"
  334. :class="{
  335. active: isActive(section),
  336. }"
  337. v-for="(
  338. section, sectionIndex
  339. ) in menu.list"
  340. :key="sectionIndex"
  341. @click="getResource(section)"
  342. >
  343. <template v-if="section.type != 2">
  344. <template>
  345. <div
  346. class="note note--blue"
  347. v-if="
  348. section.sectionType == 1
  349. "
  350. >
  351. 录播
  352. </div>
  353. <div
  354. class="note"
  355. v-if="
  356. section.sectionType == 2
  357. "
  358. >
  359. 直播
  360. </div>
  361. <div
  362. class="note note--yellow"
  363. v-if="
  364. section.sectionType == 3
  365. "
  366. >
  367. 回放
  368. </div>
  369. </template>
  370. <div
  371. class="bank-section__item__text"
  372. >
  373. {{ section.name }}
  374. <div
  375. style="font-size: 12px"
  376. v-if="
  377. section.liveStartTime >
  378. nowTime
  379. "
  380. >
  381. <span>{{
  382. $tools.timestampToTime(
  383. section.liveStartTime,
  384. (isDay = false)
  385. )
  386. }}</span
  387. >-
  388. <span>{{
  389. $tools.timestampToTime(
  390. section.liveEndTime,
  391. (isDay = false)
  392. )
  393. }}</span>
  394. </div>
  395. </div>
  396. <template
  397. v-if="section.durationTime > 0"
  398. >
  399. <div class="during">
  400. {{
  401. $tools.secondToDate(
  402. section.durationTime
  403. )
  404. }}
  405. </div>
  406. </template>
  407. <template>
  408. <div
  409. class="btn"
  410. v-if="section.rebuild > 0"
  411. >
  412. 待重修
  413. </div>
  414. <template v-else>
  415. <div
  416. class="btn btn--green"
  417. v-if="section.learning == 1"
  418. >
  419. 已看完
  420. </div>
  421. </template>
  422. </template>
  423. <template
  424. v-if="
  425. section.liveStartTime &&
  426. section.sectionType == 2
  427. "
  428. >
  429. <div
  430. class="
  431. live-btn live-btn--blue
  432. "
  433. v-if="
  434. section.liveStartTime >
  435. nowTime
  436. "
  437. >
  438. 待开播
  439. </div>
  440. <div
  441. class="
  442. live-btn live-btn--yellow
  443. "
  444. v-if="
  445. section.liveStartTime <=
  446. nowTime &&
  447. section.liveEndTime >
  448. nowTime
  449. "
  450. >
  451. 直播中
  452. </div>
  453. <div
  454. class="live-btn"
  455. v-if="
  456. section.liveEndTime <
  457. nowTime
  458. "
  459. >
  460. 已结束
  461. </div>
  462. </template>
  463. </template>
  464. <template v-if="section.type == 2">
  465. <template>
  466. <div
  467. class="test-btn"
  468. v-if="section.doType == 1"
  469. >
  470. 练习
  471. </div>
  472. <div
  473. class="test-btn"
  474. v-if="section.doType != 1"
  475. >
  476. 考试
  477. </div>
  478. </template>
  479. <div
  480. class="bank-section__item__text"
  481. >
  482. {{ section.name }}
  483. </div>
  484. <template>
  485. <div
  486. class="btn"
  487. v-if="section.rebuild > 0"
  488. >
  489. 待重修
  490. </div>
  491. <template v-else>
  492. <div
  493. class="btn btn--green"
  494. v-if="section.learning == 1"
  495. >
  496. 合格
  497. </div>
  498. <div
  499. class="btn btn--red"
  500. v-if="section.learning == 0"
  501. >
  502. 不合格
  503. </div>
  504. <div
  505. class="btn btn--green"
  506. v-if="section.rebuild > 0"
  507. >
  508. 待重测
  509. </div>
  510. </template>
  511. </template>
  512. </template>
  513. </div>
  514. </div>
  515. </div>
  516. </div>
  517. </div>
  518. </template>
  519. <template v-if="menu.type == 3">
  520. <div class="item__content">
  521. <div class="bank-section">
  522. <div
  523. class="bank-section__item"
  524. :class="{
  525. active: isActive(menu),
  526. }"
  527. @click="getResource(menu)"
  528. >
  529. <template>
  530. <div
  531. class="note note--blue"
  532. v-if="menu.sectionType == 1"
  533. >
  534. 录播
  535. </div>
  536. <div
  537. class="note"
  538. v-if="menu.sectionType == 2"
  539. >
  540. 直播
  541. </div>
  542. <div
  543. class="note note--yellow"
  544. v-if="menu.sectionType == 3"
  545. >
  546. 回放
  547. </div>
  548. <div class="bank-section__item__text">
  549. {{ menu.name }}
  550. <div
  551. style="font-size: 12px"
  552. v-if="
  553. menu.liveStartTime > nowTime
  554. "
  555. >
  556. <span>{{
  557. $tools.timestampToTime(
  558. menu.liveStartTime,
  559. (isDay = false)
  560. )
  561. }}</span
  562. >-
  563. <span>{{
  564. $tools.timestampToTime(
  565. menu.liveEndTime,
  566. (isDay = false)
  567. )
  568. }}</span>
  569. </div>
  570. </div>
  571. </template>
  572. <template v-if="menu.durationTime > 0">
  573. <div class="during">
  574. {{
  575. $tools.secondToDate(
  576. menu.durationTime
  577. )
  578. }}
  579. </div>
  580. </template>
  581. <template>
  582. <div
  583. class="btn"
  584. v-if="menu.rebuild > 0"
  585. >
  586. 待重修
  587. </div>
  588. <template v-else>
  589. <div
  590. class="btn btn--green"
  591. v-if="menu.learning == 1"
  592. >
  593. 已看完
  594. </div>
  595. </template>
  596. </template>
  597. <template
  598. v-if="
  599. menu.liveStartTime &&
  600. menu.sectionType == 2
  601. "
  602. >
  603. <div
  604. class="live-btn live-btn--blue"
  605. v-if="menu.liveStartTime > nowTime"
  606. >
  607. 待开播
  608. </div>
  609. <div
  610. class="live-btn live-btn--yellow"
  611. v-if="
  612. menu.liveStartTime <= nowTime &&
  613. menu.liveEndTime > nowTime
  614. "
  615. >
  616. 直播中
  617. </div>
  618. <div
  619. class="live-btn"
  620. v-if="menu.liveEndTime < nowTime"
  621. >
  622. 已结束
  623. </div>
  624. </template>
  625. </div>
  626. </div>
  627. </div>
  628. </template>
  629. </div>
  630. </div>
  631. </template>
  632. <!-- 重修目录 -->
  633. <template v-if="tab.name == '2'">
  634. <div class="right-box__body">
  635. <div
  636. class="item"
  637. v-for="(menu, index) in reMenuList"
  638. :key="index"
  639. >
  640. <template v-if="menu.type == 1">
  641. <div
  642. class="item__title"
  643. @click="openModule(menu)"
  644. >
  645. <i
  646. :class="{
  647. 'el-icon-caret-right': !menu.showList,
  648. 'el-icon-caret-bottom': menu.showList,
  649. }"
  650. ></i>
  651. {{ menu.menuName }}
  652. </div>
  653. <div class="item__content">
  654. <div
  655. class="bank-chapter"
  656. v-if="menu.showList"
  657. >
  658. <div
  659. class="bank-chapter__item"
  660. v-for="(
  661. chapter, chapterIndex
  662. ) in menu.list"
  663. :key="chapterIndex"
  664. >
  665. <div
  666. class="bank-chapter__item__text"
  667. @click="openChapter(chapter)"
  668. >
  669. <i
  670. :class="{
  671. 'el-icon-caret-right':
  672. !chapter.showList,
  673. 'el-icon-caret-bottom':
  674. chapter.showList,
  675. }"
  676. ></i
  677. >{{ chapter.name }}
  678. </div>
  679. <div
  680. class="bank-section"
  681. v-if="chapter.showList"
  682. >
  683. <div
  684. class="bank-section__item"
  685. :class="{
  686. active: isActive(section),
  687. }"
  688. v-for="(
  689. section, sectionIndex
  690. ) in chapter.list"
  691. :key="sectionIndex"
  692. @click="getResource(section)"
  693. >
  694. <template v-if="section.type != 2">
  695. <template>
  696. <div
  697. class="note note--blue"
  698. v-if="
  699. section.sectionType == 1
  700. "
  701. >
  702. 录播
  703. </div>
  704. <div
  705. class="note"
  706. v-if="
  707. section.sectionType == 2
  708. "
  709. >
  710. 直播
  711. </div>
  712. <div
  713. class="note note--yellow"
  714. v-if="
  715. section.sectionType == 3
  716. "
  717. >
  718. 回放
  719. </div>
  720. <div
  721. class="
  722. bank-section__item__text
  723. "
  724. >
  725. {{ section.name }}
  726. <div
  727. style="font-size: 12px"
  728. v-if="
  729. section.liveStartTime >
  730. nowTime
  731. "
  732. >
  733. <span>{{
  734. $tools.timestampToTime(
  735. section.liveStartTime,
  736. (isDay = false)
  737. )
  738. }}</span
  739. >-
  740. <span>{{
  741. $tools.timestampToTime(
  742. section.liveEndTime,
  743. (isDay = false)
  744. )
  745. }}</span>
  746. </div>
  747. </div>
  748. </template>
  749. <template
  750. v-if="section.durationTime > 0"
  751. >
  752. <div class="during">
  753. {{
  754. $tools.secondToDate(
  755. section.durationTime
  756. )
  757. }}
  758. </div>
  759. </template>
  760. <template>
  761. <div
  762. class="btn"
  763. v-if="section.rebuild > 0"
  764. >
  765. 待重修
  766. </div>
  767. <template v-else>
  768. <div
  769. class="btn btn--green"
  770. v-if="section.learning == 1"
  771. >
  772. 已看完
  773. </div>
  774. </template>
  775. </template>
  776. <template
  777. v-if="
  778. section.liveStartTime &&
  779. section.sectionType == 2
  780. "
  781. >
  782. <div
  783. class="
  784. live-btn live-btn--blue
  785. "
  786. v-if="
  787. section.liveStartTime >
  788. nowTime
  789. "
  790. >
  791. 待开播
  792. </div>
  793. <div
  794. class="
  795. live-btn live-btn--yellow
  796. "
  797. v-if="
  798. section.liveStartTime <=
  799. nowTime &&
  800. section.liveEndTime >
  801. nowTime
  802. "
  803. >
  804. 直播中
  805. </div>
  806. <div
  807. class="live-btn"
  808. v-if="
  809. section.liveEndTime <
  810. nowTime
  811. "
  812. >
  813. 已结束
  814. </div>
  815. </template>
  816. </template>
  817. <template v-if="section.type == 2">
  818. <template>
  819. <div
  820. class="test-btn"
  821. v-if="section.doType == 1"
  822. >
  823. 练习
  824. </div>
  825. <div
  826. class="test-btn"
  827. v-if="section.doType != 1"
  828. >
  829. 考试
  830. </div>
  831. </template>
  832. <div
  833. class="bank-section__item__text"
  834. >
  835. {{ section.name }}
  836. </div>
  837. <template>
  838. <div
  839. class="btn"
  840. v-if="section.rebuild > 0"
  841. >
  842. 待重修
  843. </div>
  844. <template v-else>
  845. <div
  846. class="btn btn--green"
  847. v-if="section.learning == 1"
  848. >
  849. 合格
  850. </div>
  851. <div
  852. class="btn btn--red"
  853. v-if="section.learning == 0"
  854. >
  855. 不合格
  856. </div>
  857. <div
  858. class="btn btn--green"
  859. v-if="section.rebuild > 0"
  860. >
  861. 待重测
  862. </div>
  863. </template>
  864. </template>
  865. </template>
  866. </div>
  867. </div>
  868. </div>
  869. </div>
  870. </div>
  871. </template>
  872. <template v-if="menu.type == 2">
  873. <div class="item__content">
  874. <div class="bank-chapter">
  875. <div class="bank-chapter__item">
  876. <div
  877. class="bank-chapter__item__text"
  878. @click="openChapter(menu)"
  879. >
  880. <i
  881. :class="{
  882. 'el-icon-caret-right':
  883. !menu.showList,
  884. 'el-icon-caret-bottom':
  885. menu.showList,
  886. }"
  887. ></i
  888. >{{ menu.menuName }}
  889. </div>
  890. <div
  891. class="bank-section"
  892. v-if="menu.showList"
  893. >
  894. <div
  895. class="bank-section__item"
  896. :class="{
  897. active: isActive(section),
  898. }"
  899. v-for="(
  900. section, sectionIndex
  901. ) in menu.list"
  902. :key="sectionIndex"
  903. @click="getResource(section)"
  904. >
  905. <template v-if="section.type != 2">
  906. <template>
  907. <div
  908. class="note note--blue"
  909. v-if="
  910. section.sectionType == 1
  911. "
  912. >
  913. 录播
  914. </div>
  915. <div
  916. class="note"
  917. v-if="
  918. section.sectionType == 2
  919. "
  920. >
  921. 直播
  922. </div>
  923. <div
  924. class="note note--yellow"
  925. v-if="
  926. section.sectionType == 3
  927. "
  928. >
  929. 回放
  930. </div>
  931. </template>
  932. <div
  933. class="bank-section__item__text"
  934. >
  935. {{ section.name }}
  936. <div
  937. style="font-size: 12px"
  938. v-if="
  939. section.liveStartTime >
  940. nowTime
  941. "
  942. >
  943. <span>{{
  944. $tools.timestampToTime(
  945. section.liveStartTime,
  946. (isDay = false)
  947. )
  948. }}</span
  949. >-
  950. <span>{{
  951. $tools.timestampToTime(
  952. section.liveEndTime,
  953. (isDay = false)
  954. )
  955. }}</span>
  956. </div>
  957. </div>
  958. <template
  959. v-if="section.durationTime > 0"
  960. >
  961. <div class="during">
  962. {{
  963. $tools.secondToDate(
  964. section.durationTime
  965. )
  966. }}
  967. </div>
  968. </template>
  969. <template>
  970. <div
  971. class="btn"
  972. v-if="section.rebuild > 0"
  973. >
  974. 待重修
  975. </div>
  976. <template v-else>
  977. <div
  978. class="btn btn--green"
  979. v-if="section.learning == 1"
  980. >
  981. 已看完
  982. </div>
  983. </template>
  984. </template>
  985. <template
  986. v-if="
  987. section.liveStartTime &&
  988. section.sectionType == 2
  989. "
  990. >
  991. <div
  992. class="
  993. live-btn live-btn--blue
  994. "
  995. v-if="
  996. section.liveStartTime >
  997. nowTime
  998. "
  999. >
  1000. 待开播
  1001. </div>
  1002. <div
  1003. class="
  1004. live-btn live-btn--yellow
  1005. "
  1006. v-if="
  1007. section.liveStartTime <=
  1008. nowTime &&
  1009. section.liveEndTime >
  1010. nowTime
  1011. "
  1012. >
  1013. 直播中
  1014. </div>
  1015. <div
  1016. class="live-btn"
  1017. v-if="
  1018. section.liveEndTime <
  1019. nowTime
  1020. "
  1021. >
  1022. 已结束
  1023. </div>
  1024. </template>
  1025. </template>
  1026. <template v-if="section.type == 2">
  1027. <template>
  1028. <div
  1029. class="test-btn"
  1030. v-if="section.doType == 1"
  1031. >
  1032. 练习
  1033. </div>
  1034. <div
  1035. class="test-btn"
  1036. v-if="section.doType != 1"
  1037. >
  1038. 考试
  1039. </div>
  1040. </template>
  1041. <div
  1042. class="bank-section__item__text"
  1043. >
  1044. {{ section.name }}
  1045. </div>
  1046. <template>
  1047. <div
  1048. class="btn"
  1049. v-if="section.rebuild > 0"
  1050. >
  1051. 待重修
  1052. </div>
  1053. <template v-else>
  1054. <div
  1055. class="btn btn--green"
  1056. v-if="section.learning == 1"
  1057. >
  1058. 合格
  1059. </div>
  1060. <div
  1061. class="btn btn--red"
  1062. v-if="section.learning == 0"
  1063. >
  1064. 不合格
  1065. </div>
  1066. <div
  1067. class="btn btn--green"
  1068. v-if="section.rebuild > 0"
  1069. >
  1070. 待重测
  1071. </div>
  1072. </template>
  1073. </template>
  1074. </template>
  1075. </div>
  1076. </div>
  1077. </div>
  1078. </div>
  1079. </div>
  1080. </template>
  1081. <template v-if="menu.type == 3">
  1082. <div class="item__content">
  1083. <div class="bank-section">
  1084. <div
  1085. class="bank-section__item"
  1086. :class="{
  1087. active: isActive(menu),
  1088. }"
  1089. @click="getResource(menu)"
  1090. >
  1091. <template>
  1092. <div
  1093. class="note note--blue"
  1094. v-if="menu.sectionType == 1"
  1095. >
  1096. 录播
  1097. </div>
  1098. <div
  1099. class="note"
  1100. v-if="menu.sectionType == 2"
  1101. >
  1102. 直播
  1103. </div>
  1104. <div
  1105. class="note note--yellow"
  1106. v-if="menu.sectionType == 3"
  1107. >
  1108. 回放
  1109. </div>
  1110. <div class="bank-section__item__text">
  1111. {{ menu.name }}
  1112. <div
  1113. style="font-size: 12px"
  1114. v-if="
  1115. menu.liveStartTime > nowTime
  1116. "
  1117. >
  1118. <span>{{
  1119. $tools.timestampToTime(
  1120. menu.liveStartTime,
  1121. (isDay = false)
  1122. )
  1123. }}</span
  1124. >-
  1125. <span>{{
  1126. $tools.timestampToTime(
  1127. menu.liveEndTime,
  1128. (isDay = false)
  1129. )
  1130. }}</span>
  1131. </div>
  1132. </div>
  1133. </template>
  1134. <template v-if="menu.durationTime > 0">
  1135. <div class="during">
  1136. {{
  1137. $tools.secondToDate(
  1138. menu.durationTime
  1139. )
  1140. }}
  1141. </div>
  1142. </template>
  1143. <template>
  1144. <div
  1145. class="btn"
  1146. v-if="menu.rebuild > 0"
  1147. >
  1148. 待重修
  1149. </div>
  1150. <template v-else>
  1151. <div
  1152. class="btn btn--green"
  1153. v-if="menu.learning == 1"
  1154. >
  1155. 已看完
  1156. </div>
  1157. </template>
  1158. </template>
  1159. <template
  1160. v-if="
  1161. menu.liveStartTime &&
  1162. menu.sectionType == 2
  1163. "
  1164. >
  1165. <div
  1166. class="live-btn live-btn--blue"
  1167. v-if="menu.liveStartTime > nowTime"
  1168. >
  1169. 待开播
  1170. </div>
  1171. <div
  1172. class="live-btn live-btn--yellow"
  1173. v-if="
  1174. menu.liveStartTime <= nowTime &&
  1175. menu.liveEndTime > nowTime
  1176. "
  1177. >
  1178. 直播中
  1179. </div>
  1180. <div
  1181. class="live-btn"
  1182. v-if="menu.liveEndTime < nowTime"
  1183. >
  1184. 已结束
  1185. </div>
  1186. </template>
  1187. </div>
  1188. </div>
  1189. </div>
  1190. </template>
  1191. </div>
  1192. </div>
  1193. </template>
  1194. <template v-if="tab.name == '3'">
  1195. <div class="answer-question">
  1196. <div class="answer-question__header clearfix">
  1197. <div class="textarea-wrap">
  1198. <el-input
  1199. class="textarea"
  1200. resize="none"
  1201. v-model="textarea"
  1202. rows="3"
  1203. type="textarea"
  1204. placeholder="请输入"
  1205. maxlength="1000"
  1206. show-word-limit
  1207. ></el-input>
  1208. </div>
  1209. <el-button
  1210. type="primary"
  1211. class="submit"
  1212. @click="addAnswer"
  1213. >提出疑问</el-button
  1214. >
  1215. </div>
  1216. <div class="answer-question__body">
  1217. <div class="question-list">
  1218. <div
  1219. v-if="answerList.length == 0"
  1220. style="
  1221. text-align: center;
  1222. color: #cccccc;
  1223. margin-top: 14px;
  1224. "
  1225. >
  1226. 暂无记录
  1227. </div>
  1228. <div
  1229. class="question-list__item"
  1230. v-for="(item, index) in answerList"
  1231. :key="index"
  1232. >
  1233. <div class="question-list__item__avatar">
  1234. <img
  1235. v-if="item.assignRealname"
  1236. :src="
  1237. $tools.splitImgHost(item.assignAvatar)
  1238. "
  1239. alt=""
  1240. />
  1241. <img
  1242. v-else
  1243. :src="$tools.splitImgHost(item.avatar)"
  1244. alt=""
  1245. />
  1246. </div>
  1247. <div class="question-list__item__content">
  1248. <div class="nickname">
  1249. {{ item.realname }}
  1250. </div>
  1251. <div class="desc">
  1252. {{ item.answerText }}
  1253. </div>
  1254. <div class="time">
  1255. {{
  1256. $tools.timestampToTime(
  1257. item.createTime,
  1258. false
  1259. )
  1260. }}
  1261. <div
  1262. class="del"
  1263. v-if="item.userId !== userInfo.userId"
  1264. @click="answerBack(item)"
  1265. >
  1266. <el-button type="text"
  1267. >回复</el-button
  1268. >
  1269. </div>
  1270. <div
  1271. class="del"
  1272. style="color: red"
  1273. @click="del(item)"
  1274. v-if="item.userId === userInfo.userId"
  1275. >
  1276. 删除
  1277. </div>
  1278. </div>
  1279. <div
  1280. class="reply-list"
  1281. v-if="
  1282. item.newArraysAnswerList &&
  1283. item.newArraysAnswerList.length
  1284. "
  1285. >
  1286. <div
  1287. class="reply-list__item"
  1288. v-for="(
  1289. items, indexs
  1290. ) in item.newArraysAnswerList"
  1291. :key="indexs"
  1292. >
  1293. <div class="reply-list__item__avatar">
  1294. <img
  1295. :src="
  1296. $tools.splitImgHost(
  1297. items.avatar
  1298. )
  1299. "
  1300. alt=""
  1301. />
  1302. </div>
  1303. <div
  1304. class="reply-list__item__content"
  1305. >
  1306. <div class="nickname">
  1307. {{ items.realname }}
  1308. </div>
  1309. <div class="desc">
  1310. 回复
  1311. <span
  1312. style="
  1313. margin: 0px 4px;
  1314. color: #409eff;
  1315. "
  1316. >@{{
  1317. items.assignRealname
  1318. }}</span
  1319. >
  1320. <span style="color:#ccc;">{{ items.answerText }}</span>
  1321. </div>
  1322. <div class="time">
  1323. {{
  1324. $tools.timestampToTime(
  1325. items.createTime,
  1326. false
  1327. )
  1328. }}
  1329. <div
  1330. class="del"
  1331. style="color: red"
  1332. @click="del(items)"
  1333. v-if="
  1334. items.userId ===
  1335. userInfo.userId
  1336. "
  1337. >
  1338. 删除
  1339. </div>
  1340. <div
  1341. class="reply"
  1342. v-if="
  1343. items.userId !==
  1344. userInfo.userId
  1345. "
  1346. @click="answerBack(items)"
  1347. >
  1348. 回复
  1349. </div>
  1350. </div>
  1351. </div>
  1352. </div>
  1353. </div>
  1354. </div>
  1355. </div>
  1356. </div>
  1357. </div>
  1358. </div>
  1359. </template>
  1360. <template v-if="tab.name == '4'">
  1361. <div class="lecture-notes">
  1362. <div class="lecture-notes__content clearfix">
  1363. <div class="left-boxs">
  1364. <div
  1365. class="textarea clearfix"
  1366. v-if="!(isPlayRebuild > 0) && !vidzb"
  1367. >
  1368. <el-input
  1369. resize="none"
  1370. rows="3"
  1371. v-model="textareaNote"
  1372. type="textarea"
  1373. maxlength="1000"
  1374. show-word-limit
  1375. placeholder="觉得重要的就记下来吧~"
  1376. ></el-input>
  1377. <el-button
  1378. type="primary"
  1379. class="submit"
  1380. @click="noteSubmit"
  1381. >
  1382. 提交笔记
  1383. </el-button>
  1384. </div>
  1385. <div class="note-list">
  1386. <div
  1387. v-if="noteList.length == 0"
  1388. style="
  1389. text-align: center;
  1390. color: #cccccc;
  1391. margin-top: 14px;
  1392. "
  1393. >
  1394. 暂无笔记
  1395. </div>
  1396. <div
  1397. class="note-list__content"
  1398. v-for="(item, index) in noteList"
  1399. :key="index"
  1400. >
  1401. <div
  1402. v-for="(note, index) in item.userNotes"
  1403. :key="index"
  1404. class="user_notes"
  1405. >
  1406. <p class="p1">
  1407. <i
  1408. class="el-icon-video-camera"
  1409. style="margin-right: 8px"
  1410. ></i
  1411. >{{
  1412. $tools.secondToDate(note.noteSecond)
  1413. }}
  1414. <span>{{
  1415. $tools.timestampToTime(
  1416. note.createTime,
  1417. false,
  1418. false
  1419. )
  1420. }}</span>
  1421. </p>
  1422. <p class="p2">{{ note.noteText }}</p>
  1423. </div>
  1424. </div>
  1425. </div>
  1426. <!-- <div class="pagination">
  1427. <el-pagination
  1428. background
  1429. layout="prev, pager, next"
  1430. :total="noteTotal"
  1431. :page-size="noteParams.pageSize"
  1432. >
  1433. </el-pagination>
  1434. </div> -->
  1435. </div>
  1436. </div>
  1437. </div>
  1438. </template>
  1439. <template v-if="tab.name == '5'">
  1440. <div class="lecture-notesjy">
  1441. <div class="listItem">
  1442. <div class="titles">
  1443. {{ courseHandoutsData.handoutsName }}
  1444. </div>
  1445. <div class="btns">
  1446. <div
  1447. class="btn"
  1448. @click="
  1449. previvew(
  1450. $tools.splitImgHost(
  1451. courseHandoutsData.handoutsUrl
  1452. )
  1453. )
  1454. "
  1455. >
  1456. 预览
  1457. </div>
  1458. <div
  1459. v-if="
  1460. courseHandoutsData.canDownload == 1
  1461. ? true
  1462. : false
  1463. "
  1464. class="btn"
  1465. @click="
  1466. printView(
  1467. $tools.splitImgHost(
  1468. courseHandoutsData.handoutsUrl
  1469. )
  1470. )
  1471. "
  1472. >
  1473. 打印
  1474. </div>
  1475. <div
  1476. v-if="
  1477. courseHandoutsData.canDownload == 1
  1478. ? true
  1479. : false
  1480. "
  1481. class="btn"
  1482. @click="
  1483. download(
  1484. $tools.splitImgHost(
  1485. courseHandoutsData.handoutsUrl
  1486. ),
  1487. courseHandoutsData.urlName
  1488. )
  1489. "
  1490. >
  1491. 下载
  1492. </div>
  1493. </div>
  1494. </div>
  1495. <div class="lecture-listFooter" v-if="showPdf">
  1496. <div style="color: #fff">
  1497. {{ courseHandoutsData.urlName }}
  1498. </div>
  1499. <pdf
  1500. class="iframe"
  1501. :src="
  1502. $tools.splitImgHost(
  1503. courseHandoutsData.handoutsUrl
  1504. )
  1505. "
  1506. v-for="i in numPages"
  1507. :key="i"
  1508. :page="i"
  1509. ref="pdf"
  1510. ></pdf>
  1511. <iframe
  1512. id="printIframe"
  1513. :src="
  1514. $tools.splitImgHost(
  1515. courseHandoutsData.handoutsUrl
  1516. )
  1517. "
  1518. frameborder="0"
  1519. style="display: none"
  1520. ></iframe>
  1521. </div>
  1522. </div>
  1523. </template>
  1524. </el-tab-pane>
  1525. </el-tabs>
  1526. </div>
  1527. </div>
  1528. </div>
  1529. </div>
  1530. <div class="course-info__body">
  1531. <el-tabs v-model="activeName">
  1532. <el-tab-pane
  1533. v-for="(item, index) in tabList"
  1534. :key="index"
  1535. :name="item.name"
  1536. :label="item.label"
  1537. >
  1538. <template v-if="item.label == '学员须知'">
  1539. <div class="course-menu clearfix">
  1540. <div class="left-box">
  1541. <div class="left-box__body">
  1542. <div
  1543. class="buy-note"
  1544. v-html="
  1545. goodsData.buyNote &&
  1546. goodsData.buyNote.replace(/\n|\r\n/g, '<br>')
  1547. "
  1548. ></div>
  1549. </div>
  1550. </div>
  1551. <div class="right-box">
  1552. <div class="title">
  1553. 推荐课程
  1554. <a class="more" @click="go('/course-list')"
  1555. >更多></a
  1556. >
  1557. </div>
  1558. <ul class="list">
  1559. <li
  1560. class="course-item"
  1561. v-for="(itemy, index) in compyRecommend(
  1562. recommendList.goodsList
  1563. )"
  1564. :key="index"
  1565. >
  1566. <GoodsItem :item="itemy"></GoodsItem>
  1567. <!-- <div
  1568. class="course-item__img"
  1569. :style="`background-image:url(${$tools.splitImgHost(
  1570. itemy.coverUrl,
  1571. true
  1572. )})`"
  1573. @click="toGoodsDetail(itemy)"
  1574. >
  1575. <div class="note" v-if="itemy.year">
  1576. {{ itemy.year }}
  1577. </div>
  1578. </div>
  1579. <div class="course-item__title">
  1580. {{ itemy.goodsName }}
  1581. </div>
  1582. <div class="course-item__desc">
  1583. <div class="price">
  1584. ¥{{ itemy.standPrice }}
  1585. </div>
  1586. <a
  1587. class="add"
  1588. @click.stop="addCart(true, itemy.goodsId)"
  1589. >加购物车</a
  1590. >
  1591. </div> -->
  1592. </li>
  1593. </ul>
  1594. </div>
  1595. </div>
  1596. </template>
  1597. <template v-if="item.label == '课程答疑'">
  1598. <div class="answer-question">
  1599. <div class="answer-question__header clearfix">
  1600. <div class="textarea-wrap">
  1601. <el-input
  1602. class="textarea"
  1603. v-model="textarea"
  1604. rows="3"
  1605. type="textarea"
  1606. placeholder=""
  1607. ></el-input>
  1608. </div>
  1609. <el-button
  1610. type="primary"
  1611. class="submit"
  1612. @click="addAnswer"
  1613. >提出疑问</el-button
  1614. >
  1615. </div>
  1616. <div class="answer-question__body">
  1617. <div class="question-list">
  1618. <div
  1619. v-if="answerList.length == 0"
  1620. style="text-align: center"
  1621. >
  1622. 暂无记录
  1623. </div>
  1624. <div
  1625. class="question-list__item"
  1626. v-for="(item, index) in answerList"
  1627. :key="index"
  1628. >
  1629. <div class="question-list__item__avatar">
  1630. <img
  1631. v-if="item.assignRealname"
  1632. :src="$tools.splitImgHost(item.assignAvatar)"
  1633. alt=""
  1634. />
  1635. <img
  1636. v-else
  1637. :src="$tools.splitImgHost(item.avatar)"
  1638. alt=""
  1639. />
  1640. </div>
  1641. <div class="question-list__item__content">
  1642. <div class="nickname">
  1643. {{ item.realname }}
  1644. </div>
  1645. <div class="desc">
  1646. {{ item.answerText }}
  1647. </div>
  1648. <div class="time">
  1649. {{
  1650. $tools.timestampToTime(
  1651. item.createTime,
  1652. false
  1653. )
  1654. }}
  1655. <div
  1656. class="del"
  1657. v-if="item.userId !== userInfo.userId"
  1658. @click="answerBack(item)"
  1659. >
  1660. <el-button type="text">回复</el-button>
  1661. </div>
  1662. <div
  1663. class="del"
  1664. @click="del(item)"
  1665. v-if="item.userId === userInfo.userId"
  1666. >
  1667. 删除
  1668. </div>
  1669. </div>
  1670. <div
  1671. class="reply-list"
  1672. v-if="
  1673. item.newArraysAnswerList &&
  1674. item.newArraysAnswerList.length
  1675. "
  1676. >
  1677. <div
  1678. class="reply-list__item"
  1679. v-for="(
  1680. items, indexs
  1681. ) in item.newArraysAnswerList"
  1682. :key="indexs"
  1683. >
  1684. <div class="reply-list__item__avatar">
  1685. <img
  1686. :src="$tools.splitImgHost(items.avatar)"
  1687. alt=""
  1688. />
  1689. </div>
  1690. <div class="reply-list__item__content">
  1691. <div class="nickname">
  1692. {{ items.realname }}
  1693. </div>
  1694. <div class="desc">
  1695. 回复
  1696. <span
  1697. style="
  1698. margin: 0px 4px;
  1699. color: #409eff;
  1700. "
  1701. >@{{ items.assignRealname }}</span
  1702. >
  1703. {{ items.answerText }}
  1704. </div>
  1705. <div class="time">
  1706. {{
  1707. $tools.timestampToTime(
  1708. items.createTime,
  1709. false
  1710. )
  1711. }}
  1712. <div
  1713. class="del"
  1714. @click="del(items)"
  1715. v-if="
  1716. items.userId === userInfo.userId
  1717. "
  1718. >
  1719. 删除
  1720. </div>
  1721. <div
  1722. class="reply"
  1723. v-if="
  1724. items.userId !== userInfo.userId
  1725. "
  1726. @click="answerBack(items)"
  1727. >
  1728. 回复
  1729. </div>
  1730. </div>
  1731. </div>
  1732. </div>
  1733. </div>
  1734. </div>
  1735. </div>
  1736. </div>
  1737. </div>
  1738. </div>
  1739. </template>
  1740. <template v-if="item.label == '笔记讲义'">
  1741. <div class="lecture-notes">
  1742. <div class="lecture-notes__content clearfix">
  1743. <div class="left-box">
  1744. <div
  1745. class="textarea clearfix"
  1746. v-if="!(isPlayRebuild > 0) && !vidzb"
  1747. >
  1748. <el-input
  1749. resize="none"
  1750. rows="3"
  1751. v-model="textareaNote"
  1752. type="textarea"
  1753. placeholder="觉得重要的就记下来吧~"
  1754. ></el-input>
  1755. <el-button
  1756. type="primary"
  1757. class="submit"
  1758. @click="noteSubmit"
  1759. >
  1760. 提交笔记
  1761. </el-button>
  1762. </div>
  1763. <div class="note-list">
  1764. <div
  1765. v-if="noteList.length == 0"
  1766. style="text-align: center"
  1767. >
  1768. 暂无笔记
  1769. </div>
  1770. <div
  1771. class="note-list__content"
  1772. v-for="(item, index) in noteList"
  1773. :key="index"
  1774. >
  1775. <div class="note-list__content__title">
  1776. {{ $tools.timestampToTime(item.dateNote) }}
  1777. </div>
  1778. <div
  1779. class="note-list__item"
  1780. v-for="(note, index) in item.userNotes"
  1781. :key="index"
  1782. >
  1783. <i
  1784. class="el-icon-video-play"
  1785. @click="noteClick(note)"
  1786. ></i>
  1787. <div class="note-list__item__content">
  1788. <div class="title" @click="noteClick(note)">
  1789. {{ $tools.secondToDate(note.noteSecond) }}
  1790. </div>
  1791. <div class="desc">
  1792. {{ note.sectionName }}
  1793. </div>
  1794. <div class="time">{{ note.noteText }}</div>
  1795. </div>
  1796. </div>
  1797. </div>
  1798. </div>
  1799. <div class="pagination">
  1800. <el-pagination
  1801. background
  1802. layout="prev, pager, next"
  1803. :total="noteTotal"
  1804. :page-size="noteParams.pageSize"
  1805. >
  1806. </el-pagination>
  1807. </div>
  1808. </div>
  1809. <div class="right-box" v-if="courseHandoutsData">
  1810. <div class="lecture-list">
  1811. <div class="lecture-list__header">
  1812. 讲义
  1813. <div
  1814. class="slide-btn"
  1815. @click="lectureShow = !lectureShow"
  1816. >
  1817. 收起
  1818. </div>
  1819. </div>
  1820. <div
  1821. class="lecture-list__body"
  1822. v-if="lectureShow"
  1823. >
  1824. <div class="list">
  1825. <div class="list__item">
  1826. <div class="title">
  1827. {{ courseHandoutsData.handoutsName }}
  1828. </div>
  1829. <div class="btns">
  1830. <div
  1831. class="btn"
  1832. @click="
  1833. previvew(
  1834. $tools.splitImgHost(
  1835. courseHandoutsData.handoutsUrl
  1836. )
  1837. )
  1838. "
  1839. >
  1840. 预览
  1841. </div>
  1842. <div
  1843. v-if="
  1844. courseHandoutsData.canDownload == 1
  1845. ? true
  1846. : false
  1847. "
  1848. class="btn"
  1849. @click="
  1850. printView(
  1851. $tools.splitImgHost(
  1852. courseHandoutsData.handoutsUrl
  1853. )
  1854. )
  1855. "
  1856. >
  1857. 打印
  1858. </div>
  1859. <div
  1860. v-if="
  1861. courseHandoutsData.canDownload == 1
  1862. ? true
  1863. : false
  1864. "
  1865. class="btn"
  1866. @click="
  1867. download(
  1868. $tools.splitImgHost(
  1869. courseHandoutsData.handoutsUrl
  1870. ),
  1871. courseHandoutsData.urlName
  1872. )
  1873. "
  1874. >
  1875. 下载
  1876. </div>
  1877. </div>
  1878. </div>
  1879. </div>
  1880. </div>
  1881. </div>
  1882. <div class="lecture-list__footer" v-if="showPdf">
  1883. <div class="lecture-scan">
  1884. <div class="lecture-scan__header">
  1885. {{ courseHandoutsData.urlName }}
  1886. </div>
  1887. <div class="lecture-scan__body">
  1888. <pdf
  1889. class="iframe"
  1890. :src="
  1891. $tools.splitImgHost(
  1892. courseHandoutsData.handoutsUrl
  1893. )
  1894. "
  1895. v-for="i in numPages"
  1896. :key="i"
  1897. :page="i"
  1898. ref="pdf"
  1899. ></pdf>
  1900. <iframe
  1901. id="printIframe"
  1902. :src="
  1903. $tools.splitImgHost(
  1904. courseHandoutsData.handoutsUrl
  1905. )
  1906. "
  1907. frameborder="0"
  1908. style="display: none"
  1909. ></iframe>
  1910. </div>
  1911. </div>
  1912. </div>
  1913. </div>
  1914. </div>
  1915. </div>
  1916. </template>
  1917. </el-tab-pane>
  1918. </el-tabs>
  1919. </div>
  1920. </div>
  1921. </div>
  1922. </div>
  1923. </div>
  1924. </section>
  1925. <el-dialog
  1926. width="800px"
  1927. class="take-photo"
  1928. :visible.sync="takePhotoModal"
  1929. :close-on-click-modal="false"
  1930. :close-on-press-escape="false"
  1931. :show-close="false"
  1932. >
  1933. <div class="take-photo__content">
  1934. <!-- <div class="take-photo__close" @click="takePhotoModal = false">X</div> -->
  1935. <div class="take-photo__header">人脸验证</div>
  1936. <div class="take-photo__body clearfix">
  1937. <div class="left-box">
  1938. <div class="title">重要提示:</div>
  1939. <div class="content">
  1940. <p>1、请保证摄像头正对自己,避免头像偏左或者偏右。</p>
  1941. <p>
  1942. 2、请保证拍照环境光线充足(照片太暗或曝光会降低验证通过率)。
  1943. </p>
  1944. <p>
  1945. 3、请保证整个头像在人脸识别区域内,脸部无遮挡装饰物(佩戴眼镜会降低通过率)。
  1946. </p>
  1947. <p>
  1948. 4、如果下面视频中出现黑屏,摄像头可能被其他进程占用,请关闭其他调用摄像头的程序,重新刷新当前页面重新拍照识别。
  1949. </p>
  1950. </div>
  1951. </div>
  1952. <div class="right-box">
  1953. <img v-show="!isTaking" :src="faceUrl" alt="" />
  1954. <video v-show="isTaking" id="video" :src="stream"></video>
  1955. </div>
  1956. </div>
  1957. <div class="take-photo__footer">
  1958. <el-button
  1959. type="primary"
  1960. v-if="isTaking"
  1961. class="take"
  1962. @click="onPhoto"
  1963. >拍照</el-button
  1964. >
  1965. <el-button
  1966. type="primary"
  1967. v-if="!isTaking"
  1968. class="take"
  1969. :loading="loading"
  1970. @click="reTake"
  1971. >重拍</el-button
  1972. >
  1973. <el-button
  1974. type="primary"
  1975. v-if="!isTaking"
  1976. :loading="loading"
  1977. class="take"
  1978. @click="takeOk"
  1979. >确认</el-button
  1980. >
  1981. </div>
  1982. </div>
  1983. </el-dialog>
  1984. <el-dialog
  1985. width="996px"
  1986. height="600px"
  1987. class="info"
  1988. :visible.sync="showInfoDetailModal"
  1989. :close-on-click-modal="false"
  1990. :close-on-press-escape="false"
  1991. :show-close="false"
  1992. title="资料填写"
  1993. >
  1994. <div class="info__content">
  1995. <el-form
  1996. :model="infoForm"
  1997. ref="infoForm"
  1998. :rules="rules"
  1999. :error-type="errorType"
  2000. >
  2001. <template v-for="(item, index) in listData">
  2002. <el-form-item
  2003. :key="index"
  2004. v-if="item.fieldKey == 'name'"
  2005. :label="item.fieldName"
  2006. :required="item.required"
  2007. label-width="120px"
  2008. :prop="item.required ? item.fieldKey : ''"
  2009. >
  2010. <el-input
  2011. :disabled="disName"
  2012. v-model="infoForm.name"
  2013. :placeholder="`请输入${item.fieldName}`"
  2014. />
  2015. </el-form-item>
  2016. <el-form-item
  2017. :key="index"
  2018. v-if="item.fieldKey == 'idcard'"
  2019. :label="item.fieldName"
  2020. :required="item.required"
  2021. label-width="120px"
  2022. :prop="item.required ? item.fieldKey : ''"
  2023. >
  2024. <el-input
  2025. :disabled="disCard"
  2026. v-model="infoForm.idcard"
  2027. :placeholder="`请输入${item.fieldName}`"
  2028. />
  2029. </el-form-item>
  2030. <el-form-item
  2031. :key="index"
  2032. v-if="item.fieldKey == 'telphone'"
  2033. :label="item.fieldName"
  2034. :required="item.required"
  2035. label-width="120px"
  2036. :prop="item.required ? item.fieldKey : ''"
  2037. >
  2038. <el-input
  2039. :disabled="true"
  2040. v-model="infoForm.telphone"
  2041. :placeholder="`请输入${item.fieldName}`"
  2042. />
  2043. </el-form-item>
  2044. <el-form-item
  2045. :key="index"
  2046. v-if="item.fieldKey == 'school'"
  2047. :label="item.fieldName"
  2048. :required="item.required"
  2049. label-width="120px"
  2050. :prop="item.required ? item.fieldKey : ''"
  2051. >
  2052. <el-input
  2053. v-model="infoForm.school"
  2054. :placeholder="`请输入${item.fieldName}`"
  2055. />
  2056. </el-form-item>
  2057. <el-form-item
  2058. :key="index"
  2059. v-if="item.fieldKey == 'work_unit'"
  2060. :label="item.fieldName"
  2061. :required="item.required"
  2062. label-width="120px"
  2063. :prop="item.required ? item.fieldKey : ''"
  2064. >
  2065. <el-input
  2066. v-model="infoForm.work_unit"
  2067. :placeholder="`请输入${item.fieldName}`"
  2068. />
  2069. </el-form-item>
  2070. <el-form-item
  2071. :key="index"
  2072. v-if="item.fieldKey == 'unit_contact'"
  2073. :label="item.fieldName"
  2074. :required="item.required"
  2075. label-width="120px"
  2076. :prop="item.required ? item.fieldKey : ''"
  2077. >
  2078. <el-input
  2079. v-model="infoForm.unit_contact"
  2080. :placeholder="`请输入${item.fieldName}`"
  2081. />
  2082. </el-form-item>
  2083. <el-form-item
  2084. :key="index"
  2085. v-if="item.fieldKey == 'unit_tel'"
  2086. :label="item.fieldName"
  2087. :required="item.required"
  2088. label-width="120px"
  2089. :prop="item.required ? item.fieldKey : ''"
  2090. >
  2091. <el-input
  2092. v-model="infoForm.unit_tel"
  2093. :placeholder="`请输入${item.fieldName}`"
  2094. />
  2095. </el-form-item>
  2096. <el-form-item
  2097. :key="index"
  2098. v-if="item.fieldKey == 'apply_post'"
  2099. :label="item.fieldName"
  2100. :required="item.required"
  2101. label-width="120px"
  2102. :prop="item.required ? item.fieldKey : ''"
  2103. >
  2104. <el-input
  2105. :disabled="apply_post_disabled"
  2106. v-model="infoForm.apply_post"
  2107. :placeholder="`请输入${item.fieldName}`"
  2108. />
  2109. </el-form-item>
  2110. <el-form-item
  2111. :key="index"
  2112. v-if="item.fieldKey == 'major'"
  2113. :label="item.fieldName"
  2114. :required="item.required"
  2115. label-width="120px"
  2116. :prop="item.required ? item.fieldKey : ''"
  2117. >
  2118. <el-input
  2119. v-model="infoForm.major"
  2120. :placeholder="`请输入${item.fieldName}`"
  2121. />
  2122. </el-form-item>
  2123. <el-form-item
  2124. :key="index"
  2125. v-if="item.inputType == 2"
  2126. :label="item.fieldName"
  2127. label-width="120px"
  2128. :required="item.required"
  2129. :prop="item.required ? item.fieldKey : ''"
  2130. >
  2131. <el-select v-model="infoForm[item.fieldKey]" placeholder="">
  2132. <el-option
  2133. v-for="(option, optionIndex) in getarrays(item.fieldKey)"
  2134. :key="optionIndex"
  2135. :label="option"
  2136. :value="optionIndex + ''"
  2137. ></el-option>
  2138. </el-select>
  2139. </el-form-item>
  2140. <el-form-item
  2141. :key="index"
  2142. v-if="item.inputType == 5"
  2143. :label="item.fieldName"
  2144. label-width="120px"
  2145. :required="item.required"
  2146. :prop="item.required ? item.fieldKey : ''"
  2147. >
  2148. <el-date-picker
  2149. v-model="infoForm[item.fieldKey]"
  2150. align="right"
  2151. type="date"
  2152. placeholder="选择日期"
  2153. >
  2154. </el-date-picker>
  2155. </el-form-item>
  2156. <el-form-item
  2157. :key="index"
  2158. v-if="
  2159. item.inputType == 3 &&
  2160. item.fieldKey !== 'commitment_electr_signature'
  2161. "
  2162. :label="item.fieldName"
  2163. :required="item.required"
  2164. label-width="120px"
  2165. label-position="top"
  2166. :prop="item.required ? item.fieldKey : ''"
  2167. >
  2168. <el-upload
  2169. action=""
  2170. :max-size="2097152"
  2171. accept="image/jpeg, image/jpg, image/png"
  2172. :show-file-list="false"
  2173. list-type="picture"
  2174. :auto-upload="false"
  2175. :ref="
  2176. item.fieldKey === 'recent_photos'
  2177. ? 'recent_photos'
  2178. : item.fieldKey === 'idcard_face_photo'
  2179. ? 'idcard_face_photo'
  2180. : item.fieldKey === 'idcard_national_photo'
  2181. ? 'idcard_national_photo'
  2182. : ''
  2183. "
  2184. :on-change="
  2185. item.fieldKey === 'recent_photos'
  2186. ? changePhotoListHeader1
  2187. : item.fieldKey === 'idcard_face_photo'
  2188. ? changePhotoListHeader2
  2189. : item.fieldKey === 'idcard_national_photo'
  2190. ? changePhotoListHeader3
  2191. : ''
  2192. "
  2193. :file-list="
  2194. item.fieldKey === 'recent_photos'
  2195. ? fileList1
  2196. : item.fieldKey === 'idcard_face_photo'
  2197. ? fileList2
  2198. : item.fieldKey === 'idcard_national_photo'
  2199. ? fileList3
  2200. : ''
  2201. "
  2202. >
  2203. <div class="upload-box">
  2204. <div
  2205. :style="
  2206. item.fieldKey === 'recent_photos'
  2207. ? 'width: 120px; height: 169px;background:url(' +
  2208. require('@/assets/info_1.png') +
  2209. ') no-repeat center;background-size:cover;position:relative;'
  2210. : item.fieldKey === 'idcard_face_photo'
  2211. ? 'width: 120px; height: 82px;background:url(' +
  2212. require('@/assets/info_2.png') +
  2213. ') no-repeat center;background-size:cover;position:relative;'
  2214. : item.fieldKey === 'idcard_national_photo'
  2215. ? 'width: 120px; height: 82px;background:url(' +
  2216. require('@/assets/info_3.png') +
  2217. ') no-repeat center;background-size:cover;position:relative;'
  2218. : ''
  2219. "
  2220. >
  2221. <i
  2222. @click="deleteImg(item)"
  2223. class="el-icon-error"
  2224. v-if="
  2225. item.fieldKey === 'recent_photos'
  2226. ? fileList1[0]
  2227. : item.fieldKey === 'idcard_face_photo'
  2228. ? fileList2[0]
  2229. : item.fieldKey === 'idcard_national_photo'
  2230. ? fileList3[0]
  2231. : ''
  2232. "
  2233. ></i>
  2234. <el-image
  2235. style="width: 100%; height: 100%"
  2236. :src="
  2237. item.fieldKey === 'recent_photos'
  2238. ? $tools.splitImgHost(fileList1[0].url)
  2239. : item.fieldKey === 'idcard_face_photo'
  2240. ? $tools.splitImgHost(fileList2[0].url)
  2241. : item.fieldKey === 'idcard_national_photo'
  2242. ? $tools.splitImgHost(fileList3[0].url)
  2243. : ''
  2244. "
  2245. v-if="
  2246. item.fieldKey === 'recent_photos'
  2247. ? fileList1[0]
  2248. : item.fieldKey === 'idcard_face_photo'
  2249. ? fileList2[0]
  2250. : item.fieldKey === 'idcard_national_photo'
  2251. ? fileList3[0]
  2252. : ''
  2253. "
  2254. :preview-src-list="
  2255. item.fieldKey === 'recent_photos'
  2256. ? [$tools.splitImgHost(fileList1[0].url)]
  2257. : item.fieldKey === 'idcard_face_photo'
  2258. ? [$tools.splitImgHost(fileList2[0].url)]
  2259. : item.fieldKey === 'idcard_national_photo'
  2260. ? [$tools.splitImgHost(fileList3[0].url)]
  2261. : ''
  2262. "
  2263. >
  2264. </el-image>
  2265. </div>
  2266. <div>
  2267. <span
  2268. v-if="item.fieldKey === 'recent_photos'"
  2269. style="color: #999999"
  2270. >竖向白底证件照 文件大小≤2M</span
  2271. >
  2272. <span
  2273. v-if="
  2274. item.fieldKey === 'idcard_face_photo' ||
  2275. item.fieldKey === 'idcard_national_photo'
  2276. "
  2277. style="color: #999999"
  2278. >
  2279. 文件大小≤2M
  2280. </span>
  2281. </div>
  2282. </div>
  2283. <div style="display: inline-block" slot="trigger">
  2284. <el-button type="primary" size="small" round
  2285. >浏览文件</el-button
  2286. >
  2287. </div>
  2288. </el-upload>
  2289. </el-form-item>
  2290. <div
  2291. :key="index"
  2292. v-if="
  2293. item.inputType == 3 &&
  2294. item.fieldKey === 'commitment_electr_signature'
  2295. "
  2296. >
  2297. <el-form-item
  2298. v-if="
  2299. item.inputType == 3 &&
  2300. item.fieldKey === 'commitment_electr_signature'
  2301. "
  2302. label="承诺书"
  2303. :required="item.required"
  2304. label-width="120px"
  2305. label-position="top"
  2306. >
  2307. <div style="line-height: 40px; text-indent: 2em">
  2308. <span>
  2309. 本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
  2310. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
  2311. </span>
  2312. <div style="line-height: 40px; text-indent: 2em">
  2313. <span>特此承诺!</span>
  2314. </div>
  2315. </div>
  2316. </el-form-item>
  2317. <el-form-item
  2318. v-if="
  2319. item.inputType == 3 &&
  2320. item.fieldKey === 'commitment_electr_signature'
  2321. "
  2322. label="签名板"
  2323. :required="item.required"
  2324. label-width="120px"
  2325. label-position="top"
  2326. :prop="item.required ? item.fieldKey : ''"
  2327. >
  2328. <div class="dis_stys">
  2329. <span style="color: #999999">请在下方签名区进行签名</span>
  2330. <el-button
  2331. type="primary"
  2332. size="small"
  2333. @click="retDraw"
  2334. mode=""
  2335. >清空</el-button
  2336. >
  2337. </div>
  2338. <div class="handCenter">
  2339. <vue-esign
  2340. v-if="!infoForm[item.fieldKey]"
  2341. ref="esign"
  2342. :width="600"
  2343. :height="300"
  2344. :isCrop="false"
  2345. :lineWidth="5"
  2346. :lineColor="'#333'"
  2347. />
  2348. <div
  2349. v-else
  2350. style="width: 100%; height: 100%; position: relative"
  2351. >
  2352. <img
  2353. style="width: 100%; height: 100%"
  2354. :src="$tools.splitImgHost(infoForm[item.fieldKey])"
  2355. mode=""
  2356. />
  2357. </div>
  2358. </div>
  2359. </el-form-item>
  2360. </div>
  2361. <el-form-item
  2362. :key="index"
  2363. v-if="item.inputType == 4"
  2364. :label="item.fieldName"
  2365. :required="item.required"
  2366. label-width="120px"
  2367. label-position="top"
  2368. :prop="item.required ? item.fieldKey : ''"
  2369. >
  2370. <el-button
  2371. type="primary"
  2372. size="small"
  2373. round
  2374. @click="downloadStamp(item)"
  2375. >下载模板</el-button
  2376. >
  2377. <el-upload
  2378. action=""
  2379. :max-size="2097152"
  2380. accept="image/jpeg, image/jpg, image/png"
  2381. :show-file-list="false"
  2382. list-type="picture"
  2383. :auto-upload="false"
  2384. ref="stamp"
  2385. :on-change="changePhotoListStamp"
  2386. :file-list="fileListStamp"
  2387. >
  2388. <div style="display: inline-block; vertical-align: top">
  2389. <div
  2390. :style="
  2391. 'width: 120px; height: 120px;background:url(' +
  2392. require('@/assets/info_4.png') +
  2393. ') no-repeat center;background-size:cover;position:relative;'
  2394. "
  2395. >
  2396. <el-image
  2397. style="width: 100%; height: 100%"
  2398. :src="$tools.splitImgHost(fileListStamp[0].url)"
  2399. v-if="fileListStamp[0]"
  2400. :preview-src-list="[
  2401. $tools.splitImgHost(fileListStamp[0].url),
  2402. ]"
  2403. >
  2404. </el-image>
  2405. </div>
  2406. <div>
  2407. <span style="color: #999999">文件大小≤2M</span>
  2408. </div>
  2409. </div>
  2410. <div style="display: inline-block" slot="trigger">
  2411. <el-button type="primary" size="small" round
  2412. >浏览文件</el-button
  2413. >
  2414. </div>
  2415. </el-upload>
  2416. </el-form-item>
  2417. </template>
  2418. </el-form>
  2419. </div>
  2420. <span slot="footer" class="dialog-footer">
  2421. <el-button
  2422. @click="
  2423. showInfoDetailModal = false;
  2424. $router.back(-1);
  2425. "
  2426. >取 消</el-button
  2427. >
  2428. <el-button type="primary" :loading="uploading" @click="submit"
  2429. >确 定</el-button
  2430. >
  2431. </span>
  2432. </el-dialog>
  2433. <el-dialog
  2434. width="996px"
  2435. height="600px"
  2436. class="info"
  2437. :visible.sync="showStampDetailModail"
  2438. :close-on-click-modal="false"
  2439. :close-on-press-escape="false"
  2440. :show-close="false"
  2441. title="资料填写"
  2442. >
  2443. <div class="info__content">
  2444. <el-form
  2445. :model="stampForm"
  2446. ref="stampForm"
  2447. :rules="stampRules"
  2448. :error-type="errorType"
  2449. >
  2450. <template v-for="(item, index) in listDataStamp">
  2451. <el-form-item
  2452. :key="index"
  2453. v-if="item.inputType == 4"
  2454. :label="item.fieldName"
  2455. :required="item.required"
  2456. label-width="120px"
  2457. label-position="top"
  2458. :prop="item.required ? item.fieldKey : ''"
  2459. >
  2460. <el-button
  2461. type="primary"
  2462. size="small"
  2463. round
  2464. @click="downloadStamp(item)"
  2465. >下载模板</el-button
  2466. >
  2467. <el-upload
  2468. action=""
  2469. :max-size="2097152"
  2470. accept="image/jpeg, image/jpg, image/png"
  2471. :show-file-list="false"
  2472. list-type="picture"
  2473. :auto-upload="false"
  2474. ref="stamp"
  2475. :on-change="changePhotoListStamp"
  2476. :file-list="fileListStamp"
  2477. >
  2478. <div style="display: inline-block; vertical-align: top">
  2479. <div
  2480. :style="
  2481. 'width: 120px; height: 120px;background:url(' +
  2482. require('@/assets/info_4.png') +
  2483. ') no-repeat center;background-size:cover;position:relative;'
  2484. "
  2485. >
  2486. <el-image
  2487. style="width: 100%; height: 100%"
  2488. :src="$tools.splitImgHost(fileListStamp[0].url)"
  2489. v-if="fileListStamp[0]"
  2490. :preview-src-list="[
  2491. $tools.splitImgHost(fileListStamp[0].url),
  2492. ]"
  2493. >
  2494. </el-image>
  2495. </div>
  2496. <div>
  2497. <span style="color: #999999">文件大小≤2M</span>
  2498. </div>
  2499. </div>
  2500. <div style="display: inline-block" slot="trigger">
  2501. <el-button type="primary" size="small" round
  2502. >浏览文件</el-button
  2503. >
  2504. </div>
  2505. </el-upload>
  2506. </el-form-item>
  2507. </template>
  2508. </el-form>
  2509. </div>
  2510. <span slot="footer" class="dialog-footer">
  2511. <el-button
  2512. @click="
  2513. showStampDetailModail = false;
  2514. $router.back(-1);
  2515. "
  2516. >取 消</el-button
  2517. >
  2518. <el-button type="primary" :loading="uploading" @click="stampSubmit"
  2519. >确 定</el-button
  2520. >
  2521. </span>
  2522. </el-dialog>
  2523. <el-dialog
  2524. width="996px"
  2525. height="600px"
  2526. class="info"
  2527. :visible.sync="showAgreementModal"
  2528. :close-on-click-modal="false"
  2529. :close-on-press-escape="false"
  2530. :show-close="false"
  2531. title="提示"
  2532. >
  2533. <div class="">
  2534. <div>
  2535. 本产品(或服务)提供【{{
  2536. goodsData.goodsName
  2537. }}】课程的在线学习功能,为使用这些功能,我们需要使用您设备上的摄像头,并收集以下个人信息:
  2538. <span v-for="(item, listIndex) in listData" :key="listIndex"
  2539. >{{ item.fieldName }}、</span
  2540. >
  2541. <!-- 姓名、性别、身份证号码、移动电话号码、身份证照片、一寸照、证书名称/岗位、证书编号、有效期、人脸照片(每节课随机拍摄三张)、 -->
  2542. 学习详细记录。
  2543. </div>
  2544. <div>
  2545. 我们会将上述信息提供至广东省建设执业注册管理中心等第三方组织使用,用于继续教育备案等。如果您拒绝,将导致这些功能无法实现,但不影响您使用本产品(或服务)的其他业务功能。
  2546. </div>
  2547. </div>
  2548. <span slot="footer" class="dialog-footer">
  2549. <el-button @click="$router.back(-1)">取 消</el-button>
  2550. <el-button type="primary" @click="showInfoDetailModal = true"
  2551. >同意并继续</el-button
  2552. >
  2553. </span>
  2554. </el-dialog>
  2555. <el-dialog title="切换课程" :visible.sync="dialogVisible" width="800px">
  2556. <div class="topstyle">
  2557. <p>当前课程</p>
  2558. <div class="list_styleHeader">
  2559. <span style="font-weight: bold; font-size: 16px">{{
  2560. getCourseName(courseId)
  2561. }}</span>
  2562. </div>
  2563. </div>
  2564. <div class="height_style">
  2565. <div
  2566. v-for="(item, index) in courseList"
  2567. :key="index"
  2568. class="list_style"
  2569. :style="
  2570. index % 2 != 1
  2571. ? 'background-color:#F8F8F9;'
  2572. : 'background-color:#fff;'
  2573. "
  2574. @click="activeFunc(item.courseId)"
  2575. >
  2576. <span style="font-weight: bold; font-size: 16px">{{
  2577. item.courseName
  2578. }}</span>
  2579. </div>
  2580. </div>
  2581. </el-dialog>
  2582. <div id="printTable"></div>
  2583. <!-- <ToolBar></ToolBar> -->
  2584. <Footer></Footer>
  2585. </div>
  2586. </template>
  2587. <script>
  2588. import Footer from "@/components/footer/index";
  2589. import Header from "@/components/header/index";
  2590. import ToolBar from "@/components/toolbar/index";
  2591. import GoodsItem from "@/components/goodsItem/index";
  2592. import { mapGetters, mapMutations, mapActions } from "vuex";
  2593. import * as baseUrls from "@/axios.js";
  2594. import pdf from "vue-pdf";
  2595. import print from "print-js";
  2596. export default {
  2597. name: "CourseDetail",
  2598. components: {
  2599. Footer,
  2600. Header,
  2601. ToolBar,
  2602. pdf,
  2603. GoodsItem,
  2604. },
  2605. data() {
  2606. return {
  2607. dialogVisible: false, //选择课程弹窗
  2608. liveDuration: 0,
  2609. numPages: 0,
  2610. showPdf: false,
  2611. // 总页数
  2612. pdfPages: 10,
  2613. // 当前页数
  2614. pageNum: 1,
  2615. // 加载进度
  2616. loadedRatio: 10,
  2617. // 页面加载完成
  2618. curPageNum: 0,
  2619. // 放大系数 默认百分百
  2620. scale: 100,
  2621. // 旋转角度 ‘90’的倍数才有效
  2622. pageRotate: 0,
  2623. // 单击内部链接时触发 (目前我没有遇到使用场景)
  2624. page: 0,
  2625. bgColor: "#ccc",
  2626. answerTimer: null,
  2627. recordObj: {},
  2628. showAgreementModal: false,
  2629. showInfoDetailModal: false,
  2630. showStampDetailModail: false,
  2631. isTaking: true, //是否正在拍照
  2632. photoConfig: false,
  2633. stream: null,
  2634. photoNum: 0,
  2635. playSectionId: 0,
  2636. photoIndex: 0, //当前位于拍照的区间下标 从0开始
  2637. photoHistoryList: [], //已拍照历史的下标点
  2638. moduleId: 0,
  2639. chapterId: 0,
  2640. menuTab: [],
  2641. lectureShow: true,
  2642. textarea: "",
  2643. textareaNote: "",
  2644. takePhotoModal: false,
  2645. activeName: "1",
  2646. courseId: "",
  2647. courseTabIndex: "1",
  2648. goodsId: "",
  2649. gradeId: "",
  2650. livingTimer: null,
  2651. sectionItem: {},
  2652. gradeDetail: {},
  2653. autoplay: false,
  2654. isAllowSeek: "on",
  2655. playbackRate: false,
  2656. goodsPlayConfig: null,
  2657. playTime: 0, //页面播放时长,不含暂停
  2658. param: {
  2659. pageNum: 1,
  2660. pageSize: 100,
  2661. total: 0,
  2662. },
  2663. postTimer: null, //提交视频观看记录定时器
  2664. lockTimer: null,
  2665. courseList: [],
  2666. businessData: {},
  2667. courseHandoutsData: "",
  2668. // menuList: [],
  2669. goodsData: {},
  2670. tabList: [],
  2671. historyChatMsgList: [],
  2672. vid: "",
  2673. vidzb: "",
  2674. player: "",
  2675. playerzb: "",
  2676. activeId: "", //当前选中ID
  2677. vodPlayerJs: "https://player.polyv.net/script/player.js",
  2678. playerJs:
  2679. "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
  2680. uidzb: "egsxlptzdq",
  2681. menuList: [],
  2682. reMenuList: [],
  2683. answerList: [{ newArraysAnswerList: [] }],
  2684. noteList: [],
  2685. photoList: [],
  2686. noteTotal: 0,
  2687. duration: 0,
  2688. answerTimer: null,
  2689. noteParams: {
  2690. pageNum: 1,
  2691. // pageSize: 4,
  2692. },
  2693. ossAvatarUrl: "", //照片地址
  2694. nowTime: 0,
  2695. faceUrl: "",
  2696. loading: null,
  2697. listData: [],
  2698. listDataStamp: [],
  2699. remark: "",
  2700. remarkStatus: false,
  2701. remarkStamp: "",
  2702. remarkStatusStamp: false,
  2703. errorType: ["message"],
  2704. stampForm: {
  2705. commitment_seal: "",
  2706. },
  2707. infoForm: {
  2708. name: "",
  2709. sex: "",
  2710. idcard: "",
  2711. telphone: "",
  2712. education: "",
  2713. school: "",
  2714. graduation_time: "",
  2715. work_unit: "",
  2716. unit_contact: "",
  2717. unit_tel: "",
  2718. apply_post: "",
  2719. major: "",
  2720. working_years: "",
  2721. recent_photos: "",
  2722. idcard_face_photo: "",
  2723. idcard_national_photo: "",
  2724. commitment_electr_signature: "",
  2725. commitment_seal: "",
  2726. },
  2727. needOpenNew: true,
  2728. recommendList: [],
  2729. rules: {
  2730. name: [
  2731. {
  2732. required: true,
  2733. message: "请输入姓名",
  2734. trigger: ["change", "blur"],
  2735. },
  2736. ],
  2737. sex: [
  2738. {
  2739. required: true,
  2740. message: "请选择性别",
  2741. trigger: "change",
  2742. },
  2743. ],
  2744. idcard: [
  2745. {
  2746. required: true,
  2747. message: "请输入身份证号",
  2748. trigger: ["change", "blur"],
  2749. },
  2750. // {
  2751. // validator: (rule, value, callback) => {
  2752. // let IDRe18 =
  2753. // /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  2754. // let IDre15 =
  2755. // /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/;
  2756. // if (!IDRe18.test(value) && !IDre15.test(value)) {
  2757. // return callback(new Error("请输入格式正确的身份证号"));
  2758. // } else {
  2759. // return callback();
  2760. // }
  2761. // },
  2762. // message: "请输入格式正确的身份证号",
  2763. // trigger: ["change", "blur"],
  2764. // },
  2765. ],
  2766. telphone: [
  2767. {
  2768. required: true,
  2769. message: "请输入手机号码",
  2770. trigger: ["change", "blur"],
  2771. },
  2772. // {
  2773. // validator: (rule, value, callback) => {
  2774. // var reg_tel =
  2775. // /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
  2776. // if (reg_tel.test(value)) {
  2777. // return callback();
  2778. // } else {
  2779. // return callback(new Error("手机号码不正确"));
  2780. // }
  2781. // },
  2782. // trigger: ["change", "blur"],
  2783. // },
  2784. ],
  2785. education: [
  2786. {
  2787. required: true,
  2788. message: "请选择学历",
  2789. trigger: "change",
  2790. },
  2791. ],
  2792. school: [
  2793. {
  2794. required: true,
  2795. message: "请输入毕业院校",
  2796. trigger: ["change", "blur"],
  2797. },
  2798. ],
  2799. graduation_time: [
  2800. {
  2801. required: true,
  2802. message: "请选择毕业时间",
  2803. trigger: "change",
  2804. },
  2805. ],
  2806. work_unit: [
  2807. {
  2808. required: true,
  2809. message: "请输入工作单位",
  2810. trigger: ["change", "blur"],
  2811. },
  2812. ],
  2813. unit_contact: [
  2814. {
  2815. required: true,
  2816. message: "请输入单位联系人",
  2817. trigger: ["change", "blur"],
  2818. },
  2819. ],
  2820. unit_tel: [
  2821. {
  2822. required: true,
  2823. message: "请输入单位联系电话",
  2824. trigger: ["change", "blur"],
  2825. },
  2826. {
  2827. validator: (rule, value, callback) => {
  2828. var reg_tel =
  2829. /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
  2830. var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
  2831. var vartest1 = /^([0-9]{3,4})?[0-9]{7,8}$/;
  2832. if (
  2833. reg_tel.test(value) ||
  2834. vartest.test(value) ||
  2835. vartest1.test(value)
  2836. ) {
  2837. return callback();
  2838. } else {
  2839. return callback(new Error("单位联系电话不正确"));
  2840. }
  2841. },
  2842. trigger: ["change", "blur"],
  2843. },
  2844. ],
  2845. apply_post: [
  2846. {
  2847. required: true,
  2848. message: "请输入报名岗位",
  2849. trigger: ["change", "blur"],
  2850. },
  2851. ],
  2852. major: [
  2853. {
  2854. required: true,
  2855. message: "请输入所学专业",
  2856. trigger: ["change", "blur"],
  2857. },
  2858. ],
  2859. working_years: [
  2860. {
  2861. required: true,
  2862. message: "请选择工作年限",
  2863. trigger: "change",
  2864. },
  2865. ],
  2866. recent_photos: [
  2867. {
  2868. required: true,
  2869. message: "请上传证件照",
  2870. trigger: ["change", "blur"],
  2871. },
  2872. ],
  2873. idcard_face_photo: [
  2874. {
  2875. required: true,
  2876. message: "请上传身份证人像面",
  2877. trigger: ["change", "blur"],
  2878. },
  2879. ],
  2880. idcard_national_photo: [
  2881. {
  2882. required: true,
  2883. message: "请上传身份证国徽面",
  2884. trigger: ["change", "blur"],
  2885. },
  2886. ],
  2887. commitment_electr_signature: [
  2888. {
  2889. required: true,
  2890. message: "请签写承诺书电子签",
  2891. trigger: ["change", "blur"],
  2892. },
  2893. ],
  2894. commitment_seal: [
  2895. {
  2896. required: true,
  2897. message: "请上传承诺书盖章",
  2898. trigger: ["change", "blur"],
  2899. },
  2900. ],
  2901. },
  2902. stampRules: {
  2903. commitment_seal: [
  2904. {
  2905. required: true,
  2906. message: "请上传承诺书盖章",
  2907. trigger: ["change", "blur"],
  2908. },
  2909. ],
  2910. },
  2911. fileList1: [], //证件照
  2912. fileList2: [], //人像
  2913. fileList3: [], //国徽
  2914. fileListStamp: [], //印章
  2915. dictObj: null,
  2916. isRequired: false,
  2917. uploading: false,
  2918. veryIdCard: "",
  2919. veryIdName: "",
  2920. isPlayRebuild: false,
  2921. showRecordStatus: false,
  2922. hasStart: false,
  2923. needOpen: true, //是否需要展开第一章节
  2924. menuIndex: [],
  2925. clickLock: false,
  2926. liveLast: null,
  2927. apply_post_disabled: false,
  2928. disName: false, // 姓名是否禁止输入
  2929. disCard: false, // 身份证是否禁止输入
  2930. clickSectionItem: {}, // 点击节的内容
  2931. courseTotal: 0,
  2932. };
  2933. },
  2934. computed: {
  2935. ...mapGetters(["userInfo"]),
  2936. compyRecommend: function () {
  2937. return function (array) {
  2938. let ary = [];
  2939. if (array) {
  2940. for (let i = 0; i < array.length; i++) {
  2941. if (i >= 5) {
  2942. break;
  2943. } else {
  2944. ary.push(array[i]);
  2945. }
  2946. }
  2947. }
  2948. return ary;
  2949. };
  2950. },
  2951. changeName: function () {
  2952. return function (id) {
  2953. var aryName = "";
  2954. for (let i = 0; i < this.courseList.length; i++) {
  2955. if (this.courseList[i].courseId == id) {
  2956. if (this.courseList[i].subjectName) {
  2957. aryName =
  2958. `【${this.courseList[i].subjectName}】 ` +
  2959. this.courseList[i].courseName;
  2960. } else {
  2961. aryName = this.courseList[i].courseName;
  2962. }
  2963. }
  2964. }
  2965. return aryName;
  2966. };
  2967. },
  2968. getCourseName: function () {
  2969. return function (id) {
  2970. var courseName = "";
  2971. for (let i = 0; i < this.courseList.length; i++) {
  2972. if (this.courseList[i].courseId == id) {
  2973. courseName = this.courseList[i].courseName;
  2974. break;
  2975. }
  2976. }
  2977. return courseName;
  2978. };
  2979. },
  2980. },
  2981. async mounted() {
  2982. this.courseId = +this.$route.query.courseId || "";
  2983. this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  2984. this.goodsId = this.$route.params.goodsId;
  2985. this.orderGoodsId = this.$route.query.orderGoodsId;
  2986. this.gradeId = this.$route.query.gradeId;
  2987. this.sectionItem = this.$route.query;
  2988. console.log('this.sectionItem', this.sectionItem)
  2989. let isOther = this.$route.query.isOther || "";
  2990. if (isOther) {
  2991. const confirmText = [
  2992. "您的学习账号已经开通,请按照步骤操作,进行学习。",
  2993. "1.点击【跳转学习网址】按钮",
  2994. "2.打开学习网址后,选择【个人用户】进行登录",
  2995. "(1)账号:您个人的身份证号码",
  2996. "(2)密码:身份证号码,再加111111",
  2997. ];
  2998. const newDatas = [];
  2999. const h = this.$createElement;
  3000. for (const i in confirmText) {
  3001. newDatas.push(h("p", null, confirmText[i]));
  3002. }
  3003. this.$confirm(h("div", null, newDatas), "温馨提示", {
  3004. beforeClose: (type) => {
  3005. if (type == "confirm") {
  3006. window.open("http://admin.zhujianpeixun.com/", "_blank");
  3007. } else if (type == "cancel") {
  3008. this.$router.back(-1);
  3009. }
  3010. },
  3011. confirmButtonText: "跳转学习网址",
  3012. cancelButtonText: "关闭",
  3013. closeOnClickModal: false,
  3014. closeOnPressEscape: false,
  3015. distinguishCancelAndClose: false,
  3016. showClose: false,
  3017. });
  3018. return;
  3019. }
  3020. if (this.$route.query.rebuild) {
  3021. this.courseTabIndex = "2";
  3022. }
  3023. await this.getGoodsDetail(); //商品详情
  3024. this.dictList();
  3025. // this.userConfirmInfoDetail().then((res) => {
  3026. this.getbaseprofiletplists().then(async (res) => {
  3027. // let allMenuList = await this.studyRecordMenuAllList();
  3028. // let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  3029. // let liveMenu = allMenuList.filter((item) => {
  3030. // //获取直播中的视频
  3031. // if (
  3032. // item.type == 3 &&
  3033. // item.liveStartTime <= nowTime &&
  3034. // item.liveEndTime > nowTime
  3035. // ) {
  3036. // return true;
  3037. // } else {
  3038. // return false;
  3039. // }
  3040. // });
  3041. // let earlyTime = 0;
  3042. // if (liveMenu && liveMenu.length) {
  3043. // earlyTime = liveMenu[0].liveStartTime;
  3044. // }
  3045. await this.courseCourseList();
  3046. if (this.sectionItem.recordingUrl) {
  3047. return;
  3048. let noteSecond = this.$route.query.noteSecond;
  3049. if (noteSecond > 0) {
  3050. let item = {
  3051. sectionId: this.$route.query.sectionId,
  3052. recordingUrl: this.$route.query.recordingUrl,
  3053. noteSecond: noteSecond,
  3054. studyDuration: noteSecond,
  3055. moduleId: this.$route.query.moduleId,
  3056. chapterId: this.$route.query.chapterId,
  3057. };
  3058. this.playSectionId = this.$route.query.sectionId;
  3059. setTimeout(() => {
  3060. this.noteClick(item);
  3061. }, 1000);
  3062. }
  3063. } else {
  3064. // this.studyRecordQueryLiveLast();
  3065. }
  3066. // let noteSecond = this.$route.query.noteSecond;
  3067. // if (noteSecond > 0) {
  3068. // let item = {
  3069. // sectionId: this.$route.query.sectionId,
  3070. // recordingUrl: this.$route.query.recordingUrl,
  3071. // noteSecond: noteSecond,
  3072. // studyDuration: noteSecond,
  3073. // moduleId: this.$route.query.moduleId,
  3074. // chapterId: this.$route.query.chapterId,
  3075. // };
  3076. // this.sectionItem = item;
  3077. // this.playSectionId = this.$route.query.sectionId;
  3078. // setTimeout(() => {
  3079. // this.noteClick(item);
  3080. // }, 1000);
  3081. // }
  3082. });
  3083. // });
  3084. },
  3085. beforeDestroy() {
  3086. try {
  3087. this.$msgbox.close();
  3088. } catch (err) {}
  3089. if (this.playSectionId && this.hasStart) {
  3090. this.postStudyRecord();
  3091. }
  3092. // if (this.lockTimer) {
  3093. // clearInterval(this.lockTimer);
  3094. // this.$request
  3095. // .lockDelLock({
  3096. // action: "jxjy",
  3097. // })
  3098. // .then((res) => {});
  3099. // }
  3100. this.clears();
  3101. clearInterval(this.answerTimer);
  3102. clearInterval(this.postTimer);
  3103. clearInterval(this.livingTimer);
  3104. },
  3105. methods: {
  3106. ...mapMutations(["getCartCount"]),
  3107. ...mapActions(["getUserInfo"]),
  3108. openChangeCourseBoxs() {
  3109. this.dialogVisible = true;
  3110. },
  3111. handleClick(tab) {
  3112. if (tab.name == '3') {
  3113. this.getAnswerList() //答疑列表
  3114. }
  3115. },
  3116. /**
  3117. * 确定选中
  3118. */
  3119. activeFunc(item) {
  3120. this.courseId = item;
  3121. this.courseChange();
  3122. this.dialogVisible = false;
  3123. },
  3124. isLast(item) {
  3125. if (this.liveLast) {
  3126. let sectionASame =
  3127. this.liveLast.sectionId == (item.sectionId || item.menuId);
  3128. let chapterSame = this.liveLast.chapterId == (item.chapterId || 0);
  3129. let moduleSame = this.liveLast.moduleId == (item.moduleId || 0);
  3130. return sectionASame && chapterSame && moduleSame;
  3131. } else {
  3132. return false;
  3133. }
  3134. },
  3135. /**
  3136. * 获取上次观看的直播
  3137. */
  3138. studyRecordGetLastLive() {
  3139. this.$request
  3140. .studyRecordGetLastLive({
  3141. orderGoodsId: this.orderGoodsId,
  3142. courseId: this.courseId,
  3143. })
  3144. .then((res) => {
  3145. this.liveLast = res.data;
  3146. });
  3147. },
  3148. /**
  3149. * 获取观看记录
  3150. */
  3151. studyRecordQueryLiveLast() {
  3152. return new Promise((resolve, reject) => {
  3153. this.$request
  3154. .studyRecordQueryLiveLast({
  3155. orderGoodsId: this.orderGoodsId,
  3156. courseId: this.courseId,
  3157. })
  3158. .then((res) => {
  3159. console.log(res, "couse");
  3160. if (res.data) {
  3161. if (res.data.sectionType == 1) {
  3162. //录播
  3163. this.chapterId = res.data.chapterId;
  3164. this.moduleId = res.data.moduleId;
  3165. this.playSectionId = res.data.sectionId;
  3166. this.vid = res.data.recordingUrl;
  3167. this.sectionItem = res.data;
  3168. console.log('================sectionItem', this.sectionItem)
  3169. this.playVideo(res.data);
  3170. } else if (res.data.sectionType == 2) {
  3171. //直播
  3172. this.studyRecordGetLastLive();
  3173. } else if (res.data.sectionType == 3) {
  3174. //回放
  3175. this.chapterId = res.data.chapterId;
  3176. this.moduleId = res.data.moduleId;
  3177. this.playSectionId = res.data.sectionId;
  3178. this.vid = res.data.recordingUrl;
  3179. this.sectionItem = res.data;
  3180. this.playVideo(res.data);
  3181. }
  3182. if (res.data.sectionId > 0) {
  3183. resolve(true);
  3184. } else {
  3185. resolve(false);
  3186. }
  3187. } else {
  3188. resolve(false);
  3189. }
  3190. });
  3191. });
  3192. },
  3193. /**
  3194. *
  3195. 获取推荐列表
  3196. */
  3197. getRecommend() {
  3198. this.$request
  3199. .appCommonActivityRecommendList({
  3200. businessId: this.goodsData.businessId,
  3201. type: 1,
  3202. })
  3203. .then((res) => {
  3204. if (res.rows.length) {
  3205. this.recommendList = res.rows[0];
  3206. }
  3207. });
  3208. },
  3209. addCart(status, goodsId) {
  3210. this.$request
  3211. .addCart({ goodsId: status ? goodsId : this.goodsId })
  3212. .then((res) => {
  3213. this.getCartCount();
  3214. this.$message({
  3215. message: "加入购物车成功",
  3216. type: "success",
  3217. });
  3218. })
  3219. .catch((err) => {
  3220. if (err.code == 500) {
  3221. this.$message({
  3222. message: err.msg,
  3223. type: "warning",
  3224. });
  3225. }
  3226. });
  3227. },
  3228. toGoodsDetail(item) {
  3229. this.$router.push({
  3230. path: "/course-detail/" + item.goodsId,
  3231. });
  3232. },
  3233. async takeOk() {
  3234. this.loading = true;
  3235. let compareFaceData = await this.faceRecognition();
  3236. if (compareFaceData >= 80) {
  3237. const waitYS = await this.imageInfos();
  3238. this.postCoursePhotoRecord()
  3239. .then((res) => {
  3240. this.photoHistoryList.push(this.photoIndex);
  3241. this.postStudyRecord(); //提交记录
  3242. //恢复播放
  3243. this.$message({
  3244. type: "success",
  3245. message: "拍照成功",
  3246. });
  3247. this.takePhotoModal = false;
  3248. this.isTaking = false;
  3249. this.loading = false;
  3250. var polyvPlayerContext = this.player;
  3251. if (polyvPlayerContext) {
  3252. polyvPlayerContext.j2s_resumeVideo();
  3253. }
  3254. var polyvPlayerContext = this.playerzb;
  3255. if (polyvPlayerContext) {
  3256. polyvPlayerContext.j2s_resumeVideo();
  3257. }
  3258. })
  3259. .catch((err) => {
  3260. this.loading = false;
  3261. console.log(err, "err");
  3262. this.$message({
  3263. type: "warning",
  3264. message: "上传接口报错,请重新拍照上传",
  3265. });
  3266. this.reTake();
  3267. });
  3268. } else {
  3269. this.$message({
  3270. type: "warning",
  3271. message: "人脸匹配不通过,请重新拍照上传",
  3272. });
  3273. setTimeout(() => {
  3274. this.loading = false;
  3275. this.reTake();
  3276. }, 2000);
  3277. return;
  3278. }
  3279. },
  3280. changePhotoListStamp(params, fileList) {
  3281. const file = params.raw;
  3282. const fileType = file.type;
  3283. const isImage = fileType.indexOf("image") != -1;
  3284. const isLt2M = file.size / 1024 / 1024 < 2;
  3285. // 这里常规检验,看项目需求而定
  3286. if (!isImage) {
  3287. this.$message.error("只能上传图片格式png、jpg、gif!");
  3288. return;
  3289. }
  3290. if (!isLt2M) {
  3291. this.$message.error("只能上传图片大小小于2M");
  3292. return;
  3293. }
  3294. if (fileList.length == 1) {
  3295. fileList.splice(0, 1);
  3296. }
  3297. this.$refs.stamp[0].clearFiles();
  3298. this.$upload
  3299. .upload(file, 0)
  3300. .then((res) => {
  3301. this.$set(this.infoForm, "commitment_seal", res);
  3302. this.fileListStamp = [
  3303. {
  3304. name: res,
  3305. url: res,
  3306. },
  3307. ];
  3308. this.$refs.stamp[0].clearFiles();
  3309. console.log(res);
  3310. })
  3311. .catch((err) => {
  3312. this.$refs.stamp[0].clearFiles();
  3313. });
  3314. },
  3315. // 页面加载成功 当前页数
  3316. pageLoaded(e) {
  3317. this.$emit("current", e);
  3318. this.curPageNum = e;
  3319. },
  3320. changePhotoListHeader1(params, fileList) {
  3321. console.log(params);
  3322. const file = params.raw;
  3323. const fileType = file.type;
  3324. const isImage = fileType.indexOf("image") != -1;
  3325. const isLt2M = file.size / 1024 / 1024 < 2;
  3326. // 这里常规检验,看项目需求而定
  3327. if (!isImage) {
  3328. this.$message.error("只能上传图片格式png、jpg、gif!");
  3329. return;
  3330. }
  3331. if (!isLt2M) {
  3332. this.$message.error("只能上传图片大小小于2M");
  3333. return;
  3334. }
  3335. if (fileList.length == 1) {
  3336. fileList.splice(0, 1);
  3337. }
  3338. this.$refs.recent_photos[0].clearFiles();
  3339. this.$upload
  3340. .upload(file, 0)
  3341. .then((res) => {
  3342. this.$set(this.infoForm, "recent_photos", res);
  3343. this.fileList1 = [
  3344. {
  3345. name: res,
  3346. url: res,
  3347. },
  3348. ];
  3349. this.$refs.recent_photos[0].clearFiles();
  3350. console.log(res);
  3351. })
  3352. .catch((err) => {
  3353. this.$refs.recent_photos[0].clearFiles();
  3354. });
  3355. },
  3356. async changePhotoListHeader2(params, fileList) {
  3357. const file = params.raw;
  3358. const fileType = file.type;
  3359. const isImage = fileType.indexOf("image") != -1;
  3360. const isLt2M = file.size / 1024 / 1024 < 2;
  3361. // 这里常规检验,看项目需求而定
  3362. if (!isImage) {
  3363. this.$message.error("只能上传图片格式png、jpg、gif!");
  3364. return;
  3365. }
  3366. if (!isLt2M) {
  3367. this.$message.error("只能上传图片大小小于2M");
  3368. return;
  3369. }
  3370. if (fileList.length == 1) {
  3371. fileList.splice(0, 1);
  3372. }
  3373. let res = await this.faceCertificationIDCardOCR(1, file)
  3374. if (res.code == 500) {
  3375. this.$message.warning("请上传正确清晰的身份证人像面照片");
  3376. return;
  3377. }
  3378. this.$refs.idcard_face_photo[0].clearFiles();
  3379. this.$set(this.infoForm, "idcard_face_photo", res.data.IdImgPath);
  3380. this.fileList2 = [
  3381. {
  3382. name: res.data.IdImgPath,
  3383. url: res.data.IdImgPath,
  3384. },
  3385. ];
  3386. // this.$upload
  3387. // .upload(file, 0)
  3388. // .then((res) => {
  3389. // console.log(res, "res");
  3390. // this.$set(this.infoForm, "idcard_face_photo", res);
  3391. // this.fileList2 = [
  3392. // {
  3393. // name: res,
  3394. // url: res,
  3395. // },
  3396. // ];
  3397. // this.$refs.idcard_face_photo[0].clearFiles();
  3398. // console.log(res);
  3399. // })
  3400. // .catch((err) => {
  3401. // this.$refs.idcard_face_photo[0].clearFiles();
  3402. // });
  3403. },
  3404. async changePhotoListHeader3(params, fileList) {
  3405. const file = params.raw;
  3406. const fileType = file.type;
  3407. const isImage = fileType.indexOf("image") != -1;
  3408. const isLt2M = file.size / 1024 / 1024 < 2;
  3409. // 这里常规检验,看项目需求而定
  3410. if (!isImage) {
  3411. this.$message.error("只能上传图片格式png、jpg、gif!");
  3412. return;
  3413. }
  3414. if (!isLt2M) {
  3415. this.$message.error("只能上传图片大小小于2M");
  3416. return;
  3417. }
  3418. if (fileList.length == 1) {
  3419. fileList.splice(0, 1);
  3420. }
  3421. let res = await this.faceCertificationIDCardOCR(2, file);
  3422. if (res.code == 500) {
  3423. this.$message.warning("请上传正确清晰的身份证国徽面照片");
  3424. return;
  3425. }
  3426. this.$refs.idcard_national_photo[0].clearFiles();
  3427. this.$set(this.infoForm, "idcard_national_photo", res.data.IdImgPath);
  3428. this.fileList3 = [
  3429. {
  3430. name: res.data.IdImgPath,
  3431. url: res.data.IdImgPath,
  3432. },
  3433. ];
  3434. // this.$upload
  3435. // .upload(file, 0)
  3436. // .then((res) => {
  3437. // this.$set(this.infoForm, "idcard_national_photo", res);
  3438. // this.fileList3 = [
  3439. // {
  3440. // name: res,
  3441. // url: res,
  3442. // },
  3443. // ];
  3444. // this.$refs.idcard_national_photo[0].clearFiles();
  3445. // console.log(res);
  3446. // })
  3447. // .catch((err) => {
  3448. // this.$refs.idcard_national_photo[0].clearFiles();
  3449. // });
  3450. },
  3451. faceCertificationIDCardOCR(cardSide, file) {
  3452. return new Promise((resolve) => {
  3453. var reader = new FileReader();
  3454. // 将文件加载进入
  3455. reader.readAsDataURL(file);
  3456. reader.onload = (e) => {
  3457. // 转换完成输出该文件base64编码
  3458. let base64 = e.target.result;
  3459. this.$request
  3460. .faceCertificationIDCardOCR({
  3461. cardSide: cardSide, //1人像 2 国徽
  3462. cardImageBase64: base64,
  3463. gradeId: this.gradeId,
  3464. })
  3465. .then((res) => {
  3466. resolve(res);
  3467. })
  3468. .catch((err) => {
  3469. resolve(err);
  3470. });
  3471. };
  3472. });
  3473. },
  3474. async submit() {
  3475. if (this.uploading) {
  3476. return;
  3477. }
  3478. this.uploading = true;
  3479. var ast = this.listData.some((item) => {
  3480. return item.fieldKey === "commitment_electr_signature";
  3481. });
  3482. if (ast) {
  3483. await this.subCanvas();
  3484. }
  3485. this.resultForm();
  3486. },
  3487. stampSubmit() {
  3488. if (this.uploading) {
  3489. return;
  3490. }
  3491. this.uploading = true;
  3492. this.stampResultForm();
  3493. },
  3494. backLI() {
  3495. this.player.j2s_seekVideo(0);
  3496. this.showRecordStatus = false;
  3497. },
  3498. //验证表单
  3499. stampResultForm() {
  3500. for (let i = 0; i < this.listDataStamp.length; i++) {
  3501. if (
  3502. this.listDataStamp[i].fieldKey === "commitment_seal" &&
  3503. !this.listDataStamp[i].required
  3504. ) {
  3505. this.submitApi();
  3506. return;
  3507. }
  3508. }
  3509. this.$refs.stampForm.validate((valid) => {
  3510. if (valid) {
  3511. this.submitApiStamp();
  3512. } else {
  3513. this.uploading = false;
  3514. }
  3515. });
  3516. },
  3517. async submitApiStamp() {
  3518. var data = JSON.parse(JSON.stringify(this.stampForm));
  3519. if (data["commitment_seal"]) {
  3520. data.commitment_seal = await this.$upload.upload(
  3521. data.commitment_seal,
  3522. 0
  3523. );
  3524. }
  3525. this.optionChanges(data);
  3526. },
  3527. optionChanges(data) {
  3528. var self = this;
  3529. var objs = {};
  3530. for (let k in data) {
  3531. objs[k] = {
  3532. fieldKey: k,
  3533. value: data[k],
  3534. fieldName: (function () {
  3535. for (let i = 0; i < self.listDataStamp.length; i++) {
  3536. if (self.listDataStamp[i].fieldKey == k) {
  3537. return self.listDataStamp[i].fieldName;
  3538. }
  3539. }
  3540. })(),
  3541. status: self.remarkStatusStamp ? 1 : 0,
  3542. };
  3543. }
  3544. var datas = {
  3545. orderGoodsId: this.orderGoodsId,
  3546. goodsId: self.goodsId,
  3547. keyValue: JSON.stringify(objs),
  3548. };
  3549. if (self.remarkStatus) {
  3550. datas.id = self.id;
  3551. self.$request.editbaseprofileStamp(datas).then((res) => {
  3552. this.uploading = false;
  3553. this.getUserInfo();
  3554. this.showStampDetailModail = false;
  3555. this.$message.success("提交成功");
  3556. });
  3557. } else {
  3558. self.$request.addbaseprofileStamp(datas).then((res) => {
  3559. this.uploading = false;
  3560. this.getUserInfo();
  3561. this.showStampDetailModail = false;
  3562. this.$message.success("提交成功");
  3563. });
  3564. }
  3565. },
  3566. resultForm() {
  3567. console.log(1);
  3568. if (this.isRequired) {
  3569. this.submitApi();
  3570. } else {
  3571. console.log(1);
  3572. this.$refs.infoForm.validate((valid) => {
  3573. console.log(1);
  3574. if (valid) {
  3575. this.submitApi();
  3576. } else {
  3577. this.uploading = false;
  3578. }
  3579. });
  3580. // if (int === 1) {
  3581. // this.errorType = ["toast"];
  3582. // } else {
  3583. // this.errorType = ["message"];
  3584. // }
  3585. }
  3586. },
  3587. async submitApi() {
  3588. console.log(this.infoForm, "999");
  3589. var data = JSON.parse(JSON.stringify(this.infoForm));
  3590. if (data["sex"]) {
  3591. data.sex = this.dictObj["sys_user_sex"][Number(data.sex)];
  3592. }
  3593. if (data["education"]) {
  3594. data.education = this.dictObj["edu_level"][Number(data.education)];
  3595. }
  3596. if (data["working_years"]) {
  3597. data.working_years =
  3598. this.dictObj["working_years"][Number(data.working_years)];
  3599. }
  3600. if (data["recent_photos"]) {
  3601. data.recent_photos = await this.$upload.upload(data.recent_photos, 0);
  3602. }
  3603. if (data["idcard_face_photo"]) {
  3604. data.idcard_face_photo = await this.$upload.upload(
  3605. data.idcard_face_photo,
  3606. 0
  3607. );
  3608. }
  3609. if (data["idcard_national_photo"]) {
  3610. data.idcard_national_photo = await this.$upload.upload(
  3611. data.idcard_national_photo,
  3612. 0
  3613. );
  3614. }
  3615. if (data["commitment_electr_signature"]) {
  3616. data.commitment_electr_signature = await this.$upload.upload(
  3617. data.commitment_electr_signature,
  3618. 0
  3619. );
  3620. }
  3621. this.uploadDatas(data);
  3622. },
  3623. async downloadStamp(item) {
  3624. let self = this;
  3625. var ast = this.listData.some((item) => {
  3626. return item.fieldKey === "commitment_electr_signature";
  3627. });
  3628. if (ast) {
  3629. await this.subCanvas();
  3630. }
  3631. let data = JSON.parse(JSON.stringify(this.infoForm));
  3632. if (data["sex"]) {
  3633. data.sex = this.dictObj["sys_user_sex"][Number(data.sex)];
  3634. }
  3635. if (data["education"]) {
  3636. data.education = this.dictObj["edu_level"][Number(data.education)];
  3637. }
  3638. if (data["working_years"]) {
  3639. data.working_years =
  3640. this.dictObj["working_years"][Number(data.working_years)];
  3641. }
  3642. console.log(data, "data");
  3643. if (this.remarkStatus) {
  3644. var arsty = {};
  3645. for (let k in data) {
  3646. for (let j in self.copyData) {
  3647. if (k === j) {
  3648. if (self.copyData[j].value === data[k]) {
  3649. arsty[k] = {
  3650. fieldKey: k,
  3651. value: data[k],
  3652. fieldName: (function () {
  3653. for (let i = 0; i < self.listData.length; i++) {
  3654. if (self.listData[i].fieldKey == k) {
  3655. return self.listData[i].fieldName;
  3656. }
  3657. }
  3658. })(),
  3659. status: 0,
  3660. };
  3661. } else {
  3662. arsty[k] = {
  3663. fieldKey: k,
  3664. value: data[k],
  3665. fieldName: (function () {
  3666. for (let i = 0; i < self.listData.length; i++) {
  3667. if (self.listData[i].fieldKey == k) {
  3668. return self.listData[i].fieldName;
  3669. }
  3670. }
  3671. })(),
  3672. status: 1,
  3673. };
  3674. }
  3675. }
  3676. }
  3677. }
  3678. } else {
  3679. var arsty = {};
  3680. for (let k in data) {
  3681. arsty[k] = {
  3682. fieldKey: k,
  3683. value: data[k],
  3684. fieldName: (function () {
  3685. for (let i = 0; i < self.listData.length; i++) {
  3686. if (self.listData[i].fieldKey == k) {
  3687. return self.listData[i].fieldName;
  3688. }
  3689. }
  3690. })(),
  3691. status: 0,
  3692. };
  3693. }
  3694. }
  3695. console.log(arsty, "arsty");
  3696. this.$request
  3697. .baseProfileStampV2AddWord({
  3698. goodsId: this.goodsId,
  3699. keyValue: JSON.stringify(arsty),
  3700. })
  3701. .then((res) => {
  3702. let url = this.$tools.splitImgHost(res.msg);
  3703. let name = res.msg.substring(res.msg.lastIndexOf("/") + 1);
  3704. let image = new Image();
  3705. // 解决跨域 Canvas 污染问题,
  3706. image.setAttribute("crossorigin", "anonymous");
  3707. image.onload = function () {
  3708. var canvas = document.createElement("canvas");
  3709. canvas.width = image.width;
  3710. canvas.height = image.height;
  3711. var context = canvas.getContext("2d");
  3712. context.drawImage(image, 0, 0, image.width, image.height);
  3713. var base64 = canvas.toDataURL("image/jpg"); //将图片格式转为base64
  3714. var a = document.createElement("a"); // 生成一个a元素
  3715. var event = new MouseEvent("click"); // 创建一个单击事件
  3716. a.download = name; // 设置图片名称
  3717. console.log(base64);
  3718. a.href = base64; // 将生成的URL设置为a.href属性
  3719. a.dispatchEvent(event); // 触发a的单击事件
  3720. };
  3721. image.src = url + "?time=" + Date.now(); //注意,这里是灵魂,否则依旧会产生跨域问题
  3722. });
  3723. },
  3724. convertBase64UrlToBlob(urlData) {
  3725. var localData = urlData; //dataUrl为base64位
  3726. let base = atob(localData.substring(localData.indexOf(",") + 1)); // base是将base64编码解码,去掉data:image/png;base64部分
  3727. let length = base.length;
  3728. let url = new Uint8Array(length);
  3729. while (length--) {
  3730. url[length] = base.charCodeAt(length);
  3731. }
  3732. let file = new File([url], "a.jpg", {
  3733. type: "image/jpg",
  3734. });
  3735. //最后将file,通过ajax请求做为参数传给服务器就可以了
  3736. return file;
  3737. },
  3738. async uploadDatas(data) {
  3739. let self = this;
  3740. if (this.infoForm.recent_photos && this.infoForm.idcard_face_photo) {
  3741. let base = await this.$tools.imageToBase64(
  3742. this.$tools.splitImgHost(this.infoForm.idcard_face_photo)
  3743. );
  3744. console.log(base);
  3745. console.log(this.$tools.splitImgHost(this.infoForm.idcard_face_photo));
  3746. let resData = {};
  3747. try {
  3748. resData = await this.$request.faceCertificationIDCardOCR({
  3749. cardSide: 1, //1人像 2 国徽
  3750. cardImageBase64: base,
  3751. gradeId: this.gradeId,
  3752. });
  3753. } catch (err) {
  3754. self.$message.warning("身份证人像面照片异常,请重新上传");
  3755. self.uploading = false;
  3756. return;
  3757. }
  3758. if (!resData.data) {
  3759. this.$message.warning("身份证人像面照片异常,请重新上传");
  3760. this.uploading = false;
  3761. return;
  3762. }
  3763. this.veryIdCard = resData.data.IdNum;
  3764. this.veryIdName = resData.data.IdName;
  3765. // if (this.infoForm.idcard) {
  3766. // if (this.infoForm.idcard != this.veryIdCard) {
  3767. // this.$message.warning(
  3768. // "输入的身份证号和身份证人像面照片身份证号不匹配"
  3769. // );
  3770. // this.uploading = false;
  3771. // return;
  3772. // }
  3773. // }
  3774. let base64 = await this.$tools.imageToBase64(
  3775. this.$tools.splitImgHost(this.infoForm.recent_photos)
  3776. );
  3777. let newData = {
  3778. urlA: this.infoForm.idcard_face_photo,
  3779. oneInchPhotos: base64,
  3780. };
  3781. this.$request
  3782. .faceCertificationIdCardCompareFace(newData)
  3783. .then((res1) => {
  3784. if (res1.data >= 70) {
  3785. var self = this;
  3786. if (self.remarkStatus) {
  3787. var arsty = {};
  3788. for (let k in data) {
  3789. for (let j in self.copyData) {
  3790. if (k === j) {
  3791. if (self.copyData[j].value === data[k]) {
  3792. arsty[k] = {
  3793. fieldKey: k,
  3794. value: data[k],
  3795. fieldName: (function () {
  3796. for (let i = 0; i < self.listData.length; i++) {
  3797. if (self.listData[i].fieldKey == k) {
  3798. return self.listData[i].fieldName;
  3799. }
  3800. }
  3801. })(),
  3802. status: 0,
  3803. };
  3804. } else {
  3805. arsty[k] = {
  3806. fieldKey: k,
  3807. value: data[k],
  3808. fieldName: (function () {
  3809. for (let i = 0; i < self.listData.length; i++) {
  3810. if (self.listData[i].fieldKey == k) {
  3811. return self.listData[i].fieldName;
  3812. }
  3813. }
  3814. })(),
  3815. status: 1,
  3816. };
  3817. }
  3818. }
  3819. }
  3820. }
  3821. var datas = {
  3822. id: this.id,
  3823. goodsId: this.goodsId,
  3824. orderGoodsId: this.orderGoodsId,
  3825. keyValue: JSON.stringify(arsty),
  3826. };
  3827. this.$request
  3828. .editbaseprofiletp(datas)
  3829. .then((res) => {
  3830. this.uploading = false;
  3831. this.courseCourseList();
  3832. this.getUserInfo();
  3833. this.$message.success("提交成功");
  3834. this.showInfoDetailModal = false;
  3835. this.showAgreementModal = false;
  3836. })
  3837. .catch((err) => {
  3838. this.$message.warning(err.msg);
  3839. this.uploading = false;
  3840. });
  3841. } else {
  3842. var objs = {};
  3843. for (let k in data) {
  3844. objs[k] = {
  3845. fieldKey: k,
  3846. value: data[k],
  3847. fieldName: (function () {
  3848. for (let i = 0; i < self.listData.length; i++) {
  3849. if (self.listData[i].fieldKey == k) {
  3850. return self.listData[i].fieldName;
  3851. }
  3852. }
  3853. })(),
  3854. status: 0,
  3855. };
  3856. }
  3857. var datas = {
  3858. goodsId: this.goodsId,
  3859. profileTpId: this.goodsId,
  3860. orderGoodsId: this.orderGoodsId,
  3861. keyValue: JSON.stringify(objs),
  3862. };
  3863. this.$request
  3864. .addbaseprofiletp(datas)
  3865. .then((res) => {
  3866. this.uploading = false;
  3867. this.courseCourseList();
  3868. this.getUserInfo();
  3869. this.$message.success("提交成功");
  3870. this.showInfoDetailModal = false;
  3871. this.showAgreementModal = false;
  3872. })
  3873. .catch((err) => {
  3874. this.$message.warning(err.msg);
  3875. this.uploading = false;
  3876. });
  3877. }
  3878. } else {
  3879. this.uploading = false;
  3880. this.$message.warning("证件照和身份证人像面照片不匹配");
  3881. }
  3882. })
  3883. .catch((err) => {
  3884. this.uploading = false;
  3885. this.$message.warning(err.msg);
  3886. });
  3887. return;
  3888. }
  3889. if (self.remarkStatus) {
  3890. var arsty = {};
  3891. for (let k in data) {
  3892. for (let j in self.copyData) {
  3893. if (k === j) {
  3894. if (self.copyData[j].value === data[k]) {
  3895. arsty[k] = {
  3896. fieldKey: k,
  3897. value: data[k],
  3898. fieldName: (function () {
  3899. for (let i = 0; i < self.listData.length; i++) {
  3900. if (self.listData[i].fieldKey == k) {
  3901. return self.listData[i].fieldName;
  3902. }
  3903. }
  3904. })(),
  3905. status: 0,
  3906. };
  3907. } else {
  3908. arsty[k] = {
  3909. fieldKey: k,
  3910. value: data[k],
  3911. fieldName: (function () {
  3912. for (let i = 0; i < self.listData.length; i++) {
  3913. if (self.listData[i].fieldKey == k) {
  3914. return self.listData[i].fieldName;
  3915. }
  3916. }
  3917. })(),
  3918. status: 1,
  3919. };
  3920. }
  3921. }
  3922. }
  3923. }
  3924. var datas = {
  3925. id: this.id,
  3926. goodsId: this.goodsId,
  3927. orderGoodsId: this.orderGoodsId,
  3928. keyValue: JSON.stringify(arsty),
  3929. };
  3930. this.$request
  3931. .editbaseprofiletp(datas)
  3932. .then((res) => {
  3933. this.uploading = false;
  3934. this.courseCourseList();
  3935. this.getUserInfo();
  3936. this.$message.success("提交成功");
  3937. this.showInfoDetailModal = false;
  3938. this.showAgreementModal = false;
  3939. })
  3940. .catch((err) => {
  3941. this.$message.warning(err.msg);
  3942. this.uploading = false;
  3943. });
  3944. } else {
  3945. var objs = {};
  3946. for (let k in data) {
  3947. objs[k] = {
  3948. fieldKey: k,
  3949. value: data[k],
  3950. fieldName: (function () {
  3951. for (let i = 0; i < self.listData.length; i++) {
  3952. if (self.listData[i].fieldKey == k) {
  3953. return self.listData[i].fieldName;
  3954. }
  3955. }
  3956. })(),
  3957. status: 0,
  3958. };
  3959. }
  3960. var datas = {
  3961. goodsId: this.goodsId,
  3962. profileTpId: this.goodsId,
  3963. orderGoodsId: this.orderGoodsId,
  3964. keyValue: JSON.stringify(objs),
  3965. };
  3966. this.$request
  3967. .addbaseprofiletp(datas)
  3968. .then((res) => {
  3969. this.uploading = false;
  3970. this.courseCourseList();
  3971. this.getUserInfo();
  3972. this.$message.success("提交成功");
  3973. this.showInfoDetailModal = false;
  3974. this.showAgreementModal = false;
  3975. })
  3976. .catch((err) => {
  3977. this.$message.warning(err.msg);
  3978. this.uploading = false;
  3979. });
  3980. }
  3981. },
  3982. subCanvas() {
  3983. return new Promise((resolve, reject) => {
  3984. var self = this;
  3985. if (self.infoForm.commitment_electr_signature) {
  3986. resolve();
  3987. return;
  3988. }
  3989. this.$refs.esign[0]
  3990. .generate() // 使用生成器调用把签字的图片转换成为base64图片格式
  3991. .then(async (res) => {
  3992. let url = await this.$upload.upload(
  3993. this.convertBase64UrlToBlob(res),
  3994. 0
  3995. );
  3996. this.$set(this.infoForm, "commitment_electr_signature", url);
  3997. resolve();
  3998. })
  3999. .catch((err) => {
  4000. console.log(err, "err");
  4001. // 画布没有签字时会执行这里提示一下
  4002. // this.uploading = false;
  4003. // this.$message({
  4004. // type: "warning",
  4005. // message: "请签名后再生成签字图片",
  4006. // });
  4007. resolve();
  4008. });
  4009. });
  4010. },
  4011. imageInfos() {
  4012. var self = this;
  4013. return new Promise(async (resolve, reject) => {
  4014. const waitUpload = await self.uploadFile(self.faceUrl, 0);
  4015. resolve(waitUpload);
  4016. });
  4017. },
  4018. getarrays(key) {
  4019. if (key === "sex") {
  4020. return this.dictObj["sys_user_sex"];
  4021. }
  4022. if (key === "education") {
  4023. return this.dictObj["edu_level"];
  4024. }
  4025. if (key === "working_years") {
  4026. return this.dictObj["working_years"];
  4027. }
  4028. },
  4029. dictList() {
  4030. this.$request.dictList().then((res) => {
  4031. if (res.code === 200) {
  4032. let newList = {};
  4033. let list = res.data;
  4034. for (let i = 0; i < list.length; i++) {
  4035. let item = list[i];
  4036. if (newList.hasOwnProperty(item.dictType)) {
  4037. newList[item.dictType].push(item.dictLabel);
  4038. } else {
  4039. newList[item.dictType] = [item.dictLabel];
  4040. }
  4041. }
  4042. this.dictObj = newList;
  4043. }
  4044. });
  4045. },
  4046. getbaseprofiletplists() {
  4047. return new Promise((resolve) => {
  4048. let self = this;
  4049. this.$request
  4050. .getbaseprofiletplists({
  4051. goodsId: this.goodsId,
  4052. orderGoodsId: this.orderGoodsId || "",
  4053. })
  4054. .then((res) => {
  4055. if (res.code === 200 && res.rows.length) {
  4056. console.log(1);
  4057. if (res.rows[0].keyValue) {
  4058. console.log(2);
  4059. self.$request
  4060. .getbaseprofiletpId(self.goodsId)
  4061. .then((baseRes) => {
  4062. if (baseRes.code === 200) {
  4063. console.log(3);
  4064. if (baseRes.data) {
  4065. console.log(4);
  4066. self.$request
  4067. .getbaseprofiletpgetInfo({
  4068. goodsId: self.goodsId,
  4069. orderGoodsId: self.orderGoodsId,
  4070. })
  4071. .then((result) => {
  4072. console.log(result, "result");
  4073. if (result.code === 200) {
  4074. if (
  4075. !result.data ||
  4076. (result.data.status === 3 &&
  4077. result.data.changeStatus === 1)
  4078. ) {
  4079. console.log(5);
  4080. if (!result.data) {
  4081. console.log(6);
  4082. self.needProfileModal = true;
  4083. this.$confirm(`请填写资料`, "提示", {
  4084. confirmButtonText: "确定",
  4085. cancelButtonText: "返回",
  4086. closeOnClickModal: false,
  4087. closeOnPressEscape: false,
  4088. distinguishCancelAndClose: false,
  4089. showClose: false,
  4090. })
  4091. .then((_) => {
  4092. this.showAgreementModal = true;
  4093. this.getInfo();
  4094. })
  4095. .catch((_) => {
  4096. this.$router.back(-1);
  4097. });
  4098. } else {
  4099. this.$confirm(
  4100. `资料审核不通过,请前往重新填写`,
  4101. "提示",
  4102. {
  4103. confirmButtonText: "确定",
  4104. cancelButtonText: "返回",
  4105. closeOnClickModal: false,
  4106. closeOnPressEscape: false,
  4107. distinguishCancelAndClose: false,
  4108. showClose: false,
  4109. }
  4110. )
  4111. .then((_) => {
  4112. this.showInfoDetailModal = true;
  4113. this.getInfo();
  4114. })
  4115. .catch((_) => {
  4116. this.$router.back(-1);
  4117. });
  4118. }
  4119. } else if (
  4120. result.data.status === 1 &&
  4121. JSON.parse(res.rows[0].keyValue2)[0]
  4122. ) {
  4123. console.log(8);
  4124. self.$request
  4125. .getbaseprofileStampgetInfo({
  4126. goodsId: self.goodsId,
  4127. orderGoodsId: self.orderGoodsId,
  4128. })
  4129. .then((k) => {
  4130. if (k.code === 200) {
  4131. if (
  4132. !k.data ||
  4133. (k.data.status === 3 &&
  4134. k.data.changeStatus === 1)
  4135. ) {
  4136. if (!k.data) {
  4137. console.log(9);
  4138. this.$confirm(
  4139. `请前往填写盖章资料`,
  4140. "提示",
  4141. {
  4142. confirmButtonText: "确定",
  4143. cancelButtonText: "返回",
  4144. closeOnClickModal: false,
  4145. closeOnPressEscape: false,
  4146. distinguishCancelAndClose: false,
  4147. showClose: false,
  4148. }
  4149. )
  4150. .then((_) => {
  4151. this.showStampDetailModail = true;
  4152. this.getInfoStamp();
  4153. })
  4154. .catch((_) => {
  4155. this.$router.back(-1);
  4156. });
  4157. } else {
  4158. console.log(10);
  4159. self.needProfileModal = true;
  4160. this.$confirm(
  4161. `资料盖章审核不通过,请前往重新填写`,
  4162. "提示",
  4163. {
  4164. confirmButtonText: "确定",
  4165. cancelButtonText: "返回",
  4166. closeOnClickModal: false,
  4167. closeOnPressEscape: false,
  4168. distinguishCancelAndClose: false,
  4169. showClose: false,
  4170. }
  4171. )
  4172. .then((_) => {
  4173. this.showStampDetailModail = true;
  4174. this.getInfoStamp();
  4175. })
  4176. .catch((_) => {
  4177. this.$router.back(-1);
  4178. });
  4179. }
  4180. } else {
  4181. resolve();
  4182. }
  4183. }
  4184. });
  4185. } else {
  4186. resolve();
  4187. }
  4188. }
  4189. });
  4190. } else {
  4191. resolve();
  4192. }
  4193. }
  4194. });
  4195. } else {
  4196. resolve();
  4197. }
  4198. } else {
  4199. resolve();
  4200. }
  4201. });
  4202. if (this.gradeId > 0) {
  4203. //提交完资料返回判断是否已开班
  4204. this.getGradeInfo();
  4205. }
  4206. });
  4207. },
  4208. getInfoStamp() {
  4209. var self = this;
  4210. this.$request.getbaseprofiletpId(this.goodsId).then((res) => {
  4211. var ast = JSON.parse(res.data.keyValue2);
  4212. self.listDataStamp = ast;
  4213. self.$request
  4214. .getbaseprofileStampgetInfo({
  4215. goodsId: self.goodsId,
  4216. orderGoodsId: self.orderGoodsId,
  4217. })
  4218. .then((result) => {
  4219. if (result.data && result.data.status === 3) {
  4220. self.remarkStamp = result.data.text;
  4221. self.remarkStatusStamp = true;
  4222. self.id = result.data.id;
  4223. } else if (
  4224. result.data &&
  4225. (result.data.status === 1 || result.data.status === 2)
  4226. ) {
  4227. // uni.showModal({
  4228. // showCancel: false,
  4229. // content:
  4230. // result.data.status === 1
  4231. // ? "该商品审核资料已通过,不可重复提交资料"
  4232. // : result.data.status === 2
  4233. // ? "该商品审核资料处于待审核状态,不可重复提交资料"
  4234. // : "请联系管理员",
  4235. // success: function (k) {
  4236. // if (k.confirm) {
  4237. // uni.navigateBack();
  4238. // }
  4239. // },
  4240. // });
  4241. }
  4242. })
  4243. .catch((err) => {});
  4244. });
  4245. },
  4246. getGradeInfo() {
  4247. let self = this;
  4248. this.$request.goodsGradeInfo(this.gradeId).then((res) => {
  4249. if (res.code == 200) {
  4250. self.gradeDetail = res.data;
  4251. if (self.needProfileModal) {
  4252. return;
  4253. }
  4254. if (self.gradeDetail.learningStatus == 2) {
  4255. this.$confirm(
  4256. `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
  4257. "提示",
  4258. {
  4259. confirmButtonText: "确定",
  4260. closeOnClickModal: false,
  4261. closeOnPressEscape: false,
  4262. showCancelButton: false,
  4263. distinguishCancelAndClose: false,
  4264. showClose: false,
  4265. }
  4266. )
  4267. .then((_) => {
  4268. this.$router.back(-1);
  4269. })
  4270. .catch((_) => {});
  4271. }
  4272. if (
  4273. self.gradeDetail.learningStatus == 3 &&
  4274. Number(self.gradeDetail.learningTimeStart) >
  4275. Number(new Date() / 1000)
  4276. ) {
  4277. this.$confirm(
  4278. `当前课程正在申请中,正式开班后方可进行学习,请耐心等候!`,
  4279. "提示",
  4280. {
  4281. confirmButtonText: "返回",
  4282. closeOnClickModal: false,
  4283. closeOnPressEscape: false,
  4284. showCancelButton: false,
  4285. distinguishCancelAndClose: false,
  4286. showClose: false,
  4287. }
  4288. )
  4289. .then((_) => {
  4290. this.$router.back(-1);
  4291. })
  4292. .catch((_) => {});
  4293. }
  4294. }
  4295. });
  4296. this.$store.state.allowLoading = true;
  4297. },
  4298. deleteImg(item) {
  4299. if (item.fieldKey == "recent_photos") {
  4300. this.fileList1 = [];
  4301. this.infoForm["recent_photos"] = "";
  4302. } else if (item.fieldKey == "idcard_face_photo") {
  4303. this.fileList2 = [];
  4304. this.infoForm["idcard_face_photo"] = "";
  4305. } else if (item.fieldKey == "idcard_national_photo") {
  4306. this.fileList3 = [];
  4307. this.infoForm["idcard_national_photo"] = "";
  4308. }
  4309. },
  4310. /**
  4311. * getbaseprofiletpgetInfo接口返回值result.data.data不存在的话说明是第一次填写资料
  4312. */
  4313. getInfo() {
  4314. var self = this;
  4315. this.$request.getbaseprofiletpId(this.goodsId).then((res) => {
  4316. console.log(res, "res");
  4317. var listData = JSON.parse(res.data.keyValue);
  4318. var ast = JSON.parse(res.data.keyValue2);
  4319. self.listData = [...listData, ...ast];
  4320. console.log(self.listData, "self.listData");
  4321. self.listData.forEach((item) => {
  4322. if (item.fieldKey == "idcard") {
  4323. this.infoForm.idcard = this.userInfo.idCard;
  4324. this.disCard = this.infoForm.idcard ? true : false
  4325. }
  4326. if (item.fieldKey == "telphone") {
  4327. this.infoForm.telphone = this.userInfo.telphone;
  4328. }
  4329. if (item.fieldKey == "name") {
  4330. this.infoForm.name = this.userInfo.realname || "";
  4331. this.disName = this.infoForm.name ? true : false
  4332. }
  4333. });
  4334. self.isRequired = self.listData.every((ims) => {
  4335. return ims.required === false;
  4336. });
  4337. this.$nextTick(() => {
  4338. this.agreementModal = true;
  4339. });
  4340. self.$request
  4341. .getbaseprofiletpgetInfo({
  4342. goodsId: this.goodsId,
  4343. orderGoodsId: this.orderGoodsId,
  4344. })
  4345. .then((result) => {
  4346. if (result.code === 200) {
  4347. if (!result.data) {
  4348. self.$request
  4349. .getbaseprofiletplistProfile({
  4350. pageNum: 1,
  4351. pageSize: 1,
  4352. })
  4353. .then((kit) => {
  4354. if (kit.rows.length) {
  4355. var ajson = JSON.parse(kit.rows[0].keyValue);
  4356. self.listData.forEach((zyitem, zyindex) => {
  4357. for (let k in ajson) {
  4358. if (zyitem.fieldKey == k && ajson[k].value) {
  4359. if (k === "sex") {
  4360. const sexIndex =
  4361. self.dictObj["sys_user_sex"].indexOf(
  4362. ajson[k].value
  4363. ) + "";
  4364. self.$set(self.infoForm, k, sexIndex);
  4365. } else if (k === "education") {
  4366. const sexIndex =
  4367. self.dictObj["edu_level"].indexOf(
  4368. ajson[k].value
  4369. ) + "";
  4370. self.$set(self.infoForm, k, sexIndex);
  4371. } else if (k === "working_years") {
  4372. const sexIndex =
  4373. self.dictObj["working_years"].indexOf(
  4374. ajson[k].value
  4375. ) + "";
  4376. self.$set(self.infoForm, k, sexIndex);
  4377. } else if (k === "recent_photos") {
  4378. self.$set(self.infoForm, k, ajson[k].value);
  4379. if (ajson[k].value) {
  4380. self.fileList1 = [
  4381. {
  4382. url: ajson[k].value,
  4383. },
  4384. ];
  4385. }
  4386. } else if (k === "idcard_face_photo") {
  4387. self.$set(self.infoForm, k, ajson[k].value);
  4388. if (ajson[k].value) {
  4389. self.fileList2 = [
  4390. {
  4391. url: ajson[k].value,
  4392. },
  4393. ];
  4394. }
  4395. } else if (k === "idcard_national_photo") {
  4396. self.$set(self.infoForm, k, ajson[k].value);
  4397. if (ajson[k].value) {
  4398. self.fileList3 = [
  4399. {
  4400. url: ajson[k].value,
  4401. },
  4402. ];
  4403. }
  4404. } else {
  4405. if (k === "name") {
  4406. self.$set(
  4407. self.infoForm,
  4408. k,
  4409. this.$store.state.userInfo.realname
  4410. );
  4411. } else if (k === "idcard") {
  4412. self.$set(
  4413. self.infoForm,
  4414. k,
  4415. this.$store.state.userInfo.idCard
  4416. );
  4417. } else if (k === "telphone") {
  4418. self.$set(
  4419. self.infoForm,
  4420. k,
  4421. this.$store.state.userInfo.telphone
  4422. );
  4423. } else if (k !== "commitment_electr_signature") {
  4424. self.$set(self.infoForm, k, ajson[k].value);
  4425. }
  4426. }
  4427. }
  4428. }
  4429. });
  4430. }
  4431. });
  4432. }
  4433. if (result.data && result.data.status === 3) {
  4434. self.remark = result.data.text;
  4435. self.remarkStatus = true;
  4436. self.id = result.data.id;
  4437. var arrays = JSON.parse(result.data.keyValue);
  4438. self.copyData = JSON.parse(JSON.stringify(arrays));
  4439. for (let k in arrays) {
  4440. if (k === "sex") {
  4441. if (arrays[k].value) {
  4442. const sexIndex =
  4443. self.dictObj["sys_user_sex"].indexOf(arrays[k].value) +
  4444. "";
  4445. self.$set(self.infoForm, k, sexIndex);
  4446. }
  4447. } else if (k === "education") {
  4448. if (arrays[k].value) {
  4449. const sexIndex =
  4450. self.dictObj["edu_level"].indexOf(arrays[k].value) + "";
  4451. self.$set(self.infoForm, k, sexIndex);
  4452. }
  4453. } else if (k === "working_years") {
  4454. if (arrays[k].value) {
  4455. const sexIndex =
  4456. self.dictObj["working_years"].indexOf(arrays[k].value) +
  4457. "";
  4458. self.$set(self.infoForm, k, sexIndex);
  4459. }
  4460. } else if (k === "recent_photos") {
  4461. self.$set(self.infoForm, k, arrays[k].value);
  4462. if (arrays[k].value) {
  4463. self.fileList1 = [{ url: arrays[k].value }];
  4464. }
  4465. } else if (k === "idcard_face_photo") {
  4466. self.$set(self.infoForm, k, arrays[k].value);
  4467. if (arrays[k].value) {
  4468. self.fileList2 = [{ url: arrays[k].value }];
  4469. }
  4470. } else if (k === "idcard_national_photo") {
  4471. self.$set(self.infoForm, k, arrays[k].value);
  4472. if (arrays[k].value) {
  4473. self.fileList3 = [{ url: arrays[k].value }];
  4474. }
  4475. } else if (k === "name") {
  4476. self.$set(
  4477. self.infoForm,
  4478. k,
  4479. this.$store.state.userInfo.realname
  4480. );
  4481. } else if (k === "idcard") {
  4482. self.$set(
  4483. self.infoForm,
  4484. k,
  4485. this.$store.state.userInfo.idCard
  4486. );
  4487. } else if (k === "telphone") {
  4488. self.$set(
  4489. self.infoForm,
  4490. k,
  4491. this.$store.state.userInfo.telphone
  4492. );
  4493. } else {
  4494. self.$set(self.infoForm, k, arrays[k].value);
  4495. }
  4496. }
  4497. } else if (
  4498. result.data &&
  4499. (result.data.status === 1 || result.data.status === 2)
  4500. ) {
  4501. this.$confirm(
  4502. result.data.status === 1
  4503. ? "该商品审核资料已通过,不可重复提交资料"
  4504. : result.data.status === 2
  4505. ? "该商品审核资料处于待审核状态,不可重复提交资料"
  4506. : "请联系管理员",
  4507. "提示",
  4508. {
  4509. confirmButtonText: "返回",
  4510. closeOnClickModal: false,
  4511. closeOnPressEscape: false,
  4512. showCancelButton: false,
  4513. distinguishCancelAndClose: false,
  4514. showClose: false,
  4515. }
  4516. )
  4517. .then((_) => {
  4518. this.$router.back(-1);
  4519. })
  4520. .catch((_) => {});
  4521. }
  4522. }
  4523. });
  4524. });
  4525. },
  4526. returnName(key) {
  4527. if (key === "sex") {
  4528. if (this.infoForm[key]) {
  4529. return this.dictObj["sys_user_sex"][Number(this.infoForm[key])];
  4530. } else {
  4531. return "请选择性别";
  4532. }
  4533. }
  4534. if (key === "education") {
  4535. if (this.infoForm[key]) {
  4536. return this.dictObj["edu_level"][Number(this.infoForm[key])];
  4537. } else {
  4538. return "请选择学历";
  4539. }
  4540. }
  4541. if (key === "working_years") {
  4542. if (this.infoForm[key]) {
  4543. return this.dictObj["working_years"][Number(this.infoForm[key])];
  4544. } else {
  4545. return "请选择工作年限";
  4546. }
  4547. }
  4548. },
  4549. retDraw() {
  4550. this.$set(this.infoForm, "commitment_electr_signature", "");
  4551. this.$nextTick(() => {
  4552. this.$refs.esign[0].reset();
  4553. });
  4554. },
  4555. uploadFile(options, int) {
  4556. var self = this;
  4557. return new Promise((resolve, reject) => {
  4558. var data = {
  4559. imageStatus: int,
  4560. gradeId: this.gradeId,
  4561. orderGoodsId: this.orderGoodsId,
  4562. };
  4563. self.$request
  4564. .getPolicy(data)
  4565. .then((res) => {
  4566. var ossToken = res.data.resultContent;
  4567. if (ossToken.host == null || ossToken.host == undefined) {
  4568. this.$message({
  4569. type: "warning",
  4570. message: "上传路径报错" + JSON.stringify(res.data),
  4571. });
  4572. return;
  4573. }
  4574. let data = this.$tools.convertBase64UrlToBlob(this.faceUrl);
  4575. this.$upload
  4576. .upload(data, 0)
  4577. .then((res) => {
  4578. this.ossAvatarUrl = res;
  4579. resolve(res);
  4580. })
  4581. .catch((err) => {
  4582. this.$message({
  4583. type: "warning",
  4584. message: "上传接口报错,请重新拍照上传",
  4585. });
  4586. this.reTake();
  4587. });
  4588. })
  4589. .catch((err) => {
  4590. this.$message({
  4591. type: "warning",
  4592. message: "签名错误" + JSON.stringify(err),
  4593. });
  4594. return;
  4595. });
  4596. });
  4597. },
  4598. faceRecognition() {
  4599. return new Promise((resolve) => {
  4600. this.$request
  4601. .faceCertificationCompareFace({
  4602. imageA: this.faceUrl,
  4603. orderGoodsId: this.orderGoodsId,
  4604. gradeId: this.gradeId,
  4605. })
  4606. .then((res) => {
  4607. resolve(res.data);
  4608. })
  4609. .catch((err) => {
  4610. this.loading = false;
  4611. this.$message({
  4612. type: "warning",
  4613. message: err.msg,
  4614. });
  4615. });
  4616. });
  4617. },
  4618. /**
  4619. * 点击重拍
  4620. */
  4621. reTake() {
  4622. this.faceUrl = "";
  4623. this.isTaking = true;
  4624. this.getUserMedia({
  4625. video: {
  4626. width: 400,
  4627. height: 300,
  4628. },
  4629. });
  4630. },
  4631. // 点击拍照按钮
  4632. onPhoto() {
  4633. // if (this.isIE) {
  4634. // window.webcam.capture();
  4635. // } else {
  4636. const canvas = document.createElement("canvas");
  4637. canvas.width = 400;
  4638. canvas.height = 300;
  4639. const context = canvas.getContext("2d");
  4640. const video = document.getElementById("video");
  4641. context.drawImage(video, 0, 0, 400, 300);
  4642. this.faceUrl = canvas.toDataURL("image/png");
  4643. this.isTaking = false;
  4644. // }
  4645. },
  4646. getUserMedia(constraints, success, error) {
  4647. if (window.navigator.mediaDevices.getUserMedia) {
  4648. // 最新的标准API
  4649. window.navigator.mediaDevices
  4650. .getUserMedia(constraints)
  4651. .then(success)
  4652. .catch(error);
  4653. } else if (window.navigator.webkitGetUserMedia) {
  4654. // webkit核心浏览器
  4655. window.navigator.webkitGetUserMedia(constraints, success, error);
  4656. } else if (window.navigator.mozGetUserMedia) {
  4657. // firfox浏览器
  4658. window.navigator.mozGetUserMedia(constraints, success, error);
  4659. } else if (window.navigator.getUserMedia) {
  4660. // 旧版API
  4661. window.navigator.getUserMedia(constraints, success, error);
  4662. }
  4663. },
  4664. photographSuccess(stream) {
  4665. // 兼容webkit核心浏览器
  4666. this.isTaking = true;
  4667. this.takePhotoModal = true;
  4668. this.$nextTick(() => {
  4669. const video = document.getElementById("video");
  4670. // 将视频流设置为video元素的源
  4671. console.dir(video);
  4672. video.srcObject = stream;
  4673. this.mediaStreamTrack =
  4674. typeof stream.stop === "function" ? stream : stream.getTracks()[0];
  4675. video.play();
  4676. });
  4677. },
  4678. photographError(err) {
  4679. this.$confirm(
  4680. "课程学习需要开启摄像头进行拍照,经检测您的设备无摄像头可使用,请检测环境是否支持。",
  4681. "提示",
  4682. {
  4683. showConfirmButton: false,
  4684. closeOnClickModal: false,
  4685. showCancelButton: false,
  4686. closeOnPressEscape: false,
  4687. distinguishCancelAndClose: false,
  4688. showClose: false,
  4689. }
  4690. );
  4691. },
  4692. /**
  4693. * 切换科目
  4694. */
  4695. courseChange() {
  4696. console.log('切换科目')
  4697. return new Promise((resolve) => {
  4698. this.needOpen = true;
  4699. this.noteParams = {
  4700. pageNum: 1,
  4701. // pageSize: 4,
  4702. };
  4703. this.duration = 0;
  4704. this.playSectionId = 0;
  4705. this.vid = "";
  4706. if (this.player) {
  4707. this.player.destroy();
  4708. }
  4709. this.player = "";
  4710. if (this.playerzb) {
  4711. this.playerzb.destroy();
  4712. }
  4713. this.playerzb = "";
  4714. this.vidzb = "";
  4715. this.historyChatMsgList = [];
  4716. this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
  4717. this.courseDetail(); //课程详情
  4718. this.getAnswerList(); //答疑列表
  4719. // this.answerTimer = setInterval(() => {
  4720. // this.getAnswerList();
  4721. // }, 5000);
  4722. this.getMenuList(); //学习目录
  4723. this.getReMenuList(); //获取重修目录
  4724. this.getNoteList(); //获取节笔记
  4725. resolve();
  4726. });
  4727. },
  4728. polyvLiveHistoryChatMsgList() {
  4729. this.$request
  4730. .polyvLiveHistoryChatMsgList({
  4731. sectionId: this.playSectionId,
  4732. channelId: this.sectionItem.liveUrl,
  4733. })
  4734. .then((res) => {
  4735. this.historyChatMsgList = res.data;
  4736. });
  4737. },
  4738. courseDetail() {
  4739. let self = this;
  4740. this.$request.courseDetail(this.courseId).then((res) => {
  4741. // if (res.data.educationName == "继续教育") {
  4742. // this.$request
  4743. // .lockLockAction({
  4744. // action: "jxjy",
  4745. // })
  4746. // .then((res) => {});
  4747. // this.lockTimer = setInterval(() => {
  4748. // this.$request
  4749. // .lockLockAction({
  4750. // action: "jxjy",
  4751. // })
  4752. // .then((res) => {});
  4753. // }, 10000);
  4754. // }
  4755. self.detail = res.data;
  4756. });
  4757. },
  4758. openModule(menuItem, status = false) {
  4759. //重修目录点击
  4760. console.log(menuItem.list);
  4761. menuItem.showList = !menuItem.showList;
  4762. if (!menuItem.list.length) {
  4763. if (menuItem.isRebuild) {
  4764. this.getReChapterList(menuItem.id, menuItem.courseId, menuItem);
  4765. } else {
  4766. this.getBuyChapterList(
  4767. menuItem.id,
  4768. menuItem.courseId,
  4769. menuItem,
  4770. status
  4771. );
  4772. }
  4773. }
  4774. },
  4775. getReChapterList(moduleId, courseId, menuItem) {
  4776. this.$request
  4777. .reChapterList({
  4778. moduleId: moduleId,
  4779. gradeId: this.gradeId,
  4780. courseId: courseId,
  4781. rebuild: 1,
  4782. })
  4783. .then((res) => {
  4784. for (let i = 0; i < res.data.length; i++) {
  4785. let item = res.data[i];
  4786. item.id = item.chapterId;
  4787. item.showList = false;
  4788. item.list = [];
  4789. item.parent = menuItem;
  4790. item.isRebuild = 1;
  4791. }
  4792. menuItem.list = res.data;
  4793. });
  4794. },
  4795. getBuyChapterList(moduleId, courseId, menuItem, status) {
  4796. this.$request
  4797. .reChapterList({
  4798. moduleId: moduleId,
  4799. gradeId: this.gradeId,
  4800. courseId: courseId,
  4801. })
  4802. .then((res) => {
  4803. for (let i = 0; i < res.data.length; i++) {
  4804. let item = res.data[i];
  4805. item.id = item.chapterId;
  4806. item.menuType = 2;
  4807. item.showList = false;
  4808. item.list = [];
  4809. item.parent = menuItem;
  4810. }
  4811. menuItem.list = res.data;
  4812. if (status) {
  4813. console.log(this.sectionItem, "this.sectionItem");
  4814. console.log(menuItem.list, "menuItem.list");
  4815. const FindIndexs = menuItem.list.findIndex((item) => {
  4816. return item.chapterId == this.sectionItem.chapterId;
  4817. });
  4818. if (FindIndexs != -1) {
  4819. this.openChapter(menuItem.list[FindIndexs]);
  4820. } else {
  4821. this.$message.warning("章列表定位失败");
  4822. }
  4823. } else {
  4824. if (this.needOpen) {
  4825. // this.needOpen = false;
  4826. this.openChapter(menuItem.list[0]);
  4827. }
  4828. }
  4829. });
  4830. },
  4831. openChapter(chapter) {
  4832. console.log(chapter, "chapter");
  4833. chapter.showList = !chapter.showList;
  4834. if (!chapter.list.length) {
  4835. if (chapter.isRebuild) {
  4836. this.getReSectionList(
  4837. chapter.id,
  4838. chapter.courseId,
  4839. chapter.moduleId || 0,
  4840. chapter
  4841. );
  4842. } else {
  4843. this.getBuySectionList(
  4844. chapter.id,
  4845. chapter.courseId,
  4846. chapter.moduleId || 0,
  4847. chapter
  4848. );
  4849. }
  4850. }
  4851. },
  4852. getReSectionList(chapterId, courseId, moduleId, chapter) {
  4853. this.$request
  4854. .reSectionList({
  4855. chapterId: chapterId,
  4856. gradeId: this.gradeId,
  4857. courseId: courseId,
  4858. rebuild: 1,
  4859. moduleId: moduleId,
  4860. })
  4861. .then((res) => {
  4862. let newArr = res.data.filter((item) => {
  4863. return item.type != 2;
  4864. });
  4865. chapter.canLearn = newArr.every((item) => {
  4866. if (item.learning == 1) {
  4867. return true;
  4868. } else {
  4869. return false;
  4870. }
  4871. });
  4872. res.data.forEach((section) => {
  4873. section.parent = chapter;
  4874. });
  4875. chapter.list = res.data;
  4876. });
  4877. },
  4878. getBuySectionList(chapterId, courseId, moduleId = 0, chapter) {
  4879. // /course/sectionList 查询章与节关系列表+章卷同级展示
  4880. this.$request
  4881. .reSectionList({
  4882. chapterId: chapterId,
  4883. gradeId: this.gradeId,
  4884. courseId: courseId,
  4885. moduleId: moduleId,
  4886. })
  4887. .then((res) => {
  4888. let newArr = res.data.filter((item) => {
  4889. return item.type != 2;
  4890. });
  4891. chapter.canLearn = newArr.every((item) => {
  4892. if (item.learning == 1) {
  4893. return true;
  4894. } else {
  4895. return false;
  4896. }
  4897. });
  4898. res.data.forEach((section) => {
  4899. section.parent = chapter;
  4900. });
  4901. chapter.list = res.data;
  4902. if (this.needOpen) {
  4903. this.needOpen = false;
  4904. if (
  4905. chapter.list &&
  4906. !this.sectionItem.recordingUrl &&
  4907. this.sectionItem.sectionType != 2
  4908. ) {
  4909. // this.getResource(chapter.list[0]);
  4910. }
  4911. }
  4912. });
  4913. },
  4914. getGoodsDetail() {
  4915. return new Promise((resolve) => {
  4916. let self = this;
  4917. this.$request.goodsDetail(this.goodsId).then((res) => {
  4918. self.goodsData = res.data;
  4919. self.gradeId = self.goodsData.gradeId;
  4920. if (this.goodsData.categoryName) {
  4921. this.infoForm.apply_post = this.goodsData.categoryName;
  4922. if (this.goodsData.categoryName) {
  4923. this.apply_post_disabled = true;
  4924. }
  4925. if (this.userInfo.companyName) {
  4926. this.infoForm.work_unit = this.userInfo.companyName;
  4927. }
  4928. }
  4929. if (this.goodsData.buyNote) {
  4930. this.tabList = [
  4931. { name: "1", label: "学员须知" },
  4932. // { name: "2", label: "课程答疑" },
  4933. // { name: "3", label: "笔记讲义" },
  4934. ];
  4935. console.log(res, "res111");
  4936. this.getRecommend();
  4937. } else {
  4938. this.tabList = [
  4939. // { name: "1", label: "课程答疑" },
  4940. // { name: "2", label: "笔记讲义" },
  4941. ];
  4942. }
  4943. this.courseBusiness();
  4944. this.courseHandouts();
  4945. if (self.goodsData.goodsPlayConfig) {
  4946. self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
  4947. if (self.goodsPlayConfig.autoPlay > 0) {
  4948. self.autoplay = true;
  4949. }
  4950. if (self.goodsPlayConfig.drag > 0) {
  4951. self.isAllowSeek = "off";
  4952. }
  4953. if (self.goodsPlayConfig.speed > 0) {
  4954. self.playbackRate = true;
  4955. }
  4956. }
  4957. if (self.goodsData.goodsPhotographConfig) {
  4958. self.goodsPhotographConfig = JSON.parse(
  4959. self.goodsData.goodsPhotographConfig
  4960. );
  4961. if (self.goodsPhotographConfig.photoNum > 0) {
  4962. self.photoNum = self.goodsPhotographConfig.photoNum;
  4963. }
  4964. }
  4965. });
  4966. resolve();
  4967. });
  4968. },
  4969. // 新增用户视频学习日志
  4970. studyLog(moduleId, chapterId, sectionId) {
  4971. this.$axios({
  4972. url: '/user/study/log',
  4973. method: 'post',
  4974. data: {
  4975. goodsId: this.goodsId,
  4976. courseId: this.courseId,
  4977. moduleId: moduleId || 0,
  4978. chapterId: chapterId || 0,
  4979. sectionId: sectionId || 0,
  4980. fromPlat: 2, //来源平台 1小程序 2PC网站
  4981. goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
  4982. orderGoodsId: this.orderGoodsId,
  4983. }
  4984. }).then((res) => {
  4985. console.log('直播的用户学习日志:', res)
  4986. })
  4987. },
  4988. /**
  4989. * 点击节
  4990. */
  4991. async getResource(section) {
  4992. console.log('点击节节节', section)
  4993. this.clickSectionItem = section
  4994. //逻辑
  4995. if (section.sectionType === 2 && section.liveStartTime && section.liveEndTime) {
  4996. if (section.liveStartTime > this.nowTime) {
  4997. this.$message.warning("直播待开播");
  4998. return;
  4999. }
  5000. if (section.liveEndTime < this.nowTime) {
  5001. this.$message.warning("直播已结束");
  5002. return;
  5003. }
  5004. }
  5005. if (section.type == 2) {
  5006. //试卷
  5007. console.log("试卷");
  5008. console.log(section);
  5009. let learnNum = await this.goodsTodayStudySectionNum();
  5010. let hasLearn = await this.gradeCheckGoodsStudy(section.typeId);
  5011. if (this.goodsData.sectionMaxNum > 0) {
  5012. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5013. this.$message({
  5014. type: "warning",
  5015. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5016. });
  5017. return;
  5018. }
  5019. }
  5020. if (this.businessData.goodsLearningOrder == 1) {
  5021. if (section.parent.canLearn) {
  5022. let num = await this.bankRecordDoNum(section);
  5023. //有次数限制
  5024. if (section.answerNum - num > 0 && section.answerNum > 0) {
  5025. // this.$set(this.list[index],'doNum',(item.doNum+1))
  5026. this.$router.push({
  5027. path: "/course-exam/" + this.goodsId,
  5028. query: {
  5029. courseId: this.courseId,
  5030. gradeId: this.gradeId,
  5031. moduleId: section.moduleId || 0,
  5032. examId: section.typeId,
  5033. chapterId: section.chapterId || 0,
  5034. orderGoodsId: this.orderGoodsId,
  5035. },
  5036. });
  5037. //没有答题次数限制
  5038. } else if (section.answerNum == 0) {
  5039. this.$router.push({
  5040. path: "/course-exam/" + this.goodsId,
  5041. query: {
  5042. courseId: this.courseId,
  5043. gradeId: this.gradeId,
  5044. moduleId: section.moduleId || 0,
  5045. examId: section.typeId,
  5046. chapterId: section.chapterId || 0,
  5047. orderGoodsId: this.orderGoodsId,
  5048. },
  5049. });
  5050. } else {
  5051. this.$message({
  5052. type: "warning",
  5053. message: "该试卷只能答题" + section.answerNum + "次",
  5054. });
  5055. return;
  5056. }
  5057. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5058. } else {
  5059. this.$message({
  5060. type: "warning",
  5061. message: "请按顺序学完视频课程再进行练习和测试",
  5062. });
  5063. }
  5064. } else if (
  5065. this.businessData.goodsLearningOrder == 2 &&
  5066. !section.rebuild
  5067. ) {
  5068. let rows = await this.studyRecordMenuAllList();
  5069. let isStop = false;
  5070. let newRows = [];
  5071. for (let i = 0; i < rows.length; i++) {
  5072. let moduleTrue = rows[i].moduleId == section.moduleId;
  5073. let chapterTrue = rows[i].chapterId == section.chapterId;
  5074. if (moduleTrue && chapterTrue) {
  5075. isStop = true;
  5076. if (rows[i].sectionType != 2) {
  5077. //忽略直播
  5078. newRows.push(rows[i]);
  5079. }
  5080. } else {
  5081. if (!isStop) {
  5082. if (rows[i].sectionType != 2) {
  5083. //忽略直播
  5084. newRows.push(rows[i]);
  5085. }
  5086. } else {
  5087. break;
  5088. }
  5089. }
  5090. }
  5091. console.log(newRows);
  5092. let isAllLearn = newRows.every((item) => {
  5093. return item.studyStatus == 1;
  5094. });
  5095. if (isAllLearn) {
  5096. //之前的都学完了
  5097. // if(canLearn) { //视频的上一节学完
  5098. let num = await this.bankRecordDoNum(section.typeId);
  5099. //有次数限制
  5100. if (section.answerNum - num > 0 && section.answerNum > 0) {
  5101. console.log(this.list[index]);
  5102. this.$router.push({
  5103. path: "/course-exam/" + this.goodsId,
  5104. query: {
  5105. courseId: this.courseId,
  5106. gradeId: this.gradeId,
  5107. moduleId: section.moduleId || 0,
  5108. examId: section.typeId,
  5109. chapterId: section.chapterId || 0,
  5110. orderGoodsId: this.orderGoodsId,
  5111. },
  5112. });
  5113. //没有答题次数限制
  5114. } else if (section.answerNum == 0) {
  5115. this.$router.push({
  5116. path: "/course-exam/" + this.goodsId,
  5117. query: {
  5118. courseId: this.courseId,
  5119. gradeId: this.gradeId,
  5120. moduleId: section.moduleId || 0,
  5121. examId: section.typeId,
  5122. chapterId: section.chapterId || 0,
  5123. orderGoodsId: this.orderGoodsId,
  5124. },
  5125. });
  5126. } else {
  5127. this.$message({
  5128. type: "warning",
  5129. message: "该试卷只能答题" + section.answerNum + "次",
  5130. });
  5131. return;
  5132. }
  5133. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5134. } else {
  5135. this.$message({
  5136. type: "warning",
  5137. message: "请学完视频课程再进行练习和测试",
  5138. });
  5139. }
  5140. } else {
  5141. let num = await this.bankRecordDoNum(section.typeId);
  5142. //有次数限制
  5143. if (section.answerNum - section.doNum > 0 && section.answerNum > 0) {
  5144. // this.$set(this.list[index],'doNum',(item.doNum+1))
  5145. this.$router.push({
  5146. path: "/course-exam/" + this.goodsId,
  5147. query: {
  5148. courseId: this.courseId,
  5149. gradeId: this.gradeId,
  5150. moduleId: section.moduleId || 0,
  5151. examId: section.typeId,
  5152. chapterId: section.chapterId || 0,
  5153. orderGoodsId: this.orderGoodsId,
  5154. },
  5155. });
  5156. //没有答题次数限制
  5157. } else if (section.answerNum == 0) {
  5158. this.$router.push({
  5159. path: "/course-exam/" + this.goodsId,
  5160. query: {
  5161. courseId: this.courseId,
  5162. gradeId: this.gradeId,
  5163. moduleId: section.moduleId || 0,
  5164. examId: section.typeId,
  5165. chapterId: section.chapterId || 0,
  5166. orderGoodsId: this.orderGoodsId,
  5167. },
  5168. });
  5169. } else {
  5170. this.$message({
  5171. type: "warning",
  5172. message: "该试卷只能答题" + section.answerNum + "次",
  5173. });
  5174. return;
  5175. }
  5176. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5177. }
  5178. return;
  5179. }
  5180. if (section.type != 2) {
  5181. if (this.clickLock) {
  5182. return;
  5183. }
  5184. this.clickLock = true;
  5185. if (
  5186. this.playSectionId &&
  5187. (this.playSectionId == section.sectionId ||
  5188. this.playSectionId == section.menuId) &&
  5189. this.moduleId == (section.moduleId || 0) &&
  5190. this.chapterId == (section.chapterId || 0)
  5191. ) {
  5192. //切换为同一频道不作为
  5193. console.log('切换为同一频道不作为')
  5194. this.clickLock = false;
  5195. return;
  5196. }
  5197. if (this.businessData.goodsLearningOrder == 2 && !section.isRebuild) {
  5198. //要按从头到尾顺序学习, 且不是重修课程
  5199. let rows = await this.studyRecordMenuAllList();
  5200. if (!this.hasPreItem(rows, section)) {
  5201. //判断是否有上一节
  5202. let newRows = [];
  5203. for (let i = 0; i < rows.length; i++) {
  5204. let moduleTrue =
  5205. rows[i].moduleId == section.moduleId || rows[i].moduleId == 0;
  5206. let chapterTrue =
  5207. rows[i].chapterId == section.chapterId ||
  5208. rows[i].chapterId == 0;
  5209. let sectionTrue =
  5210. rows[i].sectionId == section.sectionId ||
  5211. rows[i].sectionId == section.menuId;
  5212. if (moduleTrue && chapterTrue && sectionTrue) {
  5213. break;
  5214. } else {
  5215. if (rows[i].sectionType != 2) {
  5216. newRows.push(rows[i]);
  5217. }
  5218. }
  5219. }
  5220. let isAllLearn = newRows.every((item) => {
  5221. return item.studyStatus == 1;
  5222. });
  5223. if (isAllLearn) {
  5224. this.initVideo(section);
  5225. } else {
  5226. this.clickLock = false;
  5227. this.$message({
  5228. type: "warning",
  5229. message: "请按顺序学习视频课程",
  5230. });
  5231. }
  5232. } else {
  5233. console.log(section,"sectionsectionsectionsectionsectionsection")
  5234. //第一章第一节
  5235. this.initVideo(section);
  5236. }
  5237. } else {
  5238. console.log(section,"sectionsection")
  5239. this.initVideo(section);
  5240. }
  5241. }
  5242. },
  5243. bankRecordDoNum(section) {
  5244. return new Promise((resolve) => {
  5245. this.$request
  5246. .bankRecordDoNum({
  5247. goodsId: this.goodsId,
  5248. gradeId: this.gradeId,
  5249. chapterId: section.chapterId,
  5250. courseId: this.courseId,
  5251. moduleId: 0,
  5252. examId: section.typeId,
  5253. })
  5254. .then((res) => {
  5255. resolve(res.data);
  5256. });
  5257. });
  5258. },
  5259. /**
  5260. * 是否有上一章节
  5261. */
  5262. hasPreItem(rows, option) {
  5263. let moduleId = option.moduleId;
  5264. let chapterId = option.chapterId;
  5265. let sectionId = option.sectionId;
  5266. let index = 0;
  5267. for (let i = 0; i < rows.length; i++) {
  5268. if (
  5269. rows[i].moduleId == moduleId &&
  5270. rows[i].chapterId == chapterId &&
  5271. rows[i].sectionId == sectionId
  5272. ) {
  5273. index = i;
  5274. break;
  5275. }
  5276. }
  5277. if (index == 0) {
  5278. return false;
  5279. } else {
  5280. return true;
  5281. }
  5282. },
  5283. async initVideo(option) {
  5284. if (option.sectionType == 1 || option.sectionType == 3) {
  5285. //录播
  5286. let learnNum = await this.goodsTodayStudySectionNum(option);
  5287. let hasLearn = await this.gradeCheckGoodsStudy(option);
  5288. console.log(hasLearn, "hasLearn");
  5289. console.log(learnNum, "learnNum");
  5290. console.log(
  5291. this.goodsData.sectionMaxNum,
  5292. "this.goodsData.sectionMaxNum"
  5293. );
  5294. if (this.goodsData.sectionMaxNum > 0) {
  5295. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5296. this.clickLock = false;
  5297. this.$message({
  5298. type: "warning",
  5299. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5300. });
  5301. return;
  5302. }
  5303. }
  5304. if (!option.recordingUrl) {
  5305. this.clickLock = false;
  5306. this.$message({
  5307. type: "warning",
  5308. message: `暂无播放地址数据`,
  5309. });
  5310. return;
  5311. }
  5312. if (this.playSectionId > 0) {
  5313. //切换视频
  5314. // let oldSectionId = this.playSectionId;
  5315. // uni.$emit("changeSection", oldSectionId);
  5316. }
  5317. this.playVideo(option);
  5318. }
  5319. if (option.sectionType == 2) {
  5320. //直播
  5321. let learnNum = await this.goodsTodayStudySectionNum(option);
  5322. let hasLearn = await this.gradeCheckGoodsStudy(option);
  5323. if (this.goodsData.sectionMaxNum > 0) {
  5324. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5325. this.clickLock = false;
  5326. this.$message({
  5327. type: "warning",
  5328. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5329. });
  5330. return;
  5331. }
  5332. }
  5333. if (!option.liveUrl) {
  5334. this.clickLock = false;
  5335. this.$message({
  5336. type: "warning",
  5337. message: `暂无直播地址数据`,
  5338. });
  5339. }
  5340. let data = await this.studyRecordGetChannelBasicInfo(option.liveUrl);
  5341. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  5342. this.clickLock = false;
  5343. this.$message({
  5344. type: "warning",
  5345. message: `直播已结束`,
  5346. });
  5347. return;
  5348. }
  5349. if (data.watchStatus == "waiting") {
  5350. this.clickLock = false;
  5351. this.$message({
  5352. type: "warning",
  5353. message: `直播未开始`,
  5354. });
  5355. return;
  5356. }
  5357. this.playVideo(option);
  5358. }
  5359. return;
  5360. },
  5361. studyRecordGetChannelBasicInfo(channelId) {
  5362. return new Promise((resolve) => {
  5363. this.$request
  5364. .studyRecordGetChannelBasicInfo({
  5365. channelId,
  5366. })
  5367. .then((res) => {
  5368. console.log(res, "channel");
  5369. resolve(res.data);
  5370. }).catch(err => {
  5371. this.clickLock = false;
  5372. this.$message.error(err.msg)
  5373. })
  5374. });
  5375. },
  5376. /**
  5377. * 判断是否是当前播放的节
  5378. */
  5379. isActive(section) {
  5380. let moduleId = section.moduleId || 0;
  5381. let chapterId = section.chapterId || 0;
  5382. let sectionId = section.sectionId || section.menuId;
  5383. if (
  5384. moduleId == this.moduleId &&
  5385. chapterId == this.chapterId &&
  5386. sectionId == this.playSectionId
  5387. ) {
  5388. return true;
  5389. } else {
  5390. return false;
  5391. }
  5392. },
  5393. async playVideo(option) {
  5394. console.log('asdhsuohfosufgasoug', option)
  5395. if (option.sectionType == 3) {
  5396. console.log('huifang')
  5397. // 回放
  5398. if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
  5399. this.$router.push({
  5400. path: "/living-room/" + option.liveUrl,
  5401. query: {
  5402. goodsId: this.goodsId,
  5403. courseId: this.courseId,
  5404. gradeId: this.gradeId,
  5405. orderGoodsId: this.orderGoodsId,
  5406. sectionId: option.sectionId || option.menuId,
  5407. chapterId: option.chapterId || 0,
  5408. moduleId: option.moduleId || 0,
  5409. sectionType: 3,
  5410. goodsName: option.name,
  5411. vid: option.recordingUrl, // 回放vid
  5412. }
  5413. })
  5414. this.clickSectionItem = {}
  5415. return
  5416. }
  5417. }
  5418. if (option.sectionType == 1) {
  5419. console.log('lubo点击点击点击点击')
  5420. //录播
  5421. //设置播放的节ID
  5422. //提交保存观看历史
  5423. if (this.playSectionId) {
  5424. this.postStudyRecord(0, this.playSectionId);
  5425. }
  5426. this.player &&
  5427. this.player.HTML5.video.removeEventListener(
  5428. "timeupdate",
  5429. this.timeEvent
  5430. );
  5431. //播放视频
  5432. this.showRecordStatus = false; //隐藏播放记录提示
  5433. this.sectionItem = option;
  5434. console.log(option, "option=======>sectionItem");
  5435. this.isPlayRebuild = option.rebuild;
  5436. this.moduleId = option.moduleId || 0;
  5437. this.chapterId = option.chapterId || 0;
  5438. this.playSectionId = option.sectionId || option.menuId;
  5439. // console.log(this.moduleId, this.chapterId, this.playSectionId);
  5440. await this.getPhotoLastRecord();
  5441. this.recordObj = await this.getRecordLast();
  5442. this.getNoteList();
  5443. await this.clears();
  5444. this.vid = option.recordingUrl;
  5445. this.historyChatMsgList = [];
  5446. if (option.sectionType == 3) {
  5447. this.polyvLiveHistoryChatMsgList();
  5448. }
  5449. this.loadPlayerScript(this.loadPlayer);
  5450. setTimeout(() => {
  5451. this.clickLock = false;
  5452. }, 3000);
  5453. this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
  5454. // uni.$emit("levelId", this.levelId);
  5455. // uni.$emit("getSection", this.menuItem);
  5456. // uni.$emit("isRebuild", this.isRebuild);
  5457. }
  5458. if (option.sectionType == 2) {
  5459. //直播
  5460. //提交保存观看历史
  5461. if (this.playSectionId) {
  5462. this.postStudyRecord(0, this.playSectionId);
  5463. }
  5464. this.player &&
  5465. this.player.HTML5.video.removeEventListener(
  5466. "timeupdate",
  5467. this.timeEvent
  5468. );
  5469. //播放视频
  5470. this.showRecordStatus = false; //隐藏播放记录提示
  5471. this.sectionItem = option;
  5472. console.log(option, "option");
  5473. this.isPlayRebuild = option.rebuild;
  5474. this.moduleId = option.moduleId || 0;
  5475. this.chapterId = option.chapterId || 0;
  5476. this.playSectionId = option.sectionId || option.menuId;
  5477. // console.log(this.moduleId, this.chapterId, this.playSectionId);
  5478. await this.getPhotoLastRecord();
  5479. this.recordObj = await this.getRecordLast();
  5480. this.getNoteList();
  5481. //设置播放的节ID
  5482. await this.clears();
  5483. this.vidzb = option.liveUrl;
  5484. this.$router.push({
  5485. path: "/living-room/" + option.liveUrl,
  5486. query: {
  5487. goodsId: this.goodsId,
  5488. courseId: this.courseId,
  5489. gradeId: this.gradeId,
  5490. orderGoodsId: this.orderGoodsId,
  5491. sectionId: option.sectionId || option.menuId,
  5492. chapterId: option.chapterId || 0,
  5493. moduleId: option.moduleId || 0,
  5494. sectionType: 2,
  5495. },
  5496. });
  5497. // this.loadPlayerScriptzb(this.loadPlayerzb);
  5498. // setTimeout(() => {
  5499. // this.clickLock = false;
  5500. // }, 3000);
  5501. }
  5502. },
  5503. gradeCheckGoodsStudy(option) {
  5504. return new Promise((resolve) => {
  5505. this.$request
  5506. .gradeCheckGoodsStudy({
  5507. goodsId: this.goodsId,
  5508. gradeId: this.gradeId,
  5509. moduleId: option.moduleId || 0,
  5510. chapterId: option.chapterId || 0,
  5511. sectionId: option.sectionId || option.menuId,
  5512. })
  5513. .then((res) => {
  5514. resolve(res.data);
  5515. });
  5516. });
  5517. },
  5518. goodsTodayStudySectionNum(option) {
  5519. return new Promise((resolve) => {
  5520. this.$request
  5521. .goodsTodayStudySectionNum({
  5522. goodsId: this.goodsId,
  5523. gradeId: this.gradeId,
  5524. })
  5525. .then((res) => {
  5526. resolve(res.data);
  5527. });
  5528. });
  5529. },
  5530. studyRecordMenuAllList() {
  5531. return new Promise((resolve) => {
  5532. this.$request
  5533. .studyRecordMenuAllList({
  5534. courseId: this.courseId,
  5535. gradeId: this.gradeId,
  5536. goodsId: this.goodsId,
  5537. })
  5538. .then((res) => {
  5539. resolve(res.data);
  5540. });
  5541. });
  5542. },
  5543. loadPlayerzb() {
  5544. var self = this;
  5545. const polyvLivePlayer = window.polyvLivePlayer;
  5546. this.playerzb = polyvLivePlayer({
  5547. wrap: "#playerzb",
  5548. width: 810,
  5549. height: 455,
  5550. showLine: "off",
  5551. uid: this.uidzb,
  5552. vid: this.vidzb,
  5553. });
  5554. this.playerzb.on("s2j_onStartPlay", () => {
  5555. console.log("s2j_onStartPlay");
  5556. this.hasStart = true;
  5557. this.livingTimer = setInterval(self.timeEventLiving, 1000);
  5558. });
  5559. this.playerzb.on("s2j_onOver", () => {
  5560. console.log("s2j_onOver");
  5561. clearInterval(this.livingTimer);
  5562. this.hasStart = false;
  5563. this.$message({
  5564. type: "success",
  5565. message: "播放完毕",
  5566. });
  5567. this.postStudyRecord(1);
  5568. });
  5569. },
  5570. // 播放视频
  5571. loadPlayer() {
  5572. var self = this;
  5573. const polyvPlayer = window.polyvPlayer;
  5574. console.log(polyvPlayer);
  5575. self.$request.obtainpolyvvideosign(self.vid).then((res) => {
  5576. console.log(res, "res2");
  5577. self.player = polyvPlayer({
  5578. wrap: "#player",
  5579. width: 810,
  5580. showLine: "off",
  5581. height: 455,
  5582. ban_history_time: "on",
  5583. vid: self.vid,
  5584. autoplay: this.autoplay,
  5585. ban_seek: this.isAllowSeek,
  5586. speed: this.playbackRate,
  5587. teaser_show: 1,
  5588. tail_show: 1,
  5589. hideSwitchPlayer: true,
  5590. watchStartTime: this.recordObj.videoCurrentTime,
  5591. ts: res.data.ts,
  5592. sign: res.data.sign,
  5593. // adMatter: [
  5594. // {
  5595. // // 广告参数详细配置
  5596. // location: 1, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
  5597. // adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
  5598. // matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
  5599. // timesize: 5, //广告时长,单位:秒
  5600. // skipenabled: false, //是否显示跳过按钮
  5601. // },
  5602. // {
  5603. // // 广告参数详细配置
  5604. // location: 3, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
  5605. // adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
  5606. // matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
  5607. // timesize: 5, //广告时长,单位:秒
  5608. // skipenabled: false, //是否显示跳过按钮
  5609. // },
  5610. // ],
  5611. playsafe: function (vid, next) {
  5612. next();
  5613. },
  5614. });
  5615. this.player.HTML5.video.addEventListener("timeupdate", self.timeEvent);
  5616. this.player.on("s2j_onPlayStart", () => {
  5617. //开始播放每5秒提交一次观看时间
  5618. this.hasStart = true;
  5619. clearInterval(this.postTimer);
  5620. this.postTimer = setInterval(() => {
  5621. this.postStudyRecord(0, this.playSectionId, 5);
  5622. }, 5000);
  5623. if (this.recordObj.videoCurrentTime) {
  5624. this.showRecordStatus = true;
  5625. setTimeout(() => {
  5626. this.showRecordStatus = false;
  5627. }, 5000);
  5628. } else {
  5629. //新视频直接提交一条观看记录
  5630. // this.postStudyRecord(0);
  5631. this.showRecordStatus = false;
  5632. }
  5633. });
  5634. this.player.on("s2j_onVideoPause", () => {
  5635. clearInterval(this.postTimer);
  5636. });
  5637. this.player.on("s2j_onVideoPlay", () => {
  5638. if (this.postTimer) {
  5639. this.postTimer = setInterval(() => {
  5640. this.postStudyRecord(0, this.playSectionId, 5);
  5641. }, 5000);
  5642. }
  5643. });
  5644. this.player.on("s2j_onPlayOver", () => {
  5645. this.hasStart = false;
  5646. clearInterval(this.postTimer);
  5647. this.$message({
  5648. type: "success",
  5649. message: "播放完毕",
  5650. });
  5651. this.postStudyRecord(1);
  5652. });
  5653. });
  5654. },
  5655. timeEventLiving() {
  5656. var polyvPlayerContext = this.playerzb;
  5657. if (polyvPlayerContext) {
  5658. this.liveDuration = this.liveDuration + 1; //每隔1秒
  5659. console.log(this.liveDuration);
  5660. if (this.liveDuration == 2) {
  5661. //直播第2秒拍照
  5662. if (
  5663. this.goodsPhotographConfig &&
  5664. this.goodsPhotographConfig.livephotograph == 1 &&
  5665. this.sectionItem.learning != 1 &&
  5666. this.photoHistoryList.length == 0
  5667. ) {
  5668. //开启直播拍照
  5669. polyvPlayerContext.j2s_pauseVideo();
  5670. this.openPhoto();
  5671. } else {
  5672. this.postStudyRecord();
  5673. }
  5674. }
  5675. }
  5676. },
  5677. timeEvent() {
  5678. let self = this;
  5679. var polyvPlayerContext = this.player;
  5680. if (polyvPlayerContext) {
  5681. this.playTime = polyvPlayerContext.j2s_getCurrentTime(); //播放时刻
  5682. // console.log(this.playTime,789,this.photoHistoryList)
  5683. //判断是否需要拍照
  5684. if (this.photoNum > 0) {
  5685. this.configPhoto();
  5686. let photoTime = 0; //获取拍照秒数
  5687. for (let i = 0; i < this.photoList.length; i++) {
  5688. photoTime = Number(this.photoList[i]); //获取拍照秒数
  5689. if (photoTime < this.playTime && photoTime > this.playTime - 8) {
  5690. //3秒区间内才触发拍照,避免拉动滚动条
  5691. if (
  5692. this.photoHistoryList.indexOf(i) < 0 &&
  5693. this.sectionItem.learning != 1
  5694. ) {
  5695. //不存在拍照历史,没有重修过,没有学过,则拍照
  5696. //启动拍照
  5697. //暂停
  5698. polyvPlayerContext.j2s_pauseVideo();
  5699. this.photoIndex = i;
  5700. this.openPhoto();
  5701. } else {
  5702. }
  5703. }
  5704. }
  5705. }
  5706. }
  5707. },
  5708. getPhotoLastRecord() {
  5709. return new Promise((resolve) => {
  5710. let self = this;
  5711. let data = {
  5712. sectionId: parseInt(self.playSectionId),
  5713. goodsId: parseInt(self.goodsId),
  5714. courseId: parseInt(self.courseId),
  5715. gradeId: self.gradeId,
  5716. chapterId: parseInt(self.chapterId),
  5717. moduleId: parseInt(self.moduleId),
  5718. };
  5719. this.$request.getPhotoLastRecord(data).then((res) => {
  5720. //清空历史数据
  5721. self.photoHistoryList = [];
  5722. this.photoIndex = 0;
  5723. self.photoList = [];
  5724. for (let i = 0; i < res.data.length; i++) {
  5725. //-2存储随机拍照数组
  5726. if (res.data[i].photoIndex == -2 && res.data[i].timeInterval) {
  5727. self.photoList = res.data[i].timeInterval.split(",");
  5728. } else {
  5729. self.photoHistoryList.push(res.data[i].photoIndex);
  5730. }
  5731. }
  5732. resolve();
  5733. });
  5734. });
  5735. },
  5736. //拍照
  5737. openPhoto() {
  5738. var polyvPlayerContext = this.player;
  5739. if (polyvPlayerContext) {
  5740. if (this.isFullScreen()) {
  5741. this.exitFullscreen();
  5742. }
  5743. }
  5744. var polyvPlayerContext = this.playerzb;
  5745. if (polyvPlayerContext) {
  5746. if (this.isFullScreen()) {
  5747. this.exitFullscreen();
  5748. }
  5749. }
  5750. this.$nextTick(() => {
  5751. if (
  5752. (window.navigator.mediaDevices &&
  5753. window.navigator.mediaDevices.getUserMedia) ||
  5754. window.navigator.getUserMedia ||
  5755. window.navigator.webkitGetUserMedia ||
  5756. window.navigator.mozGetUserMedia
  5757. ) {
  5758. console.log(this.getUserMedia, "getUserMedia");
  5759. // 调用用户媒体设备, 访问摄像头
  5760. this.getUserMedia(
  5761. {
  5762. video: {
  5763. width: 400,
  5764. height: 300,
  5765. },
  5766. },
  5767. this.photographSuccess,
  5768. this.photographError
  5769. );
  5770. } else {
  5771. this.photographError();
  5772. }
  5773. });
  5774. },
  5775. /**
  5776. * 退出全屏
  5777. */
  5778. exitFullscreen() {
  5779. try {
  5780. var de = document;
  5781. console.log(de);
  5782. if (de.exitFullscreen) {
  5783. de.exitFullscreen();
  5784. } else if (de.mozCancelFullScreen) {
  5785. de.mozCancelFullScreen();
  5786. } else if (de.webkitCancelFullScreen) {
  5787. de.webkitCancelFullScreen();
  5788. }
  5789. } catch (err) {}
  5790. },
  5791. fullele() {
  5792. return (
  5793. document.fullscreenElement ||
  5794. document.webkitFullscreenElement ||
  5795. document.msFullscreenElement ||
  5796. document.mozFullScreenElement ||
  5797. null
  5798. );
  5799. },
  5800. //判断是否全屏
  5801. isFullScreen() {
  5802. return !!(document.webkitIsFullScreen || this.fullele());
  5803. },
  5804. //配置随机拍照时间
  5805. configPhoto() {
  5806. var polyvPlayerContext = this.player;
  5807. let totalVideoTime = polyvPlayerContext.j2s_getDuration();
  5808. let duration = polyvPlayerContext.j2s_getCurrentTime();
  5809. let photoNum = this.photoNum;
  5810. if (!this.photoConfig) {
  5811. this.photoConfig = true;
  5812. //没有历史拍照间隔数据
  5813. if (this.photoList.length == 0) {
  5814. if (totalVideoTime >= 900) {
  5815. //大于15分钟
  5816. if (photoNum == 1) {
  5817. //开头拍1张
  5818. this.photoList.push(1);
  5819. } else if (photoNum == 3) {
  5820. //拍3张
  5821. this.photoList.push(0); //开头拍一张
  5822. let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
  5823. let centerMinTime = centerTime - 300; //前后5分钟
  5824. let centerMaxTime = centerTime + 300;
  5825. let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
  5826. this.photoList.push(centerTakeTime); //中间拍一张
  5827. let endMaxTime = totalVideoTime - 60;
  5828. let endMinTime = totalVideoTime - 300;
  5829. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  5830. this.photoList.push(endTakeTime); //最后拍一张
  5831. }
  5832. } else {
  5833. //小于15分钟,只拍前后各一张
  5834. if (photoNum == 1) {
  5835. //开头拍1张
  5836. this.photoList.push(1);
  5837. } else if (photoNum == 3) {
  5838. //拍2张
  5839. if (totalVideoTime <= 300) {
  5840. //小于5分钟
  5841. this.photoList.push(1); //开头拍一张
  5842. let endTakeTime = this.randomNum(10, totalVideoTime); //中间随机取一张
  5843. this.photoList.push(endTakeTime);
  5844. } else {
  5845. this.photoList.push(1); //开头拍一张
  5846. let endMaxTime = totalVideoTime - 60;
  5847. let endMinTime = totalVideoTime - 300;
  5848. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  5849. this.photoList.push(endTakeTime); //最后1-5分钟拍一张
  5850. }
  5851. }
  5852. }
  5853. console.log(this.photoList, "随机拍照时间数组11", photoNum);
  5854. this.postCoursePhotoRecord(true); //提交随机拍照时间数组
  5855. }
  5856. console.log(this.photoList, "随机拍照时间数组");
  5857. //兼容已有观看历史
  5858. for (let i = 0; i < this.photoList.length - 1; i++) {
  5859. if (
  5860. this.photoList[i] < duration &&
  5861. this.photoList[i + 1] > duration
  5862. ) {
  5863. this.photoIndex = i + 1;
  5864. // console.log("我的修改了photoIndex")
  5865. break;
  5866. }
  5867. if (duration > this.photoList[this.photoList.length - 1]) {
  5868. this.photoIndex = this.photoList.length - 1; //取最后一个下标
  5869. // console.log("我的修改了photoIndex")
  5870. break;
  5871. }
  5872. }
  5873. }
  5874. },
  5875. randomNum(minNum, maxNum) {
  5876. switch (arguments.length) {
  5877. case 1:
  5878. return parseInt(Math.random() * minNum + 1, 10);
  5879. break;
  5880. case 2:
  5881. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  5882. break;
  5883. default:
  5884. return 0;
  5885. break;
  5886. }
  5887. },
  5888. //postTime 只提交随机时间
  5889. postCoursePhotoRecord(postTime = false) {
  5890. return new Promise((resolve, reject) => {
  5891. let currentTime = 0;
  5892. var polyvPlayerContext = this.player;
  5893. if (polyvPlayerContext) {
  5894. currentTime = polyvPlayerContext.j2s_getCurrentTime();
  5895. }
  5896. let self = this;
  5897. let photoIndex = self.photoIndex;
  5898. let data = {
  5899. photo: self.ossAvatarUrl,
  5900. sectionId: parseInt(self.playSectionId),
  5901. goodsId: parseInt(self.goodsId),
  5902. courseId: parseInt(self.courseId),
  5903. photoTime: parseInt(currentTime > 0 ? currentTime : 0),
  5904. gradeId: parseInt(self.gradeId),
  5905. photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
  5906. photoNum: parseInt(self.photoNum),
  5907. chapterId: parseInt(self.chapterId),
  5908. moduleId: parseInt(self.moduleId),
  5909. timeInterval: postTime ? self.photoList.join(",") : "",
  5910. };
  5911. console.log("提交接口", data);
  5912. this.$request
  5913. .coursePhotoRecord(data)
  5914. .then((res) => {
  5915. console.log(res, "res");
  5916. resolve();
  5917. })
  5918. .catch((err) => {
  5919. console.log(err, "err");
  5920. reject();
  5921. });
  5922. });
  5923. },
  5924. /**
  5925. * @param {String} 直播预览
  5926. */
  5927. loadPlayerScriptzb(callback) {
  5928. if (!window.polyvLivePlayer) {
  5929. const myScript = document.createElement("script");
  5930. myScript.setAttribute("src", this.playerJs);
  5931. myScript.onload = callback;
  5932. document.body.appendChild(myScript);
  5933. } else {
  5934. callback();
  5935. }
  5936. },
  5937. loadPlayerScript(callback) {
  5938. if (!window.polyvPlayer) {
  5939. const myScript = document.createElement("script");
  5940. myScript.setAttribute("src", this.vodPlayerJs);
  5941. myScript.onload = callback;
  5942. document.body.appendChild(myScript);
  5943. } else {
  5944. callback();
  5945. }
  5946. },
  5947. clears() {
  5948. return new Promise((resolve, reject) => {
  5949. this.vid = "";
  5950. this.vidzb = "";
  5951. if (this.player) {
  5952. this.player.destroy();
  5953. }
  5954. if (this.playerzb) {
  5955. this.playerzb.destroy();
  5956. }
  5957. resolve();
  5958. });
  5959. },
  5960. /**
  5961. * 提交观看记录
  5962. */
  5963. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  5964. let currentTime = 0;
  5965. let PlayDuration = 0;
  5966. var polyvPlayerContext = this.player;
  5967. if (polyvPlayerContext) {
  5968. currentTime = polyvPlayerContext.j2s_getCurrentTime(); //当前视频播放时刻
  5969. PlayDuration = polyvPlayerContext.j2s_realPlayVideoTime(); //本次看的时长
  5970. }
  5971. if (this.vidzb) {
  5972. currentTime = 2; //直播无法获取,无论开始结束都传2秒
  5973. }
  5974. let self = this;
  5975. console.log(this);
  5976. console.log(PlayDuration, "PlayDuration");
  5977. let data = {
  5978. fromPlat: 2, //来源平台 1小程序 2网站
  5979. photo: self.ossAvatarUrl,
  5980. sectionId: parseInt(this.playSectionId),
  5981. goodsId: parseInt(this.goodsId),
  5982. courseId: parseInt(this.courseId),
  5983. studyDuration: parseInt(PlayDuration > 0 ? PlayDuration : 0),
  5984. gradeId: parseInt(this.gradeId),
  5985. chapterId: parseInt(this.chapterId),
  5986. moduleId: parseInt(this.moduleId),
  5987. videoCurrentTime: parseInt(currentTime > 0 ? currentTime : 0),
  5988. orderGoodsId: parseInt(this.orderGoodsId),
  5989. };
  5990. console.log(data, "data");
  5991. if (status > 0) {
  5992. data.status = status;
  5993. }
  5994. // /study/record 学习记录
  5995. this.$request
  5996. .studyRecord(data)
  5997. .then((res) => {
  5998. if (status > 0) {
  5999. //看完视频刷新父级列表
  6000. let rebuildObj = this.getSameObj(this.sectionItem);
  6001. this.refreshParentList(this.sectionItem, rebuildObj);
  6002. }
  6003. self.ossAvatarUrl = "";
  6004. })
  6005. .catch((err) => {
  6006. console.log(err);
  6007. this.$message({
  6008. type: "warning",
  6009. message: err.msg,
  6010. });
  6011. });
  6012. },
  6013. /**
  6014. * 获取重修列表中是否有相同对象
  6015. */
  6016. getSameObj(metaObj) {
  6017. console.log('看完视频后----', metaObj, this.reMenuList)
  6018. let newObj = false;
  6019. if (this.reMenuList.length) {
  6020. console.log(this.reMenuList, "this.reMenuList");
  6021. this.reMenuList.forEach((menu) => {
  6022. if (menu.type == 3) {
  6023. let isSame = this.contrast(metaObj, menu);
  6024. if (isSame) {
  6025. newObj = isSame;
  6026. }
  6027. } else {
  6028. if (menu.list && menu.list.length) {
  6029. menu.list.forEach((menuItem) => {
  6030. if (menuItem.type == 1) {
  6031. console.log(menuItem, metaObj);
  6032. let isSame = this.contrast(metaObj, menuItem);
  6033. if (isSame) {
  6034. newObj = isSame;
  6035. }
  6036. } else {
  6037. if (menuItem.list && menuItem.list.length) {
  6038. menuItem.list.forEach((menuChild) => {
  6039. if (menuChild.type == 1) {
  6040. let isSame = this.contrast(metaObj, menuChild);
  6041. if (isSame) {
  6042. newObj = isSame;
  6043. }
  6044. }
  6045. });
  6046. }
  6047. }
  6048. });
  6049. }
  6050. }
  6051. });
  6052. return newObj;
  6053. } else {
  6054. return false;
  6055. }
  6056. },
  6057. contrast(obj1, obj2) {
  6058. let moduleId1 = obj1.moduleId || 0;
  6059. let chapterId1 = obj1.chapterId || 0;
  6060. let sectionId1 = obj1.sectionId || obj1.menuId;
  6061. let moduleId2 = obj2.moduleId || 0;
  6062. let chapterId2 = obj2.chapterId || 0;
  6063. let sectionId2 = obj2.sectionId || obj2.menuId;
  6064. //转字符串后对比是否一致
  6065. return moduleId1 == moduleId2 &&
  6066. chapterId1 == chapterId2 &&
  6067. sectionId1 == sectionId2
  6068. ? obj2
  6069. : false;
  6070. },
  6071. /**
  6072. * 刷新父级列表
  6073. */
  6074. refreshParentList(sectionItem, rebuildObj) {
  6075. console.log(sectionItem, "看完视频==========sectionItem", this.menuList);
  6076. console.log(rebuildObj, "rebuildObj");
  6077. let self = this;
  6078. if (sectionItem.menuId) {
  6079. //最外层节有menuid
  6080. //普通章节目录
  6081. this.$request
  6082. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
  6083. .then((res) => {
  6084. for (let i = 0; i < res.rows.length; i++) {
  6085. let item = res.rows[i];
  6086. if (item.type == 3) {
  6087. self.menuList[i].learning = item.learning;
  6088. self.menuList[i].rebuild = item.rebuild;
  6089. }
  6090. }
  6091. });
  6092. if (this.menuTab.length > 1) {
  6093. //有重修目录
  6094. this.$request
  6095. .reMenuList({
  6096. courseId: this.courseId,
  6097. gradeId: this.gradeId,
  6098. rebuild: 1,
  6099. })
  6100. .then((res) => {
  6101. if (res.rows.length > 0) {
  6102. for (let i = 0; i < res.rows.length; i++) {
  6103. let item = res.rows[i];
  6104. item.id = item.menuId;
  6105. item.name = item.menuName;
  6106. item.menuType = item.type;
  6107. item.showList = false;
  6108. item.list = [];
  6109. item.isRebuild = 1;
  6110. }
  6111. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6112. //筛选剩下的选项
  6113. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6114. });
  6115. } else {
  6116. this.menuTab = [
  6117. {
  6118. name: "1",
  6119. label: "章节目录",
  6120. },
  6121. {
  6122. name: "3",
  6123. label: "答疑",
  6124. },
  6125. {
  6126. name: "4",
  6127. label: "笔记",
  6128. },
  6129. {
  6130. name: "5",
  6131. label: "讲义",
  6132. },
  6133. ];
  6134. this.courseTabIndex = "1";
  6135. self.reMenuList = [];
  6136. }
  6137. });
  6138. }
  6139. } else if (!sectionItem.moduleId) {
  6140. //第二层节没有moduleid
  6141. this.$request
  6142. .reSectionList({
  6143. chapterId: sectionItem.chapterId,
  6144. gradeId: this.gradeId,
  6145. courseId: this.courseId,
  6146. moduleId: 0,
  6147. })
  6148. .then((res) => {
  6149. let newArr = res.data.filter((item) => {
  6150. return item.type != 2;
  6151. });
  6152. if (sectionItem.parent) {
  6153. sectionItem.parent.canLearn = newArr.every((item) => {
  6154. if (item.learning == 1) {
  6155. return true;
  6156. } else {
  6157. return false;
  6158. }
  6159. });
  6160. res.data.forEach((section) => {
  6161. section.isRebuild = 1;
  6162. section.parent = sectionItem.parent;
  6163. });
  6164. }
  6165. this.menuList.forEach((menu) => {
  6166. if (menu.menuId == sectionItem.chapterId) {
  6167. menu.list = res.data;
  6168. }
  6169. });
  6170. });
  6171. if (this.menuTab.length > 1 && rebuildObj) {
  6172. this.$request
  6173. .reSectionList({
  6174. chapterId: rebuildObj.chapterId,
  6175. gradeId: this.gradeId,
  6176. courseId: this.courseId,
  6177. moduleId: 0,
  6178. rebuild: 1,
  6179. })
  6180. .then((res) => {
  6181. let newArr = res.data.filter((item) => {
  6182. return item.type != 2;
  6183. });
  6184. if (rebuildObj.parent) {
  6185. rebuildObj.parent.canLearn = newArr.every((item) => {
  6186. if (item.learning == 1) {
  6187. return true;
  6188. } else {
  6189. return false;
  6190. }
  6191. });
  6192. res.data.forEach((section) => {
  6193. section.parent = rebuildObj.parent;
  6194. });
  6195. }
  6196. this.reMenuList.forEach((menu) => {
  6197. if (menu.menuId == rebuildObj.chapterId) {
  6198. menu.list = res.data;
  6199. }
  6200. });
  6201. });
  6202. this.$request
  6203. .reMenuList({
  6204. courseId: this.courseId,
  6205. gradeId: this.gradeId,
  6206. rebuild: 1,
  6207. })
  6208. .then((res) => {
  6209. if (res.rows.length > 0) {
  6210. for (let i = 0; i < res.rows.length; i++) {
  6211. let item = res.rows[i];
  6212. item.id = item.menuId;
  6213. item.name = item.menuName;
  6214. item.menuType = item.type;
  6215. item.showList = false;
  6216. item.list = [];
  6217. item.isRebuild = 1;
  6218. }
  6219. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6220. //筛选剩下的选项
  6221. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6222. });
  6223. } else {
  6224. this.menuTab = [
  6225. {
  6226. name: "1",
  6227. label: "章节目录",
  6228. },
  6229. {
  6230. name: "3",
  6231. label: "答疑",
  6232. },
  6233. {
  6234. name: "4",
  6235. label: "笔记",
  6236. },
  6237. {
  6238. name: "5",
  6239. label: "讲义",
  6240. },
  6241. ];
  6242. this.courseTabIndex = "1";
  6243. self.reMenuList = [];
  6244. }
  6245. });
  6246. }
  6247. } else {
  6248. //第三层节有moduleid和chapterid都有
  6249. console.log('第三层第三层')
  6250. this.$request
  6251. .reSectionList({
  6252. chapterId: sectionItem.chapterId,
  6253. gradeId: this.gradeId,
  6254. courseId: this.courseId,
  6255. moduleId: sectionItem.moduleId,
  6256. })
  6257. .then((res) => {
  6258. let newArr = res.data.filter((item) => {
  6259. return item.type != 2;
  6260. });
  6261. if (sectionItem.parent) {
  6262. sectionItem.parent.canLearn = newArr.every((item) => {
  6263. if (item.learning == 1) {
  6264. return true;
  6265. } else {
  6266. return false;
  6267. }
  6268. });
  6269. res.data.forEach((section) => {
  6270. section.parent = sectionItem.parent;
  6271. });
  6272. }
  6273. this.menuList.forEach((menu) => {
  6274. if (menu.list && menu.list.length) {
  6275. menu.list.forEach((chapter) => {
  6276. if (
  6277. chapter.moduleId == sectionItem.moduleId &&
  6278. chapter.chapterId == sectionItem.chapterId
  6279. ) {
  6280. // chapter.learning = res.data[0].learning
  6281. console.log(res.data, "res.data");
  6282. chapter.list = res.data;
  6283. console.log(chapter.list, "chapter.list");
  6284. }
  6285. });
  6286. }
  6287. });
  6288. console.log('this.menuList', this.menuList)
  6289. });
  6290. if (this.menuTab.length > 1 && rebuildObj) {
  6291. this.$request
  6292. .reSectionList({
  6293. chapterId: rebuildObj.chapterId,
  6294. gradeId: this.gradeId,
  6295. courseId: this.courseId,
  6296. moduleId: rebuildObj.moduleId,
  6297. rebuild: 1,
  6298. })
  6299. .then((res) => {
  6300. let newArr = res.data.filter((item) => {
  6301. return item.type != 2;
  6302. });
  6303. if (sectionItem.parent) {
  6304. rebuildObj.parent.canLearn = newArr.every((item) => {
  6305. if (item.learning == 1) {
  6306. return true;
  6307. } else {
  6308. return false;
  6309. }
  6310. });
  6311. res.data.forEach((section) => {
  6312. section.parent = rebuildObj.parent;
  6313. });
  6314. }
  6315. this.reMenuList.forEach((menu) => {
  6316. if (menu.list && menu.list.length) {
  6317. menu.list.forEach((chapter) => {
  6318. if (
  6319. chapter.moduleId == rebuildObj.moduleId &&
  6320. chapter.chapterId == rebuildObj.chapterId
  6321. ) {
  6322. chapter.learning = res.data[0].learning
  6323. chapter.list = res.data;
  6324. }
  6325. });
  6326. }
  6327. });
  6328. });
  6329. this.$request
  6330. .reMenuList({
  6331. courseId: this.courseId,
  6332. gradeId: this.gradeId,
  6333. rebuild: 1,
  6334. })
  6335. .then((res) => {
  6336. if (res.rows.length > 0) {
  6337. for (let i = 0; i < res.rows.length; i++) {
  6338. let item = res.rows[i];
  6339. item.id = item.menuId;
  6340. item.name = item.menuName;
  6341. item.menuType = item.type;
  6342. item.showList = false;
  6343. item.list = [];
  6344. item.isRebuild = 1;
  6345. }
  6346. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6347. //筛选剩下的选项
  6348. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6349. });
  6350. } else {
  6351. this.menuTab = [
  6352. {
  6353. name: "1",
  6354. label: "章节目录",
  6355. },
  6356. {
  6357. name: "3",
  6358. label: "答疑",
  6359. },
  6360. {
  6361. name: "4",
  6362. label: "笔记",
  6363. },
  6364. {
  6365. name: "5",
  6366. label: "讲义",
  6367. },
  6368. ];
  6369. this.courseTabIndex = "1";
  6370. self.reMenuList = [];
  6371. }
  6372. });
  6373. }
  6374. }
  6375. },
  6376. getRecordLast() {
  6377. let self = this;
  6378. return new Promise((resolve) => {
  6379. let data = {
  6380. gradeId: Number(self.gradeId),
  6381. goodsId: Number(self.goodsId),
  6382. sectionId: Number(self.playSectionId),
  6383. courseId: Number(self.courseId),
  6384. chapterId: parseInt(self.chapterId),
  6385. moduleId: parseInt(self.moduleId),
  6386. };
  6387. self.$request.recordLast(data).then((res) => {
  6388. resolve(res.data);
  6389. });
  6390. });
  6391. },
  6392. /**
  6393. * 获取笔记列表
  6394. */
  6395. getNoteList() {
  6396. let self = this;
  6397. self.noteList = [];
  6398. let data = {
  6399. courseId: this.courseId,
  6400. gradeId: this.gradeId,
  6401. goodsId: this.goodsId,
  6402. // pageNum: this.noteParams.pageNum,
  6403. // pageSize: this.noteParams.pageSize,
  6404. };
  6405. if (this.playSectionId > 0) {
  6406. data.sectionId = this.playSectionId;
  6407. }
  6408. this.$request.noteList(data).then((res) => {
  6409. self.noteList = res.rows;
  6410. self.noteTotal = res.total;
  6411. });
  6412. },
  6413. noteClick(note) {
  6414. if (this.vid) {
  6415. //切换视频
  6416. if (this.vid == note.recordingUrl) {
  6417. var polyvPlayerContext = this.player;
  6418. if (polyvPlayerContext) {
  6419. polyvPlayerContext.j2s_seekVideo(note.noteSecond);
  6420. }
  6421. } else {
  6422. var polyvPlayerContext = this.player;
  6423. if (polyvPlayerContext) {
  6424. polyvPlayerContext.changeVid(note.recordingUrl);
  6425. }
  6426. }
  6427. } else {
  6428. var polyvPlayerContext = this.player;
  6429. console.log(polyvPlayerContext);
  6430. if (polyvPlayerContext) {
  6431. polyvPlayerContext.changeVid(note.recordingUrl);
  6432. } else {
  6433. this.vid = note.recordingUrl;
  6434. console.log(note.recordingUrl);
  6435. this.moduleId = note.moduleId;
  6436. this.chapterId = note.chapterId;
  6437. this.playSectionId = note.sectionId;
  6438. note.sectionType = 3;
  6439. this.loadPlayerScript(this.loadPlayer);
  6440. }
  6441. }
  6442. this.recordObj = { videoCurrentTime: note.noteSecond };
  6443. },
  6444. /**
  6445. * 展开列表
  6446. */
  6447. getMenuList() {
  6448. let self = this;
  6449. // /course/menuList
  6450. this.$request
  6451. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
  6452. .then(async (res) => {
  6453. console.log('--asfsdgshfduofhdug', res.rows, this.menuList)
  6454. for (let i = 0; i < res.rows.length; i++) {
  6455. let item = res.rows[i];
  6456. item.id = item.menuId;
  6457. item.name = item.menuName;
  6458. item.menuType = item.type;
  6459. item.showList = false;
  6460. item.list = [];
  6461. item.parent = this.menuList;
  6462. }
  6463. self.menuList = res.rows;
  6464. console.log('==============self.menuList===', res.rows, self.menuList)
  6465. if ((this.sectionItem.recordingUrl||this.sectionItem.liveUrl) && this.needOpenNew) {
  6466. this.needOpenNew = false;
  6467. if (this.sectionItem.sectionType == 1) {
  6468. console.log("录播")
  6469. //录播
  6470. this.chapterId = this.sectionItem.chapterId;
  6471. this.moduleId = this.sectionItem.moduleId;
  6472. this.playSectionId = this.sectionItem.sectionId;
  6473. this.vid = this.sectionItem.recordingUrl;
  6474. this.playVideo(this.sectionItem);
  6475. } else if (this.sectionItem.sectionType == 2) {
  6476. console.log("直播")
  6477. this.getResource(this.sectionItem)
  6478. //直播
  6479. // this.studyRecordGetLastLive();
  6480. } else if (this.sectionItem.sectionType == 3) {
  6481. //回放
  6482. this.chapterId = this.sectionItem.chapterId;
  6483. this.moduleId = this.sectionItem.moduleId;
  6484. this.playSectionId = this.sectionItem.sectionId;
  6485. this.vid = this.sectionItem.recordingUrl;
  6486. this.playVideo(this.sectionItem);
  6487. }
  6488. for (let i = 0; i < res.rows.length; i++) {
  6489. if (
  6490. res.rows[i].type == 1 &&
  6491. res.rows[i].menuId == this.sectionItem.moduleId
  6492. ) {
  6493. this.menuIndex = [i];
  6494. this.openModule(this.menuList[i], true);
  6495. break;
  6496. } else if (
  6497. res.rows[i].type == 2 &&
  6498. res.rows[i].menuId == this.sectionItem.chapterId &&
  6499. (!this.sectionItem.moduleId || this.sectionItem.moduleId == 0)
  6500. ) {
  6501. console.log("噢噢噢");
  6502. this.menuIndex = [i];
  6503. // this.needOpen = false;
  6504. this.openChapter(this.menuList[i]);
  6505. break;
  6506. }
  6507. }
  6508. } else {
  6509. console.log("我走了");
  6510. const changeStatus = await this.studyRecordQueryLiveLast();
  6511. if (changeStatus) {
  6512. for (let i = 0; i < res.rows.length; i++) {
  6513. if (
  6514. res.rows[i].type == 1 &&
  6515. res.rows[i].menuId == this.sectionItem.moduleId
  6516. ) {
  6517. this.menuIndex = [i];
  6518. this.openModule(this.menuList[i], true);
  6519. break;
  6520. } else if (
  6521. res.rows[i].type == 2 &&
  6522. res.rows[i].menuId == this.sectionItem.chapterId &&
  6523. !this.sectionItem.moduleId
  6524. ) {
  6525. this.menuIndex = [i];
  6526. // this.needOpen = false;
  6527. this.openChapter(this.menuList[i]);
  6528. break;
  6529. }
  6530. }
  6531. } else {
  6532. //展开第一个
  6533. if (this.needOpen) {
  6534. for (let i = 0; i < res.rows.length; i++) {
  6535. if (res.rows[i].type == 1) {
  6536. this.menuIndex = [i];
  6537. this.openModule(this.menuList[i]);
  6538. break;
  6539. } else if (res.rows[i].type == 2) {
  6540. this.menuIndex = [i];
  6541. // this.needOpen = false;
  6542. this.openChapter(this.menuList[i]);
  6543. break;
  6544. }
  6545. }
  6546. //第一个是节,直接播放
  6547. if (self.menuList.length) {
  6548. if (
  6549. self.menuList[0].type == 3 &&
  6550. !this.sectionItem.recordingUrl &&
  6551. self.menuList[0].sectionType != 2
  6552. ) {
  6553. // this.getResource(self.menuList[0]);
  6554. }
  6555. }
  6556. }
  6557. }
  6558. }
  6559. });
  6560. },
  6561. getReMenuList() {
  6562. let self = this;
  6563. this.$request
  6564. .reMenuList({
  6565. courseId: this.courseId,
  6566. rebuild: 1,
  6567. gradeId: this.gradeId,
  6568. })
  6569. .then((res) => {
  6570. for (let i = 0; i < res.rows.length; i++) {
  6571. let item = res.rows[i];
  6572. item.id = item.menuId;
  6573. item.name = item.menuName;
  6574. item.menuType = item.type;
  6575. item.showList = false;
  6576. item.list = [];
  6577. item.parent = this.reMenuList;
  6578. item.isRebuild = 1;
  6579. }
  6580. self.reMenuList = res.rows;
  6581. if (self.reMenuList.length > 0) {
  6582. this.menuTab = [
  6583. {
  6584. name: "1",
  6585. label: "章节目录",
  6586. },
  6587. {
  6588. name: "2",
  6589. label: "重修目录",
  6590. },
  6591. {
  6592. name: "3",
  6593. label: "答疑",
  6594. },
  6595. {
  6596. name: "4",
  6597. label: "笔记",
  6598. },
  6599. {
  6600. name: "5",
  6601. label: "讲义",
  6602. },
  6603. ];
  6604. if (this.courseTabIndex == "2") {
  6605. return;
  6606. }
  6607. this.courseTabIndex = "1";
  6608. } else {
  6609. this.menuTab = [
  6610. {
  6611. name: "1",
  6612. label: "章节目录",
  6613. },
  6614. {
  6615. name: "3",
  6616. label: "答疑",
  6617. },
  6618. {
  6619. name: "4",
  6620. label: "笔记",
  6621. },
  6622. {
  6623. name: "5",
  6624. label: "讲义",
  6625. },
  6626. ];
  6627. this.courseTabIndex = "1";
  6628. }
  6629. });
  6630. },
  6631. /**
  6632. * 获取讲义权限
  6633. */
  6634. courseHandouts() {
  6635. if (this.goodsData.handoutsId) {
  6636. this.$request
  6637. .courseHandouts(this.goodsData.handoutsId)
  6638. .then((res) => {
  6639. this.courseHandoutsData = res.data;
  6640. const loadingTask = pdf.createLoadingTask(
  6641. this.$tools.splitImgHost(this.courseHandoutsData.handoutsUrl)
  6642. );
  6643. loadingTask.promise
  6644. .then((pdf) => {
  6645. this.numPages = pdf.numPages;
  6646. })
  6647. .catch((err) => {});
  6648. })
  6649. .catch((err) => {});
  6650. }
  6651. },
  6652. /**
  6653. * 获取培训项目详情
  6654. */
  6655. courseBusiness() {
  6656. this.$request.courseBusiness(this.goodsData.businessId).then((res) => {
  6657. this.businessData = res.data;
  6658. });
  6659. },
  6660. /**提出答疑 */
  6661. addAnswer() {
  6662. if (!this.textarea) {
  6663. this.$message.warning("请输入疑问内容");
  6664. return;
  6665. }
  6666. let data = {
  6667. courseId: this.courseId,
  6668. goodsId: this.goodsId,
  6669. orderGoodsId: this.orderGoodsId,
  6670. answerText: this.textarea,
  6671. };
  6672. this.$request.addAnswer(data).then((res) => {
  6673. this.textarea = "";
  6674. this.getAnswerList();
  6675. });
  6676. },
  6677. /**回复 */
  6678. answerBack(row) {
  6679. this.$prompt(`${row.realname}:${row.answerText}`, "提示", {
  6680. confirmButtonText: "确定",
  6681. cancelButtonText: "取消",
  6682. inputErrorMessage: "输入不能为空",
  6683. inputValidator: (value) => {
  6684. let str = value.replace(/^ +| +$/g, "");
  6685. // 点击按钮时,对文本框里面的值进行验证
  6686. if (!str) {
  6687. return "输入不能为空";
  6688. }
  6689. },
  6690. })
  6691. .then(({ value }) => {
  6692. let data = {
  6693. assignUserId: row.userId,
  6694. assignAnswerId: row.answerId,
  6695. courseId: this.courseId,
  6696. goodsId: this.goodsId,
  6697. orderGoodsId: this.orderGoodsId,
  6698. answerText: value,
  6699. assignAnswerText: row.assignAnswerText,
  6700. };
  6701. this.$request.addAnswer(data).then((res) => {
  6702. this.getAnswerList();
  6703. });
  6704. })
  6705. .catch(() => {});
  6706. },
  6707. getAnswerList() {
  6708. let self = this;
  6709. // /app/answer/list 查询答疑列表
  6710. this.$request
  6711. .answerList({ courseId: this.courseId, goodsId: this.goodsId })
  6712. .then((res) => {
  6713. let data1 = [];
  6714. let data2 = [];
  6715. let copydata2 = [];
  6716. res.rows.forEach((item) => {
  6717. if (!item.assignAnswerId) {
  6718. data1.push(item);
  6719. } else {
  6720. data2.push(item);
  6721. copydata2.push(item);
  6722. }
  6723. });
  6724. data2.forEach((item, index) => {
  6725. //回复层
  6726. data1.forEach((items) => {
  6727. //提问层
  6728. if (items.answerId === item.assignAnswerId) {
  6729. if (
  6730. items.newArraysAnswerList &&
  6731. items.newArraysAnswerList.length
  6732. ) {
  6733. items.newArraysAnswerList.push(item);
  6734. } else {
  6735. items.newArraysAnswerList = [item];
  6736. }
  6737. let indexInd = copydata2.findIndex((itemsxs) => {
  6738. return itemsxs.answerId === item.answerId;
  6739. });
  6740. if (indexInd !== -1) {
  6741. copydata2.splice(indexInd, 1);
  6742. }
  6743. }
  6744. });
  6745. });
  6746. copydata2.forEach((it) => {
  6747. for (let i = 0; i < data1.length; i++) {
  6748. let STATUS = null;
  6749. if (data1[i].newArraysAnswerList) {
  6750. STATUS = data1[i].newArraysAnswerList.some((items) => {
  6751. return items.answerId === it.assignAnswerId;
  6752. });
  6753. }
  6754. if (STATUS) {
  6755. data1[i].newArraysAnswerList.push(it);
  6756. break;
  6757. }
  6758. }
  6759. });
  6760. self.answerList = data1.reverse();
  6761. console.log(self.answerList, "answerList");
  6762. });
  6763. },
  6764. courseCourseList() {
  6765. return new Promise((resolve) => {
  6766. this.param.goodsId = this.goodsId;
  6767. this.param.gradeId = this.gradeId;
  6768. this.$request.courseCourseList(this.param).then(async (res) => {
  6769. console.log(res, "resresresres");
  6770. this.courseList.push(...res.rows);
  6771. this.courseTotal = res.total
  6772. // console.log('courseTotal::', this.courseTotal)
  6773. if (!this.courseId) {
  6774. this.courseId = this.courseList[0].courseId;
  6775. }
  6776. this.param.total = res.total;
  6777. await this.courseChange();
  6778. resolve();
  6779. });
  6780. });
  6781. },
  6782. download(url, fileName) {
  6783. let xhr = new XMLHttpRequest();
  6784. xhr.open("get", url, true);
  6785. xhr.setRequestHeader("Content-Type", `application/pdf`);
  6786. xhr.responseType = "blob";
  6787. let that = this;
  6788. xhr.onload = function () {
  6789. if (this.status == 200) {
  6790. //接受二进制文件流
  6791. var blob = this.response;
  6792. that.downloadExportFile(blob, fileName);
  6793. }
  6794. };
  6795. xhr.send();
  6796. },
  6797. downloadExportFile(blob, tagFileName) {
  6798. let downloadElement = document.createElement("a");
  6799. let href = "";
  6800. if (typeof blob == "string") {
  6801. downloadElement.target = "_blank";
  6802. } else {
  6803. href = window.URL.createObjectURL(blob); //创建下载的链接
  6804. }
  6805. downloadElement.href = href;
  6806. downloadElement.download = tagFileName;
  6807. //下载后文件名
  6808. document.body.appendChild(downloadElement);
  6809. downloadElement.click(); //点击下载
  6810. document.body.removeChild(downloadElement); //下载完成移除元素
  6811. if (typeof blob != "string") {
  6812. window.URL.revokeObjectURL(href); //释放掉blob对象
  6813. }
  6814. },
  6815. print() {
  6816. document.getElementById("printIframe").contentWindow.print();
  6817. },
  6818. previvew(url) {
  6819. this.showPdf = true;
  6820. },
  6821. noteSubmit() {
  6822. let self = this;
  6823. if (!(this.playSectionId > 0)) {
  6824. this.$message({
  6825. message: "目前无播放视频",
  6826. type: "warning",
  6827. });
  6828. return;
  6829. }
  6830. if (!this.textareaNote) {
  6831. this.$message({
  6832. message: "请输入内容",
  6833. type: "warning",
  6834. });
  6835. return;
  6836. }
  6837. if (!this.gradeId) {
  6838. this.$message({
  6839. message: "暂无班级数据",
  6840. type: "warning",
  6841. });
  6842. return;
  6843. }
  6844. var polyvPlayerContext = this.player;
  6845. let noteDate = this.$tools.getZeroTime();
  6846. let noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  6847. console.log(noteSecond, "noteSecond");
  6848. if (!noteSecond) {
  6849. if (noteSecond == 0) {
  6850. //播放结束
  6851. noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  6852. }
  6853. if (!noteSecond) {
  6854. this.$message({
  6855. message: "视频暂未开始",
  6856. type: "warning",
  6857. });
  6858. return;
  6859. }
  6860. }
  6861. let data = {
  6862. gradeId: this.gradeId,
  6863. goodsId: this.goodsId,
  6864. sectionId: this.playSectionId,
  6865. courseId: this.courseId,
  6866. noteText: this.textareaNote,
  6867. noteDate: noteDate,
  6868. noteSecond: noteSecond,
  6869. moduleId: this.moduleId,
  6870. chapterId: this.chapterId,
  6871. };
  6872. this.$request.postNote(data).then((res) => {
  6873. this.$message({
  6874. message: "发布成功",
  6875. type: "success",
  6876. });
  6877. self.getNoteList();
  6878. this.textareaNote = "";
  6879. });
  6880. },
  6881. del(item) {
  6882. console.log(item);
  6883. let data = { answerId: item.answerId, status: -1 };
  6884. this.$request.delAnswer(data).then((res) => {
  6885. this.$message({
  6886. message: "删除成功",
  6887. type: "success",
  6888. });
  6889. this.getAnswerList();
  6890. });
  6891. },
  6892. /**
  6893. * 打印
  6894. */
  6895. printView(url) {
  6896. console.log("触发打印", url);
  6897. printJS({
  6898. printable: url,
  6899. type: "pdf",
  6900. header: null,
  6901. targetStyles: ["*"],
  6902. style: "@page {margin:0 10mm}",
  6903. });
  6904. // this.print(url);
  6905. },
  6906. // 打印方法
  6907. print(filePath) {
  6908. console.log("执行打印");
  6909. let iframe = document.createElement("iframe");
  6910. iframe.style.border = "0px";
  6911. iframe.style.position = "absolute";
  6912. iframe.style.width = "0px";
  6913. iframe.style.height = "0px";
  6914. iframe.style.right = "0px";
  6915. iframe.style.top = "0px";
  6916. iframe.setAttribute("src", filePath);
  6917. iframe.onload = () => {
  6918. iframe.contentWindow.print();
  6919. // setTimeout(() => {
  6920. // document.body.removeChild(iframe);
  6921. // });
  6922. };
  6923. document.body.append(iframe);
  6924. },
  6925. },
  6926. };
  6927. </script>
  6928. <!-- Add "scoped" attribute to limit CSS to this component only -->
  6929. <style scoped lang="scss">
  6930. .course-detail {
  6931. .section {
  6932. padding-bottom: 30px;
  6933. &__header {
  6934. height: 40px;
  6935. display: flex;
  6936. align-items: center;
  6937. padding: 0 20px;
  6938. }
  6939. &__body {
  6940. .course-info {
  6941. &__header {
  6942. .title {
  6943. height: 40px;
  6944. border-bottom: 1px solid #999;
  6945. // color: #fff;
  6946. .select {
  6947. // width: 100%;
  6948. }
  6949. /deep/ .el-input__icon {
  6950. width: 20px;
  6951. height: 20px;
  6952. border: 1px solid #eee;
  6953. border-radius: 4px;
  6954. margin-top: 10px;
  6955. line-height: 20px;
  6956. }
  6957. /deep/ .el-input__inner {
  6958. // color: #fff;
  6959. font-size: 16px;
  6960. background: none;
  6961. border: 0;
  6962. }
  6963. }
  6964. .left-box {
  6965. width: 810px;
  6966. height: 455px;
  6967. float: left;
  6968. background-size: cover;
  6969. background-position: center center;
  6970. background-repeat: no-repeat;
  6971. position: relative;
  6972. .video {
  6973. width: 100%;
  6974. height: 100%;
  6975. }
  6976. }
  6977. .recordStyle {
  6978. position: absolute;
  6979. bottom: 90px;
  6980. padding: 6px 12px;
  6981. left: 8px;
  6982. background-color: rgba(0, 0, 0, 0.4);
  6983. color: #fff;
  6984. border-radius: 24px;
  6985. user-select: none;
  6986. .btn_sty {
  6987. cursor: pointer;
  6988. }
  6989. }
  6990. .right-box {
  6991. width: 462px;
  6992. height: 455px;
  6993. background: #3f4449;
  6994. border-radius: 0px;
  6995. float: right;
  6996. &__header {
  6997. .tabs {
  6998. /deep/.el-tabs__nav-wrap::after {
  6999. background-color: #999;
  7000. }
  7001. /deep/ .el-tabs__header {
  7002. margin: 0;
  7003. }
  7004. .label {
  7005. color: #fff;
  7006. height: 40px;
  7007. line-height: 40px;
  7008. padding: 0 20px;
  7009. }
  7010. .item {
  7011. &__title {
  7012. padding-left: 12px;
  7013. height: 40px;
  7014. line-height: 40px;
  7015. cursor: pointer;
  7016. font-size: 14px;
  7017. font-family: Microsoft YaHei;
  7018. font-weight: bold;
  7019. color: #fff;
  7020. .el-icon-caret-right,
  7021. .el-icon-caret-bottom {
  7022. color: #999;
  7023. }
  7024. }
  7025. &__content {
  7026. .bank-chapter {
  7027. &__item {
  7028. color: #fff;
  7029. font-size: 14px;
  7030. &__text {
  7031. padding: 8px 8px 8px 24px;
  7032. cursor: pointer;
  7033. flex: 1;
  7034. .el-icon-caret-right,
  7035. .el-icon-caret-bottom {
  7036. color: #999;
  7037. }
  7038. }
  7039. }
  7040. }
  7041. .bank-section {
  7042. &__item {
  7043. user-select: none;
  7044. color: #fff;
  7045. font-size: 14px;
  7046. display: flex;
  7047. align-items: center;
  7048. &.active {
  7049. background: #132b4d;
  7050. font-size: 14px;
  7051. font-family: Microsoft YaHei;
  7052. font-weight: bold;
  7053. color: #3f8dfd;
  7054. }
  7055. &__text {
  7056. flex: 1;
  7057. padding: 8px 8px 8px 12px;
  7058. height: 40px;
  7059. display: flex;
  7060. flex-direction: column;
  7061. justify-content: center;
  7062. cursor: pointer;
  7063. .el-icon-caret-right,
  7064. .el-icon-caret-bottom {
  7065. color: #999;
  7066. }
  7067. }
  7068. .test-btn {
  7069. margin-left: 10px;
  7070. width: 32px;
  7071. height: 20px;
  7072. background: #007aff;
  7073. border-radius: 4px;
  7074. line-height: 18px;
  7075. color: #fff;
  7076. text-align: center;
  7077. }
  7078. .note {
  7079. margin-left: 10px;
  7080. width: 32px;
  7081. height: 20px;
  7082. border: 1px solid #ff3b30;
  7083. border-radius: 4px;
  7084. line-height: 18px;
  7085. color: #ff3b30;
  7086. text-align: center;
  7087. &--yellow {
  7088. border-color: #ff9500;
  7089. color: #ff9500;
  7090. }
  7091. &--blue {
  7092. border-color: #3f8dfd;
  7093. color: #3f8dfd;
  7094. }
  7095. }
  7096. .during {
  7097. color: #999;
  7098. margin-right: 10px;
  7099. }
  7100. .btn {
  7101. margin-right: 12px;
  7102. width: 48px;
  7103. height: 20px;
  7104. border: 1px solid #ff3b30;
  7105. background: #ff3b30;
  7106. border-radius: 4px;
  7107. line-height: 18px;
  7108. color: #fff;
  7109. text-align: center;
  7110. &--green {
  7111. border: 1px solid #34c759;
  7112. background: #34c759;
  7113. }
  7114. }
  7115. .live-btn {
  7116. margin-left: 20px;
  7117. width: 60px;
  7118. height: 20px;
  7119. border-radius: 4px;
  7120. background: #eeeeee;
  7121. line-height: 18px;
  7122. color: #666666;
  7123. text-align: center;
  7124. &--yellow {
  7125. background: #fff7eb;
  7126. color: #ff9500;
  7127. }
  7128. &--blue {
  7129. border-color: #ebf4ff;
  7130. color: #007aff;
  7131. }
  7132. }
  7133. }
  7134. }
  7135. }
  7136. }
  7137. }
  7138. .title {
  7139. height: 40px;
  7140. border-bottom: 1px solid #999;
  7141. color: #fff;
  7142. .select {
  7143. width: 100%;
  7144. }
  7145. /deep/ .el-input__icon {
  7146. width: 20px;
  7147. height: 20px;
  7148. border: 1px solid #fff;
  7149. border-radius: 4px;
  7150. margin-top: 10px;
  7151. line-height: 20px;
  7152. }
  7153. /deep/ .el-input__inner {
  7154. color: #fff;
  7155. font-size: 16px;
  7156. background: none;
  7157. border: 0;
  7158. }
  7159. }
  7160. }
  7161. &__body {
  7162. height: 374px;
  7163. overflow-y: scroll;
  7164. &::-webkit-scrollbar {
  7165. // width: 6px;
  7166. display: none;
  7167. }
  7168. &::-webkit-scrollbar-track {
  7169. background-color: #060e1a;
  7170. -webkit-border-radius: 2em;
  7171. -moz-border-radius: 2em;
  7172. border-radius: 2em;
  7173. }
  7174. &::-webkit-scrollbar-thumb {
  7175. background-color: #eeeeee;
  7176. -webkit-border-radius: 2em;
  7177. -moz-border-radius: 2em;
  7178. border-radius: 2em;
  7179. }
  7180. }
  7181. }
  7182. }
  7183. &__body {
  7184. /deep/ .el-tabs__item {
  7185. padding: 0 20px !important;
  7186. height: 80px;
  7187. line-height: 80px;
  7188. }
  7189. .course-img {
  7190. width: 100%;
  7191. }
  7192. .course-menu {
  7193. margin-top: 25px;
  7194. .left-box {
  7195. width: 948px;
  7196. float: left;
  7197. &__header {
  7198. padding-right: 50px;
  7199. position: relative;
  7200. .item {
  7201. width: auto;
  7202. margin-right: 24px;
  7203. font-size: 16px;
  7204. font-family: Microsoft YaHei;
  7205. font-weight: 400;
  7206. color: #333333;
  7207. background: #eeeeee;
  7208. border-radius: 8px;
  7209. padding: 12px;
  7210. position: relative;
  7211. &.canlearn {
  7212. background: #3f8dfd;
  7213. color: #fff;
  7214. }
  7215. }
  7216. }
  7217. &__body {
  7218. .buy-note {
  7219. margin-right: 50px;
  7220. }
  7221. .item {
  7222. margin-top: 24px;
  7223. padding: 16px;
  7224. background: #eee;
  7225. border-radius: 10px;
  7226. &__title {
  7227. font-size: 16px;
  7228. font-family: Microsoft YaHei;
  7229. font-weight: bold;
  7230. color: #333333;
  7231. .note {
  7232. display: inline-block;
  7233. margin-left: 20px;
  7234. width: 40px;
  7235. height: 24px;
  7236. border: 1px solid #ff3b30;
  7237. border-radius: 8px;
  7238. line-height: 22px;
  7239. color: #ff3b30;
  7240. text-align: center;
  7241. }
  7242. }
  7243. &__content {
  7244. margin-top: 12px;
  7245. background: #f5f7fa;
  7246. }
  7247. }
  7248. }
  7249. }
  7250. .right-box {
  7251. width: 255px;
  7252. float: right;
  7253. .title {
  7254. font-size: 16px;
  7255. font-family: Microsoft YaHei;
  7256. font-weight: 400;
  7257. color: #333333;
  7258. text-shadow: 0px 6px 6px rgba(85, 158, 255, 0.08);
  7259. position: relative;
  7260. .more {
  7261. font-size: 16px;
  7262. font-family: Microsoft YaHei;
  7263. font-weight: 400;
  7264. color: #999999;
  7265. position: absolute;
  7266. right: 0;
  7267. }
  7268. }
  7269. .list {
  7270. .course-item {
  7271. }
  7272. }
  7273. }
  7274. }
  7275. .answer-question {
  7276. &__header {
  7277. border-bottom: 1px solid #eee;
  7278. .textarea-wrap {
  7279. background: #f9f9f9;
  7280. border: 1px solid #eeeeee;
  7281. border-radius: 8px;
  7282. .textarea {
  7283. height: 100%;
  7284. }
  7285. }
  7286. .submit {
  7287. padding: 10px 20px;
  7288. border-radius: 20px;
  7289. text-align: center;
  7290. font-size: 16px;
  7291. margin: 10px 0;
  7292. float: right;
  7293. }
  7294. }
  7295. &__body {
  7296. .question-list {
  7297. &__item {
  7298. padding: 20px 0;
  7299. display: flex;
  7300. &__avatar {
  7301. width: 40px;
  7302. height: 40px;
  7303. display: table-cell;
  7304. border-radius: 50%;
  7305. text-align: center;
  7306. img {
  7307. display: inline-block;
  7308. vertical-align: middle;
  7309. max-width: 100%;
  7310. max-height: 100%;
  7311. }
  7312. }
  7313. &__content {
  7314. flex: 1;
  7315. border-bottom: 1px solid #ccc;
  7316. margin-left: 10px;
  7317. .nickname {
  7318. font-size: 14px;
  7319. font-family: Microsoft YaHei;
  7320. font-weight: bold;
  7321. color: #fff;
  7322. line-height: 24px;
  7323. }
  7324. .desc {
  7325. font-size: 14px;
  7326. font-family: Microsoft YaHei;
  7327. font-weight: 400;
  7328. color: #666666;
  7329. line-height: 24px;
  7330. }
  7331. .time {
  7332. font-size: 14px;
  7333. font-family: Microsoft YaHei;
  7334. font-weight: 400;
  7335. color: #999999;
  7336. line-height: 24px;
  7337. .replay {
  7338. float: right;
  7339. font-size: 14px;
  7340. font-family: Microsoft YaHei;
  7341. font-weight: 400;
  7342. color: #3f8dfd;
  7343. line-height: 24px;
  7344. margin-right: 20px;
  7345. }
  7346. .del {
  7347. float: right;
  7348. cursor: pointer;
  7349. font-size: 14px;
  7350. font-family: Microsoft YaHei;
  7351. font-weight: 400;
  7352. color: #ff3b30;
  7353. line-height: 24px;
  7354. margin-right: 20px;
  7355. }
  7356. }
  7357. .reply-list {
  7358. margin: 20px 0;
  7359. width: 100%;
  7360. background: #f9f9f9;
  7361. border-radius: 8px;
  7362. padding: 0 0 0 20px;
  7363. &__item {
  7364. padding: 20px 0;
  7365. display: flex;
  7366. border-bottom: 1px solid #ccc;
  7367. &:nth-last-of-type(1) {
  7368. border: 0;
  7369. }
  7370. &__avatar {
  7371. width: 40px;
  7372. height: 40px;
  7373. display: table-cell;
  7374. border-radius: 50%;
  7375. text-align: center;
  7376. img {
  7377. display: inline-block;
  7378. vertical-align: middle;
  7379. max-width: 100%;
  7380. max-height: 100%;
  7381. }
  7382. }
  7383. &__content {
  7384. border-radius: 8px;
  7385. flex: 1;
  7386. margin-left: 10px;
  7387. .nickname {
  7388. font-size: 14px;
  7389. font-family: Microsoft YaHei;
  7390. font-weight: bold;
  7391. color: #fff;
  7392. line-height: 24px;
  7393. }
  7394. .desc {
  7395. font-size: 14px;
  7396. font-family: Microsoft YaHei;
  7397. font-weight: 400;
  7398. color: #666666;
  7399. line-height: 24px;
  7400. }
  7401. .time {
  7402. font-size: 14px;
  7403. font-family: Microsoft YaHei;
  7404. font-weight: 400;
  7405. color: #999999;
  7406. line-height: 24px;
  7407. .reply {
  7408. float: right;
  7409. font-size: 14px;
  7410. font-family: Microsoft YaHei;
  7411. font-weight: 400;
  7412. color: #3f8dfd;
  7413. line-height: 24px;
  7414. margin-right: 20px;
  7415. cursor: pointer;
  7416. user-select: none;
  7417. }
  7418. .del {
  7419. cursor: pointer;
  7420. margin-right: 20px;
  7421. float: right;
  7422. font-size: 14px;
  7423. font-family: Microsoft YaHei;
  7424. font-weight: 400;
  7425. color: #ff3b30;
  7426. line-height: 24px;
  7427. }
  7428. }
  7429. }
  7430. }
  7431. }
  7432. }
  7433. }
  7434. }
  7435. }
  7436. }
  7437. .lecture-notes {
  7438. &__content {
  7439. .left-box {
  7440. float: left;
  7441. width: 462px;
  7442. .textarea {
  7443. border-bottom: 1px solid #eee;
  7444. .submit {
  7445. float: right;
  7446. width: 138px;
  7447. padding: 10px 0;
  7448. margin: 10px 0 25px 0;
  7449. border-radius: 20px;
  7450. text-align: center;
  7451. font-size: 16px;
  7452. }
  7453. }
  7454. .note-list {
  7455. &__content {
  7456. border-bottom: 1px solid #eee;
  7457. &__title {
  7458. width: 216px;
  7459. height: 24px;
  7460. background: #ccc;
  7461. border-radius: 24px;
  7462. font-size: 14px;
  7463. color: #666666;
  7464. text-align: center;
  7465. line-height: 24px;
  7466. margin: 20px 0;
  7467. }
  7468. }
  7469. &__item {
  7470. display: flex;
  7471. padding: 15px;
  7472. .el-icon-video-play {
  7473. cursor: pointer;
  7474. font-size: 20px;
  7475. color: #3f8dfd;
  7476. }
  7477. &__content {
  7478. flex: 1;
  7479. margin-left: 10px;
  7480. .title {
  7481. cursor: pointer;
  7482. font-size: 14px;
  7483. font-family: Microsoft YaHei;
  7484. font-weight: bold;
  7485. color: #3f8dfd;
  7486. line-height: 24px;
  7487. }
  7488. .desc {
  7489. font-size: 14px;
  7490. font-family: Microsoft YaHei;
  7491. font-weight: 400;
  7492. color: #666666;
  7493. line-height: 24px;
  7494. }
  7495. .time {
  7496. font-size: 14px;
  7497. font-family: Microsoft YaHei;
  7498. font-weight: 400;
  7499. color: #999999;
  7500. line-height: 24px;
  7501. }
  7502. }
  7503. }
  7504. }
  7505. .pagination {
  7506. margin-top: 30px;
  7507. text-align: center;
  7508. }
  7509. }
  7510. .right-box {
  7511. width: 786px;
  7512. float: right;
  7513. .lecture-list {
  7514. background: #f5f7fa;
  7515. border-radius: 8px;
  7516. &__header {
  7517. padding: 0 16px;
  7518. height: 40px;
  7519. line-height: 40px;
  7520. font-size: 18px;
  7521. font-family: Microsoft YaHei;
  7522. font-weight: bold;
  7523. color: #333333;
  7524. .slide-btn {
  7525. cursor: pointer;
  7526. float: right;
  7527. font-size: 14px;
  7528. font-family: Microsoft YaHei;
  7529. font-weight: 400;
  7530. color: #999999;
  7531. }
  7532. }
  7533. &__body {
  7534. .list {
  7535. &__item {
  7536. border-top: 1px solid #fff;
  7537. padding: 0 8px 0 16px;
  7538. height: 56px;
  7539. line-height: 55px;
  7540. display: flex;
  7541. align-items: center;
  7542. .title {
  7543. flex: 1;
  7544. font-size: 16px;
  7545. font-family: Microsoft YaHei;
  7546. font-weight: 400;
  7547. color: #333333;
  7548. }
  7549. .btns {
  7550. .btn {
  7551. cursor: pointer;
  7552. display: inline-block;
  7553. vertical-align: middle;
  7554. width: 80px;
  7555. height: 32px;
  7556. background: #ffffff;
  7557. border: 1px solid #3f8dfd;
  7558. border-radius: 16px;
  7559. text-align: center;
  7560. line-height: 30px;
  7561. color: #3f8dfd;
  7562. margin: 0 8px;
  7563. }
  7564. }
  7565. }
  7566. }
  7567. }
  7568. &__footer {
  7569. margin-top: 24px;
  7570. .lecture-scan {
  7571. background: #f5f7fa;
  7572. border-radius: 8px;
  7573. overflow: hidden;
  7574. &__header {
  7575. height: 40px;
  7576. line-height: 40px;
  7577. padding: 0 16px;
  7578. font-size: 16px;
  7579. font-family: Microsoft YaHei;
  7580. font-weight: bold;
  7581. color: #333333;
  7582. }
  7583. &__body {
  7584. height: 800px;
  7585. text-align: center;
  7586. overflow-y: scroll;
  7587. .iframe {
  7588. width: 100%;
  7589. }
  7590. }
  7591. }
  7592. }
  7593. }
  7594. }
  7595. }
  7596. }
  7597. }
  7598. }
  7599. }
  7600. }
  7601. .take-photo {
  7602. /deep/ .el-dialog__header {
  7603. display: none;
  7604. }
  7605. /deep/ .el-dialog__body {
  7606. padding: 0;
  7607. overflow: unset;
  7608. }
  7609. &__close {
  7610. cursor: pointer;
  7611. position: absolute;
  7612. right: 0;
  7613. top: -28px;
  7614. width: 24px;
  7615. height: 24px;
  7616. line-height: 24px;
  7617. text-align: center;
  7618. color: #eee;
  7619. border: 1px solid #eee;
  7620. border-radius: 50%;
  7621. }
  7622. &__header {
  7623. height: 40px;
  7624. border-bottom: 1px solid #eee;
  7625. line-height: 40px;
  7626. font-size: 16px;
  7627. font-family: Microsoft YaHei;
  7628. font-weight: bold;
  7629. color: #333333;
  7630. padding-left: 24px;
  7631. }
  7632. &__body {
  7633. height: 400px;
  7634. padding: 40px 24px;
  7635. .left-box {
  7636. width: 336px;
  7637. float: left;
  7638. .title {
  7639. font-size: 16px;
  7640. font-family: Microsoft YaHei;
  7641. font-weight: bold;
  7642. color: #ff3b30;
  7643. line-height: 24px;
  7644. }
  7645. .content {
  7646. font-size: 14px;
  7647. font-family: Microsoft YaHei;
  7648. font-weight: 400;
  7649. color: #333333;
  7650. line-height: 28px;
  7651. margin-top: 32px;
  7652. }
  7653. }
  7654. .right-box {
  7655. float: right;
  7656. width: 400px;
  7657. height: 300px;
  7658. video {
  7659. width: 100%;
  7660. height: 100%;
  7661. }
  7662. }
  7663. }
  7664. &__footer {
  7665. height: 90px;
  7666. border-top: 1px solid #eee;
  7667. text-align: center;
  7668. .take {
  7669. display: inline-block;
  7670. width: 200px;
  7671. height: 40px;
  7672. padding: 0;
  7673. border-radius: 20px;
  7674. text-align: center;
  7675. line-height: 40px;
  7676. margin: 24px auto;
  7677. }
  7678. }
  7679. }
  7680. .info {
  7681. &__content {
  7682. height: 500px;
  7683. overflow-y: scroll;
  7684. .handCenter {
  7685. width: 600px;
  7686. height: 300px;
  7687. background: #ccc;
  7688. }
  7689. .upload-box {
  7690. display: inline-block;
  7691. vertical-align: top;
  7692. .el-icon-error {
  7693. cursor: pointer;
  7694. z-index: 99;
  7695. position: absolute;
  7696. left: 100%;
  7697. bottom: 100%;
  7698. font-size: 20px;
  7699. color: red;
  7700. }
  7701. }
  7702. }
  7703. }
  7704. .showconfirm {
  7705. &__content {
  7706. .text {
  7707. padding-bottom: 20px;
  7708. color: red;
  7709. }
  7710. }
  7711. }
  7712. }
  7713. .answer-question {
  7714. max-height: 416px;
  7715. overflow-y: auto;
  7716. padding: 16px;
  7717. background: rgb(63, 68, 73);
  7718. &::-webkit-scrollbar {
  7719. display: none;
  7720. }
  7721. &__header {
  7722. border-bottom: 1px solid #555;
  7723. .textarea-wrap {
  7724. // background: #65696D;
  7725. border: 1px solid #555;
  7726. border-radius: 8px;
  7727. .textarea {
  7728. height: 100%;
  7729. &::placeholder {
  7730. color: red;
  7731. }
  7732. }
  7733. }
  7734. .submit {
  7735. padding: 10px 20px;
  7736. border-radius: 2px;
  7737. text-align: center;
  7738. font-size: 16px;
  7739. margin: 10px 0;
  7740. float: right;
  7741. }
  7742. }
  7743. &__body {
  7744. .question-list {
  7745. &__item {
  7746. padding: 20px 0;
  7747. display: flex;
  7748. &__avatar {
  7749. width: 40px;
  7750. height: 40px;
  7751. display: table-cell;
  7752. border-radius: 50%;
  7753. text-align: center;
  7754. overflow: hidden;
  7755. img {
  7756. display: inline-block;
  7757. vertical-align: middle;
  7758. max-width: 100%;
  7759. max-height: 100%;
  7760. }
  7761. }
  7762. &__content {
  7763. flex: 1;
  7764. border-bottom: 1px solid #555555;
  7765. margin-left: 10px;
  7766. .nickname {
  7767. font-size: 14px;
  7768. font-family: Microsoft YaHei;
  7769. font-weight: bold;
  7770. color: #f5f5f5;
  7771. line-height: 24px;
  7772. }
  7773. .desc {
  7774. font-size: 14px;
  7775. font-family: Microsoft YaHei;
  7776. font-weight: 400;
  7777. color: #cccccc;
  7778. line-height: 24px;
  7779. }
  7780. .time {
  7781. font-size: 14px;
  7782. font-family: Microsoft YaHei;
  7783. font-weight: 400;
  7784. color: #999999;
  7785. line-height: 24px;
  7786. .replay {
  7787. float: right;
  7788. font-size: 14px;
  7789. font-family: Microsoft YaHei;
  7790. font-weight: 400;
  7791. color: #3f8dfd;
  7792. line-height: 24px;
  7793. margin-right: 20px;
  7794. }
  7795. .del {
  7796. float: right;
  7797. cursor: pointer;
  7798. font-size: 14px;
  7799. font-family: Microsoft YaHei;
  7800. font-weight: 400;
  7801. color: #fa8c16;
  7802. line-height: 24px;
  7803. margin-right: 20px;
  7804. }
  7805. }
  7806. .reply-list {
  7807. margin: 20px 0;
  7808. width: 100%;
  7809. background-color: #2f3236;
  7810. border-radius: 8px;
  7811. padding: 0 0 0 20px;
  7812. &__item {
  7813. padding: 20px 0;
  7814. display: flex;
  7815. border-bottom: 1px solid #555555;
  7816. &:nth-last-of-type(1) {
  7817. border: 0;
  7818. }
  7819. &__avatar {
  7820. width: 40px;
  7821. height: 40px;
  7822. display: table-cell;
  7823. border-radius: 50%;
  7824. text-align: center;
  7825. border-radius: 50%;
  7826. overflow: hidden;
  7827. img {
  7828. display: inline-block;
  7829. vertical-align: middle;
  7830. max-width: 100%;
  7831. max-height: 100%;
  7832. }
  7833. }
  7834. &__content {
  7835. border-radius: 8px;
  7836. flex: 1;
  7837. margin-left: 10px;
  7838. .nickname {
  7839. font-size: 14px;
  7840. font-family: Microsoft YaHei;
  7841. font-weight: bold;
  7842. color: #f5f5f5;
  7843. line-height: 24px;
  7844. }
  7845. .desc {
  7846. font-size: 14px;
  7847. font-family: Microsoft YaHei;
  7848. font-weight: 400;
  7849. color: #666666;
  7850. line-height: 24px;
  7851. }
  7852. .time {
  7853. font-size: 14px;
  7854. font-family: Microsoft YaHei;
  7855. font-weight: 400;
  7856. color: #999999;
  7857. line-height: 24px;
  7858. .reply {
  7859. float: right;
  7860. font-size: 14px;
  7861. font-family: Microsoft YaHei;
  7862. font-weight: 400;
  7863. color: #3f8dfd;
  7864. line-height: 24px;
  7865. margin-right: 20px;
  7866. cursor: pointer;
  7867. user-select: none;
  7868. }
  7869. .del {
  7870. cursor: pointer;
  7871. margin-right: 20px;
  7872. float: right;
  7873. font-size: 14px;
  7874. font-family: Microsoft YaHei;
  7875. font-weight: 400;
  7876. color: #ff3b30;
  7877. line-height: 24px;
  7878. }
  7879. }
  7880. }
  7881. }
  7882. }
  7883. }
  7884. }
  7885. }
  7886. }
  7887. }
  7888. .lecture-notes {
  7889. &::-webkit-scrollbar {
  7890. display: none;
  7891. }
  7892. max-height: 416px;
  7893. overflow-y: auto;
  7894. padding: 16px;
  7895. background: rgb(63, 68, 73);
  7896. &__content {
  7897. .left-boxs {
  7898. // float: left;
  7899. // width: 462px;
  7900. .textarea {
  7901. border-bottom: 1px solid #555555;
  7902. .submit {
  7903. padding: 10px 20px;
  7904. border-radius: 2px;
  7905. text-align: center;
  7906. font-size: 16px;
  7907. margin: 10px 0;
  7908. float: right;
  7909. }
  7910. }
  7911. .note-list {
  7912. &__content {
  7913. border-bottom: 1px solid #555555;
  7914. &__title {
  7915. width: 216px;
  7916. height: 24px;
  7917. background: #ccc;
  7918. border-radius: 24px;
  7919. font-size: 14px;
  7920. color: #666666;
  7921. text-align: center;
  7922. line-height: 24px;
  7923. margin: 20px 0;
  7924. }
  7925. }
  7926. &__item {
  7927. display: flex;
  7928. padding: 15px;
  7929. .el-icon-video-play {
  7930. cursor: pointer;
  7931. font-size: 20px;
  7932. color: #3f8dfd;
  7933. }
  7934. &__content {
  7935. flex: 1;
  7936. margin-left: 10px;
  7937. .title {
  7938. cursor: pointer;
  7939. font-size: 14px;
  7940. font-family: Microsoft YaHei;
  7941. font-weight: bold;
  7942. color: #3f8dfd;
  7943. line-height: 24px;
  7944. }
  7945. .desc {
  7946. font-size: 14px;
  7947. font-family: Microsoft YaHei;
  7948. font-weight: 400;
  7949. color: #666666;
  7950. line-height: 24px;
  7951. }
  7952. .time {
  7953. font-size: 14px;
  7954. font-family: Microsoft YaHei;
  7955. font-weight: 400;
  7956. color: #999999;
  7957. line-height: 24px;
  7958. }
  7959. }
  7960. }
  7961. }
  7962. .pagination {
  7963. margin-top: 30px;
  7964. text-align: center;
  7965. }
  7966. }
  7967. .right-box {
  7968. width: 786px;
  7969. float: right;
  7970. .lecture-list {
  7971. background: #f5f7fa;
  7972. border-radius: 8px;
  7973. &__header {
  7974. padding: 0 16px;
  7975. height: 40px;
  7976. line-height: 40px;
  7977. font-size: 18px;
  7978. font-family: Microsoft YaHei;
  7979. font-weight: bold;
  7980. color: #333333;
  7981. .slide-btn {
  7982. cursor: pointer;
  7983. float: right;
  7984. font-size: 14px;
  7985. font-family: Microsoft YaHei;
  7986. font-weight: 400;
  7987. color: #999999;
  7988. }
  7989. }
  7990. &__body {
  7991. .list {
  7992. &__item {
  7993. border-top: 1px solid #fff;
  7994. padding: 0 8px 0 16px;
  7995. height: 56px;
  7996. line-height: 55px;
  7997. display: flex;
  7998. align-items: center;
  7999. .title {
  8000. flex: 1;
  8001. font-size: 16px;
  8002. font-family: Microsoft YaHei;
  8003. font-weight: 400;
  8004. color: #333333;
  8005. }
  8006. .btns {
  8007. .btn {
  8008. cursor: pointer;
  8009. display: inline-block;
  8010. vertical-align: middle;
  8011. width: 80px;
  8012. height: 32px;
  8013. background: #ffffff;
  8014. border: 1px solid #3f8dfd;
  8015. border-radius: 16px;
  8016. text-align: center;
  8017. line-height: 30px;
  8018. color: #3f8dfd;
  8019. margin: 0 8px;
  8020. }
  8021. }
  8022. }
  8023. }
  8024. }
  8025. &__footer {
  8026. margin-top: 24px;
  8027. .lecture-scan {
  8028. background: #f5f7fa;
  8029. border-radius: 8px;
  8030. overflow: hidden;
  8031. &__header {
  8032. height: 40px;
  8033. line-height: 40px;
  8034. padding: 0 16px;
  8035. font-size: 16px;
  8036. font-family: Microsoft YaHei;
  8037. font-weight: bold;
  8038. color: #333333;
  8039. }
  8040. &__body {
  8041. height: 800px;
  8042. text-align: center;
  8043. overflow-y: scroll;
  8044. .iframe {
  8045. width: 100%;
  8046. }
  8047. }
  8048. }
  8049. }
  8050. }
  8051. }
  8052. }
  8053. }
  8054. .user_notes {
  8055. border-bottom: 1px solid #555;
  8056. .p1 {
  8057. margin: 8px 0px;
  8058. color: #3f8dfd;
  8059. font-size: 14px;
  8060. span {
  8061. float: right;
  8062. color: #999;
  8063. font-size: 12px;
  8064. }
  8065. }
  8066. .p2 {
  8067. margin-bottom: 8px;
  8068. font-size: 14px;
  8069. color: #ccc;
  8070. }
  8071. }
  8072. /deep/ textarea {
  8073. background: #65696d;
  8074. color: #c7c7c7;
  8075. border-color: transparent;
  8076. }
  8077. /deep/ .el-input__count {
  8078. color: #999;
  8079. background: transparent;
  8080. }
  8081. .lecture-notesjy {
  8082. display: flex;
  8083. flex-direction: column;
  8084. max-height: 416px;
  8085. .listItem {
  8086. padding-bottom: 14px;
  8087. margin-bottom: 10px;
  8088. border-bottom: 1px solid #eee;
  8089. .titles {
  8090. color: #fff;
  8091. font-weight: bold;
  8092. text-align: center;
  8093. padding: 10px;
  8094. }
  8095. .btns {
  8096. display: flex;
  8097. justify-content: space-around;
  8098. align-items: center;
  8099. .btn {
  8100. border-radius: 8px;
  8101. background-color: #fff;
  8102. padding: 6px 16px;
  8103. user-select: none;
  8104. cursor: pointer;
  8105. transition: all 0.2s;
  8106. &:hover {
  8107. background-color: #f2f7ff;
  8108. color: #3f8dfd;
  8109. }
  8110. }
  8111. }
  8112. }
  8113. .lecture-listFooter {
  8114. flex: 1;
  8115. overflow: auto;
  8116. }
  8117. }
  8118. .topstyle {
  8119. border-bottom: 2px solid #eee;
  8120. margin-bottom: 16px;
  8121. p {
  8122. background-color: #f8f8f9;
  8123. font-size: 14px;
  8124. color: #3f8dfd;
  8125. padding: 5px 12px;
  8126. }
  8127. }
  8128. .height_style {
  8129. max-height: 600px;
  8130. overflow-y: auto;
  8131. }
  8132. .list_style {
  8133. height: 60px;
  8134. color: #222;
  8135. line-height: 58px;
  8136. padding: 0px 16px;
  8137. cursor: pointer;
  8138. transition: all 0.2s;
  8139. &:hover {
  8140. background-color: rgba(63, 141, 253, 0.3) !important;
  8141. }
  8142. }
  8143. .list_styleHeader {
  8144. height: 60px;
  8145. color: #3f8dfd;
  8146. line-height: 58px;
  8147. padding: 0px 16px;
  8148. }
  8149. </style>