| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022 |
- <template>
- <view class="content">
- <view :style="{height: statusBarHeight+'px',width: '100%',background:'#000'}"></view>
- <view class="video-box">
- <!-- 返回按钮 -->
- <!-- #ifdef APP-PLUS -->
- <image class="back-img" @click.stop="$navBack()" src="@/static/image/hall/back_white_icon.png"></image>
- <!-- #endif -->
- <view class="cousrseImg x-c" v-show="!pickCatalog.url">
- <u-loading-icon size="30"></u-loading-icon>
- <!-- <image :src="data.imgUrl" mode="aspectFit"></image> -->
- </view>
- <!-- 视频 -->
- <view class="video-container"
- style="position: relative;height: 422rpx;"
- :videoPlayStatus="videoPlayStatus"
- :change:videoPlayStatus="xgplayer.changeVideo"
- :danmuFunInfo="danmuFunInfo"
- :change:danmuFunInfo="xgplayer.danmuFun">
- <view id="detail-video"
- :pickCatalog="pickCatalog"
- :change:pickCatalog="xgplayer.initJs"
- :exitFullscreen="exitFullscreen"
- :change:exitFullscreen="xgplayer.handleExitFullscreen"
- @click.stop="clickVideo"></view>
-
- <image class="back-img" v-if="fullScreen" @click.stop="videoback" src="@/static/image/hall/back_white_icon.png"></image>
- <!-- 疗法 -->
- <view v-if="showTherapy&&fullScreen" class="horizontal" @tap.stop>
- <view class="goods" @tap.stop="goToPro(showTherapyItem.packageId)">
- <image :src="showTherapyItem.imgUrl" mode="aspectFill" class="goodsimg"></image>
- <view class="goodsname textOne">{{showTherapyItem.packageName}}</view>
- </view>
- <view style="width: 20px;height: 20px;position: absolute;right:0rpx;top:0rpx;z-index:999">
- <image style="width: 20px;height: 20px" src="@/static/images/close40.png"
- @tap.stop="closeTherapy"></image>
- </view>
- </view>
- <view class="audiobox es es-ver es-ac es-pc" v-if="showAudio" @click.stop>
- <view class="audiobox-title">
- <image class="back" @click.stop="$navBack()" src="@/static/image/hall/back_white_icon.png"></image>
- <view class="textOne">
- {{catalogueList[pickCatalogIdx]&&catalogueList[pickCatalogIdx].title}}
- </view>
- </view>
- <view class="es es-ver es-ac es-pc">
- <view class="es es-ac es-pc">
- <image class="es-icon-52 es-icon-play-last"
- src="/static/images/other/video/play-last.png" @tap="endedPlayPrev()"></image>
- <image class="es-icon-88 es-ml-50 es-mr-50"
- :src="audioPlayIng?'/static/images/other/video/play-stop.png':'/static/image/hall/video_icon.png'" @tap="playAudioAction()"></image>
- <image class="es-icon-52 es-icon-play-next"
- src="/static/images/other/video/play-next.png" @tap="endedPlayNext('click')"></image>
- </view>
- <view class="audiobox-time">{{$formatSeconds(tempAudioDuration)}} / {{$formatSeconds(pickCatalog.seconds)}}</view>
- </view>
- <view class="audiobox-video x-ac" @tap="backPlayVideo">返回视频</view>
- </view>
- <!-- 视频控制栏 -->
- <view class="es"
- :style="{paddingLeft:fullScreen ? statusBarHeight+'px': 0,display: isPause||isClickVideo?'flex':'none'}"
- style="width: 100%;height: 48px;position: absolute;z-index: 999;bottom: 0;left: 0;background: transparent;">
- <view class="xgplayer" id="controls_new_root" style="flex: 1;background:transparent;"></view>
- <view v-if="fullScreen" class="xgplayer-switch xgplayer-icon es es-ac es-pc" style="padding: 0 8px 8px 8px;">
- <view class="danmu-controls es es-ac es-pc" @click="openDanmu">
- 点我发弹幕
- </view>
- <view class="danmu-controls-r es es-ac es-pc">
- <image class="xg-img danmu-switch-open" v-show="danmuFunInfo.switch==1" src="/static/images/other/course/danmu-on.png" @tap="switchDanmu(0)"></image>
- <image class="xg-img danmu-switch-open" v-show="danmuFunInfo.switch==0" src="/static/images/other/course/danmu-off.png" @tap="switchDanmu(1)"></image>
- </view>
- </view>
- </view>
- <!-- 弹幕设置 -->
- <uni-popup ref="danmuPopup" type="bottom" style="z-index: 999;">
- <view class="danmuPopup" :style="{marginLeft:fullScreen ? statusBarHeight+'px': 0}">
- <view class="danmuPopup-head border-line" style="margin-bottom: 20px;">
- <image class="danmu-icon" v-show="danmuFunInfo.switch==1" src="/static/images/other/course/danmu-on.png" @click="switchDanmu(0)"></image>
- <image class="danmu-icon" v-show="danmuFunInfo.switch==0" src="/static/images/other/course/danmu-off.png" @click="switchDanmu(1)"></image>
- <image class="danmu-icon" src="/static/images/other/course/danmu-style-on.png" mode="aspectFill" @click="openDanmuStyle(2)"></image>
- <u--input class="danmuPopup-input" placeholder="发个弹幕吧~" border="surround" shape="circle" focus :adjustPosition="false" :autoBlur="true" maxlength="140" clearable v-model="danmuIput.txt"></u--input>
- <button class="danmuPopup-send"
- :disabled="danmubtnLoading"
- @click="sendDanmu"
- >发送</button>
- </view>
- <view
- class="danmuPopup-con"
- :style="{height: danmuboxHeight ? fullScreen ? `calc(${danmuboxHeight}px + 20px)` : danmuboxHeight+'px' : 'auto'}">
- <view class="es" style="margin-bottom: 25px;">
- <view class="es-mr-24px">弹幕字号</view>
- <view class="es">
- <view class="es-mr-24px" v-for="size in danmuFontSize" :style="{color: danmuIput.fontSize==size ?'#FF5C03':'#757575'}" @click="clickStyle('font',size)">{{size=='16px'?'默认':'较小'}}</view>
- </view>
- </view>
- <view class="es" style="margin-bottom: 25px;">
- <view class="es-mr-24px">弹幕位置</view>
- <view class="es">
- <view class="es-mr-24px" v-for="mode in danmuMode" :style="{color: danmuIput.mode==mode ?'#FF5C03':'#757575'}" @click="clickStyle('mode',mode)">
- {{mode=='top'?'置顶':mode=='bottom'?'置底':'滚动'}}
- </view>
- </view>
- </view>
- <view class="es" style="margin-bottom: 25px;">
- <view class="es-mr-24px">弹幕颜色</view>
- <view class="es es-fx" style="flex-wrap: wrap;">
- <view class="es-mr-24px coloritem" v-for="color in colorList"
- :style="{background: color,border:`2px solid ${danmuIput.color== color ?'#FF5C03':'#F5F7FA'}`}"
- @click="clickStyle('color',color)"></view>
- </view>
- </view>
- <view class="es">
- <view class="es-mr-24px">弹幕位置</view>
- <view class="es">
- <view class="es-mr-24px" v-for="item in danmuArea" :style="{color: danmuFunInfo.area==item ?'#FF5C03':'#757575'}" @click="clickArea(item)">
- {{item*100+'%'}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </uni-popup>
- </view>
- </view>
- <scroll-view class="scroll-Y" :scroll-y="true" :style="'height:' + clientHeight + 'px;'" v-show="!isShowList">
- <view class="video-info">
- <view class="video-info-header">
- <view class="video-info-headerl">
- <image mode="aspectFill" :src="data.talentAvatar"></image>
- <text class="textOne">{{data.courseName}}</text>
- </view>
- <button class="follow-btn" @tap="doFollow()">
- <image v-show="!isFollow" src="@/static/image/hall/guanzhu_icon.png" mode="aspectFill"></image>
- <text>{{isFollow?"已关注":"关注"}}</text>
- </button>
- </view>
-
- <view>
- <view class="video-info-voicebox2">
- <text>{{data.views}}次播放 · 总时长:{{data.totalDuration}}</text>
- <view class="x-c" @click="isExpand = !isExpand" v-if="showExpandText">
- <text>{{isExpand ? '收起简介' : '展开简介'}}</text>
- <view :class="isExpand ? 'rotate':''"><uni-icons type="down" size="14"
- color="#bbbbbb"></uni-icons></view>
- </view>
- </view>
- <view :class="showDes|| !showExpandText? 'opacity video-info-desc':'video-info-desc' "
- id="descbox-desc" :style="{height: isExpand ? 'auto': '84rpx'}">
- {{data.description}}
- <image v-show="!isExpand&&showExpandText" class="desc-image x-c"
- src="/static/images/other/bg_bar.png"></image>
- </view>
- </view>
-
- <!-- 参考文献 -->
- <view class="es es-mb-32" v-if="$isIos()">
- <text class="es es-fs-24 es-c-99"> --参考文献:包括但不限于《内科学》、《外科学》、《中医学》等医学专业书籍</text>
- </view>
- <view class="video-info-footer">
- <view @tap="handleListen()">
- <image src="@/static/image/hall/sound_icon24.png" mode="aspectFill"></image>
- <text :style="{color: showAudio ? '#FF5C03':'#757575'}">听声</text>
- </view>
- <view @tap="$navTo('./note?courseId='+courseId)" v-if="!$qconfig.isAppStore">
- <image src="@/static/image/hall/note_icon24.png" mode="aspectFill"></image>
- <text>笔记</text>
- </view>
- <view @tap="doFavorite()">
- <image
- :src="isFavorite?'/static/image/hall/collect_on_icon24.png':'/static/image/hall/collect_icon24.png'"
- mode="aspectFill"></image>
- <text>{{isFavorite?"已收藏":"收藏"}}</text>
- </view>
- <view @tap="doLike()">
- <image :src="isLike?'/static/image/hall/like_on_icon.png':'/static/image/hall/like_icon.png'"
- mode="aspectFill"></image>
- <text>{{isLike?"喜欢":"喜欢"}}</text>
- </view>
- <view @tap="openShare()">
- <image src="@/static/image/hall/weixin_icon.png" mode="aspectFill"></image>
- <text>分享</text>
- </view>
- <view @tap="openDanmu()" :style="{display: $isLogin()&&!showAudio ? 'flex':'none'}">
- <image src="@/static/images/other/course/danmu-set.png" mode="aspectFill"></image>
- <text>弹幕</text>
- </view>
- </view>
- </view>
-
- <!-- 讲堂目录 -->
- <view class="video-directory">
- <view class="box-header">
- <view class="box-header-title">讲堂目录</view>
- <view class="box-header-r" @tap="goToCatalogue()">
- <text>共{{catalogueList.length}}节</text>
- <image src="@/static/image/hall/my_right_arrow_right_icon.png" mode="aspectFill"></image>
- </view>
- </view>
- <scroll-view class="video-directory-scrollx" scroll-x="true" :scroll-into-view="scrollIntoViewId"
- scroll-with-animation="true" overflow-anchor="none">
- <view :id="'cataLogue' + index"
- :class="pickCatalogIdx == index ? 'active-scrollitem video-directory-scrollitem':'video-directory-scrollitem'"
- v-for="(item,index) in catalogueList" :key="index" @click="pickCatalogAction(index)">
- <view
- :class="index>1 && canShowVip(item) ? 'freeflag freeflag-member':'freeflag freeflag-free'">
- {{ index>1 && canShowVip(item) ? '限时特惠' : '免费'}}
- </view>
- <view class="video-directory-num">
- <text>第{{item.courseSort}}讲</text>
- <image v-if='pickCatalogIdx == index' src="@/static/image/hall/hear_icon.png"></image>
- <view class="empty" v-else></view>
- </view>
- <view class="video-directory-title">
- <view class="textTwo">{{item.title}}</view>
- <!-- <view class="imagebox">
- <view class="mask" v-if='pickCatalogIdx != index'>
- <image src="@/static/image/hall/video_icon.png" mode="aspectFill"></image>
- </view>
- <image class="video-directory-img" src="@/static/image/home1/logo.png" mode="aspectFill"></image>
- </view> -->
- </view>
- </view>
- </scroll-view>
- </view>
- <!-- 课程疗法 -->
- <view class="therapy" v-show="packageJsonList&&packageJsonList.length > 0">
- <view class="box-header-title" style="margin-bottom: 20rpx;">课程疗法</view>
- <scroll-view class="therapy-scrollx" scroll-x="true" :scroll-into-view="scrollIntoTherapy"
- scroll-with-animation="true" overflow-anchor="none">
- <view :class="therapyIndex == idx ? 'therapy-active therapy-scrollitem':'therapy-scrollitem'"
- :id="'therapy' + idx" v-for="(item,idx) in packageJsonList" :key="idx"
- @click="handleTherapy(item,idx)">
- <image mode="aspectFill" class="therapy-goodsimg" :src="item.imgUrl"></image>
- <view class="therapy-goodsname textTwo">{{item.packageName}}</view>
- </view>
- </scroll-view>
- </view>
- <!-- 评论 -->
- <view class="video-comment" v-if="$qconfig.isAppStore">
- <view class="box-header">
- <view class="box-header-title">评论</view>
- <view class="box-header-r" @tap="goToComment()">
- <!-- <text>共{{data.commentNum}}条</text> -->
- <text>去评论/更多评论</text>
- <image src="@/static/image/hall/my_right_arrow_right_icon.png" mode="aspectFill"></image>
- </view>
- </view>
- <view style="padding: 20rpx 24rpx;">
- <commentList :commentList="data.commentList" />
- </view>
- </view>
- <!-- 猜你喜欢 -->
- <view class="video-comment">
- <view class="box-header">
- <view class="box-header-title">猜你喜欢</view>
- <view class="box-header-r" v-if="false">
- <text>更多</text>
- <image src="@/static/image/hall/my_right_arrow_right_icon.png" mode="aspectFill"></image>
- </view>
- </view>
- <view class="hall-box">
- <hallItem class="gapitem" v-for="(item, index) in dataList " :key="index" :item="item"
- @click.native="navTo('/pages/course/info?courseId='+item.courseId)" />
- </view>
- </view>
- </scroll-view>
- <!-- h5下载 -->
- <h5-down-app-tip :pageUrl="pageUrl" :type="'course'" :courseId="courseId" />
- <!-- 分享弹窗 -->
- <u-popup :show="showShare" @close="closeShareAct()">
- <share-box :shareItem="shareItem" @closeShare='closeShareAct()'></share-box>
- </u-popup>
- <!-- VIP特权弹窗 -->
- <uni-popup ref="popPrivilege" type="bottom" borderRadius="10rpx 10rpx 0px 0px">
- <view class="privilegeBox es es-ver es-br-38 es-pt-30 es-pb-30 ">
- <view class="es es-fx es-pc es-h-56 es-ml-48 es-mr-48">
- <image class="es-w-74 es-h-40" style="position: absolute;left:60rpx;top:0"
- src="../../static/image/course/xiangyun.png"></image>
- <view class="es-fs-40 es-h-56 es-fw-500" style="color: #FFDAA3;">开通VIP专享以下特权</view>
- <image class="es-w-74 es-h-40" style="position: absolute;right:60rpx;top:0"
- src="../../static/image/course/xiangyun2.png"></image>
- <image class="es-w-40 es-h-40" style="position: absolute;right:-20rpx;top:-10rpx"
- @tap="closePrivilege" src="/static/images/close40.png"></image>
- </view>
- <view class="sec1 es-mt-20 es-ml-48 es-mr-48">
- <view class="es x-bc es-pl-28 es-pt-12">
- <view class="l1">
- <view class="x-f">
- <image class="es-w-44 es-h-44" src="../../static/image/course/privilege/fozhu.png">
- </image>
- <view class="es-ml-8 es-c-white es-fs-32 es-fw-600">名家讲堂</view>
- </view>
- <view class="es-fs-30 es-mt-10 es-c-99">畅享10000+VIP视频</view>
- </view>
- <view class="es">
- <image src="../../static/image/course/zyx.png" class="es-w-183 es-h-98 es-br-15"></image>
- <!-- <view class="es-fs-20 es-br-8 es-w-80 es-h-30 es-fw-bold x-c" style="position:absolute; right: 0;top:10rpx;background: #000;opacity: 0.7;color: #FFDAA3;">10000+</view> -->
- </view>
- </view>
- </view>
- <view class="sec2 es es-fx es-pc es-h-56 es-mt-40 es-ml-48 es-mr-48">
- <!-- <image class="es-w-148 es-h-3" style="position: absolute;left:0;top:16rpx" src="../../static/image/course/privilege/line1.png"></image> -->
- <view class="es-fs-30 es-h-56 es-fw-bold" style="color: #FFDAA3;">超多权益待你开启</view>
- <!-- <image class="es-w-148 es-h-3" style="position: absolute;right:0;top:16rpx" src="../../static/image/course/privilege/line2.png"></image> -->
- </view>
- <view class="primenu-box es es-fx es-pc es-mt-20 es-ml-48 es-mr-48">
- <view class="content-inner">
- <view class="item">
- <image v-if="$isIos()" class="img" src="/static/image/course/privilege/she.png" mode="heightFix"></image>
- <text class="label">AI舌诊</text>
- </view>
- <view class="item">
- <image class="img jlxw" src="/static/image/course/privilege/tizhi.png" mode="heightFix">
- </image>
- <text class="label">体质检测</text>
- </view>
- <view class="item">
- <image class="img" src="/static/image/course/privilege/baike.png" mode="heightFix"></image>
- <text class="label">养生百科</text>
- </view>
- <view class="item">
- <image class="img" src="/static/image/course/privilege/yishu.png" mode="heightFix"></image>
- <text class="label">经典医书</text>
- </view>
- <view class="item">
- <image class="img" src="/static/image/course/privilege/more.png" mode="heightFix"></image>
- <text class="label">多设备登陆</text>
- </view>
- <view class="item">
- <image class="img" src="/static/image/course/privilege/ad.png" mode="heightFix"></image>
- <text class="label">去除广告</text>
- </view>
- </view>
- </view>
- <view class="es-ml-48 es-mr-48 es-mt-10 es-pt-10 es-pb-10 es-br-5" style="background:#2a2f32">
- <view v-for="(item, index) in vipMethods" :key="index" @tap="changeVipMethod(index)"
- class="vipMethodItem es x-bc">
- <view class="x-bc es-ml-14">
- <view class="es-fs-32 es-fw-500 es-ml-14">{{item}}</view>
- </view>
- <image v-if="vipMethodIdx==index" class="es-w-40 es-h-40 es-br-ban es-mr-14 es-mr-26"
- src="../../static/image/course/vipBuy/check.png"></image>
- <view v-else class="es-w-40 es-h-40 es-br-ban es-mr-14 es-mr-26 circle"></view>
- </view>
- </view>
- <view v-if="isShowPayType" class="es-ml-48 es-mr-48 es-mt-40 x-bc" style="background:#2a2f32">
- <view v-for="(item, index) in payTypes" :key="index" @tap="changePayType(index)"
- class="payTypeItem es x-bc " :class="payType==index+1?'pt_ac':''">
- <view class="x-bc es-ml-14">
- <image class="es-w-59 es-h-52"
- :src="index==0?'../../static/image/course/vipBuy/wx.png':'../../static/image/course/vipBuy/zfb.png'">
- </image>
- <view class="es-fs-33 es-c-white es-fw-500 es-ml-14">{{item}}</view>
- </view>
- <image v-if="payType==index+1" src="../../static/image/course/vipBuy/check.png"
- class="es-w-40 es-h-40 es-br-ban es-mr-14"></image>
- <view v-else class="es-w-40 es-h-40 es-br-ban es-mr-14 circle"></view>
- </view>
- </view>
- <view class="es es-mt-40 es-ml-48 es-mr-48 x-c">
- <view @tap="doBuy()" class="es-h-94 x-c es-fw-700 es-fs-34 vipCourseBtn vipAc es-br-46"
- style="width: 310rpx;">
- 立即购买
- </view>
- </view>
- </view>
- </uni-popup>
- <uni-popup ref="popTip" type="dialog">
- <uni-popup-dialog cancelText="支付失败" confirmText="支付成功" mode="base" content="是否已支付成功?" title="提示" :duration="2000" :before-close="true" @close="confirmTip" @confirm="confirmTip"></uni-popup-dialog>
- </uni-popup>
- <!-- 评论弹窗 -->
- <popupBottom ref="mescrollItem" :visible.sync="specVisible" @close="closePop" :cmdId="courseId"
- :smsNum="data.commentNum" :title="data.commentNum+'条评论'" :type="1" radius="32" maxHeight="1200">
- </popupBottom>
- </view>
- </template>
- <script>
- import {getUserInfo} from '@/api/user';
- import { getCourseById,getCourseList,getCourseVideoList,checkFavorite,checkFollow,checkLike,doFavorite,doFollow,doLike,addDuration,
- createCourseOrder,createIntegralOrder,getIntegral,createVipOrder,aliPayment,wxPayment,getCourseOrderById,getComments,saveMsg } from '@/api/course';
- import commentList from "./components/commentList.vue";
- import hallItem from "./components/hallItem.vue";
- import popupBottom from '@/components/popupBottom/popupBottom.vue';
- import MescrollCompMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-comp.js";
- import adMask from "@/components/adMask/adMask.vue";
- import { couponPop } from '@/utils/couponPop';
-
- export default {
- mixins: [MescrollCompMixin],
- components: {
- popupBottom,
- commentList,
- hallItem,
- adMask
- },
- data() {
- return {
- player: null,
- Events: null,
- isH5: false,
- showDes: false,
- showExpandText: false,
- isExpand: true,
- textHeight: 0, //文本高度
- courseId: null,
- isShare: false,
- videoId: null,
- isLearning: false,
- data: {
- courseId: null,
- imgUrl: "",
- talentAvatar: "",
- price: "",
- remark: "",
- noteNum: 0,
- courseName: "",
- description: "",
- cataIndex: 0,
- isFast: 1,
- isAutoPlay: false,
- commentList: [{
- avatar: "",
- content: "",
- createTime: "",
- nickName: ""
- }]
- },
- dataList: [],
- talentId: null,
- studyLog: null,
- isNext: 0,
- user: {},
- isFavorite: 0,
- isFollow: 0,
- isLike: 0,
- clientHeight: 0,
- isShowList: false, // 是否展示讲堂目录列表
- catalogueList: [],
- scrollIntoViewId: 'cataLogue0',
- pickCatalog: {
- // videoUrl: "https://tcpv.ylrzcloud.com/course/20241014/1728890026184.mp4",
- videoUrl:"",
- thumbnail: "",
- duration: 0,
- videoId: 0,
- seconds: 0,
- studyTime: null,
- isFast: 1,
- },
- pickCatalogIdx: 0,
- packageJsonList: [],
- poster: '',
- showShare: false,
- shareItem: {
- imageUrl: "",
- title: "",
- path: ""
- },
- fullScreen: false,
- showTherapy: false,
- showTherapyItem: {},
- playDuration:0, // 播放时长
- timer: null, // 定时器
- lookDuration: 0 ,// 观看时长
- countdowning: false, // 观看时长计时开关
- showAudio: false, //音频展示
- videoPlayStatus:{
- status: '',
- tempAudioDuration: 0,
- studyTime: 0,
- }, // 视频播放状态
- pageUrl: '',
- courseOrderId:0,
- scrollIntoTherapy: 'therapy0',
- therapyIndex: null,
- allLookTimer: null, // 定时器
- allLookDuration:0,//H5未登录状态播放五分钟就跳出登录页面
- tempAudioDuration:0, //用于记录视频和音频播放的时间,达到无缝续播
- audioTimer:null,
- playTime:"00:00",
- studyTimes:0,
- audioContext: null,
- audioPlayIng:false,
- isPostBack:true,//页面是否已初次加载
- specVisible: false,
- esComment:null,
- vipSelIndex:0,
- vipMethods:["开通会员"],
- vipMethodIdx:0,
- isShowPayType:false,
- payTypes:["微信支付","支付宝支付"],
- payType:1,//微信支付1 支付宝支付2
- createType:3,//1直接购买,2芳华币兑换 3开通会员
- orderId:null,
- order:null,
- showPayTips:false,
- isPlayIng:false,//是否正在播放
- statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
- direction: "",
- nodeTime: 0,
- exitFullscreen: '', //是否退出全屏yes , no 加上时间戳
- danmubtnLoading: false,
- colorList:['#ffffff','#e70012','#fcf103','#009843','#00a0ea','#e2027f'],
- danmuMode:['scroll','top','bottom'],
- danmuArea:[0.1,0.25,0.5,0.75,1],
- danmuFontSize: ['18px','16px'],
- danmuIput: {
- txt: '',
- mode: 'scroll',
- color: '#ffffff',
- fontSize: '18px',
- },
- danmuItem:{
- //发送弹幕
- duration: 10000,
- id: '',
- txt: '',
- mode: 'scroll',
- style: {
- color: '#ffffff',
- fontSize: '18px',
- border: 'solid 1px #ffffff',
- borderRadius: '5px',
- padding: '2px 5px',
- backgroundColor: 'rgba(255, 255, 255, 0.1)'
- }
- },
- danmuFunInfo: {
- time: new Date().getTime(),
- event: '',
- switch: 1,
- area: 0.25
- },
- socket:null,
- isSocketOpen: false,
- isSend:true,
- reOpenSocket: false,
- pingpangTimes:null,
- danmuboxHeight: 0,
- isPause: true, // 视频是否暂停
- isClickVideo: false, // 是否点击视频
- }
- },
- onLoad(options) {
- this.courseId = options.courseId;
- this.isShare = options.isShare || false
- this.videoId = options.videoId || null;
- this.isLearning = options.isLearning || false;
- // #ifdef APP-PLUS
- uni.getSubNVueById('videoPopup').hide();
- uni.$on('getEventType', (data) => {
- uni.getSubNVueById('videoPopup').hide();
- if(data.type == 'confirm') {
- // 确认
- this.tipConfirm(data.extraData)
- } else {
- // 取消
- this.tipCancel(data.extraData)
- }
- })
- // #endif
- this.esComment=this.$refs["esComment"];
-
- let that=this;
- uni.$on('refreshTitle', (pingCount) => {
- that.data.commentNum=pingCount;
- });
- this.getCourseInfo();
- if (this.$isLogin()) {
- this.getUserInfo();
- this.checkFavorite();
- this.checkLike();
- // #ifndef H5
- uni.onKeyboardHeightChange(this.keyboardHeightChange);
- // #endif
- }
- },
- onShow() {
- this.exitFullscreen = 'no'+ new Date().getTime()
- //#ifdef H5
- this.isH5 = true;
- //#endif
-
- //#ifdef APP-PLUS
- if(this.$isLogin()){
- if(!this.timer){
- this.timer=setInterval(() => {
- if(this.countdowning){ //观看时长计时开关开启
- this.lookDuration+=5;
- this.addIntegral();
- }
- }, 5000);
- }
- }
- //#endif
- if(!this.$isLogin()){
- if(!this.allLookTimer){
- this.allLookTimer=setInterval(() => {
- if(this.countdowning){ //观看时长计时开关开启
- this.allLookDuration+=5;
- }
- }, 5000);
- }
- }
- this.playFun()
- if(this.showPayTips){
- this.$refs.popTip.open();
- this.showPayTips=false;
- }
- },
- onReady() {
- this.audioContext = uni.createInnerAudioContext();
- uni.getSystemInfo({
- success: (res) => {
- this.clientHeight = res.windowHeight - uni.upx2px(422) - res.statusBarHeight;
- }
- });
- },
- onHide() {
- const type = this.showAudio ? 'audio' : 'video'
- this.pauseFun(type);
- },
- onUnload() {
- if(this.socket!=null){
- this.socket.close()
- clearInterval(this.pingpangTimes)
- this.socket = null
- }
- // #ifndef H5
- uni.offKeyboardHeightChange(this.keyboardHeightChange);
- // #endif
- this.exitFullscreen = 'yes'+ new Date().getTime()
- // 页面卸载时清除计时器
- this.endCountsTime();
- this.addStudyCourse();
- this.destoryAudio();
- // #ifdef APP-PLUS
- uni.$off('getEventType');
- // #endif
- uni.$emit('refreshStudyTime', {});
- uni.$off("backStudyTime");
- uni.$off("refreshUser");
- uni.$off("showPayTips");
- uni.$off("pickCatalogAction");
- uni.$off("refreshTitle");
- uni.$off("refreshCatalog");
- },
- methods: {
- endCountsTime(){
- if (this.timer) {
- clearInterval(this.timer);
- this.timer = null;
- }
- if (this.allLookTimer) {
- clearInterval(this.allLookTimer);
- this.allLookTimer = null;
- }
- },
- getCourseInfo() {
- this.showDes = false
- getCourseById(this.courseId).then(res => {
- if (res.code == 200) {
- this.data = res.data;
- this.dataList = res.data.courseList;
- this.talentId = res.data.talentId;
- this.studyLog = res.data.studyLog;
- this.isNext = res.data.isNext;
- this.videoId = this.studyLog ? this.studyLog.videoId : null;
- this.vipMethods = ["开通会员"];
- if (this.data.isIntegral == 1) {
- this.vipMethods.push("芳华币兑换")
- }
- if (this.data.sellPrice > 0) {
- this.vipMethods.push(this.data.sellPrice + "元购买");
- }
- setTimeout(()=>{
- this.getDescHeight()
- },10)
- this.getCourseVideoList();
- if (this.$isLogin()) {
- this.checkFollow();
- }
- }
- },
- rej => {}
- );
- },
- getDescHeight() {
- this.$nextTick(() => {
- const query = uni.createSelectorQuery().in(this);
- query
- .select("#descbox-desc")
- .boundingClientRect((data) => {
- this.textHeight = data.height
- this.isExpand = this.textHeight > uni.upx2px(84) ? false : true
- this.showExpandText = this.textHeight >= uni.upx2px(84) ? true : false
- this.showDes = true
- })
- .exec();
- })
- },
- //课程目录
- getCourseVideoList() {
- let that = this;
- const params = {
- "courseId": this.courseId
- };
- getCourseVideoList(params, 1, 50).then(res => {
- if (res.code == 200) {
- this.catalogueList = res.data.list;
- if (this.catalogueList.length > 0) {
- this.pickCatalogIdx = this.getCatalogIdx();
- //开始播放计时
- if (this.data.isAutoPlay == 1) {
- this.pickCatalogMethod(this.pickCatalogIdx);
- }
- }
- }
- },
- rej => {}
- );
- },
- canShowVip(item) {
- return true;
- if (this.user.isVip) {
- return false;
- }
- return item.isVip == 1 && item.isBuy == 0;
- },
- getCatalogIdx() {
- let index = this.catalogueList.findIndex(item => item.videoId == this.videoId);
- if (!this.videoId || index < 0) {
- index = 0;
- }
- return index;
- },
- getUserInfo() {
- let that = this;
- getUserInfo().then(res => {
- if (res.code == 200) {
- if (res.user != null) {
- uni.setStorageSync('userInfo', JSON.stringify(res.user));
- this.user = res.user;
- } else {
- uni.showToast({
- icon: 'none',
- title: res.msg,
- });
- }
- }
- },
- rej => {}
- );
- },
- checkFavorite() {
- checkFavorite(this.courseId).then(res => {
- if (res.code == 200) {
- this.isFavorite = res.isFavorite;
- }
- },
- rej => {}
- );
- },
- checkFollow() {
- checkFollow(this.talentId).then(res => {
- if (res.code == 200) {
- this.isFollow = res.isFollow;
- }
- },
- rej => {}
- );
- },
- checkLike() {
- checkLike(this.courseId).then(res => {
- if (res.code == 200) {
- this.isLike = res.isLike;
- }
- },
- rej => {}
- );
- },
- doFollow() {
- if (!this.$isLogin()) {
- this.$showLoginPage();
- return;
- }
- uni.showLoading({
- title: ""
- });
- doFollow(this.talentId).then(res => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- title: '操作成功',
- icon: 'none'
- });
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- this.isFollow = !this.isFollow;
- },
- rej => {}
- );
- },
- doFavorite() {
- if (!this.$isLogin()) {
- this.$showLoginPage();
- return;
- }
- uni.showLoading({title: ""});
- doFavorite(this.courseId).then(res => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- title: '操作成功',
- icon: 'none'
- });
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- this.isFavorite = !this.isFavorite;
- },
- rej => {}
- );
- },
- doLike() {
- if (!this.$isLogin()) {
- this.$showLoginPage();
- return;
- }
- uni.showLoading({
- title: ""
- });
- doLike(this.courseId).then(res => {
- uni.hideLoading();
- if (res.code == 200) {
- uni.showToast({
- title: '操作成功',
- icon: 'none'
- });
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- this.isLike = !this.isLike;
- },
- rej => {}
- );
- },
- openShare() {
- if (this.isH5) {
- return;
- }
- if (this.$isEmpty(this.pickCatalog.title)) {
- this.shareItem.title = this.data.courseName;
- } else {
- this.shareItem.title = this.data.courseName + "-" + this.pickCatalog.title;
- }
- this.shareItem.isMini = false
- this.shareItem.imageUrl = this.data.imgUrl;
- this.shareItem.compressImage = 1;
- this.shareItem.courseId = this.courseId;
- this.shareItem.summary = !this.$isEmpty(this.data.description) ? this.data.description : "";
- let cdn = uni.getStorageSync('h5Path');
- this.shareItem.url = cdn + "/pages/course/info?courseId=" + this.courseId;
- this.showShare = true;
- },
- goToComment(){
- if(this.isH5){
- this.specVisible=true;
- }
- else{
- const subNVue = uni.getSubNVueById('commentN');
- const windowInfo = uni.getWindowInfo();
- const statusBarHeight = windowInfo.statusBarHeight || 0;
- const topPx = uni.upx2px(422) + statusBarHeight + 20;
- subNVue.setStyle({
- top: topPx + 'px'
- });
- subNVue.show('slide-in-bottom', 250);
- uni.$emit('comment', {
- videoId: this.pickCatalog.videoId,
- courseId: this.courseId
- });
- }
- },
- closePop(){
- this.specVisible=false;
- },
- navTo(url) {
- uni.navigateTo({
- url: url
- });
- },
- openVipCourse(index) {
- if(!this.isPostBack){
- this.isPostBack=true;
- return;
- }
- this.showPopPrivilege(index);
- },
- showPopPrivilege(index){
- if(this.isH5){
- this.$refs.popPrivilege.open("bottom");
- }
- else{
- const subNVue = uni.getSubNVueById('privilege');
- subNVue.show('slide-in-bottom', 250);
- let pickCatalog=this.catalogueList[index];
- uni.$emit('privilege', {
- videoId: pickCatalog.videoId,
- courseId: this.courseId,
- sellPrice:this.data.sellPrice,
- catalogIndex:index,
- integral: this.data.integral,
- });
- }
- },
- changeVip(index){
- this.vipSelIndex=index;
- if(index==2){
- this.showPopPrivilege();
- }
- },
- changeVipMethod(index){
- this.vipMethodIdx=index;
- const vipMethod=this.vipMethods[index];
- this.isShowPayType=false;
- if(vipMethod.indexOf('元购买')!=-1){ //直接购买
- this.isShowPayType=true;
- this.createType=1;
- }
- if(vipMethod.indexOf('芳华币兑换')!=-1){ //芳华币兑换
- this.createType=2;
- }
- if(vipMethod.indexOf('开通会员')!=-1){ //开通会员
- this.createType=3;
- }
- },
- changePayType(index){
- this.payType=index+1;
- },
- doBuy(){
- if(this.createType==1){ //直接购买
- this.createCourseOrder();
- }
- else if(this.createType==2){ //芳华币兑换
- this.createIntegralOrder();
- }
- else{ //开通会员
- this.$navTo('.cc');
- }
- },
- createCourseOrder(){
- if(!this.$isLogin()){
- this.$showLoginPage();
- return;
- }
- uni.showLoading({title:""});
- let params={"courseId":this.courseId,"createType":this.createType,"videoId":this.pickCatalog.videoId,"payType":this.payType};
- createCourseOrder(params).then(res => {
- uni.hideLoading();
- if(res.code==200){
- this.order=res.order;
- if(this.payType==1){ //微信支付
- this.doWxPay();
- }else{ //支付宝
- this.doAlipay();
- }
- }else{
- uni.showToast({title: res.msg,icon: 'none'});
- }
- },
- rej => {}
- );
- },
- createIntegralOrder(){
- if(!this.$isLogin()){
- this.$showLoginPage();
- return;
- }
- uni.showLoading({title:""});
- let params={"courseId":this.courseId,"videoId":this.pickCatalog.videoId};
- createIntegralOrder(params).then(res => {
- uni.hideLoading();
- if(res.code==200){
- uni.showToast({title: res.msg,icon: 'success'});
-
- }else{
- uni.showToast({title: res.msg,icon: 'none'});
- }
- },
- rej => {}
- );
- },
- doAlipay(){
- var data = {orderId:this.order.orderId};
- uni.showLoading();
- aliPayment(data).then(res => {
- uni.hideLoading()
- this.$refs.popPrivilege.close();
- if(res.code==200){
- this.$refs.popTip.open();
- if (uni.getSystemInfoSync().platform == 'android') {
- var alipayScheme ='alipays://platformapi/startApp?&saId=10000007&qrcode=' + res.data.qr_code;
-
- }else{
- var alipayScheme ='alipay://platformapi/startApp?&saId=10000007&qrcode=' + res.data.qr_code;
-
- }
- console.log(alipayScheme)
- // 在uni-app中使用plus.runtime.openURL打开URL
- plus.runtime.openURL(alipayScheme, function(error) {
- // console.error('打开支付宝失败: ' + error.message);
- // 处理打开支付宝失败的情况,比如提示用户或者跳转到其他支付方式
- });
- }
- else{
- uni.showToast({
- title:res.msg,
- icon:'none'
- })
-
- }
- },
- rej => {}
- );
- },
- doWxPay(){
- var that=this;
- plus.share.getServices(function(res){
- var sweixin = null;
- for(var i=0;i<res.length;i++){
- var t = res[i];
- if(t.id == 'weixin'){
- sweixin = t;
- }
- }
- if(sweixin){
- console.log('调起小程序')
- that.$refs.popPrivilege.close();
- that.$refs.popTip.open()
- //唤起微信跳转小程序
- sweixin.launchMiniProgram({
- id:"gh_feb7753a310b",//gh_7a6a32e5ef61 御君方互医
- path:'pages_order/coursePayment?orderId='+that.orderId+"&payMethod=app",
- type:0
- },function(){
- console.log("微信唤起成功");
- return true;
- },function(e){
- console.log("微信唤起失败",e);
- uni.showToast({
- title:'微信唤起失败,请检查是否有微信应用',
- icon:'none'
- })
- return false;
- })
-
- }else{
- uni.showToast({
- title:'微信唤起失败,请检查是否有微信应用',
- icon:'none',
- duration:3000
- })
- return false;
- }
-
- },function(res){
- console.log(JSON.stringify(res));
- });
- },
- goToCatalogue(){
- if(this.isH5){
- let url='./catalogue?courseId='+this.courseId+'&videoId='+this.pickCatalog.videoId+'&isAutoPlay='+this.data.isAutoPlay+'&studyTimes='+this.tempAudioDuration;
- this.$navTo(url);
- }
- else{
- const subNVue = uni.getSubNVueById('catalogueN');
- subNVue.show('slide-in-bottom', 250);
- uni.$emit('catalogue', {
- videoId: this.pickCatalog.videoId,
- courseId: this.courseId,
- pickCatalogIdx:this.pickCatalogIdx
- });
- }
- },
- pickCatalogAction(index,type){
- if (this.pickCatalogIdx === index) return;
- if(type == 'catalogueN'&&this.isNext == 1 && this.pickCatalogIdx != index - 1) {
- const type = this.showAudio ? 'audio' : 'video'
- this.pauseFun(type);
- this.openTips(index)
- return
- }
- console.log("qxj pickCatalogAction");
- this.pickCatalogActionFun(index,type)
- },
- pickCatalogActionFun(index,type) {
- if(!this.$isLogin()){ //切换小节需要登录
- this.$showLoginPage();
- return;
- }
- if(this.isH5 && index>1){
- uni.showToast({title: "请下载App观看",icon: 'none'});
- return;
- }
- //切换之前添加课程目录学习记录
- this.addStudyCourse();
- this.addIntegral(); //加芳华币
- this.pickCatalogMethod(index,type);
- },
- pickCatalogMethod(index,type){
- setTimeout(()=>{
- this.scrollIntoViewId = 'cataLogue' + index;
- },100)
- let tempCatalogue=this.catalogueList[index];
- this.lookDuration=0;//重置观看当前小节的课程时长
- if(tempCatalogue.isVip==1){ //需要Vip才能观看
- if(!this.$isLogin()){
- this.$showLoginPage();
- return;
- }
- if(this.user==null){
- this.user=this.$getUserInfo();
- }
- if(this.user.isVip!=1 && tempCatalogue.isBuy!=1){
- this.openVipCourse(index);
- return;
- }
- }
- this.pickCatalogIdx=index;
- //传递消息给小节弹窗
- uni.$emit('pickCatalogIdx', { pickCatalogIdx:index,type:type });
- this.pickCatalog=this.catalogueList[index];
- //let tempUrl="https://tcpv.ylrzcloud.com/course/2025125/1764917825726.mp4"; //腾讯云cdn播放地址
- //let tempUrl="https://tcpv-ylrzcloud.tliveapp.com/course/2025125/1764917825726.mp4?nopcdn=1"; //腾讯云重定向cdn
- //let tempUrl="https://ylwatch-1322623152.cos.ap-chongqing.myqcloud.com/video/tcpv.mp4";//腾讯云源站视频
- //let tempUrl="https://rtobs.ylrztop.com/course/2025125/1764911857622.mp4";
- // this.pickCatalog.lineOne=tempUrl;
- // this.pickCatalog.lineTwo=tempUrl;
- // this.pickCatalog.videoUrl=tempUrl;
- this.pickCatalog.isFast = this.data.isFast;
- this.pickCatalog=this.catalogueList[index];
- this.pickCatalog.isFast = this.data.isFast;
- this.packageJsonList = this.pickCatalog && this.pickCatalog.packageJson ? JSON.parse(this.pickCatalog.packageJson) : [];
- this.initStudyTime(this.pickCatalog.studyTime || 0)
- const url = this.pickCatalog.lineTwo ? this.pickCatalog.lineTwo : this.pickCatalog.videoUrl
- this.resetAudioContext(url);
- },
- resetAudioContext(url) {
- if (this.audioContext==null) {
- this.audioContext = uni.createInnerAudioContext();
- }
- this.audioContext.src = url
- // this.audioContext.src = this.pickCatalog.videoUrl;
- this.audioContext.onTimeUpdate(()=>{
- this.initStudyTime(this.audioContext.currentTime)
- })
- },
- changeLine(data) {
- this.resetAudioContext(data.url)
- },
- endedPlayNext(type){
- let nextCatalog=this.catalogueList[this.pickCatalogIdx+1];
- if(!nextCatalog){
- return;
- }
- if(nextCatalog && this.pickCatalogIdx<this.catalogueList.length-1){ //未播放到最后一节自动续播
- this.pickCatalogAction(this.pickCatalogIdx+1)
- }
- },
- endedPlayPrev(){
- if(this.pickCatalogIdx == 0) {
- uni.showToast({
- title: '已经是第一节视频了',
- icon: 'none',
- position: 'top',
- duration: 2000
- })
- return
- }
- let nextCatalog=this.catalogueList[this.pickCatalogIdx-1];
- if(!nextCatalog){
- return;
- }
- this.pickCatalogAction(this.pickCatalogIdx-1)
- },
- addStudyCourse(){
- if(this.catalogueList.length==0 || this.tempAudioDuration==0){
- return;
- }
- // this.pickCatalog=this.catalogueList[this.pickCatalogIdx];
- // this.packageJsonList = this.pickCatalog && this.pickCatalog.packageJson ? JSON.parse(this.pickCatalog.packageJson) : [];
- if(this.pickCatalog.isBuy==0){
- return;
- }
- console.log('this.pickCatalog.videoId',this.pickCatalog.videoId)
- uni.setStorageSync("videoId",this.pickCatalog.videoId);
- const parmas={"courseId":parseInt(this.courseId),"duration":this.tempAudioDuration,"videoId":this.pickCatalog.videoId};
- addDuration(parmas).then(res => {
- if(res.code==200){
- if(res.alert) {
- couponPop({},e=>{
- uni.navigateTo({
- url:'/pages/doctor/doctorList'
- })
- })
- }
- }
- },
- rej => {}
- );
- },
- addIntegral(){
- // 观看到视频时长50%加一次芳华币
- if(this.lookDuration==0 || this.playDuration==0){
- return;
- }
- // this.pickCatalog=this.catalogueList[this.pickCatalogIdx];
- // this.packageJsonList = this.pickCatalog && this.pickCatalog.packageJson ? JSON.parse(this.pickCatalog.packageJson) : []
- if(this.lookDuration<this.pickCatalog.seconds*0.5){
- return;
- }
- let data={videoId:this.pickCatalog.videoId,duration:this.lookDuration};
- getIntegral(data).then(res => {
- if(res.code==200){
- uni.showToast({icon:'none',title:res.msg,duration:3000,position:'bottom'});
- this.countdowning=false;
- }
- },
- rej => {}
- );
- },
- closeShareAct(){
- this.showShare=false;
- },
- closeTherapy() {
- this.showTherapy = false
- },
- goToPro(productId) {
- this.exitFullscreen = 'yes'+ new Date().getTime()
- this.showTherapy = false
- setTimeout(()=> {
- uni.navigateTo({
- url: "/pages/store/packageDetails?packageId="+productId
- });
- }, 500);
- },
- // 返回视频
- backPlayVideo() {
- this.showAudio = false;
- this.audioPlayIng = false;
- this.isLearning=false;
- this.pauseFun('audio');
- this.playFun();
- },
- // 点击视频
- clickVideo() {
- this.isClickVideo = true
- setTimeout(()=>{
- this.isClickVideo = false
- },3000)
- },
- changeCountdowning(data) {
- this.countdowning=data.countdowning;
- // 视频是否暂停
- if(data.isXGPause==false) {
- setTimeout(()=>{
- this.isPause = data.isXGPause
- },3000)
- } else {
- this.isPause = data.isXGPause
- }
- },
- onTimeUpdate(data) {
- this.playDuration = Math.round(data.time)
- this.initStudyTime(this.playDuration)
- if(data.time>=this.pickCatalog.seconds){
- this.countdowning = false; //观看时长开关关闭
- }
- if(this.isH5){
- if(this.allLookDuration>=300){ //H5未登录状态播放五分钟就跳出登录页面
- if(!this.$isLogin()){
- this.$showLoginPage();
- const type = this.showAudio ? 'audio' : 'video'
- this.pauseFun(type);
- }
- }
- }
- else{
- if(this.allLookDuration>=120){ //未登录状态播放两分钟就跳出登录页面
- if(!this.$isLogin()){
- this.$showLoginPage();
- const type = this.showAudio ? 'audio' : 'video'
- this.pauseFun(type);
- }
- }
- }
- uni.$u.throttle(this.checkTherapy, 1000,false);
- },
- checkTherapy() {
- let currentTime = Math.round(this.tempAudioDuration || 0)
- let node = this.packageJsonList.filter(item => item.duration == currentTime)
- if(node&&node.length > 0) {
- this.nodeTime = node[0].duration
- this.showTherapyItem = node[0]
- if(!this.showTherapy) {
- this.showTherapy = true
- }
- } else {
- if(this.showTherapy && this.nodeTime && this.nodeTime > currentTime) {
- this.showTherapy = false
- }
- }
- },
- // 打开集观看提示弹窗
- openTips(index){
- // #ifdef APP-PLUS
- uni.$emit('getTipShowType', {index:index})
- uni.getSubNVueById('videoPopup').show();
- // #endif
- },
- tipConfirm() { // 提示确认
- // 继续播放
- //传递消息给小节弹窗
- uni.$emit('pickCatalogIdx', {pickCatalogIdx:this.pickCatalogIdx,type: 'catalogueN'});
- this.playFun()
- },
- tipCancel(index) { // 提示取消
- // 播放选择的一节
- this.pickCatalogActionFun(index,'catalogueN')
- },
- // 听声
- handleListen() {
- if(this.showAudio) {
- this.backPlayVideo()
- } else {
- // 打开音频
- this.showAudio = true
- this.pauseFun('video');
- this.playFun()
- }
- },
- // 播放音频
- playAudioAction(type) {
- if(!this.audioPlayIng){
- setTimeout(()=>{
- this.audioContext.play()
- },200)
- }
- else{
- this.pauseAudioAction()
- }
- this.audioPlayIng=!this.audioPlayIng;
- },
- // 播放
- playFun() {
- // console.log("initSocket videoId:",this.pickCatalog.videoId)
- this.reOpenSocket = false
- if(this.pickCatalog.videoId) {
- this.getDanmuList()
- if (this.socket) {
- this.socket.close({
- success:()=>{
- this.reOpenSocket = true
- clearInterval(this.pingpangTimes)
- }
- })
- } else {
- this.initSocket()
- }
- }
- this.audioPlayIng = false
- if(this.showAudio) {
- const ended = this.tempAudioDuration == this.pickCatalog.seconds
- this.audioContext.seek(ended ? 0: this.tempAudioDuration);
- // this.audioContext.onSeeked(() => {
- this.playAudioAction()
- // })
- } else {
- this.videoPlayStatus={
- status: 'play'+ new Date().getTime(),
- tempAudioDuration: this.tempAudioDuration || 0,
- studyTime: this.pickCatalog.studyTime,
- }
- }
- },
- initStudyTime(time){
- this.tempAudioDuration = Math.round(time)
- },
- // 暂停音频
- pauseAudioAction() {
- if(this.audioContext) {
- setTimeout(()=>{
- this.audioContext.pause();
- },200)
- clearInterval(this.audioTimer);
- this.audioTimer=null;
- }
- },
- destoryAudio() {
- if(this.audioContext) {
- this.audioContext.destroy();
- clearInterval(this.audioTimer);
- this.audioTimer=null;
- }
- },
- // 暂停
- pauseFun(type) {
- this.audioPlayIng = true
- if(type == 'audio') {
- this.pauseAudioAction()
- } else if(type == 'video'){
- this.videoPlayStatus={
- status: 'pause'+ new Date().getTime(),
- tempAudioDuration: this.tempAudioDuration || 0,
- studyTime: this.pickCatalog.studyTime,
- }
- }
- },
- closePrivilege(){
- this.$refs.popPrivilege.close();
- },
- closeTip(){
- this.$refs.popTip.close();
- },
- canShowVip(item){
- return true;
- if(this.user.isVip){
- return false;
- }
- return item.isVip==1 && item.isBuy==0;
- },
- confirmTip() {
- this.getUserInfo();
- this.getCourseInfo();
- this.$refs.popTip.close();
- uni.showLoading({title:"请稍侯...",mask:true,duration:3000});
- setTimeout(()=>{
- this.getCourseOrderById();
- },2000);
- },
- getCourseOrderById(){
- getCourseOrderById(this.courseOrderId).then(res => {
- uni.hideLoading();
- if(res.code==200){
- if(res.order.status==2 || res.order.payTime!=null){
- // #ifdef APP-PLUS
- if(plus.runtime.channel=="baidu"){ //获取渠道标识
- let bdCmdType=uni.getStorageSync("bdCmdType");
- if(bdCmdType!=null && parseInt(bdCmdType)<=2){
- //this.$registerIdCode("orders",2,res.order.payMoney.toString()); //已下单
- }
- }
- // #endif
- uni.showToast({title:"支付成功",icon:'success'});
- }
- else if(res.order.status==1){
- uni.showToast({title:"课程待支付请稍侯",icon:'none'});
- }
- else{
- uni.showToast({title:"支付失败",icon:'error'});
- }
- }
- },
- rej => {}
- );
- },
- handleTherapy(item,idx) {
- this.scrollIntoTherapy = 'therapy' + idx,
- this.therapyIndex = idx
- setTimeout(()=> {
- uni.navigateTo({
- url: "/pages/store/packageDetails?packageId="+item.packageId
- });
- }, 500);
- },
- onFullscreenChange(data) {
- this.fullScreen = data.isFullscreen
- // direction取为 vertical 或 horizontal
- this.direction = data.direction
- if (!data.isFullscreen) {
- // 退出全屏,锁定竖屏
- // #ifdef APP-PLUS
- plus.screen.lockOrientation('portrait-primary');
- // #endif
- }
- },
- // 全屏返回
- videoback() {
- this.exitFullscreen = 'yes'+ new Date().getTime()
- },
- // 弹幕
- openDanmu() {
- // #ifdef H5
- uni.showToast({
- title: "请下载app发弹幕",
- icon: "none"
- })
- return
- // #endif
- this.danmuIput= {
- txt: '',
- mode: 'scroll',
- color: '#ffffff',
- fontSize: '18px',
- }
- this.$refs.danmuPopup.open()
- },
- keyboardHeightChange(res) {
- // #ifndef H5
- this.danmuboxHeight = res.height
- // #endif
- },
- openDanmuStyle(type) {
- if(type==2) {
- uni.hideKeyboard()
- }
- },
- clickStyle(type,value) {
- if(type=='mode') {
- this.danmuIput.mode = value
- } else if(type=='font') {
- this.danmuIput.fontSize = value
- } else if(type=='color') {
- this.danmuIput.color = value
- this.danmuIput.border = `solid 1px ${value}`
- }
- },
- clickArea(value) {
- this.danmuFunInfo = {
- time: new Date().getTime(),
- event: 'setArea',
- switch: this.danmuFunInfo.switch,
- area: value
- }
- },
- // 发送弹幕
- sendDanmu() {
- if(this.danmuIput.txt==''||this.danmuIput.txt.trim()=='') {
- uni.showToast({
- title: '弹幕不能为空',
- icon: 'none'
- })
- return;
- }
- if (!this.isSend) {
- return;
- }
- const param = {
- userId: this.user.userId || '',
- userType: 2, // 1-管理员,2-用户
- courseId: this.courseId,
- videoId: this.pickCatalog.videoId,
- type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
- content: this.danmuIput.txt,
- time: this.tempAudioDuration, // 弹幕对应视频时间节点()秒
- fontSize: this.danmuIput.fontSize,
- mode: this.danmuIput.mode,
- color: this.danmuIput.color,
- }
- saveMsg(param).then(res=>{
- if(res.code == 200) {
- const status = res.status ? 0 : 1
- this.sendMsg(param,status);
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- }
- })
- },
- // 弹幕开关
- switchDanmu(type) {
- this.danmuFunInfo = {
- time: new Date().getTime(),
- event: 'switch',
- switch: type,
- area: this.danmuFunInfo.area
- }
- },
- // 弹幕列表
- getDanmuList(){
- this.danmuFunInfo = {
- time: new Date().getTime(),
- event: 'clearDanmuList',
- switch: this.danmuFunInfo.switch,
- area: this.danmuFunInfo.area,
- }
- let patam = {
- pageNum: 1,
- pageSize: 300,
- courseId: this.courseId,
- videoId: this.pickCatalog.videoId,
- openCommentStatus: 2,// 1-开启评论;2-开启弹幕;3-关闭
- }
- getComments(patam).then(res=>{
- let danmuList = []
- if(res.code == 200&&res.data.list&&res.data.list.length>0) {
- let arry = res.data.list.sort((a, b) => a.time - b.time)
- danmuList = arry.map(item=>({
- duration: this.danmuItem.duration,
- id: item.commentId,
- txt: item.content,
- start: Number(item.time || 0)*1000, // 单位:ms 毫秒
- mode: item.mode|| this.danmuItem.mode,
- style: {
- color: item.color || this.danmuItem.style.color,
- fontSize: item.fontSize || this.danmuItem.style.fontSize,
- padding: this.danmuItem.style.padding,
- border:this.user.userId ==item.userId ? item.color ? `solid 1px ${item.color}`: this.danmuItem.style.border : 'none',
- borderRadius: this.user.userId==item.userId ? this.danmuItem.style.borderRadius : 0,
- backgroundColor: this.user.userId==item.userId ? this.danmuItem.style.backgroundColor : 'transparent'
- }
- }))
- }
- try {
- this.danmuFunInfo = {
- time: new Date().getTime(),
- event: 'getDanmuList',
- switch: this.danmuFunInfo.switch,
- danmuList: danmuList,
- area: this.danmuFunInfo.area
- }
- } catch (e) {
- console.log('e',e)
- }
- })
- },
- //创建一个socket连接
- initSocket() {
- let userId = this.user.userId;
- let that = this;
- this.socket = uni.connectSocket({
- // url: getApp().globalData.danmuWSUrl + "/ws/barrage/" + this.pickCatalog.videoId,
- url: getApp().globalData.danmuWSUrl + "/app/webSocket/" + userId,
- multiple: true,
- // header: {
- // 'token': uni.getStorageSync('AppToken')
- // },
- success: res => {
- console.log('WebSocket连接已打开1!');
- that.isSocketOpen = true
- that.reOpenSocket = false
-
- // 保持心跳
- if(that.pingpangTimes) {
- clearInterval(that.pingpangTimes)
- that.pingpangTimes= null
- }
- that.pingpangTimes=setInterval(()=>{
- // let data={cmd:"heartbeat",userId: userId};
- let data = {
- userId: userId || '',
- userType: 2, // 1-管理员,2-用户
- courseId: that.courseId,
- videoId: that.pickCatalog.videoId,
- type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
- cmd:'heartbeat'
- }
- that.socket.send({
- data: JSON.stringify(data),
- success: () => {
- // console.log('WebSocket发送心条数据!');
- },
- fail: () => {
- that.isSocketOpen=false
- }
- });
- },15000)
- },
- error: err => {
- console.log(err)
- },
- })
- this.socket.onMessage((res) => {
- // console.log("收到消息parse",JSON.parse(res.data))
- const redata = JSON.parse(res.data);
- if(redata.cmd=="heartbeat"){
- //心跳
- // console.log("heartbeat")
- }else if(redata.cmd=="sendMsg"){
- that.isSend=true;
- that.addMsg(redata);
- }
- })
- //监听socket打开
- this.socket.onOpen(() => {
- console.log('WebSocket连接已打开2!');
- that.isSocketOpen = true
- that.reOpenSocket = false
- that.isSend = true;
- })
- //监听socket关闭
- this.socket.onClose(() => {
- that.isSocketOpen = false
- that.socket = null
- console.log('WebSocket连接已关闭!',that.reOpenSocket);
- if(that.pingpangTimes) {
- clearInterval(that.pingpangTimes)
- that.pingpangTimes= null
- }
- if(that.reOpenSocket) {
- //重启
- that.initSocket()
- }
- // that.msgEnd = true
- })
- //监听socket错误
- this.socket.onError((err) => {
- console.log("socket err:",err)
- that.isSocketOpen = false
- that.reOpenSocket = false
- that.socket = null
- if(that.pingpangTimes) {
- clearInterval(that.pingpangTimes)
- that.pingpangTimes= null
- }
- })
- },
- sendMsg(param,status) {
- if(status == 1) {
- this.isSend = true;
- this.addMsg({msg: param.content,time: param.time},2)
- return
- }
- if (this.isSocketOpen) {
- var userId = this.user.userId;
- var data = {
- userId: userId || '',
- userType: 2, // 1-管理员,2-用户
- courseId: this.courseId,
- videoId: this.pickCatalog.videoId,
- type:1, // 评论类型 1:评论,2:回复,目前没有回复,默认传1就行了
- msg: param.content,
- cmd: 'sendMsg',
- time: param.time,
- fontSize: param.fontSize,
- mode: param.mode,
- color: param.color,
- };
- this.socket.send({
- data: JSON.stringify(data),
- success: () => {
- console.log("发送成功",data)
- this.$refs.danmuPopup.close()
- this.isSend = false;
- },
- fail: () => {
- console.log("发送失败")
- }
- });
-
- }
- },
- // 收到消息
- addMsg(data,type) {
- let obj = {}
- if (type==2) {
- obj = {
- content: data.msg,
- courseId: this.courseId,
- type: 1,
- userId: this.userId,
- userType: 2,
- videoId: this.pickCatalog.videoId,
- nickName: '',
- time: data.time,
- fontSize: data.fontSize,
- mode: data.mode,
- color: data.color,
- }
- } else {
- obj = {
- content: data.msg,
- courseId: this.courseId,
- type: data.type,
- userId: data.userId,
- userType: data.userType,
- videoId: this.pickCatalog.videoId,
- nickName: data.nickName,
- time: data.time,
- fontSize: data.fontSize,
- mode: data.mode,
- color: data.color,
- }
- }
- this.addDanmuMsg(obj)
- },
- addDanmuMsg(content) {
- const id = content.userId +'_' + new Date().getTime()
- const mystyle = {
- color: content.color || this.danmuItem.style.color,
- fontSize: content.fontSize || this.danmuItem.style.fontSize,
- border: content.color ? `solid 1px ${content.color}`: this.danmuItem.style.border,
- borderRadius: this.danmuItem.style.borderRadius,
- padding: this.danmuItem.style.padding,
- backgroundColor: this.danmuItem.style.backgroundColor
- }
- const otherstyle = {
- color: content.color || this.danmuItem.style.color,
- fontSize: content.fontSize || this.danmuItem.style.fontSize,
- padding: this.danmuItem.style.padding,
- }
- const mode = content.mode || this.danmuItem.mode
- const danmuItem = {
- //发送弹幕
- duration: content.duration ? content.duration : mode=='scro11'? this.danmuItem.duration : this.danmuItem.duration,
- id: content.id || id,
- txt: content.content,
- mode: mode,
- style: this.user.userId == content.userId ? mystyle : otherstyle
- }
- this.danmuFunInfo = {
- time: new Date().getTime(),
- event: 'send',
- switch: this.danmuFunInfo.switch,
- danmuItem: danmuItem,
- area: this.danmuFunInfo.area
- }
- },
- },
- created() {
- let that = this;
- uni.$on('backStudyTime', function(data) {
- that.videoId=data.videoId;
- that.pickCatalogIdx=that.getCatalogIdx();
- that.pickCatalog=that.catalogueList[that.pickCatalogIdx];
- that.pickCatalog.studyTime=data.studyTimes;
- that.catalogueList[that.pickCatalogIdx]=that.pickCatalog;
-
- that.packageJsonList = that.pickCatalog && that.pickCatalog.packageJson ? JSON.parse(that.pickCatalog.packageJson) : []
- that.pickCatalogMethod(that.pickCatalogIdx);
- });
-
- uni.$on('showPayTips', function(data) {
- console.log("qxj showPayTips")
- that.courseOrderId=data.courseOrderId;
- //that.showPayTips=true;
- that.$refs.popTip.open();
- });
-
- uni.$on('refreshUser', function(data) {
- that.getUserInfo();
- that.getCourseInfo();
- });
-
- uni.$on('pickCatalogAction', function(data) {
- that.pickCatalogAction(data.index,data.type);
- });
- uni.$on('refreshCatalog', function(index) {
- let catalog=that.catalogueList[index];
- catalog.isBuy=true;
- that.catalogueList[index]=catalog;
- that.pickCatalogAction(index);
- });
- },
- beforeDestroy() {
- if(this.socket!=null){
- this.socket.close()
- }
- if(this.pingpangTimes) {
- clearInterval(this.pingpangTimes)
- this.pingpangTimes= null
- }
- this.danmuFunInfo = {
- time: new Date().getTime(),
- event: '',
- area: this.danmuFunInfo.area
- }
- },
- destroyed() {
- uni.$off("backStudyTime");
- uni.$off("refreshUser");
- uni.$off("showPayTips");
- uni.$off("pickCatalogAction");
- uni.$off("refreshTitle");
- uni.$off("refreshCatalog");
- // #ifdef APP-PLUS
- uni.$off('getEventType');
- // #endif
- }
- }
- </script>
- <script module="xgplayer" lang="renderjs">
- // import Player from "xgplayer"
- // import Mp4Plugin from "xgplayer-mp4"
- // import 'xgplayer/dist/index.min.css';
- import Danmu from 'xgplayer/es/plugins/danmu'
- // import "xgplayer/es/plugins/danmu/index.css"
- let xgPlayer
- const openDanmu='/static/images/other/course/danmukai.png';
- const closeDanmu='/static/images/other/course/danmukai_1.png';
- export default {
- data() {
- return {
- player: null,
- ownerInstance: null,
- ownerInstanceVideo: null,
- isFullscreen: false,
- isCSSFull: false,
- lineName:"",
- danmuInstance: null,
- newDanmu: {
- //发送弹幕
- duration: 10000,
- id: '',
- txt: '',
- mode: 'scroll',
- style: {
- color: '#ffffff',
- fontSize: '18px',
- border: 'solid 1px #ffffff',
- borderRadius: '10px',
- padding: '5px 11px',
- backgroundColor: 'rgba(255, 255, 255, 0.1)'
- }
- },
- isXGPause: true,
- }
- },
- beforeDestroy() {
- if(this.player) {
- if(this.isFullscreen) {
- if(this.isCSSFull) {
- this.player.exitCssFullscreen()
- } else {
- this.player.exitFullscreen()
- }
- }
- this.player.destroy() // 销毁播放器
- this.player = null
- }
- },
- methods: {
- initJs(newValue, oldValue,ownerInstance) {
- if (typeof window.Player === 'function') {
- this.initPlayer(newValue, oldValue,ownerInstance)
- } else {
- // 动态引入较大类库避免影响页面展示
- const script = document.createElement('script')
- // view 层的页面运行在根目录
- script.src = 'https://unpkg.byted-static.com/xgplayer/3.0.20/dist/index.min.js'
- script.onload = this.initPlayer.bind(this, newValue, oldValue,ownerInstance)
- document.head.appendChild(script)
- const l_tag = document.createElement('link'); // 引入播放器css
- l_tag.rel = 'stylesheet';
- l_tag.href = 'https://unpkg.byted-static.com/xgplayer/3.0.20/dist/index.min.css';
- document.body.appendChild(l_tag);
- }
- },
- initPlayer(newValue, oldValue,ownerInstance) {
- this.Events = window.Player.Events
- if (!this.ownerInstance) this.ownerInstance = ownerInstance
- let xgplayerOption = {
- lang: 'zh',
- url: "",
- id: 'detail-video',
- autoplay: false,
- // height: uni.upx2px(422),
- height: '100%',
- width: '100%',
- poster: "",
- 'x5-video-player-type': 'h5', // 微信内置浏览器设置,防止被浏览器劫持
- playsinline: true,
- playbackRate: false,
- ignores: ['volume', 'miniscreen', 'keyboard'],
- plugins: [Danmu],
- danmu: {
- "comments": [],
- "area": {
- "start": 0,
- "end": 0.25
- },
- "closeDefaultBtn": true,
- "defaultOpen": true,
- ext: {
- channelSize: 30
- }
- },
- startTime: 0, // 起始播放时间
- fullscreenTarget: document.querySelector('.video-container'),
- controls: {
- root: document.getElementById('controls_new_root') // 指定播放器之外挂载dom
- } ,
- // icons: {
- // openDanmu: openDanmu,
- // closeDanmu: closeDanmu
- // },
- commonStyle: {
- // 播放完成部分进度条底色
- playedColor: '#FF5C03',
- cachedColor: 'transparent'
- },
- seekedStatus: 'auto',
- disableGesture: true,
- closeVideoTouch: true,
- closeVideoDblclick: true,
- closeVideoClick: false,
- progress: {
- isDraggingSeek: false,
- isCloseClickSeek: true,
- closeMoveSeek: true
- },
- fullscreen:{
- useScreenOrientation: true,
- lockOrientationType: 'landscape'
- },
- definition: {
- defaultDefinition: "线路二"
- }
- }
- xgplayerOption.url = newValue.lineTwo ? newValue.lineTwo : newValue.videoUrl
- xgplayerOption.definition.defaultDefinition = newValue.lineTwo ? '线路二' :'线路一'
- if(!xgplayerOption.url) return
- xgplayerOption.poster = newValue.thumbnail
- if(newValue.studyTime && newValue.seconds != newValue.studyTime) {
- xgplayerOption.startTime = newValue.studyTime
- }
- if(newValue.isFast == 1) {
- // 允许拖动进度条
- xgplayerOption.progress.isCloseClickSeek = false
- xgplayerOption.progress.closeMoveSeek = false
- }else {
- // 不允许拖动进度条
- xgplayerOption.progress.isCloseClickSeek = true
- xgplayerOption.progress.closeMoveSeek = true
- }
- if(this.player) {
- // this.player.off()
- this.player.playNext({
- url: newValue.lineTwo ? newValue.lineTwo : newValue.videoUrl,
- startTime: newValue.startTime || 0,
- poster:xgplayerOption.thumbnail || '',
- ignores:xgplayerOption.ignores,
- progress: xgplayerOption.progress,
- definition: xgplayerOption.definition,
- })
- } else {
- this.player = new Player(xgplayerOption);
- this.danmuInstance = this.player.getPlugin('danmu')
- this.progressMove(xgplayerOption)
- }
- if(newValue.isFast == 1) {
- this.player.getPlugin('progress').show()
- }else {
- this.player.getPlugin('progress').hide()
- }
- let lines=[]
- if(newValue.lineOne) {
- lines.push({
- name: '线路一',
- definition: '线路一',
- url:newValue.lineOne
- })
- }
- if(newValue.lineTwo) {
- lines.push({
- name: '线路二',
- definition: '线路二',
- url:newValue.lineTwo
- })
- }
- if(newValue.lineThree) {
- lines.push({
- name: '线路三',
- definition: '线路三',
- url:newValue.lineThree
- })
- }
- this.player.emit('resourceReady', lines)
- this.rjsPlayFun(xgplayerOption)
- },
- progressMove(data) {
-
- const Events = this.Events
- this.player.on(Events.PlAY, () => {
- this.isXGPause = false
- this.ownerInstance.callMethod("changeCountdowning",{countdowning:true,isXGPause:this.isXGPause})
- })
- this.player.on(Events.PLAYING, () => {
- // console.log("===播放Events.PLAYING")
- this.isXGPause = false
- this.ownerInstance.callMethod("changeCountdowning",{countdowning:true,isXGPause:this.isXGPause})
- })
- this.player.on(Events.WAITING, () => {
- this.ownerInstance.callMethod("changeCountdowning",{countdowning:false,isXGPause:this.isXGPause})
- })
- this.player.on(Events.PAUSE, () => {
- console.log("===暂停Events.PAUSE")
- this.isXGPause = true
- this.ownerInstance.callMethod("changeCountdowning",{countdowning:false,isXGPause:this.isXGPause})
- })
- this.player.on(Events.ERROR, (error) => {
- console.log('video error:', error)
- this.ownerInstance.callMethod("changeCountdowning",{countdowning:false,isXGPause:this.isXGPause})
- })
- // 监听用户的播放进度
- this.player.on(Events.TIME_UPDATE, () => {
- this.ownerInstance.callMethod("onTimeUpdate",{time: this.player.currentTime});
- })
- this.player.on(Events.ENDED, () => {
- this.ownerInstance.callMethod("changeCountdowning",{countdowning:false,isXGPause:this.isXGPause})
- this.ownerInstance.callMethod("endedPlayNext")
- })
- this.player.on(Events.FULLSCREEN_CHANGE, (isFullscreen) => {
- if(this.isFullscreen == isFullscreen) return
- this.isFullscreen = isFullscreen
- plus.screen.lockOrientation('landscape')
- this.ownerInstance.callMethod("onFullscreenChange",{isFullscreen:isFullscreen})
- })
- this.player.on(Events.CSS_FULLSCREEN_CHANGE, (isFullscreen) => {
- if(this.isFullscreen == isFullscreen) return
- this.isCSSFull = true
- this.isFullscreen = isFullscreen
- this.ownerInstance.callMethod("onFullscreenChange",{isFullscreen:isFullscreen})
- })
- // 清晰度发生变化
- this.player.on(Events.DEFINITION_CHANGE, (res) => {
- if(this.lineName == res.to.name) return
- this.lineName = res.to.name
- this.ownerInstance.callMethod("changeLine",{url: res.to.url})
- })
- },
- rjsPlayFun(xgplayerOption){
- this.ownerInstance.callMethod("playFun",{time: xgplayerOption.startTime})
- },
- changeVideo(newValue, oldValue,ownerInstance) {
- if (!this.ownerInstanceVideo) this.ownerInstanceVideo = ownerInstance
- if(this.player) {
- if(newValue.status.indexOf('play') > -1) {
- const tempAudioDuration = newValue.tempAudioDuration
- const flag = newValue.tempAudioDuration != newValue.studyTime
- if(flag) {
- this.player.seek(tempAudioDuration)
- this.player.on(this.Events.SEEKED, () => {
- setTimeout(()=>{
- this.player.play()
- },200)
- })
- } else {
- setTimeout(()=>{
- this.player.play()
- },200)
- }
- }else if(newValue.status.indexOf('pause') > -1) {
- this.player.pause()
- }
- }
- },
- handleExitFullscreen(newValue, oldValue,ownerInstance) {
- // 退出全屏
- if(this.player&&this.isFullscreen && newValue.indexOf('yes') > -1) {
- if(this.isCSSFull) {
- this.player.exitCssFullscreen()
- } else {
- this.player.exitFullscreen()
- }
- }
- },
- // 发送弹幕
- danmuFun(newValue, oldValue,ownerInstance) {
- if(oldValue && newValue.event == oldValue.event && newValue.time == oldValue.time) {
- return
- }
- if(newValue.event=='send') {
- // 发送弹幕
- // console.log("===========发送弹幕",this.danmuInstance)
- this.danmuInstance.sendComment(newValue.danmuItem)
- }else if(newValue.event=='switch'){
- // 弹幕开关
- // console.log("===========弹幕开关",newValue.switch)
- if(newValue.switch == 1) {
- this.danmuInstance.start()
- } else {
- this.danmuInstance.stop()
- }
- } else if(newValue.event=="getDanmuList") {
- // console.log("===========弹幕列表")
- this.danmuInstance.updateComments(newValue.danmuList,true)
- } else if(newValue.event=="clearDanmuList") {
- // console.log("===========清除列表")
- this.danmuInstance.clear()
- } else if(newValue.event=="setArea"){
- this.danmuInstance.setArea({
- start: 0,
- end: newValue.area,
- })
- }
- }
- }
- }
- </script>
- <style>
- @import './danmu.css';
- </style>
- <style lang="scss" scoped>
- @mixin u-flex($flexD, $alignI, $justifyC) {
- display: flex;
- flex-direction: $flexD;
- align-items: $alignI;
- justify-content: $justifyC;
- }
- .es-mr-24px {
- margin-right: 24px;
- }
- .coloritem {
- height: 24px;
- width: 24px;
- margin-bottom: 12px;
- border-radius: 5px;
- }
- .danmu-controls {
- background-color: #F5F7FA;
- overflow: hidden;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- padding: 0 10px;
- border-radius: 50px 0 0 50px;
- height: 28px;
- overflow: hidden;
- box-sizing: border-box;
- &-r {
- padding: 0 10px;
- border-radius: 0 50px 50px 0;
- height: 28px;
- overflow: hidden;
- box-sizing: border-box;
- background-color: #fff;
- image {
- height: 20px;
- width: 20px;
- }
- }
- }
- ::v-deep {
- .danmu-switch-open, .danmu-switch-closed {
- height: 25px;
- width: 25px;
- }
- }
- .xgplayer-switch {
- background-image: linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));
- }
- .danmuPopup {
- background-color: #fff;
- &-head {
- width: 100%;
- padding: 10px;
- box-sizing: border-box;
- overflow: hidden;
- @include u-flex(row,center,flex-start);
- .danmu-icon {
- height: 24px;
- width: 24px;
- margin-right: 12px;
- }
- }
- &-input {
- flex: 1;
- height: 35px;
- }
- &-send {
- flex-shrink: 0;
- height: 35px;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 5px 15px;
- box-sizing: border-box;
- background: #FF5C03 !important;
- border-radius: 22px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 15px;
- color: #fff !important;
- margin-left: 12px;
- &::after {
- border: none;
- }
- }
- &-con {
- background-color: #F5F7FA;
- padding: 24px 12px 48px 12px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #757575;
- }
- }
- .content {
- background: #f7f7f7;
- }
- .cousrseImg {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 422rpx;
- background-color: #000;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .video-box {
- width: 100%;
- height: 422rpx;
- overflow: hidden;
- position: relative;
- // padding-top: var(--status-bar-height);
- }
- .scroll-Y {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- color: #222222;
- }
- .horizontal {
- width: 130px;
- height: 150px;
- position: absolute;
- bottom: 50px;
- left: 20px;
- z-index: 999;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: flex-end;
- background-color: transparent;
- .es-w-40 {
- width: 20px;
- }
- .es-h-40 {
- height: 20px;
- }
- .goods {
- width: 120px;
- height: 140px;
- border-radius: 10px;
- background-color: rgba(255, 255, 255, 0.4);
- overflow: hidden;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .goodsimg {
- width: 100px;
- height: 100px;
- border-radius: 10px;
- }
- .goodsname {
- width: 100px;
- font-size: 12px;
- box-sizing: border-box;
- padding-top: 7px;
- verflow: hidden;
- word-break: break-all;
- }
- }
- .rotate {
- transform: rotate(-180deg);
- }
- .status_bar {
- background-color: #000;
- }
- .back-img {
- width: 25px;
- height: 25px;
- position: absolute;
- top: 10px;
- left: 34rpx;
- z-index: 99;
- }
- .audiobox {
- width: 100%;
- height: 422rpx;
- position: absolute;
- top: 0;
- left: 0;
- background-color: #333;
- z-index: 9990;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- color: #fff;
- &-video {
- background-color: rgba(255, 255, 255, 0.3);
- padding: 8rpx 20rpx;
- border-radius: 50rpx;
- position: absolute;
- bottom: 40rpx;
- left: 50%;
- transform: translateX(-50%);
- z-index: 9991;
- text-align: center;
- }
- &-title {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 9991;
- padding: 30rpx 40rpx;
- width: 100%;
- box-sizing: border-box;
- background: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
- display: flex;
- align-items: center;
- .back {
- width: 50rpx;
- height: 50rpx;
- margin-right: 15rpx;
- flex-shrink: 0;
- }
- }
- &-time {
- margin-top: 18rpx;
- font-size: 24rpx;
- }
- }
- .scroll-Y {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- color: #222222;
- }
- .video-info {
- padding: 24rpx;
- background-color: #fff;
- &-header {
- width: 100%;
- @include u-flex(row, center, space-between);
- }
- &-headerl {
- flex: 1;
- @include u-flex(row, center, flex-start);
- font-weight: 500;
- font-size: 32rpx;
- overflow: hidden;
- image {
- flex-shrink: 0;
- width: 88rpx;
- height: 88rpx;
- margin-right: 28rpx;
- background: #F5F7FA;
- border-radius: 50%;
- overflow: hidden;
- }
- }
- .follow-btn {
- @include u-flex(row, center, center);
- height: 56rpx;
- min-width: 154rpx;
- padding: 0 23rpx;
- background: #FF5C03;
- border-radius: 28rpx 28rpx 28rpx 28rpx;
- color: #FFFFFF;
- font-size: 28rpx;
- image {
- height: 32rpx;
- width: 32rpx;
- margin-right: 6rpx;
- }
- }
- &-voice {
- width: 100%;
- padding: 24rpx 20rpx 38rpx 28rpx;
- margin-top: 26rpx;
- background: #F5F7FA;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- box-sizing: border-box;
- image {
- width: 48rpx;
- height: 48rpx;
- }
- &-l {
- @include u-flex(row, center, flex-start);
- image {
- margin-right: 20rpx;
- }
- }
- }
- &-voicebox1 {
- @include u-flex(row, center, space-between);
- }
- &-voicebox2 {
- padding: 24rpx 0;
- @include u-flex(row, center, space-between);
- font-weight: 400;
- font-size: 26rpx;
- color: #757575;
- }
- ::v-deep .uni-collapse-item__title-arrow {
- margin-right: -8rpx;
- }
- .opacity {
- position: relative !important;
- opacity: 1 !important;
- z-index: 1 !important;
- }
- &-desc {
- margin-bottom: 32rpx;
- font-weight: 400;
- font-size: 28rpx;
- color: #222222;
- word-break: break-all;
- overflow: hidden;
- line-height: 42rpx;
- position: absolute;
- opacity: 0;
- z-index: -1;
- .desc-image {
- height: 60rpx;
- width: 100%;
- position: absolute;
- bottom: 0;
- left: 0;
- }
- }
- .text-clamp {
- display: -webkit-box;
- -webkit-line-clamp: 2;
- /* 显示的行数 */
- -webkit-box-orient: vertical;
- /* 内容会垂直堆叠 */
- overflow: hidden;
- /* 隐藏溢出的内容 */
- text-overflow: ellipsis;
- /* 当内容被裁剪时显示省略号 */
- }
- &-footer {
- @include u-flex(row, center, space-between);
- color: #757575;
- font-weight: 400;
- font-size: 24rpx;
- view {
- width: 128rpx;
- height: 104rpx;
- @include u-flex(column, center, center);
- }
- image {
- width: 48rpx;
- height: 48rpx;
- margin-bottom: 8rpx;
- }
- }
- }
- .box-header {
- height: 80rpx;
- padding: 0 24rpx;
- @include u-flex(row, center, space-between);
- font-weight: 500;
- font-size: 24rpx;
- color: #999999;
- &-title {
- color: #222222;
- font-size: 34rpx;
- }
- &-r {
- @include u-flex(row, center, flex-start);
- image {
- width: 48rpx;
- height: 48rpx;
- }
- }
- }
- .therapy {
- background-color: #fff;
- padding-left: 24rpx;
- padding-bottom: 20rpx;
- &-scrollx {
- white-space: nowrap;
- width: 100%;
- // margin-left: 24rpx;
- }
- &-scrollitem {
- display: inline-block;
- overflow: hidden;
- background: #F5F7FA;
- padding: 10rpx;
- margin-right: 20rpx;
- border-radius: 10rpx;
- overflow: hidden;
- border: 1rpx solid #F5F7FA;
- box-sizing: border-box;
- position: relative;
- overflow: hidden;
- image {
- width: 200rpx;
- height: 200rpx;
- border-radius: 10rpx;
- background-color: #F5F7FA;
- }
- &::after {
- content: '查看详情';
- background-color: #F5F7FA;
- position: absolute;
- top: 0;
- left: 0;
- font-weight: 400;
- font-size: 20rpx;
- padding: 4rpx 14rpx;
- border-radius: 10rpx 0 10rpx 0;
- color: #757575;
- }
- }
- &-active {
- background: #fff;
- border: 1rpx solid #FF5C03;
- .therapy-goodsname {
- color: #FF5C03 !important;
- }
- &::after {
- background: #fff;
- color: #FF5C03 !important;
- }
- }
- &-goodsname {
- margin-top: 6rpx;
- width: 200rpx;
- min-height: 64rpx;
- font-size: 24rpx;
- color: #757575;
- word-break: break-all;
- white-space: normal;
- }
- }
- .video-directory {
- background-color: #fff;
- padding-top: 12rpx;
- margin-top: 20rpx;
- &-scrollx {
- white-space: nowrap;
- width: calc(100% - 24rpx);
- margin-left: 24rpx;
- }
- &-scrollitem {
- display: inline-block;
- width: 276rpx;
- height: 160rpx;
- background: #F5F7FA;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- margin-right: 18rpx;
- padding: 20rpx 12rpx 20rpx 20rpx;
- box-sizing: border-box;
- position: relative;
- margin-bottom: 20rpx;
- }
- .freeflag {
- min-width: 68rpx;
- height: 32rpx;
- padding: 0 12rpx 0 12rpx;
- text-align: center;
- line-height: 32rpx;
- position: absolute;
- right: 0;
- top: 0;
- font-weight: 500;
- font-size: 20rpx;
- color: #FFFFFF;
- border-radius: 0 8rpx 0 8rpx;
- &-free {
- // background: url('@/static/image/hall/free_lable_bg.png') no-repeat right / 100% 32rpx;
- background-color: #FF5C03;
- }
- &-member {
- // background: url('@/static/image/hall/member_label_bg.png') no-repeat right / 100% 32rpx;
- background-color: #FFB205;
- }
- }
- &-num {
- font-weight: 500;
- font-size: 28rpx;
- @include u-flex(row, center, flex-start);
- image,
- .empty {
- width: 48rpx;
- height: 48rpx;
- margin-left: 10rpx;
- }
- }
- &-title {
- @include u-flex(row, center, space-between);
- font-size: 24rpx;
- color: #757575;
- word-break: break-all;
- white-space: normal;
- .imagebox {
- flex-shrink: 0;
- margin: 0 8rpx;
- position: relative;
- image {
- width: 92rpx;
- height: 72rpx;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- overflow: hidden;
- }
- }
- }
- .mask {
- width: 92rpx;
- height: 72rpx;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- background: rgba(0, 0, 0, 0.2);
- overflow: hidden;
- position: absolute;
- top: 0;
- left: 0;
- z-index: 1;
- @include u-flex(row, center, center);
- image {
- width: 24rpx;
- height: 24rpx;
- }
- }
- .active-scrollitem {
- background: #FCF0E7;
- color: #FF5C03;
- .video-directory-title {
- color: #FF5C03;
- }
- }
- }
- .video-comment {
- background-color: #fff;
- padding-top: 12rpx;
- margin-top: 20rpx;
- }
- .hall-box {
- @include u-flex(row, center, flex-start);
- flex-wrap: wrap;
- margin: 0 -18rpx -18rpx 0;
- padding: 12rpx 24rpx 24rpx 24rpx;
- .gapitem {
- margin: 0 18rpx 18rpx 0;
- }
- }
- .popbox {
- background-color: #fff;
- position: relative;
- .box-header {
- padding-top: 12rpx;
- padding-bottom: 12rpx;
- box-sizing: border-box;
- background-color: #fff;
- }
- .popbox-body {
- .comment,
- .directoryinfo {
- padding: 24rpx;
- }
- }
- .search-box {
- @include u-flex(row, center, space-between);
- padding: 10px 24rpx;
- .search {
- padding: 0;
- flex: 1;
- image {
- width: 24rpx;
- height: 24rpx;
- padding-left: 16rpx;
- }
- }
- }
- }
- .search-btn {
- flex-shrink: 0;
- height: 68rpx;
- padding: 0 42rpx;
- margin-left: 20rpx;
- background: #FCF0E7;
- border-radius: 34rpx 34rpx 34rpx 34rpx;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 26rpx;
- color: #FF5C03;
- text-align: center;
- line-height: 68rpx;
- }
- .comment-inputbox {
- @include u-flex(row, center, space-between);
- padding: 28rpx 24rpx;
- box-sizing: border-box;
- background: #FFFFFF;
- .inputbox {
- flex: 1;
- height: 72rpx;
- padding-left: 24rpx;
- background: #F5F7FA;
- border-radius: 36rpx 36rpx 36rpx 36rpx;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- color: #999999;
- line-height: 72rpx;
- }
- .release-btn {
- @extend .search-btn;
- }
- }
- .audio {
- display: flex;
- flex-direction: row;
- align-items: center;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 24rpx;
- color: #757575;
- &-play {
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- &-icon {
- width: 48rpx;
- height: 48rpx;
- }
- &-slider {
- flex: 1;
- }
- &-time {
- flex-shrink: 0;
- }
- }
- .vipCourseBtn {
- background: #1B1F22;
- border-radius: 46rpx;
- border: 1px solid #FFDAA3;
- color: #FFDAA3;
- width: calc(33.33333% - 46.6666rpx);
- }
- .vipAc {
- background: linear-gradient(90deg, #FFE0B2, #F8BA8B);
- border-radius: 46rpx;
- border: 1px solid #FFDAA3;
- color: #1B1F22;
- }
- .privilegeBox {
- background-color: #171a1d;
- box-sizing: border-box;
- }
- .primenu-box {
- border-radius: 16rpx;
- margin-top: 0rpx;
- padding: 10rpx 20rpx;
- }
- .content-inner {
- display: flex;
- flex-wrap: wrap;
- min-height: 310rpx;
- }
- .content-inner .item {
- width: calc(33.3333333%);
- height: 150rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- margin-top: 0rpx;
- }
- .content-inner .item .img {
- width: 84rpx;
- height: 84rpx;
- margin-bottom: 8rpx;
- }
- .content-inner .item .label {
- font-size: 32rpx;
- color: #83878A;
- }
- .vipMethodItem {
- border-radius: 10rpx;
- width: calc(100%);
- height: 70rpx;
- color: #FDD8A1;
- }
- .payTypeItem {
- background-color: #1B1F22;
- border: 1px solid #fff;
- border-radius: 10rpx;
- width: calc(50% - 15rpx);
- height: 94rpx;
- }
- .circle {
- border: 1px solid #FDD8A1;
- }
- .pt_ac {
- border: 1px solid #FDD8A1;
- }
- .slider-box {
- flex: 1
- }
- </style>
|