index.vue 305 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494
  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. console.log(section.parent,'section.parent')
  5023. let num = await this.bankRecordDoNum(section);
  5024. //有次数限制
  5025. if (section.answerNum - num > 0 && section.answerNum > 0) {
  5026. // this.$set(this.list[index],'doNum',(item.doNum+1))
  5027. this.$router.push({
  5028. path: "/course-exam/" + this.goodsId,
  5029. query: {
  5030. courseId: this.courseId,
  5031. gradeId: this.gradeId,
  5032. moduleId: section.moduleId || 0,
  5033. examId: section.typeId,
  5034. chapterId: section.chapterId || 0,
  5035. orderGoodsId: this.orderGoodsId,
  5036. },
  5037. });
  5038. //没有答题次数限制
  5039. } else if (section.answerNum == 0) {
  5040. this.$router.push({
  5041. path: "/course-exam/" + this.goodsId,
  5042. query: {
  5043. courseId: this.courseId,
  5044. gradeId: this.gradeId,
  5045. moduleId: section.moduleId || 0,
  5046. examId: section.typeId,
  5047. chapterId: section.chapterId || 0,
  5048. orderGoodsId: this.orderGoodsId,
  5049. },
  5050. });
  5051. } else {
  5052. this.$message({
  5053. type: "warning",
  5054. message: "该试卷只能答题" + section.answerNum + "次",
  5055. });
  5056. return;
  5057. }
  5058. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5059. } else {
  5060. this.$message({
  5061. type: "warning",
  5062. message: "请按顺序学完视频课程再进行练习和测试",
  5063. });
  5064. }
  5065. } else if (
  5066. this.businessData.goodsLearningOrder == 2 &&
  5067. !section.rebuild
  5068. ) {
  5069. let rows = await this.studyRecordMenuAllList();
  5070. let isStop = false;
  5071. let newRows = [];
  5072. for (let i = 0; i < rows.length; i++) {
  5073. let moduleTrue = rows[i].moduleId == section.moduleId;
  5074. let chapterTrue = rows[i].chapterId == section.chapterId;
  5075. if (moduleTrue && chapterTrue) {
  5076. isStop = true;
  5077. if (rows[i].sectionType != 2) {
  5078. //忽略直播
  5079. newRows.push(rows[i]);
  5080. }
  5081. } else {
  5082. if (!isStop) {
  5083. if (rows[i].sectionType != 2) {
  5084. //忽略直播
  5085. newRows.push(rows[i]);
  5086. }
  5087. } else {
  5088. break;
  5089. }
  5090. }
  5091. }
  5092. console.log(newRows);
  5093. let isAllLearn = newRows.every((item) => {
  5094. return item.studyStatus == 1;
  5095. });
  5096. if (isAllLearn) {
  5097. //之前的都学完了
  5098. // if(canLearn) { //视频的上一节学完
  5099. let num = await this.bankRecordDoNum(section.typeId);
  5100. //有次数限制
  5101. if (section.answerNum - num > 0 && section.answerNum > 0) {
  5102. console.log(this.list[index]);
  5103. this.$router.push({
  5104. path: "/course-exam/" + this.goodsId,
  5105. query: {
  5106. courseId: this.courseId,
  5107. gradeId: this.gradeId,
  5108. moduleId: section.moduleId || 0,
  5109. examId: section.typeId,
  5110. chapterId: section.chapterId || 0,
  5111. orderGoodsId: this.orderGoodsId,
  5112. },
  5113. });
  5114. //没有答题次数限制
  5115. } else if (section.answerNum == 0) {
  5116. this.$router.push({
  5117. path: "/course-exam/" + this.goodsId,
  5118. query: {
  5119. courseId: this.courseId,
  5120. gradeId: this.gradeId,
  5121. moduleId: section.moduleId || 0,
  5122. examId: section.typeId,
  5123. chapterId: section.chapterId || 0,
  5124. orderGoodsId: this.orderGoodsId,
  5125. },
  5126. });
  5127. } else {
  5128. this.$message({
  5129. type: "warning",
  5130. message: "该试卷只能答题" + section.answerNum + "次",
  5131. });
  5132. return;
  5133. }
  5134. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5135. } else {
  5136. this.$message({
  5137. type: "warning",
  5138. message: "请学完视频课程再进行练习和测试",
  5139. });
  5140. }
  5141. } else {
  5142. let num = await this.bankRecordDoNum(section.typeId);
  5143. //有次数限制
  5144. if (section.answerNum - section.doNum > 0 && section.answerNum > 0) {
  5145. // this.$set(this.list[index],'doNum',(item.doNum+1))
  5146. this.$router.push({
  5147. path: "/course-exam/" + this.goodsId,
  5148. query: {
  5149. courseId: this.courseId,
  5150. gradeId: this.gradeId,
  5151. moduleId: section.moduleId || 0,
  5152. examId: section.typeId,
  5153. chapterId: section.chapterId || 0,
  5154. orderGoodsId: this.orderGoodsId,
  5155. },
  5156. });
  5157. //没有答题次数限制
  5158. } else if (section.answerNum == 0) {
  5159. this.$router.push({
  5160. path: "/course-exam/" + this.goodsId,
  5161. query: {
  5162. courseId: this.courseId,
  5163. gradeId: this.gradeId,
  5164. moduleId: section.moduleId || 0,
  5165. examId: section.typeId,
  5166. chapterId: section.chapterId || 0,
  5167. orderGoodsId: this.orderGoodsId,
  5168. },
  5169. });
  5170. } else {
  5171. this.$message({
  5172. type: "warning",
  5173. message: "该试卷只能答题" + section.answerNum + "次",
  5174. });
  5175. return;
  5176. }
  5177. this.studyLog(section.moduleId = 0, section.chapterId = 0, section.typeId)
  5178. }
  5179. return;
  5180. }
  5181. if (section.type != 2) {
  5182. if (this.clickLock) {
  5183. return;
  5184. }
  5185. this.clickLock = true;
  5186. if (
  5187. this.playSectionId &&
  5188. (this.playSectionId == section.sectionId ||
  5189. this.playSectionId == section.menuId) &&
  5190. this.moduleId == (section.moduleId || 0) &&
  5191. this.chapterId == (section.chapterId || 0)
  5192. ) {
  5193. //切换为同一频道不作为
  5194. console.log('切换为同一频道不作为')
  5195. this.clickLock = false;
  5196. return;
  5197. }
  5198. if (this.businessData.goodsLearningOrder == 2 && !section.isRebuild) {
  5199. //要按从头到尾顺序学习, 且不是重修课程
  5200. let rows = await this.studyRecordMenuAllList();
  5201. if (!this.hasPreItem(rows, section)) {
  5202. //判断是否有上一节
  5203. let newRows = [];
  5204. for (let i = 0; i < rows.length; i++) {
  5205. let moduleTrue =
  5206. rows[i].moduleId == section.moduleId || rows[i].moduleId == 0;
  5207. let chapterTrue =
  5208. rows[i].chapterId == section.chapterId ||
  5209. rows[i].chapterId == 0;
  5210. let sectionTrue =
  5211. rows[i].sectionId == section.sectionId ||
  5212. rows[i].sectionId == section.menuId;
  5213. if (moduleTrue && chapterTrue && sectionTrue) {
  5214. break;
  5215. } else {
  5216. if (rows[i].sectionType != 2) {
  5217. newRows.push(rows[i]);
  5218. }
  5219. }
  5220. }
  5221. let isAllLearn = newRows.every((item) => {
  5222. return item.studyStatus == 1;
  5223. });
  5224. if (isAllLearn) {
  5225. this.initVideo(section);
  5226. } else {
  5227. this.clickLock = false;
  5228. this.$message({
  5229. type: "warning",
  5230. message: "请按顺序学习视频课程",
  5231. });
  5232. }
  5233. } else {
  5234. console.log(section,"sectionsectionsectionsectionsectionsection")
  5235. //第一章第一节
  5236. this.initVideo(section);
  5237. }
  5238. } else {
  5239. console.log(section,"sectionsection")
  5240. this.initVideo(section);
  5241. }
  5242. }
  5243. },
  5244. bankRecordDoNum(section) {
  5245. return new Promise((resolve) => {
  5246. this.$request
  5247. .bankRecordDoNum({
  5248. goodsId: this.goodsId,
  5249. gradeId: this.gradeId,
  5250. chapterId: section.chapterId,
  5251. courseId: this.courseId,
  5252. moduleId: 0,
  5253. examId: section.typeId,
  5254. })
  5255. .then((res) => {
  5256. resolve(res.data);
  5257. });
  5258. });
  5259. },
  5260. /**
  5261. * 是否有上一章节
  5262. */
  5263. hasPreItem(rows, option) {
  5264. let moduleId = option.moduleId;
  5265. let chapterId = option.chapterId;
  5266. let sectionId = option.sectionId;
  5267. let index = 0;
  5268. for (let i = 0; i < rows.length; i++) {
  5269. if (
  5270. rows[i].moduleId == moduleId &&
  5271. rows[i].chapterId == chapterId &&
  5272. rows[i].sectionId == sectionId
  5273. ) {
  5274. index = i;
  5275. break;
  5276. }
  5277. }
  5278. if (index == 0) {
  5279. return false;
  5280. } else {
  5281. return true;
  5282. }
  5283. },
  5284. async initVideo(option) {
  5285. if (option.sectionType == 1 || option.sectionType == 3) {
  5286. //录播
  5287. let learnNum = await this.goodsTodayStudySectionNum(option);
  5288. let hasLearn = await this.gradeCheckGoodsStudy(option);
  5289. console.log(hasLearn, "hasLearn");
  5290. console.log(learnNum, "learnNum");
  5291. console.log(
  5292. this.goodsData.sectionMaxNum,
  5293. "this.goodsData.sectionMaxNum"
  5294. );
  5295. if (this.goodsData.sectionMaxNum > 0) {
  5296. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5297. this.clickLock = false;
  5298. this.$message({
  5299. type: "warning",
  5300. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5301. });
  5302. return;
  5303. }
  5304. }
  5305. if (!option.recordingUrl) {
  5306. this.clickLock = false;
  5307. this.$message({
  5308. type: "warning",
  5309. message: `暂无播放地址数据`,
  5310. });
  5311. return;
  5312. }
  5313. if (this.playSectionId > 0) {
  5314. //切换视频
  5315. // let oldSectionId = this.playSectionId;
  5316. // uni.$emit("changeSection", oldSectionId);
  5317. }
  5318. this.playVideo(option);
  5319. }
  5320. if (option.sectionType == 2) {
  5321. //直播
  5322. let learnNum = await this.goodsTodayStudySectionNum(option);
  5323. let hasLearn = await this.gradeCheckGoodsStudy(option);
  5324. if (this.goodsData.sectionMaxNum > 0) {
  5325. if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
  5326. this.clickLock = false;
  5327. this.$message({
  5328. type: "warning",
  5329. message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
  5330. });
  5331. return;
  5332. }
  5333. }
  5334. if (!option.liveUrl) {
  5335. this.clickLock = false;
  5336. this.$message({
  5337. type: "warning",
  5338. message: `暂无直播地址数据`,
  5339. });
  5340. }
  5341. let data = await this.studyRecordGetChannelBasicInfo(option.liveUrl);
  5342. if (data.watchStatus == "end" || data.watchStatus == "playback") {
  5343. this.clickLock = false;
  5344. this.$message({
  5345. type: "warning",
  5346. message: `直播已结束`,
  5347. });
  5348. return;
  5349. }
  5350. if (data.watchStatus == "waiting") {
  5351. this.clickLock = false;
  5352. this.$message({
  5353. type: "warning",
  5354. message: `直播未开始`,
  5355. });
  5356. return;
  5357. }
  5358. this.playVideo(option);
  5359. }
  5360. return;
  5361. },
  5362. studyRecordGetChannelBasicInfo(channelId) {
  5363. return new Promise((resolve) => {
  5364. this.$request
  5365. .studyRecordGetChannelBasicInfo({
  5366. channelId,
  5367. })
  5368. .then((res) => {
  5369. console.log(res, "channel");
  5370. resolve(res.data);
  5371. }).catch(err => {
  5372. this.clickLock = false;
  5373. this.$message.error(err.msg)
  5374. })
  5375. });
  5376. },
  5377. /**
  5378. * 判断是否是当前播放的节
  5379. */
  5380. isActive(section) {
  5381. let moduleId = section.moduleId || 0;
  5382. let chapterId = section.chapterId || 0;
  5383. let sectionId = section.sectionId || section.menuId;
  5384. if (
  5385. moduleId == this.moduleId &&
  5386. chapterId == this.chapterId &&
  5387. sectionId == this.playSectionId
  5388. ) {
  5389. return true;
  5390. } else {
  5391. return false;
  5392. }
  5393. },
  5394. async playVideo(option) {
  5395. console.log('asdhsuohfosufgasoug', option)
  5396. if (option.sectionType == 3) {
  5397. console.log('huifang')
  5398. // 回放
  5399. if (Object.keys(this.clickSectionItem).length) { //this.clickSectionItem 判断点击节才跳转, 不判断的话一进来页面到这里就直接跳转了
  5400. this.$router.push({
  5401. path: "/living-room/" + option.liveUrl,
  5402. query: {
  5403. goodsId: this.goodsId,
  5404. courseId: this.courseId,
  5405. gradeId: this.gradeId,
  5406. orderGoodsId: this.orderGoodsId,
  5407. sectionId: option.sectionId || option.menuId,
  5408. chapterId: option.chapterId || 0,
  5409. moduleId: option.moduleId || 0,
  5410. sectionType: 3,
  5411. goodsName: option.name,
  5412. vid: option.recordingUrl, // 回放vid
  5413. }
  5414. })
  5415. this.clickSectionItem = {}
  5416. return
  5417. }
  5418. }
  5419. if (option.sectionType == 1) {
  5420. console.log('lubo点击点击点击点击')
  5421. //录播
  5422. //设置播放的节ID
  5423. //提交保存观看历史
  5424. if (this.playSectionId) {
  5425. this.postStudyRecord(0, this.playSectionId);
  5426. }
  5427. this.player &&
  5428. this.player.HTML5.video.removeEventListener(
  5429. "timeupdate",
  5430. this.timeEvent
  5431. );
  5432. //播放视频
  5433. this.showRecordStatus = false; //隐藏播放记录提示
  5434. this.sectionItem = option;
  5435. console.log(option, "option=======>sectionItem");
  5436. this.isPlayRebuild = option.rebuild;
  5437. this.moduleId = option.moduleId || 0;
  5438. this.chapterId = option.chapterId || 0;
  5439. this.playSectionId = option.sectionId || option.menuId;
  5440. // console.log(this.moduleId, this.chapterId, this.playSectionId);
  5441. await this.getPhotoLastRecord();
  5442. this.recordObj = await this.getRecordLast();
  5443. this.getNoteList();
  5444. await this.clears();
  5445. this.vid = option.recordingUrl;
  5446. this.historyChatMsgList = [];
  5447. if (option.sectionType == 3) {
  5448. this.polyvLiveHistoryChatMsgList();
  5449. }
  5450. this.loadPlayerScript(this.loadPlayer);
  5451. setTimeout(() => {
  5452. this.clickLock = false;
  5453. }, 3000);
  5454. this.studyLog(this.moduleId, this.chapterId, this.playSectionId)
  5455. // uni.$emit("levelId", this.levelId);
  5456. // uni.$emit("getSection", this.menuItem);
  5457. // uni.$emit("isRebuild", this.isRebuild);
  5458. }
  5459. if (option.sectionType == 2) {
  5460. //直播
  5461. //提交保存观看历史
  5462. if (this.playSectionId) {
  5463. this.postStudyRecord(0, this.playSectionId);
  5464. }
  5465. this.player &&
  5466. this.player.HTML5.video.removeEventListener(
  5467. "timeupdate",
  5468. this.timeEvent
  5469. );
  5470. //播放视频
  5471. this.showRecordStatus = false; //隐藏播放记录提示
  5472. this.sectionItem = option;
  5473. console.log(option, "option");
  5474. this.isPlayRebuild = option.rebuild;
  5475. this.moduleId = option.moduleId || 0;
  5476. this.chapterId = option.chapterId || 0;
  5477. this.playSectionId = option.sectionId || option.menuId;
  5478. // console.log(this.moduleId, this.chapterId, this.playSectionId);
  5479. await this.getPhotoLastRecord();
  5480. this.recordObj = await this.getRecordLast();
  5481. this.getNoteList();
  5482. //设置播放的节ID
  5483. await this.clears();
  5484. this.vidzb = option.liveUrl;
  5485. this.$router.push({
  5486. path: "/living-room/" + option.liveUrl,
  5487. query: {
  5488. goodsId: this.goodsId,
  5489. courseId: this.courseId,
  5490. gradeId: this.gradeId,
  5491. orderGoodsId: this.orderGoodsId,
  5492. sectionId: option.sectionId || option.menuId,
  5493. chapterId: option.chapterId || 0,
  5494. moduleId: option.moduleId || 0,
  5495. sectionType: 2,
  5496. },
  5497. });
  5498. // this.loadPlayerScriptzb(this.loadPlayerzb);
  5499. // setTimeout(() => {
  5500. // this.clickLock = false;
  5501. // }, 3000);
  5502. }
  5503. },
  5504. gradeCheckGoodsStudy(option) {
  5505. return new Promise((resolve) => {
  5506. this.$request
  5507. .gradeCheckGoodsStudy({
  5508. goodsId: this.goodsId,
  5509. gradeId: this.gradeId,
  5510. moduleId: option.moduleId || 0,
  5511. chapterId: option.chapterId || 0,
  5512. sectionId: option.sectionId || option.menuId,
  5513. })
  5514. .then((res) => {
  5515. resolve(res.data);
  5516. });
  5517. });
  5518. },
  5519. goodsTodayStudySectionNum(option) {
  5520. return new Promise((resolve) => {
  5521. this.$request
  5522. .goodsTodayStudySectionNum({
  5523. goodsId: this.goodsId,
  5524. gradeId: this.gradeId,
  5525. })
  5526. .then((res) => {
  5527. resolve(res.data);
  5528. });
  5529. });
  5530. },
  5531. studyRecordMenuAllList() {
  5532. return new Promise((resolve) => {
  5533. this.$request
  5534. .studyRecordMenuAllList({
  5535. courseId: this.courseId,
  5536. gradeId: this.gradeId,
  5537. goodsId: this.goodsId,
  5538. })
  5539. .then((res) => {
  5540. resolve(res.data);
  5541. });
  5542. });
  5543. },
  5544. loadPlayerzb() {
  5545. var self = this;
  5546. const polyvLivePlayer = window.polyvLivePlayer;
  5547. this.playerzb = polyvLivePlayer({
  5548. wrap: "#playerzb",
  5549. width: 810,
  5550. height: 455,
  5551. showLine: "off",
  5552. uid: this.uidzb,
  5553. vid: this.vidzb,
  5554. });
  5555. this.playerzb.on("s2j_onStartPlay", () => {
  5556. console.log("s2j_onStartPlay");
  5557. this.hasStart = true;
  5558. this.livingTimer = setInterval(self.timeEventLiving, 1000);
  5559. });
  5560. this.playerzb.on("s2j_onOver", () => {
  5561. console.log("s2j_onOver");
  5562. clearInterval(this.livingTimer);
  5563. this.hasStart = false;
  5564. this.$message({
  5565. type: "success",
  5566. message: "播放完毕",
  5567. });
  5568. this.postStudyRecord(1);
  5569. });
  5570. },
  5571. // 播放视频
  5572. loadPlayer() {
  5573. var self = this;
  5574. const polyvPlayer = window.polyvPlayer;
  5575. console.log(polyvPlayer);
  5576. self.$request.obtainpolyvvideosign(self.vid).then((res) => {
  5577. console.log(res, "res2");
  5578. self.player = polyvPlayer({
  5579. wrap: "#player",
  5580. width: 810,
  5581. showLine: "off",
  5582. height: 455,
  5583. ban_history_time: "on",
  5584. vid: self.vid,
  5585. autoplay: this.autoplay,
  5586. ban_seek: this.isAllowSeek,
  5587. speed: this.playbackRate,
  5588. teaser_show: 1,
  5589. tail_show: 1,
  5590. hideSwitchPlayer: true,
  5591. watchStartTime: this.recordObj.videoCurrentTime,
  5592. ts: res.data.ts,
  5593. sign: res.data.sign,
  5594. // adMatter: [
  5595. // {
  5596. // // 广告参数详细配置
  5597. // location: 1, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
  5598. // adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
  5599. // matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
  5600. // timesize: 5, //广告时长,单位:秒
  5601. // skipenabled: false, //是否显示跳过按钮
  5602. // },
  5603. // {
  5604. // // 广告参数详细配置
  5605. // location: 3, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
  5606. // adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
  5607. // matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
  5608. // timesize: 5, //广告时长,单位:秒
  5609. // skipenabled: false, //是否显示跳过按钮
  5610. // },
  5611. // ],
  5612. playsafe: function (vid, next) {
  5613. next();
  5614. },
  5615. });
  5616. this.player.HTML5.video.addEventListener("timeupdate", self.timeEvent);
  5617. this.player.on("s2j_onPlayStart", () => {
  5618. //开始播放每5秒提交一次观看时间
  5619. this.hasStart = true;
  5620. clearInterval(this.postTimer);
  5621. this.postTimer = setInterval(() => {
  5622. this.postStudyRecord(0, this.playSectionId, 5);
  5623. }, 5000);
  5624. if (this.recordObj.videoCurrentTime) {
  5625. this.showRecordStatus = true;
  5626. setTimeout(() => {
  5627. this.showRecordStatus = false;
  5628. }, 5000);
  5629. } else {
  5630. //新视频直接提交一条观看记录
  5631. // this.postStudyRecord(0);
  5632. this.showRecordStatus = false;
  5633. }
  5634. });
  5635. this.player.on("s2j_onVideoPause", () => {
  5636. clearInterval(this.postTimer);
  5637. });
  5638. this.player.on("s2j_onVideoPlay", () => {
  5639. if (this.postTimer) {
  5640. this.postTimer = setInterval(() => {
  5641. this.postStudyRecord(0, this.playSectionId, 5);
  5642. }, 5000);
  5643. }
  5644. });
  5645. this.player.on("s2j_onPlayOver", () => {
  5646. this.hasStart = false;
  5647. clearInterval(this.postTimer);
  5648. this.$message({
  5649. type: "success",
  5650. message: "播放完毕",
  5651. });
  5652. this.postStudyRecord(1);
  5653. });
  5654. });
  5655. },
  5656. timeEventLiving() {
  5657. var polyvPlayerContext = this.playerzb;
  5658. if (polyvPlayerContext) {
  5659. this.liveDuration = this.liveDuration + 1; //每隔1秒
  5660. console.log(this.liveDuration);
  5661. if (this.liveDuration == 2) {
  5662. //直播第2秒拍照
  5663. if (
  5664. this.goodsPhotographConfig &&
  5665. this.goodsPhotographConfig.livephotograph == 1 &&
  5666. this.sectionItem.learning != 1 &&
  5667. this.photoHistoryList.length == 0
  5668. ) {
  5669. //开启直播拍照
  5670. polyvPlayerContext.j2s_pauseVideo();
  5671. this.openPhoto();
  5672. } else {
  5673. this.postStudyRecord();
  5674. }
  5675. }
  5676. }
  5677. },
  5678. timeEvent() {
  5679. let self = this;
  5680. var polyvPlayerContext = this.player;
  5681. if (polyvPlayerContext) {
  5682. this.playTime = polyvPlayerContext.j2s_getCurrentTime(); //播放时刻
  5683. // console.log(this.playTime,789,this.photoHistoryList)
  5684. //判断是否需要拍照
  5685. if (this.photoNum > 0) {
  5686. this.configPhoto();
  5687. let photoTime = 0; //获取拍照秒数
  5688. for (let i = 0; i < this.photoList.length; i++) {
  5689. photoTime = Number(this.photoList[i]); //获取拍照秒数
  5690. if (photoTime < this.playTime && photoTime > this.playTime - 8) {
  5691. //3秒区间内才触发拍照,避免拉动滚动条
  5692. if (
  5693. this.photoHistoryList.indexOf(i) < 0 &&
  5694. this.sectionItem.learning != 1
  5695. ) {
  5696. //不存在拍照历史,没有重修过,没有学过,则拍照
  5697. //启动拍照
  5698. //暂停
  5699. polyvPlayerContext.j2s_pauseVideo();
  5700. this.photoIndex = i;
  5701. this.openPhoto();
  5702. } else {
  5703. }
  5704. }
  5705. }
  5706. }
  5707. }
  5708. },
  5709. getPhotoLastRecord() {
  5710. return new Promise((resolve) => {
  5711. let self = this;
  5712. let data = {
  5713. sectionId: parseInt(self.playSectionId),
  5714. goodsId: parseInt(self.goodsId),
  5715. courseId: parseInt(self.courseId),
  5716. gradeId: self.gradeId,
  5717. chapterId: parseInt(self.chapterId),
  5718. moduleId: parseInt(self.moduleId),
  5719. };
  5720. this.$request.getPhotoLastRecord(data).then((res) => {
  5721. //清空历史数据
  5722. self.photoHistoryList = [];
  5723. this.photoIndex = 0;
  5724. self.photoList = [];
  5725. for (let i = 0; i < res.data.length; i++) {
  5726. //-2存储随机拍照数组
  5727. if (res.data[i].photoIndex == -2 && res.data[i].timeInterval) {
  5728. self.photoList = res.data[i].timeInterval.split(",");
  5729. } else {
  5730. self.photoHistoryList.push(res.data[i].photoIndex);
  5731. }
  5732. }
  5733. resolve();
  5734. });
  5735. });
  5736. },
  5737. //拍照
  5738. openPhoto() {
  5739. var polyvPlayerContext = this.player;
  5740. if (polyvPlayerContext) {
  5741. if (this.isFullScreen()) {
  5742. this.exitFullscreen();
  5743. }
  5744. }
  5745. var polyvPlayerContext = this.playerzb;
  5746. if (polyvPlayerContext) {
  5747. if (this.isFullScreen()) {
  5748. this.exitFullscreen();
  5749. }
  5750. }
  5751. this.$nextTick(() => {
  5752. if (
  5753. (window.navigator.mediaDevices &&
  5754. window.navigator.mediaDevices.getUserMedia) ||
  5755. window.navigator.getUserMedia ||
  5756. window.navigator.webkitGetUserMedia ||
  5757. window.navigator.mozGetUserMedia
  5758. ) {
  5759. console.log(this.getUserMedia, "getUserMedia");
  5760. // 调用用户媒体设备, 访问摄像头
  5761. this.getUserMedia(
  5762. {
  5763. video: {
  5764. width: 400,
  5765. height: 300,
  5766. },
  5767. },
  5768. this.photographSuccess,
  5769. this.photographError
  5770. );
  5771. } else {
  5772. this.photographError();
  5773. }
  5774. });
  5775. },
  5776. /**
  5777. * 退出全屏
  5778. */
  5779. exitFullscreen() {
  5780. try {
  5781. var de = document;
  5782. console.log(de);
  5783. if (de.exitFullscreen) {
  5784. de.exitFullscreen();
  5785. } else if (de.mozCancelFullScreen) {
  5786. de.mozCancelFullScreen();
  5787. } else if (de.webkitCancelFullScreen) {
  5788. de.webkitCancelFullScreen();
  5789. }
  5790. } catch (err) {}
  5791. },
  5792. fullele() {
  5793. return (
  5794. document.fullscreenElement ||
  5795. document.webkitFullscreenElement ||
  5796. document.msFullscreenElement ||
  5797. document.mozFullScreenElement ||
  5798. null
  5799. );
  5800. },
  5801. //判断是否全屏
  5802. isFullScreen() {
  5803. return !!(document.webkitIsFullScreen || this.fullele());
  5804. },
  5805. //配置随机拍照时间
  5806. configPhoto() {
  5807. var polyvPlayerContext = this.player;
  5808. let totalVideoTime = polyvPlayerContext.j2s_getDuration();
  5809. let duration = polyvPlayerContext.j2s_getCurrentTime();
  5810. let photoNum = this.photoNum;
  5811. if (!this.photoConfig) {
  5812. this.photoConfig = true;
  5813. //没有历史拍照间隔数据
  5814. if (this.photoList.length == 0) {
  5815. if (totalVideoTime >= 900) {
  5816. //大于15分钟
  5817. if (photoNum == 1) {
  5818. //开头拍1张
  5819. this.photoList.push(1);
  5820. } else if (photoNum == 3) {
  5821. //拍3张
  5822. this.photoList.push(0); //开头拍一张
  5823. let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
  5824. let centerMinTime = centerTime - 300; //前后5分钟
  5825. let centerMaxTime = centerTime + 300;
  5826. let centerTakeTime = this.randomNum(centerMinTime, centerMaxTime);
  5827. this.photoList.push(centerTakeTime); //中间拍一张
  5828. let endMaxTime = totalVideoTime - 60;
  5829. let endMinTime = totalVideoTime - 300;
  5830. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  5831. this.photoList.push(endTakeTime); //最后拍一张
  5832. }
  5833. } else {
  5834. //小于15分钟,只拍前后各一张
  5835. if (photoNum == 1) {
  5836. //开头拍1张
  5837. this.photoList.push(1);
  5838. } else if (photoNum == 3) {
  5839. //拍2张
  5840. if (totalVideoTime <= 300) {
  5841. //小于5分钟
  5842. this.photoList.push(1); //开头拍一张
  5843. let endTakeTime = this.randomNum(10, totalVideoTime); //中间随机取一张
  5844. this.photoList.push(endTakeTime);
  5845. } else {
  5846. this.photoList.push(1); //开头拍一张
  5847. let endMaxTime = totalVideoTime - 60;
  5848. let endMinTime = totalVideoTime - 300;
  5849. let endTakeTime = this.randomNum(endMinTime, endMaxTime);
  5850. this.photoList.push(endTakeTime); //最后1-5分钟拍一张
  5851. }
  5852. }
  5853. }
  5854. console.log(this.photoList, "随机拍照时间数组11", photoNum);
  5855. this.postCoursePhotoRecord(true); //提交随机拍照时间数组
  5856. }
  5857. console.log(this.photoList, "随机拍照时间数组");
  5858. //兼容已有观看历史
  5859. for (let i = 0; i < this.photoList.length - 1; i++) {
  5860. if (
  5861. this.photoList[i] < duration &&
  5862. this.photoList[i + 1] > duration
  5863. ) {
  5864. this.photoIndex = i + 1;
  5865. // console.log("我的修改了photoIndex")
  5866. break;
  5867. }
  5868. if (duration > this.photoList[this.photoList.length - 1]) {
  5869. this.photoIndex = this.photoList.length - 1; //取最后一个下标
  5870. // console.log("我的修改了photoIndex")
  5871. break;
  5872. }
  5873. }
  5874. }
  5875. },
  5876. randomNum(minNum, maxNum) {
  5877. switch (arguments.length) {
  5878. case 1:
  5879. return parseInt(Math.random() * minNum + 1, 10);
  5880. break;
  5881. case 2:
  5882. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  5883. break;
  5884. default:
  5885. return 0;
  5886. break;
  5887. }
  5888. },
  5889. //postTime 只提交随机时间
  5890. postCoursePhotoRecord(postTime = false) {
  5891. return new Promise((resolve, reject) => {
  5892. let currentTime = 0;
  5893. var polyvPlayerContext = this.player;
  5894. if (polyvPlayerContext) {
  5895. currentTime = polyvPlayerContext.j2s_getCurrentTime();
  5896. }
  5897. let self = this;
  5898. let photoIndex = self.photoIndex;
  5899. let data = {
  5900. photo: self.ossAvatarUrl,
  5901. sectionId: parseInt(self.playSectionId),
  5902. goodsId: parseInt(self.goodsId),
  5903. courseId: parseInt(self.courseId),
  5904. photoTime: parseInt(currentTime > 0 ? currentTime : 0),
  5905. gradeId: parseInt(self.gradeId),
  5906. photoIndex: postTime ? -2 : parseInt(photoIndex), //从0算起,-2只提交随机时间
  5907. photoNum: parseInt(self.photoNum),
  5908. chapterId: parseInt(self.chapterId),
  5909. moduleId: parseInt(self.moduleId),
  5910. timeInterval: postTime ? self.photoList.join(",") : "",
  5911. };
  5912. console.log("提交接口", data);
  5913. this.$request
  5914. .coursePhotoRecord(data)
  5915. .then((res) => {
  5916. console.log(res, "res");
  5917. resolve();
  5918. })
  5919. .catch((err) => {
  5920. console.log(err, "err");
  5921. reject();
  5922. });
  5923. });
  5924. },
  5925. /**
  5926. * @param {String} 直播预览
  5927. */
  5928. loadPlayerScriptzb(callback) {
  5929. if (!window.polyvLivePlayer) {
  5930. const myScript = document.createElement("script");
  5931. myScript.setAttribute("src", this.playerJs);
  5932. myScript.onload = callback;
  5933. document.body.appendChild(myScript);
  5934. } else {
  5935. callback();
  5936. }
  5937. },
  5938. loadPlayerScript(callback) {
  5939. if (!window.polyvPlayer) {
  5940. const myScript = document.createElement("script");
  5941. myScript.setAttribute("src", this.vodPlayerJs);
  5942. myScript.onload = callback;
  5943. document.body.appendChild(myScript);
  5944. } else {
  5945. callback();
  5946. }
  5947. },
  5948. clears() {
  5949. return new Promise((resolve, reject) => {
  5950. this.vid = "";
  5951. this.vidzb = "";
  5952. if (this.player) {
  5953. this.player.destroy();
  5954. }
  5955. if (this.playerzb) {
  5956. this.playerzb.destroy();
  5957. }
  5958. resolve();
  5959. });
  5960. },
  5961. /**
  5962. * 提交观看记录
  5963. */
  5964. postStudyRecord(status = 0, sectionId = this.playSectionId) {
  5965. let currentTime = 0;
  5966. let PlayDuration = 0;
  5967. var polyvPlayerContext = this.player;
  5968. if (polyvPlayerContext) {
  5969. currentTime = polyvPlayerContext.j2s_getCurrentTime(); //当前视频播放时刻
  5970. PlayDuration = polyvPlayerContext.j2s_realPlayVideoTime(); //本次看的时长
  5971. }
  5972. if (this.vidzb) {
  5973. currentTime = 2; //直播无法获取,无论开始结束都传2秒
  5974. }
  5975. let self = this;
  5976. console.log(this);
  5977. console.log(PlayDuration, "PlayDuration");
  5978. let data = {
  5979. fromPlat: 2, //来源平台 1小程序 2网站
  5980. photo: self.ossAvatarUrl,
  5981. sectionId: parseInt(this.playSectionId),
  5982. goodsId: parseInt(this.goodsId),
  5983. courseId: parseInt(this.courseId),
  5984. studyDuration: parseInt(PlayDuration > 0 ? PlayDuration : 0),
  5985. gradeId: parseInt(this.gradeId),
  5986. chapterId: parseInt(this.chapterId),
  5987. moduleId: parseInt(this.moduleId),
  5988. videoCurrentTime: parseInt(currentTime > 0 ? currentTime : 0),
  5989. orderGoodsId: parseInt(this.orderGoodsId),
  5990. };
  5991. console.log(data, "data");
  5992. if (status > 0) {
  5993. data.status = status;
  5994. }
  5995. // /study/record 学习记录
  5996. this.$request
  5997. .studyRecord(data)
  5998. .then((res) => {
  5999. if (status > 0) {
  6000. //看完视频刷新父级列表
  6001. let rebuildObj = this.getSameObj(this.sectionItem);
  6002. this.refreshParentList(this.sectionItem, rebuildObj);
  6003. }
  6004. self.ossAvatarUrl = "";
  6005. })
  6006. .catch((err) => {
  6007. console.log(err);
  6008. this.$message({
  6009. type: "warning",
  6010. message: err.msg,
  6011. });
  6012. });
  6013. },
  6014. /**
  6015. * 获取重修列表中是否有相同对象
  6016. */
  6017. getSameObj(metaObj) {
  6018. console.log('看完视频后----', metaObj, this.reMenuList)
  6019. let newObj = false;
  6020. if (this.reMenuList.length) {
  6021. console.log(this.reMenuList, "this.reMenuList");
  6022. this.reMenuList.forEach((menu) => {
  6023. if (menu.type == 3) {
  6024. let isSame = this.contrast(metaObj, menu);
  6025. if (isSame) {
  6026. newObj = isSame;
  6027. }
  6028. } else {
  6029. if (menu.list && menu.list.length) {
  6030. menu.list.forEach((menuItem) => {
  6031. if (menuItem.type == 1) {
  6032. console.log(menuItem, metaObj);
  6033. let isSame = this.contrast(metaObj, menuItem);
  6034. if (isSame) {
  6035. newObj = isSame;
  6036. }
  6037. } else {
  6038. if (menuItem.list && menuItem.list.length) {
  6039. menuItem.list.forEach((menuChild) => {
  6040. if (menuChild.type == 1) {
  6041. let isSame = this.contrast(metaObj, menuChild);
  6042. if (isSame) {
  6043. newObj = isSame;
  6044. }
  6045. }
  6046. });
  6047. }
  6048. }
  6049. });
  6050. }
  6051. }
  6052. });
  6053. return newObj;
  6054. } else {
  6055. return false;
  6056. }
  6057. },
  6058. contrast(obj1, obj2) {
  6059. let moduleId1 = obj1.moduleId || 0;
  6060. let chapterId1 = obj1.chapterId || 0;
  6061. let sectionId1 = obj1.sectionId || obj1.menuId;
  6062. let moduleId2 = obj2.moduleId || 0;
  6063. let chapterId2 = obj2.chapterId || 0;
  6064. let sectionId2 = obj2.sectionId || obj2.menuId;
  6065. //转字符串后对比是否一致
  6066. return moduleId1 == moduleId2 &&
  6067. chapterId1 == chapterId2 &&
  6068. sectionId1 == sectionId2
  6069. ? obj2
  6070. : false;
  6071. },
  6072. /**
  6073. * 刷新父级列表
  6074. */
  6075. refreshParentList(sectionItem, rebuildObj) {
  6076. console.log(sectionItem, "看完视频==========sectionItem", this.menuList);
  6077. console.log(rebuildObj, "rebuildObj");
  6078. let self = this;
  6079. if (sectionItem.menuId) {
  6080. //最外层节有menuid
  6081. //普通章节目录
  6082. this.$request
  6083. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
  6084. .then((res) => {
  6085. for (let i = 0; i < res.rows.length; i++) {
  6086. let item = res.rows[i];
  6087. if (item.type == 3) {
  6088. self.menuList[i].learning = item.learning;
  6089. self.menuList[i].rebuild = item.rebuild;
  6090. }
  6091. }
  6092. });
  6093. if (this.menuTab.length > 1) {
  6094. //有重修目录
  6095. this.$request
  6096. .reMenuList({
  6097. courseId: this.courseId,
  6098. gradeId: this.gradeId,
  6099. rebuild: 1,
  6100. })
  6101. .then((res) => {
  6102. if (res.rows.length > 0) {
  6103. for (let i = 0; i < res.rows.length; i++) {
  6104. let item = res.rows[i];
  6105. item.id = item.menuId;
  6106. item.name = item.menuName;
  6107. item.menuType = item.type;
  6108. item.showList = false;
  6109. item.list = [];
  6110. item.isRebuild = 1;
  6111. }
  6112. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6113. //筛选剩下的选项
  6114. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6115. });
  6116. } else {
  6117. this.menuTab = [
  6118. {
  6119. name: "1",
  6120. label: "章节目录",
  6121. },
  6122. {
  6123. name: "3",
  6124. label: "答疑",
  6125. },
  6126. {
  6127. name: "4",
  6128. label: "笔记",
  6129. },
  6130. {
  6131. name: "5",
  6132. label: "讲义",
  6133. },
  6134. ];
  6135. this.courseTabIndex = "1";
  6136. self.reMenuList = [];
  6137. }
  6138. });
  6139. }
  6140. } else if (!sectionItem.moduleId) {
  6141. //第二层节没有moduleid
  6142. this.$request
  6143. .reSectionList({
  6144. chapterId: sectionItem.chapterId,
  6145. gradeId: this.gradeId,
  6146. courseId: this.courseId,
  6147. moduleId: 0,
  6148. })
  6149. .then((res) => {
  6150. let newArr = res.data.filter((item) => {
  6151. return item.type != 2;
  6152. });
  6153. if (sectionItem.parent) {
  6154. sectionItem.parent.canLearn = newArr.every((item) => {
  6155. if (item.learning == 1) {
  6156. return true;
  6157. } else {
  6158. return false;
  6159. }
  6160. });
  6161. res.data.forEach((section) => {
  6162. section.isRebuild = 1;
  6163. section.parent = sectionItem.parent;
  6164. });
  6165. }
  6166. this.menuList.forEach((menu) => {
  6167. if (menu.menuId == sectionItem.chapterId) {
  6168. menu.list = res.data;
  6169. }
  6170. });
  6171. });
  6172. if (this.menuTab.length > 1 && rebuildObj) {
  6173. this.$request
  6174. .reSectionList({
  6175. chapterId: rebuildObj.chapterId,
  6176. gradeId: this.gradeId,
  6177. courseId: this.courseId,
  6178. moduleId: 0,
  6179. rebuild: 1,
  6180. })
  6181. .then((res) => {
  6182. let newArr = res.data.filter((item) => {
  6183. return item.type != 2;
  6184. });
  6185. if (rebuildObj.parent) {
  6186. rebuildObj.parent.canLearn = newArr.every((item) => {
  6187. if (item.learning == 1) {
  6188. return true;
  6189. } else {
  6190. return false;
  6191. }
  6192. });
  6193. res.data.forEach((section) => {
  6194. section.parent = rebuildObj.parent;
  6195. });
  6196. }
  6197. this.reMenuList.forEach((menu) => {
  6198. if (menu.menuId == rebuildObj.chapterId) {
  6199. menu.list = res.data;
  6200. }
  6201. });
  6202. });
  6203. this.$request
  6204. .reMenuList({
  6205. courseId: this.courseId,
  6206. gradeId: this.gradeId,
  6207. rebuild: 1,
  6208. })
  6209. .then((res) => {
  6210. if (res.rows.length > 0) {
  6211. for (let i = 0; i < res.rows.length; i++) {
  6212. let item = res.rows[i];
  6213. item.id = item.menuId;
  6214. item.name = item.menuName;
  6215. item.menuType = item.type;
  6216. item.showList = false;
  6217. item.list = [];
  6218. item.isRebuild = 1;
  6219. }
  6220. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6221. //筛选剩下的选项
  6222. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6223. });
  6224. } else {
  6225. this.menuTab = [
  6226. {
  6227. name: "1",
  6228. label: "章节目录",
  6229. },
  6230. {
  6231. name: "3",
  6232. label: "答疑",
  6233. },
  6234. {
  6235. name: "4",
  6236. label: "笔记",
  6237. },
  6238. {
  6239. name: "5",
  6240. label: "讲义",
  6241. },
  6242. ];
  6243. this.courseTabIndex = "1";
  6244. self.reMenuList = [];
  6245. }
  6246. });
  6247. }
  6248. } else {
  6249. //第三层节有moduleid和chapterid都有
  6250. console.log('第三层第三层')
  6251. this.$request
  6252. .reSectionList({
  6253. chapterId: sectionItem.chapterId,
  6254. gradeId: this.gradeId,
  6255. courseId: this.courseId,
  6256. moduleId: sectionItem.moduleId,
  6257. })
  6258. .then((res) => {
  6259. let newArr = res.data.filter((item) => {
  6260. return item.type != 2;
  6261. });
  6262. if (sectionItem.parent) {
  6263. sectionItem.parent.canLearn = newArr.every((item) => {
  6264. if (item.learning == 1) {
  6265. return true;
  6266. } else {
  6267. return false;
  6268. }
  6269. });
  6270. res.data.forEach((section) => {
  6271. section.parent = sectionItem.parent;
  6272. });
  6273. }
  6274. this.menuList.forEach((menu) => {
  6275. if (menu.list && menu.list.length) {
  6276. menu.list.forEach((chapter) => {
  6277. if (
  6278. chapter.moduleId == sectionItem.moduleId &&
  6279. chapter.chapterId == sectionItem.chapterId
  6280. ) {
  6281. // chapter.learning = res.data[0].learning
  6282. console.log(res.data, "res.data");
  6283. chapter.list = res.data;
  6284. console.log(chapter.list, "chapter.list");
  6285. }
  6286. });
  6287. }
  6288. });
  6289. console.log('this.menuList', this.menuList)
  6290. });
  6291. if (this.menuTab.length > 1 && rebuildObj) {
  6292. this.$request
  6293. .reSectionList({
  6294. chapterId: rebuildObj.chapterId,
  6295. gradeId: this.gradeId,
  6296. courseId: this.courseId,
  6297. moduleId: rebuildObj.moduleId,
  6298. rebuild: 1,
  6299. })
  6300. .then((res) => {
  6301. let newArr = res.data.filter((item) => {
  6302. return item.type != 2;
  6303. });
  6304. if (sectionItem.parent) {
  6305. rebuildObj.parent.canLearn = newArr.every((item) => {
  6306. if (item.learning == 1) {
  6307. return true;
  6308. } else {
  6309. return false;
  6310. }
  6311. });
  6312. res.data.forEach((section) => {
  6313. section.parent = rebuildObj.parent;
  6314. });
  6315. }
  6316. this.reMenuList.forEach((menu) => {
  6317. if (menu.list && menu.list.length) {
  6318. menu.list.forEach((chapter) => {
  6319. if (
  6320. chapter.moduleId == rebuildObj.moduleId &&
  6321. chapter.chapterId == rebuildObj.chapterId
  6322. ) {
  6323. chapter.learning = res.data[0].learning
  6324. chapter.list = res.data;
  6325. }
  6326. });
  6327. }
  6328. });
  6329. });
  6330. this.$request
  6331. .reMenuList({
  6332. courseId: this.courseId,
  6333. gradeId: this.gradeId,
  6334. rebuild: 1,
  6335. })
  6336. .then((res) => {
  6337. if (res.rows.length > 0) {
  6338. for (let i = 0; i < res.rows.length; i++) {
  6339. let item = res.rows[i];
  6340. item.id = item.menuId;
  6341. item.name = item.menuName;
  6342. item.menuType = item.type;
  6343. item.showList = false;
  6344. item.list = [];
  6345. item.isRebuild = 1;
  6346. }
  6347. self.reMenuList = self.reMenuList.filter((reMenu) => {
  6348. //筛选剩下的选项
  6349. return res.rows.find((row) => row.menuId == reMenu.menuId);
  6350. });
  6351. } else {
  6352. this.menuTab = [
  6353. {
  6354. name: "1",
  6355. label: "章节目录",
  6356. },
  6357. {
  6358. name: "3",
  6359. label: "答疑",
  6360. },
  6361. {
  6362. name: "4",
  6363. label: "笔记",
  6364. },
  6365. {
  6366. name: "5",
  6367. label: "讲义",
  6368. },
  6369. ];
  6370. this.courseTabIndex = "1";
  6371. self.reMenuList = [];
  6372. }
  6373. });
  6374. }
  6375. }
  6376. },
  6377. getRecordLast() {
  6378. let self = this;
  6379. return new Promise((resolve) => {
  6380. let data = {
  6381. gradeId: Number(self.gradeId),
  6382. goodsId: Number(self.goodsId),
  6383. sectionId: Number(self.playSectionId),
  6384. courseId: Number(self.courseId),
  6385. chapterId: parseInt(self.chapterId),
  6386. moduleId: parseInt(self.moduleId),
  6387. };
  6388. self.$request.recordLast(data).then((res) => {
  6389. resolve(res.data);
  6390. });
  6391. });
  6392. },
  6393. /**
  6394. * 获取笔记列表
  6395. */
  6396. getNoteList() {
  6397. let self = this;
  6398. self.noteList = [];
  6399. let data = {
  6400. courseId: this.courseId,
  6401. gradeId: this.gradeId,
  6402. goodsId: this.goodsId,
  6403. // pageNum: this.noteParams.pageNum,
  6404. // pageSize: this.noteParams.pageSize,
  6405. };
  6406. if (this.playSectionId > 0) {
  6407. data.sectionId = this.playSectionId;
  6408. }
  6409. this.$request.noteList(data).then((res) => {
  6410. self.noteList = res.rows;
  6411. self.noteTotal = res.total;
  6412. });
  6413. },
  6414. noteClick(note) {
  6415. if (this.vid) {
  6416. //切换视频
  6417. if (this.vid == note.recordingUrl) {
  6418. var polyvPlayerContext = this.player;
  6419. if (polyvPlayerContext) {
  6420. polyvPlayerContext.j2s_seekVideo(note.noteSecond);
  6421. }
  6422. } else {
  6423. var polyvPlayerContext = this.player;
  6424. if (polyvPlayerContext) {
  6425. polyvPlayerContext.changeVid(note.recordingUrl);
  6426. }
  6427. }
  6428. } else {
  6429. var polyvPlayerContext = this.player;
  6430. console.log(polyvPlayerContext);
  6431. if (polyvPlayerContext) {
  6432. polyvPlayerContext.changeVid(note.recordingUrl);
  6433. } else {
  6434. this.vid = note.recordingUrl;
  6435. console.log(note.recordingUrl);
  6436. this.moduleId = note.moduleId;
  6437. this.chapterId = note.chapterId;
  6438. this.playSectionId = note.sectionId;
  6439. note.sectionType = 3;
  6440. this.loadPlayerScript(this.loadPlayer);
  6441. }
  6442. }
  6443. this.recordObj = { videoCurrentTime: note.noteSecond };
  6444. },
  6445. /**
  6446. * 展开列表
  6447. */
  6448. getMenuList() {
  6449. let self = this;
  6450. // /course/menuList
  6451. this.$request
  6452. .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
  6453. .then(async (res) => {
  6454. console.log('--asfsdgshfduofhdug', res.rows, this.menuList)
  6455. for (let i = 0; i < res.rows.length; i++) {
  6456. let item = res.rows[i];
  6457. item.id = item.menuId;
  6458. item.name = item.menuName;
  6459. item.menuType = item.type;
  6460. item.showList = false;
  6461. item.list = [];
  6462. item.parent = this.menuList;
  6463. }
  6464. self.menuList = res.rows;
  6465. console.log('==============self.menuList===', res.rows, self.menuList)
  6466. if ((this.sectionItem.recordingUrl||this.sectionItem.liveUrl) && this.needOpenNew) {
  6467. this.needOpenNew = false;
  6468. if (this.sectionItem.sectionType == 1) {
  6469. console.log("录播")
  6470. //录播
  6471. this.chapterId = this.sectionItem.chapterId;
  6472. this.moduleId = this.sectionItem.moduleId;
  6473. this.playSectionId = this.sectionItem.sectionId;
  6474. this.vid = this.sectionItem.recordingUrl;
  6475. this.playVideo(this.sectionItem);
  6476. } else if (this.sectionItem.sectionType == 2) {
  6477. console.log("直播")
  6478. this.getResource(this.sectionItem)
  6479. //直播
  6480. // this.studyRecordGetLastLive();
  6481. } else if (this.sectionItem.sectionType == 3) {
  6482. //回放
  6483. this.chapterId = this.sectionItem.chapterId;
  6484. this.moduleId = this.sectionItem.moduleId;
  6485. this.playSectionId = this.sectionItem.sectionId;
  6486. this.vid = this.sectionItem.recordingUrl;
  6487. this.playVideo(this.sectionItem);
  6488. }
  6489. for (let i = 0; i < res.rows.length; i++) {
  6490. if (
  6491. res.rows[i].type == 1 &&
  6492. res.rows[i].menuId == this.sectionItem.moduleId
  6493. ) {
  6494. this.menuIndex = [i];
  6495. this.openModule(this.menuList[i], true);
  6496. break;
  6497. } else if (
  6498. res.rows[i].type == 2 &&
  6499. res.rows[i].menuId == this.sectionItem.chapterId &&
  6500. (!this.sectionItem.moduleId || this.sectionItem.moduleId == 0)
  6501. ) {
  6502. console.log("噢噢噢");
  6503. this.menuIndex = [i];
  6504. // this.needOpen = false;
  6505. this.openChapter(this.menuList[i]);
  6506. break;
  6507. }
  6508. }
  6509. } else {
  6510. console.log("我走了");
  6511. const changeStatus = await this.studyRecordQueryLiveLast();
  6512. if (changeStatus) {
  6513. for (let i = 0; i < res.rows.length; i++) {
  6514. if (
  6515. res.rows[i].type == 1 &&
  6516. res.rows[i].menuId == this.sectionItem.moduleId
  6517. ) {
  6518. this.menuIndex = [i];
  6519. this.openModule(this.menuList[i], true);
  6520. break;
  6521. } else if (
  6522. res.rows[i].type == 2 &&
  6523. res.rows[i].menuId == this.sectionItem.chapterId &&
  6524. !this.sectionItem.moduleId
  6525. ) {
  6526. this.menuIndex = [i];
  6527. // this.needOpen = false;
  6528. this.openChapter(this.menuList[i]);
  6529. break;
  6530. }
  6531. }
  6532. } else {
  6533. //展开第一个
  6534. if (this.needOpen) {
  6535. for (let i = 0; i < res.rows.length; i++) {
  6536. if (res.rows[i].type == 1) {
  6537. this.menuIndex = [i];
  6538. this.openModule(this.menuList[i]);
  6539. break;
  6540. } else if (res.rows[i].type == 2) {
  6541. this.menuIndex = [i];
  6542. // this.needOpen = false;
  6543. this.openChapter(this.menuList[i]);
  6544. break;
  6545. }
  6546. }
  6547. //第一个是节,直接播放
  6548. if (self.menuList.length) {
  6549. if (
  6550. self.menuList[0].type == 3 &&
  6551. !this.sectionItem.recordingUrl &&
  6552. self.menuList[0].sectionType != 2
  6553. ) {
  6554. // this.getResource(self.menuList[0]);
  6555. }
  6556. }
  6557. }
  6558. }
  6559. }
  6560. });
  6561. },
  6562. getReMenuList() {
  6563. let self = this;
  6564. this.$request
  6565. .reMenuList({
  6566. courseId: this.courseId,
  6567. rebuild: 1,
  6568. gradeId: this.gradeId,
  6569. })
  6570. .then((res) => {
  6571. for (let i = 0; i < res.rows.length; i++) {
  6572. let item = res.rows[i];
  6573. item.id = item.menuId;
  6574. item.name = item.menuName;
  6575. item.menuType = item.type;
  6576. item.showList = false;
  6577. item.list = [];
  6578. item.parent = this.reMenuList;
  6579. item.isRebuild = 1;
  6580. }
  6581. self.reMenuList = res.rows;
  6582. if (self.reMenuList.length > 0) {
  6583. this.menuTab = [
  6584. {
  6585. name: "1",
  6586. label: "章节目录",
  6587. },
  6588. {
  6589. name: "2",
  6590. label: "重修目录",
  6591. },
  6592. {
  6593. name: "3",
  6594. label: "答疑",
  6595. },
  6596. {
  6597. name: "4",
  6598. label: "笔记",
  6599. },
  6600. {
  6601. name: "5",
  6602. label: "讲义",
  6603. },
  6604. ];
  6605. if (this.courseTabIndex == "2") {
  6606. return;
  6607. }
  6608. this.courseTabIndex = "1";
  6609. } else {
  6610. this.menuTab = [
  6611. {
  6612. name: "1",
  6613. label: "章节目录",
  6614. },
  6615. {
  6616. name: "3",
  6617. label: "答疑",
  6618. },
  6619. {
  6620. name: "4",
  6621. label: "笔记",
  6622. },
  6623. {
  6624. name: "5",
  6625. label: "讲义",
  6626. },
  6627. ];
  6628. this.courseTabIndex = "1";
  6629. }
  6630. });
  6631. },
  6632. /**
  6633. * 获取讲义权限
  6634. */
  6635. courseHandouts() {
  6636. if (this.goodsData.handoutsId) {
  6637. this.$request
  6638. .courseHandouts(this.goodsData.handoutsId)
  6639. .then((res) => {
  6640. this.courseHandoutsData = res.data;
  6641. const loadingTask = pdf.createLoadingTask(
  6642. this.$tools.splitImgHost(this.courseHandoutsData.handoutsUrl)
  6643. );
  6644. loadingTask.promise
  6645. .then((pdf) => {
  6646. this.numPages = pdf.numPages;
  6647. })
  6648. .catch((err) => {});
  6649. })
  6650. .catch((err) => {});
  6651. }
  6652. },
  6653. /**
  6654. * 获取培训项目详情
  6655. */
  6656. courseBusiness() {
  6657. this.$request.courseBusiness(this.goodsData.businessId).then((res) => {
  6658. this.businessData = res.data;
  6659. });
  6660. },
  6661. /**提出答疑 */
  6662. addAnswer() {
  6663. if (!this.textarea) {
  6664. this.$message.warning("请输入疑问内容");
  6665. return;
  6666. }
  6667. let data = {
  6668. courseId: this.courseId,
  6669. goodsId: this.goodsId,
  6670. orderGoodsId: this.orderGoodsId,
  6671. answerText: this.textarea,
  6672. };
  6673. this.$request.addAnswer(data).then((res) => {
  6674. this.textarea = "";
  6675. this.getAnswerList();
  6676. });
  6677. },
  6678. /**回复 */
  6679. answerBack(row) {
  6680. this.$prompt(`${row.realname}:${row.answerText}`, "提示", {
  6681. confirmButtonText: "确定",
  6682. cancelButtonText: "取消",
  6683. inputErrorMessage: "输入不能为空",
  6684. inputValidator: (value) => {
  6685. let str = value.replace(/^ +| +$/g, "");
  6686. // 点击按钮时,对文本框里面的值进行验证
  6687. if (!str) {
  6688. return "输入不能为空";
  6689. }
  6690. },
  6691. })
  6692. .then(({ value }) => {
  6693. let data = {
  6694. assignUserId: row.userId,
  6695. assignAnswerId: row.answerId,
  6696. courseId: this.courseId,
  6697. goodsId: this.goodsId,
  6698. orderGoodsId: this.orderGoodsId,
  6699. answerText: value,
  6700. assignAnswerText: row.assignAnswerText,
  6701. };
  6702. this.$request.addAnswer(data).then((res) => {
  6703. this.getAnswerList();
  6704. });
  6705. })
  6706. .catch(() => {});
  6707. },
  6708. getAnswerList() {
  6709. let self = this;
  6710. // /app/answer/list 查询答疑列表
  6711. this.$request
  6712. .answerList({ courseId: this.courseId, goodsId: this.goodsId })
  6713. .then((res) => {
  6714. let data1 = [];
  6715. let data2 = [];
  6716. let copydata2 = [];
  6717. res.rows.forEach((item) => {
  6718. if (!item.assignAnswerId) {
  6719. data1.push(item);
  6720. } else {
  6721. data2.push(item);
  6722. copydata2.push(item);
  6723. }
  6724. });
  6725. data2.forEach((item, index) => {
  6726. //回复层
  6727. data1.forEach((items) => {
  6728. //提问层
  6729. if (items.answerId === item.assignAnswerId) {
  6730. if (
  6731. items.newArraysAnswerList &&
  6732. items.newArraysAnswerList.length
  6733. ) {
  6734. items.newArraysAnswerList.push(item);
  6735. } else {
  6736. items.newArraysAnswerList = [item];
  6737. }
  6738. let indexInd = copydata2.findIndex((itemsxs) => {
  6739. return itemsxs.answerId === item.answerId;
  6740. });
  6741. if (indexInd !== -1) {
  6742. copydata2.splice(indexInd, 1);
  6743. }
  6744. }
  6745. });
  6746. });
  6747. copydata2.forEach((it) => {
  6748. for (let i = 0; i < data1.length; i++) {
  6749. let STATUS = null;
  6750. if (data1[i].newArraysAnswerList) {
  6751. STATUS = data1[i].newArraysAnswerList.some((items) => {
  6752. return items.answerId === it.assignAnswerId;
  6753. });
  6754. }
  6755. if (STATUS) {
  6756. data1[i].newArraysAnswerList.push(it);
  6757. break;
  6758. }
  6759. }
  6760. });
  6761. self.answerList = data1.reverse();
  6762. console.log(self.answerList, "answerList");
  6763. });
  6764. },
  6765. courseCourseList() {
  6766. return new Promise((resolve) => {
  6767. this.param.goodsId = this.goodsId;
  6768. this.param.gradeId = this.gradeId;
  6769. this.$request.courseCourseList(this.param).then(async (res) => {
  6770. console.log(res, "resresresres");
  6771. this.courseList.push(...res.rows);
  6772. this.courseTotal = res.total
  6773. // console.log('courseTotal::', this.courseTotal)
  6774. if (!this.courseId) {
  6775. this.courseId = this.courseList[0].courseId;
  6776. }
  6777. this.param.total = res.total;
  6778. await this.courseChange();
  6779. resolve();
  6780. });
  6781. });
  6782. },
  6783. download(url, fileName) {
  6784. let xhr = new XMLHttpRequest();
  6785. xhr.open("get", url, true);
  6786. xhr.setRequestHeader("Content-Type", `application/pdf`);
  6787. xhr.responseType = "blob";
  6788. let that = this;
  6789. xhr.onload = function () {
  6790. if (this.status == 200) {
  6791. //接受二进制文件流
  6792. var blob = this.response;
  6793. that.downloadExportFile(blob, fileName);
  6794. }
  6795. };
  6796. xhr.send();
  6797. },
  6798. downloadExportFile(blob, tagFileName) {
  6799. let downloadElement = document.createElement("a");
  6800. let href = "";
  6801. if (typeof blob == "string") {
  6802. downloadElement.target = "_blank";
  6803. } else {
  6804. href = window.URL.createObjectURL(blob); //创建下载的链接
  6805. }
  6806. downloadElement.href = href;
  6807. downloadElement.download = tagFileName;
  6808. //下载后文件名
  6809. document.body.appendChild(downloadElement);
  6810. downloadElement.click(); //点击下载
  6811. document.body.removeChild(downloadElement); //下载完成移除元素
  6812. if (typeof blob != "string") {
  6813. window.URL.revokeObjectURL(href); //释放掉blob对象
  6814. }
  6815. },
  6816. print() {
  6817. document.getElementById("printIframe").contentWindow.print();
  6818. },
  6819. previvew(url) {
  6820. this.showPdf = true;
  6821. },
  6822. noteSubmit() {
  6823. let self = this;
  6824. if (!(this.playSectionId > 0)) {
  6825. this.$message({
  6826. message: "目前无播放视频",
  6827. type: "warning",
  6828. });
  6829. return;
  6830. }
  6831. if (!this.textareaNote) {
  6832. this.$message({
  6833. message: "请输入内容",
  6834. type: "warning",
  6835. });
  6836. return;
  6837. }
  6838. if (!this.gradeId) {
  6839. this.$message({
  6840. message: "暂无班级数据",
  6841. type: "warning",
  6842. });
  6843. return;
  6844. }
  6845. var polyvPlayerContext = this.player;
  6846. let noteDate = this.$tools.getZeroTime();
  6847. let noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  6848. console.log(noteSecond, "noteSecond");
  6849. if (!noteSecond) {
  6850. if (noteSecond == 0) {
  6851. //播放结束
  6852. noteSecond = polyvPlayerContext.j2s_getCurrentTime();
  6853. }
  6854. if (!noteSecond) {
  6855. this.$message({
  6856. message: "视频暂未开始",
  6857. type: "warning",
  6858. });
  6859. return;
  6860. }
  6861. }
  6862. let data = {
  6863. gradeId: this.gradeId,
  6864. goodsId: this.goodsId,
  6865. sectionId: this.playSectionId,
  6866. courseId: this.courseId,
  6867. noteText: this.textareaNote,
  6868. noteDate: noteDate,
  6869. noteSecond: noteSecond,
  6870. moduleId: this.moduleId,
  6871. chapterId: this.chapterId,
  6872. };
  6873. this.$request.postNote(data).then((res) => {
  6874. this.$message({
  6875. message: "发布成功",
  6876. type: "success",
  6877. });
  6878. self.getNoteList();
  6879. this.textareaNote = "";
  6880. });
  6881. },
  6882. del(item) {
  6883. console.log(item);
  6884. let data = { answerId: item.answerId, status: -1 };
  6885. this.$request.delAnswer(data).then((res) => {
  6886. this.$message({
  6887. message: "删除成功",
  6888. type: "success",
  6889. });
  6890. this.getAnswerList();
  6891. });
  6892. },
  6893. /**
  6894. * 打印
  6895. */
  6896. printView(url) {
  6897. console.log("触发打印", url);
  6898. printJS({
  6899. printable: url,
  6900. type: "pdf",
  6901. header: null,
  6902. targetStyles: ["*"],
  6903. style: "@page {margin:0 10mm}",
  6904. });
  6905. // this.print(url);
  6906. },
  6907. // 打印方法
  6908. print(filePath) {
  6909. console.log("执行打印");
  6910. let iframe = document.createElement("iframe");
  6911. iframe.style.border = "0px";
  6912. iframe.style.position = "absolute";
  6913. iframe.style.width = "0px";
  6914. iframe.style.height = "0px";
  6915. iframe.style.right = "0px";
  6916. iframe.style.top = "0px";
  6917. iframe.setAttribute("src", filePath);
  6918. iframe.onload = () => {
  6919. iframe.contentWindow.print();
  6920. // setTimeout(() => {
  6921. // document.body.removeChild(iframe);
  6922. // });
  6923. };
  6924. document.body.append(iframe);
  6925. },
  6926. },
  6927. };
  6928. </script>
  6929. <!-- Add "scoped" attribute to limit CSS to this component only -->
  6930. <style scoped lang="scss">
  6931. .course-detail {
  6932. .section {
  6933. padding-bottom: 30px;
  6934. &__header {
  6935. height: 40px;
  6936. display: flex;
  6937. align-items: center;
  6938. padding: 0 20px;
  6939. }
  6940. &__body {
  6941. .course-info {
  6942. &__header {
  6943. .title {
  6944. height: 40px;
  6945. border-bottom: 1px solid #999;
  6946. // color: #fff;
  6947. .select {
  6948. // width: 100%;
  6949. }
  6950. /deep/ .el-input__icon {
  6951. width: 20px;
  6952. height: 20px;
  6953. border: 1px solid #eee;
  6954. border-radius: 4px;
  6955. margin-top: 10px;
  6956. line-height: 20px;
  6957. }
  6958. /deep/ .el-input__inner {
  6959. // color: #fff;
  6960. font-size: 16px;
  6961. background: none;
  6962. border: 0;
  6963. }
  6964. }
  6965. .left-box {
  6966. width: 810px;
  6967. height: 455px;
  6968. float: left;
  6969. background-size: cover;
  6970. background-position: center center;
  6971. background-repeat: no-repeat;
  6972. position: relative;
  6973. .video {
  6974. width: 100%;
  6975. height: 100%;
  6976. }
  6977. }
  6978. .recordStyle {
  6979. position: absolute;
  6980. bottom: 90px;
  6981. padding: 6px 12px;
  6982. left: 8px;
  6983. background-color: rgba(0, 0, 0, 0.4);
  6984. color: #fff;
  6985. border-radius: 24px;
  6986. user-select: none;
  6987. .btn_sty {
  6988. cursor: pointer;
  6989. }
  6990. }
  6991. .right-box {
  6992. width: 462px;
  6993. height: 455px;
  6994. background: #3f4449;
  6995. border-radius: 0px;
  6996. float: right;
  6997. &__header {
  6998. .tabs {
  6999. /deep/.el-tabs__nav-wrap::after {
  7000. background-color: #999;
  7001. }
  7002. /deep/ .el-tabs__header {
  7003. margin: 0;
  7004. }
  7005. .label {
  7006. color: #fff;
  7007. height: 40px;
  7008. line-height: 40px;
  7009. padding: 0 20px;
  7010. }
  7011. .item {
  7012. &__title {
  7013. padding-left: 12px;
  7014. height: 40px;
  7015. line-height: 40px;
  7016. cursor: pointer;
  7017. font-size: 14px;
  7018. font-family: Microsoft YaHei;
  7019. font-weight: bold;
  7020. color: #fff;
  7021. .el-icon-caret-right,
  7022. .el-icon-caret-bottom {
  7023. color: #999;
  7024. }
  7025. }
  7026. &__content {
  7027. .bank-chapter {
  7028. &__item {
  7029. color: #fff;
  7030. font-size: 14px;
  7031. &__text {
  7032. padding: 8px 8px 8px 24px;
  7033. cursor: pointer;
  7034. flex: 1;
  7035. .el-icon-caret-right,
  7036. .el-icon-caret-bottom {
  7037. color: #999;
  7038. }
  7039. }
  7040. }
  7041. }
  7042. .bank-section {
  7043. &__item {
  7044. user-select: none;
  7045. color: #fff;
  7046. font-size: 14px;
  7047. display: flex;
  7048. align-items: center;
  7049. &.active {
  7050. background: #132b4d;
  7051. font-size: 14px;
  7052. font-family: Microsoft YaHei;
  7053. font-weight: bold;
  7054. color: #3f8dfd;
  7055. }
  7056. &__text {
  7057. flex: 1;
  7058. padding: 8px 8px 8px 12px;
  7059. height: 40px;
  7060. display: flex;
  7061. flex-direction: column;
  7062. justify-content: center;
  7063. cursor: pointer;
  7064. .el-icon-caret-right,
  7065. .el-icon-caret-bottom {
  7066. color: #999;
  7067. }
  7068. }
  7069. .test-btn {
  7070. margin-left: 10px;
  7071. width: 32px;
  7072. height: 20px;
  7073. background: #007aff;
  7074. border-radius: 4px;
  7075. line-height: 18px;
  7076. color: #fff;
  7077. text-align: center;
  7078. }
  7079. .note {
  7080. margin-left: 10px;
  7081. width: 32px;
  7082. height: 20px;
  7083. border: 1px solid #ff3b30;
  7084. border-radius: 4px;
  7085. line-height: 18px;
  7086. color: #ff3b30;
  7087. text-align: center;
  7088. &--yellow {
  7089. border-color: #ff9500;
  7090. color: #ff9500;
  7091. }
  7092. &--blue {
  7093. border-color: #3f8dfd;
  7094. color: #3f8dfd;
  7095. }
  7096. }
  7097. .during {
  7098. color: #999;
  7099. margin-right: 10px;
  7100. }
  7101. .btn {
  7102. margin-right: 12px;
  7103. width: 48px;
  7104. height: 20px;
  7105. border: 1px solid #ff3b30;
  7106. background: #ff3b30;
  7107. border-radius: 4px;
  7108. line-height: 18px;
  7109. color: #fff;
  7110. text-align: center;
  7111. &--green {
  7112. border: 1px solid #34c759;
  7113. background: #34c759;
  7114. }
  7115. }
  7116. .live-btn {
  7117. margin-left: 20px;
  7118. width: 60px;
  7119. height: 20px;
  7120. border-radius: 4px;
  7121. background: #eeeeee;
  7122. line-height: 18px;
  7123. color: #666666;
  7124. text-align: center;
  7125. &--yellow {
  7126. background: #fff7eb;
  7127. color: #ff9500;
  7128. }
  7129. &--blue {
  7130. border-color: #ebf4ff;
  7131. color: #007aff;
  7132. }
  7133. }
  7134. }
  7135. }
  7136. }
  7137. }
  7138. }
  7139. .title {
  7140. height: 40px;
  7141. border-bottom: 1px solid #999;
  7142. color: #fff;
  7143. .select {
  7144. width: 100%;
  7145. }
  7146. /deep/ .el-input__icon {
  7147. width: 20px;
  7148. height: 20px;
  7149. border: 1px solid #fff;
  7150. border-radius: 4px;
  7151. margin-top: 10px;
  7152. line-height: 20px;
  7153. }
  7154. /deep/ .el-input__inner {
  7155. color: #fff;
  7156. font-size: 16px;
  7157. background: none;
  7158. border: 0;
  7159. }
  7160. }
  7161. }
  7162. &__body {
  7163. height: 374px;
  7164. overflow-y: scroll;
  7165. &::-webkit-scrollbar {
  7166. // width: 6px;
  7167. display: none;
  7168. }
  7169. &::-webkit-scrollbar-track {
  7170. background-color: #060e1a;
  7171. -webkit-border-radius: 2em;
  7172. -moz-border-radius: 2em;
  7173. border-radius: 2em;
  7174. }
  7175. &::-webkit-scrollbar-thumb {
  7176. background-color: #eeeeee;
  7177. -webkit-border-radius: 2em;
  7178. -moz-border-radius: 2em;
  7179. border-radius: 2em;
  7180. }
  7181. }
  7182. }
  7183. }
  7184. &__body {
  7185. /deep/ .el-tabs__item {
  7186. padding: 0 20px !important;
  7187. height: 80px;
  7188. line-height: 80px;
  7189. }
  7190. .course-img {
  7191. width: 100%;
  7192. }
  7193. .course-menu {
  7194. margin-top: 25px;
  7195. .left-box {
  7196. width: 948px;
  7197. float: left;
  7198. &__header {
  7199. padding-right: 50px;
  7200. position: relative;
  7201. .item {
  7202. width: auto;
  7203. margin-right: 24px;
  7204. font-size: 16px;
  7205. font-family: Microsoft YaHei;
  7206. font-weight: 400;
  7207. color: #333333;
  7208. background: #eeeeee;
  7209. border-radius: 8px;
  7210. padding: 12px;
  7211. position: relative;
  7212. &.canlearn {
  7213. background: #3f8dfd;
  7214. color: #fff;
  7215. }
  7216. }
  7217. }
  7218. &__body {
  7219. .buy-note {
  7220. margin-right: 50px;
  7221. }
  7222. .item {
  7223. margin-top: 24px;
  7224. padding: 16px;
  7225. background: #eee;
  7226. border-radius: 10px;
  7227. &__title {
  7228. font-size: 16px;
  7229. font-family: Microsoft YaHei;
  7230. font-weight: bold;
  7231. color: #333333;
  7232. .note {
  7233. display: inline-block;
  7234. margin-left: 20px;
  7235. width: 40px;
  7236. height: 24px;
  7237. border: 1px solid #ff3b30;
  7238. border-radius: 8px;
  7239. line-height: 22px;
  7240. color: #ff3b30;
  7241. text-align: center;
  7242. }
  7243. }
  7244. &__content {
  7245. margin-top: 12px;
  7246. background: #f5f7fa;
  7247. }
  7248. }
  7249. }
  7250. }
  7251. .right-box {
  7252. width: 255px;
  7253. float: right;
  7254. .title {
  7255. font-size: 16px;
  7256. font-family: Microsoft YaHei;
  7257. font-weight: 400;
  7258. color: #333333;
  7259. text-shadow: 0px 6px 6px rgba(85, 158, 255, 0.08);
  7260. position: relative;
  7261. .more {
  7262. font-size: 16px;
  7263. font-family: Microsoft YaHei;
  7264. font-weight: 400;
  7265. color: #999999;
  7266. position: absolute;
  7267. right: 0;
  7268. }
  7269. }
  7270. .list {
  7271. .course-item {
  7272. }
  7273. }
  7274. }
  7275. }
  7276. .answer-question {
  7277. &__header {
  7278. border-bottom: 1px solid #eee;
  7279. .textarea-wrap {
  7280. background: #f9f9f9;
  7281. border: 1px solid #eeeeee;
  7282. border-radius: 8px;
  7283. .textarea {
  7284. height: 100%;
  7285. }
  7286. }
  7287. .submit {
  7288. padding: 10px 20px;
  7289. border-radius: 20px;
  7290. text-align: center;
  7291. font-size: 16px;
  7292. margin: 10px 0;
  7293. float: right;
  7294. }
  7295. }
  7296. &__body {
  7297. .question-list {
  7298. &__item {
  7299. padding: 20px 0;
  7300. display: flex;
  7301. &__avatar {
  7302. width: 40px;
  7303. height: 40px;
  7304. display: table-cell;
  7305. border-radius: 50%;
  7306. text-align: center;
  7307. img {
  7308. display: inline-block;
  7309. vertical-align: middle;
  7310. max-width: 100%;
  7311. max-height: 100%;
  7312. }
  7313. }
  7314. &__content {
  7315. flex: 1;
  7316. border-bottom: 1px solid #ccc;
  7317. margin-left: 10px;
  7318. .nickname {
  7319. font-size: 14px;
  7320. font-family: Microsoft YaHei;
  7321. font-weight: bold;
  7322. color: #fff;
  7323. line-height: 24px;
  7324. }
  7325. .desc {
  7326. font-size: 14px;
  7327. font-family: Microsoft YaHei;
  7328. font-weight: 400;
  7329. color: #666666;
  7330. line-height: 24px;
  7331. }
  7332. .time {
  7333. font-size: 14px;
  7334. font-family: Microsoft YaHei;
  7335. font-weight: 400;
  7336. color: #999999;
  7337. line-height: 24px;
  7338. .replay {
  7339. float: right;
  7340. font-size: 14px;
  7341. font-family: Microsoft YaHei;
  7342. font-weight: 400;
  7343. color: #3f8dfd;
  7344. line-height: 24px;
  7345. margin-right: 20px;
  7346. }
  7347. .del {
  7348. float: right;
  7349. cursor: pointer;
  7350. font-size: 14px;
  7351. font-family: Microsoft YaHei;
  7352. font-weight: 400;
  7353. color: #ff3b30;
  7354. line-height: 24px;
  7355. margin-right: 20px;
  7356. }
  7357. }
  7358. .reply-list {
  7359. margin: 20px 0;
  7360. width: 100%;
  7361. background: #f9f9f9;
  7362. border-radius: 8px;
  7363. padding: 0 0 0 20px;
  7364. &__item {
  7365. padding: 20px 0;
  7366. display: flex;
  7367. border-bottom: 1px solid #ccc;
  7368. &:nth-last-of-type(1) {
  7369. border: 0;
  7370. }
  7371. &__avatar {
  7372. width: 40px;
  7373. height: 40px;
  7374. display: table-cell;
  7375. border-radius: 50%;
  7376. text-align: center;
  7377. img {
  7378. display: inline-block;
  7379. vertical-align: middle;
  7380. max-width: 100%;
  7381. max-height: 100%;
  7382. }
  7383. }
  7384. &__content {
  7385. border-radius: 8px;
  7386. flex: 1;
  7387. margin-left: 10px;
  7388. .nickname {
  7389. font-size: 14px;
  7390. font-family: Microsoft YaHei;
  7391. font-weight: bold;
  7392. color: #fff;
  7393. line-height: 24px;
  7394. }
  7395. .desc {
  7396. font-size: 14px;
  7397. font-family: Microsoft YaHei;
  7398. font-weight: 400;
  7399. color: #666666;
  7400. line-height: 24px;
  7401. }
  7402. .time {
  7403. font-size: 14px;
  7404. font-family: Microsoft YaHei;
  7405. font-weight: 400;
  7406. color: #999999;
  7407. line-height: 24px;
  7408. .reply {
  7409. float: right;
  7410. font-size: 14px;
  7411. font-family: Microsoft YaHei;
  7412. font-weight: 400;
  7413. color: #3f8dfd;
  7414. line-height: 24px;
  7415. margin-right: 20px;
  7416. cursor: pointer;
  7417. user-select: none;
  7418. }
  7419. .del {
  7420. cursor: pointer;
  7421. margin-right: 20px;
  7422. float: right;
  7423. font-size: 14px;
  7424. font-family: Microsoft YaHei;
  7425. font-weight: 400;
  7426. color: #ff3b30;
  7427. line-height: 24px;
  7428. }
  7429. }
  7430. }
  7431. }
  7432. }
  7433. }
  7434. }
  7435. }
  7436. }
  7437. }
  7438. .lecture-notes {
  7439. &__content {
  7440. .left-box {
  7441. float: left;
  7442. width: 462px;
  7443. .textarea {
  7444. border-bottom: 1px solid #eee;
  7445. .submit {
  7446. float: right;
  7447. width: 138px;
  7448. padding: 10px 0;
  7449. margin: 10px 0 25px 0;
  7450. border-radius: 20px;
  7451. text-align: center;
  7452. font-size: 16px;
  7453. }
  7454. }
  7455. .note-list {
  7456. &__content {
  7457. border-bottom: 1px solid #eee;
  7458. &__title {
  7459. width: 216px;
  7460. height: 24px;
  7461. background: #ccc;
  7462. border-radius: 24px;
  7463. font-size: 14px;
  7464. color: #666666;
  7465. text-align: center;
  7466. line-height: 24px;
  7467. margin: 20px 0;
  7468. }
  7469. }
  7470. &__item {
  7471. display: flex;
  7472. padding: 15px;
  7473. .el-icon-video-play {
  7474. cursor: pointer;
  7475. font-size: 20px;
  7476. color: #3f8dfd;
  7477. }
  7478. &__content {
  7479. flex: 1;
  7480. margin-left: 10px;
  7481. .title {
  7482. cursor: pointer;
  7483. font-size: 14px;
  7484. font-family: Microsoft YaHei;
  7485. font-weight: bold;
  7486. color: #3f8dfd;
  7487. line-height: 24px;
  7488. }
  7489. .desc {
  7490. font-size: 14px;
  7491. font-family: Microsoft YaHei;
  7492. font-weight: 400;
  7493. color: #666666;
  7494. line-height: 24px;
  7495. }
  7496. .time {
  7497. font-size: 14px;
  7498. font-family: Microsoft YaHei;
  7499. font-weight: 400;
  7500. color: #999999;
  7501. line-height: 24px;
  7502. }
  7503. }
  7504. }
  7505. }
  7506. .pagination {
  7507. margin-top: 30px;
  7508. text-align: center;
  7509. }
  7510. }
  7511. .right-box {
  7512. width: 786px;
  7513. float: right;
  7514. .lecture-list {
  7515. background: #f5f7fa;
  7516. border-radius: 8px;
  7517. &__header {
  7518. padding: 0 16px;
  7519. height: 40px;
  7520. line-height: 40px;
  7521. font-size: 18px;
  7522. font-family: Microsoft YaHei;
  7523. font-weight: bold;
  7524. color: #333333;
  7525. .slide-btn {
  7526. cursor: pointer;
  7527. float: right;
  7528. font-size: 14px;
  7529. font-family: Microsoft YaHei;
  7530. font-weight: 400;
  7531. color: #999999;
  7532. }
  7533. }
  7534. &__body {
  7535. .list {
  7536. &__item {
  7537. border-top: 1px solid #fff;
  7538. padding: 0 8px 0 16px;
  7539. height: 56px;
  7540. line-height: 55px;
  7541. display: flex;
  7542. align-items: center;
  7543. .title {
  7544. flex: 1;
  7545. font-size: 16px;
  7546. font-family: Microsoft YaHei;
  7547. font-weight: 400;
  7548. color: #333333;
  7549. }
  7550. .btns {
  7551. .btn {
  7552. cursor: pointer;
  7553. display: inline-block;
  7554. vertical-align: middle;
  7555. width: 80px;
  7556. height: 32px;
  7557. background: #ffffff;
  7558. border: 1px solid #3f8dfd;
  7559. border-radius: 16px;
  7560. text-align: center;
  7561. line-height: 30px;
  7562. color: #3f8dfd;
  7563. margin: 0 8px;
  7564. }
  7565. }
  7566. }
  7567. }
  7568. }
  7569. &__footer {
  7570. margin-top: 24px;
  7571. .lecture-scan {
  7572. background: #f5f7fa;
  7573. border-radius: 8px;
  7574. overflow: hidden;
  7575. &__header {
  7576. height: 40px;
  7577. line-height: 40px;
  7578. padding: 0 16px;
  7579. font-size: 16px;
  7580. font-family: Microsoft YaHei;
  7581. font-weight: bold;
  7582. color: #333333;
  7583. }
  7584. &__body {
  7585. height: 800px;
  7586. text-align: center;
  7587. overflow-y: scroll;
  7588. .iframe {
  7589. width: 100%;
  7590. }
  7591. }
  7592. }
  7593. }
  7594. }
  7595. }
  7596. }
  7597. }
  7598. }
  7599. }
  7600. }
  7601. }
  7602. .take-photo {
  7603. /deep/ .el-dialog__header {
  7604. display: none;
  7605. }
  7606. /deep/ .el-dialog__body {
  7607. padding: 0;
  7608. overflow: unset;
  7609. }
  7610. &__close {
  7611. cursor: pointer;
  7612. position: absolute;
  7613. right: 0;
  7614. top: -28px;
  7615. width: 24px;
  7616. height: 24px;
  7617. line-height: 24px;
  7618. text-align: center;
  7619. color: #eee;
  7620. border: 1px solid #eee;
  7621. border-radius: 50%;
  7622. }
  7623. &__header {
  7624. height: 40px;
  7625. border-bottom: 1px solid #eee;
  7626. line-height: 40px;
  7627. font-size: 16px;
  7628. font-family: Microsoft YaHei;
  7629. font-weight: bold;
  7630. color: #333333;
  7631. padding-left: 24px;
  7632. }
  7633. &__body {
  7634. height: 400px;
  7635. padding: 40px 24px;
  7636. .left-box {
  7637. width: 336px;
  7638. float: left;
  7639. .title {
  7640. font-size: 16px;
  7641. font-family: Microsoft YaHei;
  7642. font-weight: bold;
  7643. color: #ff3b30;
  7644. line-height: 24px;
  7645. }
  7646. .content {
  7647. font-size: 14px;
  7648. font-family: Microsoft YaHei;
  7649. font-weight: 400;
  7650. color: #333333;
  7651. line-height: 28px;
  7652. margin-top: 32px;
  7653. }
  7654. }
  7655. .right-box {
  7656. float: right;
  7657. width: 400px;
  7658. height: 300px;
  7659. video {
  7660. width: 100%;
  7661. height: 100%;
  7662. }
  7663. }
  7664. }
  7665. &__footer {
  7666. height: 90px;
  7667. border-top: 1px solid #eee;
  7668. text-align: center;
  7669. .take {
  7670. display: inline-block;
  7671. width: 200px;
  7672. height: 40px;
  7673. padding: 0;
  7674. border-radius: 20px;
  7675. text-align: center;
  7676. line-height: 40px;
  7677. margin: 24px auto;
  7678. }
  7679. }
  7680. }
  7681. .info {
  7682. &__content {
  7683. height: 500px;
  7684. overflow-y: scroll;
  7685. .handCenter {
  7686. width: 600px;
  7687. height: 300px;
  7688. background: #ccc;
  7689. }
  7690. .upload-box {
  7691. display: inline-block;
  7692. vertical-align: top;
  7693. .el-icon-error {
  7694. cursor: pointer;
  7695. z-index: 99;
  7696. position: absolute;
  7697. left: 100%;
  7698. bottom: 100%;
  7699. font-size: 20px;
  7700. color: red;
  7701. }
  7702. }
  7703. }
  7704. }
  7705. .showconfirm {
  7706. &__content {
  7707. .text {
  7708. padding-bottom: 20px;
  7709. color: red;
  7710. }
  7711. }
  7712. }
  7713. }
  7714. .answer-question {
  7715. max-height: 416px;
  7716. overflow-y: auto;
  7717. padding: 16px;
  7718. background: rgb(63, 68, 73);
  7719. &::-webkit-scrollbar {
  7720. display: none;
  7721. }
  7722. &__header {
  7723. border-bottom: 1px solid #555;
  7724. .textarea-wrap {
  7725. // background: #65696D;
  7726. border: 1px solid #555;
  7727. border-radius: 8px;
  7728. .textarea {
  7729. height: 100%;
  7730. &::placeholder {
  7731. color: red;
  7732. }
  7733. }
  7734. }
  7735. .submit {
  7736. padding: 10px 20px;
  7737. border-radius: 2px;
  7738. text-align: center;
  7739. font-size: 16px;
  7740. margin: 10px 0;
  7741. float: right;
  7742. }
  7743. }
  7744. &__body {
  7745. .question-list {
  7746. &__item {
  7747. padding: 20px 0;
  7748. display: flex;
  7749. &__avatar {
  7750. width: 40px;
  7751. height: 40px;
  7752. display: table-cell;
  7753. border-radius: 50%;
  7754. text-align: center;
  7755. overflow: hidden;
  7756. img {
  7757. display: inline-block;
  7758. vertical-align: middle;
  7759. max-width: 100%;
  7760. max-height: 100%;
  7761. }
  7762. }
  7763. &__content {
  7764. flex: 1;
  7765. border-bottom: 1px solid #555555;
  7766. margin-left: 10px;
  7767. .nickname {
  7768. font-size: 14px;
  7769. font-family: Microsoft YaHei;
  7770. font-weight: bold;
  7771. color: #f5f5f5;
  7772. line-height: 24px;
  7773. }
  7774. .desc {
  7775. font-size: 14px;
  7776. font-family: Microsoft YaHei;
  7777. font-weight: 400;
  7778. color: #cccccc;
  7779. line-height: 24px;
  7780. }
  7781. .time {
  7782. font-size: 14px;
  7783. font-family: Microsoft YaHei;
  7784. font-weight: 400;
  7785. color: #999999;
  7786. line-height: 24px;
  7787. .replay {
  7788. float: right;
  7789. font-size: 14px;
  7790. font-family: Microsoft YaHei;
  7791. font-weight: 400;
  7792. color: #3f8dfd;
  7793. line-height: 24px;
  7794. margin-right: 20px;
  7795. }
  7796. .del {
  7797. float: right;
  7798. cursor: pointer;
  7799. font-size: 14px;
  7800. font-family: Microsoft YaHei;
  7801. font-weight: 400;
  7802. color: #fa8c16;
  7803. line-height: 24px;
  7804. margin-right: 20px;
  7805. }
  7806. }
  7807. .reply-list {
  7808. margin: 20px 0;
  7809. width: 100%;
  7810. background-color: #2f3236;
  7811. border-radius: 8px;
  7812. padding: 0 0 0 20px;
  7813. &__item {
  7814. padding: 20px 0;
  7815. display: flex;
  7816. border-bottom: 1px solid #555555;
  7817. &:nth-last-of-type(1) {
  7818. border: 0;
  7819. }
  7820. &__avatar {
  7821. width: 40px;
  7822. height: 40px;
  7823. display: table-cell;
  7824. border-radius: 50%;
  7825. text-align: center;
  7826. border-radius: 50%;
  7827. overflow: hidden;
  7828. img {
  7829. display: inline-block;
  7830. vertical-align: middle;
  7831. max-width: 100%;
  7832. max-height: 100%;
  7833. }
  7834. }
  7835. &__content {
  7836. border-radius: 8px;
  7837. flex: 1;
  7838. margin-left: 10px;
  7839. .nickname {
  7840. font-size: 14px;
  7841. font-family: Microsoft YaHei;
  7842. font-weight: bold;
  7843. color: #f5f5f5;
  7844. line-height: 24px;
  7845. }
  7846. .desc {
  7847. font-size: 14px;
  7848. font-family: Microsoft YaHei;
  7849. font-weight: 400;
  7850. color: #666666;
  7851. line-height: 24px;
  7852. }
  7853. .time {
  7854. font-size: 14px;
  7855. font-family: Microsoft YaHei;
  7856. font-weight: 400;
  7857. color: #999999;
  7858. line-height: 24px;
  7859. .reply {
  7860. float: right;
  7861. font-size: 14px;
  7862. font-family: Microsoft YaHei;
  7863. font-weight: 400;
  7864. color: #3f8dfd;
  7865. line-height: 24px;
  7866. margin-right: 20px;
  7867. cursor: pointer;
  7868. user-select: none;
  7869. }
  7870. .del {
  7871. cursor: pointer;
  7872. margin-right: 20px;
  7873. float: right;
  7874. font-size: 14px;
  7875. font-family: Microsoft YaHei;
  7876. font-weight: 400;
  7877. color: #ff3b30;
  7878. line-height: 24px;
  7879. }
  7880. }
  7881. }
  7882. }
  7883. }
  7884. }
  7885. }
  7886. }
  7887. }
  7888. }
  7889. .lecture-notes {
  7890. &::-webkit-scrollbar {
  7891. display: none;
  7892. }
  7893. max-height: 416px;
  7894. overflow-y: auto;
  7895. padding: 16px;
  7896. background: rgb(63, 68, 73);
  7897. &__content {
  7898. .left-boxs {
  7899. // float: left;
  7900. // width: 462px;
  7901. .textarea {
  7902. border-bottom: 1px solid #555555;
  7903. .submit {
  7904. padding: 10px 20px;
  7905. border-radius: 2px;
  7906. text-align: center;
  7907. font-size: 16px;
  7908. margin: 10px 0;
  7909. float: right;
  7910. }
  7911. }
  7912. .note-list {
  7913. &__content {
  7914. border-bottom: 1px solid #555555;
  7915. &__title {
  7916. width: 216px;
  7917. height: 24px;
  7918. background: #ccc;
  7919. border-radius: 24px;
  7920. font-size: 14px;
  7921. color: #666666;
  7922. text-align: center;
  7923. line-height: 24px;
  7924. margin: 20px 0;
  7925. }
  7926. }
  7927. &__item {
  7928. display: flex;
  7929. padding: 15px;
  7930. .el-icon-video-play {
  7931. cursor: pointer;
  7932. font-size: 20px;
  7933. color: #3f8dfd;
  7934. }
  7935. &__content {
  7936. flex: 1;
  7937. margin-left: 10px;
  7938. .title {
  7939. cursor: pointer;
  7940. font-size: 14px;
  7941. font-family: Microsoft YaHei;
  7942. font-weight: bold;
  7943. color: #3f8dfd;
  7944. line-height: 24px;
  7945. }
  7946. .desc {
  7947. font-size: 14px;
  7948. font-family: Microsoft YaHei;
  7949. font-weight: 400;
  7950. color: #666666;
  7951. line-height: 24px;
  7952. }
  7953. .time {
  7954. font-size: 14px;
  7955. font-family: Microsoft YaHei;
  7956. font-weight: 400;
  7957. color: #999999;
  7958. line-height: 24px;
  7959. }
  7960. }
  7961. }
  7962. }
  7963. .pagination {
  7964. margin-top: 30px;
  7965. text-align: center;
  7966. }
  7967. }
  7968. .right-box {
  7969. width: 786px;
  7970. float: right;
  7971. .lecture-list {
  7972. background: #f5f7fa;
  7973. border-radius: 8px;
  7974. &__header {
  7975. padding: 0 16px;
  7976. height: 40px;
  7977. line-height: 40px;
  7978. font-size: 18px;
  7979. font-family: Microsoft YaHei;
  7980. font-weight: bold;
  7981. color: #333333;
  7982. .slide-btn {
  7983. cursor: pointer;
  7984. float: right;
  7985. font-size: 14px;
  7986. font-family: Microsoft YaHei;
  7987. font-weight: 400;
  7988. color: #999999;
  7989. }
  7990. }
  7991. &__body {
  7992. .list {
  7993. &__item {
  7994. border-top: 1px solid #fff;
  7995. padding: 0 8px 0 16px;
  7996. height: 56px;
  7997. line-height: 55px;
  7998. display: flex;
  7999. align-items: center;
  8000. .title {
  8001. flex: 1;
  8002. font-size: 16px;
  8003. font-family: Microsoft YaHei;
  8004. font-weight: 400;
  8005. color: #333333;
  8006. }
  8007. .btns {
  8008. .btn {
  8009. cursor: pointer;
  8010. display: inline-block;
  8011. vertical-align: middle;
  8012. width: 80px;
  8013. height: 32px;
  8014. background: #ffffff;
  8015. border: 1px solid #3f8dfd;
  8016. border-radius: 16px;
  8017. text-align: center;
  8018. line-height: 30px;
  8019. color: #3f8dfd;
  8020. margin: 0 8px;
  8021. }
  8022. }
  8023. }
  8024. }
  8025. }
  8026. &__footer {
  8027. margin-top: 24px;
  8028. .lecture-scan {
  8029. background: #f5f7fa;
  8030. border-radius: 8px;
  8031. overflow: hidden;
  8032. &__header {
  8033. height: 40px;
  8034. line-height: 40px;
  8035. padding: 0 16px;
  8036. font-size: 16px;
  8037. font-family: Microsoft YaHei;
  8038. font-weight: bold;
  8039. color: #333333;
  8040. }
  8041. &__body {
  8042. height: 800px;
  8043. text-align: center;
  8044. overflow-y: scroll;
  8045. .iframe {
  8046. width: 100%;
  8047. }
  8048. }
  8049. }
  8050. }
  8051. }
  8052. }
  8053. }
  8054. }
  8055. .user_notes {
  8056. border-bottom: 1px solid #555;
  8057. .p1 {
  8058. margin: 8px 0px;
  8059. color: #3f8dfd;
  8060. font-size: 14px;
  8061. span {
  8062. float: right;
  8063. color: #999;
  8064. font-size: 12px;
  8065. }
  8066. }
  8067. .p2 {
  8068. margin-bottom: 8px;
  8069. font-size: 14px;
  8070. color: #ccc;
  8071. }
  8072. }
  8073. /deep/ textarea {
  8074. background: #65696d;
  8075. color: #c7c7c7;
  8076. border-color: transparent;
  8077. }
  8078. /deep/ .el-input__count {
  8079. color: #999;
  8080. background: transparent;
  8081. }
  8082. .lecture-notesjy {
  8083. display: flex;
  8084. flex-direction: column;
  8085. max-height: 416px;
  8086. .listItem {
  8087. padding-bottom: 14px;
  8088. margin-bottom: 10px;
  8089. border-bottom: 1px solid #eee;
  8090. .titles {
  8091. color: #fff;
  8092. font-weight: bold;
  8093. text-align: center;
  8094. padding: 10px;
  8095. }
  8096. .btns {
  8097. display: flex;
  8098. justify-content: space-around;
  8099. align-items: center;
  8100. .btn {
  8101. border-radius: 8px;
  8102. background-color: #fff;
  8103. padding: 6px 16px;
  8104. user-select: none;
  8105. cursor: pointer;
  8106. transition: all 0.2s;
  8107. &:hover {
  8108. background-color: #f2f7ff;
  8109. color: #3f8dfd;
  8110. }
  8111. }
  8112. }
  8113. }
  8114. .lecture-listFooter {
  8115. flex: 1;
  8116. overflow: auto;
  8117. }
  8118. }
  8119. .topstyle {
  8120. border-bottom: 2px solid #eee;
  8121. margin-bottom: 16px;
  8122. p {
  8123. background-color: #f8f8f9;
  8124. font-size: 14px;
  8125. color: #3f8dfd;
  8126. padding: 5px 12px;
  8127. }
  8128. }
  8129. .height_style {
  8130. max-height: 600px;
  8131. overflow-y: auto;
  8132. }
  8133. .list_style {
  8134. height: 60px;
  8135. color: #222;
  8136. line-height: 58px;
  8137. padding: 0px 16px;
  8138. cursor: pointer;
  8139. transition: all 0.2s;
  8140. &:hover {
  8141. background-color: rgba(63, 141, 253, 0.3) !important;
  8142. }
  8143. }
  8144. .list_styleHeader {
  8145. height: 60px;
  8146. color: #3f8dfd;
  8147. line-height: 58px;
  8148. padding: 0px 16px;
  8149. }
  8150. </style>