123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313 |
- <template>
- <view>
- <nav-bar title="课程详情" v-show="navShow"></nav-bar>
- <view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id="top">
- <view class="video_box" v-if="!startStatus">
- <image :src="$method.splitImgHost(detail.coverUrl)" mode="widthFix" style="width: 100%;height: 460rpx;"></image>
- <image v-if="false" class="video_play" src="/static/play.png" @click="startVideo"></image>
- </view>
- <view v-else>
- <view class="video_box" style="width: 100%;height: 460rpx;" v-if="playVID">
- <polyv-player
- id="playerVideo"
- playerId="playerVideo"
- height="460rpx"
- :vid="vid"
- :showSettingBtn="true"
- :enablePlayGesture="true"
- :custom-cache="false"
- :object-fit="'contain'"
- @statechange="onStateChange"
- @fullscreenchange="fullscreenchange"
- @error="playError"
- :autoplay="autoplay"
- :isAllowSeek="isAllowSeek"
- :playbackRate="playbackRate"
- :startTime="startTime"
- :enableAutoRotation="enableAutoRotation"
- ></polyv-player>
- <cover-view class="video-toast__close" v-if="videoToastShow" @click="closeToast()">X</cover-view>
- <cover-view class="video-toast" v-if="videoToastShow">
- <cover-view class="video-toast__text">您上次看到 {{seekTime}},正在自动续播</cover-view>
- <cover-view class="video-toast__btn" @click="restart()">从头播放</cover-view>
- </cover-view>
- </view>
- <view class="video_box" style="width: 100%;height: 460rpx;" v-if="playChannelId>0">
- <player
- class="plv-mp-demo-player"
- :videoOption="videoOption"
- @onLiveStatusChange="playerLiveStatusChange"
- />
- </view>
- </view>
-
- <view>
- <u-row>
- <u-col span="10">
- <view class="video_t1">{{ detail.courseName }}</view>
- </u-col>
- <u-col span="2" v-if="false">
- <view class="video_t1_t" @click="openJY">
- <image src="/static/icon/jy_icon.png" style="width: 40rpx;height: 40rpx;"></image>
- 讲义
- </view>
- </u-col>
- </u-row>
- </view>
- <u-line color="#D6D6DB" />
- <view>
- <view><u-tabs gutter="0" :item-width="itemWidth()" :list="list" font-size="32" bar-width="24" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
- </view>
- <u-line color="#D6D6DB" />
- </view>
- <view class="box">
-
- <!--目录 -->
- <view v-show="current == 0">
- <view class="menuBox" v-for="(item, index) in menuList" :key="index">
- <!--模块 -->
- <view v-if="item.type == 1"><courseModule :needOpen="menuIndex[0] === index ? true : false" :courseId="courseId" :preItem="menuList[index-1]" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
- <!--章 -->
- <view v-if="item.type == 2"><courseChapter :needOpen="menuIndex[0] === index ? true : false" :courseId="courseId" :preItem="menuList[index-1]" @playEnd="sectionPlayEnd($event,index)" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter></view>
- <!--节 -->
- <view v-if="item.type == 3"><courseSection @playEnd="sectionPlayEnd($event,index)" :courseId="courseId" :preItem="menuList[index-1]" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
- </view>
- </view>
- <!--讲义 -->
- <view v-show="current == 1">
- <view class="lecture-box" v-if="courseHandoutsData">
- <view class="title">
- {{courseHandoutsData.handoutsName}}
- <!-- 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略 -->
- </view>
- <view class="btn" @click="openDocument">
- <u-icon name="download" color="#007AFF" size="40"></u-icon>
- </view>
- </view>
-
- <view style="text-align: center;" v-else>暂无讲义</view>
- <!-- <view class="lecture-content">
- <rich-text :nodes="'讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容'"></rich-text>
- </view> -->
-
- <!-- <view class="inputBottom">
- <view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
- <view style="width: 73%;height: 100%;padding: 10rpx 0;">
- <u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
- </view>
- <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
- </view> -->
-
- </view>
- <!--笔记 -->
- <view v-show="current == 2">
- <view v-if="noteList.length == 0" style="text-align: center;">暂无笔记</view>
- <view class="inputBottom">
- <view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
- <view style="width: 73%;height: 100%;padding: 10rpx 0;">
- <u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
- </view>
- <view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
- </view>
- <view v-for="(item, index) in noteList" :key="index">
- <view class="dateBox">{{ $method.timestampToTime(item.dateNote) }}</view>
- <view class="noteBox">
- <view v-for="(item1, index1) in item.userNotes" :key="index1" style="margin-top: 30rpx;" @click="jumpNote(item1)">
- <view style="display: flex;">
- <view>
- <view>
- <image src="/static/icon/note2.png" v-if="noteId != item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
- <image src="/static/icon/note1.png" v-if="noteId == item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
- </view>
- <view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">{{ $method.secondToDate(item1.noteSecond) }}</view>
- </view>
- <view style="margin-left: 10rpx;">
- <view class="t2Content leftPadding">{{ item1.sectionName }}</view>
- <view class="tBox2">{{ item1.noteText }}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!--答疑 -->
- <view v-show="current == 3">
- <view class="inputBottom">
- <view class="flex_auto">
- <u-input height="60" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
- </view>
- <view class="btn" @click="postContent">提交</view>
- </view>
- <view v-for="(item, index) in answerList" :key="index" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
- <view class="chat_box" @click.stop="clearCtx">
- <view style="display: flex;flex:1;">
- <view><image :src="item.assignUserId > 0 && !item.realname ? '/static/logo_xcx.png' :$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
- <view style="margin-left: 15rpx;">
- <view class="chat1">{{ item.assignUserId > 0 && !item.realname ? '祥粤老师' : item.realname }}</view>
- <view class="chat2">{{ $method.timestampToTime(item.createTime,false) }}</view>
- <view class="chat3">
- <text v-if="item.assignUserId > 0">回复</text>
- <text v-if="item.assignUserId > 0" style="color: #007AFF;">@{{ item.assignRealname }}</text>
- <view style="word-break: break-all;">{{ item.answerText }}</view>
- </view>
- </view>
- </view>
- <view class="btnReply" @click.stop="replyContent(item)" v-if="item.userId != userInfo.userId">回复</view>
- <view v-else class="btnDel" @click.stop="delContent(item)">删除</view>
- </view>
- <u-line color="#D6D6DB" />
- </view>
- <view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
- </view>
- <!--目录 -->
- <view v-show="current == 4" >
- <view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
- <!--模块 -->
- <view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
- <!--章 -->
- <view v-if="item.type == 2">
- <courseChapter :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>
- </view>
- <!--节 -->
- <view v-if="item.type == 3">
- <courseSection :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :nextMenuItem="findMenuNextSection(index)" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
- </view>
- </view>
- </view>
- </view>
- <!-- 播放前拍照end -->
- <u-popup v-model="showSet" :mask-close-able="false" mode="center" border-radius="24">
- <view style="align-items:center;padding: 0 40rpx;display: flex;flex-direction: column;justify-content:center;">
- <view style="font-weight: bold;color: #333333;font-size: 30rpx;margin-top: 30rpx;">温馨提示</view>
- <view style="width: 457rpx;color: #666666;font-size: 30rpx;margin-top: 30rpx;">学习过程中需要拍照验证学员身份,
- 拍照功能需要使用您的相机。
- 是否授权使用?</view>
- <view style="margin: 40rpx 0;">
- <button open-type="openSetting" @bindopensetting="openSetting" class="btnSet">去授权</button>
- </view>
- </view>
- </u-popup>
-
- <u-mask :show="photoPopup" >
- <!-- 播放前拍照start -->
- <view v-if="photoPopup" :mask-close-able="false" style="bottom: 0;position: fixed;width: 100%;z-index: 999;">
- <view class="photoBox">
- <view class="photoTop">
- <view class="sqzz" v-if="false"><u-icon name="close" color="#333333" size="30" @click="closePhoto"></u-icon></view>
- <view class="centersq">请正视手机屏幕</view>
- <view class="sqzz"></view>
- </view>
- <view class="photoCenter">
- <view style="width: 100%; height: 979rpx;position: fixed;" v-if="photoPopup && isTaking">
- <camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%;" ></camera>
- </view>
- <view class="custom" v-if="!isTaking" ><image :src="avatarUrl" mode=""></image></view>
- </view>
- <view class="btns">
- <view class="btnResult" v-if="isTaking" @click="takePhoto">拍照</view>
- <view class="btnResult" v-if="!isTaking" @click="reTake">重拍</view>
- <view class="btnResult" v-if="!isTaking" @click="submit">确认</view>
- </view>
-
- </view>
- </view>
- </u-mask>
- </view>
-
- </template>
- <script>
- import plv from '../static/polyv-sdk/index';
- import courseModule from '@/components/course/courseModule.vue';
- import courseChapter from '@/components/course/courseChapter.vue';
- import courseSection from '@/components/course/courseSection.vue';
- import { mapGetters, mapMutations } from 'vuex';
- export default {
- components: {
- courseModule,
- courseChapter,
- courseSection
- },
- data() {
- return {
- navShow:true,
- enableAutoRotation:true,
- seekTime:'',
- toastTimer:null,
- videoToastShow:false,
- initLiveOk:false,
- livePlay:false, //是否正在播放直播,不含暂停
- liveDuration:0, //直播观看时长
- videoOption:{
- mode: 'live',
- uid: '',
- cid: '',
- openId: '',
- isAutoChange: false,
- forceVideo: false,
- },
- courseHandoutsData:'',
- liveDetail:{},
- showSet:false,
- startStatus: false,
- detail: {},
- courseId: 0,
- placeholder: '您可以在这里输入笔记内容\n还可以点击左侧图标为笔记加上时间标记',
- inputStyle: {
- background: 'rgba(244, 244, 244, 0.98)',
- borderRadius: '24rpx',
- padding: '8rpx',
- marginBottom: '10rpx'
- },
- list: [],
- menuList: [],
- current: 0,
- vid: '',
- goodsId: 0,
- goodsData: {},
- photoPopup: false,
- goodsPlayConfig: null,
- autoplay: false,
- isAllowSeek: 'no',
- playbackRate: [1.0],
- timer: null,
- answerTimer:null,
- goodsPhotographConfig: null,
- intervalTimeList: [], // 间隔拍照时长
- intervalTimeIndex: 0, //当前处于哪个时间段拍照
- playTime: 0, //页面播放时长,不含暂停
- currentTime: 0,
- avatarUrl: '',
- ossAvatarUrl: '',
- studyDuration: 0, // 当前视频时长
- gradeId: 0,
- chapterId: 0,
- moduleId: 0,
- reMenuList: [],
- answerList: [],
- assignUserId: 0,
- placeholder: '您可以在这里输入答疑内容',
- ctxValue: '',
- noteList: [],
- noteValue: '',
- noteId: 0,
- recordObj: 0,
- gradeDetail:{},
- isTaking:true, //是否正在拍照
- needSeek: false, //第一次播放是否需要跳转
- needProfileModal:false, //是否需要资料审核弹框
- liveObj:{},
- photoNum:0,
- photoList:[], //拍照的时间点
- photoConfig:false, //是否配置好拍照次数
- photoIndex:0, //当前位于拍照的区间下标 从0开始
- photoHistoryList:[], //已拍照历史的下标点
- sectionItem:null,
- businessData:{},
- menuIndex:[],
- uploadLock:false, //上传图片
- isRebuild:false, //视频是否从重修目录点击
- };
- },
- computed: { ...mapGetters(['userInfo', 'playSectionId','playChannelId','playVID']) },
- onLoad(option) {
- this.courseId = Number(option.id);
- this.goodsId = Number(option.goodsId);
- this.courseDetail();
- this.getGoodsDetail();
- this.getAnswerList();
- this.answerTimer = setInterval(() => {
- this.getAnswerList();
- },5000)
- let noteSecond = Number(option.noteSecond);
- if(noteSecond>0){
- //我的消息跳过来,播放节
- let item = {
- sectionId:Number(option.sectionId),
- recordingUrl:option.recordingUrl,
- noteSecond:noteSecond,
- studyDuration:noteSecond
- }
- let playNextId = `moduleId${option.moduleId}chapterId${option.chapterId}sectionId${option.sectionId}${option.isRebuild?'isRebuild':''}`;
- this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
- this.$store.commit('setPlayVID', {playVID :item.recordingUrl});
- this.$store.commit('updatePlayNextId',playNextId)
- console.log('this.playNoteVideo')
- }
-
- },
- onShow() {
- var self = this;
- //相机授权
- this.getCameraSetting()
- this.$api.getbaseprofiletplists({ goodsId: self.goodsId }).then(res => {
- console.log(res,'res')
- if (res.data.code === 200 && res.data.rows.length) {
- if (res.data.rows[0].keyValue) {
- self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
- console.log(result,'result')
- if (result.data.code === 200) {
- if (!result.data.data || (result.data.data.status === 3 && result.data.data.changeStatus === 1)) {
- if (!result.data.data) {
- self.needProfileModal = true
- uni.showModal({
- content: '请前往填写资料',
- cancelText: '返回',
- success: function(resultst) {
- if (resultst.confirm) {
- self.$navTo.togo('/pages2/verify/input', {
- id: self.goodsId
- });
- }
- if (resultst.cancel) {
- uni.navigateBack();
- }
- }
- });
- } else {
- self.needProfileModal = true
- uni.showModal({
- content: '资料审核不通过,请前往重新填写',
- cancelText: '返回',
- success: function(resultst) {
- if (resultst.confirm) {
- self.$navTo.togo('/pages2/verify/input', {
- id: self.goodsId
- });
- }
- if (resultst.cancel) {
- uni.navigateBack();
- }
- }
- });
- }
- } else if (result.data.data.status === 1 && JSON.parse(res.data.rows[0].keyValue2)[0]) {
- self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId }).then(k => {
-
- if (k.data.code === 200) {
- if (!k.data.data || (k.data.data.status === 3 && k.data.data.changeStatus === 1)) {
- if (!k.data.data) {
- self.needProfileModal = true
- uni.showModal({
- cancelText: '返回',
- content: '请前往填写盖章资料',
- success: function(resultst) {
- if (resultst.confirm) {
- self.$navTo.togo('/pages2/verify/input2', {
- id: self.goodsId
- });
- }
- if (resultst.cancel) {
- uni.navigateBack();
- }
- }
- });
- } else {
- self.needProfileModal = true
- uni.showModal({
- cancelText: '返回',
- content: '资料盖章审核不通过,请前往重新填写',
- success: function(resultst) {
- if (resultst.confirm) {
- self.$navTo.togo('/pages2/verify/input2', {
- id: self.goodsId
- });
- }
- if (resultst.cancel) {
- uni.navigateBack();
- }
- }
- });
- }
- }
- }
- });
- }
- }
- });
- }
- }
- });
- console.log(this.gradeId,7512)
- if(this.gradeId>0){
- //提交完资料返回判断是否已开班
-
- this.getGradeInfo()
- }
- },
- onUnload() {
- if (this.playSectionId > 0) {
- //退出提交记录
- this.postStudyRecord();
- }
- //清除正在播放的节ID
- this.$store.commit('setPlaySectionId', { playSectionId: 0 });
- this.$store.commit('setPlayChannelId', { playChannelId: 0 });
- this.$store.commit('setPlayVID', { playVID: null });
- this.closePlv()
- console.log('onUnload')
- //移除所有的事件监听器
- uni.$off();
- clearInterval(this.answerTimer)
- if (this.timer) {
- clearInterval(this.timer);
- }
- },
- mounted() {
- uni.$on('changeSection', oldSectionId => {
- console.log(this.playVID)
- this.photoConfig = false
- this.photoIndex = 0
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- if(polyvPlayerContext){
- //解决同个节视频切换问题
- polyvPlayerContext.seek(0)
- polyvPlayerContext.pause();
- }
- //清除直播
- this.$store.commit('setPlayChannelId', { playChannelId: 0 });
- this.postStudyRecord(0, oldSectionId);
- });
- uni.$on('getSection', item => {
- //清除直播
- this.photoConfig = false
- this.photoIndex = 0
- this.sectionItem = item;
- this.$store.commit('setPlayChannelId', { playChannelId: 0 });
- //获取拍照历史
- this.getPhotoLastRecord()
- this.playVideo(item);
- });
- uni.$on('levelId', item => {
- let arr = item.split('-');
- //点击节获取的各层级ID
- this.moduleId = arr[0];
- this.chapterId = arr[1];
- });
- uni.$on('getChannel', item => {
- //清除录播
- this.$store.commit('setPlayVID', {playVID :null});
- this.playChannel(item);
- });
- uni.$on('isRebuild',item => {
- console.log(item)
- this.isRebuild = item;
- })
- this.updateChapterOpen(true)
- },
- methods: {
- ...mapMutations(['updateChapterOpen']),
- /**
- * 模块大节播放完毕,刷新列表
- */
- sectionPlayEnd(isRebuild,index) {
- console.log('sectionPlayEnd')
- console.log('isRebuild',isRebuild),
- console.log('index',index)
- if(this.reMenuList.length>0) { //有重修目录
- if(isRebuild.isRebuild) { //从重修点击
- this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
- console.log('Rebuild1')
- if (res.data.code == 200) {
- if(res.data.rows.length) {
- // res.data.rows[index].name = res.data.rows[index].menuName;
- // this.$set(this.reMenuList,index,res.data.rows[index])
- for (let i = 0; i < res.data.rows.length; i++) {
- let item = res.data.rows[i];
- item.down = true;
- item.id = item.menuId;
- item.name = item.menuName;
- }
- this.reMenuList = []
- this.$nextTick(() => {
- this.reMenuList = res.data.rows;
- console.log(this.reMenuList)
- })
-
- } else {
- this.reMenuList = []
- }
-
- this.$nextTick(() => {
- if(this.reMenuList.length>0){
- this.list = [
-
- {
- name: '目录'
- },
- {
- name: '讲义'
- },
- {
- name: '笔记'
- },
- {
- name: '答疑'
- },
- {name:'重修目录'}
- ];
- } else {
- this.list = [
-
- {
- name: '目录'
- },
- {
- name: '讲义'
- },
- {
- name: '笔记'
- },
- {
- name: '答疑'
- }
- ];
- if(this.current == 4) {
- this.current = 0;
- }
-
- }
- })
-
-
- }
- });
-
- this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
- console.log('noRebuild1')
- if (res.data.code == 200) {
- for (let i = 0; i < res.data.rows.length; i++) {
- let item = res.data.rows[i];
- item.down = true;
- item.id = item.menuId;
- item.name = item.menuName;
- item.menuType = item.type;
- }
- this.menuList = []
- this.$nextTick(() => {
- this.menuList = res.data.rows;
- })
-
- }
- });
- } else { //从普通目录点击
- this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
- console.log('noRebuild2')
- if (res.data.code == 200) {
- res.data.rows[index].name = res.data.rows[index].menuName;
- res.data.rows[index].id = res.data.rows[index].menuId;
- this.$set(this.menuList,index,res.data.rows[index])
- }
- });
-
- this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
- console.log('Rebuild2')
- if (res.data.code == 200) {
- for (let i = 0; i < res.data.rows.length; i++) {
- let item = res.data.rows[i];
- item.down = true;
- item.id = item.menuId;
- item.name = item.menuName;
- }
- this.reMenuList = []
- this.$nextTick(() => {
- this.reMenuList = res.data.rows;
- if(this.reMenuList.length>0){
- this.list = [
-
- {
- name: '目录'
- },
- {
- name: '讲义'
- },
- {
- name: '笔记'
- },
- {
- name: '答疑'
- },
- {name:'重修目录'}
- ];
- } else {
- this.list = [
-
- {
- name: '目录'
- },
- {
- name: '讲义'
- },
- {
- name: '笔记'
- },
- {
- name: '答疑'
- }
- ];
- if(this.current == 4) {
- this.current = 0;
- }
- }
- })
-
- }
- });
- }
-
- } else { //没有重修目录
- this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
- console.log('noRebuild3')
- console.log('noRebuild3index',index)
- if (res.data.code == 200) {
- res.data.rows[index].name = res.data.rows[index].menuName;
- res.data.rows[index].id = res.data.rows[index].menuId;
- this.$set(this.menuList,index,res.data.rows[index])
- }
- });
-
-
- }
-
-
-
- },
- /**
- * 获取业务层次详情
- */
- courseBusiness(){
- this.$api.courseBusiness(this.goodsData.businessId).then(res => {
- this.businessData = res.data.data;
- })
- },
- /**
- * 计算tabs宽度
- */
- itemWidth() {
- return 100/this.list.length + '%'
- },
- /**
- * 获取讲义权限
- */
- courseHandouts() {
- this.$api.courseHandouts(this.goodsData.handoutsId).then(res => {
- this.courseHandoutsData = res.data.data
- })
- },
- findMenuNextSection(index){
- for(let i=index+1;i<this.reMenuList.length;i++){
- let item = this.reMenuList[i]
- if(item.type==3){
- return item;
- }
- }
- return {}
- },
- getPhotoLastRecord() {
- let self = this;
- let data = {
- sectionId: parseInt(self.playSectionId),
- goodsId: parseInt(self.goodsId),
- courseId: parseInt(self.courseId),
- gradeId: parseInt(self.gradeId),
- chapterId: parseInt(self.chapterId),
- moduleId: parseInt(self.moduleId)}
- this.$api.getPhotoLastRecord(data).then(res => {
- if(res.data.code==200){
- //清空历史数据
- self.photoHistoryList = []
- this.photoIndex = 0
- self.photoList = []
- for(let i=0;i<res.data.data.length;i++){
- //-2存储随机拍照数组
- if(res.data.data[i].photoIndex==-2){
- self.photoList = res.data.data[i].timeInterval.split(',')
- }else{
- self.photoHistoryList.push(res.data.data[i].photoIndex)
- }
- }
-
-
- }
-
- });
-
- },
- //postTime 只提交随机时间
- postCoursePhotoRecord(postTime=false) {
- return new Promise((resolve,reject) => {
-
- let currentTime = 0;
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- if (polyvPlayerContext) {
- currentTime = polyvPlayerContext.getCurrentTime();
- }
- let self = this;
- let photoIndex = self.photoIndex
- let data = {
- photo: self.ossAvatarUrl,
- sectionId: parseInt(self.playSectionId),
- goodsId: parseInt(self.goodsId),
- courseId: parseInt(self.courseId),
- photoTime: parseInt(currentTime > 0 ? currentTime : 0),
- gradeId: parseInt(self.gradeId),
- photoIndex: postTime?-2:parseInt(photoIndex),//从0算起,-2只提交随机时间
- photoNum:parseInt(self.photoNum),
- chapterId: parseInt(self.chapterId),
- moduleId: parseInt(self.moduleId),
- timeInterval: postTime?self.photoList.join(','):''
- };
- console.log('提交接口', data);
- this.$api.coursePhotoRecord(data).then(res => {
- if(res.data.code == 200) {
- resolve()
- } else {
- reject()
- }
- }).catch(err => {
- reject()
- });
- })
- },
- randomNum(minNum,maxNum){
- switch(arguments.length){
- case 1:
- return parseInt(Math.random()*minNum+1,10);
- break;
- case 2:
- return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
- break;
- default:
- return 0;
- break;
- }
- },
- //配置随机拍照时间
- configPhoto(){
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- let totalVideoTime = polyvPlayerContext.getDuration()
- let duration = polyvPlayerContext.getCurrentTime()
- let photoNum = this.photoNum
- if(!this.photoConfig){
- this.photoConfig = true
- let spaceTime = Math.floor(totalVideoTime/photoNum) //拍照时间区间
- if(spaceTime<5){//区间小于5秒
- photoNum = Math.floor(totalVideoTime/5)
- spaceTime = 5
- }
- if(photoNum<1){
- photoNum = 1 //只要设置,至少拍一次
- spaceTime = totalVideoTime
- }
- let initSpace = 0
- //没有历史拍照间隔数据
- if(this.photoList.length==0){
- for(let i=0;i<photoNum;i++){
- let s = this.randomNum(initSpace,initSpace+spaceTime)
- if(s>totalVideoTime){
- s = totalVideoTime-1
- }
- if(s<=5){
- s =5 //避免出现5秒内拍照时间
- }
- this.photoList.push(s)
- initSpace+=spaceTime
- }
- console.log(this.photoList,"随机拍照时间数组11",photoNum,initSpace,spaceTime)
- this.postCoursePhotoRecord(true)//提交随机拍照时间数组
- }
- console.log(this.photoList,"随机拍照时间数组")
- //兼容已有观看历史
- for(let i=0;i<this.photoList.length-1;i++){
- if(this.photoList[i]<duration&&this.photoList[i+1]>duration){
- this.photoIndex = i+1
- // console.log("我的修改了photoIndex")
- break
- }
- if(duration>this.photoList[this.photoList.length-1]){
- this.photoIndex = this.photoList.length-1 //取最后一个下标
- // console.log("我的修改了photoIndex")
- break
- }
- }
- }
- },
- getLiveUid(channelId) {
- let self = this;
- return new Promise(resolve => {
- let data = {
- channelId: channelId
- };
- self.$api.polyvSign(data).then(res => {
- resolve(res.data.data);
- });
- });
- },
- timeEventLiving() {
- if (plv != null) {
- if(this.livePlay){
- this.liveDuration = this.liveDuration +1 //每隔1秒
- if(this.liveDuration==2){ //直播第2秒拍照
- if(this.goodsPhotographConfig){
- if(this.goodsPhotographConfig.livephotograph==1){
- //开启直播拍照
- this.openPhoto();
- }
- }
- }
- }
-
- }
- },
- playerLiveStatusChange(e) {
- const status = e.detail.status;
- console.log('直播状态',status);
- if (status === 'live') {
- console.log('开始直播');
- //开始播放
- if (this.timer) {
- clearInterval(this.timer);
- }
- this.livePlay = true
- this.timer = setInterval(this.timeEventLiving, 1000); //定时器
- }
- if (status === 'end') {
- if(this.livePlay){
- //只有播放过的结束才提交,避免未开播触发结束
- this.postStudyRecord(1);
- }
- console.log('结束直播');
- this.livePlay = false
- // 未开始
-
-
- }
- },
- closePlv(){
- if(plv){
- plv.destroy();
- }
-
- },
- playChannel(item){
- if (this.timer) {
- clearInterval(this.timer);
- }
- this.startStatus = true
- this.initLive()
- },
- setLiveOption(status) {
- const { userId, channelId, recordFileSimpleModel, playbackEnabled } = this.detail;
- const playRecordFile = playbackEnabled && recordFileSimpleModel && status === 'end';
-
- this.videoOption = {
- mode: 'live',
- uid: this.liveObj.uid, //this.playChannelId egsxlptzdq
- cid: this.playChannelId,
- openId: this.userInfo.userAccount,
- isAutoChange: false,
- forceVideo: false,
- }
- },
- async initLive(){
- console.log(this.playChannelId,7111)
- this.liveObj = await this.getLiveUid(this.playChannelId);
- this.initLiveOk = true
- let optionsData = {}
- optionsData.mode = 'live';
- optionsData.forceVideo = false;
- optionsData.channelId = this.playChannelId; // 频道ID '2553128'
- optionsData.openId = this.userInfo.userAccount; // 用户openId this.userInfo.userAccount 'oQ5eX5BCtSjkE1ct8CzvxGWgh0hQ'
- optionsData.userId = this.liveObj.uid // 2.0.0及以上版本的demo需要使用 userId 设置学员唯一id 'egsxlptzdq'
- let self = this
- this.closePlv()
- plv.init(optionsData)
- .then(({ detail, chat }) => {
- self.liveDetail = detail
-
- // 设置mode为live的videoOption
- this.setLiveOption();
- if (detail.isPPT) {
- chat.on(chat.events.SLICESTART, () => {
- // 开始直播
- });
- } else {
- plv.api.getOrdinaryLiveStatus(detail.stream);
- }
- });
- },
- openSetting(res){
- console.log(res,98)
- },
- getCameraSetting () {
- const self = this
- wx.getSetting({
- success: res => {
- if (res.authSetting['scope.camera']) {
- // 用户已经授权
- self.showSet = false
- } else {
- // 用户还没有授权,向用户发起授权请求
- wx.authorize({
- scope: 'scope.camera',
- success() { // 用户同意授权
- self.showSet = false
- },
- fail() { // 用户不同意授权
- self.showSet = true
- /* wx.showToast({
- title: '摄像头授权失败',
- icon: 'none',
- duration: 3000
- }) */
- }
- })
- }
- },
- fail: res => {
-
-
- }
- })
- },
- openJY(){
- this.$u.toast('此功能正在开发中');
- },
- //播放笔记视频
- async playNoteVideo(item) {
- console.log(item,'noteItem')
- if (this.timer) {
- clearInterval(this.timer);
- }
- if (this.vid) {
- //切换视频
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- polyvPlayerContext.changeVid(item.recordingUrl);
- } else {
- this.vid = item.recordingUrl;
- }
- this.recordObj = {videoCurrentTime:item.noteSecond}
- if (this.recordObj.videoCurrentTime) {
- this.needSeek = true; //需要跳转到播放记录
- }
- this.startStatus = true;
- //获取节笔记
- this.getNoteList();
- },
- //正常播放视频
- async playVideo(item) {
- console.log(item)
- if (this.timer) {
- clearInterval(this.timer);
- }
- if (this.vid) {
- //切换视频
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- console.log(polyvPlayerContext,'polyvPlayerContext')
- polyvPlayerContext.changeVid(item.recordingUrl);
- } else {
- this.vid = item.recordingUrl;
- }
- this.recordObj = null
- this.recordObj = await this.getRecordLast();
- this.needSeek = true; //跳转到播放记录
- this.startStatus = true;
-
- //获取节笔记
- this.getNoteList();
- },
- getRecordLast() {
- let self = this;
- return new Promise(resolve => {
- let data = {
- gradeId: Number(self.gradeId),
- goodsId: Number(self.goodsId),
- sectionId: Number(self.playSectionId),
- courseId: Number(self.courseId),
- chapterId: parseInt(self.chapterId),
- moduleId: parseInt(self.moduleId)
- };
- self.$api.recordLast(data).then(res => {
- resolve(res.data.data);
- });
- });
- },
-
- jumpNote(item) {
- this.noteId = item.noteId;
- //没视频播放
- if(this.playSectionId==0){
- console.log('即将跳到笔记位置1')
- this.$u.toast('即将跳到笔记位置');
- this.$store.commit('setPlaySectionId', {playSectionId :item.sectionId});
- this.$store.commit('setPlayVID', {playVID :item.recordingUrl});
- this.playNoteVideo(item);
- }else{
- //正在看当前笔记视频
- console.log('即将跳到笔记位置2')
- this.$u.toast('即将跳到笔记位置');
- //跳到笔记时刻
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- polyvPlayerContext.seek(item.noteSecond);
- polyvPlayerContext.play();
- }
-
- },
- postNote() {
- let self = this;
- if (!(this.playSectionId > 0)) {
- this.$u.toast('目前无播放视频');
- return;
- }
- if (!this.noteValue) {
- this.$u.toast('请输入内容');
- return;
- }
- if(!this.gradeId){
- this.$u.toast('暂无班级数据');
- return;
- }
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- let noteDate = this.$method.getZeroTime();
- let noteSecond = polyvPlayerContext.getCurrentTime();
- console.log(noteSecond,698)
- if (!noteSecond) {
- if(noteSecond==0){
- //播放结束
- noteSecond = polyvPlayerContext.getDuration();
- console.log(noteSecond,63398)
- }
- if(!noteSecond){
- this.$u.toast('视频暂未开始');
- return;
- }
-
- }
- let data = {
- gradeId: this.gradeId,
- goodsId: this.goodsId,
- sectionId: this.playSectionId,
- courseId: this.courseId,
- noteText: this.noteValue,
- noteDate: noteDate,
- noteSecond: noteSecond
- };
- this.$api.postNote(data).then(res => {
- if (res.data.code == 200) {
- this.$u.toast('发布成功');
- self.getNoteList();
- this.noteValue = '';
- }
- });
- },
- getGradeInfo() {
- let self = this;
- this.$store.state.allowLoading = false;
- this.$api.goodsGradeInfo(this.gradeId).then(res => {
- if (res.data.code == 200) {
- self.gradeDetail = res.data.data;
- if(self.needProfileModal){
- return
- }
- if(self.gradeDetail.learningStatus==2){
- uni.showModal({
- showCancel:false,
- confirmText: '确定',
- content: '当前课程正在申请中,正式开班后方可进行学习,请耐心等候!',
- success: function(resultst) {
- uni.navigateBack();
- }
- });
- }
- if(self.gradeDetail.learningStatus==3&&(Number(self.gradeDetail.learningTimeStart)>Number((new Date())/1000))){
- uni.showModal({
- showCancel:false,
- cancelText: '返回',
- content: '当前课程正在申请中,正式开班后方可进行学习,请耐心等候!',
- success: function(resultst) {
- uni.navigateBack();
- }
- });
- }
- }
- });
- this.$store.state.allowLoading = true;
- },
- getNoteList() {
- let self = this;
- self.noteList = [];
- let data = { courseId: this.courseId, gradeId: this.gradeId, goodsId: this.goodsId }
- if(this.playSectionId>0){
- data.sectionId = this.playSectionId
- }
- this.$api.noteList(data).then(res => {
- if (res.data.code == 200) {
- self.noteList = res.data.rows;
- }
- });
- },
- delAnswer(answerId) {
- let self = this;
- let data = { answerId: answerId, status: -1 };
- this.$api.delAnswer(data).then(res => {
- if (res.data.code == 200) {
- self.getAnswerList();
- }
- });
- },
- clearCtx() {
- console.log(4234);
- this.placeholder = '您可以在这里输入答疑内容';
- this.ctxValue = '';
- this.assignUserId = 0;
- },
- replyContent(item) {
- this.assignUserId = item.userId;
- this.placeholder = '@' + item.realname;
- },
- delContent(item) {
- this.delAnswer(item.answerId);
- },
- postAnswer() {
- let self = this;
- let data = { courseId: this.courseId, answerText: this.ctxValue, goodsId: this.goodsId };
- if (this.assignUserId > 0) {
- data.assignUserId = this.assignUserId;
- }
- this.$api.postAnswer(data).then(res => {
- if (res.data.code == 200) {
- this.$u.toast('发布成功');
- self.getAnswerList();
- this.placeholder = '您可以在这里输入答疑内容';
- this.ctxValue = '';
- this.assignUserId = 0;
- }
- });
- },
- postContent() {
- if (!this.ctxValue||this.ctxValue=='') {
- this.$u.toast('请输入内容');
- return
- }
- this.postAnswer();
- },
- postStudyRecord(status = 0, sectionId = this.playSectionId) {
- console.log('status',status)
- let currentTime = 0;
- let PlayDuration = 0
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- if (polyvPlayerContext) {
- currentTime = polyvPlayerContext.getCurrentTime(); //总的视频播放时刻
- PlayDuration = polyvPlayerContext.getVideoPlayDuration();//本次看的时长
- }
- if(this.playChannelId>0){
- currentTime = 2;//直播无法获取,无论开始结束都传2秒
- }
- let self = this;
- let data = {
- photo: self.ossAvatarUrl,
- sectionId: parseInt(sectionId),
- goodsId: parseInt(self.goodsId),
- courseId: parseInt(self.courseId),
- studyDuration: parseInt(PlayDuration > 0 ? PlayDuration : self.studyDuration),
- gradeId: parseInt(self.gradeId),
- chapterId: parseInt(self.chapterId),
- moduleId: parseInt(self.moduleId),
- videoCurrentTime: parseInt(currentTime > 0 ? currentTime : self.studyDuration)
- };
- if (status > 0) {
- console.log(sectionId,'sectionId')
- data.status = status;
-
-
- }
- console.log('提交接口', data);
- this.$api.studyRecord(data).then(res => {
- if(res.data.code == 200) {
-
- if (status > 0) {
- let moduleId = this.moduleId || 0;
- let chapterId = this.chapterId || 0;
- let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
- let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`; //拼接对应章节唯一id
- console.log(playNextId,'playNextId')
- console.log(playNextIdisRebuild,'playNextIdisRebuild')
-
- uni.$emit('playNext'+playNextIdisRebuild,{fromRebuild:this.isRebuild}); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
- uni.$emit('playNext'+playNextId); //通知播放结束
- }
-
- self.ossAvatarUrl = ''
- } else {
- this.uploadLock = false;
- uni.showToast({
- icon:'none',
- title:res.data.msg
- })
- }
- console.log(res,'res');
- });
- },
- uploadFile(options, int) {
- var self = this;
- return new Promise((resolve, reject) => {
- var data = {
- imageStatus: int,
- gradeId:this.gradeId
- };
- self.$api.aliyunpolicy(data).then(res => {
- if (res.data.code != 200) {
- self.$method.showToast('签名错误' + JSON.stringify(res.data));
- return;
- }
- var ossToken = res.data.data.resultContent;
- if (ossToken.host == null || ossToken.host == undefined) {
- self.$method.showToast('上传路径报错' + JSON.stringify(res.data));
- return;
- }
- uni.uploadFile({
- url: ossToken.host,
- name: 'file',
- filePath: options,
- fileType: 'image',
- header: {
- AuthorizationToken: 'WX ' + uni.getStorageSync('token')
- },
- formData: {
- key: ossToken.dir,
- OSSAccessKeyId: ossToken.accessid,
- policy: ossToken.policy,
- Signature: ossToken.signature,
- callback: ossToken.callback,
- success_action_status: 200
- },
- success: result => {
- if (result.statusCode === 200) {
- self.ossAvatarUrl = ossToken.dir;
- resolve();
- } else {
- uni.showToast({
- title: '上传失败',
- icon: 'none'
- });
- this.openPhoto();
- return;
- }
- },
- fail: error => {
- uni.showToast({
- title: '上传接口报错,请重新拍照上传' + error,
- icon: 'none'
- });
- this.openPhoto();
- return;
- }
- });
- });
- });
- },
- imageInfos() {
- var self = this;
- return new Promise((resolve, reject) => {
- uni.getImageInfo({
- src: self.avatarUrl,
- success: async res => {
- let canvasWidth = res.width; //图片原始长宽
- let canvasHeight = res.height;
- if (canvasWidth > 2000 || canvasHeight > 2000) {
- uni.compressImage({
- src: self.avatarUrl,
- quality: 75,
- width: '35%',
- height: '35%',
- success: async rest => {
- const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
- resolve();
- }
- });
- } else if (canvasWidth > 1000 || canvasHeight > 1000) {
- uni.compressImage({
- src: self.avatarUrl,
- quality: 75,
- width: '50%',
- height: '50%',
- success: async rest => {
- const waitUpload = await self.uploadFile(rest.tempFilePath, 0);
- resolve();
- }
- });
- } else {
- console.log('无需压缩');
- const waitUpload = await self.uploadFile(self.avatarUrl, 0);
- resolve();
- }
- }
- });
- });
- },
- timeEvent() {
- let self = this;
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- if (polyvPlayerContext != null) {
-
- this.playTime = polyvPlayerContext.getCurrentTime() //播放时刻
- // console.log(this.playTime,789,this.photoHistoryList)
- //判断是否需要拍照
- if (this.photoNum > 0) {
- this.configPhoto()
- let photoTime =0; //获取拍照秒数
- for(let i=0;i<this.photoList.length;i++){
- photoTime = Number(this.photoList[i]); //获取拍照秒数
- if (photoTime < this.playTime&&photoTime>this.playTime-8) { //3秒区间内才触发拍照,避免拉动滚动条
- if(this.photoHistoryList.indexOf(i)<0 && (this.sectionItem.rebuild == null || this.sectionItem.learning == 0)){ //不存在拍照历史,没有重修过,没有学过,则拍照
- //启动拍照
- //暂停
- polyvPlayerContext.exitFullScreen();
- polyvPlayerContext.pause();
- this.photoIndex = i
- this.openPhoto();
-
-
- }
-
- }
- }
-
- }
- }
- },
- closeToast() {
- clearTimeout(this.toastTimer)
- this.videoToastShow = false;
-
- },
- restart() {
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- polyvPlayerContext.seek(0);
- console.log('seek1')
- clearTimeout(this.toastTimer)
- this.videoToastShow = false;
- },
- onStateChange(newstate, oldstate) {
- if (newstate.detail.newstate == 'playing') {
- if (this.needSeek) {
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- if(this.recordObj.videoCurrentTime){
- console.log('seek2')
- polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
- this.seekTime = this.$method.secondToDate(this.recordObj.videoCurrentTime)
- this.videoToastShow = true;
- this.toastTimer = setTimeout(() => {
- this.videoToastShow = false;
- },3000)
-
- }else{
- polyvPlayerContext.seek(1);//避免相同节继续播放
- console.log('seek3')
-
- }
-
- polyvPlayerContext.play();
- this.needSeek = false;
- }
- //开始播放
- if (this.timer) {
- clearInterval(this.timer);
- }
- this.timer = setInterval(this.timeEvent, 1000); //定时器
- }
- if (newstate.detail.newstate == 'pause') {
- clearInterval(this.timer);
- //暂停提交记录
- /* this.ossAvatarUrl = ""
- this.postStudyRecord() */
- }
- if (newstate.detail.newstate == 'ended') {
- clearInterval(this.timer);
- uni.showToast({
- icon:'none',
- title:'播放完毕'
- })
- this.postStudyRecord(1);
- // uni.$emit('playNext') //播放重修下一节
- }
- },
- //拍照
- openPhoto() {
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- polyvPlayerContext.exitFullScreen();
- this.enableAutoRotation = false;
- this.photoPopup = true;
- this.isTaking = true;
- uni.authorize({
- scope: 'scope.camera',
- success() {
-
- }
- })
- },
- async submit() {
- if(this.uploadLock) {
- return;
- }
- this.uploadLock = true;
- const waitYS = await this.imageInfos();
- this.postCoursePhotoRecord().then(res => {
- this.photoHistoryList.push(this.photoIndex)
- this.postStudyRecord(); //提交记录
- //恢复播放
-
- this.photoPopup = false;
- this.uploadLock = false;
- this.enableAutoRotation = true;
- var polyvPlayerContext = this.selectComponent('#playerVideo');
- if (polyvPlayerContext != null) {
- polyvPlayerContext.play();
- }
- }).catch(err => {
- uni.showToast({
- title: '上传接口报错,请重新拍照上传' + err,
- icon: 'none'
- });
- this.uploadLock = false;
- this.openPhoto();
- })
-
-
- },
- reTake() {
- this.isTaking = true;
- },
- //确认拍照
- takePhoto() {
- var self = this;
- const ctx = uni.createCameraContext();
- ctx.takePhoto({
- quality: 'high',
- success: res => {
- console.log(res.tempImagePath);
- self.avatarUrl = res.tempImagePath;
- this.isTaking = false;
- // self.submit();
- // self.photoPopup = false;
- // self.enableAutoRotation = true;
- },
- fail: err => {
- console.log(err);
- }
- });
- },
- playError(e) {
- console.log(e)
- },
- //拍照报错
- error(e) {
- console.log(e.detail);
- },
- //关闭相机
- closePhoto() {
- this.photoPopup = false;
- self.enableAutoRotation = true;
- },
- /**
- * 进入全屏
- */
- fullscreenchange(event) {
- console.log(event)
- if(event.detail.direction == 'vertical') {
- this.navShow = true;
- } else if(event.detail.direction == 'horizontal') {
- this.navShow = false;
-
- }
- },
- getGoodsDetail() {
- let self = this;
- this.$api.goodsDetail(this.goodsId).then(res => {
- self.goodsData = res.data.data;
- self.gradeId = self.goodsData.gradeId;
- console.log(self.gradeId, "班级ID");
- this.courseBusiness()
- this.courseHandouts();
- self.getMenuList();
- self.getReMenuList(); //获取重修目录
- setTimeout(function(){
- if(!self.needProfileModal){
- self.getGradeInfo()
- }
- },500)
-
- //获取节笔记
- this.getNoteList();
- if (self.goodsData.goodsPlayConfig) {
- self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
- if (self.goodsPlayConfig.autoPlay > 0) {
- self.autoplay = true;
- }
- if (self.goodsPlayConfig.drag > 0) {
- self.isAllowSeek = 'yes';
- }
- if (self.goodsPlayConfig.speed > 0) {
- self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
- }
- }
- if (self.goodsData.goodsPhotographConfig) {
- self.goodsPhotographConfig = JSON.parse(self.goodsData.goodsPhotographConfig);
- if (self.goodsPhotographConfig.photoNum>0) {
- self.photoNum = self.goodsPhotographConfig.photoNum
- console.log(self.photoNum,777777)
- }
- }
- });
- },
- startVideo() {
- this.startStatus = true;
- },
- getAnswerList() {
- let self = this;
- this.$api.answerList({ courseId: this.courseId,goodsId: this.goodsId }).then(res => {
- if (res.data.code == 200) {
- self.answerList = res.data.rows;
- }
- });
- },
- getReMenuList() {
- let self = this;
- this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
- if (res.data.code == 200) {
- for (let i = 0; i < res.data.rows.length; i++) {
- let item = res.data.rows[i];
- item.down = true;
- item.id = item.menuId;
- item.name = item.menuName;
- }
- self.reMenuList = res.data.rows;
- if(self.reMenuList.length>0){
- self.list = [
-
- {
- name: '目录'
- },
- {
- name: '讲义'
- },
- {
- name: '笔记'
- },
- {
- name: '答疑'
- },
- {name:'重修目录'}
- ];
- this.current = 0;
- } else {
- self.list = [
-
- {
- name: '目录'
- },
- {
- name: '讲义'
- },
- {
- name: '笔记'
- },
- {
- name: '答疑'
- }
- ];
- this.current = 0;
- }
- }
- });
- },
- getMenuList() {
- let self = this;
- this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
- if (res.data.code == 200) {
- for (let i = 0; i < res.data.rows.length; i++) {
- let item = res.data.rows[i];
- item.down = true;
- item.id = item.menuId;
- item.name = item.menuName;
- item.menuType = item.type;
- }
- self.menuList = res.data.rows;
-
- for(let i=0;i<res.data.rows.length;i++){
- if(res.data.rows[i].type == 1) {
- this.menuIndex = [i];
- break;
- } else if(res.data.rows[i].type == 2) {
- this.menuIndex = [i];
- break;
- }
- }
- }
- });
- },
- courseDetail() {
- let self = this;
- this.$api.courseDetail(this.courseId).then(res => {
- if (res.data.code == 200) {
- self.detail = res.data.data;
- uni.setNavigationBarTitle({
- title:self.detail.courseName
- })
- }
- });
- },
- open(item) {
- item.showChildren = !item.showChildren;
- },
- change(index) {
- this.current = index;
- },
- openDocument() {
- let self = this;
- let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl)
- console.log(url)
- uni.downloadFile({
- url: url,
- success: function (res) {
- console.log(999)
- var filePath = res.tempFilePath;
- uni.openDocument({
- filePath: filePath,
- showMenu: self.courseHandoutsData.canDownload == 1 ? true : false,
- success: function (res) {
- console.log(res,'打开文档成功');
- },
- fail:function(err) {
- console.log(err)
- uni.showToast({
- icon:'none',
- title:'文档地址错误'
- })
- }
- });
- },
- fail:(err) => {
- uni.showModal({
- title:'提示',
- content:'文档错误,'+err.errMsg,
- showCancel:false
- })
- }
- });
- }
- }
- };
- </script>
- <style lang="scss" scope>
- .btnSet{
- width: 440rpx;
- height: 80rpx;
- background: #007AFF;
- border-radius: 40rpx;
- color: #FFFFFF;
- font-size: 28rpx;
- line-height: 80rpx;
- }
- .btnReply {
- width: 80rpx;
- height: 40rpx;
- background: #e3f0ff;
- border-radius: 16rpx;
- text-align: center;
- color: #007aff;
- }
- .btnDel {
- width: 80rpx;
- height: 40rpx;
- background: #ffedf0;
- border-radius: 16rpx;
- text-align: center;
- color: #ff2d55;
- }
- .btnReply {
- width: 80rpx;
- height: 40rpx;
- background: #e3f0ff;
- border-radius: 16rpx;
- font-size: 24rpx;
- }
- .lecture-box {
- display: flex;
- align-items: center;
- height: 80rpx;
- background: #FFFFFF;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
-
- .title {
- padding:10rpx;
- flex:1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- color:#333;
- font-weight: bold;
- font-size: 32rpx;
- }
-
- .btn {
- display: flex;
- align-items: center;
- justify-content: center;
- width:80rpx;
- height:80rpx;
- background: #FFFFFF;
- box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0,0,0,0.1);
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- }
- }
- .lecture-content {
- background:#fff;
- margin-top:10rpx;
- padding:10rpx;
- border-radius:16rpx;
- }
- .photoBox {
- background-color: #FFFFFF;
- border-radius: 32px 32px 0px 0px;
- .photoTop {
- height: 74rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0rpx 38rpx;
- .sqzz {
- width: 28rpx;
- height: 28rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .centersq {
- color: #333;
- font-size: 30rpx;
- font-weight: 500;
- }
- }
- .photoCenter {
- width: 750rpx;
- height: 979rpx;
- position: relative;
- .custom {
- width: 750rpx;
- height: 979rpx;
- position: absolute;
- z-index: 1000;
- top: 0;
- left: 0;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
-
- .btns {
- display: flex;
-
-
- .btnResult {
- height: 100rpx;
- flex:1;
- background-color: #07c160;
- text-align: center;
- line-height: 100rpx;
- color: #fff;
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- }
- .chat_box {
- display: flex;
- padding: 20rpx;
- justify-content: space-between;
- }
- .chat3 {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- margin-top: 10rpx;
- }
- .chat2 {
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- margin-top: 10rpx;
- }
- .chat1 {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- .leftPadding {
- margin-left: 8rpx;
- }
- .t2Content {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #999999;
- line-height: 48rpx;
- }
- .tBox2 {
- display: flex;
- padding-top: 10rpx;
- color: #333333;
- font-size: 30rpx;
- }
- .tBox {
- display: flex;
- align-items: center;
- padding-top: 10rpx;
- }
- .title {
- font-size: 24rpx;
- color: #999999;
- }
- page {
- // padding-top: 10px;
- // padding-top: constant(safe-area-inset-top);
- // padding-top: env(safe-area-inset-top);
- }
- .inputBottom {
- position: fixed;
- left: 0;
- bottom: 0;
- background: #ffffff;
- height: 98rpx;
- display: flex;
- align-items: center;
- width: 100%;
-
- .flex_auto {
- flex:1;
- margin-left: 10% ;
-
- .input {
- height:60rpx;
- }
- }
-
- .btn {
- color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;
- }
- }
- .noteBox {
- width: 100%;
- background: #ffffff;
- padding: 10rpx;
- border-radius: 16rpx;
- }
- .dateBox {
- width: 216rpx;
- height: 48rpx;
- background: #ffffff;
- border-radius: 24rpx;
- font-size: 24rpx;
- color: #666666;
- text-align: center;
- line-height: 48rpx;
- margin: 20rpx 0;
- }
- .t_content1 {
- color: #007aff;
- margin-left: 10rpx;
- }
- .tag1 {
- border: 2rpx solid #007aff;
- border-radius: 8rpx;
- font-size: 20rpx;
- color: #007aff;
- padding: 5rpx;
- }
- .b_title {
- color: #333333;
- font-size: 30rpx;
- font-weight: bold;
- }
- page {
- background: #eaeef1;
- }
- .menuBox {
- width: 100%;
- background: #ffffff;
- border-radius: 16rpx;
- padding: 20rpx;
- margin-bottom: 20rpx;
- }
- .btnspric {
- border-top: 1rpx solid #eee;
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 108rpx;
- padding-left: 43rpx;
- padding-right: 32rpx;
- }
- .btnspric > .lefprL {
- font-size: 36rpx;
- color: #0c141f;
- font-weight: bold;
- }
- .btnspric > .lefprR {
- padding: 0rpx 24rpx;
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- color: #fff;
- background: #32467b;
- border-radius: 24rpx;
- box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
- }
- .yhj,
- .hdyhj {
- padding: 24rpx 29rpx 24rpx 34rpx;
- }
- .yhj {
- border-bottom: 16rpx solid #f9f9f9;
- }
- .yhjtit {
- font-size: 30rpx;
- color: #0c141f;
- font-weight: 500;
- margin-bottom: 14rpx;
- }
- .yhjList {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 14rpx;
- }
- .yhjList > .yhjLefts {
- display: flex;
- align-items: center;
- }
- .yhjLefts > .yhl {
- color: #32467b;
- font-size: 30rpx;
- margin-right: 31rpx;
- }
- .yhjLefts > .yhbq {
- font-size: 24rpx;
- color: #ff9500;
- border-radius: 18rpx;
- background-color: rgba(255, 149, 0, 0.2);
- border: 2rpx solid #ff9500;
- height: 38rpx;
- line-height: 38rpx;
- padding: 0rpx 16rpx;
- }
- .ts {
- font-size: 24rpx;
- color: #999;
- margin: 14rpx 0rpx;
- padding-right: 29rpx;
- padding-left: 34rpx;
- }
- .yh {
- padding-top: 20rpx;
- }
- .yh > .yhtitle {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-right: 29rpx;
- padding-left: 34rpx;
- }
- .priceBxs {
- display: flex;
- align-items: center;
- }
- .priceBxs > .pricleft {
- border-radius: 24rpx;
- border: 1rpx solid #e91313;
- background-color: rgba(233, 19, 19, 0.1);
- padding: 0rpx 18rpx;
- height: 49rpx;
- line-height: 49rpx;
- text-align: center;
- font-size: 30rpx;
- font-weight: 500;
- color: #e91313;
- margin-right: 13rpx;
- }
- .topBox {
- padding: 32rpx 32rpx 24rpx;
- border-bottom: 1rpx solid #eeeeee;
- }
- .topBox > .boldFonstType {
- font-weight: 500;
- font-size: 30rpx;
- margin: 16rpx 0rpx 23rpx;
- }
- .topBox > .firstTopL {
- display: flex;
- align-items: center;
- }
- .topBox > .firstTopL > .imageBs {
- width: 331rpx;
- height: 160rpx;
- border-radius: 6rpx;
- overflow: hidden;
- margin-right: 8rpx;
- box-shadow: 0rpx 6rpx 6rpx 0rpx rgba(47, 67, 121, 0.08);
- }
- .topBox > .firstTopL > .imageBs > image {
- width: 100%;
- height: 100%;
- }
- .topBox > .firstTopL > .textBs {
- font-size: 30rpx;
- font-weight: bold;
- color: #0c141f;
- }
- .content {
- padding: 24rpx;
- text-align: left;
- }
- .catalogBox {
- display: flex;
- align-items: center;
- flex-wrap: nowrap;
- overflow-x: auto;
- padding-left: 38rpx;
- max-height: 305rpx;
- overflow-y: auto;
- transition: all 0.4s;
- }
- .catalogBox > .catalogA {
- min-width: 200rpx;
- height: 48rpx;
- line-height: 48rpx;
- // text-align: center;
- border: 2rpx solid transparent;
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- word-break: break-all;
- border-radius: 10rpx;
- background: rgba(22, 119, 255, 0.05);
- padding-left: 19rpx;
- box-sizing: border-box;
- padding-right: 15rpx;
- margin-right: 16rpx;
- margin-bottom: 20rpx;
- margin-top: 15rpx;
- font-size: 24rpx;
- color: #666;
- }
- .catalogBox > .activesq {
- border-color: #1677ff;
- }
- .changeCatalogBox {
- display: block;
- }
- .catalogBox::-webkit-scrollbar {
- display: none; /* Chrome Safari */
- }
- .box {
- position: relative;
- top: 650rpx;
- padding-bottom: 88rpx;
- margin: 20rpx;
- }
- .price_t2 {
- font-size: 18rpx;
- font-family: PingFang SC;
- font-weight: 500;
- text-decoration: line-through;
- color: #999999;
- }
- .price_t1 {
- font-size: 33rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #e91313;
- }
- .sc_t {
- font-size: 22rpx;
- color: #000000;
- }
- .sc {
- width: 29rpx;
- height: 29rpx;
- }
- .buy {
- width: 138rpx;
- height: 48rpx;
- line-height: 48rpx;
- background: #32467b;
- border-radius: 10rpx;
- color: #ffffff;
- font-size: 28rpx;
- text-align: center;
- vertical-align: middle;
- position: absolute;
- right: 30rpx;
- }
- .video_body {
- padding-bottom: 96rpx;
- }
- .footer_tab {
- position: fixed;
- bottom: 0;
- height: 96rpx;
- width: 100%;
- background-color: #ffffff;
- }
- .tj_box {
- width: 50%;
- display: inline-block;
- text-align: center;
- margin: 10rpx 0;
- }
- .teacher_t {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 36rpx;
- margin-left: 15rpx;
- }
- .teacher_img {
- width: 87rpx;
- height: 129rpx;
- }
- .t2 {
- font-size: 24rpx;
- font-family: PingFang SC;
- color: #666666;
- line-height: 36rpx;
- margin: 15rpx;
- }
- .r_t2 {
- width: 201rpx;
- height: 49rpx;
- background: rgba(22, 119, 255, 0.05);
- border: 1rpx solid #32467b;
- border-radius: 16rpx;
- color: #666666;
- font-size: 23rpx;
- text-align: center;
- display: flex;
- align-items: center;
- padding: 5rpx;
- }
- .scroll_box {
- width: 100%;
- height: 60rpx;
- background: #ffffff;
- box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
- white-space: nowrap;
- overflow: hidden;
- margin: 15rpx 0;
- }
- .r_sliper {
- padding: 0 20rpx;
- }
- .top_line {
- width: 6rpx;
- height: 22rpx;
- background: #32467b;
- margin-right: 10rpx;
- }
- .video_t2 {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- }
- .video_t1 {
- height: 80rpx;
- color: #333333;
- line-height: 80rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .video_t1_t {
- display: flex;
- flex-direction: column;
- height: 80rpx;
- color: #333333;
- text-align: center;
- align-items: center;
- border-left: solid 1px #d6d6db;
- }
- .video_play {
- position: absolute;
- width: 95rpx;
- height: 95rpx;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- }
- .video_box {
- position: relative;
-
- .video-toast {
- position:absolute;
- width: 686rpx;
- height: 80rpx;
- background: rgba(0,0,0,0.6);
- border-radius: 24rpx;
- bottom:100rpx;
- left:50%;
- transform: translateX(-50%);
- color:#fff;
- display: flex;
- font-size: 26rpx;
- align-items: center;
- overflow:visible;
-
- &__text {
- flex:1;
- margin-left:40rpx;
- }
-
-
-
- &__btn {
- width:180rpx;
- text-align: center;
- border-left:1rpx solid #fff;
- }
- }
-
- .video-toast__close {
- position:absolute;
- right:32rpx;
- bottom:184rpx;
- width: 40rpx;
- height: 40rpx;
- line-height: 40rpx;
- text-align: center;
- background: rgba(0,0,0,0.6);
- border-radius:50%;
- color:rgba(255,255,255,0.3)
- }
- }
- .rotoct {
- transform: rotate(90deg);
- }
- </style>
|