living-applet.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <template>
  2. <view class="container">
  3. <!-- <mescroll-body ref="mescrollRef" @init="mescrollInit" top="0" bottom="0" :down="downOption" @down="downCallback" :up="upOption"
  4. @up="upCallback" @emptyclick="emptyClick"> -->
  5. <!-- <scroll-view
  6. class="scroll-view"
  7. scroll-y="true"
  8. refresher-enabled="true"
  9. @refresher-pull="onRefresherPull"
  10. @refresher-refresh="onRefresherRefresh"
  11. @refresher-restore="onRefresherRestore"
  12. :refresher-triggered="isRefresherTriggered"
  13. > -->
  14. <swiper :vertical="true" @change="change" :style="{'height':viewHeight+'px'}"
  15. @animationfinish="viewChange" @transition='swiper_trans' :current="index" :autoplay="false" >
  16. <swiper-item v-for="(item,i) in dataList" :key="i">
  17. <view class="swiper-item-video" :style="{'height':(viewHeight)+'px'}">
  18. <!-- 注意:只有切换到当前内容后才能显示视频播放器 -->
  19. <video :src="item.src"
  20. :controls="false"
  21. :poster="item.cover"
  22. :show-center-play-btn="false"
  23. :ref="'myVideo'+i"
  24. :id="'myVideo'+i"
  25. v-if="index==i"
  26. :autoplay="false"
  27. loop>
  28. </video>
  29. <image style="width: 100%;height: 100%;" mode="aspectFit" v-else :src="item.cover"></image>
  30. <view :ref="'videoHover'+i" class="videoHover" @click="tapVideoHover(item.state,$event)" >
  31. <image v-if="item.state=='pause' && item.isShowPlayIcon" class="playState" src="@/static/image/course/play.png"></image>
  32. </view>
  33. <view class="right es-c-white">
  34. <view class="item es es-ac es-pc es-mt-33">
  35. <view class="es-icon-90 es-br">
  36. <image class="es-icon-90" :src="item.headImg"></image>
  37. </view>
  38. </view>
  39. <view class="item es es-ver es-ac es-pc es-mt-33" @tap="doLike(item,index)">
  40. <view class="es-icon-76">
  41. <image class="es-icon-76" :src="item.like==1?'/static/images/other/video/zan1_on.png':'/static/images/other/video/zan1.png'"></image>
  42. </view>
  43. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.likeNum}}</text></view>
  44. </view>
  45. <view class="item es es-ver es-ac es-pc es-mt-33" @tap="openComment(item)">
  46. <view class="es-icon-76">
  47. <image class="es-icon-76" src="@/static/images/other/video/comment1.png"></image>
  48. </view>
  49. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.smsNum}}</text></view>
  50. </view>
  51. <view class="item es es-ver es-ac es-pc es-mt-33" @tap="doFavorite(item,index)">
  52. <view class="es-icon-76">
  53. <image class="es-icon-76" :src="item.favorite==1?'/static/images/other/video/fav1_on.png':'/static/images/other/video/fav1.png'" ></image>
  54. </view>
  55. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.favoriteNum}}</text></view>
  56. </view>
  57. <view class="item es es-ver es-ac es-pc es-mt-33" @tap="doShare(item)">
  58. <view class="es-icon-72">
  59. <image class="es-icon-72" src="@/static/images/other/video/share1.png"></image>
  60. </view>
  61. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.shares}}</text></view>
  62. </view>
  63. <!-- <view class="item es-ver es es-ac es-pc es-mt-33">
  64. <view class="es-br">
  65. <text class="es-c-white es-fs-34">{{item.uploadType}}</text>
  66. </view>
  67. </view> -->
  68. </view>
  69. <view class="left" v-if="item.isShowGoods && item.productId!=null" >
  70. <view class="es-h-74 es es-ac">
  71. <view class="es-f1 es es-ac" id="w">
  72. <view class="bg">
  73. <image src="/static/images/other/video/bg.png" :style="{width:w+'px'}" style="height: 74rpx;" ></image>
  74. </view>
  75. <!-- <view class="es-icon-77" style="z-index: 1;">
  76. <image class="es-icon-77" src="/static/images/other/video/rank.png"></image>
  77. </view>
  78. <view class="rank-text es-fs-26 es-fw-500 es-c-white" style="z-index: 1;"><text
  79. class="es-c-white es-fw-500 es-fs-26">精选热销榜·第二名</text></view>
  80. <view class="es-w-30"></view> -->
  81. </view>
  82. </view>
  83. <view class="goods">
  84. <view class="icon" style="width: 290rpx;height: 290rpx;">
  85. <image :src="item.imgUrl" style="width: 290rpx;height: 290rpx;" class="es-br-10"></image>
  86. </view>
  87. <view class="es-omit es-mt-19" style="width: 290rpx;"><text class="es-fw es-fs-30">{{item.packageName}}</text></view>
  88. </view>
  89. </view>
  90. <view class="bottom">
  91. <view class="bottombox">
  92. <!-- <view class="txtTitle" :class="showExpand?'text-clamp':''" :style="defTitStyle" :id="'txtTitle'+index" :ref="'txtTitle'+index">{{index==0?'酢浆草,这种长出水晶小萝卜的植物,你有没有把它当城市绿化带的四叶草?酢浆草,这种长出水晶小萝卜的植物,你有没有把它当城市绿化带的四叶草?':item.title}}</view> -->
  93. <view class="txtTitle" :class="showExpand?'text-clamp':''" :style="defTitStyle" :id="'txtTitle'+i" :ref="'txtTitle'+i">{{item.title}}</view>
  94. <view v-if="showExpand" class="expandBtn" @tap="clickExpand">{{ titIsExpand?'收起':'展开' }}</view>
  95. </view>
  96. </view>
  97. </view>
  98. </swiper-item>
  99. </swiper>
  100. <!-- <view :style="'width: '+ windowWidth +'px;background-color:'+bgColor+';padding-top:'+statusBarHeight+'px'" class="tabbar1">
  101. <view class="search-box" :style="'width: '+ windowWidth +'px;padding: 0 24rpx'">
  102. <image class="backicon" src="@/static/images/back_white_icon.png" mode="aspectFill"></image>
  103. <u-search
  104. :showAction="false"
  105. v-model="keyword"
  106. bgColor="rgba(255,255,255,0.4)"
  107. searchIconColor="#fff"
  108. color="#fff"
  109. placeholderColor="#fff"
  110. :inputStyle="{background: 'transparent'}"
  111. :disabled="true"></u-search>
  112. <view class="backmask" :style="'width: '+ windowWidth +'px;'" @click="navBack"></view>
  113. </view>
  114. </view>
  115. <view>dsfdfg</view> -->
  116. <view class="view_Refresh" :style="{top:Math.abs(viewDy)+10+'px'}" v-show="viewNum==0&&viewDy<0">
  117. <view class="dot dot-1"></view>
  118. <view class="dot dot-2"></view>
  119. <view class="dot dot-3"></view>
  120. </view>
  121. <!-- 评论弹窗 -->
  122. <popupBottom ref="mescrollItem" :visible.sync="specVisible" @close="closePop" :cmdId="videoId" :smsNum="pingCount" :title="pingCount+'条评论'" radius="32" maxHeight="1200">
  123. </popupBottom>
  124. <!-- </scroll-view> -->
  125. <!-- </mescroll-body> -->
  126. <!-- 下载app弹窗 -->
  127. <!-- <uni-popup ref="downappPop" type="center" is-mask-click="false">
  128. <view class="downappPop">
  129. <uni-icons class="closebtn" type="closeempty" size="27" color="#bbb" @click="$refs.downappPop.close()"></uni-icons>
  130. <image src="/static/logo.png" class="es-w-100 es-h-100"></image>
  131. <view>请下载App观看</view>
  132. <view class="es-w-250 es-bc es es-pc es-ac es-fw-bold es-fs-30" style="min-height: 80rpx;border-radius: 10rpx;" @tap="openApp()">
  133. <view class="es-ml-30 es-mr-30">下载App</view>
  134. </view>
  135. </view>
  136. </uni-popup> -->
  137. <h5DownAppPopup ref="h5downappPop"></h5DownAppPopup>
  138. </view>
  139. </template>
  140. <script>
  141. import h5DownAppPopup from '@/components/h5-down-app-tip/h5-down-app-popup.vue'
  142. import popupBottom from '@/components/popupBottom/popupBottom.vue'
  143. import MescrollCompMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-comp.js";
  144. import { getVideoList,doFavorite,doLike } from '@/api/shortvideo'
  145. export default {
  146. mixins: [MescrollCompMixin],
  147. components: {
  148. popupBottom,
  149. h5DownAppPopup
  150. },
  151. data() {
  152. return {
  153. list:[
  154. {type:2,},
  155. {type:1,},
  156. {type:2,},
  157. {type:1,}
  158. ],
  159. mescroll:null,
  160. downOption: {
  161. auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
  162. },
  163. upOption: {
  164. auto: false, // 不自动加载
  165. page: {
  166. num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  167. size: 10 // 每页数据的数量
  168. },
  169. noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
  170. toTop:{
  171. width:0,
  172. }
  173. },
  174. timers:null,
  175. leftTimers:"",
  176. autoplay: true,
  177. interval: 2000,
  178. duration: 500,
  179. index:-1,
  180. dataList: [], //用于数据循环的列表🌟💗
  181. keyword:"",
  182. pageNum:1,
  183. pageSize:2,
  184. isLastPage:false,
  185. viewHeight:0,
  186. viewDy:0,
  187. viewNum:0,
  188. changeFlag:true,
  189. videoMuted:false,
  190. havIngReq:true,
  191. isPostBack:false,
  192. changeFst:true,
  193. specVisible: false,
  194. videoId:0,
  195. reqVideoId:null,
  196. pingCount:0,
  197. zIndex:10,
  198. showExpand:false,
  199. titIsExpand:false,
  200. lines:2,
  201. lineCount:0,
  202. titOpacity:0,
  203. defTitStyle:{'opacity':0},
  204. smsCount:0,
  205. isH5: true,
  206. flagTip: false,
  207. // 查看视频详情的idnex
  208. searchIndex: 0,
  209. pageUrl:"",
  210. }
  211. },
  212. onLoad(options) {
  213. this.pageUrl = '/pages/course/video/living-app'
  214. this.keyword = options.keyword || ''
  215. this.pageNum = options.pageNum || 1
  216. this.pageSize = options.pageSize || 10
  217. this.searchIndex = Number(options.index || 0)
  218. this.index = 0
  219. const systemInfo = uni.getSystemInfoSync();
  220. this.viewHeight=systemInfo.windowHeight;
  221. if(options.videoId){
  222. this.reqVideoId=options.videoId;
  223. }
  224. let that=this;
  225. uni.$on('refreshTitle', (pingCount) => {
  226. that.pingCount=pingCount;
  227. let item=that.dataList[that.index];
  228. item.smsNum=pingCount;
  229. });
  230. uni.$on('openReply', (data) => {
  231. that.openComementDialog(data);
  232. });
  233. },
  234. onShow() {
  235. //#ifdef H5
  236. this.isH5=true;
  237. //#endif
  238. //#ifndef H5
  239. this.isH5=false;
  240. //#endif
  241. },
  242. mounted() {
  243. this.requestData(1);
  244. },
  245. methods: {
  246. // 播放视频
  247. play(index) {
  248. const videoContext=uni.createVideoContext("myVideo"+index,this);
  249. videoContext.play();
  250. this.dataList[this.index].state = 'play'
  251. },
  252. requestData(type){
  253. //联网加载数据
  254. var that = this;
  255. var params = { "keyword":this.keyword};
  256. if(this.reqVideoId!=null){
  257. params["videoId"]=this.reqVideoId;
  258. }
  259. getVideoList(params,this.pageNum,this.pageSize).then(res => {
  260. if(res.code==200){
  261. const datas=res.data.list;
  262. const tempDatas=[];
  263. this.isLastPage=res.data.isLastPage;
  264. datas.forEach((e, index) => {
  265. e.videoId=e.id;
  266. e.src=e.src.replace("obs.shouzhujue.com","obs.jy.cc");
  267. e.src=e.src.replace("cdn.ylrzcloud.com","tcpv.ylrzcloud.com");
  268. e.id = 'A'+e.id+''+parseInt(Math.random()*1000);
  269. if(this.pageNum==1 && index==0 && !this.isPostBack){
  270. this.isPostBack=true;
  271. e.state='pause';
  272. e.isShowPlayIcon=true;
  273. }
  274. tempDatas.push(e);
  275. });
  276. // 如果是H5列表只展示两个视频;H5查看视频详情过来,数据取列表searchIndex和searchIndex+1的两条,index为0
  277. if(this.pageNum == 1){
  278. this.dataList = this.isH5&&type== 1 ? tempDatas.splice(this.searchIndex,2) : tempDatas; //如果是第一页需手动制空列表
  279. setTimeout(()=>{
  280. this.index = 0
  281. this.checkTextLines(0);
  282. //uni.$emit('checkTextLines',0);
  283. this.havIngReq=false;
  284. },200);
  285. setTimeout(()=>{
  286. // const videoContext=uni.createVideoContext("myVideo0",this);
  287. // videoContext.play();
  288. // this.play(this.index)
  289. },300);
  290. this.leftTimers=setTimeout(e=>{
  291. this.dataList[0].isShowGoods=true;
  292. },3000);
  293. } else{
  294. this.dataList= this.isH5&&type== 1 ? tempDatas.splice(this.searchIndex,2) : this.dataList.concat(tempDatas); //追加新数据
  295. this.havIngReq=false;
  296. }
  297. }else{
  298. uni.showToast({icon:'none',title: "请求失败"});
  299. this.dataList = [];
  300. this.havIngReq=false;
  301. }
  302. }).catch(()=>{
  303. //联网失败, 结束加载
  304. this.havIngReq=false;
  305. });
  306. },
  307. // 监听移动
  308. swiper_trans(e) {
  309. if(!this.isH5) {
  310. this.viewDy = Math.ceil(e.detail.dy);
  311. //console.log("qxj viewDy:"+e.detail.dy)
  312. if (this.changeFlag&&this.viewNum == 0 && e.detail.dy < -20) {
  313. this.changeFlag=false;
  314. this.pageNum = 1;
  315. this.index=-1;
  316. this.requestData();
  317. }
  318. }
  319. },
  320. // 视频切换
  321. viewChange(e) {
  322. this.changeFlag=true;
  323. if(!this.havIngReq){
  324. this.viewNum = e.detail.current;
  325. }
  326. if(!this.isH5) {
  327. if (this.index + 2 == this.dataList.length) {
  328. this.havIngReq=true;
  329. if(this.isLastPage){
  330. this.pageNum=1;
  331. this.requestData();
  332. }else{
  333. this.pageNum++;
  334. this.requestData()
  335. }
  336. }
  337. } else {
  338. if(!this.flagTip) {
  339. this.flagTip=true
  340. return
  341. }
  342. if(this.index >= 1&&this.flagTip) {
  343. if(!this.$isLogin()){ //切换小节需要登录
  344. this.$showLoginPage();
  345. } else {
  346. // uni.showToast({title: "请下载App观看",icon: 'error'});
  347. console.log(this.$refs.h5downappPop)
  348. this.$refs.h5downappPop.openPop()
  349. }
  350. }
  351. }
  352. },
  353. change:function(e){
  354. this.flagTip = false
  355. if(!this.havIngReq){
  356. this.index = e.detail.current;
  357. let data=this.dataList[this.index];
  358. this.videoId=data.videoId;
  359. this.pingCount=data.smsNum;
  360. }
  361. setTimeout(e=>{
  362. console.log("qxj change index:"+this.index);
  363. if(!this.changeFst){
  364. this.changeFst=true;
  365. }else{
  366. this.play(this.index);
  367. }
  368. this.checkTextLines(this.index);
  369. },50);
  370. },
  371. tapVideoHover(state,event){
  372. console.log('kkkk=>'+this.index+" state:"+state);
  373. this.dataList[this.index].isShowimage = false
  374. this.dataList[this.index].isShowProgressBarTime = false
  375. this.ProgressBarOpacity = 0.5
  376. this.dotWidth = 0
  377. // 1.启用双击点赞 --- start
  378. if(state=='play'||state=='continue'){
  379. this.dataList[this.index].state = 'pause';
  380. }
  381. else if(state=='reset'){
  382. this.dataList[this.index].state = 'reset';
  383. }
  384. else{
  385. this.dataList[this.index].state = 'continue';
  386. }
  387. this.dataList[this.index].isShowPlayIcon = true;
  388. console.log('xxx 编号:'+this.index+" state:"+this.dataList[this.index].state);
  389. if(this.dataList[this.index].state == 'continue'){
  390. console.log('播放数据',this.dataList[this.index].id);
  391. //this.$refs["myVideo"+this.index].play();
  392. uni.createVideoContext("myVideo"+this.index,this).play();
  393. }
  394. if(this.dataList[this.index].state == 'pause'){
  395. //暂停以后继续播放
  396. //this.$refs["myVideo"+this.index].pause();
  397. uni.createVideoContext("myVideo"+this.index,this).pause();
  398. }
  399. if(this.dataList[this.index].state == 'reset'){
  400. // this.$refs["myVideo"+this.index].seek(0);
  401. // this.$refs["myVideo"+this.index].play();
  402. uni.createVideoContext("myVideo"+this.index,this).seek(0);
  403. uni.createVideoContext("myVideo"+this.index,this).pause();//暂停以后继续播放
  404. this.dataList[this.index].state = 'continue';
  405. }
  406. },
  407. openComment(item){
  408. console.log("qxj openComment");
  409. this.videoId=item.videoId;
  410. this.specVisible=true;
  411. //this.$refs.mescrollItem.showBotBar(item.smsNum);
  412. //this.$emit("openComment",item);
  413. },
  414. closePop(){
  415. this.specVisible=false;
  416. //this.$refs.mescrollItem.hideBotBar();
  417. },
  418. doLike(item,index){
  419. if(!this.$isLogin()){
  420. this.$showLoginPage();
  421. return;
  422. }
  423. doLike(item.videoId).then(res => {
  424. if(res.code==200){
  425. if(item.like==0){
  426. item.like=1;
  427. item.likeNum+=1;
  428. }else{
  429. item.like=0;
  430. item.likeNum-=1;
  431. }
  432. //this.dataList[index]=item;
  433. this.$forceUpdate(); // 如果你需要强制刷新,可以调用 $forceUpdate()
  434. }
  435. },
  436. rej => {}
  437. );
  438. },
  439. doFavorite(item,index){
  440. if(!this.$isLogin()){
  441. this.$showLoginPage();
  442. return;
  443. }
  444. doFavorite(item.videoId).then(res => {
  445. if(res.code==200){
  446. if(item.favorite==0){
  447. item.favorite=1;
  448. item.favoriteNum+=1;
  449. }else{
  450. item.favorite=0;
  451. item.favoriteNum-=1;
  452. }
  453. this.dataList[index]=item;
  454. this.$forceUpdate(); // 如果你需要强制刷新,可以调用 $forceUpdate()
  455. }
  456. },
  457. rej => {}
  458. );
  459. },
  460. checkTextLines() {
  461. var system = uni.getSystemInfoSync();
  462. let textWidth=system.screenWidth-uni.upx2px(150+20);
  463. let fontSize=uni.upx2px(30);
  464. let screenWidth=system.screenWidth;
  465. let that=this;
  466. let txtTitle=this.$refs["txtTitle"+this.index];
  467. this.defTitStyle={'opacity':0}
  468. this.showExpand=false;
  469. this.$nextTick(()=>{
  470. uni.createSelectorQuery().select("#txtTitle"+this.index).boundingClientRect(rect => {
  471. console.log("qxj checkTextLines height:"+JSON.stringify(rect));
  472. if(rect!=null){
  473. this.defTitStyle={'opacity':1};
  474. this.showExpand=rect.height>40;
  475. }
  476. }).exec();
  477. })
  478. },
  479. clickExpand(){
  480. this.titIsExpand=!this.titIsExpand;
  481. this.defTitStyle={'opacity':1,'-webkit-line-clamp':this.titIsExpand?1000:2};
  482. },
  483. openComementDialog(data) {
  484. this.$refs.inputDialog.open()
  485. },
  486. dialogInputConfirm(val) {
  487. },
  488. showToast(title){
  489. uni.showToast({icon:'none',title: title ,duration:5000});
  490. }
  491. }
  492. }
  493. </script>
  494. <style scoped>
  495. .container{
  496. position: fixed;
  497. width: 100%;
  498. height: 100%;
  499. background-color: #000;
  500. }
  501. swiper,swiper-item{
  502. width: 100%;
  503. height: 100%;
  504. }
  505. /deep/.uni-swiper-slide-frame{
  506. background: #000000;
  507. }
  508. .swiper-item-video,.swiper-item-video video{
  509. width: 100%;
  510. height: 100%;
  511. background-color: #000000;
  512. }
  513. .videoHover {
  514. position: absolute;
  515. top: 0;
  516. left: 0;
  517. flex: 1;
  518. background-color: rgba(0, 0, 0, 0.1);
  519. justify-content: center;
  520. align-items: center;
  521. width: 100%;
  522. height: 100%;
  523. z-index: 2;
  524. display: flex;
  525. justify-content: center;
  526. align-items: center;
  527. /* border-style: dashed;
  528. border-color: #DD524D;
  529. border-width: 1px; */
  530. }
  531. .playState {
  532. width: 80rpx;
  533. height: 80rpx;
  534. opacity: 0.9;
  535. }
  536. .view_Refresh {
  537. position: absolute;
  538. top: 150rpx;
  539. left:calc(50% - 50rpx);
  540. width: 100rpx;
  541. height: 30rpx;
  542. display: flex;
  543. justify-content: center;
  544. align-items: center;
  545. .dot {
  546. width: 20rpx;
  547. height: 20rpx;
  548. border-radius: 50%;
  549. margin: 0 10rpx;
  550. animation: loading 1s;
  551. }
  552. .dot-1 { animation-delay: -0.2s;background-color: #FF5C03; }
  553. .dot-2 {animation-delay: -0.4s;background-color: #FFFFFF; }
  554. .dot-3 {animation-delay: -0.6s;background-color: #FF5C03;}
  555. @keyframes loading {
  556. 0%, 100% {
  557. transform: scale(1);
  558. background-color: #FF5C03; /* 动画结束时的颜色为黑色 */
  559. }
  560. 50% {
  561. transform: scale(0.5);
  562. background-color: #FFFFFF; /* 动画中间的颜色为白色 */
  563. }
  564. }
  565. }
  566. .right,.left {
  567. position: absolute;
  568. z-index: 10;
  569. bottom: 150rpx;
  570. padding-bottom: env(safe-area-inset-bottom);
  571. }
  572. .right {
  573. right: 20rpx;
  574. }
  575. .right .item {
  576. width: 100rpx;
  577. }
  578. .right image {
  579. width: 100%;
  580. height: 100%;
  581. border-radius:50% ;
  582. }
  583. .left {
  584. left: 30rpx;
  585. }
  586. .goods .icon,.goods .icon image {
  587. width: 290rpx;
  588. height: 290rpx;
  589. }
  590. .bg {
  591. /* background-image: url(/static/images/other/video/bg.png); */
  592. position: absolute;
  593. left: 0;
  594. top: 0;
  595. width: 100%;
  596. height: 74rpx;
  597. }
  598. .goods {
  599. width: 330rpx;
  600. background-color: rgba(255, 255, 255, 0.4);
  601. padding: 20rpx;
  602. border-radius: 20rpx;
  603. margin-top: 20rpx;
  604. }
  605. .bottom {
  606. position: absolute;
  607. left: 0;
  608. bottom: 120rpx;
  609. right: 150rpx;
  610. z-index: 10;
  611. padding-bottom: env(safe-area-inset-bottom);
  612. }
  613. .bottombox{
  614. position: relative;
  615. display: inline-block;
  616. padding:2rpx 10rpx;
  617. margin-left:20rpx;
  618. border-radius: 10rpx;
  619. background-color: rgba(0, 0, 0, 0.2);
  620. }
  621. .txtTitle{
  622. line-height: 20px;
  623. /* 超出两行显示省略号,如果是text标签需要设置为1 */
  624. color: #fff;
  625. font-weight: 500;
  626. font-size: 30rpx;
  627. /* margin-left:20rpx;
  628. background: rgba(0, 0, 0, 0.2);
  629. padding:2rpx;
  630. border-radius: 10rpx; */
  631. }
  632. .text-clamp{
  633. display: -webkit-box;
  634. -webkit-line-clamp: 2; /* 显示的行数 */
  635. -webkit-box-orient: vertical; /* 内容会垂直堆叠 */
  636. overflow: hidden; /* 隐藏溢出的内容 */
  637. text-overflow: ellipsis; /* 当内容被裁剪时显示省略号 */
  638. }
  639. .expandBtn{
  640. position: absolute;
  641. right: 10rpx;
  642. bottom: 2rpx;
  643. font-weight: 600;
  644. color: #fff;
  645. font-size: 30rpx;
  646. width: 100rpx;
  647. text-align: right;
  648. background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 50%);
  649. }
  650. .bgblack{
  651. background: #000;
  652. }
  653. </style>